mirror of
https://github.com/maputnik/editor.git
synced 2026-01-01 19:10:01 +00:00
1070 lines
3.4 MiB
1070 lines
3.4 MiB
var LG=Object.defineProperty;var UG=(n,e,t)=>e in n?LG(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var kn=(n,e,t)=>UG(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Ha(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function vB(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var k3={exports:{}},ev={},T3={exports:{}},ys={},eI;function zG(){if(eI)return ys;eI=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 n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),E=Symbol.iterator;function S(Te){return Te===null||typeof Te!="object"?null:(Te=E&&Te[E]||Te["@@iterator"],typeof Te=="function"?Te:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,U={};function z(Te,rt,yt){this.props=Te,this.context=rt,this.refs=U,this.updater=yt||O}z.prototype.isReactComponent={},z.prototype.setState=function(Te,rt){if(typeof Te!="object"&&typeof Te!="function"&&Te!=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,Te,rt,"setState")},z.prototype.forceUpdate=function(Te){this.updater.enqueueForceUpdate(this,Te,"forceUpdate")};function q(){}q.prototype=z.prototype;function Q(Te,rt,yt){this.props=Te,this.context=rt,this.refs=U,this.updater=yt||O}var re=Q.prototype=new q;re.constructor=Q,k(re,z.prototype),re.isPureReactComponent=!0;var X=Array.isArray,Y=Object.prototype.hasOwnProperty,ee={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function ie(Te,rt,yt){var bt,gt={},Dt=null,Pt=null;if(rt!=null)for(bt in rt.ref!==void 0&&(Pt=rt.ref),rt.key!==void 0&&(Dt=""+rt.key),rt)Y.call(rt,bt)&&!N.hasOwnProperty(bt)&&(gt[bt]=rt[bt]);var Le=arguments.length-2;if(Le===1)gt.children=yt;else if(1<Le){for(var Pe=Array(Le),Ee=0;Ee<Le;Ee++)Pe[Ee]=arguments[Ee+2];gt.children=Pe}if(Te&&Te.defaultProps)for(bt in Le=Te.defaultProps,Le)gt[bt]===void 0&&(gt[bt]=Le[bt]);return{$$typeof:n,type:Te,key:Dt,ref:Pt,props:gt,_owner:ee.current}}function he(Te,rt){return{$$typeof:n,type:Te.type,key:rt,ref:Te.ref,props:Te.props,_owner:Te._owner}}function de(Te){return typeof Te=="object"&&Te!==null&&Te.$$typeof===n}function Me(Te){var rt={"=":"=0",":":"=2"};return"$"+Te.replace(/[=:]/g,function(yt){return rt[yt]})}var fe=/\/+/g;function xe(Te,rt){return typeof Te=="object"&&Te!==null&&Te.key!=null?Me(""+Te.key):rt.toString(36)}function De(Te,rt,yt,bt,gt){var Dt=typeof Te;(Dt==="undefined"||Dt==="boolean")&&(Te=null);var Pt=!1;if(Te===null)Pt=!0;else switch(Dt){case"string":case"number":Pt=!0;break;case"object":switch(Te.$$typeof){case n:case e:Pt=!0}}if(Pt)return Pt=Te,gt=gt(Pt),Te=bt===""?"."+xe(Pt,0):bt,X(gt)?(yt="",Te!=null&&(yt=Te.replace(fe,"$&/")+"/"),De(gt,rt,yt,"",function(Ee){return Ee})):gt!=null&&(de(gt)&&(gt=he(gt,yt+(!gt.key||Pt&&Pt.key===gt.key?"":(""+gt.key).replace(fe,"$&/")+"/")+Te)),rt.push(gt)),1;if(Pt=0,bt=bt===""?".":bt+":",X(Te))for(var Le=0;Le<Te.length;Le++){Dt=Te[Le];var Pe=bt+xe(Dt,Le);Pt+=De(Dt,rt,yt,Pe,gt)}else if(Pe=S(Te),typeof Pe=="function")for(Te=Pe.call(Te),Le=0;!(Dt=Te.next()).done;)Dt=Dt.value,Pe=bt+xe(Dt,Le++),Pt+=De(Dt,rt,yt,Pe,gt);else if(Dt==="object")throw rt=String(Te),Error("Objects are not valid as a React child (found: "+(rt==="[object Object]"?"object with keys {"+Object.keys(Te).join(", ")+"}":rt)+"). If you meant to render a collection of children, use an array instead.");return Pt}function me(Te,rt,yt){if(Te==null)return Te;var bt=[],gt=0;return De(Te,bt,"","",function(Dt){return rt.call(yt,Dt,gt++)}),bt}function at(Te){if(Te._status===-1){var rt=Te._result;rt=rt(),rt.then(function(yt){(Te._status===0||Te._status===-1)&&(Te._status=1,Te._result=yt)},function(yt){(Te._status===0||Te._status===-1)&&(Te._status=2,Te._result=yt)}),Te._status===-1&&(Te._status=0,Te._result=rt)}if(Te._status===1)return Te._result.default;throw Te._result}var Qe={current:null},He={transition:null},We={ReactCurrentDispatcher:Qe,ReactCurrentBatchConfig:He,ReactCurrentOwner:ee};function Ce(){throw Error("act(...) is not supported in production builds of React.")}return ys.Children={map:me,forEach:function(Te,rt,yt){me(Te,function(){rt.apply(this,arguments)},yt)},count:function(Te){var rt=0;return me(Te,function(){rt++}),rt},toArray:function(Te){return me(Te,function(rt){return rt})||[]},only:function(Te){if(!de(Te))throw Error("React.Children.only expected to receive a single React element child.");return Te}},ys.Component=z,ys.Fragment=t,ys.Profiler=i,ys.PureComponent=Q,ys.StrictMode=r,ys.Suspense=d,ys.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=We,ys.act=Ce,ys.cloneElement=function(Te,rt,yt){if(Te==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+Te+".");var bt=k({},Te.props),gt=Te.key,Dt=Te.ref,Pt=Te._owner;if(rt!=null){if(rt.ref!==void 0&&(Dt=rt.ref,Pt=ee.current),rt.key!==void 0&&(gt=""+rt.key),Te.type&&Te.type.defaultProps)var Le=Te.type.defaultProps;for(Pe in rt)Y.call(rt,Pe)&&!N.hasOwnProperty(Pe)&&(bt[Pe]=rt[Pe]===void 0&&Le!==void 0?Le[Pe]:rt[Pe])}var Pe=arguments.length-2;if(Pe===1)bt.children=yt;else if(1<Pe){Le=Array(Pe);for(var Ee=0;Ee<Pe;Ee++)Le[Ee]=arguments[Ee+2];bt.children=Le}return{$$typeof:n,type:Te.type,key:gt,ref:Dt,props:bt,_owner:Pt}},ys.createContext=function(Te){return Te={$$typeof:a,_currentValue:Te,_currentValue2:Te,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},Te.Provider={$$typeof:s,_context:Te},Te.Consumer=Te},ys.createElement=ie,ys.createFactory=function(Te){var rt=ie.bind(null,Te);return rt.type=Te,rt},ys.createRef=function(){return{current:null}},ys.forwardRef=function(Te){return{$$typeof:o,render:Te}},ys.isValidElement=de,ys.lazy=function(Te){return{$$typeof:b,_payload:{_status:-1,_result:Te},_init:at}},ys.memo=function(Te,rt){return{$$typeof:g,type:Te,compare:rt===void 0?null:rt}},ys.startTransition=function(Te){var rt=He.transition;He.transition={};try{Te()}finally{He.transition=rt}},ys.unstable_act=Ce,ys.useCallback=function(Te,rt){return Qe.current.useCallback(Te,rt)},ys.useContext=function(Te){return Qe.current.useContext(Te)},ys.useDebugValue=function(){},ys.useDeferredValue=function(Te){return Qe.current.useDeferredValue(Te)},ys.useEffect=function(Te,rt){return Qe.current.useEffect(Te,rt)},ys.useId=function(){return Qe.current.useId()},ys.useImperativeHandle=function(Te,rt,yt){return Qe.current.useImperativeHandle(Te,rt,yt)},ys.useInsertionEffect=function(Te,rt){return Qe.current.useInsertionEffect(Te,rt)},ys.useLayoutEffect=function(Te,rt){return Qe.current.useLayoutEffect(Te,rt)},ys.useMemo=function(Te,rt){return Qe.current.useMemo(Te,rt)},ys.useReducer=function(Te,rt,yt){return Qe.current.useReducer(Te,rt,yt)},ys.useRef=function(Te){return Qe.current.useRef(Te)},ys.useState=function(Te){return Qe.current.useState(Te)},ys.useSyncExternalStore=function(Te,rt,yt){return Qe.current.useSyncExternalStore(Te,rt,yt)},ys.useTransition=function(){return Qe.current.useTransition()},ys.version="18.3.1",ys}var tI;function Fa(){return tI||(tI=1,T3.exports=zG()),T3.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 nI;function jG(){if(nI)return ev;nI=1;var n=Fa(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(o,d,g){var b,E={},S=null,O=null;g!==void 0&&(S=""+g),d.key!==void 0&&(S=""+d.key),d.ref!==void 0&&(O=d.ref);for(b in d)r.call(d,b)&&!s.hasOwnProperty(b)&&(E[b]=d[b]);if(o&&o.defaultProps)for(b in d=o.defaultProps,d)E[b]===void 0&&(E[b]=d[b]);return{$$typeof:e,type:o,key:S,ref:O,props:E,_owner:i.current}}return ev.Fragment=t,ev.jsx=a,ev.jsxs=a,ev}var rI;function NG(){return rI||(rI=1,k3.exports=jG()),k3.exports}var le=NG(),ui=Fa();const rr=Ha(ui);var LF={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ZE=rr.createContext&&rr.createContext(LF),WG=["attr","size","title"];function GG(n,e){if(n==null)return{};var t=QG(n,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function QG(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function Db(){return Db=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Db.apply(this,arguments)}function iI(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Kb(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?iI(Object(t),!0).forEach(function(r){qG(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):iI(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function qG(n,e,t){return e=YG(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function YG(n){var e=$G(n,"string");return typeof e=="symbol"?e:e+""}function $G(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function UF(n){return n&&n.map((e,t)=>rr.createElement(e.tag,Kb({key:t},e.attr),UF(e.child)))}function eu(n){return e=>rr.createElement(VG,Db({attr:Kb({},n.attr)},e),UF(n.child))}function VG(n){var e=t=>{var{attr:r,size:i,title:s}=n,a=GG(n,WG),o=i||t.size||"1em",d;return t.className&&(d=t.className),n.className&&(d=(d?d+" ":"")+n.className),rr.createElement("svg",Db({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,a,{className:d,style:Kb(Kb({color:n.color||t.color},t.style),n.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),s&&rr.createElement("title",null,s),n.children)};return ZE!==void 0?rr.createElement(ZE.Consumer,null,t=>e(t)):e(LF)}var O_={},P3={exports:{}},dh={},R3={exports:{}},D3={};/**
|
||
* @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 oI;function HG(){return oI||(oI=1,function(n){function e(He,We){var Ce=He.length;He.push(We);e:for(;0<Ce;){var Te=Ce-1>>>1,rt=He[Te];if(0<i(rt,We))He[Te]=We,He[Ce]=rt,Ce=Te;else break e}}function t(He){return He.length===0?null:He[0]}function r(He){if(He.length===0)return null;var We=He[0],Ce=He.pop();if(Ce!==We){He[0]=Ce;e:for(var Te=0,rt=He.length,yt=rt>>>1;Te<yt;){var bt=2*(Te+1)-1,gt=He[bt],Dt=bt+1,Pt=He[Dt];if(0>i(gt,Ce))Dt<rt&&0>i(Pt,gt)?(He[Te]=Pt,He[Dt]=Ce,Te=Dt):(He[Te]=gt,He[bt]=Ce,Te=bt);else if(Dt<rt&&0>i(Pt,Ce))He[Te]=Pt,He[Dt]=Ce,Te=Dt;else break e}}return We}function i(He,We){var Ce=He.sortIndex-We.sortIndex;return Ce!==0?Ce:He.id-We.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();n.unstable_now=function(){return a.now()-o}}var d=[],g=[],b=1,E=null,S=3,O=!1,k=!1,U=!1,z=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function re(He){for(var We=t(g);We!==null;){if(We.callback===null)r(g);else if(We.startTime<=He)r(g),We.sortIndex=We.expirationTime,e(d,We);else break;We=t(g)}}function X(He){if(U=!1,re(He),!k)if(t(d)!==null)k=!0,at(Y);else{var We=t(g);We!==null&&Qe(X,We.startTime-He)}}function Y(He,We){k=!1,U&&(U=!1,q(ie),ie=-1),O=!0;var Ce=S;try{for(re(We),E=t(d);E!==null&&(!(E.expirationTime>We)||He&&!Me());){var Te=E.callback;if(typeof Te=="function"){E.callback=null,S=E.priorityLevel;var rt=Te(E.expirationTime<=We);We=n.unstable_now(),typeof rt=="function"?E.callback=rt:E===t(d)&&r(d),re(We)}else r(d);E=t(d)}if(E!==null)var yt=!0;else{var bt=t(g);bt!==null&&Qe(X,bt.startTime-We),yt=!1}return yt}finally{E=null,S=Ce,O=!1}}var ee=!1,N=null,ie=-1,he=5,de=-1;function Me(){return!(n.unstable_now()-de<he)}function fe(){if(N!==null){var He=n.unstable_now();de=He;var We=!0;try{We=N(!0,He)}finally{We?xe():(ee=!1,N=null)}}else ee=!1}var xe;if(typeof Q=="function")xe=function(){Q(fe)};else if(typeof MessageChannel<"u"){var De=new MessageChannel,me=De.port2;De.port1.onmessage=fe,xe=function(){me.postMessage(null)}}else xe=function(){z(fe,0)};function at(He){N=He,ee||(ee=!0,xe())}function Qe(He,We){ie=z(function(){He(n.unstable_now())},We)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(He){He.callback=null},n.unstable_continueExecution=function(){k||O||(k=!0,at(Y))},n.unstable_forceFrameRate=function(He){0>He||125<He?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<He?Math.floor(1e3/He):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_getFirstCallbackNode=function(){return t(d)},n.unstable_next=function(He){switch(S){case 1:case 2:case 3:var We=3;break;default:We=S}var Ce=S;S=We;try{return He()}finally{S=Ce}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(He,We){switch(He){case 1:case 2:case 3:case 4:case 5:break;default:He=3}var Ce=S;S=He;try{return We()}finally{S=Ce}},n.unstable_scheduleCallback=function(He,We,Ce){var Te=n.unstable_now();switch(typeof Ce=="object"&&Ce!==null?(Ce=Ce.delay,Ce=typeof Ce=="number"&&0<Ce?Te+Ce:Te):Ce=Te,He){case 1:var rt=-1;break;case 2:rt=250;break;case 5:rt=1073741823;break;case 4:rt=1e4;break;default:rt=5e3}return rt=Ce+rt,He={id:b++,callback:We,priorityLevel:He,startTime:Ce,expirationTime:rt,sortIndex:-1},Ce>Te?(He.sortIndex=Ce,e(g,He),t(d)===null&&He===t(g)&&(U?(q(ie),ie=-1):U=!0,Qe(X,Ce-Te))):(He.sortIndex=rt,e(d,He),k||O||(k=!0,at(Y))),He},n.unstable_shouldYield=Me,n.unstable_wrapCallback=function(He){var We=S;return function(){var Ce=S;S=We;try{return He.apply(this,arguments)}finally{S=Ce}}}}(D3)),D3}var sI;function ZG(){return sI||(sI=1,R3.exports=HG()),R3.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 aI;function XG(){if(aI)return dh;aI=1;var n=Fa(),e=ZG();function t(m){for(var C="https://reactjs.org/docs/error-decoder.html?invariant="+m,F=1;F<arguments.length;F++)C+="&args[]="+encodeURIComponent(arguments[F]);return"Minified React error #"+m+"; visit "+C+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(m,C){a(m,C),a(m+"Capture",C)}function a(m,C){for(i[m]=C,m=0;m<C.length;m++)r.add(C[m])}var o=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=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={},E={};function S(m){return d.call(E,m)?!0:d.call(b,m)?!1:g.test(m)?E[m]=!0:(b[m]=!0,!1)}function O(m,C,F,G){if(F!==null&&F.type===0)return!1;switch(typeof C){case"function":case"symbol":return!0;case"boolean":return G?!1:F!==null?!F.acceptsBooleans:(m=m.toLowerCase().slice(0,5),m!=="data-"&&m!=="aria-");default:return!1}}function k(m,C,F,G){if(C===null||typeof C>"u"||O(m,C,F,G))return!0;if(G)return!1;if(F!==null)switch(F.type){case 3:return!C;case 4:return C===!1;case 5:return isNaN(C);case 6:return isNaN(C)||1>C}return!1}function U(m,C,F,G,ae,ge,Je){this.acceptsBooleans=C===2||C===3||C===4,this.attributeName=G,this.attributeNamespace=ae,this.mustUseProperty=F,this.propertyName=m,this.type=C,this.sanitizeURL=ge,this.removeEmptyString=Je}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(m){z[m]=new U(m,0,!1,m,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(m){var C=m[0];z[C]=new U(C,1,!1,m[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(m){z[m]=new U(m,2,!1,m.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(m){z[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){z[m]=new U(m,3,!1,m.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(m){z[m]=new U(m,3,!0,m,null,!1,!1)}),["capture","download"].forEach(function(m){z[m]=new U(m,4,!1,m,null,!1,!1)}),["cols","rows","size","span"].forEach(function(m){z[m]=new U(m,6,!1,m,null,!1,!1)}),["rowSpan","start"].forEach(function(m){z[m]=new U(m,5,!1,m.toLowerCase(),null,!1,!1)});var q=/[\-:]([a-z])/g;function Q(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 C=m.replace(q,Q);z[C]=new U(C,1,!1,m,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(m){var C=m.replace(q,Q);z[C]=new U(C,1,!1,m,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(m){var C=m.replace(q,Q);z[C]=new U(C,1,!1,m,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(m){z[m]=new U(m,1,!1,m.toLowerCase(),null,!1,!1)}),z.xlinkHref=new U("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(m){z[m]=new U(m,1,!1,m.toLowerCase(),null,!0,!0)});function re(m,C,F,G){var ae=z.hasOwnProperty(C)?z[C]:null;(ae!==null?ae.type!==0:G||!(2<C.length)||C[0]!=="o"&&C[0]!=="O"||C[1]!=="n"&&C[1]!=="N")&&(k(C,F,ae,G)&&(F=null),G||ae===null?S(C)&&(F===null?m.removeAttribute(C):m.setAttribute(C,""+F)):ae.mustUseProperty?m[ae.propertyName]=F===null?ae.type===3?!1:"":F:(C=ae.attributeName,G=ae.attributeNamespace,F===null?m.removeAttribute(C):(ae=ae.type,F=ae===3||ae===4&&F===!0?"":""+F,G?m.setAttributeNS(G,C,F):m.setAttribute(C,F))))}var X=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),ee=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),de=Symbol.for("react.provider"),Me=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),De=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),at=Symbol.for("react.lazy"),Qe=Symbol.for("react.offscreen"),He=Symbol.iterator;function We(m){return m===null||typeof m!="object"?null:(m=He&&m[He]||m["@@iterator"],typeof m=="function"?m:null)}var Ce=Object.assign,Te;function rt(m){if(Te===void 0)try{throw Error()}catch(F){var C=F.stack.trim().match(/\n( *(at )?)/);Te=C&&C[1]||""}return`
|
||
`+Te+m}var yt=!1;function bt(m,C){if(!m||yt)return"";yt=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(C)if(C=function(){throw Error()},Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[])}catch(xn){var G=xn}Reflect.construct(m,[],C)}else{try{C.call()}catch(xn){G=xn}m.call(C.prototype)}else{try{throw Error()}catch(xn){G=xn}m()}}catch(xn){if(xn&&G&&typeof xn.stack=="string"){for(var ae=xn.stack.split(`
|
||
`),ge=G.stack.split(`
|
||
`),Je=ae.length-1,It=ge.length-1;1<=Je&&0<=It&&ae[Je]!==ge[It];)It--;for(;1<=Je&&0<=It;Je--,It--)if(ae[Je]!==ge[It]){if(Je!==1||It!==1)do if(Je--,It--,0>It||ae[Je]!==ge[It]){var Wt=`
|
||
`+ae[Je].replace(" at new "," at ");return m.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",m.displayName)),Wt}while(1<=Je&&0<=It);break}}}finally{yt=!1,Error.prepareStackTrace=F}return(m=m?m.displayName||m.name:"")?rt(m):""}function gt(m){switch(m.tag){case 5:return rt(m.type);case 16:return rt("Lazy");case 13:return rt("Suspense");case 19:return rt("SuspenseList");case 0:case 2:case 15:return m=bt(m.type,!1),m;case 11:return m=bt(m.type.render,!1),m;case 1:return m=bt(m.type,!0),m;default:return""}}function Dt(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 N:return"Fragment";case ee:return"Portal";case he:return"Profiler";case ie:return"StrictMode";case xe:return"Suspense";case De:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case Me:return(m.displayName||"Context")+".Consumer";case de:return(m._context.displayName||"Context")+".Provider";case fe:var C=m.render;return m=m.displayName,m||(m=C.displayName||C.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case me:return C=m.displayName||null,C!==null?C:Dt(m.type)||"Memo";case at:C=m._payload,m=m._init;try{return Dt(m(C))}catch{}}return null}function Pt(m){var C=m.type;switch(m.tag){case 24:return"Cache";case 9:return(C.displayName||"Context")+".Consumer";case 10:return(C._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return m=C.render,m=m.displayName||m.name||"",C.displayName||(m!==""?"ForwardRef("+m+")":"ForwardRef");case 7:return"Fragment";case 5:return C;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Dt(C);case 8:return C===ie?"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 C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C}return null}function Le(m){switch(typeof m){case"boolean":case"number":case"string":case"undefined":return m;case"object":return m;default:return""}}function Pe(m){var C=m.type;return(m=m.nodeName)&&m.toLowerCase()==="input"&&(C==="checkbox"||C==="radio")}function Ee(m){var C=Pe(m)?"checked":"value",F=Object.getOwnPropertyDescriptor(m.constructor.prototype,C),G=""+m[C];if(!m.hasOwnProperty(C)&&typeof F<"u"&&typeof F.get=="function"&&typeof F.set=="function"){var ae=F.get,ge=F.set;return Object.defineProperty(m,C,{configurable:!0,get:function(){return ae.call(this)},set:function(Je){G=""+Je,ge.call(this,Je)}}),Object.defineProperty(m,C,{enumerable:F.enumerable}),{getValue:function(){return G},setValue:function(Je){G=""+Je},stopTracking:function(){m._valueTracker=null,delete m[C]}}}}function nt(m){m._valueTracker||(m._valueTracker=Ee(m))}function _t(m){if(!m)return!1;var C=m._valueTracker;if(!C)return!0;var F=C.getValue(),G="";return m&&(G=Pe(m)?m.checked?"true":"false":m.value),m=G,m!==F?(C.setValue(m),!0):!1}function ht(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 Ut(m,C){var F=C.checked;return Ce({},C,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:F??m._wrapperState.initialChecked})}function en(m,C){var F=C.defaultValue==null?"":C.defaultValue,G=C.checked!=null?C.checked:C.defaultChecked;F=Le(C.value!=null?C.value:F),m._wrapperState={initialChecked:G,initialValue:F,controlled:C.type==="checkbox"||C.type==="radio"?C.checked!=null:C.value!=null}}function Ft(m,C){C=C.checked,C!=null&&re(m,"checked",C,!1)}function mn(m,C){Ft(m,C);var F=Le(C.value),G=C.type;if(F!=null)G==="number"?(F===0&&m.value===""||m.value!=F)&&(m.value=""+F):m.value!==""+F&&(m.value=""+F);else if(G==="submit"||G==="reset"){m.removeAttribute("value");return}C.hasOwnProperty("value")?nn(m,C.type,F):C.hasOwnProperty("defaultValue")&&nn(m,C.type,Le(C.defaultValue)),C.checked==null&&C.defaultChecked!=null&&(m.defaultChecked=!!C.defaultChecked)}function jn(m,C,F){if(C.hasOwnProperty("value")||C.hasOwnProperty("defaultValue")){var G=C.type;if(!(G!=="submit"&&G!=="reset"||C.value!==void 0&&C.value!==null))return;C=""+m._wrapperState.initialValue,F||C===m.value||(m.value=C),m.defaultValue=C}F=m.name,F!==""&&(m.name=""),m.defaultChecked=!!m._wrapperState.initialChecked,F!==""&&(m.name=F)}function nn(m,C,F){(C!=="number"||ht(m.ownerDocument)!==m)&&(F==null?m.defaultValue=""+m._wrapperState.initialValue:m.defaultValue!==""+F&&(m.defaultValue=""+F))}var ir=Array.isArray;function Dn(m,C,F,G){if(m=m.options,C){C={};for(var ae=0;ae<F.length;ae++)C["$"+F[ae]]=!0;for(F=0;F<m.length;F++)ae=C.hasOwnProperty("$"+m[F].value),m[F].selected!==ae&&(m[F].selected=ae),ae&&G&&(m[F].defaultSelected=!0)}else{for(F=""+Le(F),C=null,ae=0;ae<m.length;ae++){if(m[ae].value===F){m[ae].selected=!0,G&&(m[ae].defaultSelected=!0);return}C!==null||m[ae].disabled||(C=m[ae])}C!==null&&(C.selected=!0)}}function fn(m,C){if(C.dangerouslySetInnerHTML!=null)throw Error(t(91));return Ce({},C,{value:void 0,defaultValue:void 0,children:""+m._wrapperState.initialValue})}function Hn(m,C){var F=C.value;if(F==null){if(F=C.children,C=C.defaultValue,F!=null){if(C!=null)throw Error(t(92));if(ir(F)){if(1<F.length)throw Error(t(93));F=F[0]}C=F}C==null&&(C=""),F=C}m._wrapperState={initialValue:Le(F)}}function wr(m,C){var F=Le(C.value),G=Le(C.defaultValue);F!=null&&(F=""+F,F!==m.value&&(m.value=F),C.defaultValue==null&&m.defaultValue!==F&&(m.defaultValue=F)),G!=null&&(m.defaultValue=""+G)}function Qn(m){var C=m.textContent;C===m._wrapperState.initialValue&&C!==""&&C!==null&&(m.value=C)}function Xn(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 Ge(m,C){return m==null||m==="http://www.w3.org/1999/xhtml"?Xn(C):m==="http://www.w3.org/2000/svg"&&C==="foreignObject"?"http://www.w3.org/1999/xhtml":m}var Ae,pe=function(m){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(C,F,G,ae){MSApp.execUnsafeLocalFunction(function(){return m(C,F,G,ae)})}:m}(function(m,C){if(m.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in m)m.innerHTML=C;else{for(Ae=Ae||document.createElement("div"),Ae.innerHTML="<svg>"+C.valueOf().toString()+"</svg>",C=Ae.firstChild;m.firstChild;)m.removeChild(m.firstChild);for(;C.firstChild;)m.appendChild(C.firstChild)}});function et(m,C){if(C){var F=m.firstChild;if(F&&F===m.lastChild&&F.nodeType===3){F.nodeValue=C;return}}m.textContent=C}var St={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},Yt=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(m){Yt.forEach(function(C){C=C+m.charAt(0).toUpperCase()+m.substring(1),St[C]=St[m]})});function rn(m,C,F){return C==null||typeof C=="boolean"||C===""?"":F||typeof C!="number"||C===0||St.hasOwnProperty(m)&&St[m]?(""+C).trim():C+"px"}function er(m,C){m=m.style;for(var F in C)if(C.hasOwnProperty(F)){var G=F.indexOf("--")===0,ae=rn(F,C[F],G);F==="float"&&(F="cssFloat"),G?m.setProperty(F,ae):m[F]=ae}}var Be=Ce({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 oe(m,C){if(C){if(Be[m]&&(C.children!=null||C.dangerouslySetInnerHTML!=null))throw Error(t(137,m));if(C.dangerouslySetInnerHTML!=null){if(C.children!=null)throw Error(t(60));if(typeof C.dangerouslySetInnerHTML!="object"||!("__html"in C.dangerouslySetInnerHTML))throw Error(t(61))}if(C.style!=null&&typeof C.style!="object")throw Error(t(62))}}function ve(m,C){if(m.indexOf("-")===-1)return typeof C.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 je(m){return m=m.target||m.srcElement||window,m.correspondingUseElement&&(m=m.correspondingUseElement),m.nodeType===3?m.parentNode:m}var Ye=null,tt=null,ct=null;function At(m){if(m=Di(m)){if(typeof Ye!="function")throw Error(t(280));var C=m.stateNode;C&&(C=Es(C),Ye(m.stateNode,m.type,C))}}function Gt(m){tt?ct?ct.push(m):ct=[m]:tt=m}function $t(){if(tt){var m=tt,C=ct;if(ct=tt=null,At(m),C)for(m=0;m<C.length;m++)At(C[m])}}function jt(m,C){return m(C)}function xt(){}var Rn=!1;function Bn(m,C,F){if(Rn)return m(C,F);Rn=!0;try{return jt(m,C,F)}finally{Rn=!1,(tt!==null||ct!==null)&&(xt(),$t())}}function fr(m,C){var F=m.stateNode;if(F===null)return null;var G=Es(F);if(G===null)return null;F=G[C];e:switch(C){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(G=!G.disabled)||(m=m.type,G=!(m==="button"||m==="input"||m==="select"||m==="textarea")),m=!G;break e;default:m=!1}if(m)return null;if(F&&typeof F!="function")throw Error(t(231,C,typeof F));return F}var Sr=!1;if(o)try{var on={};Object.defineProperty(on,"passive",{get:function(){Sr=!0}}),window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{Sr=!1}function Nn(m,C,F,G,ae,ge,Je,It,Wt){var xn=Array.prototype.slice.call(arguments,3);try{C.apply(F,xn)}catch(Ar){this.onError(Ar)}}var Fn=!1,Or=null,Er=!1,Dr=null,ur={onError:function(m){Fn=!0,Or=m}};function co(m,C,F,G,ae,ge,Je,It,Wt){Fn=!1,Or=null,Nn.apply(ur,arguments)}function Sa(m,C,F,G,ae,ge,Je,It,Wt){if(co.apply(this,arguments),Fn){if(Fn){var xn=Or;Fn=!1,Or=null}else throw Error(t(198));Er||(Er=!0,Dr=xn)}}function qi(m){var C=m,F=m;if(m.alternate)for(;C.return;)C=C.return;else{m=C;do C=m,C.flags&4098&&(F=C.return),m=C.return;while(m)}return C.tag===3?F:null}function yi(m){if(m.tag===13){var C=m.memoizedState;if(C===null&&(m=m.alternate,m!==null&&(C=m.memoizedState)),C!==null)return C.dehydrated}return null}function oo(m){if(qi(m)!==m)throw Error(t(188))}function Mo(m){var C=m.alternate;if(!C){if(C=qi(m),C===null)throw Error(t(188));return C!==m?null:m}for(var F=m,G=C;;){var ae=F.return;if(ae===null)break;var ge=ae.alternate;if(ge===null){if(G=ae.return,G!==null){F=G;continue}break}if(ae.child===ge.child){for(ge=ae.child;ge;){if(ge===F)return oo(ae),m;if(ge===G)return oo(ae),C;ge=ge.sibling}throw Error(t(188))}if(F.return!==G.return)F=ae,G=ge;else{for(var Je=!1,It=ae.child;It;){if(It===F){Je=!0,F=ae,G=ge;break}if(It===G){Je=!0,G=ae,F=ge;break}It=It.sibling}if(!Je){for(It=ge.child;It;){if(It===F){Je=!0,F=ge,G=ae;break}if(It===G){Je=!0,G=ge,F=ae;break}It=It.sibling}if(!Je)throw Error(t(189))}}if(F.alternate!==G)throw Error(t(190))}if(F.tag!==3)throw Error(t(188));return F.stateNode.current===F?m:C}function Ti(m){return m=Mo(m),m!==null?La(m):null}function La(m){if(m.tag===5||m.tag===6)return m;for(m=m.child;m!==null;){var C=La(m);if(C!==null)return C;m=m.sibling}return null}var Ea=e.unstable_scheduleCallback,ns=e.unstable_cancelCallback,Aa=e.unstable_shouldYield,Al=e.unstable_requestPaint,ao=e.unstable_now,Pu=e.unstable_getCurrentPriorityLevel,tu=e.unstable_ImmediatePriority,so=e.unstable_UserBlockingPriority,Kr=e.unstable_NormalPriority,Za=e.unstable_LowPriority,Ps=e.unstable_IdlePriority,ia=null,qe=null;function wt(m){if(qe&&typeof qe.onCommitFiberRoot=="function")try{qe.onCommitFiberRoot(ia,m,void 0,(m.current.flags&128)===128)}catch{}}var gn=Math.clz32?Math.clz32:sr,qn=Math.log,An=Math.LN2;function sr(m){return m>>>=0,m===0?32:31-(qn(m)/An|0)|0}var Pi=64,ho=4194304;function Cs(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 Ns(m,C){var F=m.pendingLanes;if(F===0)return 0;var G=0,ae=m.suspendedLanes,ge=m.pingedLanes,Je=F&268435455;if(Je!==0){var It=Je&~ae;It!==0?G=Cs(It):(ge&=Je,ge!==0&&(G=Cs(ge)))}else Je=F&~ae,Je!==0?G=Cs(Je):ge!==0&&(G=Cs(ge));if(G===0)return 0;if(C!==0&&C!==G&&!(C&ae)&&(ae=G&-G,ge=C&-C,ae>=ge||ae===16&&(ge&4194240)!==0))return C;if(G&4&&(G|=F&16),C=m.entangledLanes,C!==0)for(m=m.entanglements,C&=G;0<C;)F=31-gn(C),ae=1<<F,G|=m[F],C&=~ae;return G}function vA(m,C){switch(m){case 1:case 2:case 4:return C+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 C+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 ri(m,C){for(var F=m.suspendedLanes,G=m.pingedLanes,ae=m.expirationTimes,ge=m.pendingLanes;0<ge;){var Je=31-gn(ge),It=1<<Je,Wt=ae[Je];Wt===-1?(!(It&F)||It&G)&&(ae[Je]=vA(It,C)):Wt<=C&&(m.expiredLanes|=It),ge&=~It}}function wi(m){return m=m.pendingLanes&-1073741825,m!==0?m:m&1073741824?1073741824:0}function Xa(){var m=Pi;return Pi<<=1,!(Pi&4194240)&&(Pi=64),m}function Ai(m){for(var C=[],F=0;31>F;F++)C.push(m);return C}function ca(m,C,F){m.pendingLanes|=C,C!==536870912&&(m.suspendedLanes=0,m.pingedLanes=0),m=m.eventTimes,C=31-gn(C),m[C]=F}function iA(m,C){var F=m.pendingLanes&~C;m.pendingLanes=C,m.suspendedLanes=0,m.pingedLanes=0,m.expiredLanes&=C,m.mutableReadLanes&=C,m.entangledLanes&=C,C=m.entanglements;var G=m.eventTimes;for(m=m.expirationTimes;0<F;){var ae=31-gn(F),ge=1<<ae;C[ae]=0,G[ae]=-1,m[ae]=-1,F&=~ge}}function ls(m,C){var F=m.entangledLanes|=C;for(m=m.entanglements;F;){var G=31-gn(F),ae=1<<G;ae&C|m[G]&C&&(m[G]|=C),F&=~ae}}var Fr=0;function Ei(m){return m&=-m,1<m?4<m?m&268435455?16:536870912:4:1}var Ja,Rs,So,Ws,hu,zl=!1,rs=[],Vs=null,fo=null,ms=null,Ms=new Map,el=new Map,Ds=[],El="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 oA(m,C){switch(m){case"focusin":case"focusout":Vs=null;break;case"dragenter":case"dragleave":fo=null;break;case"mouseover":case"mouseout":ms=null;break;case"pointerover":case"pointerout":Ms.delete(C.pointerId);break;case"gotpointercapture":case"lostpointercapture":el.delete(C.pointerId)}}function Vi(m,C,F,G,ae,ge){return m===null||m.nativeEvent!==ge?(m={blockedOn:C,domEventName:F,eventSystemFlags:G,nativeEvent:ge,targetContainers:[ae]},C!==null&&(C=Di(C),C!==null&&Rs(C)),m):(m.eventSystemFlags|=G,C=m.targetContainers,ae!==null&&C.indexOf(ae)===-1&&C.push(ae),m)}function nu(m,C,F,G,ae){switch(C){case"focusin":return Vs=Vi(Vs,m,C,F,G,ae),!0;case"dragenter":return fo=Vi(fo,m,C,F,G,ae),!0;case"mouseover":return ms=Vi(ms,m,C,F,G,ae),!0;case"pointerover":var ge=ae.pointerId;return Ms.set(ge,Vi(Ms.get(ge)||null,m,C,F,G,ae)),!0;case"gotpointercapture":return ge=ae.pointerId,el.set(ge,Vi(el.get(ge)||null,m,C,F,G,ae)),!0}return!1}function Ui(m){var C=Bo(m.target);if(C!==null){var F=qi(C);if(F!==null){if(C=F.tag,C===13){if(C=yi(F),C!==null){m.blockedOn=C,hu(m.priority,function(){So(F)});return}}else if(C===3&&F.stateNode.current.memoizedState.isDehydrated){m.blockedOn=F.tag===3?F.stateNode.containerInfo:null;return}}}m.blockedOn=null}function Jr(m){if(m.blockedOn!==null)return!1;for(var C=m.targetContainers;0<C.length;){var F=si(m.domEventName,m.eventSystemFlags,C[0],m.nativeEvent);if(F===null){F=m.nativeEvent;var G=new F.constructor(F.type,F);p=G,F.target.dispatchEvent(G),p=null}else return C=Di(F),C!==null&&Rs(C),m.blockedOn=F,!1;C.shift()}return!0}function ru(m,C,F){Jr(m)&&F.delete(C)}function Ni(){zl=!1,Vs!==null&&Jr(Vs)&&(Vs=null),fo!==null&&Jr(fo)&&(fo=null),ms!==null&&Jr(ms)&&(ms=null),Ms.forEach(ru),el.forEach(ru)}function lo(m,C){m.blockedOn===C&&(m.blockedOn=null,zl||(zl=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ni)))}function Ri(m){function C(ae){return lo(ae,m)}if(0<rs.length){lo(rs[0],m);for(var F=1;F<rs.length;F++){var G=rs[F];G.blockedOn===m&&(G.blockedOn=null)}}for(Vs!==null&&lo(Vs,m),fo!==null&&lo(fo,m),ms!==null&&lo(ms,m),Ms.forEach(C),el.forEach(C),F=0;F<Ds.length;F++)G=Ds[F],G.blockedOn===m&&(G.blockedOn=null);for(;0<Ds.length&&(F=Ds[0],F.blockedOn===null);)Ui(F),F.blockedOn===null&&Ds.shift()}var J=X.ReactCurrentBatchConfig,Oe=!0;function ot(m,C,F,G){var ae=Fr,ge=J.transition;J.transition=null;try{Fr=1,Ir(m,C,F,G)}finally{Fr=ae,J.transition=ge}}function Vt(m,C,F,G){var ae=Fr,ge=J.transition;J.transition=null;try{Fr=4,Ir(m,C,F,G)}finally{Fr=ae,J.transition=ge}}function Ir(m,C,F,G){if(Oe){var ae=si(m,C,F,G);if(ae===null)Jd(m,C,G,Yn,F),oA(m,G);else if(nu(ae,m,C,F,G))G.stopPropagation();else if(oA(m,G),C&4&&-1<El.indexOf(m)){for(;ae!==null;){var ge=Di(ae);if(ge!==null&&Ja(ge),ge=si(m,C,F,G),ge===null&&Jd(m,C,G,Yn,F),ge===ae)break;ae=ge}ae!==null&&G.stopPropagation()}else Jd(m,C,G,null,F)}}var Yn=null;function si(m,C,F,G){if(Yn=null,m=je(G),m=Bo(m),m!==null)if(C=qi(m),C===null)m=null;else if(F=C.tag,F===13){if(m=yi(C),m!==null)return m;m=null}else if(F===3){if(C.stateNode.current.memoizedState.isDehydrated)return C.tag===3?C.stateNode.containerInfo:null;m=null}else C!==m&&(m=null);return Yn=m,null}function ci(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(Pu()){case tu:return 1;case so:return 4;case Kr:case Za:return 16;case Ps:return 536870912;default:return 16}default:return 16}}var vr=null,kr=null,vi=null;function Eo(){if(vi)return vi;var m,C=kr,F=C.length,G,ae="value"in vr?vr.value:vr.textContent,ge=ae.length;for(m=0;m<F&&C[m]===ae[m];m++);var Je=F-m;for(G=1;G<=Je&&C[F-G]===ae[ge-G];G++);return vi=ae.slice(m,1<G?1-G:void 0)}function ki(m){var C=m.keyCode;return"charCode"in m?(m=m.charCode,m===0&&C===13&&(m=13)):m=C,m===10&&(m=13),32<=m||m===13?m:0}function qr(){return!0}function Hi(){return!1}function Zi(m){function C(F,G,ae,ge,Je){this._reactName=F,this._targetInst=ae,this.type=G,this.nativeEvent=ge,this.target=Je,this.currentTarget=null;for(var It in m)m.hasOwnProperty(It)&&(F=m[It],this[It]=F?F(ge):ge[It]);return this.isDefaultPrevented=(ge.defaultPrevented!=null?ge.defaultPrevented:ge.returnValue===!1)?qr:Hi,this.isPropagationStopped=Hi,this}return Ce(C.prototype,{preventDefault:function(){this.defaultPrevented=!0;var F=this.nativeEvent;F&&(F.preventDefault?F.preventDefault():typeof F.returnValue!="unknown"&&(F.returnValue=!1),this.isDefaultPrevented=qr)},stopPropagation:function(){var F=this.nativeEvent;F&&(F.stopPropagation?F.stopPropagation():typeof F.cancelBubble!="unknown"&&(F.cancelBubble=!0),this.isPropagationStopped=qr)},persist:function(){},isPersistent:qr}),C}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(m){return m.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ya=Zi(us),Ua=Ce({},us,{view:0,detail:0}),fu=Zi(Ua),Hs,dc,Ba,cl=Ce({},Ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xh,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!==Ba&&(Ba&&m.type==="mousemove"?(Hs=m.screenX-Ba.screenX,dc=m.screenY-Ba.screenY):dc=Hs=0,Ba=m),Hs)},movementY:function(m){return"movementY"in m?m.movementY:dc}}),ld=Zi(cl),Ru=Ce({},cl,{dataTransfer:0}),Du=Zi(Ru),bh=Ce({},Ua,{relatedTarget:0}),Ss=Zi(bh),Ku=Ce({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),ud=Zi(Ku),gp=Ce({},us,{clipboardData:function(m){return"clipboardData"in m?m.clipboardData:window.clipboardData}}),sA=Zi(gp),qd=Ce({},us,{data:0}),Fc=Zi(qd),yp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pf={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"},hc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zs(m){var C=this.nativeEvent;return C.getModifierState?C.getModifierState(m):(m=hc[m])?!!C[m]:!1}function xh(){return Zs}var Jh=Ce({},Ua,{key:function(m){if(m.key){var C=yp[m.key]||m.key;if(C!=="Unidentified")return C}return m.type==="keypress"?(m=ki(m),m===13?"Enter":String.fromCharCode(m)):m.type==="keydown"||m.type==="keyup"?Pf[m.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xh,charCode:function(m){return m.type==="keypress"?ki(m):0},keyCode:function(m){return m.type==="keydown"||m.type==="keyup"?m.keyCode:0},which:function(m){return m.type==="keypress"?ki(m):m.type==="keydown"||m.type==="keyup"?m.keyCode:0}}),Ad=Zi(Jh),ef=Ce({},cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cd=Zi(ef),fc=Ce({},Ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xh}),wh=Zi(fc),Mh=Ce({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),dd=Zi(Mh),am=Ce({},cl,{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}),Lc=Zi(am),pu=[9,13,27,32],Sh=o&&"CompositionEvent"in window,mu=null;o&&"documentMode"in document&&(mu=document.documentMode);var aA=o&&"TextEvent"in window&&!mu,Uc=o&&(!Sh||mu&&8<mu&&11>=mu),Yd=" ",tf=!1;function iu(m,C){switch(m){case"keyup":return pu.indexOf(C.keyCode)!==-1;case"keydown":return C.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 GA=!1;function zc(m,C){switch(m){case"compositionend":return Bl(C);case"keypress":return C.which!==32?null:(tf=!0,Yd);case"textInput":return m=C.data,m===Yd&&tf?null:m;default:return null}}function nf(m,C){if(GA)return m==="compositionend"||!Sh&&iu(m,C)?(m=Eo(),vi=kr=vr=null,GA=!1,m):null;switch(m){case"paste":return null;case"keypress":if(!(C.ctrlKey||C.altKey||C.metaKey)||C.ctrlKey&&C.altKey){if(C.char&&1<C.char.length)return C.char;if(C.which)return String.fromCharCode(C.which)}return null;case"compositionend":return Uc&&C.locale!=="ko"?null:C.data;default:return null}}var Rf={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 hd(m){var C=m&&m.nodeName&&m.nodeName.toLowerCase();return C==="input"?!!Rf[m.type]:C==="textarea"}function CA(m,C,F,G){Gt(G),C=vc(C,"onChange"),0<C.length&&(F=new ya("onChange","change",null,F,G),m.push({event:F,listeners:C}))}var tl=null,Ol=null;function $o(m){Xd(m,0)}function Eh(m){var C=$r(m);if(_t(C))return m}function lm(m,C){if(m==="change")return C}var jc=!1;if(o){var Fu;if(o){var $d="oninput"in document;if(!$d){var Vd=document.createElement("div");Vd.setAttribute("oninput","return;"),$d=typeof Vd.oninput=="function"}Fu=$d}else Fu=!1;jc=Fu&&(!document.documentMode||9<document.documentMode)}function pc(){tl&&(tl.detachEvent("onpropertychange",Hd),Ol=tl=null)}function Hd(m){if(m.propertyName==="value"&&Eh(Ol)){var C=[];CA(C,Ol,m,je(m)),Bn($o,C)}}function rf(m,C,F){m==="focusin"?(pc(),tl=C,Ol=F,tl.attachEvent("onpropertychange",Hd)):m==="focusout"&&pc()}function mc(m){if(m==="selectionchange"||m==="keyup"||m==="keydown")return Eh(Ol)}function gu(m,C){if(m==="click")return Eh(C)}function Ht(m,C){if(m==="input"||m==="change")return Eh(C)}function Pn(m,C){return m===C&&(m!==0||1/m===1/C)||m!==m&&C!==C}var an=typeof Object.is=="function"?Object.is:Pn;function Ur(m,C){if(an(m,C))return!0;if(typeof m!="object"||m===null||typeof C!="object"||C===null)return!1;var F=Object.keys(m),G=Object.keys(C);if(F.length!==G.length)return!1;for(G=0;G<F.length;G++){var ae=F[G];if(!d.call(C,ae)||!an(m[ae],C[ae]))return!1}return!0}function Ci(m){for(;m&&m.firstChild;)m=m.firstChild;return m}function _o(m,C){var F=Ci(m);m=0;for(var G;F;){if(F.nodeType===3){if(G=m+F.textContent.length,m<=C&&G>=C)return{node:F,offset:C-m};m=G}e:{for(;F;){if(F.nextSibling){F=F.nextSibling;break e}F=F.parentNode}F=void 0}F=Ci(F)}}function oa(m,C){return m&&C?m===C?!0:m&&m.nodeType===3?!1:C&&C.nodeType===3?oa(m,C.parentNode):"contains"in m?m.contains(C):m.compareDocumentPosition?!!(m.compareDocumentPosition(C)&16):!1:!1}function Vo(){for(var m=window,C=ht();C instanceof m.HTMLIFrameElement;){try{var F=typeof C.contentWindow.location.href=="string"}catch{F=!1}if(F)m=C.contentWindow;else break;C=ht(m.document)}return C}function QA(m){var C=m&&m.nodeName&&m.nodeName.toLowerCase();return C&&(C==="input"&&(m.type==="text"||m.type==="search"||m.type==="tel"||m.type==="url"||m.type==="password")||C==="textarea"||m.contentEditable==="true")}function vp(m){var C=Vo(),F=m.focusedElem,G=m.selectionRange;if(C!==F&&F&&F.ownerDocument&&oa(F.ownerDocument.documentElement,F)){if(G!==null&&QA(F)){if(C=G.start,m=G.end,m===void 0&&(m=C),"selectionStart"in F)F.selectionStart=C,F.selectionEnd=Math.min(m,F.value.length);else if(m=(C=F.ownerDocument||document)&&C.defaultView||window,m.getSelection){m=m.getSelection();var ae=F.textContent.length,ge=Math.min(G.start,ae);G=G.end===void 0?ge:Math.min(G.end,ae),!m.extend&&ge>G&&(ae=G,G=ge,ge=ae),ae=_o(F,ge);var Je=_o(F,G);ae&&Je&&(m.rangeCount!==1||m.anchorNode!==ae.node||m.anchorOffset!==ae.offset||m.focusNode!==Je.node||m.focusOffset!==Je.offset)&&(C=C.createRange(),C.setStart(ae.node,ae.offset),m.removeAllRanges(),ge>G?(m.addRange(C),m.extend(Je.node,Je.offset)):(C.setEnd(Je.node,Je.offset),m.addRange(C)))}}for(C=[],m=F;m=m.parentNode;)m.nodeType===1&&C.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;F<C.length;F++)m=C[F],m.element.scrollLeft=m.left,m.element.scrollTop=m.top}}var Il=o&&"documentMode"in document&&11>=document.documentMode,yu=null,qA=null,kl=null,Wi=!1;function YA(m,C,F){var G=F.window===F?F.document:F.nodeType===9?F:F.ownerDocument;Wi||yu==null||yu!==ht(G)||(G=yu,"selectionStart"in G&&QA(G)?G={start:G.selectionStart,end:G.selectionEnd}:(G=(G.ownerDocument&&G.ownerDocument.defaultView||window).getSelection(),G={anchorNode:G.anchorNode,anchorOffset:G.anchorOffset,focusNode:G.focusNode,focusOffset:G.focusOffset}),kl&&Ur(kl,G)||(kl=G,G=vc(qA,"onSelect"),0<G.length&&(C=new ya("onSelect","select",null,C,F),m.push({event:C,listeners:G}),C.target=yu)))}function Uo(m,C){var F={};return F[m.toLowerCase()]=C.toLowerCase(),F["Webkit"+m]="webkit"+C,F["Moz"+m]="moz"+C,F}var Nc={animationend:Uo("Animation","AnimationEnd"),animationiteration:Uo("Animation","AnimationIteration"),animationstart:Uo("Animation","AnimationStart"),transitionend:Uo("Transition","TransitionEnd")},$A={},_A={};o&&(_A=document.createElement("div").style,"AnimationEvent"in window||(delete Nc.animationend.animation,delete Nc.animationiteration.animation,delete Nc.animationstart.animation),"TransitionEvent"in window||delete Nc.transitionend.transition);function lA(m){if($A[m])return $A[m];if(!Nc[m])return m;var C=Nc[m],F;for(F in C)if(C.hasOwnProperty(F)&&F in _A)return $A[m]=C[F];return m}var Tl=lA("animationend"),gc=lA("animationiteration"),vu=lA("animationstart"),jl=lA("transitionend"),Wc=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 za(m,C){Wc.set(m,C),s(C,[m])}for(var fd=0;fd<Zd.length;fd++){var yc=Zd[fd],VA=yc.toLowerCase(),of=yc[0].toUpperCase()+yc.slice(1);za(VA,"on"+of)}za(Tl,"onAnimationEnd"),za(gc,"onAnimationIteration"),za(vu,"onAnimationStart"),za("dblclick","onDoubleClick"),za("focusin","onFocus"),za("focusout","onBlur"),za(jl,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bA="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(" "),HA=new Set("cancel close invalid load scroll toggle".split(" ").concat(bA));function Gc(m,C,F){var G=m.type||"unknown-event";m.currentTarget=F,Sa(G,C,void 0,m),m.currentTarget=null}function Xd(m,C){C=(C&4)!==0;for(var F=0;F<m.length;F++){var G=m[F],ae=G.event;G=G.listeners;e:{var ge=void 0;if(C)for(var Je=G.length-1;0<=Je;Je--){var It=G[Je],Wt=It.instance,xn=It.currentTarget;if(It=It.listener,Wt!==ge&&ae.isPropagationStopped())break e;Gc(ae,It,xn),ge=Wt}else for(Je=0;Je<G.length;Je++){if(It=G[Je],Wt=It.instance,xn=It.currentTarget,It=It.listener,Wt!==ge&&ae.isPropagationStopped())break e;Gc(ae,It,xn),ge=Wt}}}if(Er)throw m=Dr,Er=!1,Dr=null,m}function Ho(m,C){var F=C[$c];F===void 0&&(F=C[$c]=new Set);var G=m+"__bubble";F.has(G)||(qc(C,m,2,!1),F.add(G))}function Qc(m,C,F){var G=0;C&&(G|=4),qc(F,m,G,C)}var ZA="_reactListening"+Math.random().toString(36).slice(2);function Lu(m){if(!m[ZA]){m[ZA]=!0,r.forEach(function(F){F!=="selectionchange"&&(HA.has(F)||Qc(F,!1,m),Qc(F,!0,m))});var C=m.nodeType===9?m:m.ownerDocument;C===null||C[ZA]||(C[ZA]=!0,Qc("selectionchange",!1,C))}}function qc(m,C,F,G){switch(ci(C)){case 1:var ae=ot;break;case 4:ae=Vt;break;default:ae=Ir}F=ae.bind(null,C,F,m),ae=void 0,!Sr||C!=="touchstart"&&C!=="touchmove"&&C!=="wheel"||(ae=!0),G?ae!==void 0?m.addEventListener(C,F,{capture:!0,passive:ae}):m.addEventListener(C,F,!0):ae!==void 0?m.addEventListener(C,F,{passive:ae}):m.addEventListener(C,F,!1)}function Jd(m,C,F,G,ae){var ge=G;if(!(C&1)&&!(C&2)&&G!==null)e:for(;;){if(G===null)return;var Je=G.tag;if(Je===3||Je===4){var It=G.stateNode.containerInfo;if(It===ae||It.nodeType===8&&It.parentNode===ae)break;if(Je===4)for(Je=G.return;Je!==null;){var Wt=Je.tag;if((Wt===3||Wt===4)&&(Wt=Je.stateNode.containerInfo,Wt===ae||Wt.nodeType===8&&Wt.parentNode===ae))return;Je=Je.return}for(;It!==null;){if(Je=Bo(It),Je===null)return;if(Wt=Je.tag,Wt===5||Wt===6){G=ge=Je;continue e}It=It.parentNode}}G=G.return}Bn(function(){var xn=ge,Ar=je(F),mr=[];e:{var Jn=Wc.get(m);if(Jn!==void 0){var zr=ya,ii=m;switch(m){case"keypress":if(ki(F)===0)break e;case"keydown":case"keyup":zr=Ad;break;case"focusin":ii="focus",zr=Ss;break;case"focusout":ii="blur",zr=Ss;break;case"beforeblur":case"afterblur":zr=Ss;break;case"click":if(F.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":zr=ld;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":zr=Du;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":zr=wh;break;case Tl:case gc:case vu:zr=ud;break;case jl:zr=dd;break;case"scroll":zr=fu;break;case"wheel":zr=Lc;break;case"copy":case"cut":case"paste":zr=sA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":zr=cd}var li=(C&4)!==0,sl=!li&&m==="scroll",ln=li?Jn!==null?Jn+"Capture":null:Jn;li=[];for(var Jt=xn,cn;Jt!==null;){cn=Jt;var Cr=cn.stateNode;if(cn.tag===5&&Cr!==null&&(cn=Cr,ln!==null&&(Cr=fr(Jt,ln),Cr!=null&&li.push(Yc(Jt,Cr,cn)))),sl)break;Jt=Jt.return}0<li.length&&(Jn=new zr(Jn,ii,null,F,Ar),mr.push({event:Jn,listeners:li}))}}if(!(C&7)){e:{if(Jn=m==="mouseover"||m==="pointerover",zr=m==="mouseout"||m==="pointerout",Jn&&F!==p&&(ii=F.relatedTarget||F.fromElement)&&(Bo(ii)||ii[Cu]))break e;if((zr||Jn)&&(Jn=Ar.window===Ar?Ar:(Jn=Ar.ownerDocument)?Jn.defaultView||Jn.parentWindow:window,zr?(ii=F.relatedTarget||F.toElement,zr=xn,ii=ii?Bo(ii):null,ii!==null&&(sl=qi(ii),ii!==sl||ii.tag!==5&&ii.tag!==6)&&(ii=null)):(zr=null,ii=xn),zr!==ii)){if(li=ld,Cr="onMouseLeave",ln="onMouseEnter",Jt="mouse",(m==="pointerout"||m==="pointerover")&&(li=cd,Cr="onPointerLeave",ln="onPointerEnter",Jt="pointer"),sl=zr==null?Jn:$r(zr),cn=ii==null?Jn:$r(ii),Jn=new li(Cr,Jt+"leave",zr,F,Ar),Jn.target=sl,Jn.relatedTarget=cn,Cr=null,Bo(Ar)===xn&&(li=new li(ln,Jt+"enter",ii,F,Ar),li.target=cn,li.relatedTarget=sl,Cr=li),sl=Cr,zr&&ii)t:{for(li=zr,ln=ii,Jt=0,cn=li;cn;cn=As(cn))Jt++;for(cn=0,Cr=ln;Cr;Cr=As(Cr))cn++;for(;0<Jt-cn;)li=As(li),Jt--;for(;0<cn-Jt;)ln=As(ln),cn--;for(;Jt--;){if(li===ln||ln!==null&&li===ln.alternate)break t;li=As(li),ln=As(ln)}li=null}else li=null;zr!==null&&zo(mr,Jn,zr,li,!1),ii!==null&&sl!==null&&zo(mr,sl,ii,li,!0)}}e:{if(Jn=xn?$r(xn):window,zr=Jn.nodeName&&Jn.nodeName.toLowerCase(),zr==="select"||zr==="input"&&Jn.type==="file")var ni=lm;else if(hd(Jn))if(jc)ni=Ht;else{ni=mc;var Ii=rf}else(zr=Jn.nodeName)&&zr.toLowerCase()==="input"&&(Jn.type==="checkbox"||Jn.type==="radio")&&(ni=gu);if(ni&&(ni=ni(m,xn))){CA(mr,ni,F,Ar);break e}Ii&&Ii(m,Jn,xn),m==="focusout"&&(Ii=Jn._wrapperState)&&Ii.controlled&&Jn.type==="number"&&nn(Jn,"number",Jn.value)}switch(Ii=xn?$r(xn):window,m){case"focusin":(hd(Ii)||Ii.contentEditable==="true")&&(yu=Ii,qA=xn,kl=null);break;case"focusout":kl=qA=yu=null;break;case"mousedown":Wi=!0;break;case"contextmenu":case"mouseup":case"dragend":Wi=!1,YA(mr,F,Ar);break;case"selectionchange":if(Il)break;case"keydown":case"keyup":YA(mr,F,Ar)}var Oi;if(Sh)e:{switch(m){case"compositionstart":var zi="onCompositionStart";break e;case"compositionend":zi="onCompositionEnd";break e;case"compositionupdate":zi="onCompositionUpdate";break e}zi=void 0}else GA?iu(m,F)&&(zi="onCompositionEnd"):m==="keydown"&&F.keyCode===229&&(zi="onCompositionStart");zi&&(Uc&&F.locale!=="ko"&&(GA||zi!=="onCompositionStart"?zi==="onCompositionEnd"&&GA&&(Oi=Eo()):(vr=Ar,kr="value"in vr?vr.value:vr.textContent,GA=!0)),Ii=vc(xn,zi),0<Ii.length&&(zi=new Fc(zi,m,null,F,Ar),mr.push({event:zi,listeners:Ii}),Oi?zi.data=Oi:(Oi=Bl(F),Oi!==null&&(zi.data=Oi)))),(Oi=aA?zc(m,F):nf(m,F))&&(xn=vc(xn,"onBeforeInput"),0<xn.length&&(Ar=new Fc("onBeforeInput","beforeinput",null,F,Ar),mr.push({event:Ar,listeners:xn}),Ar.data=Oi))}Xd(mr,C)})}function Yc(m,C,F){return{instance:m,listener:C,currentTarget:F}}function vc(m,C){for(var F=C+"Capture",G=[];m!==null;){var ae=m,ge=ae.stateNode;ae.tag===5&&ge!==null&&(ae=ge,ge=fr(m,F),ge!=null&&G.unshift(Yc(m,ge,ae)),ge=fr(m,C),ge!=null&&G.push(Yc(m,ge,ae))),m=m.return}return G}function As(m){if(m===null)return null;do m=m.return;while(m&&m.tag!==5);return m||null}function zo(m,C,F,G,ae){for(var ge=C._reactName,Je=[];F!==null&&F!==G;){var It=F,Wt=It.alternate,xn=It.stateNode;if(Wt!==null&&Wt===G)break;It.tag===5&&xn!==null&&(It=xn,ae?(Wt=fr(F,ge),Wt!=null&&Je.unshift(Yc(F,Wt,It))):ae||(Wt=fr(F,ge),Wt!=null&&Je.push(Yc(F,Wt,It)))),F=F.return}Je.length!==0&&m.push({event:C,listeners:Je})}var cs=/\r\n?/g,Df=/\u0000|\uFFFD/g;function pd(m){return(typeof m=="string"?m:""+m).replace(cs,`
|
||
`).replace(Df,"")}function md(m,C,F){if(C=pd(C),pd(m)!==C&&F)throw Error(t(425))}function Uu(){}var XA=null,Nl=null;function xA(m,C){return m==="textarea"||m==="noscript"||typeof C.children=="string"||typeof C.children=="number"||typeof C.dangerouslySetInnerHTML=="object"&&C.dangerouslySetInnerHTML!==null&&C.dangerouslySetInnerHTML.__html!=null}var dl=typeof setTimeout=="function"?setTimeout:void 0,JA=typeof clearTimeout=="function"?clearTimeout:void 0,zu=typeof Promise=="function"?Promise:void 0,gd=typeof queueMicrotask=="function"?queueMicrotask:typeof zu<"u"?function(m){return zu.resolve(null).then(m).catch(ju)}:dl;function ju(m){setTimeout(function(){throw m})}function eh(m,C){var F=C,G=0;do{var ae=F.nextSibling;if(m.removeChild(F),ae&&ae.nodeType===8)if(F=ae.data,F==="/$"){if(G===0){m.removeChild(ae),Ri(C);return}G--}else F!=="$"&&F!=="$?"&&F!=="$!"||G++;F=ae}while(F);Ri(C)}function ec(m){for(;m!=null;m=m.nextSibling){var C=m.nodeType;if(C===1||C===3)break;if(C===8){if(C=m.data,C==="$"||C==="$!"||C==="$?")break;if(C==="/$")return null}}return m}function Nu(m){m=m.previousSibling;for(var C=0;m;){if(m.nodeType===8){var F=m.data;if(F==="$"||F==="$!"||F==="$?"){if(C===0)return m;C--}else F==="/$"&&C++}m=m.previousSibling}return null}var Wu=Math.random().toString(36).slice(2),wA="__reactFiber$"+Wu,Cc="__reactProps$"+Wu,Cu="__reactContainer$"+Wu,$c="__reactEvents$"+Wu,it="__reactListeners$"+Wu,ja="__reactHandles$"+Wu;function Bo(m){var C=m[wA];if(C)return C;for(var F=m.parentNode;F;){if(C=F[Cu]||F[wA]){if(F=C.alternate,C.child!==null||F!==null&&F.child!==null)for(m=Nu(m);m!==null;){if(F=m[wA])return F;m=Nu(m)}return C}m=F,F=m.parentNode}return null}function Di(m){return m=m[wA]||m[Cu],!m||m.tag!==5&&m.tag!==6&&m.tag!==13&&m.tag!==3?null:m}function $r(m){if(m.tag===5||m.tag===6)return m.stateNode;throw Error(t(33))}function Es(m){return m[Cc]||null}var yd=[],th=-1;function Oa(m){return{current:m}}function Gs(m){0>th||(m.current=yd[th],yd[th]=null,th--)}function _s(m,C){th++,yd[th]=m.current,m.current=C}var uA={},Bs=Oa(uA),yr=Oa(!1),va=uA;function Vc(m,C){var F=m.type.contextTypes;if(!F)return uA;var G=m.stateNode;if(G&&G.__reactInternalMemoizedUnmaskedChildContext===C)return G.__reactInternalMemoizedMaskedChildContext;var ae={},ge;for(ge in F)ae[ge]=C[ge];return G&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=C,m.__reactInternalMemoizedMaskedChildContext=ae),ae}function Ia(m){return m=m.childContextTypes,m!=null}function tc(){Gs(yr),Gs(Bs)}function vd(m,C,F){if(Bs.current!==uA)throw Error(t(168));_s(Bs,C),_s(yr,F)}function Cd(m,C,F){var G=m.stateNode;if(C=C.childContextTypes,typeof G.getChildContext!="function")return F;G=G.getChildContext();for(var ae in G)if(!(ae in C))throw Error(t(108,Pt(m)||"Unknown",ae));return Ce({},F,G)}function Mi(m){return m=(m=m.stateNode)&&m.__reactInternalMemoizedMergedChildContext||uA,va=Bs.current,_s(Bs,m),_s(yr,yr.current),!0}function _d(m,C,F){var G=m.stateNode;if(!G)throw Error(t(169));F?(m=Cd(m,C,va),G.__reactInternalMemoizedMergedChildContext=m,Gs(yr),Gs(Bs),_s(Bs,m)):Gs(yr),_s(yr,F)}var Wl=null,bd=!1,xd=!1;function MA(m){Wl===null?Wl=[m]:Wl.push(m)}function nc(m){bd=!0,MA(m)}function AA(){if(!xd&&Wl!==null){xd=!0;var m=0,C=Fr;try{var F=Wl;for(Fr=1;m<F.length;m++){var G=F[m];do G=G(!0);while(G!==null)}Wl=null,bd=!1}catch(ae){throw Wl!==null&&(Wl=Wl.slice(m+1)),Ea(tu,AA),ae}finally{Fr=C,xd=!1}}return null}var _c=[],Os=0,bo=null,_u=0,Na=[],Ks=0,Zo=null,ou=1,Gu="";function bc(m,C){_c[Os++]=_u,_c[Os++]=bo,bo=m,_u=C}function nh(m,C,F){Na[Ks++]=ou,Na[Ks++]=Gu,Na[Ks++]=Zo,Zo=m;var G=ou;m=Gu;var ae=32-gn(G)-1;G&=~(1<<ae),F+=1;var ge=32-gn(C)+ae;if(30<ge){var Je=ae-ae%5;ge=(G&(1<<Je)-1).toString(32),G>>=Je,ae-=Je,ou=1<<32-gn(C)+ae|F<<ae|G,Gu=ge+m}else ou=1<<ge|F<<ae|G,Gu=m}function SA(m){m.return!==null&&(bc(m,1),nh(m,1,0))}function xc(m){for(;m===bo;)bo=_c[--Os],_c[Os]=null,_u=_c[--Os],_c[Os]=null;for(;m===Zo;)Zo=Na[--Ks],Na[Ks]=null,Gu=Na[--Ks],Na[Ks]=null,ou=Na[--Ks],Na[Ks]=null}var gs=null,da=null,gr=!1,Hr=null;function Qu(m,C){var F=Zu(5,null,null,0);F.elementType="DELETED",F.stateNode=C,F.return=m,C=m.deletions,C===null?(m.deletions=[F],m.flags|=16):C.push(F)}function rc(m,C){switch(m.tag){case 5:var F=m.type;return C=C.nodeType!==1||F.toLowerCase()!==C.nodeName.toLowerCase()?null:C,C!==null?(m.stateNode=C,gs=m,da=ec(C.firstChild),!0):!1;case 6:return C=m.pendingProps===""||C.nodeType!==3?null:C,C!==null?(m.stateNode=C,gs=m,da=null,!0):!1;case 13:return C=C.nodeType!==8?null:C,C!==null?(F=Zo!==null?{id:ou,overflow:Gu}:null,m.memoizedState={dehydrated:C,treeContext:F,retryLane:1073741824},F=Zu(18,null,null,0),F.stateNode=C,F.return=m,m.child=F,gs=m,da=null,!0):!1;default:return!1}}function bu(m){return(m.mode&1)!==0&&(m.flags&128)===0}function bs(m){if(gr){var C=da;if(C){var F=C;if(!rc(m,C)){if(bu(m))throw Error(t(418));C=ec(F.nextSibling);var G=gs;C&&rc(m,C)?Qu(G,F):(m.flags=m.flags&-4097|2,gr=!1,gs=m)}}else{if(bu(m))throw Error(t(418));m.flags=m.flags&-4097|2,gr=!1,gs=m}}}function Kf(m){for(m=m.return;m!==null&&m.tag!==5&&m.tag!==3&&m.tag!==13;)m=m.return;gs=m}function su(m){if(m!==gs)return!1;if(!gr)return Kf(m),gr=!0,!1;var C;if((C=m.tag!==3)&&!(C=m.tag!==5)&&(C=m.type,C=C!=="head"&&C!=="body"&&!xA(m.type,m.memoizedProps)),C&&(C=da)){if(bu(m))throw Ff(),Error(t(418));for(;C;)Qu(m,C),C=ec(C.nextSibling)}if(Kf(m),m.tag===13){if(m=m.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(t(317));e:{for(m=m.nextSibling,C=0;m;){if(m.nodeType===8){var F=m.data;if(F==="/$"){if(C===0){da=ec(m.nextSibling);break e}C--}else F!=="$"&&F!=="$!"&&F!=="$?"||C++}m=m.nextSibling}da=null}}else da=gs?ec(m.stateNode.nextSibling):null;return!0}function Ff(){for(var m=da;m;)m=ec(m.nextSibling)}function xu(){da=gs=null,gr=!1}function Po(m){Hr===null?Hr=[m]:Hr.push(m)}var Is=X.ReactCurrentBatchConfig;function rh(m,C,F){if(m=F.ref,m!==null&&typeof m!="function"&&typeof m!="object"){if(F._owner){if(F=F._owner,F){if(F.tag!==1)throw Error(t(309));var G=F.stateNode}if(!G)throw Error(t(147,m));var ae=G,ge=""+m;return C!==null&&C.ref!==null&&typeof C.ref=="function"&&C.ref._stringRef===ge?C.ref:(C=function(Je){var It=ae.refs;Je===null?delete It[ge]:It[ge]=Je},C._stringRef=ge,C)}if(typeof m!="string")throw Error(t(284));if(!F._owner)throw Error(t(290,m))}return m}function EA(m,C){throw m=Object.prototype.toString.call(C),Error(t(31,m==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":m))}function ih(m){var C=m._init;return C(m._payload)}function BA(m){function C(ln,Jt){if(m){var cn=ln.deletions;cn===null?(ln.deletions=[Jt],ln.flags|=16):cn.push(Jt)}}function F(ln,Jt){if(!m)return null;for(;Jt!==null;)C(ln,Jt),Jt=Jt.sibling;return null}function G(ln,Jt){for(ln=new Map;Jt!==null;)Jt.key!==null?ln.set(Jt.key,Jt):ln.set(Jt.index,Jt),Jt=Jt.sibling;return ln}function ae(ln,Jt){return ln=Dd(ln,Jt),ln.index=0,ln.sibling=null,ln}function ge(ln,Jt,cn){return ln.index=cn,m?(cn=ln.alternate,cn!==null?(cn=cn.index,cn<Jt?(ln.flags|=2,Jt):cn):(ln.flags|=2,Jt)):(ln.flags|=1048576,Jt)}function Je(ln){return m&&ln.alternate===null&&(ln.flags|=2),ln}function It(ln,Jt,cn,Cr){return Jt===null||Jt.tag!==6?(Jt=Q0(cn,ln.mode,Cr),Jt.return=ln,Jt):(Jt=ae(Jt,cn),Jt.return=ln,Jt)}function Wt(ln,Jt,cn,Cr){var ni=cn.type;return ni===N?Ar(ln,Jt,cn.props.children,Cr,cn.key):Jt!==null&&(Jt.elementType===ni||typeof ni=="object"&&ni!==null&&ni.$$typeof===at&&ih(ni)===Jt.type)?(Cr=ae(Jt,cn.props),Cr.ref=rh(ln,Jt,cn),Cr.return=ln,Cr):(Cr=r0(cn.type,cn.key,cn.props,null,ln.mode,Cr),Cr.ref=rh(ln,Jt,cn),Cr.return=ln,Cr)}function xn(ln,Jt,cn,Cr){return Jt===null||Jt.tag!==4||Jt.stateNode.containerInfo!==cn.containerInfo||Jt.stateNode.implementation!==cn.implementation?(Jt=i0(cn,ln.mode,Cr),Jt.return=ln,Jt):(Jt=ae(Jt,cn.children||[]),Jt.return=ln,Jt)}function Ar(ln,Jt,cn,Cr,ni){return Jt===null||Jt.tag!==7?(Jt=mf(cn,ln.mode,Cr,ni),Jt.return=ln,Jt):(Jt=ae(Jt,cn),Jt.return=ln,Jt)}function mr(ln,Jt,cn){if(typeof Jt=="string"&&Jt!==""||typeof Jt=="number")return Jt=Q0(""+Jt,ln.mode,cn),Jt.return=ln,Jt;if(typeof Jt=="object"&&Jt!==null){switch(Jt.$$typeof){case Y:return cn=r0(Jt.type,Jt.key,Jt.props,null,ln.mode,cn),cn.ref=rh(ln,null,Jt),cn.return=ln,cn;case ee:return Jt=i0(Jt,ln.mode,cn),Jt.return=ln,Jt;case at:var Cr=Jt._init;return mr(ln,Cr(Jt._payload),cn)}if(ir(Jt)||We(Jt))return Jt=mf(Jt,ln.mode,cn,null),Jt.return=ln,Jt;EA(ln,Jt)}return null}function Jn(ln,Jt,cn,Cr){var ni=Jt!==null?Jt.key:null;if(typeof cn=="string"&&cn!==""||typeof cn=="number")return ni!==null?null:It(ln,Jt,""+cn,Cr);if(typeof cn=="object"&&cn!==null){switch(cn.$$typeof){case Y:return cn.key===ni?Wt(ln,Jt,cn,Cr):null;case ee:return cn.key===ni?xn(ln,Jt,cn,Cr):null;case at:return ni=cn._init,Jn(ln,Jt,ni(cn._payload),Cr)}if(ir(cn)||We(cn))return ni!==null?null:Ar(ln,Jt,cn,Cr,null);EA(ln,cn)}return null}function zr(ln,Jt,cn,Cr,ni){if(typeof Cr=="string"&&Cr!==""||typeof Cr=="number")return ln=ln.get(cn)||null,It(Jt,ln,""+Cr,ni);if(typeof Cr=="object"&&Cr!==null){switch(Cr.$$typeof){case Y:return ln=ln.get(Cr.key===null?cn:Cr.key)||null,Wt(Jt,ln,Cr,ni);case ee:return ln=ln.get(Cr.key===null?cn:Cr.key)||null,xn(Jt,ln,Cr,ni);case at:var Ii=Cr._init;return zr(ln,Jt,cn,Ii(Cr._payload),ni)}if(ir(Cr)||We(Cr))return ln=ln.get(cn)||null,Ar(Jt,ln,Cr,ni,null);EA(Jt,Cr)}return null}function ii(ln,Jt,cn,Cr){for(var ni=null,Ii=null,Oi=Jt,zi=Jt=0,Fs=null;Oi!==null&&zi<cn.length;zi++){Oi.index>zi?(Fs=Oi,Oi=null):Fs=Oi.sibling;var Jo=Jn(ln,Oi,cn[zi],Cr);if(Jo===null){Oi===null&&(Oi=Fs);break}m&&Oi&&Jo.alternate===null&&C(ln,Oi),Jt=ge(Jo,Jt,zi),Ii===null?ni=Jo:Ii.sibling=Jo,Ii=Jo,Oi=Fs}if(zi===cn.length)return F(ln,Oi),gr&&bc(ln,zi),ni;if(Oi===null){for(;zi<cn.length;zi++)Oi=mr(ln,cn[zi],Cr),Oi!==null&&(Jt=ge(Oi,Jt,zi),Ii===null?ni=Oi:Ii.sibling=Oi,Ii=Oi);return gr&&bc(ln,zi),ni}for(Oi=G(ln,Oi);zi<cn.length;zi++)Fs=zr(Oi,ln,zi,cn[zi],Cr),Fs!==null&&(m&&Fs.alternate!==null&&Oi.delete(Fs.key===null?zi:Fs.key),Jt=ge(Fs,Jt,zi),Ii===null?ni=Fs:Ii.sibling=Fs,Ii=Fs);return m&&Oi.forEach(function(Uh){return C(ln,Uh)}),gr&&bc(ln,zi),ni}function li(ln,Jt,cn,Cr){var ni=We(cn);if(typeof ni!="function")throw Error(t(150));if(cn=ni.call(cn),cn==null)throw Error(t(151));for(var Ii=ni=null,Oi=Jt,zi=Jt=0,Fs=null,Jo=cn.next();Oi!==null&&!Jo.done;zi++,Jo=cn.next()){Oi.index>zi?(Fs=Oi,Oi=null):Fs=Oi.sibling;var Uh=Jn(ln,Oi,Jo.value,Cr);if(Uh===null){Oi===null&&(Oi=Fs);break}m&&Oi&&Uh.alternate===null&&C(ln,Oi),Jt=ge(Uh,Jt,zi),Ii===null?ni=Uh:Ii.sibling=Uh,Ii=Uh,Oi=Fs}if(Jo.done)return F(ln,Oi),gr&&bc(ln,zi),ni;if(Oi===null){for(;!Jo.done;zi++,Jo=cn.next())Jo=mr(ln,Jo.value,Cr),Jo!==null&&(Jt=ge(Jo,Jt,zi),Ii===null?ni=Jo:Ii.sibling=Jo,Ii=Jo);return gr&&bc(ln,zi),ni}for(Oi=G(ln,Oi);!Jo.done;zi++,Jo=cn.next())Jo=zr(Oi,ln,zi,Jo.value,Cr),Jo!==null&&(m&&Jo.alternate!==null&&Oi.delete(Jo.key===null?zi:Jo.key),Jt=ge(Jo,Jt,zi),Ii===null?ni=Jo:Ii.sibling=Jo,Ii=Jo);return m&&Oi.forEach(function(Zg){return C(ln,Zg)}),gr&&bc(ln,zi),ni}function sl(ln,Jt,cn,Cr){if(typeof cn=="object"&&cn!==null&&cn.type===N&&cn.key===null&&(cn=cn.props.children),typeof cn=="object"&&cn!==null){switch(cn.$$typeof){case Y:e:{for(var ni=cn.key,Ii=Jt;Ii!==null;){if(Ii.key===ni){if(ni=cn.type,ni===N){if(Ii.tag===7){F(ln,Ii.sibling),Jt=ae(Ii,cn.props.children),Jt.return=ln,ln=Jt;break e}}else if(Ii.elementType===ni||typeof ni=="object"&&ni!==null&&ni.$$typeof===at&&ih(ni)===Ii.type){F(ln,Ii.sibling),Jt=ae(Ii,cn.props),Jt.ref=rh(ln,Ii,cn),Jt.return=ln,ln=Jt;break e}F(ln,Ii);break}else C(ln,Ii);Ii=Ii.sibling}cn.type===N?(Jt=mf(cn.props.children,ln.mode,Cr,cn.key),Jt.return=ln,ln=Jt):(Cr=r0(cn.type,cn.key,cn.props,null,ln.mode,Cr),Cr.ref=rh(ln,Jt,cn),Cr.return=ln,ln=Cr)}return Je(ln);case ee:e:{for(Ii=cn.key;Jt!==null;){if(Jt.key===Ii)if(Jt.tag===4&&Jt.stateNode.containerInfo===cn.containerInfo&&Jt.stateNode.implementation===cn.implementation){F(ln,Jt.sibling),Jt=ae(Jt,cn.children||[]),Jt.return=ln,ln=Jt;break e}else{F(ln,Jt);break}else C(ln,Jt);Jt=Jt.sibling}Jt=i0(cn,ln.mode,Cr),Jt.return=ln,ln=Jt}return Je(ln);case at:return Ii=cn._init,sl(ln,Jt,Ii(cn._payload),Cr)}if(ir(cn))return ii(ln,Jt,cn,Cr);if(We(cn))return li(ln,Jt,cn,Cr);EA(ln,cn)}return typeof cn=="string"&&cn!==""||typeof cn=="number"?(cn=""+cn,Jt!==null&&Jt.tag===6?(F(ln,Jt.sibling),Jt=ae(Jt,cn),Jt.return=ln,ln=Jt):(F(ln,Jt),Jt=Q0(cn,ln.mode,Cr),Jt.return=ln,ln=Jt),Je(ln)):F(ln,Jt)}return sl}var Qs=BA(!0),wc=BA(!1),Gl=Oa(null),hl=null,qu=null,Mc=null;function wu(){Mc=qu=hl=null}function Ca(m){var C=Gl.current;Gs(Gl),m._currentValue=C}function Xs(m,C,F){for(;m!==null;){var G=m.alternate;if((m.childLanes&C)!==C?(m.childLanes|=C,G!==null&&(G.childLanes|=C)):G!==null&&(G.childLanes&C)!==C&&(G.childLanes|=C),m===F)break;m=m.return}}function au(m,C){hl=m,Mc=qu=null,m=m.dependencies,m!==null&&m.firstContext!==null&&(m.lanes&C&&(ql=!0),m.firstContext=null)}function lu(m){var C=m._currentValue;if(Mc!==m)if(m={context:m,memoizedValue:C,next:null},qu===null){if(hl===null)throw Error(t(308));qu=m,hl.dependencies={lanes:0,firstContext:m}}else qu=qu.next=m;return C}var cA=null;function Mu(m){cA===null?cA=[m]:cA.push(m)}function Sc(m,C,F,G){var ae=C.interleaved;return ae===null?(F.next=F,Mu(C)):(F.next=ae.next,ae.next=F),C.interleaved=F,Yu(m,G)}function Yu(m,C){m.lanes|=C;var F=m.alternate;for(F!==null&&(F.lanes|=C),F=m,m=m.return;m!==null;)m.childLanes|=C,F=m.alternate,F!==null&&(F.childLanes|=C),F=m,m=m.return;return F.tag===3?F.stateNode:null}var Ql=!1;function wd(m){m.updateQueue={baseState:m.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function T(m,C){m=m.updateQueue,C.updateQueue===m&&(C.updateQueue={baseState:m.baseState,firstBaseUpdate:m.firstBaseUpdate,lastBaseUpdate:m.lastBaseUpdate,shared:m.shared,effects:m.effects})}function l(m,C){return{eventTime:m,lane:C,tag:0,payload:null,callback:null,next:null}}function c(m,C,F){var G=m.updateQueue;if(G===null)return null;if(G=G.shared,gi&2){var ae=G.pending;return ae===null?C.next=C:(C.next=ae.next,ae.next=C),G.pending=C,Yu(m,F)}return ae=G.interleaved,ae===null?(C.next=C,Mu(G)):(C.next=ae.next,ae.next=C),G.interleaved=C,Yu(m,F)}function _(m,C,F){if(C=C.updateQueue,C!==null&&(C=C.shared,(F&4194240)!==0)){var G=C.lanes;G&=m.pendingLanes,F|=G,C.lanes=F,ls(m,F)}}function M(m,C){var F=m.updateQueue,G=m.alternate;if(G!==null&&(G=G.updateQueue,F===G)){var ae=null,ge=null;if(F=F.firstBaseUpdate,F!==null){do{var Je={eventTime:F.eventTime,lane:F.lane,tag:F.tag,payload:F.payload,callback:F.callback,next:null};ge===null?ae=ge=Je:ge=ge.next=Je,F=F.next}while(F!==null);ge===null?ae=ge=C:ge=ge.next=C}else ae=ge=C;F={baseState:G.baseState,firstBaseUpdate:ae,lastBaseUpdate:ge,shared:G.shared,effects:G.effects},m.updateQueue=F;return}m=F.lastBaseUpdate,m===null?F.firstBaseUpdate=C:m.next=C,F.lastBaseUpdate=C}function R(m,C,F,G){var ae=m.updateQueue;Ql=!1;var ge=ae.firstBaseUpdate,Je=ae.lastBaseUpdate,It=ae.shared.pending;if(It!==null){ae.shared.pending=null;var Wt=It,xn=Wt.next;Wt.next=null,Je===null?ge=xn:Je.next=xn,Je=Wt;var Ar=m.alternate;Ar!==null&&(Ar=Ar.updateQueue,It=Ar.lastBaseUpdate,It!==Je&&(It===null?Ar.firstBaseUpdate=xn:It.next=xn,Ar.lastBaseUpdate=Wt))}if(ge!==null){var mr=ae.baseState;Je=0,Ar=xn=Wt=null,It=ge;do{var Jn=It.lane,zr=It.eventTime;if((G&Jn)===Jn){Ar!==null&&(Ar=Ar.next={eventTime:zr,lane:0,tag:It.tag,payload:It.payload,callback:It.callback,next:null});e:{var ii=m,li=It;switch(Jn=C,zr=F,li.tag){case 1:if(ii=li.payload,typeof ii=="function"){mr=ii.call(zr,mr,Jn);break e}mr=ii;break e;case 3:ii.flags=ii.flags&-65537|128;case 0:if(ii=li.payload,Jn=typeof ii=="function"?ii.call(zr,mr,Jn):ii,Jn==null)break e;mr=Ce({},mr,Jn);break e;case 2:Ql=!0}}It.callback!==null&&It.lane!==0&&(m.flags|=64,Jn=ae.effects,Jn===null?ae.effects=[It]:Jn.push(It))}else zr={eventTime:zr,lane:Jn,tag:It.tag,payload:It.payload,callback:It.callback,next:null},Ar===null?(xn=Ar=zr,Wt=mr):Ar=Ar.next=zr,Je|=Jn;if(It=It.next,It===null){if(It=ae.shared.pending,It===null)break;Jn=It,It=Jn.next,Jn.next=null,ae.lastBaseUpdate=Jn,ae.shared.pending=null}}while(!0);if(Ar===null&&(Wt=mr),ae.baseState=Wt,ae.firstBaseUpdate=xn,ae.lastBaseUpdate=Ar,C=ae.shared.interleaved,C!==null){ae=C;do Je|=ae.lane,ae=ae.next;while(ae!==C)}else ge===null&&(ae.shared.lanes=0);yl|=Je,m.lanes=Je,m.memoizedState=mr}}function j(m,C,F){if(m=C.effects,C.effects=null,m!==null)for(C=0;C<m.length;C++){var G=m[C],ae=G.callback;if(ae!==null){if(G.callback=null,G=F,typeof ae!="function")throw Error(t(191,ae));ae.call(G)}}}var $={},te=Oa($),se=Oa($),we=Oa($);function Ie(m){if(m===$)throw Error(t(174));return m}function Re(m,C){switch(_s(we,C),_s(se,m),_s(te,$),m=C.nodeType,m){case 9:case 11:C=(C=C.documentElement)?C.namespaceURI:Ge(null,"");break;default:m=m===8?C.parentNode:C,C=m.namespaceURI||null,m=m.tagName,C=Ge(C,m)}Gs(te),_s(te,C)}function $e(){Gs(te),Gs(se),Gs(we)}function Ze(m){Ie(we.current);var C=Ie(te.current),F=Ge(C,m.type);C!==F&&(_s(se,m),_s(te,F))}function ft(m){se.current===m&&(Gs(te),Gs(se))}var lt=Oa(0);function pt(m){for(var C=m;C!==null;){if(C.tag===13){var F=C.memoizedState;if(F!==null&&(F=F.dehydrated,F===null||F.data==="$?"||F.data==="$!"))return C}else if(C.tag===19&&C.memoizedProps.revealOrder!==void 0){if(C.flags&128)return C}else if(C.child!==null){C.child.return=C,C=C.child;continue}if(C===m)break;for(;C.sibling===null;){if(C.return===null||C.return===m)return null;C=C.return}C.sibling.return=C.return,C=C.sibling}return null}var vt=[];function Bt(){for(var m=0;m<vt.length;m++)vt[m]._workInProgressVersionPrimary=null;vt.length=0}var kt=X.ReactCurrentDispatcher,Rt=X.ReactCurrentBatchConfig,zt=0,Tt=null,tn=null,Zt=null,_n=!1,bn=!1,vn=0,In=0;function Wn(){throw Error(t(321))}function Sn(m,C){if(C===null)return!1;for(var F=0;F<C.length&&F<m.length;F++)if(!an(m[F],C[F]))return!1;return!0}function Tr(m,C,F,G,ae,ge){if(zt=ge,Tt=C,C.memoizedState=null,C.updateQueue=null,C.lanes=0,kt.current=m===null||m.memoizedState===null?Cp:Ec,m=F(G,ae),bn){ge=0;do{if(bn=!1,vn=0,25<=ge)throw Error(t(301));ge+=1,Zt=tn=null,C.updateQueue=null,kt.current=kA,m=F(G,ae)}while(bn)}if(kt.current=Ed,C=tn!==null&&tn.next!==null,zt=0,Zt=tn=Tt=null,_n=!1,C)throw Error(t(300));return m}function Bi(){var m=vn!==0;return vn=0,m}function $i(){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 C=Zt===null?Tt.memoizedState:Zt.next;if(C!==null)Zt=C,tn=m;else{if(m===null)throw Error(t(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 Si(m,C){return typeof C=="function"?C(m):C}function jo(m){var C=Oo(),F=C.queue;if(F===null)throw Error(t(311));F.lastRenderedReducer=m;var G=tn,ae=G.baseQueue,ge=F.pending;if(ge!==null){if(ae!==null){var Je=ae.next;ae.next=ge.next,ge.next=Je}G.baseQueue=ae=ge,F.pending=null}if(ae!==null){ge=ae.next,G=G.baseState;var It=Je=null,Wt=null,xn=ge;do{var Ar=xn.lane;if((zt&Ar)===Ar)Wt!==null&&(Wt=Wt.next={lane:0,action:xn.action,hasEagerState:xn.hasEagerState,eagerState:xn.eagerState,next:null}),G=xn.hasEagerState?xn.eagerState:m(G,xn.action);else{var mr={lane:Ar,action:xn.action,hasEagerState:xn.hasEagerState,eagerState:xn.eagerState,next:null};Wt===null?(It=Wt=mr,Je=G):Wt=Wt.next=mr,Tt.lanes|=Ar,yl|=Ar}xn=xn.next}while(xn!==null&&xn!==ge);Wt===null?Je=G:Wt.next=It,an(G,C.memoizedState)||(ql=!0),C.memoizedState=G,C.baseState=Je,C.baseQueue=Wt,F.lastRenderedState=G}if(m=F.interleaved,m!==null){ae=m;do ge=ae.lane,Tt.lanes|=ge,yl|=ge,ae=ae.next;while(ae!==m)}else ae===null&&(F.lanes=0);return[C.memoizedState,F.dispatch]}function No(m){var C=Oo(),F=C.queue;if(F===null)throw Error(t(311));F.lastRenderedReducer=m;var G=F.dispatch,ae=F.pending,ge=C.memoizedState;if(ae!==null){F.pending=null;var Je=ae=ae.next;do ge=m(ge,Je.action),Je=Je.next;while(Je!==ae);an(ge,C.memoizedState)||(ql=!0),C.memoizedState=ge,C.baseQueue===null&&(C.baseState=ge),F.lastRenderedState=ge}return[ge,G]}function xo(){}function yo(m,C){var F=Tt,G=Oo(),ae=C(),ge=!an(G.memoizedState,ae);if(ge&&(G.memoizedState=ae,ql=!0),G=G.queue,Js(ds.bind(null,F,G,m),[m]),G.getSnapshot!==C||ge||Zt!==null&&Zt.memoizedState.tag&1){if(F.flags|=2048,pl(9,Wo.bind(null,F,G,ae,C),void 0,null),Xo===null)throw Error(t(349));zt&30||ka(F,C,ae)}return ae}function ka(m,C,F){m.flags|=16384,m={getSnapshot:C,value:F},C=Tt.updateQueue,C===null?(C={lastEffect:null,stores:null},Tt.updateQueue=C,C.stores=[m]):(F=C.stores,F===null?C.stores=[m]:F.push(m))}function Wo(m,C,F,G){C.value=F,C.getSnapshot=G,Wa(C)&&$u(m)}function ds(m,C,F){return F(function(){Wa(C)&&$u(m)})}function Wa(m){var C=m.getSnapshot;m=m.value;try{var F=C();return!an(m,F)}catch{return!0}}function $u(m){var C=Yu(m,1);C!==null&&Jc(C,m,1,-1)}function fl(m){var C=$i();return typeof m=="function"&&(m=m()),C.memoizedState=C.baseState=m,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:m},C.queue=m,m=m.dispatch=ic.bind(null,Tt,m),[C.memoizedState,m]}function pl(m,C,F,G){return m={tag:m,create:C,destroy:F,deps:G,next:null},C=Tt.updateQueue,C===null?(C={lastEffect:null,stores:null},Tt.updateQueue=C,C.lastEffect=m.next=m):(F=C.lastEffect,F===null?C.lastEffect=m.next=m:(G=F.next,F.next=m,m.next=G,C.lastEffect=m)),m}function uu(){return Oo().memoizedState}function OA(m,C,F,G){var ae=$i();Tt.flags|=m,ae.memoizedState=pl(1|C,F,void 0,G===void 0?null:G)}function IA(m,C,F,G){var ae=Oo();G=G===void 0?null:G;var ge=void 0;if(tn!==null){var Je=tn.memoizedState;if(ge=Je.destroy,G!==null&&Sn(G,Je.deps)){ae.memoizedState=pl(C,F,ge,G);return}}Tt.flags|=m,ae.memoizedState=pl(1|C,F,ge,G)}function Vu(m,C){return OA(8390656,8,m,C)}function Js(m,C){return IA(2048,8,m,C)}function ml(m,C){return IA(4,2,m,C)}function sa(m,C){return IA(4,4,m,C)}function Pl(m,C){if(typeof C=="function")return m=m(),C(m),function(){C(null)};if(C!=null)return m=m(),C.current=m,function(){C.current=null}}function xs(m,C,F){return F=F!=null?F.concat([m]):null,IA(4,4,Pl.bind(null,C,m),F)}function qs(){}function nl(m,C){var F=Oo();C=C===void 0?null:C;var G=F.memoizedState;return G!==null&&C!==null&&Sn(C,G[1])?G[0]:(F.memoizedState=[m,C],m)}function rl(m,C){var F=Oo();C=C===void 0?null:C;var G=F.memoizedState;return G!==null&&C!==null&&Sn(C,G[1])?G[0]:(m=m(),F.memoizedState=[m,C],m)}function Md(m,C,F){return zt&21?(an(F,C)||(F=Xa(),Tt.lanes|=F,yl|=F,m.baseState=!0),C):(m.baseState&&(m.baseState=!1,ql=!0),m.memoizedState=F)}function Bh(m,C){var F=Fr;Fr=F!==0&&4>F?F:4,m(!0);var G=Rt.transition;Rt.transition={};try{m(!1),C()}finally{Fr=F,Rt.transition=G}}function Oh(){return Oo().memoizedState}function Sd(m,C,F){var G=Dh(m);if(F={lane:G,action:F,hasEagerState:!1,eagerState:null,next:null},Ih(m))Ta(C,F);else if(F=Sc(m,C,F,G),F!==null){var ae=dA();Jc(F,m,G,ae),Au(F,C,G)}}function ic(m,C,F){var G=Dh(m),ae={lane:G,action:F,hasEagerState:!1,eagerState:null,next:null};if(Ih(m))Ta(C,ae);else{var ge=m.alternate;if(m.lanes===0&&(ge===null||ge.lanes===0)&&(ge=C.lastRenderedReducer,ge!==null))try{var Je=C.lastRenderedState,It=ge(Je,F);if(ae.hasEagerState=!0,ae.eagerState=It,an(It,Je)){var Wt=C.interleaved;Wt===null?(ae.next=ae,Mu(C)):(ae.next=Wt.next,Wt.next=ae),C.interleaved=ae;return}}catch{}finally{}F=Sc(m,C,ae,G),F!==null&&(ae=dA(),Jc(F,m,G,ae),Au(F,C,G))}}function Ih(m){var C=m.alternate;return m===Tt||C!==null&&C===Tt}function Ta(m,C){bn=_n=!0;var F=m.pending;F===null?C.next=C:(C.next=F.next,F.next=C),m.pending=C}function Au(m,C,F){if(F&4194240){var G=C.lanes;G&=m.pendingLanes,F|=G,C.lanes=F,ls(m,F)}}var Ed={readContext:lu,useCallback:Wn,useContext:Wn,useEffect:Wn,useImperativeHandle:Wn,useInsertionEffect:Wn,useLayoutEffect:Wn,useMemo:Wn,useReducer:Wn,useRef:Wn,useState:Wn,useDebugValue:Wn,useDeferredValue:Wn,useTransition:Wn,useMutableSource:Wn,useSyncExternalStore:Wn,useId:Wn,unstable_isNewReconciler:!1},Cp={readContext:lu,useCallback:function(m,C){return $i().memoizedState=[m,C===void 0?null:C],m},useContext:lu,useEffect:Vu,useImperativeHandle:function(m,C,F){return F=F!=null?F.concat([m]):null,OA(4194308,4,Pl.bind(null,C,m),F)},useLayoutEffect:function(m,C){return OA(4194308,4,m,C)},useInsertionEffect:function(m,C){return OA(4,2,m,C)},useMemo:function(m,C){var F=$i();return C=C===void 0?null:C,m=m(),F.memoizedState=[m,C],m},useReducer:function(m,C,F){var G=$i();return C=F!==void 0?F(C):C,G.memoizedState=G.baseState=C,m={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:m,lastRenderedState:C},G.queue=m,m=m.dispatch=Sd.bind(null,Tt,m),[G.memoizedState,m]},useRef:function(m){var C=$i();return m={current:m},C.memoizedState=m},useState:fl,useDebugValue:qs,useDeferredValue:function(m){return $i().memoizedState=m},useTransition:function(){var m=fl(!1),C=m[0];return m=Bh.bind(null,m[1]),$i().memoizedState=m,[C,m]},useMutableSource:function(){},useSyncExternalStore:function(m,C,F){var G=Tt,ae=$i();if(gr){if(F===void 0)throw Error(t(407));F=F()}else{if(F=C(),Xo===null)throw Error(t(349));zt&30||ka(G,C,F)}ae.memoizedState=F;var ge={value:F,getSnapshot:C};return ae.queue=ge,Vu(ds.bind(null,G,ge,m),[m]),G.flags|=2048,pl(9,Wo.bind(null,G,ge,F,C),void 0,null),F},useId:function(){var m=$i(),C=Xo.identifierPrefix;if(gr){var F=Gu,G=ou;F=(G&~(1<<32-gn(G)-1)).toString(32)+F,C=":"+C+"R"+F,F=vn++,0<F&&(C+="H"+F.toString(32)),C+=":"}else F=In++,C=":"+C+"r"+F.toString(32)+":";return m.memoizedState=C},unstable_isNewReconciler:!1},Ec={readContext:lu,useCallback:nl,useContext:lu,useEffect:Js,useImperativeHandle:xs,useInsertionEffect:ml,useLayoutEffect:sa,useMemo:rl,useReducer:jo,useRef:uu,useState:function(){return jo(Si)},useDebugValue:qs,useDeferredValue:function(m){var C=Oo();return Md(C,tn.memoizedState,m)},useTransition:function(){var m=jo(Si)[0],C=Oo().memoizedState;return[m,C]},useMutableSource:xo,useSyncExternalStore:yo,useId:Oh,unstable_isNewReconciler:!1},kA={readContext:lu,useCallback:nl,useContext:lu,useEffect:Js,useImperativeHandle:xs,useInsertionEffect:ml,useLayoutEffect:sa,useMemo:rl,useReducer:No,useRef:uu,useState:function(){return No(Si)},useDebugValue:qs,useDeferredValue:function(m){var C=Oo();return tn===null?C.memoizedState=m:Md(C,tn.memoizedState,m)},useTransition:function(){var m=No(Si)[0],C=Oo().memoizedState;return[m,C]},useMutableSource:xo,useSyncExternalStore:yo,useId:Oh,unstable_isNewReconciler:!1};function Ga(m,C){if(m&&m.defaultProps){C=Ce({},C),m=m.defaultProps;for(var F in m)C[F]===void 0&&(C[F]=m[F]);return C}return C}function _p(m,C,F,G){C=m.memoizedState,F=F(G,C),F=F==null?C:Ce({},C,F),m.memoizedState=F,m.lanes===0&&(m.updateQueue.baseState=F)}var kh={isMounted:function(m){return(m=m._reactInternals)?qi(m)===m:!1},enqueueSetState:function(m,C,F){m=m._reactInternals;var G=dA(),ae=Dh(m),ge=l(G,ae);ge.payload=C,F!=null&&(ge.callback=F),C=c(m,ge,ae),C!==null&&(Jc(C,m,ae,G),_(C,m,ae))},enqueueReplaceState:function(m,C,F){m=m._reactInternals;var G=dA(),ae=Dh(m),ge=l(G,ae);ge.tag=1,ge.payload=C,F!=null&&(ge.callback=F),C=c(m,ge,ae),C!==null&&(Jc(C,m,ae,G),_(C,m,ae))},enqueueForceUpdate:function(m,C){m=m._reactInternals;var F=dA(),G=Dh(m),ae=l(F,G);ae.tag=2,C!=null&&(ae.callback=C),C=c(m,ae,G),C!==null&&(Jc(C,m,G,F),_(C,m,G))}};function bp(m,C,F,G,ae,ge,Je){return m=m.stateNode,typeof m.shouldComponentUpdate=="function"?m.shouldComponentUpdate(G,ge,Je):C.prototype&&C.prototype.isPureReactComponent?!Ur(F,G)||!Ur(ae,ge):!0}function oh(m,C,F){var G=!1,ae=uA,ge=C.contextType;return typeof ge=="object"&&ge!==null?ge=lu(ge):(ae=Ia(C)?va:Bs.current,G=C.contextTypes,ge=(G=G!=null)?Vc(m,ae):uA),C=new C(F,ge),m.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=kh,m.stateNode=C,C._reactInternals=m,G&&(m=m.stateNode,m.__reactInternalMemoizedUnmaskedChildContext=ae,m.__reactInternalMemoizedMaskedChildContext=ge),C}function Bc(m,C,F,G){m=C.state,typeof C.componentWillReceiveProps=="function"&&C.componentWillReceiveProps(F,G),typeof C.UNSAFE_componentWillReceiveProps=="function"&&C.UNSAFE_componentWillReceiveProps(F,G),C.state!==m&&kh.enqueueReplaceState(C,C.state,null)}function um(m,C,F,G){var ae=m.stateNode;ae.props=F,ae.state=m.memoizedState,ae.refs={},wd(m);var ge=C.contextType;typeof ge=="object"&&ge!==null?ae.context=lu(ge):(ge=Ia(C)?va:Bs.current,ae.context=Vc(m,ge)),ae.state=m.memoizedState,ge=C.getDerivedStateFromProps,typeof ge=="function"&&(_p(m,C,ge,F),ae.state=m.memoizedState),typeof C.getDerivedStateFromProps=="function"||typeof ae.getSnapshotBeforeUpdate=="function"||typeof ae.UNSAFE_componentWillMount!="function"&&typeof ae.componentWillMount!="function"||(C=ae.state,typeof ae.componentWillMount=="function"&&ae.componentWillMount(),typeof ae.UNSAFE_componentWillMount=="function"&&ae.UNSAFE_componentWillMount(),C!==ae.state&&kh.enqueueReplaceState(ae,ae.state,null),R(m,F,ae,G),ae.state=m.memoizedState),typeof ae.componentDidMount=="function"&&(m.flags|=4194308)}function oc(m,C){try{var F="",G=C;do F+=gt(G),G=G.return;while(G);var ae=F}catch(ge){ae=`
|
||
Error generating stack: `+ge.message+`
|
||
`+ge.stack}return{value:m,source:C,stack:ae,digest:null}}function Th(m,C,F){return{value:m,source:null,stack:F??null,digest:C??null}}function Bd(m,C){try{console.error(C.value)}catch(F){setTimeout(function(){throw F})}}var xp=typeof WeakMap=="function"?WeakMap:Map;function sh(m,C,F){F=l(-1,F),F.tag=3,F.payload={element:null};var G=C.value;return F.callback=function(){df||(df=!0,$m=G),Bd(m,C)},F}function Lf(m,C,F){F=l(-1,F),F.tag=3;var G=m.type.getDerivedStateFromError;if(typeof G=="function"){var ae=C.value;F.payload=function(){return G(ae)},F.callback=function(){Bd(m,C)}}var ge=m.stateNode;return ge!==null&&typeof ge.componentDidCatch=="function"&&(F.callback=function(){Bd(m,C),typeof G!="function"&&(hf===null?hf=new Set([this]):hf.add(this));var Je=C.stack;this.componentDidCatch(C.value,{componentStack:Je!==null?Je:""})}),F}function Uf(m,C,F){var G=m.pingCache;if(G===null){G=m.pingCache=new xp;var ae=new Set;G.set(C,ae)}else ae=G.get(C),ae===void 0&&(ae=new Set,G.set(C,ae));ae.has(F)||(ae.add(F),m=qg.bind(null,m,C,F),C.then(m,m))}function wp(m){do{var C;if((C=m.tag===13)&&(C=m.memoizedState,C=C!==null?C.dehydrated!==null:!0),C)return m;m=m.return}while(m!==null);return null}function Od(m,C,F,G,ae){return m.mode&1?(m.flags|=65536,m.lanes=ae,m):(m===C?m.flags|=65536:(m.flags|=128,F.flags|=131072,F.flags&=-52805,F.tag===1&&(F.alternate===null?F.tag=17:(C=l(-1,1),C.tag=2,c(F,C,1))),F.lanes|=1),m)}var sf=X.ReactCurrentOwner,ql=!1;function Rl(m,C,F,G){C.child=m===null?wc(C,null,F,G):Qs(C,m.child,F,G)}function Am(m,C,F,G,ae){F=F.render;var ge=C.ref;return au(C,ae),G=Tr(m,C,F,G,ge,ae),F=Bi(),m!==null&&!ql?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~ae,Su(m,C,ae)):(gr&&F&&SA(C),C.flags|=1,Rl(m,C,G,ae),C.child)}function zf(m,C,F,G,ae){if(m===null){var ge=F.type;return typeof ge=="function"&&!Qf(ge)&&ge.defaultProps===void 0&&F.compare===null&&F.defaultProps===void 0?(C.tag=15,C.type=ge,Io(m,C,ge,G,ae)):(m=r0(F.type,null,G,C,C.mode,ae),m.ref=C.ref,m.return=C,C.child=m)}if(ge=m.child,!(m.lanes&ae)){var Je=ge.memoizedProps;if(F=F.compare,F=F!==null?F:Ur,F(Je,G)&&m.ref===C.ref)return Su(m,C,ae)}return C.flags|=1,m=Dd(ge,G),m.ref=C.ref,m.return=C,C.child=m}function Io(m,C,F,G,ae){if(m!==null){var ge=m.memoizedProps;if(Ur(ge,G)&&m.ref===C.ref)if(ql=!1,C.pendingProps=G=ge,(m.lanes&ae)!==0)m.flags&131072&&(ql=!0);else return C.lanes=m.lanes,Su(m,C,ae)}return Id(m,C,F,G,ae)}function Hu(m,C,F){var G=C.pendingProps,ae=G.children,ge=m!==null?m.memoizedState:null;if(G.mode==="hidden")if(!(C.mode&1))C.memoizedState={baseLanes:0,cachePool:null,transitions:null},_s(Dl,ks),ks|=F;else{if(!(F&1073741824))return m=ge!==null?ge.baseLanes|F:F,C.lanes=C.childLanes=1073741824,C.memoizedState={baseLanes:m,cachePool:null,transitions:null},C.updateQueue=null,_s(Dl,ks),ks|=m,null;C.memoizedState={baseLanes:0,cachePool:null,transitions:null},G=ge!==null?ge.baseLanes:F,_s(Dl,ks),ks|=G}else ge!==null?(G=ge.baseLanes|F,C.memoizedState=null):G=F,_s(Dl,ks),ks|=G;return Rl(m,C,ae,F),C.child}function af(m,C){var F=C.ref;(m===null&&F!==null||m!==null&&m.ref!==F)&&(C.flags|=512,C.flags|=2097152)}function Id(m,C,F,G,ae){var ge=Ia(F)?va:Bs.current;return ge=Vc(C,ge),au(C,ae),F=Tr(m,C,F,G,ge,ae),G=Bi(),m!==null&&!ql?(C.updateQueue=m.updateQueue,C.flags&=-2053,m.lanes&=~ae,Su(m,C,ae)):(gr&&G&&SA(C),C.flags|=1,Rl(m,C,F,ae),C.child)}function TA(m,C,F,G,ae){if(Ia(F)){var ge=!0;Mi(C)}else ge=!1;if(au(C,ae),C.stateNode===null)Sp(m,C),oh(C,F,G),um(C,F,G,ae),G=!0;else if(m===null){var Je=C.stateNode,It=C.memoizedProps;Je.props=It;var Wt=Je.context,xn=F.contextType;typeof xn=="object"&&xn!==null?xn=lu(xn):(xn=Ia(F)?va:Bs.current,xn=Vc(C,xn));var Ar=F.getDerivedStateFromProps,mr=typeof Ar=="function"||typeof Je.getSnapshotBeforeUpdate=="function";mr||typeof Je.UNSAFE_componentWillReceiveProps!="function"&&typeof Je.componentWillReceiveProps!="function"||(It!==G||Wt!==xn)&&Bc(C,Je,G,xn),Ql=!1;var Jn=C.memoizedState;Je.state=Jn,R(C,G,Je,ae),Wt=C.memoizedState,It!==G||Jn!==Wt||yr.current||Ql?(typeof Ar=="function"&&(_p(C,F,Ar,G),Wt=C.memoizedState),(It=Ql||bp(C,F,It,G,Jn,Wt,xn))?(mr||typeof Je.UNSAFE_componentWillMount!="function"&&typeof Je.componentWillMount!="function"||(typeof Je.componentWillMount=="function"&&Je.componentWillMount(),typeof Je.UNSAFE_componentWillMount=="function"&&Je.UNSAFE_componentWillMount()),typeof Je.componentDidMount=="function"&&(C.flags|=4194308)):(typeof Je.componentDidMount=="function"&&(C.flags|=4194308),C.memoizedProps=G,C.memoizedState=Wt),Je.props=G,Je.state=Wt,Je.context=xn,G=It):(typeof Je.componentDidMount=="function"&&(C.flags|=4194308),G=!1)}else{Je=C.stateNode,T(m,C),It=C.memoizedProps,xn=C.type===C.elementType?It:Ga(C.type,It),Je.props=xn,mr=C.pendingProps,Jn=Je.context,Wt=F.contextType,typeof Wt=="object"&&Wt!==null?Wt=lu(Wt):(Wt=Ia(F)?va:Bs.current,Wt=Vc(C,Wt));var zr=F.getDerivedStateFromProps;(Ar=typeof zr=="function"||typeof Je.getSnapshotBeforeUpdate=="function")||typeof Je.UNSAFE_componentWillReceiveProps!="function"&&typeof Je.componentWillReceiveProps!="function"||(It!==mr||Jn!==Wt)&&Bc(C,Je,G,Wt),Ql=!1,Jn=C.memoizedState,Je.state=Jn,R(C,G,Je,ae);var ii=C.memoizedState;It!==mr||Jn!==ii||yr.current||Ql?(typeof zr=="function"&&(_p(C,F,zr,G),ii=C.memoizedState),(xn=Ql||bp(C,F,xn,G,Jn,ii,Wt)||!1)?(Ar||typeof Je.UNSAFE_componentWillUpdate!="function"&&typeof Je.componentWillUpdate!="function"||(typeof Je.componentWillUpdate=="function"&&Je.componentWillUpdate(G,ii,Wt),typeof Je.UNSAFE_componentWillUpdate=="function"&&Je.UNSAFE_componentWillUpdate(G,ii,Wt)),typeof Je.componentDidUpdate=="function"&&(C.flags|=4),typeof Je.getSnapshotBeforeUpdate=="function"&&(C.flags|=1024)):(typeof Je.componentDidUpdate!="function"||It===m.memoizedProps&&Jn===m.memoizedState||(C.flags|=4),typeof Je.getSnapshotBeforeUpdate!="function"||It===m.memoizedProps&&Jn===m.memoizedState||(C.flags|=1024),C.memoizedProps=G,C.memoizedState=ii),Je.props=G,Je.state=ii,Je.context=Wt,G=xn):(typeof Je.componentDidUpdate!="function"||It===m.memoizedProps&&Jn===m.memoizedState||(C.flags|=4),typeof Je.getSnapshotBeforeUpdate!="function"||It===m.memoizedProps&&Jn===m.memoizedState||(C.flags|=1024),G=!1)}return Ph(m,C,F,G,ge,ae)}function Ph(m,C,F,G,ae,ge){af(m,C);var Je=(C.flags&128)!==0;if(!G&&!Je)return ae&&_d(C,F,!1),Su(m,C,ge);G=C.stateNode,sf.current=C;var It=Je&&typeof F.getDerivedStateFromError!="function"?null:G.render();return C.flags|=1,m!==null&&Je?(C.child=Qs(C,m.child,null,ge),C.child=Qs(C,null,It,ge)):Rl(m,C,It,ge),C.memoizedState=G.state,ae&&_d(C,F,!0),C.child}function Mp(m){var C=m.stateNode;C.pendingContext?vd(m,C.pendingContext,C.pendingContext!==C.context):C.context&&vd(m,C.context,!1),Re(m,C.containerInfo)}function Oc(m,C,F,G,ae){return xu(),Po(ae),C.flags|=256,Rl(m,C,F,G),C.child}var lf={dehydrated:null,treeContext:null,retryLane:0};function uf(m){return{baseLanes:m,cachePool:null,transitions:null}}function ah(m,C,F){var G=C.pendingProps,ae=lt.current,ge=!1,Je=(C.flags&128)!==0,It;if((It=Je)||(It=m!==null&&m.memoizedState===null?!1:(ae&2)!==0),It?(ge=!0,C.flags&=-129):(m===null||m.memoizedState!==null)&&(ae|=1),_s(lt,ae&1),m===null)return bs(C),m=C.memoizedState,m!==null&&(m=m.dehydrated,m!==null)?(C.mode&1?m.data==="$!"?C.lanes=8:C.lanes=1073741824:C.lanes=1,null):(Je=G.children,m=G.fallback,ge?(G=C.mode,ge=C.child,Je={mode:"hidden",children:Je},!(G&1)&&ge!==null?(ge.childLanes=0,ge.pendingProps=Je):ge=mm(Je,G,0,null),m=mf(m,G,F,null),ge.return=C,m.return=C,ge.sibling=m,C.child=ge,C.child.memoizedState=uf(F),C.memoizedState=lf,m):kd(C,Je));if(ae=m.memoizedState,ae!==null&&(It=ae.dehydrated,It!==null))return di(m,C,Je,G,It,ae,F);if(ge){ge=G.fallback,Je=C.mode,ae=m.child,It=ae.sibling;var Wt={mode:"hidden",children:G.children};return!(Je&1)&&C.child!==ae?(G=C.child,G.childLanes=0,G.pendingProps=Wt,C.deletions=null):(G=Dd(ae,Wt),G.subtreeFlags=ae.subtreeFlags&14680064),It!==null?ge=Dd(It,ge):(ge=mf(ge,Je,F,null),ge.flags|=2),ge.return=C,G.return=C,G.sibling=ge,C.child=G,G=ge,ge=C.child,Je=m.child.memoizedState,Je=Je===null?uf(F):{baseLanes:Je.baseLanes|F,cachePool:null,transitions:Je.transitions},ge.memoizedState=Je,ge.childLanes=m.childLanes&~F,C.memoizedState=lf,G}return ge=m.child,m=ge.sibling,G=Dd(ge,{mode:"visible",children:G.children}),!(C.mode&1)&&(G.lanes=F),G.return=C,G.sibling=null,m!==null&&(F=C.deletions,F===null?(C.deletions=[m],C.flags|=16):F.push(m)),C.child=G,C.memoizedState=null,G}function kd(m,C){return C=mm({mode:"visible",children:C},m.mode,0,null),C.return=m,m.child=C}function Hc(m,C,F,G){return G!==null&&Po(G),Qs(C,m.child,null,F),m=kd(C,C.pendingProps.children),m.flags|=2,C.memoizedState=null,m}function di(m,C,F,G,ae,ge,Je){if(F)return C.flags&256?(C.flags&=-257,G=Th(Error(t(422))),Hc(m,C,Je,G)):C.memoizedState!==null?(C.child=m.child,C.flags|=128,null):(ge=G.fallback,ae=C.mode,G=mm({mode:"visible",children:G.children},ae,0,null),ge=mf(ge,ae,Je,null),ge.flags|=2,G.return=C,ge.return=C,G.sibling=ge,C.child=G,C.mode&1&&Qs(C,m.child,null,Je),C.child.memoizedState=uf(Je),C.memoizedState=lf,ge);if(!(C.mode&1))return Hc(m,C,Je,null);if(ae.data==="$!"){if(G=ae.nextSibling&&ae.nextSibling.dataset,G)var It=G.dgst;return G=It,ge=Error(t(419)),G=Th(ge,G,void 0),Hc(m,C,Je,G)}if(It=(Je&m.childLanes)!==0,ql||It){if(G=Xo,G!==null){switch(Je&-Je){case 4:ae=2;break;case 16:ae=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:ae=32;break;case 536870912:ae=268435456;break;default:ae=0}ae=ae&(G.suspendedLanes|Je)?0:ae,ae!==0&&ae!==ge.retryLane&&(ge.retryLane=ae,Yu(m,ae),Jc(G,m,ae,-1))}return Jm(),G=Th(Error(t(421))),Hc(m,C,Je,G)}return ae.data==="$?"?(C.flags|=128,C.child=m.child,C=G0.bind(null,m),ae._reactRetry=C,null):(m=ge.treeContext,da=ec(ae.nextSibling),gs=C,gr=!0,Hr=null,m!==null&&(Na[Ks++]=ou,Na[Ks++]=Gu,Na[Ks++]=Zo,ou=m.id,Gu=m.overflow,Zo=C),C=kd(C,G.children),C.flags|=4096,C)}function Zc(m,C,F){m.lanes|=C;var G=m.alternate;G!==null&&(G.lanes|=C),Xs(m.return,C,F)}function is(m,C,F,G,ae){var ge=m.memoizedState;ge===null?m.memoizedState={isBackwards:C,rendering:null,renderingStartTime:0,last:G,tail:F,tailMode:ae}:(ge.isBackwards=C,ge.rendering=null,ge.renderingStartTime=0,ge.last=G,ge.tail=F,ge.tailMode=ae)}function Td(m,C,F){var G=C.pendingProps,ae=G.revealOrder,ge=G.tail;if(Rl(m,C,G.children,F),G=lt.current,G&2)G=G&1|2,C.flags|=128;else{if(m!==null&&m.flags&128)e:for(m=C.child;m!==null;){if(m.tag===13)m.memoizedState!==null&&Zc(m,F,C);else if(m.tag===19)Zc(m,F,C);else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===C)break e;for(;m.sibling===null;){if(m.return===null||m.return===C)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}G&=1}if(_s(lt,G),!(C.mode&1))C.memoizedState=null;else switch(ae){case"forwards":for(F=C.child,ae=null;F!==null;)m=F.alternate,m!==null&&pt(m)===null&&(ae=F),F=F.sibling;F=ae,F===null?(ae=C.child,C.child=null):(ae=F.sibling,F.sibling=null),is(C,!1,ae,F,ge);break;case"backwards":for(F=null,ae=C.child,C.child=null;ae!==null;){if(m=ae.alternate,m!==null&&pt(m)===null){C.child=ae;break}m=ae.sibling,ae.sibling=F,F=ae,ae=m}is(C,!0,F,null,ge);break;case"together":is(C,!1,null,null,void 0);break;default:C.memoizedState=null}return C.child}function Sp(m,C){!(C.mode&1)&&m!==null&&(m.alternate=null,C.alternate=null,C.flags|=2)}function Su(m,C,F){if(m!==null&&(C.dependencies=m.dependencies),yl|=C.lanes,!(F&C.childLanes))return null;if(m!==null&&C.child!==m.child)throw Error(t(153));if(C.child!==null){for(m=C.child,F=Dd(m,m.pendingProps),C.child=F,F.return=C;m.sibling!==null;)m=m.sibling,F=F.sibling=Dd(m,m.pendingProps),F.return=C;F.sibling=null}return C.child}function Ym(m,C,F){switch(C.tag){case 3:Mp(C),xu();break;case 5:Ze(C);break;case 1:Ia(C.type)&&Mi(C);break;case 4:Re(C,C.stateNode.containerInfo);break;case 10:var G=C.type._context,ae=C.memoizedProps.value;_s(Gl,G._currentValue),G._currentValue=ae;break;case 13:if(G=C.memoizedState,G!==null)return G.dehydrated!==null?(_s(lt,lt.current&1),C.flags|=128,null):F&C.child.childLanes?ah(m,C,F):(_s(lt,lt.current&1),m=Su(m,C,F),m!==null?m.sibling:null);_s(lt,lt.current&1);break;case 19:if(G=(F&C.childLanes)!==0,m.flags&128){if(G)return Td(m,C,F);C.flags|=128}if(ae=C.memoizedState,ae!==null&&(ae.rendering=null,ae.tail=null,ae.lastEffect=null),_s(lt,lt.current),G)break;return null;case 22:case 23:return C.lanes=0,Hu(m,C,F)}return Su(m,C,F)}var gl,cm,ha,dm;gl=function(m,C){for(var F=C.child;F!==null;){if(F.tag===5||F.tag===6)m.appendChild(F.stateNode);else if(F.tag!==4&&F.child!==null){F.child.return=F,F=F.child;continue}if(F===C)break;for(;F.sibling===null;){if(F.return===null||F.return===C)return;F=F.return}F.sibling.return=F.return,F=F.sibling}},cm=function(){},ha=function(m,C,F,G){var ae=m.memoizedProps;if(ae!==G){m=C.stateNode,Ie(te.current);var ge=null;switch(F){case"input":ae=Ut(m,ae),G=Ut(m,G),ge=[];break;case"select":ae=Ce({},ae,{value:void 0}),G=Ce({},G,{value:void 0}),ge=[];break;case"textarea":ae=fn(m,ae),G=fn(m,G),ge=[];break;default:typeof ae.onClick!="function"&&typeof G.onClick=="function"&&(m.onclick=Uu)}oe(F,G);var Je;F=null;for(xn in ae)if(!G.hasOwnProperty(xn)&&ae.hasOwnProperty(xn)&&ae[xn]!=null)if(xn==="style"){var It=ae[xn];for(Je in It)It.hasOwnProperty(Je)&&(F||(F={}),F[Je]="")}else xn!=="dangerouslySetInnerHTML"&&xn!=="children"&&xn!=="suppressContentEditableWarning"&&xn!=="suppressHydrationWarning"&&xn!=="autoFocus"&&(i.hasOwnProperty(xn)?ge||(ge=[]):(ge=ge||[]).push(xn,null));for(xn in G){var Wt=G[xn];if(It=ae!=null?ae[xn]:void 0,G.hasOwnProperty(xn)&&Wt!==It&&(Wt!=null||It!=null))if(xn==="style")if(It){for(Je in It)!It.hasOwnProperty(Je)||Wt&&Wt.hasOwnProperty(Je)||(F||(F={}),F[Je]="");for(Je in Wt)Wt.hasOwnProperty(Je)&&It[Je]!==Wt[Je]&&(F||(F={}),F[Je]=Wt[Je])}else F||(ge||(ge=[]),ge.push(xn,F)),F=Wt;else xn==="dangerouslySetInnerHTML"?(Wt=Wt?Wt.__html:void 0,It=It?It.__html:void 0,Wt!=null&&It!==Wt&&(ge=ge||[]).push(xn,Wt)):xn==="children"?typeof Wt!="string"&&typeof Wt!="number"||(ge=ge||[]).push(xn,""+Wt):xn!=="suppressContentEditableWarning"&&xn!=="suppressHydrationWarning"&&(i.hasOwnProperty(xn)?(Wt!=null&&xn==="onScroll"&&Ho("scroll",m),ge||It===Wt||(ge=[])):(ge=ge||[]).push(xn,Wt))}F&&(ge=ge||[]).push("style",F);var xn=ge;(C.updateQueue=xn)&&(C.flags|=4)}},dm=function(m,C,F,G){F!==G&&(C.flags|=4)};function Af(m,C){if(!gr)switch(m.tailMode){case"hidden":C=m.tail;for(var F=null;C!==null;)C.alternate!==null&&(F=C),C=C.sibling;F===null?m.tail=null:F.sibling=null;break;case"collapsed":F=m.tail;for(var G=null;F!==null;)F.alternate!==null&&(G=F),F=F.sibling;G===null?C||m.tail===null?m.tail=null:m.tail.sibling=null:G.sibling=null}}function il(m){var C=m.alternate!==null&&m.alternate.child===m.child,F=0,G=0;if(C)for(var ae=m.child;ae!==null;)F|=ae.lanes|ae.childLanes,G|=ae.subtreeFlags&14680064,G|=ae.flags&14680064,ae.return=m,ae=ae.sibling;else for(ae=m.child;ae!==null;)F|=ae.lanes|ae.childLanes,G|=ae.subtreeFlags,G|=ae.flags,ae.return=m,ae=ae.sibling;return m.subtreeFlags|=G,m.childLanes=F,C}function Ep(m,C,F){var G=C.pendingProps;switch(xc(C),C.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return il(C),null;case 1:return Ia(C.type)&&tc(),il(C),null;case 3:return G=C.stateNode,$e(),Gs(yr),Gs(Bs),Bt(),G.pendingContext&&(G.context=G.pendingContext,G.pendingContext=null),(m===null||m.child===null)&&(su(C)?C.flags|=4:m===null||m.memoizedState.isDehydrated&&!(C.flags&256)||(C.flags|=1024,Hr!==null&&(Hm(Hr),Hr=null))),cm(m,C),il(C),null;case 5:ft(C);var ae=Ie(we.current);if(F=C.type,m!==null&&C.stateNode!=null)ha(m,C,F,G,ae),m.ref!==C.ref&&(C.flags|=512,C.flags|=2097152);else{if(!G){if(C.stateNode===null)throw Error(t(166));return il(C),null}if(m=Ie(te.current),su(C)){G=C.stateNode,F=C.type;var ge=C.memoizedProps;switch(G[wA]=C,G[Cc]=ge,m=(C.mode&1)!==0,F){case"dialog":Ho("cancel",G),Ho("close",G);break;case"iframe":case"object":case"embed":Ho("load",G);break;case"video":case"audio":for(ae=0;ae<bA.length;ae++)Ho(bA[ae],G);break;case"source":Ho("error",G);break;case"img":case"image":case"link":Ho("error",G),Ho("load",G);break;case"details":Ho("toggle",G);break;case"input":en(G,ge),Ho("invalid",G);break;case"select":G._wrapperState={wasMultiple:!!ge.multiple},Ho("invalid",G);break;case"textarea":Hn(G,ge),Ho("invalid",G)}oe(F,ge),ae=null;for(var Je in ge)if(ge.hasOwnProperty(Je)){var It=ge[Je];Je==="children"?typeof It=="string"?G.textContent!==It&&(ge.suppressHydrationWarning!==!0&&md(G.textContent,It,m),ae=["children",It]):typeof It=="number"&&G.textContent!==""+It&&(ge.suppressHydrationWarning!==!0&&md(G.textContent,It,m),ae=["children",""+It]):i.hasOwnProperty(Je)&&It!=null&&Je==="onScroll"&&Ho("scroll",G)}switch(F){case"input":nt(G),jn(G,ge,!0);break;case"textarea":nt(G),Qn(G);break;case"select":case"option":break;default:typeof ge.onClick=="function"&&(G.onclick=Uu)}G=ae,C.updateQueue=G,G!==null&&(C.flags|=4)}else{Je=ae.nodeType===9?ae:ae.ownerDocument,m==="http://www.w3.org/1999/xhtml"&&(m=Xn(F)),m==="http://www.w3.org/1999/xhtml"?F==="script"?(m=Je.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild)):typeof G.is=="string"?m=Je.createElement(F,{is:G.is}):(m=Je.createElement(F),F==="select"&&(Je=m,G.multiple?Je.multiple=!0:G.size&&(Je.size=G.size))):m=Je.createElementNS(m,F),m[wA]=C,m[Cc]=G,gl(m,C,!1,!1),C.stateNode=m;e:{switch(Je=ve(F,G),F){case"dialog":Ho("cancel",m),Ho("close",m),ae=G;break;case"iframe":case"object":case"embed":Ho("load",m),ae=G;break;case"video":case"audio":for(ae=0;ae<bA.length;ae++)Ho(bA[ae],m);ae=G;break;case"source":Ho("error",m),ae=G;break;case"img":case"image":case"link":Ho("error",m),Ho("load",m),ae=G;break;case"details":Ho("toggle",m),ae=G;break;case"input":en(m,G),ae=Ut(m,G),Ho("invalid",m);break;case"option":ae=G;break;case"select":m._wrapperState={wasMultiple:!!G.multiple},ae=Ce({},G,{value:void 0}),Ho("invalid",m);break;case"textarea":Hn(m,G),ae=fn(m,G),Ho("invalid",m);break;default:ae=G}oe(F,ae),It=ae;for(ge in It)if(It.hasOwnProperty(ge)){var Wt=It[ge];ge==="style"?er(m,Wt):ge==="dangerouslySetInnerHTML"?(Wt=Wt?Wt.__html:void 0,Wt!=null&&pe(m,Wt)):ge==="children"?typeof Wt=="string"?(F!=="textarea"||Wt!=="")&&et(m,Wt):typeof Wt=="number"&&et(m,""+Wt):ge!=="suppressContentEditableWarning"&&ge!=="suppressHydrationWarning"&&ge!=="autoFocus"&&(i.hasOwnProperty(ge)?Wt!=null&&ge==="onScroll"&&Ho("scroll",m):Wt!=null&&re(m,ge,Wt,Je))}switch(F){case"input":nt(m),jn(m,G,!1);break;case"textarea":nt(m),Qn(m);break;case"option":G.value!=null&&m.setAttribute("value",""+Le(G.value));break;case"select":m.multiple=!!G.multiple,ge=G.value,ge!=null?Dn(m,!!G.multiple,ge,!1):G.defaultValue!=null&&Dn(m,!!G.multiple,G.defaultValue,!0);break;default:typeof ae.onClick=="function"&&(m.onclick=Uu)}switch(F){case"button":case"input":case"select":case"textarea":G=!!G.autoFocus;break e;case"img":G=!0;break e;default:G=!1}}G&&(C.flags|=4)}C.ref!==null&&(C.flags|=512,C.flags|=2097152)}return il(C),null;case 6:if(m&&C.stateNode!=null)dm(m,C,m.memoizedProps,G);else{if(typeof G!="string"&&C.stateNode===null)throw Error(t(166));if(F=Ie(we.current),Ie(te.current),su(C)){if(G=C.stateNode,F=C.memoizedProps,G[wA]=C,(ge=G.nodeValue!==F)&&(m=gs,m!==null))switch(m.tag){case 3:md(G.nodeValue,F,(m.mode&1)!==0);break;case 5:m.memoizedProps.suppressHydrationWarning!==!0&&md(G.nodeValue,F,(m.mode&1)!==0)}ge&&(C.flags|=4)}else G=(F.nodeType===9?F:F.ownerDocument).createTextNode(G),G[wA]=C,C.stateNode=G}return il(C),null;case 13:if(Gs(lt),G=C.memoizedState,m===null||m.memoizedState!==null&&m.memoizedState.dehydrated!==null){if(gr&&da!==null&&C.mode&1&&!(C.flags&128))Ff(),xu(),C.flags|=98560,ge=!1;else if(ge=su(C),G!==null&&G.dehydrated!==null){if(m===null){if(!ge)throw Error(t(318));if(ge=C.memoizedState,ge=ge!==null?ge.dehydrated:null,!ge)throw Error(t(317));ge[wA]=C}else xu(),!(C.flags&128)&&(C.memoizedState=null),C.flags|=4;il(C),ge=!1}else Hr!==null&&(Hm(Hr),Hr=null),ge=!0;if(!ge)return C.flags&65536?C:null}return C.flags&128?(C.lanes=F,C):(G=G!==null,G!==(m!==null&&m.memoizedState!==null)&&G&&(C.child.flags|=8192,C.mode&1&&(m===null||lt.current&1?Ro===0&&(Ro=3):Jm())),C.updateQueue!==null&&(C.flags|=4),il(C),null);case 4:return $e(),cm(m,C),m===null&&Lu(C.stateNode.containerInfo),il(C),null;case 10:return Ca(C.type._context),il(C),null;case 17:return Ia(C.type)&&tc(),il(C),null;case 19:if(Gs(lt),ge=C.memoizedState,ge===null)return il(C),null;if(G=(C.flags&128)!==0,Je=ge.rendering,Je===null)if(G)Af(ge,!1);else{if(Ro!==0||m!==null&&m.flags&128)for(m=C.child;m!==null;){if(Je=pt(m),Je!==null){for(C.flags|=128,Af(ge,!1),G=Je.updateQueue,G!==null&&(C.updateQueue=G,C.flags|=4),C.subtreeFlags=0,G=F,F=C.child;F!==null;)ge=F,m=G,ge.flags&=14680066,Je=ge.alternate,Je===null?(ge.childLanes=0,ge.lanes=m,ge.child=null,ge.subtreeFlags=0,ge.memoizedProps=null,ge.memoizedState=null,ge.updateQueue=null,ge.dependencies=null,ge.stateNode=null):(ge.childLanes=Je.childLanes,ge.lanes=Je.lanes,ge.child=Je.child,ge.subtreeFlags=0,ge.deletions=null,ge.memoizedProps=Je.memoizedProps,ge.memoizedState=Je.memoizedState,ge.updateQueue=Je.updateQueue,ge.type=Je.type,m=Je.dependencies,ge.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext}),F=F.sibling;return _s(lt,lt.current&1|2),C.child}m=m.sibling}ge.tail!==null&&ao()>jf&&(C.flags|=128,G=!0,Af(ge,!1),C.lanes=4194304)}else{if(!G)if(m=pt(Je),m!==null){if(C.flags|=128,G=!0,F=m.updateQueue,F!==null&&(C.updateQueue=F,C.flags|=4),Af(ge,!0),ge.tail===null&&ge.tailMode==="hidden"&&!Je.alternate&&!gr)return il(C),null}else 2*ao()-ge.renderingStartTime>jf&&F!==1073741824&&(C.flags|=128,G=!0,Af(ge,!1),C.lanes=4194304);ge.isBackwards?(Je.sibling=C.child,C.child=Je):(F=ge.last,F!==null?F.sibling=Je:C.child=Je,ge.last=Je)}return ge.tail!==null?(C=ge.tail,ge.rendering=C,ge.tail=C.sibling,ge.renderingStartTime=ao(),C.sibling=null,F=lt.current,_s(lt,G?F&1|2:F&1),C):(il(C),null);case 22:case 23:return z0(),G=C.memoizedState!==null,m!==null&&m.memoizedState!==null!==G&&(C.flags|=8192),G&&C.mode&1?ks&1073741824&&(il(C),C.subtreeFlags&6&&(C.flags|=8192)):il(C),null;case 24:return null;case 25:return null}throw Error(t(156,C.tag))}function A(m,C){switch(xc(C),C.tag){case 1:return Ia(C.type)&&tc(),m=C.flags,m&65536?(C.flags=m&-65537|128,C):null;case 3:return $e(),Gs(yr),Gs(Bs),Bt(),m=C.flags,m&65536&&!(m&128)?(C.flags=m&-65537|128,C):null;case 5:return ft(C),null;case 13:if(Gs(lt),m=C.memoizedState,m!==null&&m.dehydrated!==null){if(C.alternate===null)throw Error(t(340));xu()}return m=C.flags,m&65536?(C.flags=m&-65537|128,C):null;case 19:return Gs(lt),null;case 4:return $e(),null;case 10:return Ca(C.type._context),null;case 22:case 23:return z0(),null;case 24:return null;default:return null}}var y=!1,I=!1,B=typeof WeakSet=="function"?WeakSet:Set,D=null;function H(m,C){var F=m.ref;if(F!==null)if(typeof F=="function")try{F(null)}catch(G){ol(m,C,G)}else F.current=null}function ue(m,C,F){try{F()}catch(G){ol(m,C,G)}}var _e=!1;function ke(m,C){if(XA=Oe,m=Vo(),QA(m)){if("selectionStart"in m)var F={start:m.selectionStart,end:m.selectionEnd};else e:{F=(F=m.ownerDocument)&&F.defaultView||window;var G=F.getSelection&&F.getSelection();if(G&&G.rangeCount!==0){F=G.anchorNode;var ae=G.anchorOffset,ge=G.focusNode;G=G.focusOffset;try{F.nodeType,ge.nodeType}catch{F=null;break e}var Je=0,It=-1,Wt=-1,xn=0,Ar=0,mr=m,Jn=null;t:for(;;){for(var zr;mr!==F||ae!==0&&mr.nodeType!==3||(It=Je+ae),mr!==ge||G!==0&&mr.nodeType!==3||(Wt=Je+G),mr.nodeType===3&&(Je+=mr.nodeValue.length),(zr=mr.firstChild)!==null;)Jn=mr,mr=zr;for(;;){if(mr===m)break t;if(Jn===F&&++xn===ae&&(It=Je),Jn===ge&&++Ar===G&&(Wt=Je),(zr=mr.nextSibling)!==null)break;mr=Jn,Jn=mr.parentNode}mr=zr}F=It===-1||Wt===-1?null:{start:It,end:Wt}}else F=null}F=F||{start:0,end:0}}else F=null;for(Nl={focusedElem:m,selectionRange:F},Oe=!1,D=C;D!==null;)if(C=D,m=C.child,(C.subtreeFlags&1028)!==0&&m!==null)m.return=C,D=m;else for(;D!==null;){C=D;try{var ii=C.alternate;if(C.flags&1024)switch(C.tag){case 0:case 11:case 15:break;case 1:if(ii!==null){var li=ii.memoizedProps,sl=ii.memoizedState,ln=C.stateNode,Jt=ln.getSnapshotBeforeUpdate(C.elementType===C.type?li:Ga(C.type,li),sl);ln.__reactInternalSnapshotBeforeUpdate=Jt}break;case 3:var cn=C.stateNode.containerInfo;cn.nodeType===1?cn.textContent="":cn.nodeType===9&&cn.documentElement&&cn.removeChild(cn.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Cr){ol(C,C.return,Cr)}if(m=C.sibling,m!==null){m.return=C.return,D=m;break}D=C.return}return ii=_e,_e=!1,ii}function ze(m,C,F){var G=C.updateQueue;if(G=G!==null?G.lastEffect:null,G!==null){var ae=G=G.next;do{if((ae.tag&m)===m){var ge=ae.destroy;ae.destroy=void 0,ge!==void 0&&ue(C,F,ge)}ae=ae.next}while(ae!==G)}}function mt(m,C){if(C=C.updateQueue,C=C!==null?C.lastEffect:null,C!==null){var F=C=C.next;do{if((F.tag&m)===m){var G=F.create;F.destroy=G()}F=F.next}while(F!==C)}}function Mt(m){var C=m.ref;if(C!==null){var F=m.stateNode;switch(m.tag){case 5:m=F;break;default:m=F}typeof C=="function"?C(m):C.current=m}}function Xt(m){var C=m.alternate;C!==null&&(m.alternate=null,Xt(C)),m.child=null,m.deletions=null,m.sibling=null,m.tag===5&&(C=m.stateNode,C!==null&&(delete C[wA],delete C[Cc],delete C[$c],delete C[it],delete C[ja])),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 Mn(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 Kn(m,C,F){var G=m.tag;if(G===5||G===6)m=m.stateNode,C?F.nodeType===8?F.parentNode.insertBefore(m,C):F.insertBefore(m,C):(F.nodeType===8?(C=F.parentNode,C.insertBefore(m,F)):(C=F,C.appendChild(m)),F=F._reactRootContainer,F!=null||C.onclick!==null||(C.onclick=Uu));else if(G!==4&&(m=m.child,m!==null))for(Kn(m,C,F),m=m.sibling;m!==null;)Kn(m,C,F),m=m.sibling}function Zn(m,C,F){var G=m.tag;if(G===5||G===6)m=m.stateNode,C?F.insertBefore(m,C):F.appendChild(m);else if(G!==4&&(m=m.child,m!==null))for(Zn(m,C,F),m=m.sibling;m!==null;)Zn(m,C,F),m=m.sibling}var or=null,br=!1;function dr(m,C,F){for(F=F.child;F!==null;)Lr(m,C,F),F=F.sibling}function Lr(m,C,F){if(qe&&typeof qe.onCommitFiberUnmount=="function")try{qe.onCommitFiberUnmount(ia,F)}catch{}switch(F.tag){case 5:I||H(F,C);case 6:var G=or,ae=br;or=null,dr(m,C,F),or=G,br=ae,or!==null&&(br?(m=or,F=F.stateNode,m.nodeType===8?m.parentNode.removeChild(F):m.removeChild(F)):or.removeChild(F.stateNode));break;case 18:or!==null&&(br?(m=or,F=F.stateNode,m.nodeType===8?eh(m.parentNode,F):m.nodeType===1&&eh(m,F),Ri(m)):eh(or,F.stateNode));break;case 4:G=or,ae=br,or=F.stateNode.containerInfo,br=!0,dr(m,C,F),or=G,br=ae;break;case 0:case 11:case 14:case 15:if(!I&&(G=F.updateQueue,G!==null&&(G=G.lastEffect,G!==null))){ae=G=G.next;do{var ge=ae,Je=ge.destroy;ge=ge.tag,Je!==void 0&&(ge&2||ge&4)&&ue(F,C,Je),ae=ae.next}while(ae!==G)}dr(m,C,F);break;case 1:if(!I&&(H(F,C),G=F.stateNode,typeof G.componentWillUnmount=="function"))try{G.props=F.memoizedProps,G.state=F.memoizedState,G.componentWillUnmount()}catch(It){ol(F,C,It)}dr(m,C,F);break;case 21:dr(m,C,F);break;case 22:F.mode&1?(I=(G=I)||F.memoizedState!==null,dr(m,C,F),I=G):dr(m,C,F);break;default:dr(m,C,F)}}function ai(m){var C=m.updateQueue;if(C!==null){m.updateQueue=null;var F=m.stateNode;F===null&&(F=m.stateNode=new B),C.forEach(function(G){var ae=Yg.bind(null,m,G);F.has(G)||(F.add(G),G.then(ae,ae))})}}function Wr(m,C){var F=C.deletions;if(F!==null)for(var G=0;G<F.length;G++){var ae=F[G];try{var ge=m,Je=C,It=Je;e:for(;It!==null;){switch(It.tag){case 5:or=It.stateNode,br=!1;break e;case 3:or=It.stateNode.containerInfo,br=!0;break e;case 4:or=It.stateNode.containerInfo,br=!0;break e}It=It.return}if(or===null)throw Error(t(160));Lr(ge,Je,ae),or=null,br=!1;var Wt=ae.alternate;Wt!==null&&(Wt.return=null),ae.return=null}catch(xn){ol(ae,C,xn)}}if(C.subtreeFlags&12854)for(C=C.child;C!==null;)Xi(C,m),C=C.sibling}function Xi(m,C){var F=m.alternate,G=m.flags;switch(m.tag){case 0:case 11:case 14:case 15:if(Wr(C,m),ko(m),G&4){try{ze(3,m,m.return),mt(3,m)}catch(li){ol(m,m.return,li)}try{ze(5,m,m.return)}catch(li){ol(m,m.return,li)}}break;case 1:Wr(C,m),ko(m),G&512&&F!==null&&H(F,F.return);break;case 5:if(Wr(C,m),ko(m),G&512&&F!==null&&H(F,F.return),m.flags&32){var ae=m.stateNode;try{et(ae,"")}catch(li){ol(m,m.return,li)}}if(G&4&&(ae=m.stateNode,ae!=null)){var ge=m.memoizedProps,Je=F!==null?F.memoizedProps:ge,It=m.type,Wt=m.updateQueue;if(m.updateQueue=null,Wt!==null)try{It==="input"&&ge.type==="radio"&&ge.name!=null&&Ft(ae,ge),ve(It,Je);var xn=ve(It,ge);for(Je=0;Je<Wt.length;Je+=2){var Ar=Wt[Je],mr=Wt[Je+1];Ar==="style"?er(ae,mr):Ar==="dangerouslySetInnerHTML"?pe(ae,mr):Ar==="children"?et(ae,mr):re(ae,Ar,mr,xn)}switch(It){case"input":mn(ae,ge);break;case"textarea":wr(ae,ge);break;case"select":var Jn=ae._wrapperState.wasMultiple;ae._wrapperState.wasMultiple=!!ge.multiple;var zr=ge.value;zr!=null?Dn(ae,!!ge.multiple,zr,!1):Jn!==!!ge.multiple&&(ge.defaultValue!=null?Dn(ae,!!ge.multiple,ge.defaultValue,!0):Dn(ae,!!ge.multiple,ge.multiple?[]:"",!1))}ae[Cc]=ge}catch(li){ol(m,m.return,li)}}break;case 6:if(Wr(C,m),ko(m),G&4){if(m.stateNode===null)throw Error(t(162));ae=m.stateNode,ge=m.memoizedProps;try{ae.nodeValue=ge}catch(li){ol(m,m.return,li)}}break;case 3:if(Wr(C,m),ko(m),G&4&&F!==null&&F.memoizedState.isDehydrated)try{Ri(C.containerInfo)}catch(li){ol(m,m.return,li)}break;case 4:Wr(C,m),ko(m);break;case 13:Wr(C,m),ko(m),ae=m.child,ae.flags&8192&&(ge=ae.memoizedState!==null,ae.stateNode.isHidden=ge,!ge||ae.alternate!==null&&ae.alternate.memoizedState!==null||(cf=ao())),G&4&&ai(m);break;case 22:if(Ar=F!==null&&F.memoizedState!==null,m.mode&1?(I=(xn=I)||Ar,Wr(C,m),I=xn):Wr(C,m),ko(m),G&8192){if(xn=m.memoizedState!==null,(m.stateNode.isHidden=xn)&&!Ar&&m.mode&1)for(D=m,Ar=m.child;Ar!==null;){for(mr=D=Ar;D!==null;){switch(Jn=D,zr=Jn.child,Jn.tag){case 0:case 11:case 14:case 15:ze(4,Jn,Jn.return);break;case 1:H(Jn,Jn.return);var ii=Jn.stateNode;if(typeof ii.componentWillUnmount=="function"){G=Jn,F=Jn.return;try{C=G,ii.props=C.memoizedProps,ii.state=C.memoizedState,ii.componentWillUnmount()}catch(li){ol(G,F,li)}}break;case 5:H(Jn,Jn.return);break;case 22:if(Jn.memoizedState!==null){ba(mr);continue}}zr!==null?(zr.return=Jn,D=zr):ba(mr)}Ar=Ar.sibling}e:for(Ar=null,mr=m;;){if(mr.tag===5){if(Ar===null){Ar=mr;try{ae=mr.stateNode,xn?(ge=ae.style,typeof ge.setProperty=="function"?ge.setProperty("display","none","important"):ge.display="none"):(It=mr.stateNode,Wt=mr.memoizedProps.style,Je=Wt!=null&&Wt.hasOwnProperty("display")?Wt.display:null,It.style.display=rn("display",Je))}catch(li){ol(m,m.return,li)}}}else if(mr.tag===6){if(Ar===null)try{mr.stateNode.nodeValue=xn?"":mr.memoizedProps}catch(li){ol(m,m.return,li)}}else if((mr.tag!==22&&mr.tag!==23||mr.memoizedState===null||mr===m)&&mr.child!==null){mr.child.return=mr,mr=mr.child;continue}if(mr===m)break e;for(;mr.sibling===null;){if(mr.return===null||mr.return===m)break e;Ar===mr&&(Ar=null),mr=mr.return}Ar===mr&&(Ar=null),mr.sibling.return=mr.return,mr=mr.sibling}}break;case 19:Wr(C,m),ko(m),G&4&&ai(m);break;case 21:break;default:Wr(C,m),ko(m)}}function ko(m){var C=m.flags;if(C&2){try{e:{for(var F=m.return;F!==null;){if(Qt(F)){var G=F;break e}F=F.return}throw Error(t(160))}switch(G.tag){case 5:var ae=G.stateNode;G.flags&32&&(et(ae,""),G.flags&=-33);var ge=Mn(m);Zn(m,ge,ae);break;case 3:case 4:var Je=G.stateNode.containerInfo,It=Mn(m);Kn(m,It,Je);break;default:throw Error(t(161))}}catch(Wt){ol(m,m.return,Wt)}m.flags&=-3}C&4096&&(m.flags&=-4097)}function Qa(m,C,F){D=m,aa(m)}function aa(m,C,F){for(var G=(m.mode&1)!==0;D!==null;){var ae=D,ge=ae.child;if(ae.tag===22&&G){var Je=ae.memoizedState!==null||y;if(!Je){var It=ae.alternate,Wt=It!==null&&It.memoizedState!==null||I;It=y;var xn=I;if(y=Je,(I=Wt)&&!xn)for(D=ae;D!==null;)Je=D,Wt=Je.child,Je.tag===22&&Je.memoizedState!==null?Pa(ae):Wt!==null?(Wt.return=Je,D=Wt):Pa(ae);for(;ge!==null;)D=ge,aa(ge),ge=ge.sibling;D=ae,y=It,I=xn}_a(m)}else ae.subtreeFlags&8772&&ge!==null?(ge.return=ae,D=ge):_a(m)}}function _a(m){for(;D!==null;){var C=D;if(C.flags&8772){var F=C.alternate;try{if(C.flags&8772)switch(C.tag){case 0:case 11:case 15:I||mt(5,C);break;case 1:var G=C.stateNode;if(C.flags&4&&!I)if(F===null)G.componentDidMount();else{var ae=C.elementType===C.type?F.memoizedProps:Ga(C.type,F.memoizedProps);G.componentDidUpdate(ae,F.memoizedState,G.__reactInternalSnapshotBeforeUpdate)}var ge=C.updateQueue;ge!==null&&j(C,ge,G);break;case 3:var Je=C.updateQueue;if(Je!==null){if(F=null,C.child!==null)switch(C.child.tag){case 5:F=C.child.stateNode;break;case 1:F=C.child.stateNode}j(C,Je,F)}break;case 5:var It=C.stateNode;if(F===null&&C.flags&4){F=It;var Wt=C.memoizedProps;switch(C.type){case"button":case"input":case"select":case"textarea":Wt.autoFocus&&F.focus();break;case"img":Wt.src&&(F.src=Wt.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(C.memoizedState===null){var xn=C.alternate;if(xn!==null){var Ar=xn.memoizedState;if(Ar!==null){var mr=Ar.dehydrated;mr!==null&&Ri(mr)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}I||C.flags&512&&Mt(C)}catch(Jn){ol(C,C.return,Jn)}}if(C===m){D=null;break}if(F=C.sibling,F!==null){F.return=C.return,D=F;break}D=C.return}}function ba(m){for(;D!==null;){var C=D;if(C===m){D=null;break}var F=C.sibling;if(F!==null){F.return=C.return,D=F;break}D=C.return}}function Pa(m){for(;D!==null;){var C=D;try{switch(C.tag){case 0:case 11:case 15:var F=C.return;try{mt(4,C)}catch(Wt){ol(C,F,Wt)}break;case 1:var G=C.stateNode;if(typeof G.componentDidMount=="function"){var ae=C.return;try{G.componentDidMount()}catch(Wt){ol(C,ae,Wt)}}var ge=C.return;try{Mt(C)}catch(Wt){ol(C,ge,Wt)}break;case 5:var Je=C.return;try{Mt(C)}catch(Wt){ol(C,Je,Wt)}}}catch(Wt){ol(C,C.return,Wt)}if(C===m){D=null;break}var It=C.sibling;if(It!==null){It.return=C.return,D=It;break}D=C.return}}var Yl=Math.ceil,qa=X.ReactCurrentDispatcher,xa=X.ReactCurrentOwner,hs=X.ReactCurrentBatchConfig,gi=0,Xo=null,la=null,fa=0,ks=0,Dl=Oa(0),Ro=0,Pd=null,yl=0,PA=0,Xc=0,vl=null,Cl=null,cf=0,jf=1/0,Rh=null,df=!1,$m=null,hf=null,Vm=!1,ff=null,RA=0,hm=0,L0=null,fm=-1,Nf=0;function dA(){return gi&6?ao():fm!==-1?fm:fm=ao()}function Dh(m){return m.mode&1?gi&2&&fa!==0?fa&-fa:Is.transition!==null?(Nf===0&&(Nf=Xa()),Nf):(m=Fr,m!==0||(m=window.event,m=m===void 0?16:ci(m.type)),m):1}function Jc(m,C,F,G){if(50<hm)throw hm=0,L0=null,Error(t(185));ca(m,F,G),(!(gi&2)||m!==Xo)&&(m===Xo&&(!(gi&2)&&(PA|=F),Ro===4&&pf(m,fa)),sc(m,G),F===1&&gi===0&&!(C.mode&1)&&(jf=ao()+500,bd&&AA()))}function sc(m,C){var F=m.callbackNode;ri(m,C);var G=Ns(m,m===Xo?fa:0);if(G===0)F!==null&&ns(F),m.callbackNode=null,m.callbackPriority=0;else if(C=G&-G,m.callbackPriority!==C){if(F!=null&&ns(F),C===1)m.tag===0?nc(Qg.bind(null,m)):MA(Qg.bind(null,m)),gd(function(){!(gi&6)&&AA()}),F=null;else{switch(Ei(G)){case 1:F=tu;break;case 4:F=so;break;case 16:F=Kr;break;case 536870912:F=Ps;break;default:F=Kr}F=Op(F,Wf.bind(null,m))}m.callbackPriority=C,m.callbackNode=F}}function Wf(m,C){if(fm=-1,Nf=0,gi&6)throw Error(t(327));var F=m.callbackNode;if(Bp()&&m.callbackNode!==F)return null;var G=Ns(m,m===Xo?fa:0);if(G===0)return null;if(G&30||G&m.expiredLanes||C)C=Ya(m,G);else{C=G;var ae=gi;gi|=2;var ge=Xm();(Xo!==m||fa!==C)&&(Rh=null,jf=ao()+500,Rd(m,C));do try{Gy();break}catch(It){j0(m,It)}while(!0);wu(),qa.current=ge,gi=ae,la!==null?C=0:(Xo=null,fa=0,C=Ro)}if(C!==0){if(C===2&&(ae=wi(m),ae!==0&&(G=ae,C=U0(m,ae))),C===1)throw F=Pd,Rd(m,0),pf(m,G),sc(m,ao()),F;if(C===6)pf(m,G);else{if(ae=m.current.alternate,!(G&30)&&!Wy(ae)&&(C=Ya(m,G),C===2&&(ge=wi(m),ge!==0&&(G=ge,C=U0(m,ge))),C===1))throw F=Pd,Rd(m,0),pf(m,G),sc(m,ao()),F;switch(m.finishedWork=ae,m.finishedLanes=G,C){case 0:case 1:throw Error(t(345));case 2:Kh(m,Cl,Rh);break;case 3:if(pf(m,G),(G&130023424)===G&&(C=cf+500-ao(),10<C)){if(Ns(m,0)!==0)break;if(ae=m.suspendedLanes,(ae&G)!==G){dA(),m.pingedLanes|=m.suspendedLanes&ae;break}m.timeoutHandle=dl(Kh.bind(null,m,Cl,Rh),C);break}Kh(m,Cl,Rh);break;case 4:if(pf(m,G),(G&4194240)===G)break;for(C=m.eventTimes,ae=-1;0<G;){var Je=31-gn(G);ge=1<<Je,Je=C[Je],Je>ae&&(ae=Je),G&=~ge}if(G=ae,G=ao()-G,G=(120>G?120:480>G?480:1080>G?1080:1920>G?1920:3e3>G?3e3:4320>G?4320:1960*Yl(G/1960))-G,10<G){m.timeoutHandle=dl(Kh.bind(null,m,Cl,Rh),G);break}Kh(m,Cl,Rh);break;case 5:Kh(m,Cl,Rh);break;default:throw Error(t(329))}}}return sc(m,ao()),m.callbackNode===F?Wf.bind(null,m):null}function U0(m,C){var F=vl;return m.current.memoizedState.isDehydrated&&(Rd(m,C).flags|=256),m=Ya(m,C),m!==2&&(C=Cl,Cl=F,C!==null&&Hm(C)),m}function Hm(m){Cl===null?Cl=m:Cl.push.apply(Cl,m)}function Wy(m){for(var C=m;;){if(C.flags&16384){var F=C.updateQueue;if(F!==null&&(F=F.stores,F!==null))for(var G=0;G<F.length;G++){var ae=F[G],ge=ae.getSnapshot;ae=ae.value;try{if(!an(ge(),ae))return!1}catch{return!1}}}if(F=C.child,C.subtreeFlags&16384&&F!==null)F.return=C,C=F;else{if(C===m)break;for(;C.sibling===null;){if(C.return===null||C.return===m)return!0;C=C.return}C.sibling.return=C.return,C=C.sibling}}return!0}function pf(m,C){for(C&=~Xc,C&=~PA,m.suspendedLanes|=C,m.pingedLanes&=~C,m=m.expirationTimes;0<C;){var F=31-gn(C),G=1<<F;m[F]=-1,C&=~G}}function Qg(m){if(gi&6)throw Error(t(327));Bp();var C=Ns(m,0);if(!(C&1))return sc(m,ao()),null;var F=Ya(m,C);if(m.tag!==0&&F===2){var G=wi(m);G!==0&&(C=G,F=U0(m,G))}if(F===1)throw F=Pd,Rd(m,0),pf(m,C),sc(m,ao()),F;if(F===6)throw Error(t(345));return m.finishedWork=m.current.alternate,m.finishedLanes=C,Kh(m,Cl,Rh),sc(m,ao()),null}function Zm(m,C){var F=gi;gi|=1;try{return m(C)}finally{gi=F,gi===0&&(jf=ao()+500,bd&&AA())}}function Gf(m){ff!==null&&ff.tag===0&&!(gi&6)&&Bp();var C=gi;gi|=1;var F=hs.transition,G=Fr;try{if(hs.transition=null,Fr=1,m)return m()}finally{Fr=G,hs.transition=F,gi=C,!(gi&6)&&AA()}}function z0(){ks=Dl.current,Gs(Dl)}function Rd(m,C){m.finishedWork=null,m.finishedLanes=0;var F=m.timeoutHandle;if(F!==-1&&(m.timeoutHandle=-1,JA(F)),la!==null)for(F=la.return;F!==null;){var G=F;switch(xc(G),G.tag){case 1:G=G.type.childContextTypes,G!=null&&tc();break;case 3:$e(),Gs(yr),Gs(Bs),Bt();break;case 5:ft(G);break;case 4:$e();break;case 13:Gs(lt);break;case 19:Gs(lt);break;case 10:Ca(G.type._context);break;case 22:case 23:z0()}F=F.return}if(Xo=m,la=m=Dd(m.current,null),fa=ks=C,Ro=0,Pd=null,Xc=PA=yl=0,Cl=vl=null,cA!==null){for(C=0;C<cA.length;C++)if(F=cA[C],G=F.interleaved,G!==null){F.interleaved=null;var ae=G.next,ge=F.pending;if(ge!==null){var Je=ge.next;ge.next=ae,G.next=Je}F.pending=G}cA=null}return m}function j0(m,C){do{var F=la;try{if(wu(),kt.current=Ed,_n){for(var G=Tt.memoizedState;G!==null;){var ae=G.queue;ae!==null&&(ae.pending=null),G=G.next}_n=!1}if(zt=0,Zt=tn=Tt=null,bn=!1,vn=0,xa.current=null,F===null||F.return===null){Ro=1,Pd=C,la=null;break}e:{var ge=m,Je=F.return,It=F,Wt=C;if(C=fa,It.flags|=32768,Wt!==null&&typeof Wt=="object"&&typeof Wt.then=="function"){var xn=Wt,Ar=It,mr=Ar.tag;if(!(Ar.mode&1)&&(mr===0||mr===11||mr===15)){var Jn=Ar.alternate;Jn?(Ar.updateQueue=Jn.updateQueue,Ar.memoizedState=Jn.memoizedState,Ar.lanes=Jn.lanes):(Ar.updateQueue=null,Ar.memoizedState=null)}var zr=wp(Je);if(zr!==null){zr.flags&=-257,Od(zr,Je,It,ge,C),zr.mode&1&&Uf(ge,xn,C),C=zr,Wt=xn;var ii=C.updateQueue;if(ii===null){var li=new Set;li.add(Wt),C.updateQueue=li}else ii.add(Wt);break e}else{if(!(C&1)){Uf(ge,xn,C),Jm();break e}Wt=Error(t(426))}}else if(gr&&It.mode&1){var sl=wp(Je);if(sl!==null){!(sl.flags&65536)&&(sl.flags|=256),Od(sl,Je,It,ge,C),Po(oc(Wt,It));break e}}ge=Wt=oc(Wt,It),Ro!==4&&(Ro=2),vl===null?vl=[ge]:vl.push(ge),ge=Je;do{switch(ge.tag){case 3:ge.flags|=65536,C&=-C,ge.lanes|=C;var ln=sh(ge,Wt,C);M(ge,ln);break e;case 1:It=Wt;var Jt=ge.type,cn=ge.stateNode;if(!(ge.flags&128)&&(typeof Jt.getDerivedStateFromError=="function"||cn!==null&&typeof cn.componentDidCatch=="function"&&(hf===null||!hf.has(cn)))){ge.flags|=65536,C&=-C,ge.lanes|=C;var Cr=Lf(ge,It,C);M(ge,Cr);break e}}ge=ge.return}while(ge!==null)}e0(F)}catch(ni){C=ni,la===F&&F!==null&&(la=F=F.return);continue}break}while(!0)}function Xm(){var m=qa.current;return qa.current=Ed,m===null?Ed:m}function Jm(){(Ro===0||Ro===3||Ro===2)&&(Ro=4),Xo===null||!(yl&268435455)&&!(PA&268435455)||pf(Xo,fa)}function Ya(m,C){var F=gi;gi|=2;var G=Xm();(Xo!==m||fa!==C)&&(Rh=null,Rd(m,C));do try{N0();break}catch(ae){j0(m,ae)}while(!0);if(wu(),gi=F,qa.current=G,la!==null)throw Error(t(261));return Xo=null,fa=0,Ro}function N0(){for(;la!==null;)W0(la)}function Gy(){for(;la!==null&&!Aa();)W0(la)}function W0(m){var C=Fh(m.alternate,m,ks);m.memoizedProps=m.pendingProps,C===null?e0(m):la=C,xa.current=null}function e0(m){var C=m;do{var F=C.alternate;if(m=C.return,C.flags&32768){if(F=A(F,C),F!==null){F.flags&=32767,la=F;return}if(m!==null)m.flags|=32768,m.subtreeFlags=0,m.deletions=null;else{Ro=6,la=null;return}}else if(F=Ep(F,C,ks),F!==null){la=F;return}if(C=C.sibling,C!==null){la=C;return}la=C=m}while(C!==null);Ro===0&&(Ro=5)}function Kh(m,C,F){var G=Fr,ae=hs.transition;try{hs.transition=null,Fr=1,Qy(m,C,F,G)}finally{hs.transition=ae,Fr=G}return null}function Qy(m,C,F,G){do Bp();while(ff!==null);if(gi&6)throw Error(t(327));F=m.finishedWork;var ae=m.finishedLanes;if(F===null)return null;if(m.finishedWork=null,m.finishedLanes=0,F===m.current)throw Error(t(177));m.callbackNode=null,m.callbackPriority=0;var ge=F.lanes|F.childLanes;if(iA(m,ge),m===Xo&&(la=Xo=null,fa=0),!(F.subtreeFlags&2064)&&!(F.flags&2064)||Vm||(Vm=!0,Op(Kr,function(){return Bp(),null})),ge=(F.flags&15990)!==0,F.subtreeFlags&15990||ge){ge=hs.transition,hs.transition=null;var Je=Fr;Fr=1;var It=gi;gi|=4,xa.current=null,ke(m,F),Xi(F,m),vp(Nl),Oe=!!XA,Nl=XA=null,m.current=F,Qa(F),Al(),gi=It,Fr=Je,hs.transition=ge}else m.current=F;if(Vm&&(Vm=!1,ff=m,RA=ae),ge=m.pendingLanes,ge===0&&(hf=null),wt(F.stateNode),sc(m,ao()),C!==null)for(G=m.onRecoverableError,F=0;F<C.length;F++)ae=C[F],G(ae.value,{componentStack:ae.stack,digest:ae.digest});if(df)throw df=!1,m=$m,$m=null,m;return RA&1&&m.tag!==0&&Bp(),ge=m.pendingLanes,ge&1?m===L0?hm++:(hm=0,L0=m):hm=0,AA(),null}function Bp(){if(ff!==null){var m=Ei(RA),C=hs.transition,F=Fr;try{if(hs.transition=null,Fr=16>m?16:m,ff===null)var G=!1;else{if(m=ff,ff=null,RA=0,gi&6)throw Error(t(331));var ae=gi;for(gi|=4,D=m.current;D!==null;){var ge=D,Je=ge.child;if(D.flags&16){var It=ge.deletions;if(It!==null){for(var Wt=0;Wt<It.length;Wt++){var xn=It[Wt];for(D=xn;D!==null;){var Ar=D;switch(Ar.tag){case 0:case 11:case 15:ze(8,Ar,ge)}var mr=Ar.child;if(mr!==null)mr.return=Ar,D=mr;else for(;D!==null;){Ar=D;var Jn=Ar.sibling,zr=Ar.return;if(Xt(Ar),Ar===xn){D=null;break}if(Jn!==null){Jn.return=zr,D=Jn;break}D=zr}}}var ii=ge.alternate;if(ii!==null){var li=ii.child;if(li!==null){ii.child=null;do{var sl=li.sibling;li.sibling=null,li=sl}while(li!==null)}}D=ge}}if(ge.subtreeFlags&2064&&Je!==null)Je.return=ge,D=Je;else e:for(;D!==null;){if(ge=D,ge.flags&2048)switch(ge.tag){case 0:case 11:case 15:ze(9,ge,ge.return)}var ln=ge.sibling;if(ln!==null){ln.return=ge.return,D=ln;break e}D=ge.return}}var Jt=m.current;for(D=Jt;D!==null;){Je=D;var cn=Je.child;if(Je.subtreeFlags&2064&&cn!==null)cn.return=Je,D=cn;else e:for(Je=Jt;D!==null;){if(It=D,It.flags&2048)try{switch(It.tag){case 0:case 11:case 15:mt(9,It)}}catch(ni){ol(It,It.return,ni)}if(It===Je){D=null;break e}var Cr=It.sibling;if(Cr!==null){Cr.return=It.return,D=Cr;break e}D=It.return}}if(gi=ae,AA(),qe&&typeof qe.onPostCommitFiberRoot=="function")try{qe.onPostCommitFiberRoot(ia,m)}catch{}G=!0}return G}finally{Fr=F,hs.transition=C}}return!1}function t0(m,C,F){C=oc(F,C),C=sh(m,C,1),m=c(m,C,1),C=dA(),m!==null&&(ca(m,1,C),sc(m,C))}function ol(m,C,F){if(m.tag===3)t0(m,m,F);else for(;C!==null;){if(C.tag===3){t0(C,m,F);break}else if(C.tag===1){var G=C.stateNode;if(typeof C.type.getDerivedStateFromError=="function"||typeof G.componentDidCatch=="function"&&(hf===null||!hf.has(G))){m=oc(F,m),m=Lf(C,m,1),C=c(C,m,1),m=dA(),C!==null&&(ca(C,1,m),sc(C,m));break}}C=C.return}}function qg(m,C,F){var G=m.pingCache;G!==null&&G.delete(C),C=dA(),m.pingedLanes|=m.suspendedLanes&F,Xo===m&&(fa&F)===F&&(Ro===4||Ro===3&&(fa&130023424)===fa&&500>ao()-cf?Rd(m,0):Xc|=F),sc(m,C)}function hA(m,C){C===0&&(m.mode&1?(C=ho,ho<<=1,!(ho&130023424)&&(ho=4194304)):C=1);var F=dA();m=Yu(m,C),m!==null&&(ca(m,C,F),sc(m,F))}function G0(m){var C=m.memoizedState,F=0;C!==null&&(F=C.retryLane),hA(m,F)}function Yg(m,C){var F=0;switch(m.tag){case 13:var G=m.stateNode,ae=m.memoizedState;ae!==null&&(F=ae.retryLane);break;case 19:G=m.stateNode;break;default:throw Error(t(314))}G!==null&&G.delete(C),hA(m,F)}var Fh;Fh=function(m,C,F){if(m!==null)if(m.memoizedProps!==C.pendingProps||yr.current)ql=!0;else{if(!(m.lanes&F)&&!(C.flags&128))return ql=!1,Ym(m,C,F);ql=!!(m.flags&131072)}else ql=!1,gr&&C.flags&1048576&&nh(C,_u,C.index);switch(C.lanes=0,C.tag){case 2:var G=C.type;Sp(m,C),m=C.pendingProps;var ae=Vc(C,Bs.current);au(C,F),ae=Tr(null,C,G,m,ae,F);var ge=Bi();return C.flags|=1,typeof ae=="object"&&ae!==null&&typeof ae.render=="function"&&ae.$$typeof===void 0?(C.tag=1,C.memoizedState=null,C.updateQueue=null,Ia(G)?(ge=!0,Mi(C)):ge=!1,C.memoizedState=ae.state!==null&&ae.state!==void 0?ae.state:null,wd(C),ae.updater=kh,C.stateNode=ae,ae._reactInternals=C,um(C,G,m,F),C=Ph(null,C,G,!0,ge,F)):(C.tag=0,gr&&ge&&SA(C),Rl(null,C,ae,F),C=C.child),C;case 16:G=C.elementType;e:{switch(Sp(m,C),m=C.pendingProps,ae=G._init,G=ae(G._payload),C.type=G,ae=C.tag=n0(G),m=Ga(G,m),ae){case 0:C=Id(null,C,G,m,F);break e;case 1:C=TA(null,C,G,m,F);break e;case 11:C=Am(null,C,G,m,F);break e;case 14:C=zf(null,C,G,Ga(G.type,m),F);break e}throw Error(t(306,G,""))}return C;case 0:return G=C.type,ae=C.pendingProps,ae=C.elementType===G?ae:Ga(G,ae),Id(m,C,G,ae,F);case 1:return G=C.type,ae=C.pendingProps,ae=C.elementType===G?ae:Ga(G,ae),TA(m,C,G,ae,F);case 3:e:{if(Mp(C),m===null)throw Error(t(387));G=C.pendingProps,ge=C.memoizedState,ae=ge.element,T(m,C),R(C,G,null,F);var Je=C.memoizedState;if(G=Je.element,ge.isDehydrated)if(ge={element:G,isDehydrated:!1,cache:Je.cache,pendingSuspenseBoundaries:Je.pendingSuspenseBoundaries,transitions:Je.transitions},C.updateQueue.baseState=ge,C.memoizedState=ge,C.flags&256){ae=oc(Error(t(423)),C),C=Oc(m,C,G,F,ae);break e}else if(G!==ae){ae=oc(Error(t(424)),C),C=Oc(m,C,G,F,ae);break e}else for(da=ec(C.stateNode.containerInfo.firstChild),gs=C,gr=!0,Hr=null,F=wc(C,null,G,F),C.child=F;F;)F.flags=F.flags&-3|4096,F=F.sibling;else{if(xu(),G===ae){C=Su(m,C,F);break e}Rl(m,C,G,F)}C=C.child}return C;case 5:return Ze(C),m===null&&bs(C),G=C.type,ae=C.pendingProps,ge=m!==null?m.memoizedProps:null,Je=ae.children,xA(G,ae)?Je=null:ge!==null&&xA(G,ge)&&(C.flags|=32),af(m,C),Rl(m,C,Je,F),C.child;case 6:return m===null&&bs(C),null;case 13:return ah(m,C,F);case 4:return Re(C,C.stateNode.containerInfo),G=C.pendingProps,m===null?C.child=Qs(C,null,G,F):Rl(m,C,G,F),C.child;case 11:return G=C.type,ae=C.pendingProps,ae=C.elementType===G?ae:Ga(G,ae),Am(m,C,G,ae,F);case 7:return Rl(m,C,C.pendingProps,F),C.child;case 8:return Rl(m,C,C.pendingProps.children,F),C.child;case 12:return Rl(m,C,C.pendingProps.children,F),C.child;case 10:e:{if(G=C.type._context,ae=C.pendingProps,ge=C.memoizedProps,Je=ae.value,_s(Gl,G._currentValue),G._currentValue=Je,ge!==null)if(an(ge.value,Je)){if(ge.children===ae.children&&!yr.current){C=Su(m,C,F);break e}}else for(ge=C.child,ge!==null&&(ge.return=C);ge!==null;){var It=ge.dependencies;if(It!==null){Je=ge.child;for(var Wt=It.firstContext;Wt!==null;){if(Wt.context===G){if(ge.tag===1){Wt=l(-1,F&-F),Wt.tag=2;var xn=ge.updateQueue;if(xn!==null){xn=xn.shared;var Ar=xn.pending;Ar===null?Wt.next=Wt:(Wt.next=Ar.next,Ar.next=Wt),xn.pending=Wt}}ge.lanes|=F,Wt=ge.alternate,Wt!==null&&(Wt.lanes|=F),Xs(ge.return,F,C),It.lanes|=F;break}Wt=Wt.next}}else if(ge.tag===10)Je=ge.type===C.type?null:ge.child;else if(ge.tag===18){if(Je=ge.return,Je===null)throw Error(t(341));Je.lanes|=F,It=Je.alternate,It!==null&&(It.lanes|=F),Xs(Je,F,C),Je=ge.sibling}else Je=ge.child;if(Je!==null)Je.return=ge;else for(Je=ge;Je!==null;){if(Je===C){Je=null;break}if(ge=Je.sibling,ge!==null){ge.return=Je.return,Je=ge;break}Je=Je.return}ge=Je}Rl(m,C,ae.children,F),C=C.child}return C;case 9:return ae=C.type,G=C.pendingProps.children,au(C,F),ae=lu(ae),G=G(ae),C.flags|=1,Rl(m,C,G,F),C.child;case 14:return G=C.type,ae=Ga(G,C.pendingProps),ae=Ga(G.type,ae),zf(m,C,G,ae,F);case 15:return Io(m,C,C.type,C.pendingProps,F);case 17:return G=C.type,ae=C.pendingProps,ae=C.elementType===G?ae:Ga(G,ae),Sp(m,C),C.tag=1,Ia(G)?(m=!0,Mi(C)):m=!1,au(C,F),oh(C,G,ae),um(C,G,ae,F),Ph(null,C,G,!0,m,F);case 19:return Td(m,C,F);case 22:return Hu(m,C,F)}throw Error(t(156,C.tag))};function Op(m,C){return Ea(m,C)}function pm(m,C,F,G){this.tag=m,this.key=F,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=C,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=G,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zu(m,C,F,G){return new pm(m,C,F,G)}function Qf(m){return m=m.prototype,!(!m||!m.isReactComponent)}function n0(m){if(typeof m=="function")return Qf(m)?1:0;if(m!=null){if(m=m.$$typeof,m===fe)return 11;if(m===me)return 14}return 2}function Dd(m,C){var F=m.alternate;return F===null?(F=Zu(m.tag,C,m.key,m.mode),F.elementType=m.elementType,F.type=m.type,F.stateNode=m.stateNode,F.alternate=m,m.alternate=F):(F.pendingProps=C,F.type=m.type,F.flags=0,F.subtreeFlags=0,F.deletions=null),F.flags=m.flags&14680064,F.childLanes=m.childLanes,F.lanes=m.lanes,F.child=m.child,F.memoizedProps=m.memoizedProps,F.memoizedState=m.memoizedState,F.updateQueue=m.updateQueue,C=m.dependencies,F.dependencies=C===null?null:{lanes:C.lanes,firstContext:C.firstContext},F.sibling=m.sibling,F.index=m.index,F.ref=m.ref,F}function r0(m,C,F,G,ae,ge){var Je=2;if(G=m,typeof m=="function")Qf(m)&&(Je=1);else if(typeof m=="string")Je=5;else e:switch(m){case N:return mf(F.children,ae,ge,C);case ie:Je=8,ae|=8;break;case he:return m=Zu(12,F,C,ae|2),m.elementType=he,m.lanes=ge,m;case xe:return m=Zu(13,F,C,ae),m.elementType=xe,m.lanes=ge,m;case De:return m=Zu(19,F,C,ae),m.elementType=De,m.lanes=ge,m;case Qe:return mm(F,ae,ge,C);default:if(typeof m=="object"&&m!==null)switch(m.$$typeof){case de:Je=10;break e;case Me:Je=9;break e;case fe:Je=11;break e;case me:Je=14;break e;case at:Je=16,G=null;break e}throw Error(t(130,m==null?m:typeof m,""))}return C=Zu(Je,F,C,ae),C.elementType=m,C.type=G,C.lanes=ge,C}function mf(m,C,F,G){return m=Zu(7,m,G,C),m.lanes=F,m}function mm(m,C,F,G){return m=Zu(22,m,G,C),m.elementType=Qe,m.lanes=F,m.stateNode={isHidden:!1},m}function Q0(m,C,F){return m=Zu(6,m,null,C),m.lanes=F,m}function i0(m,C,F){return C=Zu(4,m.children!==null?m.children:[],m.key,C),C.lanes=F,C.stateNode={containerInfo:m.containerInfo,pendingChildren:null,implementation:m.implementation},C}function $g(m,C,F,G,ae){this.tag=C,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=G,this.onRecoverableError=ae,this.mutableSourceEagerHydrationData=null}function gm(m,C,F,G,ae,ge,Je,It,Wt){return m=new $g(m,C,F,It,Wt),C===1?(C=1,ge===!0&&(C|=8)):C=0,ge=Zu(3,null,null,C),m.current=ge,ge.stateNode=m,ge.memoizedState={element:G,isDehydrated:F,cache:null,transitions:null,pendingSuspenseBoundaries:null},wd(ge),m}function q0(m,C,F){var G=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:G==null?null:""+G,children:m,containerInfo:C,implementation:F}}function Vg(m){if(!m)return uA;m=m._reactInternals;e:{if(qi(m)!==m||m.tag!==1)throw Error(t(170));var C=m;do{switch(C.tag){case 3:C=C.stateNode.context;break e;case 1:if(Ia(C.type)){C=C.stateNode.__reactInternalMemoizedMergedChildContext;break e}}C=C.return}while(C!==null);throw Error(t(171))}if(m.tag===1){var F=m.type;if(Ia(F))return Cd(m,F,C)}return C}function Hg(m,C,F,G,ae,ge,Je,It,Wt){return m=gm(F,G,!0,m,ae,ge,Je,It,Wt),m.context=Vg(null),F=m.current,G=dA(),ae=Dh(F),ge=l(G,ae),ge.callback=C??null,c(F,ge,ae),m.current.lanes=ae,ca(m,ae,G),sc(m,G),m}function ym(m,C,F,G){var ae=C.current,ge=dA(),Je=Dh(ae);return F=Vg(F),C.context===null?C.context=F:C.pendingContext=F,C=l(ge,Je),C.payload={element:m},G=G===void 0?null:G,G!==null&&(C.callback=G),m=c(ae,C,Je),m!==null&&(Jc(m,ae,Je,ge),_(m,ae,Je)),Je}function vm(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 Ip(m,C){if(m=m.memoizedState,m!==null&&m.dehydrated!==null){var F=m.retryLane;m.retryLane=F!==0&&F<C?F:C}}function ed(m,C){Ip(m,C),(m=m.alternate)&&Ip(m,C)}var Lh=typeof reportError=="function"?reportError:function(m){console.error(m)};function o0(m){this._internalRoot=m}qf.prototype.render=o0.prototype.render=function(m){var C=this._internalRoot;if(C===null)throw Error(t(409));ym(m,C,null,null)},qf.prototype.unmount=o0.prototype.unmount=function(){var m=this._internalRoot;if(m!==null){this._internalRoot=null;var C=m.containerInfo;Gf(function(){ym(null,m,null,null)}),C[Cu]=null}};function qf(m){this._internalRoot=m}qf.prototype.unstable_scheduleHydration=function(m){if(m){var C=Ws();m={blockedOn:null,target:m,priority:C};for(var F=0;F<Ds.length&&C!==0&&C<Ds[F].priority;F++);Ds.splice(F,0,m),F===0&&Ui(m)}};function s0(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)}function a0(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11&&(m.nodeType!==8||m.nodeValue!==" react-mount-point-unstable "))}function Cm(){}function Y0(m,C,F,G,ae){if(ae){if(typeof G=="function"){var ge=G;G=function(){var xn=vm(Je);ge.call(xn)}}var Je=Hg(C,G,m,0,null,!1,!1,"",Cm);return m._reactRootContainer=Je,m[Cu]=Je.current,Lu(m.nodeType===8?m.parentNode:m),Gf(),Je}for(;ae=m.lastChild;)m.removeChild(ae);if(typeof G=="function"){var It=G;G=function(){var xn=vm(Wt);It.call(xn)}}var Wt=gm(m,0,!1,null,null,!1,!1,"",Cm);return m._reactRootContainer=Wt,m[Cu]=Wt.current,Lu(m.nodeType===8?m.parentNode:m),Gf(function(){ym(C,Wt,F,G)}),Wt}function l0(m,C,F,G,ae){var ge=F._reactRootContainer;if(ge){var Je=ge;if(typeof ae=="function"){var It=ae;ae=function(){var Wt=vm(Je);It.call(Wt)}}ym(C,Je,m,ae)}else Je=Y0(F,C,m,ae,G);return vm(Je)}Ja=function(m){switch(m.tag){case 3:var C=m.stateNode;if(C.current.memoizedState.isDehydrated){var F=Cs(C.pendingLanes);F!==0&&(ls(C,F|1),sc(C,ao()),!(gi&6)&&(jf=ao()+500,AA()))}break;case 13:Gf(function(){var G=Yu(m,1);if(G!==null){var ae=dA();Jc(G,m,1,ae)}}),ed(m,1)}},Rs=function(m){if(m.tag===13){var C=Yu(m,134217728);if(C!==null){var F=dA();Jc(C,m,134217728,F)}ed(m,134217728)}},So=function(m){if(m.tag===13){var C=Dh(m),F=Yu(m,C);if(F!==null){var G=dA();Jc(F,m,C,G)}ed(m,C)}},Ws=function(){return Fr},hu=function(m,C){var F=Fr;try{return Fr=m,C()}finally{Fr=F}},Ye=function(m,C,F){switch(C){case"input":if(mn(m,F),C=F.name,F.type==="radio"&&C!=null){for(F=m;F.parentNode;)F=F.parentNode;for(F=F.querySelectorAll("input[name="+JSON.stringify(""+C)+'][type="radio"]'),C=0;C<F.length;C++){var G=F[C];if(G!==m&&G.form===m.form){var ae=Es(G);if(!ae)throw Error(t(90));_t(G),mn(G,ae)}}}break;case"textarea":wr(m,F);break;case"select":C=F.value,C!=null&&Dn(m,!!F.multiple,C,!1)}},jt=Zm,xt=Gf;var kp={usingClientEntryPoint:!1,Events:[Di,$r,Es,Gt,$t,Zm]},Yf={findFiberByHostInstance:Bo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Tp={bundleType:Yf.bundleType,version:Yf.version,rendererPackageName:Yf.rendererPackageName,rendererConfig:Yf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(m){return m=Ti(m),m===null?null:m.stateNode},findFiberByHostInstance:Yf.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 _m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_m.isDisabled&&_m.supportsFiber)try{ia=_m.inject(Tp),qe=_m}catch{}}return dh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=kp,dh.createPortal=function(m,C){var F=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s0(C))throw Error(t(200));return q0(m,C,null,F)},dh.createRoot=function(m,C){if(!s0(m))throw Error(t(299));var F=!1,G="",ae=Lh;return C!=null&&(C.unstable_strictMode===!0&&(F=!0),C.identifierPrefix!==void 0&&(G=C.identifierPrefix),C.onRecoverableError!==void 0&&(ae=C.onRecoverableError)),C=gm(m,1,!1,null,null,F,!1,G,ae),m[Cu]=C.current,Lu(m.nodeType===8?m.parentNode:m),new o0(C)},dh.findDOMNode=function(m){if(m==null)return null;if(m.nodeType===1)return m;var C=m._reactInternals;if(C===void 0)throw typeof m.render=="function"?Error(t(188)):(m=Object.keys(m).join(","),Error(t(268,m)));return m=Ti(C),m=m===null?null:m.stateNode,m},dh.flushSync=function(m){return Gf(m)},dh.hydrate=function(m,C,F){if(!a0(C))throw Error(t(200));return l0(null,m,C,!0,F)},dh.hydrateRoot=function(m,C,F){if(!s0(m))throw Error(t(405));var G=F!=null&&F.hydratedSources||null,ae=!1,ge="",Je=Lh;if(F!=null&&(F.unstable_strictMode===!0&&(ae=!0),F.identifierPrefix!==void 0&&(ge=F.identifierPrefix),F.onRecoverableError!==void 0&&(Je=F.onRecoverableError)),C=Hg(C,null,m,1,F??null,ae,!1,ge,Je),m[Cu]=C.current,Lu(m),G)for(m=0;m<G.length;m++)F=G[m],ae=F._getVersion,ae=ae(F._source),C.mutableSourceEagerHydrationData==null?C.mutableSourceEagerHydrationData=[F,ae]:C.mutableSourceEagerHydrationData.push(F,ae);return new qf(C)},dh.render=function(m,C,F){if(!a0(C))throw Error(t(200));return l0(null,m,C,!1,F)},dh.unmountComponentAtNode=function(m){if(!a0(m))throw Error(t(40));return m._reactRootContainer?(Gf(function(){l0(null,null,m,!1,function(){m._reactRootContainer=null,m[Cu]=null})}),!0):!1},dh.unstable_batchedUpdates=Zm,dh.unstable_renderSubtreeIntoContainer=function(m,C,F,G){if(!a0(F))throw Error(t(200));if(m==null||m._reactInternals===void 0)throw Error(t(38));return l0(m,C,F,!1,G)},dh.version="18.3.1-next-f1338f8080-20240426",dh}var lI;function kC(){if(lI)return P3.exports;lI=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),P3.exports=XG(),P3.exports}var uI;function JG(){if(uI)return O_;uI=1;var n=kC();return O_.createRoot=n.createRoot,O_.hydrateRoot=n.hydrateRoot,O_}var eQ=JG();const tQ="modulepreload",nQ=function(n){return"/maputnik/"+n},AI={},tv=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(t.map(d=>{if(d=nQ(d),d in AI)return;AI[d]=!0;const g=d.endsWith(".css"),b=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${b}`))return;const E=document.createElement("link");if(E.rel=g?"stylesheet":tQ,g||(E.as="script"),E.crossOrigin="",E.href=d,o&&E.setAttribute("nonce",o),document.head.appendChild(E),g)return new Promise((S,O)=>{E.addEventListener("load",S),E.addEventListener("error",()=>O(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})},rQ=(n,e,t)=>{const r=n[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((i,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},wo=n=>typeof n=="string",nv=()=>{let n,e;const t=new Promise((r,i)=>{n=r,e=i});return t.resolve=n,t.reject=e,t},cI=n=>n==null?"":""+n,iQ=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},oQ=/###/g,dI=n=>n&&n.indexOf("###")>-1?n.replace(oQ,"."):n,hI=n=>!n||wo(n),Lv=(n,e,t)=>{const r=wo(e)?e.split("."):e;let i=0;for(;i<r.length-1;){if(hI(n))return{};const s=dI(r[i]);!n[s]&&t&&(n[s]=new t),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={},++i}return hI(n)?{}:{obj:n,k:dI(r[i])}},fI=(n,e,t)=>{const{obj:r,k:i}=Lv(n,e,Object);if(r!==void 0||e.length===1){r[i]=t;return}let s=e[e.length-1],a=e.slice(0,e.length-1),o=Lv(n,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=Lv(n,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${s}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=t},sQ=(n,e,t,r)=>{const{obj:i,k:s}=Lv(n,e,Object);i[s]=i[s]||[],i[s].push(t)},Fb=(n,e)=>{const{obj:t,k:r}=Lv(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},aQ=(n,e,t)=>{const r=Fb(n,t);return r!==void 0?r:Fb(e,t)},zF=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?wo(n[r])||n[r]instanceof String||wo(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):zF(n[r],e[r],t):n[r]=e[r]);return n},r1=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var lQ={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const uQ=n=>wo(n)?n.replace(/[&<>"'\/]/g,e=>lQ[e]):n;class AQ{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const cQ=[" ",",","?","!",";"],dQ=new AQ(20),hQ=(n,e,t)=>{e=e||"",t=t||"";const r=cQ.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(r.length===0)return!0;const i=dQ.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(n);if(!s){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(s=!0)}return s},XE=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let i=n;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let d=s;d<r.length;++d)if(d!==s&&(o+=t),o+=r[d],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&d<r.length-1)continue;s+=d-s+1;break}i=a}return i},Lb=n=>n==null?void 0:n.replace("_","-"),fQ={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class Ub{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||fQ,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,i){return i&&!this.debug?null:(wo(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ub(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ub(this.logger,e)}}var Qp=new Ub;class $2{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(t)||0;this.observers[r].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,d]=a;for(let g=0;g<d;g++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,d]=a;for(let g=0;g<d;g++)o.apply(o,[e,...r])})}}class pI extends $2{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){var g,b;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],r&&(Array.isArray(r)?o.push(...r):wo(r)&&s?o.push(...r.split(s)):o.push(r)));const d=Fb(this.data,o);return!d&&!t&&!r&&e.indexOf(".")>-1&&(e=o[0],t=o[1],r=o.slice(2).join(".")),d||!a||!wo(r)?d:XE((b=(g=this.data)==null?void 0:g[e])==null?void 0:b[t],r,s)}addResource(e,t,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,t];r&&(o=o.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),fI(this.data,o,i),s.silent||this.emit("added",e,t,r,i)}addResources(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(wo(r[s])||Array.isArray(r[s]))&&this.addResource(e,t,s,r[s],{silent:!0});i.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=r,r=t,t=o[1]),this.addNamespaces(t);let d=Fb(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?zF(d,r,s):d={...d,...r},fI(this.data,o,d),a.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var jF={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,i){return n.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,t,r,i))??e}),e}};const mI={};class zb extends $2{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),iQ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Qp.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!hQ(e,r,i);if(a&&!o){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:wo(s)?[s]:s};const g=e.split(r);(r!==i||r===i&&this.options.ns.indexOf(g[0])>-1)&&(s=g.shift()),e=g.join(i)}return{key:e,namespaces:wo(s)?[s]:s}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),d=o[o.length-1],g=t.lng||this.language,b=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode"){if(b){const X=t.nsSeparator||this.options.nsSeparator;return i?{res:`${d}${X}${a}`,usedKey:a,exactUsedKey:a,usedLng:g,usedNS:d,usedParams:this.getUsedParamsDetails(t)}:`${d}${X}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:g,usedNS:d,usedParams:this.getUsedParamsDetails(t)}:a}const E=this.resolve(e,t);let S=E==null?void 0:E.res;const O=(E==null?void 0:E.usedKey)||a,k=(E==null?void 0:E.exactUsedKey)||a,U=Object.prototype.toString.apply(S),z=["[object Number]","[object Function]","[object RegExp]"],q=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,Q=!this.i18nFormat||this.i18nFormat.handleAsObject,re=!wo(S)&&typeof S!="boolean"&&typeof S!="number";if(Q&&S&&re&&z.indexOf(U)<0&&!(wo(q)&&Array.isArray(S))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,S,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(E.res=X,E.usedParams=this.getUsedParamsDetails(t),E):X}if(s){const X=Array.isArray(S),Y=X?[]:{},ee=X?k:O;for(const N in S)if(Object.prototype.hasOwnProperty.call(S,N)){const ie=`${ee}${s}${N}`;Y[N]=this.translate(ie,{...t,joinArrays:!1,ns:o}),Y[N]===ie&&(Y[N]=S[N])}S=Y}}else if(Q&&wo(q)&&Array.isArray(S))S=S.join(q),S&&(S=this.extendTranslation(S,e,t,r));else{let X=!1,Y=!1;const ee=t.count!==void 0&&!wo(t.count),N=zb.hasDefaultValue(t),ie=ee?this.pluralResolver.getSuffix(g,t.count,t):"",he=t.ordinal&&ee?this.pluralResolver.getSuffix(g,t.count,{ordinal:!1}):"",de=ee&&!t.ordinal&&t.count===0,Me=de&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${ie}`]||t[`defaultValue${he}`]||t.defaultValue;!this.isValidLookup(S)&&N&&(X=!0,S=Me),this.isValidLookup(S)||(Y=!0,S=a);const xe=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Y?void 0:S,De=N&&Me!==S&&this.options.updateMissing;if(Y||X||De){if(this.logger.log(De?"updateKey":"missingKey",g,d,a,De?Me:S),s){const He=this.resolve(a,{...t,keySeparator:!1});He&&He.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 me=[];const at=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&at&&at[0])for(let He=0;He<at.length;He++)me.push(at[He]);else this.options.saveMissingTo==="all"?me=this.languageUtils.toResolveHierarchy(t.lng||this.language):me.push(t.lng||this.language);const Qe=(He,We,Ce)=>{var rt;const Te=N&&Ce!==S?Ce:xe;this.options.missingKeyHandler?this.options.missingKeyHandler(He,d,We,Te,De,t):(rt=this.backendConnector)!=null&&rt.saveMissing&&this.backendConnector.saveMissing(He,d,We,Te,De,t),this.emit("missingKey",He,d,We,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ee?me.forEach(He=>{const We=this.pluralResolver.getSuffixes(He,t);de&&t[`defaultValue${this.options.pluralSeparator}zero`]&&We.indexOf(`${this.options.pluralSeparator}zero`)<0&&We.push(`${this.options.pluralSeparator}zero`),We.forEach(Ce=>{Qe([He],a+Ce,t[`defaultValue${Ce}`]||Me)})}):Qe(me,a,Me))}S=this.extendTranslation(S,e,t,E,r),Y&&S===a&&this.options.appendNamespaceToMissingKey&&(S=`${d}:${a}`),(Y||X)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${a}`:a,X?S:void 0))}return i?(E.res=S,E.usedParams=this.getUsedParamsDetails(t),E):S}extendTranslation(e,t,r,i,s){var g,b;var a=this;if((g=this.i18nFormat)!=null&&g.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const E=wo(e)&&(((b=r==null?void 0:r.interpolation)==null?void 0:b.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let S;if(E){const k=e.match(this.interpolator.nestingRegexp);S=k&&k.length}let O=r.replace&&!wo(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(O={...this.options.interpolation.defaultVariables,...O}),e=this.interpolator.interpolate(e,O,r.lng||this.language||i.usedLng,r),E){const k=e.match(this.interpolator.nestingRegexp),U=k&&k.length;S<U&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var k=arguments.length,U=new Array(k),z=0;z<k;z++)U[z]=arguments[z];return(s==null?void 0:s[0])===U[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${U[0]} in key: ${t[0]}`),null):a.translate(...U,t)},r)),r.interpolation&&this.interpolator.reset()}const o=r.postProcess||this.options.postProcess,d=wo(o)?[o]:o;return e!=null&&(d!=null&&d.length)&&r.applyPostProcessor!==!1&&(e=jF.handle(d,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,a,o;return wo(e)&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(d,t),b=g.key;i=b;let E=g.namespaces;this.options.fallbackNS&&(E=E.concat(this.options.fallbackNS));const S=t.count!==void 0&&!wo(t.count),O=S&&!t.ordinal&&t.count===0,k=t.context!==void 0&&(wo(t.context)||typeof t.context=="number")&&t.context!=="",U=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);E.forEach(z=>{var q,Q;this.isValidLookup(r)||(o=z,!mI[`${U[0]}-${z}`]&&((q=this.utils)!=null&&q.hasLoadedNamespace)&&!((Q=this.utils)!=null&&Q.hasLoadedNamespace(o))&&(mI[`${U[0]}-${z}`]=!0,this.logger.warn(`key "${i}" for languages "${U.join(", ")}" won't get resolved as namespace "${o}" 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(re=>{var ee;if(this.isValidLookup(r))return;a=re;const X=[b];if((ee=this.i18nFormat)!=null&&ee.addLookupKeys)this.i18nFormat.addLookupKeys(X,b,re,z,t);else{let N;S&&(N=this.pluralResolver.getSuffix(re,t.count,t));const ie=`${this.options.pluralSeparator}zero`,he=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(X.push(b+N),t.ordinal&&N.indexOf(he)===0&&X.push(b+N.replace(he,this.options.pluralSeparator)),O&&X.push(b+ie)),k){const de=`${b}${this.options.contextSeparator}${t.context}`;X.push(de),S&&(X.push(de+N),t.ordinal&&N.indexOf(he)===0&&X.push(de+N.replace(he,this.options.pluralSeparator)),O&&X.push(de+ie))}}let Y;for(;Y=X.pop();)this.isValidLookup(r)||(s=Y,r=this.getResource(re,z,Y,t))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,t,r,i):this.resourceStore.getResource(e,t,r,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!wo(e.replace);let i=r?e.replace:e;if(r&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class gI{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qp.create("languageUtils")}getScriptPartFromCode(e){if(e=Lb(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Lb(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(wo(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),wo(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return wo(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):wo(e)&&s(this.formatLanguageCode(e)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const yI={zero:0,one:1,two:2,few:3,many:4,other:5},vI={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class pQ{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Qp.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Lb(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vI;if(!e.match(/-|_/))return vI;const d=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(d,t)}return this.pluralRulesCache[s]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>yI[i]-yI[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const CI=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=aQ(n,e,t);return!s&&i&&wo(t)&&(s=XE(n,t,r),s===void 0&&(s=XE(e,t,r))),s},K3=n=>n.replace(/\$/g,"$$$$");class mQ{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qp.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:d,formatSeparator:g,unescapeSuffix:b,unescapePrefix:E,nestingPrefix:S,nestingPrefixEscaped:O,nestingSuffix:k,nestingSuffixEscaped:U,nestingOptionsSeparator:z,maxReplaces:q,alwaysFormat:Q}=e.interpolation;this.escape=t!==void 0?t:uQ,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?r1(s):a||"{{",this.suffix=o?r1(o):d||"}}",this.formatSeparator=g||",",this.unescapePrefix=b?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=S?r1(S):O||r1("$t("),this.nestingSuffix=k?r1(k):U||r1(")"),this.nestingOptionsSeparator=z||",",this.maxReplaces=q||1e3,this.alwaysFormat=Q!==void 0?Q:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,i){var O;let s,a,o;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=k=>{if(k.indexOf(this.formatSeparator)<0){const Q=CI(t,d,k,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Q,void 0,r,{...i,...t,interpolationkey:k}):Q}const U=k.split(this.formatSeparator),z=U.shift().trim(),q=U.join(this.formatSeparator).trim();return this.format(CI(t,d,z,this.options.keySeparator,this.options.ignoreJSONStructure),q,r,{...i,...t,interpolationkey:z})};this.resetRegExp();const b=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,E=((O=i==null?void 0:i.interpolation)==null?void 0:O.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:k=>K3(k)},{regex:this.regexp,safeValue:k=>this.escapeValue?K3(this.escape(k)):K3(k)}].forEach(k=>{for(o=0;s=k.regex.exec(e);){const U=s[1].trim();if(a=g(U),a===void 0)if(typeof b=="function"){const q=b(e,s,i);a=wo(q)?q:""}else if(i&&Object.prototype.hasOwnProperty.call(i,U))a="";else if(E){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${U} for interpolating ${e}`),a="";else!wo(a)&&!this.useRawValueToEscape&&(a=cI(a));const z=k.safeValue(a);if(e=e.replace(s[0],z),E?(k.regex.lastIndex+=a.length,k.regex.lastIndex-=s[0].length):k.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const o=(d,g)=>{const b=this.nestingOptionsSeparator;if(d.indexOf(b)<0)return d;const E=d.split(new RegExp(`${b}[ ]*{`));let S=`{${E[1]}`;d=E[0],S=this.interpolate(S,a);const O=S.match(/'/g),k=S.match(/"/g);(((O==null?void 0:O.length)??0)%2===0&&!k||k.length%2!==0)&&(S=S.replace(/'/g,'"'));try{a=JSON.parse(S),g&&(a={...g,...a})}catch(U){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,U),`${d}${b}${S}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,d};for(;i=this.nestingRegexp.exec(e);){let d=[];a={...r},a=a.replace&&!wo(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let g=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(E=>E.trim());i[1]=b.shift(),d=b,g=!0}if(s=t(o.call(this,i[1].trim(),a),a),s&&i[0]===e&&!wo(s))return s;wo(s)||(s=cI(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),g&&(s=d.reduce((b,E)=>this.format(b,E,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const gQ=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...d]=a.split(":"),g=d.join(":").trim().replace(/^'+|'+$/g,""),b=o.trim();t[b]||(t[b]=g),g==="false"&&(t[b]=!1),g==="true"&&(t[b]=!0),isNaN(g)||(t[b]=parseInt(g,10))}})}return{formatName:e,formatOptions:t}},i1=n=>{const e={};return(t,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=r+JSON.stringify(s);let o=e[a];return o||(o=n(Lb(r),i),e[a]=o),o(t)}};class yQ{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Qp.create("formatter"),this.options=e,this.formats={number:i1((t,r)=>{const i=new Intl.NumberFormat(t,{...r});return s=>i.format(s)}),currency:i1((t,r)=>{const i=new Intl.NumberFormat(t,{...r,style:"currency"});return s=>i.format(s)}),datetime:i1((t,r)=>{const i=new Intl.DateTimeFormat(t,{...r});return s=>i.format(s)}),relativetime:i1((t,r)=>{const i=new Intl.RelativeTimeFormat(t,{...r});return s=>i.format(s,r.range||"day")}),list:i1((t,r)=>{const i=new Intl.ListFormat(t,{...r});return s=>i.format(s)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=i1(t)}format(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){const o=s.findIndex(d=>d.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,d)=>{var E;const{formatName:g,formatOptions:b}=gQ(d);if(this.formats[g]){let S=o;try{const O=((E=i==null?void 0:i.formatParams)==null?void 0:E[i.interpolationkey])||{},k=O.locale||O.lng||i.locale||i.lng||r;S=this.formats[g](o,k,{...b,...i,...O})}catch(O){this.logger.warn(O)}return S}else this.logger.warn(`there was no format function for ${g}`);return o},e)}}const vQ=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class CQ extends $2{constructor(e,t,r){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Qp.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=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(e,t,r,i){const s={},a={},o={},d={};return e.forEach(g=>{let b=!0;t.forEach(E=>{const S=`${g}|${E}`;!r.reload&&this.store.hasResourceBundle(g,E)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?a[S]===void 0&&(a[S]=!0):(this.state[S]=1,b=!1,a[S]===void 0&&(a[S]=!0),s[S]===void 0&&(s[S]=!0),d[E]===void 0&&(d[E]=!0)))}),b||(o[g]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(d)}}loaded(e,t,r){const i=e.split("|"),s=i[0],a=i[1];t&&this.emit("failedLoading",s,a,t),!t&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const o={};this.queue.forEach(d=>{sQ(d.loaded,[s],a),vQ(d,e),t&&d.errors.push(t),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(g=>{o[g]||(o[g]={});const b=d.loaded[g];b.length&&b.forEach(E=>{o[g][E]===void 0&&(o[g][E]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(d=>!d.done)}read(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;const o=(g,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const E=this.waitingReads.shift();this.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(g&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,i+1,s*2,a)},s);return}a(g,b)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const g=d(e,t);g&&typeof g.then=="function"?g.then(b=>o(null,b)).catch(o):o(null,g)}catch(g){o(g)}return}return d(e,t,o)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();wo(e)&&(e=this.languageUtils.toResolveHierarchy(e)),wo(t)&&(t=[t]);const s=this.queueLoad(e,t,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,r,i,s){var d,g,b,E,S;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((g=(d=this.services)==null?void 0:d.utils)!=null&&g.hasLoadedNamespace&&!((E=(b=this.services)==null?void 0:b.utils)!=null&&E.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((S=this.backend)!=null&&S.create){const O={...a,isUpdate:s},k=this.backend.create.bind(this.backend);if(k.length<6)try{let U;k.length===5?U=k(e,t,r,i,O):U=k(e,t,r,i),U&&typeof U.then=="function"?U.then(z=>o(null,z)).catch(o):o(null,U)}catch(U){o(U)}else k(e,t,r,i,o,O)}!e||!e[0]||this.store.addResource(e[0],t,r,i)}}}const _I=()=>({debug:!1,initAsync:!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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),wo(n[1])&&(e.defaultValue=n[1]),wo(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),bI=n=>{var e,t;return wo(n.ns)&&(n.ns=[n.ns]),wo(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),wo(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},I_=()=>{},_Q=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class Hv extends $2{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=bI(e),this.services={},this.logger=Qp,this.modules={external:[]},_Q(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(wo(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=_I();this.options={...i,...this.options,...bI(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=b=>b?typeof b=="function"?new b:b:null;if(!this.options.isClone){this.modules.logger?Qp.init(s(this.modules.logger),this.options):Qp.init(null,this.options);let b;this.modules.formatter?b=this.modules.formatter:b=yQ;const E=new gI(this.options);this.store=new pI(this.options.resources,this.options);const S=this.services;S.logger=Qp,S.resourceStore=this.store,S.languageUtils=E,S.pluralResolver=new pQ(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),b&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(S.formatter=s(b),S.formatter.init(S,this.options),this.options.interpolation.format=S.formatter.format.bind(S.formatter)),S.interpolator=new mQ(this.options),S.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},S.backendConnector=new CQ(s(this.modules.backend),S.resourceStore,S,this.options),S.backendConnector.on("*",function(O){for(var k=arguments.length,U=new Array(k>1?k-1:0),z=1;z<k;z++)U[z-1]=arguments[z];e.emit(O,...U)}),this.modules.languageDetector&&(S.languageDetector=s(this.modules.languageDetector),S.languageDetector.init&&S.languageDetector.init(S,this.options.detection,this.options)),this.modules.i18nFormat&&(S.i18nFormat=s(this.modules.i18nFormat),S.i18nFormat.init&&S.i18nFormat.init(this)),this.translator=new zb(this.services,this.options),this.translator.on("*",function(O){for(var k=arguments.length,U=new Array(k>1?k-1:0),z=1;z<k;z++)U[z-1]=arguments[z];e.emit(O,...U)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,r||(r=I_),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 e.store[b](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(b=>{this[b]=function(){return e.store[b](...arguments),e}});const d=nv(),g=()=>{const b=(E,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),d.resolve(S),r(E,S)};if(this.languages&&!this.isInitialized)return b(null,this.t.bind(this));this.changeLanguage(this.options.lng,b)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),d}loadResources(e){var s,a;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I_;const i=wo(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],d=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(E=>{E!=="cimode"&&o.indexOf(E)<0&&o.push(E)})};i?d(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(b=>d(b)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,g=>d(g)),this.services.backendConnector.load(o,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(g)})}else r(null)}reloadResources(e,t,r){const i=nv();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=I_),this.services.backendConnector.reload(e,t,s=>{i.resolve(),r(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&jF.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const i=nv();this.emit("languageChanging",e);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},a=(d,g)=>{g?(s(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 r.t(...arguments)}),t&&t(d,function(){return r.t(...arguments)})},o=d=>{var b,E;!e&&!d&&this.services.languageDetector&&(d=[]);const g=wo(d)?d:this.services.languageUtils.getBestMatchFromCodes(d);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),(E=(b=this.services.languageDetector)==null?void 0:b.cacheUserLanguage)==null||E.call(b,g)),this.loadResources(g,S=>{a(S,g)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,r){var i=this;const s=function(a,o){let d;if(typeof o!="object"){for(var g=arguments.length,b=new Array(g>2?g-2:0),E=2;E<g;E++)b[E-2]=arguments[E];d=i.options.overloadTranslationOptionHandler([a,o].concat(b))}else d={...o};d.lng=d.lng||s.lng,d.lngs=d.lngs||s.lngs,d.ns=d.ns||s.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||s.keyPrefix);const S=i.options.keySeparator||".";let O;return d.keyPrefix&&Array.isArray(a)?O=a.map(k=>`${d.keyPrefix}${S}${k}`):O=d.keyPrefix?`${d.keyPrefix}${S}${a}`:a,i.t(O,d)};return wo(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=r,s}t(){var i;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(i=this.translator)==null?void 0:i.translate(...t)}exists(){var i;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,d)=>{const g=this.services.backendConnector.state[`${o}|${d}`];return g===-1||g===0||g===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!i||a(s,e)))}loadNamespaces(e,t){const r=nv();return this.options.ns?(wo(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=nv();wo(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),t&&t(a)}),r):(t&&t(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new gI(_I());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Hv(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I_;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new Hv(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const o=Object.keys(this.store.data).reduce((d,g)=>(d[g]={...this.store.data[g]},Object.keys(d[g]).reduce((b,E)=>(b[E]={...d[g][E]},b),{})),{});s.store=new pI(o,i),s.services.resourceStore=s.store}return s.translator=new zb(s.services,i),s.translator.on("*",function(o){for(var d=arguments.length,g=new Array(d>1?d-1:0),b=1;b<d;b++)g[b-1]=arguments[b];s.emit(o,...g)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kc=Hv.createInstance();Kc.createInstance=Hv.createInstance;Kc.createInstance;Kc.dir;Kc.init;Kc.loadResources;Kc.reloadResources;Kc.use;Kc.changeLanguage;Kc.getFixedT;Kc.t;Kc.exists;Kc.setDefaultNamespace;Kc.hasLoadedNamespace;Kc.loadNamespaces;Kc.loadLanguages;const{slice:bQ,forEach:xQ}=[];function wQ(n){return xQ.call(bQ.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}const xI=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,MQ=function(n,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${n}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!xI.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!xI.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},wI={create(n,e,t,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),r&&(i.domain=r),document.cookie=MQ(n,encodeURIComponent(e),i)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let r=0;r<t.length;r++){let i=t[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(n){this.create(n,"",-1)}};var SQ={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return wI.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&wI.create(t,n,r,i,s)}},EQ={name:"querystring",lookup(n){var r;let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let o=0;o<a.length;o++){const d=a[o].indexOf("=");d>0&&a[o].substring(0,d)===e&&(t=a[o].substring(d+1))}}return t}};let rv=null;const MI=()=>{if(rv!==null)return rv;try{rv=window!=="undefined"&&window.localStorage!==null;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{rv=!1}return rv};var BQ={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&MI())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&MI()&&window.localStorage.setItem(t,n)}};let iv=null;const SI=()=>{if(iv!==null)return iv;try{iv=window!=="undefined"&&window.sessionStorage!==null;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{iv=!1}return iv};var OQ={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&SI())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&SI()&&window.sessionStorage.setItem(t,n)}},IQ={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:r,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},kQ={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},TQ={name:"path",lookup(n){var i;let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},PQ={name:"subdomain",lookup(n){var i,s;let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[t]}};let NF=!1;try{document.cookie,NF=!0}catch{}const WF=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];NF||WF.splice(1,1);const RQ=()=>({order:WF,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class GF{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=wQ(t,this.options||{},RQ()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(SQ),this.addDetector(EQ),this.addDetector(BQ),this.addDetector(OQ),this.addDetector(IQ),this.addDetector(kQ),this.addDetector(TQ),this.addDetector(PQ)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}GF.type="languageDetector";var DQ=function(e){return{type:"backend",init:function(r,i,s){},read:function(r,i,s){if(typeof e=="function"){if(e.length<3){try{var a=e(r,i);a&&typeof a.then=="function"?a.then(function(o){return s(null,o&&o.default||o)}).catch(s):s(null,a)}catch(o){s(o)}return}e(r,i,s);return}s(null,e[r]&&e[r][i])}}},F3,EI;function KQ(){return EI||(EI=1,F3={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}),F3}var FQ=KQ();const LQ=Ha(FQ);var UQ=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function BI(n){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=n.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(LQ[t[1]]||n.charAt(n.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=n.indexOf("-->");return{type:"comment",comment:r!==-1?n.slice(4,r):""}}for(var i=new RegExp(UQ),s=null;(s=i.exec(n))!==null;)if(s[0].trim())if(s[1]){var a=s[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],i.lastIndex--}else s[2]&&(e.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return e}var zQ=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,jQ=/^\s*$/,NQ=Object.create(null);function QF(n,e){switch(e.type){case"text":return n+e.content;case"tag":return n+="<"+e.name+(e.attrs?function(t){var r=[];for(var i in t)r.push(i+'="'+t[i]+'"');return r.length?" "+r.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?n:n+e.children.reduce(QF,"")+"</"+e.name+">";case"comment":return n+"<!--"+e.comment+"-->"}}var WQ={parse:function(n,e){e||(e={}),e.components||(e.components=NQ);var t,r=[],i=[],s=-1,a=!1;if(n.indexOf("<")!==0){var o=n.indexOf("<");r.push({type:"text",content:o===-1?n:n.substring(0,o)})}return n.replace(zQ,function(d,g){if(a){if(d!=="</"+t.name+">")return;a=!1}var b,E=d.charAt(1)!=="/",S=d.startsWith("<!--"),O=g+d.length,k=n.charAt(O);if(S){var U=BI(d);return s<0?(r.push(U),r):((b=i[s]).children.push(U),r)}if(E&&(s++,(t=BI(d)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!k||k==="<"||t.children.push({type:"text",content:n.slice(O,n.indexOf("<",O))}),s===0&&r.push(t),(b=i[s-1])&&b.children.push(t),i[s]=t),(!E||t.voidElement)&&(s>-1&&(t.voidElement||t.name===d.slice(2,-1))&&(s--,t=s===-1?r:i[s]),!a&&k!=="<"&&k)){b=s===-1?r:i[s].children;var z=n.indexOf("<",O),q=n.slice(O,z===-1?void 0:z);jQ.test(q)&&(q=" "),(z>-1&&s+b.length>=0||q!==" ")&&b.push({type:"text",content:q})}}),r},stringify:function(n){return n.reduce(function(e,t){return e+QF("",t)},"")}};const vb=(n,e,t,r)=>{var s,a,o,d;const i=[t,{code:e,...r||{}}];if((a=(s=n==null?void 0:n.services)==null?void 0:s.logger)!=null&&a.forward)return n.services.logger.forward(i,"warn","react-i18next::",!0);Vh(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(d=(o=n==null?void 0:n.services)==null?void 0:o.logger)!=null&&d.warn?n.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},OI={},Zv=(n,e,t,r)=>{Vh(t)&&OI[t]||(Vh(t)&&(OI[t]=new Date),vb(n,e,t,r))},qF=(n,e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}},JE=(n,e,t)=>{n.loadNamespaces(e,qF(n,t))},II=(n,e,t,r)=>{if(Vh(t)&&(t=[t]),n.options.preload&&n.options.preload.indexOf(e)>-1)return JE(n,t,r);t.forEach(i=>{n.options.ns.indexOf(i)<0&&n.options.ns.push(i)}),n.loadLanguages(e,qF(n,r))},GQ=(n,e,t={})=>!e.languages||!e.languages.length?(Zv(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(n,{lng:t.lng,precheck:(r,i)=>{var s;if(((s=t.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,n))return!1}}),QQ=n=>n.displayName||n.name||(Vh(n)&&n.length>0?n:"Unknown"),Vh=n=>typeof n=="string",hg=n=>typeof n=="object"&&n!==null,qQ=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,YQ={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},$Q=n=>YQ[n],VQ=n=>n.replace(qQ,$Q);let e6={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:VQ};const HQ=(n={})=>{e6={...e6,...n}},YF=()=>e6;let $F;const ZQ=n=>{$F=n},CB=()=>$F,L3=(n,e)=>{var r;if(!n)return!1;const t=((r=n.props)==null?void 0:r.children)??n.children;return e?t.length>0:!!t},U3=n=>{var t,r;if(!n)return[];const e=((t=n.props)==null?void 0:t.children)??n.children;return(r=n.props)!=null&&r.i18nIsDynamicList?N1(e):e},XQ=n=>Array.isArray(n)&&n.every(ui.isValidElement),N1=n=>Array.isArray(n)?n:[n],JQ=(n,e)=>{const t={...e};return t.props=Object.assign(n.props,e.props),t},VF=(n,e,t,r)=>{if(!n)return"";let i="";const s=N1(n),a=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((o,d)=>{if(Vh(o)){i+=`${o}`;return}if(ui.isValidElement(o)){const{props:g,type:b}=o,E=Object.keys(g).length,S=a.indexOf(b)>-1,O=g.children;if(!O&&S&&!E){i+=`<${b}/>`;return}if(!O&&(!S||E)||g.i18nIsDynamicList){i+=`<${d}></${d}>`;return}if(S&&E===1&&Vh(O)){i+=`<${b}>${O}</${b}>`;return}const k=VF(O,e,t,r);i+=`<${d}>${k}</${d}>`;return}if(o===null){vb(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:r});return}if(hg(o)){const{format:g,...b}=o,E=Object.keys(b);if(E.length===1){const S=g?`${E[0]}, ${g}`:E[0];i+=`{{${S}}}`;return}vb(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:r,child:o});return}vb(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:r,child:o})}),i},eq=(n,e,t,r,i,s)=>{if(e==="")return[];const a=r.transKeepBasicHtmlNodesFor||[],o=e&&new RegExp(a.map(z=>`<${z}`).join("|")).test(e);if(!n&&!o&&!s)return[e];const d={},g=z=>{N1(z).forEach(Q=>{Vh(Q)||(L3(Q)?g(U3(Q)):hg(Q)&&!ui.isValidElement(Q)&&Object.assign(d,Q))})};g(n);const b=WQ.parse(`<0>${e}</0>`),E={...d,...i},S=(z,q,Q)=>{var Y;const re=U3(z),X=k(re,q.children,Q);return XQ(re)&&X.length===0||(Y=z.props)!=null&&Y.i18nIsDynamicList?re:X},O=(z,q,Q,re,X)=>{z.dummy?(z.children=q,Q.push(ui.cloneElement(z,{key:re},X?void 0:q))):Q.push(...ui.Children.map([z],Y=>{const ee={...Y.props};return delete ee.i18nIsDynamicList,ui.createElement(Y.type,{...ee,key:re,ref:Y.ref},X?null:q)}))},k=(z,q,Q)=>{const re=N1(z);return N1(q).reduce((Y,ee,N)=>{var he,de;const ie=((de=(he=ee.children)==null?void 0:he[0])==null?void 0:de.content)&&t.services.interpolator.interpolate(ee.children[0].content,E,t.language);if(ee.type==="tag"){let Me=re[parseInt(ee.name,10)];Q.length===1&&!Me&&(Me=Q[0][ee.name]),Me||(Me={});const fe=Object.keys(ee.attrs).length!==0?JQ({props:ee.attrs},Me):Me,xe=ui.isValidElement(fe),De=xe&&L3(ee,!0)&&!ee.voidElement,me=o&&hg(fe)&&fe.dummy&&!xe,at=hg(n)&&Object.hasOwnProperty.call(n,ee.name);if(Vh(fe)){const Qe=t.services.interpolator.interpolate(fe,E,t.language);Y.push(Qe)}else if(L3(fe)||De){const Qe=S(fe,ee,Q);O(fe,Qe,Y,N)}else if(me){const Qe=k(re,ee.children,Q);O(fe,Qe,Y,N)}else if(Number.isNaN(parseFloat(ee.name)))if(at){const Qe=S(fe,ee,Q);O(fe,Qe,Y,N,ee.voidElement)}else if(r.transSupportBasicHtmlNodes&&a.indexOf(ee.name)>-1)if(ee.voidElement)Y.push(ui.createElement(ee.name,{key:`${ee.name}-${N}`}));else{const Qe=k(re,ee.children,Q);Y.push(ui.createElement(ee.name,{key:`${ee.name}-${N}`},Qe))}else if(ee.voidElement)Y.push(`<${ee.name} />`);else{const Qe=k(re,ee.children,Q);Y.push(`<${ee.name}>${Qe}</${ee.name}>`)}else if(hg(fe)&&!xe){const Qe=ee.children[0]?ie:null;Qe&&Y.push(Qe)}else O(fe,ie,Y,N,ee.children.length!==1||!ie)}else if(ee.type==="text"){const Me=r.transWrapTextNodes,fe=s?r.unescape(t.services.interpolator.interpolate(ee.content,E,t.language)):t.services.interpolator.interpolate(ee.content,E,t.language);Me?Y.push(ui.createElement(Me,{key:`${ee.name}-${N}`},fe)):Y.push(fe)}return Y},[])},U=k([{dummy:!0,children:n||[]}],b,N1(n||[]));return U3(U[0])},HF=(n,e,t)=>{const r=n.key||e,i=ui.cloneElement(n,{key:r});if(!i.props||!i.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return i;function s(){return ui.createElement(ui.Fragment,null,i)}return ui.createElement(s)},tq=(n,e)=>n.map((t,r)=>HF(t,r,e)),nq=(n,e)=>{const t={};return Object.keys(n).forEach(r=>{Object.assign(t,{[r]:HF(n[r],r,e)})}),t},rq=(n,e,t,r)=>n?Array.isArray(n)?tq(n,e):hg(n)?nq(n,e):(Zv(t,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:r}),null):null;function iq({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:s={},values:a,defaults:o,components:d,ns:g,i18n:b,t:E,shouldUnescape:S,...O}){var fe,xe,De,me,at,Qe;const k=b||CB();if(!k)return Zv(k,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:r}),n;const U=E||k.t.bind(k)||(He=>He),z={...YF(),...(fe=k.options)==null?void 0:fe.react};let q=g||U.ns||((xe=k.options)==null?void 0:xe.defaultNS);q=Vh(q)?[q]:q||["translation"];const Q=VF(n,z,k,r),re=o||Q||z.transEmptyNodeValue||r,{hashTransKey:X}=z,Y=r||(X?X(Q||re):Q||re);(me=(De=k.options)==null?void 0:De.interpolation)!=null&&me.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...k.options.interpolation.defaultVariables}:{...k.options.interpolation.defaultVariables});const ee=a||e!==void 0&&!((Qe=(at=k.options)==null?void 0:at.interpolation)!=null&&Qe.alwaysFormat)||!n?s.interpolation:{interpolation:{...s.interpolation,prefix:"#$?",suffix:"?$#"}},N={...s,context:i||s.context,count:e,...a,...ee,defaultValue:re,ns:q},ie=Y?U(Y,N):re,he=rq(d,ie,k,r),de=eq(he||n,ie,k,z,N,S),Me=t??z.defaultTransParent;return Me?ui.createElement(Me,O,de):de}const oq={type:"3rdParty",init(n){HQ(n.options.react),ZQ(n)}},ZF=ui.createContext();class sq{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function M0({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:s={},values:a,defaults:o,components:d,ns:g,i18n:b,t:E,shouldUnescape:S,...O}){var Q;const{i18n:k,defaultNS:U}=ui.useContext(ZF)||{},z=b||k||CB(),q=E||(z==null?void 0:z.t.bind(z));return iq({children:n,count:e,parent:t,i18nKey:r,context:i,tOptions:s,values:a,defaults:o,components:d,ns:g||(q==null?void 0:q.ns)||U||((Q=z==null?void 0:z.options)==null?void 0:Q.defaultNS),i18n:z,t:E,shouldUnescape:S,...O})}const aq=(n,e)=>{const t=ui.useRef();return ui.useEffect(()=>{t.current=n},[n,e]),t.current},XF=(n,e,t,r)=>n.getFixedT(e,t,r),lq=(n,e,t,r)=>ui.useCallback(XF(n,e,t,r),[n,e,t,r]),uq=(n,e={})=>{var X,Y,ee,N;const{i18n:t}=e,{i18n:r,defaultNS:i}=ui.useContext(ZF)||{},s=t||r||CB();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new sq),!s){Zv(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const ie=(de,Me)=>Vh(Me)?Me:hg(Me)&&Vh(Me.defaultValue)?Me.defaultValue:Array.isArray(de)?de[de.length-1]:de,he=[ie,{},!1];return he.t=ie,he.i18n={},he.ready=!1,he}(X=s.options.react)!=null&&X.wait&&Zv(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...YF(),...s.options.react,...e},{useSuspense:o,keyPrefix:d}=a;let g=i||((Y=s.options)==null?void 0:Y.defaultNS);g=Vh(g)?[g]:g||["translation"],(N=(ee=s.reportNamespaces).addUsedNamespaces)==null||N.call(ee,g);const b=(s.isInitialized||s.initializedStoreOnce)&&g.every(ie=>GQ(ie,s,a)),E=lq(s,e.lng||null,a.nsMode==="fallback"?g:g[0],d),S=()=>E,O=()=>XF(s,e.lng||null,a.nsMode==="fallback"?g:g[0],d),[k,U]=ui.useState(S);let z=g.join();e.lng&&(z=`${e.lng}${z}`);const q=aq(z),Q=ui.useRef(!0);ui.useEffect(()=>{const{bindI18n:ie,bindI18nStore:he}=a;Q.current=!0,!b&&!o&&(e.lng?II(s,e.lng,g,()=>{Q.current&&U(O)}):JE(s,g,()=>{Q.current&&U(O)})),b&&q&&q!==z&&Q.current&&U(O);const de=()=>{Q.current&&U(O)};return ie&&(s==null||s.on(ie,de)),he&&(s==null||s.store.on(he,de)),()=>{Q.current=!1,s&&(ie==null||ie.split(" ").forEach(Me=>s.off(Me,de))),he&&s&&he.split(" ").forEach(Me=>s.store.off(Me,de))}},[s,z]),ui.useEffect(()=>{Q.current&&b&&U(S)},[s,d,b]);const re=[k,s,b];if(re.t=k,re.i18n=s,re.ready=b,b||!b&&!o)return re;throw new Promise(ie=>{e.lng?II(s,e.lng,g,()=>ie()):JE(s,g,()=>ie())})},$s=(n,e={})=>function(r){function i({forwardedRef:a,...o}){const[d,g,b]=uq(n,{...o,keyPrefix:e.keyPrefix}),E={...o,t:d,i18n:g,tReady:b};return e.withRef&&a?E.ref=a:!e.withRef&&a&&(E.forwardedRef=a),ui.createElement(r,E)}i.displayName=`withI18nextTranslation(${QQ(r)})`,i.WrappedComponent=r;const s=(a,o)=>ui.createElement(i,Object.assign({},a,{forwardedRef:o}));return e.withRef?ui.forwardRef(s):i};function Sl(){var n="/home/runner/work/maputnik/maputnik/src/i18n.ts",e="d8f26cf16d2bfe94f6075e04546db610e7ce65b5",t=globalThis,r="__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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Sl=function(){return a},a}Sl();const JF=(Sl().s[0]++,{de:"Deutsch",en:"English",fr:"Français",he:"עברית",ja:"日本語",zh:"简体中文"});Sl().s[1]++;Kc.use(GF).use(DQ((n,e)=>(Sl().f[0]++,Sl().s[2]++,n==="en"?(Sl().b[0][0]++,Sl().s[3]++,{}):(Sl().b[0][1]++,Sl().s[4]++,rQ(Object.assign({"./locales/de/translation.json":()=>(Sl().f[1]++,Sl().s[5]++,tv(()=>import("./translation-jw99Nxvk.js"),[])),"./locales/fr/translation.json":()=>(Sl().f[2]++,Sl().s[6]++,tv(()=>import("./translation-BG6vn6wi.js"),[])),"./locales/he/translation.json":()=>(Sl().f[3]++,Sl().s[7]++,tv(()=>import("./translation-y_pBWWYu.js"),[])),"./locales/ja/translation.json":()=>(Sl().f[4]++,Sl().s[8]++,tv(()=>import("./translation-CM4Rn8lU.js"),[])),"./locales/zh/translation.json":()=>(Sl().f[5]++,Sl().s[9]++,tv(()=>import("./translation-DHsMJ3Qo.js"),[]))}),`./locales/${n}/${e}.json`,4))))).use(oq).init({supportedLngs:Object.keys(JF),keySeparator:!1,nsSeparator:!1,interpolation:{escapeValue:!1},saveMissing:!0,fallbackLng:!1,missingKeyHandler:(n,e,t)=>{if(Sl().f[6]++,Sl().s[10]++,n[0]==="en"){Sl().b[1][0]++,Sl().s[11]++;return}else Sl().b[1][1]++;Sl().s[12]++,console.warn(`Missing translation for "${t}" in "${n.join(", ")}"`)}});var k_={exports:{}},kI;function Aq(){return kI||(kI=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=["constructor","render","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","componentWillUnmount"],r=[];function i(a){if(a===void 0){console.error("Autobind error: No context provided.");return}var o=Object.getPrototypeOf(a);arguments.length>1?r=Array.prototype.slice.call(arguments,1):r=Object.getOwnPropertyNames(o),r.forEach(function(d){var g=Object.getOwnPropertyDescriptor(o,d);if(g===void 0){console.warn('Autobind: "'+d+'" method not found in class.');return}t.indexOf(d)!==-1||typeof g.value!="function"||Object.defineProperty(o,d,s(o,d,g))})}function s(a,o,d){var g=d.value;return{configurable:!0,get:function(){if(this===a||this.hasOwnProperty(o))return g;var E=g.bind(this);return Object.defineProperty(this,o,{value:E,configurable:!0,writable:!0}),E}}}n.exports=e.default}(k_,k_.exports)),k_.exports}var z3,TI;function cq(){return TI||(TI=1,z3=Aq()),z3}var dq=cq();const hq=Ha(dq);var gv={exports:{}};gv.exports;var PI;function fq(){return PI||(PI=1,function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Array]",o="[object Boolean]",d="[object Date]",g="[object Error]",b="[object Function]",E="[object GeneratorFunction]",S="[object Map]",O="[object Number]",k="[object Object]",U="[object Promise]",z="[object RegExp]",q="[object Set]",Q="[object String]",re="[object Symbol]",X="[object WeakMap]",Y="[object ArrayBuffer]",ee="[object DataView]",N="[object Float32Array]",ie="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",Me="[object Int32Array]",fe="[object Uint8Array]",xe="[object Uint8ClampedArray]",De="[object Uint16Array]",me="[object Uint32Array]",at=/[\\^$.*+?()[\]{}|]/g,Qe=/\w*$/,He=/^\[object .+?Constructor\]$/,We=/^(?:0|[1-9]\d*)$/,Ce={};Ce[s]=Ce[a]=Ce[Y]=Ce[ee]=Ce[o]=Ce[d]=Ce[N]=Ce[ie]=Ce[he]=Ce[de]=Ce[Me]=Ce[S]=Ce[O]=Ce[k]=Ce[z]=Ce[q]=Ce[Q]=Ce[re]=Ce[fe]=Ce[xe]=Ce[De]=Ce[me]=!0,Ce[g]=Ce[b]=Ce[X]=!1;var Te=typeof window=="object"&&window&&window.Object===Object&&window,rt=typeof self=="object"&&self&&self.Object===Object&&self,yt=Te||rt||Function("return this")(),bt=e&&!e.nodeType&&e,gt=bt&&!0&&n&&!n.nodeType&&n,Dt=gt&>.exports===bt;function Pt(J,Oe){return J.set(Oe[0],Oe[1]),J}function Le(J,Oe){return J.add(Oe),J}function Pe(J,Oe){for(var ot=-1,Vt=J?J.length:0;++ot<Vt&&Oe(J[ot],ot,J)!==!1;);return J}function Ee(J,Oe){for(var ot=-1,Vt=Oe.length,Ir=J.length;++ot<Vt;)J[Ir+ot]=Oe[ot];return J}function nt(J,Oe,ot,Vt){for(var Ir=-1,Yn=J?J.length:0;++Ir<Yn;)ot=Oe(ot,J[Ir],Ir,J);return ot}function _t(J,Oe){for(var ot=-1,Vt=Array(J);++ot<J;)Vt[ot]=Oe(ot);return Vt}function ht(J,Oe){return J==null?void 0:J[Oe]}function Ut(J){var Oe=!1;if(J!=null&&typeof J.toString!="function")try{Oe=!!(J+"")}catch{}return Oe}function en(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt,Ir){ot[++Oe]=[Ir,Vt]}),ot}function Ft(J,Oe){return function(ot){return J(Oe(ot))}}function mn(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt){ot[++Oe]=Vt}),ot}var jn=Array.prototype,nn=Function.prototype,ir=Object.prototype,Dn=yt["__core-js_shared__"],fn=function(){var J=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),Hn=nn.toString,wr=ir.hasOwnProperty,Qn=ir.toString,Xn=RegExp("^"+Hn.call(wr).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=Dt?yt.Buffer:void 0,Ae=yt.Symbol,pe=yt.Uint8Array,et=Ft(Object.getPrototypeOf,Object),St=Object.create,Yt=ir.propertyIsEnumerable,rn=jn.splice,er=Object.getOwnPropertySymbols,Be=Ge?Ge.isBuffer:void 0,oe=Ft(Object.keys,Object),ve=Fr(yt,"DataView"),p=Fr(yt,"Map"),je=Fr(yt,"Promise"),Ye=Fr(yt,"Set"),tt=Fr(yt,"WeakMap"),ct=Fr(Object,"create"),At=fo(ve),Gt=fo(p),$t=fo(je),jt=fo(Ye),xt=fo(tt),Rn=Ae?Ae.prototype:void 0,Bn=Rn?Rn.valueOf:void 0;function fr(J){var Oe=-1,ot=J?J.length:0;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Sr(){this.__data__=ct?ct(null):{}}function on(J){return this.has(J)&&delete this.__data__[J]}function Nn(J){var Oe=this.__data__;if(ct){var ot=Oe[J];return ot===r?void 0:ot}return wr.call(Oe,J)?Oe[J]:void 0}function Fn(J){var Oe=this.__data__;return ct?Oe[J]!==void 0:wr.call(Oe,J)}function Or(J,Oe){var ot=this.__data__;return ot[J]=ct&&Oe===void 0?r:Oe,this}fr.prototype.clear=Sr,fr.prototype.delete=on,fr.prototype.get=Nn,fr.prototype.has=Fn,fr.prototype.set=Or;function Er(J){var Oe=-1,ot=J?J.length:0;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Dr(){this.__data__=[]}function ur(J){var Oe=this.__data__,ot=Za(Oe,J);if(ot<0)return!1;var Vt=Oe.length-1;return ot==Vt?Oe.pop():rn.call(Oe,ot,1),!0}function co(J){var Oe=this.__data__,ot=Za(Oe,J);return ot<0?void 0:Oe[ot][1]}function Sa(J){return Za(this.__data__,J)>-1}function qi(J,Oe){var ot=this.__data__,Vt=Za(ot,J);return Vt<0?ot.push([J,Oe]):ot[Vt][1]=Oe,this}Er.prototype.clear=Dr,Er.prototype.delete=ur,Er.prototype.get=co,Er.prototype.has=Sa,Er.prototype.set=qi;function yi(J){var Oe=-1,ot=J?J.length:0;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function oo(){this.__data__={hash:new fr,map:new(p||Er),string:new fr}}function Mo(J){return ls(this,J).delete(J)}function Ti(J){return ls(this,J).get(J)}function La(J){return ls(this,J).has(J)}function Ea(J,Oe){return ls(this,J).set(J,Oe),this}yi.prototype.clear=oo,yi.prototype.delete=Mo,yi.prototype.get=Ti,yi.prototype.has=La,yi.prototype.set=Ea;function ns(J){this.__data__=new Er(J)}function Aa(){this.__data__=new Er}function Al(J){return this.__data__.delete(J)}function ao(J){return this.__data__.get(J)}function Pu(J){return this.__data__.has(J)}function tu(J,Oe){var ot=this.__data__;if(ot instanceof Er){var Vt=ot.__data__;if(!p||Vt.length<t-1)return Vt.push([J,Oe]),this;ot=this.__data__=new yi(Vt)}return ot.set(J,Oe),this}ns.prototype.clear=Aa,ns.prototype.delete=Al,ns.prototype.get=ao,ns.prototype.has=Pu,ns.prototype.set=tu;function so(J,Oe){var ot=Ds(J)||el(J)?_t(J.length,String):[],Vt=ot.length,Ir=!!Vt;for(var Yn in J)wr.call(J,Yn)&&!(Ir&&(Yn=="length"||hu(Yn,Vt)))&&ot.push(Yn);return ot}function Kr(J,Oe,ot){var Vt=J[Oe];(!(wr.call(J,Oe)&&Ms(Vt,ot))||ot===void 0&&!(Oe in J))&&(J[Oe]=ot)}function Za(J,Oe){for(var ot=J.length;ot--;)if(Ms(J[ot][0],Oe))return ot;return-1}function Ps(J,Oe){return J&&Ai(Oe,Ni(Oe),J)}function ia(J,Oe,ot,Vt,Ir,Yn,si){var ci;if(Vt&&(ci=Yn?Vt(J,Ir,Yn,si):Vt(J)),ci!==void 0)return ci;if(!Jr(J))return J;var vr=Ds(J);if(vr){if(ci=Rs(J),!Oe)return Xa(J,ci)}else{var kr=Ja(J),vi=kr==b||kr==E;if(Vi(J))return sr(J,Oe);if(kr==k||kr==s||vi&&!Yn){if(Ut(J))return Yn?J:{};if(ci=So(vi?{}:J),!Oe)return ca(J,Ps(ci,J))}else{if(!Ce[kr])return Yn?J:{};ci=Ws(J,kr,ia,Oe)}}si||(si=new ns);var Eo=si.get(J);if(Eo)return Eo;if(si.set(J,ci),!vr)var ki=ot?iA(J):Ni(J);return Pe(ki||J,function(qr,Hi){ki&&(Hi=qr,qr=J[Hi]),Kr(ci,Hi,ia(qr,Oe,ot,Vt,Hi,J,si))}),ci}function qe(J){return Jr(J)?St(J):{}}function wt(J,Oe,ot){var Vt=Oe(J);return Ds(J)?Vt:Ee(Vt,ot(J))}function gn(J){return Qn.call(J)}function qn(J){if(!Jr(J)||rs(J))return!1;var Oe=nu(J)||Ut(J)?Xn:He;return Oe.test(fo(J))}function An(J){if(!Vs(J))return oe(J);var Oe=[];for(var ot in Object(J))wr.call(J,ot)&&ot!="constructor"&&Oe.push(ot);return Oe}function sr(J,Oe){if(Oe)return J.slice();var ot=new J.constructor(J.length);return J.copy(ot),ot}function Pi(J){var Oe=new J.constructor(J.byteLength);return new pe(Oe).set(new pe(J)),Oe}function ho(J,Oe){var ot=Oe?Pi(J.buffer):J.buffer;return new J.constructor(ot,J.byteOffset,J.byteLength)}function Cs(J,Oe,ot){var Vt=Oe?ot(en(J),!0):en(J);return nt(Vt,Pt,new J.constructor)}function Ns(J){var Oe=new J.constructor(J.source,Qe.exec(J));return Oe.lastIndex=J.lastIndex,Oe}function vA(J,Oe,ot){var Vt=Oe?ot(mn(J),!0):mn(J);return nt(Vt,Le,new J.constructor)}function ri(J){return Bn?Object(Bn.call(J)):{}}function wi(J,Oe){var ot=Oe?Pi(J.buffer):J.buffer;return new J.constructor(ot,J.byteOffset,J.length)}function Xa(J,Oe){var ot=-1,Vt=J.length;for(Oe||(Oe=Array(Vt));++ot<Vt;)Oe[ot]=J[ot];return Oe}function Ai(J,Oe,ot,Vt){ot||(ot={});for(var Ir=-1,Yn=Oe.length;++Ir<Yn;){var si=Oe[Ir],ci=void 0;Kr(ot,si,ci===void 0?J[si]:ci)}return ot}function ca(J,Oe){return Ai(J,Ei(J),Oe)}function iA(J){return wt(J,Ni,Ei)}function ls(J,Oe){var ot=J.__data__;return zl(Oe)?ot[typeof Oe=="string"?"string":"hash"]:ot.map}function Fr(J,Oe){var ot=ht(J,Oe);return qn(ot)?ot:void 0}var Ei=er?Ft(er,Object):lo,Ja=gn;(ve&&Ja(new ve(new ArrayBuffer(1)))!=ee||p&&Ja(new p)!=S||je&&Ja(je.resolve())!=U||Ye&&Ja(new Ye)!=q||tt&&Ja(new tt)!=X)&&(Ja=function(J){var Oe=Qn.call(J),ot=Oe==k?J.constructor:void 0,Vt=ot?fo(ot):void 0;if(Vt)switch(Vt){case At:return ee;case Gt:return S;case $t:return U;case jt:return q;case xt:return X}return Oe});function Rs(J){var Oe=J.length,ot=J.constructor(Oe);return Oe&&typeof J[0]=="string"&&wr.call(J,"index")&&(ot.index=J.index,ot.input=J.input),ot}function So(J){return typeof J.constructor=="function"&&!Vs(J)?qe(et(J)):{}}function Ws(J,Oe,ot,Vt){var Ir=J.constructor;switch(Oe){case Y:return Pi(J);case o:case d:return new Ir(+J);case ee:return ho(J,Vt);case N:case ie:case he:case de:case Me:case fe:case xe:case De:case me:return wi(J,Vt);case S:return Cs(J,Vt,ot);case O:case Q:return new Ir(J);case z:return Ns(J);case q:return vA(J,Vt,ot);case re:return ri(J)}}function hu(J,Oe){return Oe=Oe??i,!!Oe&&(typeof J=="number"||We.test(J))&&J>-1&&J%1==0&&J<Oe}function zl(J){var Oe=typeof J;return Oe=="string"||Oe=="number"||Oe=="symbol"||Oe=="boolean"?J!=="__proto__":J===null}function rs(J){return!!fn&&fn in J}function Vs(J){var Oe=J&&J.constructor,ot=typeof Oe=="function"&&Oe.prototype||ir;return J===ot}function fo(J){if(J!=null){try{return Hn.call(J)}catch{}try{return J+""}catch{}}return""}function ms(J){return ia(J,!0,!0)}function Ms(J,Oe){return J===Oe||J!==J&&Oe!==Oe}function el(J){return oA(J)&&wr.call(J,"callee")&&(!Yt.call(J,"callee")||Qn.call(J)==s)}var Ds=Array.isArray;function El(J){return J!=null&&Ui(J.length)&&!nu(J)}function oA(J){return ru(J)&&El(J)}var Vi=Be||Ri;function nu(J){var Oe=Jr(J)?Qn.call(J):"";return Oe==b||Oe==E}function Ui(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=i}function Jr(J){var Oe=typeof J;return!!J&&(Oe=="object"||Oe=="function")}function ru(J){return!!J&&typeof J=="object"}function Ni(J){return El(J)?so(J):An(J)}function lo(){return[]}function Ri(){return!1}n.exports=ms}(gv,gv.exports)),gv.exports}var pq=fq();const RI=Ha(pq);var j3,DI;function mq(){if(DI)return j3;DI=1;var n=NaN,e="[object Symbol]",t=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,o=Object.prototype,d=o.toString;function g(U,z,q){return U===U&&(q!==void 0&&(U=U<=q?U:q),z!==void 0&&(U=U>=z?U:z)),U}function b(U){var z=typeof U;return!!U&&(z=="object"||z=="function")}function E(U){return!!U&&typeof U=="object"}function S(U){return typeof U=="symbol"||E(U)&&d.call(U)==e}function O(U){if(typeof U=="number")return U;if(S(U))return n;if(b(U)){var z=typeof U.valueOf=="function"?U.valueOf():U;U=b(z)?z+"":z}if(typeof U!="string")return U===0?U:+U;U=U.replace(t,"");var q=i.test(U);return q||s.test(U)?a(U.slice(2),q?2:8):r.test(U)?n:+U}function k(U,z,q){return q===void 0&&(q=z,z=void 0),q!==void 0&&(q=O(q),q=q===q?q:0),z!==void 0&&(z=O(z),z=z===z?z:0),g(O(U),z,q)}return j3=k,j3}var gq=mq();const KI=Ha(gq);var N3={},ov={},FI;function yq(){if(FI)return ov;FI=1,ov.byteLength=o,ov.toByteArray=g,ov.fromByteArray=S;for(var n=[],e=[],t=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,s=r.length;i<s;++i)n[i]=r[i],e[r.charCodeAt(i)]=i;e[45]=62,e[95]=63;function a(O){var k=O.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var U=O.indexOf("=");U===-1&&(U=k);var z=U===k?0:4-U%4;return[U,z]}function o(O){var k=a(O),U=k[0],z=k[1];return(U+z)*3/4-z}function d(O,k,U){return(k+U)*3/4-U}function g(O){var k,U=a(O),z=U[0],q=U[1],Q=new t(d(O,z,q)),re=0,X=q>0?z-4:z,Y;for(Y=0;Y<X;Y+=4)k=e[O.charCodeAt(Y)]<<18|e[O.charCodeAt(Y+1)]<<12|e[O.charCodeAt(Y+2)]<<6|e[O.charCodeAt(Y+3)],Q[re++]=k>>16&255,Q[re++]=k>>8&255,Q[re++]=k&255;return q===2&&(k=e[O.charCodeAt(Y)]<<2|e[O.charCodeAt(Y+1)]>>4,Q[re++]=k&255),q===1&&(k=e[O.charCodeAt(Y)]<<10|e[O.charCodeAt(Y+1)]<<4|e[O.charCodeAt(Y+2)]>>2,Q[re++]=k>>8&255,Q[re++]=k&255),Q}function b(O){return n[O>>18&63]+n[O>>12&63]+n[O>>6&63]+n[O&63]}function E(O,k,U){for(var z,q=[],Q=k;Q<U;Q+=3)z=(O[Q]<<16&16711680)+(O[Q+1]<<8&65280)+(O[Q+2]&255),q.push(b(z));return q.join("")}function S(O){for(var k,U=O.length,z=U%3,q=[],Q=16383,re=0,X=U-z;re<X;re+=Q)q.push(E(O,re,re+Q>X?X:re+Q));return z===1?(k=O[U-1],q.push(n[k>>2]+n[k<<4&63]+"==")):z===2&&(k=(O[U-2]<<8)+O[U-1],q.push(n[k>>10]+n[k>>4&63]+n[k<<2&63]+"=")),q.join("")}return ov}var T_={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var LI;function vq(){return LI||(LI=1,T_.read=function(n,e,t,r,i){var s,a,o=i*8-r-1,d=(1<<o)-1,g=d>>1,b=-7,E=t?i-1:0,S=t?-1:1,O=n[e+E];for(E+=S,s=O&(1<<-b)-1,O>>=-b,b+=o;b>0;s=s*256+n[e+E],E+=S,b-=8);for(a=s&(1<<-b)-1,s>>=-b,b+=r;b>0;a=a*256+n[e+E],E+=S,b-=8);if(s===0)s=1-g;else{if(s===d)return a?NaN:(O?-1:1)*(1/0);a=a+Math.pow(2,r),s=s-g}return(O?-1:1)*a*Math.pow(2,s-r)},T_.write=function(n,e,t,r,i,s){var a,o,d,g=s*8-i-1,b=(1<<g)-1,E=b>>1,S=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,O=r?0:s-1,k=r?1:-1,U=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=b):(a=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-a))<1&&(a--,d*=2),a+E>=1?e+=S/d:e+=S*Math.pow(2,1-E),e*d>=2&&(a++,d/=2),a+E>=b?(o=0,a=b):a+E>=1?(o=(e*d-1)*Math.pow(2,i),a=a+E):(o=e*Math.pow(2,E-1)*Math.pow(2,i),a=0));i>=8;n[t+O]=o&255,O+=k,o/=256,i-=8);for(a=a<<i|o,g+=i;g>0;n[t+O]=a&255,O+=k,a/=256,g-=8);n[t+O-k]|=U*128}),T_}/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <https://feross.org>
|
||
* @license MIT
|
||
*/var UI;function Cq(){return UI||(UI=1,function(n){const e=yq(),t=vq(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=o,n.SlowBuffer=Q,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=s(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const Ge=new Uint8Array(1),Ae={foo:function(){return 42}};return Object.setPrototypeOf(Ae,Uint8Array.prototype),Object.setPrototypeOf(Ge,Ae),Ge.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function a(Ge){if(Ge>i)throw new RangeError('The value "'+Ge+'" is invalid for option "size"');const Ae=new Uint8Array(Ge);return Object.setPrototypeOf(Ae,o.prototype),Ae}function o(Ge,Ae,pe){if(typeof Ge=="number"){if(typeof Ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(Ge)}return d(Ge,Ae,pe)}o.poolSize=8192;function d(Ge,Ae,pe){if(typeof Ge=="string")return S(Ge,Ae);if(ArrayBuffer.isView(Ge))return k(Ge);if(Ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ge);if(fn(Ge,ArrayBuffer)||Ge&&fn(Ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fn(Ge,SharedArrayBuffer)||Ge&&fn(Ge.buffer,SharedArrayBuffer)))return U(Ge,Ae,pe);if(typeof Ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const et=Ge.valueOf&&Ge.valueOf();if(et!=null&&et!==Ge)return o.from(et,Ae,pe);const St=z(Ge);if(St)return St;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ge[Symbol.toPrimitive]=="function")return o.from(Ge[Symbol.toPrimitive]("string"),Ae,pe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ge)}o.from=function(Ge,Ae,pe){return d(Ge,Ae,pe)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function g(Ge){if(typeof Ge!="number")throw new TypeError('"size" argument must be of type number');if(Ge<0)throw new RangeError('The value "'+Ge+'" is invalid for option "size"')}function b(Ge,Ae,pe){return g(Ge),Ge<=0?a(Ge):Ae!==void 0?typeof pe=="string"?a(Ge).fill(Ae,pe):a(Ge).fill(Ae):a(Ge)}o.alloc=function(Ge,Ae,pe){return b(Ge,Ae,pe)};function E(Ge){return g(Ge),a(Ge<0?0:q(Ge)|0)}o.allocUnsafe=function(Ge){return E(Ge)},o.allocUnsafeSlow=function(Ge){return E(Ge)};function S(Ge,Ae){if((typeof Ae!="string"||Ae==="")&&(Ae="utf8"),!o.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);const pe=re(Ge,Ae)|0;let et=a(pe);const St=et.write(Ge,Ae);return St!==pe&&(et=et.slice(0,St)),et}function O(Ge){const Ae=Ge.length<0?0:q(Ge.length)|0,pe=a(Ae);for(let et=0;et<Ae;et+=1)pe[et]=Ge[et]&255;return pe}function k(Ge){if(fn(Ge,Uint8Array)){const Ae=new Uint8Array(Ge);return U(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return O(Ge)}function U(Ge,Ae,pe){if(Ae<0||Ge.byteLength<Ae)throw new RangeError('"offset" is outside of buffer bounds');if(Ge.byteLength<Ae+(pe||0))throw new RangeError('"length" is outside of buffer bounds');let et;return Ae===void 0&&pe===void 0?et=new Uint8Array(Ge):pe===void 0?et=new Uint8Array(Ge,Ae):et=new Uint8Array(Ge,Ae,pe),Object.setPrototypeOf(et,o.prototype),et}function z(Ge){if(o.isBuffer(Ge)){const Ae=q(Ge.length)|0,pe=a(Ae);return pe.length===0||Ge.copy(pe,0,0,Ae),pe}if(Ge.length!==void 0)return typeof Ge.length!="number"||Hn(Ge.length)?a(0):O(Ge);if(Ge.type==="Buffer"&&Array.isArray(Ge.data))return O(Ge.data)}function q(Ge){if(Ge>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return Ge|0}function Q(Ge){return+Ge!=Ge&&(Ge=0),o.alloc(+Ge)}o.isBuffer=function(Ae){return Ae!=null&&Ae._isBuffer===!0&&Ae!==o.prototype},o.compare=function(Ae,pe){if(fn(Ae,Uint8Array)&&(Ae=o.from(Ae,Ae.offset,Ae.byteLength)),fn(pe,Uint8Array)&&(pe=o.from(pe,pe.offset,pe.byteLength)),!o.isBuffer(Ae)||!o.isBuffer(pe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ae===pe)return 0;let et=Ae.length,St=pe.length;for(let Yt=0,rn=Math.min(et,St);Yt<rn;++Yt)if(Ae[Yt]!==pe[Yt]){et=Ae[Yt],St=pe[Yt];break}return et<St?-1:St<et?1:0},o.isEncoding=function(Ae){switch(String(Ae).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}},o.concat=function(Ae,pe){if(!Array.isArray(Ae))throw new TypeError('"list" argument must be an Array of Buffers');if(Ae.length===0)return o.alloc(0);let et;if(pe===void 0)for(pe=0,et=0;et<Ae.length;++et)pe+=Ae[et].length;const St=o.allocUnsafe(pe);let Yt=0;for(et=0;et<Ae.length;++et){let rn=Ae[et];if(fn(rn,Uint8Array))Yt+rn.length>St.length?(o.isBuffer(rn)||(rn=o.from(rn)),rn.copy(St,Yt)):Uint8Array.prototype.set.call(St,rn,Yt);else if(o.isBuffer(rn))rn.copy(St,Yt);else throw new TypeError('"list" argument must be an Array of Buffers');Yt+=rn.length}return St};function re(Ge,Ae){if(o.isBuffer(Ge))return Ge.length;if(ArrayBuffer.isView(Ge)||fn(Ge,ArrayBuffer))return Ge.byteLength;if(typeof Ge!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ge);const pe=Ge.length,et=arguments.length>2&&arguments[2]===!0;if(!et&&pe===0)return 0;let St=!1;for(;;)switch(Ae){case"ascii":case"latin1":case"binary":return pe;case"utf8":case"utf-8":return mn(Ge).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe*2;case"hex":return pe>>>1;case"base64":return ir(Ge).length;default:if(St)return et?-1:mn(Ge).length;Ae=(""+Ae).toLowerCase(),St=!0}}o.byteLength=re;function X(Ge,Ae,pe){let et=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((pe===void 0||pe>this.length)&&(pe=this.length),pe<=0)||(pe>>>=0,Ae>>>=0,pe<=Ae))return"";for(Ge||(Ge="utf8");;)switch(Ge){case"hex":return We(this,Ae,pe);case"utf8":case"utf-8":return De(this,Ae,pe);case"ascii":return Qe(this,Ae,pe);case"latin1":case"binary":return He(this,Ae,pe);case"base64":return xe(this,Ae,pe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,Ae,pe);default:if(et)throw new TypeError("Unknown encoding: "+Ge);Ge=(Ge+"").toLowerCase(),et=!0}}o.prototype._isBuffer=!0;function Y(Ge,Ae,pe){const et=Ge[Ae];Ge[Ae]=Ge[pe],Ge[pe]=et}o.prototype.swap16=function(){const Ae=this.length;if(Ae%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let pe=0;pe<Ae;pe+=2)Y(this,pe,pe+1);return this},o.prototype.swap32=function(){const Ae=this.length;if(Ae%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let pe=0;pe<Ae;pe+=4)Y(this,pe,pe+3),Y(this,pe+1,pe+2);return this},o.prototype.swap64=function(){const Ae=this.length;if(Ae%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let pe=0;pe<Ae;pe+=8)Y(this,pe,pe+7),Y(this,pe+1,pe+6),Y(this,pe+2,pe+5),Y(this,pe+3,pe+4);return this},o.prototype.toString=function(){const Ae=this.length;return Ae===0?"":arguments.length===0?De(this,0,Ae):X.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(Ae){if(!o.isBuffer(Ae))throw new TypeError("Argument must be a Buffer");return this===Ae?!0:o.compare(this,Ae)===0},o.prototype.inspect=function(){let Ae="";const pe=n.INSPECT_MAX_BYTES;return Ae=this.toString("hex",0,pe).replace(/(.{2})/g,"$1 ").trim(),this.length>pe&&(Ae+=" ... "),"<Buffer "+Ae+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(Ae,pe,et,St,Yt){if(fn(Ae,Uint8Array)&&(Ae=o.from(Ae,Ae.offset,Ae.byteLength)),!o.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ae);if(pe===void 0&&(pe=0),et===void 0&&(et=Ae?Ae.length:0),St===void 0&&(St=0),Yt===void 0&&(Yt=this.length),pe<0||et>Ae.length||St<0||Yt>this.length)throw new RangeError("out of range index");if(St>=Yt&&pe>=et)return 0;if(St>=Yt)return-1;if(pe>=et)return 1;if(pe>>>=0,et>>>=0,St>>>=0,Yt>>>=0,this===Ae)return 0;let rn=Yt-St,er=et-pe;const Be=Math.min(rn,er),oe=this.slice(St,Yt),ve=Ae.slice(pe,et);for(let p=0;p<Be;++p)if(oe[p]!==ve[p]){rn=oe[p],er=ve[p];break}return rn<er?-1:er<rn?1:0};function ee(Ge,Ae,pe,et,St){if(Ge.length===0)return-1;if(typeof pe=="string"?(et=pe,pe=0):pe>2147483647?pe=2147483647:pe<-2147483648&&(pe=-2147483648),pe=+pe,Hn(pe)&&(pe=St?0:Ge.length-1),pe<0&&(pe=Ge.length+pe),pe>=Ge.length){if(St)return-1;pe=Ge.length-1}else if(pe<0)if(St)pe=0;else return-1;if(typeof Ae=="string"&&(Ae=o.from(Ae,et)),o.isBuffer(Ae))return Ae.length===0?-1:N(Ge,Ae,pe,et,St);if(typeof Ae=="number")return Ae=Ae&255,typeof Uint8Array.prototype.indexOf=="function"?St?Uint8Array.prototype.indexOf.call(Ge,Ae,pe):Uint8Array.prototype.lastIndexOf.call(Ge,Ae,pe):N(Ge,[Ae],pe,et,St);throw new TypeError("val must be string, number or Buffer")}function N(Ge,Ae,pe,et,St){let Yt=1,rn=Ge.length,er=Ae.length;if(et!==void 0&&(et=String(et).toLowerCase(),et==="ucs2"||et==="ucs-2"||et==="utf16le"||et==="utf-16le")){if(Ge.length<2||Ae.length<2)return-1;Yt=2,rn/=2,er/=2,pe/=2}function Be(ve,p){return Yt===1?ve[p]:ve.readUInt16BE(p*Yt)}let oe;if(St){let ve=-1;for(oe=pe;oe<rn;oe++)if(Be(Ge,oe)===Be(Ae,ve===-1?0:oe-ve)){if(ve===-1&&(ve=oe),oe-ve+1===er)return ve*Yt}else ve!==-1&&(oe-=oe-ve),ve=-1}else for(pe+er>rn&&(pe=rn-er),oe=pe;oe>=0;oe--){let ve=!0;for(let p=0;p<er;p++)if(Be(Ge,oe+p)!==Be(Ae,p)){ve=!1;break}if(ve)return oe}return-1}o.prototype.includes=function(Ae,pe,et){return this.indexOf(Ae,pe,et)!==-1},o.prototype.indexOf=function(Ae,pe,et){return ee(this,Ae,pe,et,!0)},o.prototype.lastIndexOf=function(Ae,pe,et){return ee(this,Ae,pe,et,!1)};function ie(Ge,Ae,pe,et){pe=Number(pe)||0;const St=Ge.length-pe;et?(et=Number(et),et>St&&(et=St)):et=St;const Yt=Ae.length;et>Yt/2&&(et=Yt/2);let rn;for(rn=0;rn<et;++rn){const er=parseInt(Ae.substr(rn*2,2),16);if(Hn(er))return rn;Ge[pe+rn]=er}return rn}function he(Ge,Ae,pe,et){return Dn(mn(Ae,Ge.length-pe),Ge,pe,et)}function de(Ge,Ae,pe,et){return Dn(jn(Ae),Ge,pe,et)}function Me(Ge,Ae,pe,et){return Dn(ir(Ae),Ge,pe,et)}function fe(Ge,Ae,pe,et){return Dn(nn(Ae,Ge.length-pe),Ge,pe,et)}o.prototype.write=function(Ae,pe,et,St){if(pe===void 0)St="utf8",et=this.length,pe=0;else if(et===void 0&&typeof pe=="string")St=pe,et=this.length,pe=0;else if(isFinite(pe))pe=pe>>>0,isFinite(et)?(et=et>>>0,St===void 0&&(St="utf8")):(St=et,et=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Yt=this.length-pe;if((et===void 0||et>Yt)&&(et=Yt),Ae.length>0&&(et<0||pe<0)||pe>this.length)throw new RangeError("Attempt to write outside buffer bounds");St||(St="utf8");let rn=!1;for(;;)switch(St){case"hex":return ie(this,Ae,pe,et);case"utf8":case"utf-8":return he(this,Ae,pe,et);case"ascii":case"latin1":case"binary":return de(this,Ae,pe,et);case"base64":return Me(this,Ae,pe,et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,Ae,pe,et);default:if(rn)throw new TypeError("Unknown encoding: "+St);St=(""+St).toLowerCase(),rn=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function xe(Ge,Ae,pe){return Ae===0&&pe===Ge.length?e.fromByteArray(Ge):e.fromByteArray(Ge.slice(Ae,pe))}function De(Ge,Ae,pe){pe=Math.min(Ge.length,pe);const et=[];let St=Ae;for(;St<pe;){const Yt=Ge[St];let rn=null,er=Yt>239?4:Yt>223?3:Yt>191?2:1;if(St+er<=pe){let Be,oe,ve,p;switch(er){case 1:Yt<128&&(rn=Yt);break;case 2:Be=Ge[St+1],(Be&192)===128&&(p=(Yt&31)<<6|Be&63,p>127&&(rn=p));break;case 3:Be=Ge[St+1],oe=Ge[St+2],(Be&192)===128&&(oe&192)===128&&(p=(Yt&15)<<12|(Be&63)<<6|oe&63,p>2047&&(p<55296||p>57343)&&(rn=p));break;case 4:Be=Ge[St+1],oe=Ge[St+2],ve=Ge[St+3],(Be&192)===128&&(oe&192)===128&&(ve&192)===128&&(p=(Yt&15)<<18|(Be&63)<<12|(oe&63)<<6|ve&63,p>65535&&p<1114112&&(rn=p))}}rn===null?(rn=65533,er=1):rn>65535&&(rn-=65536,et.push(rn>>>10&1023|55296),rn=56320|rn&1023),et.push(rn),St+=er}return at(et)}const me=4096;function at(Ge){const Ae=Ge.length;if(Ae<=me)return String.fromCharCode.apply(String,Ge);let pe="",et=0;for(;et<Ae;)pe+=String.fromCharCode.apply(String,Ge.slice(et,et+=me));return pe}function Qe(Ge,Ae,pe){let et="";pe=Math.min(Ge.length,pe);for(let St=Ae;St<pe;++St)et+=String.fromCharCode(Ge[St]&127);return et}function He(Ge,Ae,pe){let et="";pe=Math.min(Ge.length,pe);for(let St=Ae;St<pe;++St)et+=String.fromCharCode(Ge[St]);return et}function We(Ge,Ae,pe){const et=Ge.length;(!Ae||Ae<0)&&(Ae=0),(!pe||pe<0||pe>et)&&(pe=et);let St="";for(let Yt=Ae;Yt<pe;++Yt)St+=wr[Ge[Yt]];return St}function Ce(Ge,Ae,pe){const et=Ge.slice(Ae,pe);let St="";for(let Yt=0;Yt<et.length-1;Yt+=2)St+=String.fromCharCode(et[Yt]+et[Yt+1]*256);return St}o.prototype.slice=function(Ae,pe){const et=this.length;Ae=~~Ae,pe=pe===void 0?et:~~pe,Ae<0?(Ae+=et,Ae<0&&(Ae=0)):Ae>et&&(Ae=et),pe<0?(pe+=et,pe<0&&(pe=0)):pe>et&&(pe=et),pe<Ae&&(pe=Ae);const St=this.subarray(Ae,pe);return Object.setPrototypeOf(St,o.prototype),St};function Te(Ge,Ae,pe){if(Ge%1!==0||Ge<0)throw new RangeError("offset is not uint");if(Ge+Ae>pe)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(Ae,pe,et){Ae=Ae>>>0,pe=pe>>>0,et||Te(Ae,pe,this.length);let St=this[Ae],Yt=1,rn=0;for(;++rn<pe&&(Yt*=256);)St+=this[Ae+rn]*Yt;return St},o.prototype.readUintBE=o.prototype.readUIntBE=function(Ae,pe,et){Ae=Ae>>>0,pe=pe>>>0,et||Te(Ae,pe,this.length);let St=this[Ae+--pe],Yt=1;for(;pe>0&&(Yt*=256);)St+=this[Ae+--pe]*Yt;return St},o.prototype.readUint8=o.prototype.readUInt8=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,1,this.length),this[Ae]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+this[Ae+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),this[Ae]*16777216+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},o.prototype.readBigUInt64LE=Qn(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");const pe=this[Ae],et=this[Ae+7];(pe===void 0||et===void 0)&&Ut(Ae,this.length-8);const St=pe+this[++Ae]*2**8+this[++Ae]*2**16+this[++Ae]*2**24,Yt=this[++Ae]+this[++Ae]*2**8+this[++Ae]*2**16+et*2**24;return BigInt(St)+(BigInt(Yt)<<BigInt(32))}),o.prototype.readBigUInt64BE=Qn(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");const pe=this[Ae],et=this[Ae+7];(pe===void 0||et===void 0)&&Ut(Ae,this.length-8);const St=pe*2**24+this[++Ae]*2**16+this[++Ae]*2**8+this[++Ae],Yt=this[++Ae]*2**24+this[++Ae]*2**16+this[++Ae]*2**8+et;return(BigInt(St)<<BigInt(32))+BigInt(Yt)}),o.prototype.readIntLE=function(Ae,pe,et){Ae=Ae>>>0,pe=pe>>>0,et||Te(Ae,pe,this.length);let St=this[Ae],Yt=1,rn=0;for(;++rn<pe&&(Yt*=256);)St+=this[Ae+rn]*Yt;return Yt*=128,St>=Yt&&(St-=Math.pow(2,8*pe)),St},o.prototype.readIntBE=function(Ae,pe,et){Ae=Ae>>>0,pe=pe>>>0,et||Te(Ae,pe,this.length);let St=pe,Yt=1,rn=this[Ae+--St];for(;St>0&&(Yt*=256);)rn+=this[Ae+--St]*Yt;return Yt*=128,rn>=Yt&&(rn-=Math.pow(2,8*pe)),rn},o.prototype.readInt8=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,1,this.length),this[Ae]&128?(255-this[Ae]+1)*-1:this[Ae]},o.prototype.readInt16LE=function(Ae,pe){Ae=Ae>>>0,pe||Te(Ae,2,this.length);const et=this[Ae]|this[Ae+1]<<8;return et&32768?et|4294901760:et},o.prototype.readInt16BE=function(Ae,pe){Ae=Ae>>>0,pe||Te(Ae,2,this.length);const et=this[Ae+1]|this[Ae]<<8;return et&32768?et|4294901760:et},o.prototype.readInt32LE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},o.prototype.readInt32BE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},o.prototype.readBigInt64LE=Qn(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");const pe=this[Ae],et=this[Ae+7];(pe===void 0||et===void 0)&&Ut(Ae,this.length-8);const St=this[Ae+4]+this[Ae+5]*2**8+this[Ae+6]*2**16+(et<<24);return(BigInt(St)<<BigInt(32))+BigInt(pe+this[++Ae]*2**8+this[++Ae]*2**16+this[++Ae]*2**24)}),o.prototype.readBigInt64BE=Qn(function(Ae){Ae=Ae>>>0,ht(Ae,"offset");const pe=this[Ae],et=this[Ae+7];(pe===void 0||et===void 0)&&Ut(Ae,this.length-8);const St=(pe<<24)+this[++Ae]*2**16+this[++Ae]*2**8+this[++Ae];return(BigInt(St)<<BigInt(32))+BigInt(this[++Ae]*2**24+this[++Ae]*2**16+this[++Ae]*2**8+et)}),o.prototype.readFloatLE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),t.read(this,Ae,!0,23,4)},o.prototype.readFloatBE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,4,this.length),t.read(this,Ae,!1,23,4)},o.prototype.readDoubleLE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,8,this.length),t.read(this,Ae,!0,52,8)},o.prototype.readDoubleBE=function(Ae,pe){return Ae=Ae>>>0,pe||Te(Ae,8,this.length),t.read(this,Ae,!1,52,8)};function rt(Ge,Ae,pe,et,St,Yt){if(!o.isBuffer(Ge))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>St||Ae<Yt)throw new RangeError('"value" argument is out of bounds');if(pe+et>Ge.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(Ae,pe,et,St){if(Ae=+Ae,pe=pe>>>0,et=et>>>0,!St){const er=Math.pow(2,8*et)-1;rt(this,Ae,pe,et,er,0)}let Yt=1,rn=0;for(this[pe]=Ae&255;++rn<et&&(Yt*=256);)this[pe+rn]=Ae/Yt&255;return pe+et},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(Ae,pe,et,St){if(Ae=+Ae,pe=pe>>>0,et=et>>>0,!St){const er=Math.pow(2,8*et)-1;rt(this,Ae,pe,et,er,0)}let Yt=et-1,rn=1;for(this[pe+Yt]=Ae&255;--Yt>=0&&(rn*=256);)this[pe+Yt]=Ae/rn&255;return pe+et},o.prototype.writeUint8=o.prototype.writeUInt8=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,1,255,0),this[pe]=Ae&255,pe+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,2,65535,0),this[pe]=Ae&255,this[pe+1]=Ae>>>8,pe+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,2,65535,0),this[pe]=Ae>>>8,this[pe+1]=Ae&255,pe+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,4,4294967295,0),this[pe+3]=Ae>>>24,this[pe+2]=Ae>>>16,this[pe+1]=Ae>>>8,this[pe]=Ae&255,pe+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,4,4294967295,0),this[pe]=Ae>>>24,this[pe+1]=Ae>>>16,this[pe+2]=Ae>>>8,this[pe+3]=Ae&255,pe+4};function yt(Ge,Ae,pe,et,St){_t(Ae,et,St,Ge,pe,7);let Yt=Number(Ae&BigInt(4294967295));Ge[pe++]=Yt,Yt=Yt>>8,Ge[pe++]=Yt,Yt=Yt>>8,Ge[pe++]=Yt,Yt=Yt>>8,Ge[pe++]=Yt;let rn=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ge[pe++]=rn,rn=rn>>8,Ge[pe++]=rn,rn=rn>>8,Ge[pe++]=rn,rn=rn>>8,Ge[pe++]=rn,pe}function bt(Ge,Ae,pe,et,St){_t(Ae,et,St,Ge,pe,7);let Yt=Number(Ae&BigInt(4294967295));Ge[pe+7]=Yt,Yt=Yt>>8,Ge[pe+6]=Yt,Yt=Yt>>8,Ge[pe+5]=Yt,Yt=Yt>>8,Ge[pe+4]=Yt;let rn=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ge[pe+3]=rn,rn=rn>>8,Ge[pe+2]=rn,rn=rn>>8,Ge[pe+1]=rn,rn=rn>>8,Ge[pe]=rn,pe+8}o.prototype.writeBigUInt64LE=Qn(function(Ae,pe=0){return yt(this,Ae,pe,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Qn(function(Ae,pe=0){return bt(this,Ae,pe,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(Ae,pe,et,St){if(Ae=+Ae,pe=pe>>>0,!St){const Be=Math.pow(2,8*et-1);rt(this,Ae,pe,et,Be-1,-Be)}let Yt=0,rn=1,er=0;for(this[pe]=Ae&255;++Yt<et&&(rn*=256);)Ae<0&&er===0&&this[pe+Yt-1]!==0&&(er=1),this[pe+Yt]=(Ae/rn>>0)-er&255;return pe+et},o.prototype.writeIntBE=function(Ae,pe,et,St){if(Ae=+Ae,pe=pe>>>0,!St){const Be=Math.pow(2,8*et-1);rt(this,Ae,pe,et,Be-1,-Be)}let Yt=et-1,rn=1,er=0;for(this[pe+Yt]=Ae&255;--Yt>=0&&(rn*=256);)Ae<0&&er===0&&this[pe+Yt+1]!==0&&(er=1),this[pe+Yt]=(Ae/rn>>0)-er&255;return pe+et},o.prototype.writeInt8=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[pe]=Ae&255,pe+1},o.prototype.writeInt16LE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,2,32767,-32768),this[pe]=Ae&255,this[pe+1]=Ae>>>8,pe+2},o.prototype.writeInt16BE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,2,32767,-32768),this[pe]=Ae>>>8,this[pe+1]=Ae&255,pe+2},o.prototype.writeInt32LE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,4,2147483647,-2147483648),this[pe]=Ae&255,this[pe+1]=Ae>>>8,this[pe+2]=Ae>>>16,this[pe+3]=Ae>>>24,pe+4},o.prototype.writeInt32BE=function(Ae,pe,et){return Ae=+Ae,pe=pe>>>0,et||rt(this,Ae,pe,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[pe]=Ae>>>24,this[pe+1]=Ae>>>16,this[pe+2]=Ae>>>8,this[pe+3]=Ae&255,pe+4},o.prototype.writeBigInt64LE=Qn(function(Ae,pe=0){return yt(this,Ae,pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Qn(function(Ae,pe=0){return bt(this,Ae,pe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function gt(Ge,Ae,pe,et,St,Yt){if(pe+et>Ge.length)throw new RangeError("Index out of range");if(pe<0)throw new RangeError("Index out of range")}function Dt(Ge,Ae,pe,et,St){return Ae=+Ae,pe=pe>>>0,St||gt(Ge,Ae,pe,4),t.write(Ge,Ae,pe,et,23,4),pe+4}o.prototype.writeFloatLE=function(Ae,pe,et){return Dt(this,Ae,pe,!0,et)},o.prototype.writeFloatBE=function(Ae,pe,et){return Dt(this,Ae,pe,!1,et)};function Pt(Ge,Ae,pe,et,St){return Ae=+Ae,pe=pe>>>0,St||gt(Ge,Ae,pe,8),t.write(Ge,Ae,pe,et,52,8),pe+8}o.prototype.writeDoubleLE=function(Ae,pe,et){return Pt(this,Ae,pe,!0,et)},o.prototype.writeDoubleBE=function(Ae,pe,et){return Pt(this,Ae,pe,!1,et)},o.prototype.copy=function(Ae,pe,et,St){if(!o.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(et||(et=0),!St&&St!==0&&(St=this.length),pe>=Ae.length&&(pe=Ae.length),pe||(pe=0),St>0&&St<et&&(St=et),St===et||Ae.length===0||this.length===0)return 0;if(pe<0)throw new RangeError("targetStart out of bounds");if(et<0||et>=this.length)throw new RangeError("Index out of range");if(St<0)throw new RangeError("sourceEnd out of bounds");St>this.length&&(St=this.length),Ae.length-pe<St-et&&(St=Ae.length-pe+et);const Yt=St-et;return this===Ae&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(pe,et,St):Uint8Array.prototype.set.call(Ae,this.subarray(et,St),pe),Yt},o.prototype.fill=function(Ae,pe,et,St){if(typeof Ae=="string"){if(typeof pe=="string"?(St=pe,pe=0,et=this.length):typeof et=="string"&&(St=et,et=this.length),St!==void 0&&typeof St!="string")throw new TypeError("encoding must be a string");if(typeof St=="string"&&!o.isEncoding(St))throw new TypeError("Unknown encoding: "+St);if(Ae.length===1){const rn=Ae.charCodeAt(0);(St==="utf8"&&rn<128||St==="latin1")&&(Ae=rn)}}else typeof Ae=="number"?Ae=Ae&255:typeof Ae=="boolean"&&(Ae=Number(Ae));if(pe<0||this.length<pe||this.length<et)throw new RangeError("Out of range index");if(et<=pe)return this;pe=pe>>>0,et=et===void 0?this.length:et>>>0,Ae||(Ae=0);let Yt;if(typeof Ae=="number")for(Yt=pe;Yt<et;++Yt)this[Yt]=Ae;else{const rn=o.isBuffer(Ae)?Ae:o.from(Ae,St),er=rn.length;if(er===0)throw new TypeError('The value "'+Ae+'" is invalid for argument "value"');for(Yt=0;Yt<et-pe;++Yt)this[Yt+pe]=rn[Yt%er]}return this};const Le={};function Pe(Ge,Ae,pe){Le[Ge]=class extends pe{constructor(){super(),Object.defineProperty(this,"message",{value:Ae.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Ge}]`,this.stack,delete this.name}get code(){return Ge}set code(St){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:St,writable:!0})}toString(){return`${this.name} [${Ge}]: ${this.message}`}}}Pe("ERR_BUFFER_OUT_OF_BOUNDS",function(Ge){return Ge?`${Ge} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pe("ERR_INVALID_ARG_TYPE",function(Ge,Ae){return`The "${Ge}" argument must be of type number. Received type ${typeof Ae}`},TypeError),Pe("ERR_OUT_OF_RANGE",function(Ge,Ae,pe){let et=`The value of "${Ge}" is out of range.`,St=pe;return Number.isInteger(pe)&&Math.abs(pe)>2**32?St=Ee(String(pe)):typeof pe=="bigint"&&(St=String(pe),(pe>BigInt(2)**BigInt(32)||pe<-(BigInt(2)**BigInt(32)))&&(St=Ee(St)),St+="n"),et+=` It must be ${Ae}. Received ${St}`,et},RangeError);function Ee(Ge){let Ae="",pe=Ge.length;const et=Ge[0]==="-"?1:0;for(;pe>=et+4;pe-=3)Ae=`_${Ge.slice(pe-3,pe)}${Ae}`;return`${Ge.slice(0,pe)}${Ae}`}function nt(Ge,Ae,pe){ht(Ae,"offset"),(Ge[Ae]===void 0||Ge[Ae+pe]===void 0)&&Ut(Ae,Ge.length-(pe+1))}function _t(Ge,Ae,pe,et,St,Yt){if(Ge>pe||Ge<Ae){const rn=typeof Ae=="bigint"?"n":"";let er;throw Ae===0||Ae===BigInt(0)?er=`>= 0${rn} and < 2${rn} ** ${(Yt+1)*8}${rn}`:er=`>= -(2${rn} ** ${(Yt+1)*8-1}${rn}) and < 2 ** ${(Yt+1)*8-1}${rn}`,new Le.ERR_OUT_OF_RANGE("value",er,Ge)}nt(et,St,Yt)}function ht(Ge,Ae){if(typeof Ge!="number")throw new Le.ERR_INVALID_ARG_TYPE(Ae,"number",Ge)}function Ut(Ge,Ae,pe){throw Math.floor(Ge)!==Ge?(ht(Ge,pe),new Le.ERR_OUT_OF_RANGE("offset","an integer",Ge)):Ae<0?new Le.ERR_BUFFER_OUT_OF_BOUNDS:new Le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Ae}`,Ge)}const en=/[^+/0-9A-Za-z-_]/g;function Ft(Ge){if(Ge=Ge.split("=")[0],Ge=Ge.trim().replace(en,""),Ge.length<2)return"";for(;Ge.length%4!==0;)Ge=Ge+"=";return Ge}function mn(Ge,Ae){Ae=Ae||1/0;let pe;const et=Ge.length;let St=null;const Yt=[];for(let rn=0;rn<et;++rn){if(pe=Ge.charCodeAt(rn),pe>55295&&pe<57344){if(!St){if(pe>56319){(Ae-=3)>-1&&Yt.push(239,191,189);continue}else if(rn+1===et){(Ae-=3)>-1&&Yt.push(239,191,189);continue}St=pe;continue}if(pe<56320){(Ae-=3)>-1&&Yt.push(239,191,189),St=pe;continue}pe=(St-55296<<10|pe-56320)+65536}else St&&(Ae-=3)>-1&&Yt.push(239,191,189);if(St=null,pe<128){if((Ae-=1)<0)break;Yt.push(pe)}else if(pe<2048){if((Ae-=2)<0)break;Yt.push(pe>>6|192,pe&63|128)}else if(pe<65536){if((Ae-=3)<0)break;Yt.push(pe>>12|224,pe>>6&63|128,pe&63|128)}else if(pe<1114112){if((Ae-=4)<0)break;Yt.push(pe>>18|240,pe>>12&63|128,pe>>6&63|128,pe&63|128)}else throw new Error("Invalid code point")}return Yt}function jn(Ge){const Ae=[];for(let pe=0;pe<Ge.length;++pe)Ae.push(Ge.charCodeAt(pe)&255);return Ae}function nn(Ge,Ae){let pe,et,St;const Yt=[];for(let rn=0;rn<Ge.length&&!((Ae-=2)<0);++rn)pe=Ge.charCodeAt(rn),et=pe>>8,St=pe%256,Yt.push(St),Yt.push(et);return Yt}function ir(Ge){return e.toByteArray(Ft(Ge))}function Dn(Ge,Ae,pe,et){let St;for(St=0;St<et&&!(St+pe>=Ae.length||St>=Ge.length);++St)Ae[St+pe]=Ge[St];return St}function fn(Ge,Ae){return Ge instanceof Ae||Ge!=null&&Ge.constructor!=null&&Ge.constructor.name!=null&&Ge.constructor.name===Ae.name}function Hn(Ge){return Ge!==Ge}const wr=function(){const Ge="0123456789abcdef",Ae=new Array(256);for(let pe=0;pe<16;++pe){const et=pe*16;for(let St=0;St<16;++St)Ae[et+St]=Ge[pe]+Ge[St]}return Ae}();function Qn(Ge){return typeof BigInt>"u"?Xn:Ge}function Xn(){throw new Error("BigInt not supported")}}(N3)),N3}var _q=Cq();const bq=Ha(_q);var W3,zI;function xq(){if(zI)return W3;zI=1;var n="Expected a function",e="__lodash_hash_undefined__",t="[object Function]",r="[object GeneratorFunction]",i="[object Symbol]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/,o=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/[\\^$.*+?()[\]{}|]/g,b=/\\(\\)?/g,E=/^\[object .+?Constructor\]$/,S=typeof window=="object"&&window&&window.Object===Object&&window,O=typeof self=="object"&&self&&self.Object===Object&&self,k=S||O||Function("return this")();function U(oe,ve){return oe==null?void 0:oe[ve]}function z(oe){var ve=!1;if(oe!=null&&typeof oe.toString!="function")try{ve=!!(oe+"")}catch{}return ve}var q=Array.prototype,Q=Function.prototype,re=Object.prototype,X=k["__core-js_shared__"],Y=function(){var oe=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return oe?"Symbol(src)_1."+oe:""}(),ee=Q.toString,N=re.hasOwnProperty,ie=re.toString,he=RegExp("^"+ee.call(N).replace(g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=k.Symbol,Me=q.splice,fe=ir(k,"Map"),xe=ir(Object,"create"),De=de?de.prototype:void 0,me=De?De.toString:void 0;function at(oe){var ve=-1,p=oe?oe.length:0;for(this.clear();++ve<p;){var je=oe[ve];this.set(je[0],je[1])}}function Qe(){this.__data__=xe?xe(null):{}}function He(oe){return this.has(oe)&&delete this.__data__[oe]}function We(oe){var ve=this.__data__;if(xe){var p=ve[oe];return p===e?void 0:p}return N.call(ve,oe)?ve[oe]:void 0}function Ce(oe){var ve=this.__data__;return xe?ve[oe]!==void 0:N.call(ve,oe)}function Te(oe,ve){var p=this.__data__;return p[oe]=xe&&ve===void 0?e:ve,this}at.prototype.clear=Qe,at.prototype.delete=He,at.prototype.get=We,at.prototype.has=Ce,at.prototype.set=Te;function rt(oe){var ve=-1,p=oe?oe.length:0;for(this.clear();++ve<p;){var je=oe[ve];this.set(je[0],je[1])}}function yt(){this.__data__=[]}function bt(oe){var ve=this.__data__,p=Ut(ve,oe);if(p<0)return!1;var je=ve.length-1;return p==je?ve.pop():Me.call(ve,p,1),!0}function gt(oe){var ve=this.__data__,p=Ut(ve,oe);return p<0?void 0:ve[p][1]}function Dt(oe){return Ut(this.__data__,oe)>-1}function Pt(oe,ve){var p=this.__data__,je=Ut(p,oe);return je<0?p.push([oe,ve]):p[je][1]=ve,this}rt.prototype.clear=yt,rt.prototype.delete=bt,rt.prototype.get=gt,rt.prototype.has=Dt,rt.prototype.set=Pt;function Le(oe){var ve=-1,p=oe?oe.length:0;for(this.clear();++ve<p;){var je=oe[ve];this.set(je[0],je[1])}}function Pe(){this.__data__={hash:new at,map:new(fe||rt),string:new at}}function Ee(oe){return nn(this,oe).delete(oe)}function nt(oe){return nn(this,oe).get(oe)}function _t(oe){return nn(this,oe).has(oe)}function ht(oe,ve){return nn(this,oe).set(oe,ve),this}Le.prototype.clear=Pe,Le.prototype.delete=Ee,Le.prototype.get=nt,Le.prototype.has=_t,Le.prototype.set=ht;function Ut(oe,ve){for(var p=oe.length;p--;)if(Ae(oe[p][0],ve))return p;return-1}function en(oe,ve){ve=Dn(ve,oe)?[ve]:jn(ve);for(var p=0,je=ve.length;oe!=null&&p<je;)oe=oe[Qn(ve[p++])];return p&&p==je?oe:void 0}function Ft(oe){if(!St(oe)||Hn(oe))return!1;var ve=et(oe)||z(oe)?he:E;return ve.test(Xn(oe))}function mn(oe){if(typeof oe=="string")return oe;if(rn(oe))return me?me.call(oe):"";var ve=oe+"";return ve=="0"&&1/oe==-1/0?"-0":ve}function jn(oe){return pe(oe)?oe:wr(oe)}function nn(oe,ve){var p=oe.__data__;return fn(ve)?p[typeof ve=="string"?"string":"hash"]:p.map}function ir(oe,ve){var p=U(oe,ve);return Ft(p)?p:void 0}function Dn(oe,ve){if(pe(oe))return!1;var p=typeof oe;return p=="number"||p=="symbol"||p=="boolean"||oe==null||rn(oe)?!0:a.test(oe)||!s.test(oe)||ve!=null&&oe in Object(ve)}function fn(oe){var ve=typeof oe;return ve=="string"||ve=="number"||ve=="symbol"||ve=="boolean"?oe!=="__proto__":oe===null}function Hn(oe){return!!Y&&Y in oe}var wr=Ge(function(oe){oe=er(oe);var ve=[];return o.test(oe)&&ve.push(""),oe.replace(d,function(p,je,Ye,tt){ve.push(Ye?tt.replace(b,"$1"):je||p)}),ve});function Qn(oe){if(typeof oe=="string"||rn(oe))return oe;var ve=oe+"";return ve=="0"&&1/oe==-1/0?"-0":ve}function Xn(oe){if(oe!=null){try{return ee.call(oe)}catch{}try{return oe+""}catch{}}return""}function Ge(oe,ve){if(typeof oe!="function"||ve&&typeof ve!="function")throw new TypeError(n);var p=function(){var je=arguments,Ye=ve?ve.apply(this,je):je[0],tt=p.cache;if(tt.has(Ye))return tt.get(Ye);var ct=oe.apply(this,je);return p.cache=tt.set(Ye,ct),ct};return p.cache=new(Ge.Cache||Le),p}Ge.Cache=Le;function Ae(oe,ve){return oe===ve||oe!==oe&&ve!==ve}var pe=Array.isArray;function et(oe){var ve=St(oe)?ie.call(oe):"";return ve==t||ve==r}function St(oe){var ve=typeof oe;return!!oe&&(ve=="object"||ve=="function")}function Yt(oe){return!!oe&&typeof oe=="object"}function rn(oe){return typeof oe=="symbol"||Yt(oe)&&ie.call(oe)==i}function er(oe){return oe==null?"":mn(oe)}function Be(oe,ve,p){var je=oe==null?void 0:en(oe,ve);return je===void 0?p:je}return W3=Be,W3}var wq=xq();const Mq=Ha(wq);var yv={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 Sq=yv.exports,jI;function Eq(){return jI||(jI=1,function(n,e){(function(){var t,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",o="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",g=500,b="__lodash_placeholder__",E=1,S=2,O=4,k=1,U=2,z=1,q=2,Q=4,re=8,X=16,Y=32,ee=64,N=128,ie=256,he=512,de=30,Me="...",fe=800,xe=16,De=1,me=2,at=3,Qe=1/0,He=9007199254740991,We=17976931348623157e292,Ce=NaN,Te=4294967295,rt=Te-1,yt=Te>>>1,bt=[["ary",N],["bind",z],["bindKey",q],["curry",re],["curryRight",X],["flip",he],["partial",Y],["partialRight",ee],["rearg",ie]],gt="[object Arguments]",Dt="[object Array]",Pt="[object AsyncFunction]",Le="[object Boolean]",Pe="[object Date]",Ee="[object DOMException]",nt="[object Error]",_t="[object Function]",ht="[object GeneratorFunction]",Ut="[object Map]",en="[object Number]",Ft="[object Null]",mn="[object Object]",jn="[object Promise]",nn="[object Proxy]",ir="[object RegExp]",Dn="[object Set]",fn="[object String]",Hn="[object Symbol]",wr="[object Undefined]",Qn="[object WeakMap]",Xn="[object WeakSet]",Ge="[object ArrayBuffer]",Ae="[object DataView]",pe="[object Float32Array]",et="[object Float64Array]",St="[object Int8Array]",Yt="[object Int16Array]",rn="[object Int32Array]",er="[object Uint8Array]",Be="[object Uint8ClampedArray]",oe="[object Uint16Array]",ve="[object Uint32Array]",p=/\b__p \+= '';/g,je=/\b(__p \+=) '' \+/g,Ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tt=/&(?:amp|lt|gt|quot|#39);/g,ct=/[&<>"']/g,At=RegExp(tt.source),Gt=RegExp(ct.source),$t=/<%-([\s\S]+?)%>/g,jt=/<%([\s\S]+?)%>/g,xt=/<%=([\s\S]+?)%>/g,Rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bn=/^\w*$/,fr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Sr=/[\\^$.*+?()[\]{}|]/g,on=RegExp(Sr.source),Nn=/^\s+/,Fn=/\s/,Or=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Er=/\{\n\/\* \[wrapped with (.+)\] \*/,Dr=/,? & /,ur=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,co=/[()=,{}\[\]\/\s]/,Sa=/\\(\\)?/g,qi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yi=/\w*$/,oo=/^[-+]0x[0-9a-f]+$/i,Mo=/^0b[01]+$/i,Ti=/^\[object .+?Constructor\]$/,La=/^0o[0-7]+$/i,Ea=/^(?:0|[1-9]\d*)$/,ns=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Aa=/($^)/,Al=/['\n\r\u2028\u2029\\]/g,ao="\\ud800-\\udfff",Pu="\\u0300-\\u036f",tu="\\ufe20-\\ufe2f",so="\\u20d0-\\u20ff",Kr=Pu+tu+so,Za="\\u2700-\\u27bf",Ps="a-z\\xdf-\\xf6\\xf8-\\xff",ia="\\xac\\xb1\\xd7\\xf7",qe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wt="\\u2000-\\u206f",gn=" \\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",qn="A-Z\\xc0-\\xd6\\xd8-\\xde",An="\\ufe0e\\ufe0f",sr=ia+qe+wt+gn,Pi="['’]",ho="["+ao+"]",Cs="["+sr+"]",Ns="["+Kr+"]",vA="\\d+",ri="["+Za+"]",wi="["+Ps+"]",Xa="[^"+ao+sr+vA+Za+Ps+qn+"]",Ai="\\ud83c[\\udffb-\\udfff]",ca="(?:"+Ns+"|"+Ai+")",iA="[^"+ao+"]",ls="(?:\\ud83c[\\udde6-\\uddff]){2}",Fr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+qn+"]",Ja="\\u200d",Rs="(?:"+wi+"|"+Xa+")",So="(?:"+Ei+"|"+Xa+")",Ws="(?:"+Pi+"(?:d|ll|m|re|s|t|ve))?",hu="(?:"+Pi+"(?:D|LL|M|RE|S|T|VE))?",zl=ca+"?",rs="["+An+"]?",Vs="(?:"+Ja+"(?:"+[iA,ls,Fr].join("|")+")"+rs+zl+")*",fo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ms="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ms=rs+zl+Vs,el="(?:"+[ri,ls,Fr].join("|")+")"+Ms,Ds="(?:"+[iA+Ns+"?",Ns,ls,Fr,ho].join("|")+")",El=RegExp(Pi,"g"),oA=RegExp(Ns,"g"),Vi=RegExp(Ai+"(?="+Ai+")|"+Ds+Ms,"g"),nu=RegExp([Ei+"?"+wi+"+"+Ws+"(?="+[Cs,Ei,"$"].join("|")+")",So+"+"+hu+"(?="+[Cs,Ei+Rs,"$"].join("|")+")",Ei+"?"+Rs+"+"+Ws,Ei+"+"+hu,ms,fo,vA,el].join("|"),"g"),Ui=RegExp("["+Ja+ao+Kr+An+"]"),Jr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ru=["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"],Ni=-1,lo={};lo[pe]=lo[et]=lo[St]=lo[Yt]=lo[rn]=lo[er]=lo[Be]=lo[oe]=lo[ve]=!0,lo[gt]=lo[Dt]=lo[Ge]=lo[Le]=lo[Ae]=lo[Pe]=lo[nt]=lo[_t]=lo[Ut]=lo[en]=lo[mn]=lo[ir]=lo[Dn]=lo[fn]=lo[Qn]=!1;var Ri={};Ri[gt]=Ri[Dt]=Ri[Ge]=Ri[Ae]=Ri[Le]=Ri[Pe]=Ri[pe]=Ri[et]=Ri[St]=Ri[Yt]=Ri[rn]=Ri[Ut]=Ri[en]=Ri[mn]=Ri[ir]=Ri[Dn]=Ri[fn]=Ri[Hn]=Ri[er]=Ri[Be]=Ri[oe]=Ri[ve]=!0,Ri[nt]=Ri[_t]=Ri[Qn]=!1;var J={À:"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"},Oe={"&":"&","<":"<",">":">",'"':""","'":"'"},ot={"&":"&","<":"<",">":">",""":'"',"'":"'"},Vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ir=parseFloat,Yn=parseInt,si=typeof window=="object"&&window&&window.Object===Object&&window,ci=typeof self=="object"&&self&&self.Object===Object&&self,vr=si||ci||Function("return this")(),kr=e&&!e.nodeType&&e,vi=kr&&!0&&n&&!n.nodeType&&n,Eo=vi&&vi.exports===kr,ki=Eo&&si.process,qr=function(){try{var Ht=vi&&vi.require&&vi.require("util").types;return Ht||ki&&ki.binding&&ki.binding("util")}catch{}}(),Hi=qr&&qr.isArrayBuffer,Zi=qr&&qr.isDate,us=qr&&qr.isMap,ya=qr&&qr.isRegExp,Ua=qr&&qr.isSet,fu=qr&&qr.isTypedArray;function Hs(Ht,Pn,an){switch(an.length){case 0:return Ht.call(Pn);case 1:return Ht.call(Pn,an[0]);case 2:return Ht.call(Pn,an[0],an[1]);case 3:return Ht.call(Pn,an[0],an[1],an[2])}return Ht.apply(Pn,an)}function dc(Ht,Pn,an,Ur){for(var Ci=-1,_o=Ht==null?0:Ht.length;++Ci<_o;){var oa=Ht[Ci];Pn(Ur,oa,an(oa),Ht)}return Ur}function Ba(Ht,Pn){for(var an=-1,Ur=Ht==null?0:Ht.length;++an<Ur&&Pn(Ht[an],an,Ht)!==!1;);return Ht}function cl(Ht,Pn){for(var an=Ht==null?0:Ht.length;an--&&Pn(Ht[an],an,Ht)!==!1;);return Ht}function ld(Ht,Pn){for(var an=-1,Ur=Ht==null?0:Ht.length;++an<Ur;)if(!Pn(Ht[an],an,Ht))return!1;return!0}function Ru(Ht,Pn){for(var an=-1,Ur=Ht==null?0:Ht.length,Ci=0,_o=[];++an<Ur;){var oa=Ht[an];Pn(oa,an,Ht)&&(_o[Ci++]=oa)}return _o}function Du(Ht,Pn){var an=Ht==null?0:Ht.length;return!!an&&Zs(Ht,Pn,0)>-1}function bh(Ht,Pn,an){for(var Ur=-1,Ci=Ht==null?0:Ht.length;++Ur<Ci;)if(an(Pn,Ht[Ur]))return!0;return!1}function Ss(Ht,Pn){for(var an=-1,Ur=Ht==null?0:Ht.length,Ci=Array(Ur);++an<Ur;)Ci[an]=Pn(Ht[an],an,Ht);return Ci}function Ku(Ht,Pn){for(var an=-1,Ur=Pn.length,Ci=Ht.length;++an<Ur;)Ht[Ci+an]=Pn[an];return Ht}function ud(Ht,Pn,an,Ur){var Ci=-1,_o=Ht==null?0:Ht.length;for(Ur&&_o&&(an=Ht[++Ci]);++Ci<_o;)an=Pn(an,Ht[Ci],Ci,Ht);return an}function gp(Ht,Pn,an,Ur){var Ci=Ht==null?0:Ht.length;for(Ur&&Ci&&(an=Ht[--Ci]);Ci--;)an=Pn(an,Ht[Ci],Ci,Ht);return an}function sA(Ht,Pn){for(var an=-1,Ur=Ht==null?0:Ht.length;++an<Ur;)if(Pn(Ht[an],an,Ht))return!0;return!1}var qd=ef("length");function Fc(Ht){return Ht.split("")}function yp(Ht){return Ht.match(ur)||[]}function Pf(Ht,Pn,an){var Ur;return an(Ht,function(Ci,_o,oa){if(Pn(Ci,_o,oa))return Ur=_o,!1}),Ur}function hc(Ht,Pn,an,Ur){for(var Ci=Ht.length,_o=an+(Ur?1:-1);Ur?_o--:++_o<Ci;)if(Pn(Ht[_o],_o,Ht))return _o;return-1}function Zs(Ht,Pn,an){return Pn===Pn?Eh(Ht,Pn,an):hc(Ht,Jh,an)}function xh(Ht,Pn,an,Ur){for(var Ci=an-1,_o=Ht.length;++Ci<_o;)if(Ur(Ht[Ci],Pn))return Ci;return-1}function Jh(Ht){return Ht!==Ht}function Ad(Ht,Pn){var an=Ht==null?0:Ht.length;return an?Mh(Ht,Pn)/an:Ce}function ef(Ht){return function(Pn){return Pn==null?t:Pn[Ht]}}function cd(Ht){return function(Pn){return Ht==null?t:Ht[Pn]}}function fc(Ht,Pn,an,Ur,Ci){return Ci(Ht,function(_o,oa,Vo){an=Ur?(Ur=!1,_o):Pn(an,_o,oa,Vo)}),an}function wh(Ht,Pn){var an=Ht.length;for(Ht.sort(Pn);an--;)Ht[an]=Ht[an].value;return Ht}function Mh(Ht,Pn){for(var an,Ur=-1,Ci=Ht.length;++Ur<Ci;){var _o=Pn(Ht[Ur]);_o!==t&&(an=an===t?_o:an+_o)}return an}function dd(Ht,Pn){for(var an=-1,Ur=Array(Ht);++an<Ht;)Ur[an]=Pn(an);return Ur}function am(Ht,Pn){return Ss(Pn,function(an){return[an,Ht[an]]})}function Lc(Ht){return Ht&&Ht.slice(0,$d(Ht)+1).replace(Nn,"")}function pu(Ht){return function(Pn){return Ht(Pn)}}function Sh(Ht,Pn){return Ss(Pn,function(an){return Ht[an]})}function mu(Ht,Pn){return Ht.has(Pn)}function aA(Ht,Pn){for(var an=-1,Ur=Ht.length;++an<Ur&&Zs(Pn,Ht[an],0)>-1;);return an}function Uc(Ht,Pn){for(var an=Ht.length;an--&&Zs(Pn,Ht[an],0)>-1;);return an}function Yd(Ht,Pn){for(var an=Ht.length,Ur=0;an--;)Ht[an]===Pn&&++Ur;return Ur}var tf=cd(J),iu=cd(Oe);function Bl(Ht){return"\\"+Vt[Ht]}function GA(Ht,Pn){return Ht==null?t:Ht[Pn]}function zc(Ht){return Ui.test(Ht)}function nf(Ht){return Jr.test(Ht)}function Rf(Ht){for(var Pn,an=[];!(Pn=Ht.next()).done;)an.push(Pn.value);return an}function hd(Ht){var Pn=-1,an=Array(Ht.size);return Ht.forEach(function(Ur,Ci){an[++Pn]=[Ci,Ur]}),an}function CA(Ht,Pn){return function(an){return Ht(Pn(an))}}function tl(Ht,Pn){for(var an=-1,Ur=Ht.length,Ci=0,_o=[];++an<Ur;){var oa=Ht[an];(oa===Pn||oa===b)&&(Ht[an]=b,_o[Ci++]=an)}return _o}function Ol(Ht){var Pn=-1,an=Array(Ht.size);return Ht.forEach(function(Ur){an[++Pn]=Ur}),an}function $o(Ht){var Pn=-1,an=Array(Ht.size);return Ht.forEach(function(Ur){an[++Pn]=[Ur,Ur]}),an}function Eh(Ht,Pn,an){for(var Ur=an-1,Ci=Ht.length;++Ur<Ci;)if(Ht[Ur]===Pn)return Ur;return-1}function lm(Ht,Pn,an){for(var Ur=an+1;Ur--;)if(Ht[Ur]===Pn)return Ur;return Ur}function jc(Ht){return zc(Ht)?pc(Ht):qd(Ht)}function Fu(Ht){return zc(Ht)?Hd(Ht):Fc(Ht)}function $d(Ht){for(var Pn=Ht.length;Pn--&&Fn.test(Ht.charAt(Pn)););return Pn}var Vd=cd(ot);function pc(Ht){for(var Pn=Vi.lastIndex=0;Vi.test(Ht);)++Pn;return Pn}function Hd(Ht){return Ht.match(Vi)||[]}function rf(Ht){return Ht.match(nu)||[]}var mc=function Ht(Pn){Pn=Pn==null?vr:gu.defaults(vr.Object(),Pn,gu.pick(vr,ru));var an=Pn.Array,Ur=Pn.Date,Ci=Pn.Error,_o=Pn.Function,oa=Pn.Math,Vo=Pn.Object,QA=Pn.RegExp,vp=Pn.String,Il=Pn.TypeError,yu=an.prototype,qA=_o.prototype,kl=Vo.prototype,Wi=Pn["__core-js_shared__"],YA=qA.toString,Uo=kl.hasOwnProperty,Nc=0,$A=function(){var x=/[^.]+$/.exec(Wi&&Wi.keys&&Wi.keys.IE_PROTO||"");return x?"Symbol(src)_1."+x:""}(),_A=kl.toString,lA=YA.call(Vo),Tl=vr._,gc=QA("^"+YA.call(Uo).replace(Sr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vu=Eo?Pn.Buffer:t,jl=Pn.Symbol,Wc=Pn.Uint8Array,Zd=vu?vu.allocUnsafe:t,za=CA(Vo.getPrototypeOf,Vo),fd=Vo.create,yc=kl.propertyIsEnumerable,VA=yu.splice,of=jl?jl.isConcatSpreadable:t,bA=jl?jl.iterator:t,HA=jl?jl.toStringTag:t,Gc=function(){try{var x=Td(Vo,"defineProperty");return x({},"",{}),x}catch{}}(),Xd=Pn.clearTimeout!==vr.clearTimeout&&Pn.clearTimeout,Ho=Ur&&Ur.now!==vr.Date.now&&Ur.now,Qc=Pn.setTimeout!==vr.setTimeout&&Pn.setTimeout,ZA=oa.ceil,Lu=oa.floor,qc=Vo.getOwnPropertySymbols,Jd=vu?vu.isBuffer:t,Yc=Pn.isFinite,vc=yu.join,As=CA(Vo.keys,Vo),zo=oa.max,cs=oa.min,Df=Ur.now,pd=Pn.parseInt,md=oa.random,Uu=yu.reverse,XA=Td(Pn,"DataView"),Nl=Td(Pn,"Map"),xA=Td(Pn,"Promise"),dl=Td(Pn,"Set"),JA=Td(Pn,"WeakMap"),zu=Td(Vo,"create"),gd=JA&&new JA,ju={},eh=ba(XA),ec=ba(Nl),Nu=ba(xA),Wu=ba(dl),wA=ba(JA),Cc=jl?jl.prototype:t,Cu=Cc?Cc.valueOf:t,$c=Cc?Cc.toString:t;function it(x){if(xl(x)&&!vo(x)&&!(x instanceof $r)){if(x instanceof Di)return x;if(Uo.call(x,"__wrapped__"))return Yl(x)}return new Di(x)}var ja=function(){function x(){}return function(P){if(!bl(P))return{};if(fd)return fd(P);x.prototype=P;var V=new x;return x.prototype=t,V}}();function Bo(){}function Di(x,P){this.__wrapped__=x,this.__actions__=[],this.__chain__=!!P,this.__index__=0,this.__values__=t}it.templateSettings={escape:$t,evaluate:jt,interpolate:xt,variable:"",imports:{_:it}},it.prototype=Bo.prototype,it.prototype.constructor=it,Di.prototype=ja(Bo.prototype),Di.prototype.constructor=Di;function $r(x){this.__wrapped__=x,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Te,this.__views__=[]}function Es(){var x=new $r(this.__wrapped__);return x.__actions__=Ta(this.__actions__),x.__dir__=this.__dir__,x.__filtered__=this.__filtered__,x.__iteratees__=Ta(this.__iteratees__),x.__takeCount__=this.__takeCount__,x.__views__=Ta(this.__views__),x}function yd(){if(this.__filtered__){var x=new $r(this);x.__dir__=-1,x.__filtered__=!0}else x=this.clone(),x.__dir__*=-1;return x}function th(){var x=this.__wrapped__.value(),P=this.__dir__,V=vo(x),ye=P<0,Ve=V?x.length:0,dt=cm(0,Ve,this.__views__),Kt=dt.start,qt=dt.end,sn=qt-Kt,$n=ye?qt:Kt-1,Vn=this.__iteratees__,pr=Vn.length,Zr=0,xi=cs(sn,this.__takeCount__);if(!V||!ye&&Ve==sn&&xi==sn)return pl(x,this.__actions__);var Ji=[];e:for(;sn--&&Zr<xi;){$n+=P;for(var os=-1,eo=x[$n];++os<pr;){var ws=Vn[os],Ls=ws.iteratee,Nh=ws.type,zd=Ls(eo);if(Nh==me)eo=zd;else if(!zd){if(Nh==De)continue e;break e}}Ji[Zr++]=eo}return Ji}$r.prototype=ja(Bo.prototype),$r.prototype.constructor=$r;function Oa(x){var P=-1,V=x==null?0:x.length;for(this.clear();++P<V;){var ye=x[P];this.set(ye[0],ye[1])}}function Gs(){this.__data__=zu?zu(null):{},this.size=0}function _s(x){var P=this.has(x)&&delete this.__data__[x];return this.size-=P?1:0,P}function uA(x){var P=this.__data__;if(zu){var V=P[x];return V===d?t:V}return Uo.call(P,x)?P[x]:t}function Bs(x){var P=this.__data__;return zu?P[x]!==t:Uo.call(P,x)}function yr(x,P){var V=this.__data__;return this.size+=this.has(x)?0:1,V[x]=zu&&P===t?d:P,this}Oa.prototype.clear=Gs,Oa.prototype.delete=_s,Oa.prototype.get=uA,Oa.prototype.has=Bs,Oa.prototype.set=yr;function va(x){var P=-1,V=x==null?0:x.length;for(this.clear();++P<V;){var ye=x[P];this.set(ye[0],ye[1])}}function Vc(){this.__data__=[],this.size=0}function Ia(x){var P=this.__data__,V=gs(P,x);if(V<0)return!1;var ye=P.length-1;return V==ye?P.pop():VA.call(P,V,1),--this.size,!0}function tc(x){var P=this.__data__,V=gs(P,x);return V<0?t:P[V][1]}function vd(x){return gs(this.__data__,x)>-1}function Cd(x,P){var V=this.__data__,ye=gs(V,x);return ye<0?(++this.size,V.push([x,P])):V[ye][1]=P,this}va.prototype.clear=Vc,va.prototype.delete=Ia,va.prototype.get=tc,va.prototype.has=vd,va.prototype.set=Cd;function Mi(x){var P=-1,V=x==null?0:x.length;for(this.clear();++P<V;){var ye=x[P];this.set(ye[0],ye[1])}}function _d(){this.size=0,this.__data__={hash:new Oa,map:new(Nl||va),string:new Oa}}function Wl(x){var P=Zc(this,x).delete(x);return this.size-=P?1:0,P}function bd(x){return Zc(this,x).get(x)}function xd(x){return Zc(this,x).has(x)}function MA(x,P){var V=Zc(this,x),ye=V.size;return V.set(x,P),this.size+=V.size==ye?0:1,this}Mi.prototype.clear=_d,Mi.prototype.delete=Wl,Mi.prototype.get=bd,Mi.prototype.has=xd,Mi.prototype.set=MA;function nc(x){var P=-1,V=x==null?0:x.length;for(this.__data__=new Mi;++P<V;)this.add(x[P])}function AA(x){return this.__data__.set(x,d),this}function _c(x){return this.__data__.has(x)}nc.prototype.add=nc.prototype.push=AA,nc.prototype.has=_c;function Os(x){var P=this.__data__=new va(x);this.size=P.size}function bo(){this.__data__=new va,this.size=0}function _u(x){var P=this.__data__,V=P.delete(x);return this.size=P.size,V}function Na(x){return this.__data__.get(x)}function Ks(x){return this.__data__.has(x)}function Zo(x,P){var V=this.__data__;if(V instanceof va){var ye=V.__data__;if(!Nl||ye.length<i-1)return ye.push([x,P]),this.size=++V.size,this;V=this.__data__=new Mi(ye)}return V.set(x,P),this.size=V.size,this}Os.prototype.clear=bo,Os.prototype.delete=_u,Os.prototype.get=Na,Os.prototype.has=Ks,Os.prototype.set=Zo;function ou(x,P){var V=vo(x),ye=!V&&bm(x),Ve=!V&&!ye&&zh(x),dt=!V&&!ye&&!Ve&&Dp(x),Kt=V||ye||Ve||dt,qt=Kt?dd(x.length,vp):[],sn=qt.length;for(var $n in x)(P||Uo.call(x,$n))&&!(Kt&&($n=="length"||Ve&&($n=="offset"||$n=="parent")||dt&&($n=="buffer"||$n=="byteLength"||$n=="byteOffset")||I($n,sn)))&&qt.push($n);return qt}function Gu(x){var P=x.length;return P?x[_n(0,P-1)]:t}function bc(x,P){return Qa(Ta(x),bu(P,0,x.length))}function nh(x){return Qa(Ta(x))}function SA(x,P,V){(V!==t&&!lh(x[P],V)||V===t&&!(P in x))&&Qu(x,P,V)}function xc(x,P,V){var ye=x[P];(!(Uo.call(x,P)&&lh(ye,V))||V===t&&!(P in x))&&Qu(x,P,V)}function gs(x,P){for(var V=x.length;V--;)if(lh(x[V][0],P))return V;return-1}function da(x,P,V,ye){return Po(x,function(Ve,dt,Kt){P(ye,Ve,V(Ve),Kt)}),ye}function gr(x,P){return x&&Au(P,Nr(P),x)}function Hr(x,P){return x&&Au(P,Qr(P),x)}function Qu(x,P,V){P=="__proto__"&&Gc?Gc(x,P,{configurable:!0,enumerable:!0,value:V,writable:!0}):x[P]=V}function rc(x,P){for(var V=-1,ye=P.length,Ve=an(ye),dt=x==null;++V<ye;)Ve[V]=dt?t:wn(x,P[V]);return Ve}function bu(x,P,V){return x===x&&(V!==t&&(x=x<=V?x:V),P!==t&&(x=x>=P?x:P)),x}function bs(x,P,V,ye,Ve,dt){var Kt,qt=P&E,sn=P&S,$n=P&O;if(V&&(Kt=Ve?V(x,ye,Ve,dt):V(x)),Kt!==t)return Kt;if(!bl(x))return x;var Vn=vo(x);if(Vn){if(Kt=Af(x),!qt)return Ta(x,Kt)}else{var pr=gl(x),Zr=pr==_t||pr==ht;if(zh(x))return xs(x,qt);if(pr==mn||pr==gt||Zr&&!Ve){if(Kt=sn||Zr?{}:il(x),!qt)return sn?Cp(x,Hr(Kt,x)):Ed(x,gr(Kt,x))}else{if(!Ri[pr])return Ve?x:{};Kt=Ep(x,pr,qt)}}dt||(dt=new Os);var xi=dt.get(x);if(xi)return xi;dt.set(x,Kt),t1(x)?x.forEach(function(eo){Kt.add(bs(eo,P,V,eo,x,dt))}):p_(x)&&x.forEach(function(eo,ws){Kt.set(ws,bs(eo,P,V,ws,x,dt))});var Ji=$n?sn?uf:lf:sn?Qr:Nr,os=Vn?t:Ji(x);return Ba(os||x,function(eo,ws){os&&(ws=eo,eo=x[ws]),xc(Kt,ws,bs(eo,P,V,ws,x,dt))}),Kt}function Kf(x){var P=Nr(x);return function(V){return su(V,x,P)}}function su(x,P,V){var ye=V.length;if(x==null)return!ye;for(x=Vo(x);ye--;){var Ve=V[ye],dt=P[Ve],Kt=x[Ve];if(Kt===t&&!(Ve in x)||!dt(Kt))return!1}return!0}function Ff(x,P,V){if(typeof x!="function")throw new Il(a);return ai(function(){x.apply(t,V)},P)}function xu(x,P,V,ye){var Ve=-1,dt=Du,Kt=!0,qt=x.length,sn=[],$n=P.length;if(!qt)return sn;V&&(P=Ss(P,pu(V))),ye?(dt=bh,Kt=!1):P.length>=i&&(dt=mu,Kt=!1,P=new nc(P));e:for(;++Ve<qt;){var Vn=x[Ve],pr=V==null?Vn:V(Vn);if(Vn=ye||Vn!==0?Vn:0,Kt&&pr===pr){for(var Zr=$n;Zr--;)if(P[Zr]===pr)continue e;sn.push(Vn)}else dt(P,pr,ye)||sn.push(Vn)}return sn}var Po=Ga(hl),Is=Ga(qu,!0);function rh(x,P){var V=!0;return Po(x,function(ye,Ve,dt){return V=!!P(ye,Ve,dt),V}),V}function EA(x,P,V){for(var ye=-1,Ve=x.length;++ye<Ve;){var dt=x[ye],Kt=P(dt);if(Kt!=null&&(qt===t?Kt===Kt&&!DA(Kt):V(Kt,qt)))var qt=Kt,sn=dt}return sn}function ih(x,P,V,ye){var Ve=x.length;for(V=w(V),V<0&&(V=-V>Ve?0:Ve+V),ye=ye===t||ye>Ve?Ve:w(ye),ye<0&&(ye+=Ve),ye=V>ye?0:K(ye);V<ye;)x[V++]=P;return x}function BA(x,P){var V=[];return Po(x,function(ye,Ve,dt){P(ye,Ve,dt)&&V.push(ye)}),V}function Qs(x,P,V,ye,Ve){var dt=-1,Kt=x.length;for(V||(V=y),Ve||(Ve=[]);++dt<Kt;){var qt=x[dt];P>0&&V(qt)?P>1?Qs(qt,P-1,V,ye,Ve):Ku(Ve,qt):ye||(Ve[Ve.length]=qt)}return Ve}var wc=_p(),Gl=_p(!0);function hl(x,P){return x&&wc(x,P,Nr)}function qu(x,P){return x&&Gl(x,P,Nr)}function Mc(x,P){return Ru(P,function(V){return ac(x[V])})}function wu(x,P){P=Js(P,x);for(var V=0,ye=P.length;x!=null&&V<ye;)x=x[_a(P[V++])];return V&&V==ye?x:t}function Ca(x,P,V){var ye=P(x);return vo(x)?ye:Ku(ye,V(x))}function Xs(x){return x==null?x===t?wr:Ft:HA&&HA in Vo(x)?Sp(x):Kn(x)}function au(x,P){return x>P}function lu(x,P){return x!=null&&Uo.call(x,P)}function cA(x,P){return x!=null&&P in Vo(x)}function Mu(x,P,V){return x>=cs(P,V)&&x<zo(P,V)}function Sc(x,P,V){for(var ye=V?bh:Du,Ve=x[0].length,dt=x.length,Kt=dt,qt=an(dt),sn=1/0,$n=[];Kt--;){var Vn=x[Kt];Kt&&P&&(Vn=Ss(Vn,pu(P))),sn=cs(Vn.length,sn),qt[Kt]=!V&&(P||Ve>=120&&Vn.length>=120)?new nc(Kt&&Vn):t}Vn=x[0];var pr=-1,Zr=qt[0];e:for(;++pr<Ve&&$n.length<sn;){var xi=Vn[pr],Ji=P?P(xi):xi;if(xi=V||xi!==0?xi:0,!(Zr?mu(Zr,Ji):ye($n,Ji,V))){for(Kt=dt;--Kt;){var os=qt[Kt];if(!(os?mu(os,Ji):ye(x[Kt],Ji,V)))continue e}Zr&&Zr.push(Ji),$n.push(xi)}}return $n}function Yu(x,P,V,ye){return hl(x,function(Ve,dt,Kt){P(ye,V(Ve),dt,Kt)}),ye}function Ql(x,P,V){P=Js(P,x),x=or(x,P);var ye=x==null?x:x[_a(RA(P))];return ye==null?t:Hs(ye,x,V)}function wd(x){return xl(x)&&Xs(x)==gt}function T(x){return xl(x)&&Xs(x)==Ge}function l(x){return xl(x)&&Xs(x)==Pe}function c(x,P,V,ye,Ve){return x===P?!0:x==null||P==null||!xl(x)&&!xl(P)?x!==x&&P!==P:_(x,P,V,ye,c,Ve)}function _(x,P,V,ye,Ve,dt){var Kt=vo(x),qt=vo(P),sn=Kt?Dt:gl(x),$n=qt?Dt:gl(P);sn=sn==gt?mn:sn,$n=$n==gt?mn:$n;var Vn=sn==mn,pr=$n==mn,Zr=sn==$n;if(Zr&&zh(x)){if(!zh(P))return!1;Kt=!0,Vn=!1}if(Zr&&!Vn)return dt||(dt=new Os),Kt||Dp(x)?TA(x,P,V,ye,Ve,dt):Ph(x,P,sn,V,ye,Ve,dt);if(!(V&k)){var xi=Vn&&Uo.call(x,"__wrapped__"),Ji=pr&&Uo.call(P,"__wrapped__");if(xi||Ji){var os=xi?x.value():x,eo=Ji?P.value():P;return dt||(dt=new Os),Ve(os,eo,V,ye,dt)}}return Zr?(dt||(dt=new Os),Mp(x,P,V,ye,Ve,dt)):!1}function M(x){return xl(x)&&gl(x)==Ut}function R(x,P,V,ye){var Ve=V.length,dt=Ve,Kt=!ye;if(x==null)return!dt;for(x=Vo(x);Ve--;){var qt=V[Ve];if(Kt&&qt[2]?qt[1]!==x[qt[0]]:!(qt[0]in x))return!1}for(;++Ve<dt;){qt=V[Ve];var sn=qt[0],$n=x[sn],Vn=qt[1];if(Kt&&qt[2]){if($n===t&&!(sn in x))return!1}else{var pr=new Os;if(ye)var Zr=ye($n,Vn,sn,x,P,pr);if(!(Zr===t?c(Vn,$n,k|U,ye,pr):Zr))return!1}}return!0}function j(x){if(!bl(x)||_e(x))return!1;var P=ac(x)?gc:Ti;return P.test(ba(x))}function $(x){return xl(x)&&Xs(x)==ir}function te(x){return xl(x)&&gl(x)==Dn}function se(x){return xl(x)&&V0(x.length)&&!!lo[Xs(x)]}function we(x){return typeof x=="function"?x:x==null?ch:typeof x=="object"?vo(x)?lt(x[0],x[1]):ft(x):X8(x)}function Ie(x){if(!ze(x))return As(x);var P=[];for(var V in Vo(x))Uo.call(x,V)&&V!="constructor"&&P.push(V);return P}function Re(x){if(!bl(x))return Mn(x);var P=ze(x),V=[];for(var ye in x)ye=="constructor"&&(P||!Uo.call(x,ye))||V.push(ye);return V}function $e(x,P){return x<P}function Ze(x,P){var V=-1,ye=Ic(x)?an(x.length):[];return Po(x,function(Ve,dt,Kt){ye[++V]=P(Ve,dt,Kt)}),ye}function ft(x){var P=is(x);return P.length==1&&P[0][2]?Mt(P[0][0],P[0][1]):function(V){return V===x||R(V,x,P)}}function lt(x,P){return D(x)&&mt(P)?Mt(_a(x),P):function(V){var ye=wn(V,x);return ye===t&&ye===P?Un(V,x):c(P,ye,k|U)}}function pt(x,P,V,ye,Ve){x!==P&&wc(P,function(dt,Kt){if(Ve||(Ve=new Os),bl(dt))vt(x,P,Kt,V,pt,ye,Ve);else{var qt=ye?ye(dr(x,Kt),dt,Kt+"",x,P,Ve):t;qt===t&&(qt=dt),SA(x,Kt,qt)}},Qr)}function vt(x,P,V,ye,Ve,dt,Kt){var qt=dr(x,V),sn=dr(P,V),$n=Kt.get(sn);if($n){SA(x,V,$n);return}var Vn=dt?dt(qt,sn,V+"",x,P,Kt):t,pr=Vn===t;if(pr){var Zr=vo(sn),xi=!Zr&&zh(sn),Ji=!Zr&&!xi&&Dp(sn);Vn=sn,Zr||xi||Ji?vo(qt)?Vn=qt:_l(qt)?Vn=Ta(qt):xi?(pr=!1,Vn=xs(sn,!0)):Ji?(pr=!1,Vn=Bh(sn,!0)):Vn=[]:$f(sn)||bm(sn)?(Vn=qt,bm(qt)?Vn=W(qt):(!bl(qt)||ac(qt))&&(Vn=il(sn))):pr=!1}pr&&(Kt.set(sn,Vn),Ve(Vn,sn,ye,dt,Kt),Kt.delete(sn)),SA(x,V,Vn)}function Bt(x,P){var V=x.length;if(V)return P+=P<0?V:0,I(P,V)?x[P]:t}function kt(x,P,V){P.length?P=Ss(P,function(dt){return vo(dt)?function(Kt){return wu(Kt,dt.length===1?dt[0]:dt)}:dt}):P=[ch];var ye=-1;P=Ss(P,pu(di()));var Ve=Ze(x,function(dt,Kt,qt){var sn=Ss(P,function($n){return $n(dt)});return{criteria:sn,index:++ye,value:dt}});return wh(Ve,function(dt,Kt){return Sd(dt,Kt,V)})}function Rt(x,P){return zt(x,P,function(V,ye){return Un(x,ye)})}function zt(x,P,V){for(var ye=-1,Ve=P.length,dt={};++ye<Ve;){var Kt=P[ye],qt=wu(x,Kt);V(qt,Kt)&&Tr(dt,Js(Kt,x),qt)}return dt}function Tt(x){return function(P){return wu(P,x)}}function tn(x,P,V,ye){var Ve=ye?xh:Zs,dt=-1,Kt=P.length,qt=x;for(x===P&&(P=Ta(P)),V&&(qt=Ss(x,pu(V)));++dt<Kt;)for(var sn=0,$n=P[dt],Vn=V?V($n):$n;(sn=Ve(qt,Vn,sn,ye))>-1;)qt!==x&&VA.call(qt,sn,1),VA.call(x,sn,1);return x}function Zt(x,P){for(var V=x?P.length:0,ye=V-1;V--;){var Ve=P[V];if(V==ye||Ve!==dt){var dt=Ve;I(Ve)?VA.call(x,Ve,1):Wa(x,Ve)}}return x}function _n(x,P){return x+Lu(md()*(P-x+1))}function bn(x,P,V,ye){for(var Ve=-1,dt=zo(ZA((P-x)/(V||1)),0),Kt=an(dt);dt--;)Kt[ye?dt:++Ve]=x,x+=V;return Kt}function vn(x,P){var V="";if(!x||P<1||P>He)return V;do P%2&&(V+=x),P=Lu(P/2),P&&(x+=x);while(P);return V}function In(x,P){return Wr(Zn(x,P,ch),x+"")}function Wn(x){return Gu(Ko(x))}function Sn(x,P){var V=Ko(x);return Qa(V,bu(P,0,V.length))}function Tr(x,P,V,ye){if(!bl(x))return x;P=Js(P,x);for(var Ve=-1,dt=P.length,Kt=dt-1,qt=x;qt!=null&&++Ve<dt;){var sn=_a(P[Ve]),$n=V;if(sn==="__proto__"||sn==="constructor"||sn==="prototype")return x;if(Ve!=Kt){var Vn=qt[sn];$n=ye?ye(Vn,sn,qt):t,$n===t&&($n=bl(Vn)?Vn:I(P[Ve+1])?[]:{})}xc(qt,sn,$n),qt=qt[sn]}return x}var Bi=gd?function(x,P){return gd.set(x,P),x}:ch,$i=Gc?function(x,P){return Gc(x,"toString",{configurable:!0,enumerable:!1,value:Ud(P),writable:!0})}:ch;function Oo(x){return Qa(Ko(x))}function Si(x,P,V){var ye=-1,Ve=x.length;P<0&&(P=-P>Ve?0:Ve+P),V=V>Ve?Ve:V,V<0&&(V+=Ve),Ve=P>V?0:V-P>>>0,P>>>=0;for(var dt=an(Ve);++ye<Ve;)dt[ye]=x[ye+P];return dt}function jo(x,P){var V;return Po(x,function(ye,Ve,dt){return V=P(ye,Ve,dt),!V}),!!V}function No(x,P,V){var ye=0,Ve=x==null?ye:x.length;if(typeof P=="number"&&P===P&&Ve<=yt){for(;ye<Ve;){var dt=ye+Ve>>>1,Kt=x[dt];Kt!==null&&!DA(Kt)&&(V?Kt<=P:Kt<P)?ye=dt+1:Ve=dt}return Ve}return xo(x,P,ch,V)}function xo(x,P,V,ye){var Ve=0,dt=x==null?0:x.length;if(dt===0)return 0;P=V(P);for(var Kt=P!==P,qt=P===null,sn=DA(P),$n=P===t;Ve<dt;){var Vn=Lu((Ve+dt)/2),pr=V(x[Vn]),Zr=pr!==t,xi=pr===null,Ji=pr===pr,os=DA(pr);if(Kt)var eo=ye||Ji;else $n?eo=Ji&&(ye||Zr):qt?eo=Ji&&Zr&&(ye||!xi):sn?eo=Ji&&Zr&&!xi&&(ye||!os):xi||os?eo=!1:eo=ye?pr<=P:pr<P;eo?Ve=Vn+1:dt=Vn}return cs(dt,rt)}function yo(x,P){for(var V=-1,ye=x.length,Ve=0,dt=[];++V<ye;){var Kt=x[V],qt=P?P(Kt):Kt;if(!V||!lh(qt,sn)){var sn=qt;dt[Ve++]=Kt===0?0:Kt}}return dt}function ka(x){return typeof x=="number"?x:DA(x)?Ce:+x}function Wo(x){if(typeof x=="string")return x;if(vo(x))return Ss(x,Wo)+"";if(DA(x))return $c?$c.call(x):"";var P=x+"";return P=="0"&&1/x==-1/0?"-0":P}function ds(x,P,V){var ye=-1,Ve=Du,dt=x.length,Kt=!0,qt=[],sn=qt;if(V)Kt=!1,Ve=bh;else if(dt>=i){var $n=P?null:Am(x);if($n)return Ol($n);Kt=!1,Ve=mu,sn=new nc}else sn=P?[]:qt;e:for(;++ye<dt;){var Vn=x[ye],pr=P?P(Vn):Vn;if(Vn=V||Vn!==0?Vn:0,Kt&&pr===pr){for(var Zr=sn.length;Zr--;)if(sn[Zr]===pr)continue e;P&&sn.push(pr),qt.push(Vn)}else Ve(sn,pr,V)||(sn!==qt&&sn.push(pr),qt.push(Vn))}return qt}function Wa(x,P){return P=Js(P,x),x=or(x,P),x==null||delete x[_a(RA(P))]}function $u(x,P,V,ye){return Tr(x,P,V(wu(x,P)),ye)}function fl(x,P,V,ye){for(var Ve=x.length,dt=ye?Ve:-1;(ye?dt--:++dt<Ve)&&P(x[dt],dt,x););return V?Si(x,ye?0:dt,ye?dt+1:Ve):Si(x,ye?dt+1:0,ye?Ve:dt)}function pl(x,P){var V=x;return V instanceof $r&&(V=V.value()),ud(P,function(ye,Ve){return Ve.func.apply(Ve.thisArg,Ku([ye],Ve.args))},V)}function uu(x,P,V){var ye=x.length;if(ye<2)return ye?ds(x[0]):[];for(var Ve=-1,dt=an(ye);++Ve<ye;)for(var Kt=x[Ve],qt=-1;++qt<ye;)qt!=Ve&&(dt[Ve]=xu(dt[Ve]||Kt,x[qt],P,V));return ds(Qs(dt,1),P,V)}function OA(x,P,V){for(var ye=-1,Ve=x.length,dt=P.length,Kt={};++ye<Ve;){var qt=ye<dt?P[ye]:t;V(Kt,x[ye],qt)}return Kt}function IA(x){return _l(x)?x:[]}function Vu(x){return typeof x=="function"?x:ch}function Js(x,P){return vo(x)?x:D(x,P)?[x]:aa(ne(x))}var ml=In;function sa(x,P,V){var ye=x.length;return V=V===t?ye:V,!P&&V>=ye?x:Si(x,P,V)}var Pl=Xd||function(x){return vr.clearTimeout(x)};function xs(x,P){if(P)return x.slice();var V=x.length,ye=Zd?Zd(V):new x.constructor(V);return x.copy(ye),ye}function qs(x){var P=new x.constructor(x.byteLength);return new Wc(P).set(new Wc(x)),P}function nl(x,P){var V=P?qs(x.buffer):x.buffer;return new x.constructor(V,x.byteOffset,x.byteLength)}function rl(x){var P=new x.constructor(x.source,yi.exec(x));return P.lastIndex=x.lastIndex,P}function Md(x){return Cu?Vo(Cu.call(x)):{}}function Bh(x,P){var V=P?qs(x.buffer):x.buffer;return new x.constructor(V,x.byteOffset,x.length)}function Oh(x,P){if(x!==P){var V=x!==t,ye=x===null,Ve=x===x,dt=DA(x),Kt=P!==t,qt=P===null,sn=P===P,$n=DA(P);if(!qt&&!$n&&!dt&&x>P||dt&&Kt&&sn&&!qt&&!$n||ye&&Kt&&sn||!V&&sn||!Ve)return 1;if(!ye&&!dt&&!$n&&x<P||$n&&V&&Ve&&!ye&&!dt||qt&&V&&Ve||!Kt&&Ve||!sn)return-1}return 0}function Sd(x,P,V){for(var ye=-1,Ve=x.criteria,dt=P.criteria,Kt=Ve.length,qt=V.length;++ye<Kt;){var sn=Oh(Ve[ye],dt[ye]);if(sn){if(ye>=qt)return sn;var $n=V[ye];return sn*($n=="desc"?-1:1)}}return x.index-P.index}function ic(x,P,V,ye){for(var Ve=-1,dt=x.length,Kt=V.length,qt=-1,sn=P.length,$n=zo(dt-Kt,0),Vn=an(sn+$n),pr=!ye;++qt<sn;)Vn[qt]=P[qt];for(;++Ve<Kt;)(pr||Ve<dt)&&(Vn[V[Ve]]=x[Ve]);for(;$n--;)Vn[qt++]=x[Ve++];return Vn}function Ih(x,P,V,ye){for(var Ve=-1,dt=x.length,Kt=-1,qt=V.length,sn=-1,$n=P.length,Vn=zo(dt-qt,0),pr=an(Vn+$n),Zr=!ye;++Ve<Vn;)pr[Ve]=x[Ve];for(var xi=Ve;++sn<$n;)pr[xi+sn]=P[sn];for(;++Kt<qt;)(Zr||Ve<dt)&&(pr[xi+V[Kt]]=x[Ve++]);return pr}function Ta(x,P){var V=-1,ye=x.length;for(P||(P=an(ye));++V<ye;)P[V]=x[V];return P}function Au(x,P,V,ye){var Ve=!V;V||(V={});for(var dt=-1,Kt=P.length;++dt<Kt;){var qt=P[dt],sn=ye?ye(V[qt],x[qt],qt,V,x):t;sn===t&&(sn=x[qt]),Ve?Qu(V,qt,sn):xc(V,qt,sn)}return V}function Ed(x,P){return Au(x,Su(x),P)}function Cp(x,P){return Au(x,Ym(x),P)}function Ec(x,P){return function(V,ye){var Ve=vo(V)?dc:da,dt=P?P():{};return Ve(V,x,di(ye,2),dt)}}function kA(x){return In(function(P,V){var ye=-1,Ve=V.length,dt=Ve>1?V[Ve-1]:t,Kt=Ve>2?V[2]:t;for(dt=x.length>3&&typeof dt=="function"?(Ve--,dt):t,Kt&&B(V[0],V[1],Kt)&&(dt=Ve<3?t:dt,Ve=1),P=Vo(P);++ye<Ve;){var qt=V[ye];qt&&x(P,qt,ye,dt)}return P})}function Ga(x,P){return function(V,ye){if(V==null)return V;if(!Ic(V))return x(V,ye);for(var Ve=V.length,dt=P?Ve:-1,Kt=Vo(V);(P?dt--:++dt<Ve)&&ye(Kt[dt],dt,Kt)!==!1;);return V}}function _p(x){return function(P,V,ye){for(var Ve=-1,dt=Vo(P),Kt=ye(P),qt=Kt.length;qt--;){var sn=Kt[x?qt:++Ve];if(V(dt[sn],sn,dt)===!1)break}return P}}function kh(x,P,V){var ye=P&z,Ve=Bc(x);function dt(){var Kt=this&&this!==vr&&this instanceof dt?Ve:x;return Kt.apply(ye?V:this,arguments)}return dt}function bp(x){return function(P){P=ne(P);var V=zc(P)?Fu(P):t,ye=V?V[0]:P.charAt(0),Ve=V?sa(V,1).join(""):P.slice(1);return ye[x]()+Ve}}function oh(x){return function(P){return ud(E_(Z0(P).replace(El,"")),x,"")}}function Bc(x){return function(){var P=arguments;switch(P.length){case 0:return new x;case 1:return new x(P[0]);case 2:return new x(P[0],P[1]);case 3:return new x(P[0],P[1],P[2]);case 4:return new x(P[0],P[1],P[2],P[3]);case 5:return new x(P[0],P[1],P[2],P[3],P[4]);case 6:return new x(P[0],P[1],P[2],P[3],P[4],P[5]);case 7:return new x(P[0],P[1],P[2],P[3],P[4],P[5],P[6])}var V=ja(x.prototype),ye=x.apply(V,P);return bl(ye)?ye:V}}function um(x,P,V){var ye=Bc(x);function Ve(){for(var dt=arguments.length,Kt=an(dt),qt=dt,sn=Hc(Ve);qt--;)Kt[qt]=arguments[qt];var $n=dt<3&&Kt[0]!==sn&&Kt[dt-1]!==sn?[]:tl(Kt,sn);if(dt-=$n.length,dt<V)return ql(x,P,Bd,Ve.placeholder,t,Kt,$n,t,t,V-dt);var Vn=this&&this!==vr&&this instanceof Ve?ye:x;return Hs(Vn,this,Kt)}return Ve}function oc(x){return function(P,V,ye){var Ve=Vo(P);if(!Ic(P)){var dt=di(V,3);P=Nr(P),V=function(qt){return dt(Ve[qt],qt,Ve)}}var Kt=x(P,V,ye);return Kt>-1?Ve[dt?P[Kt]:Kt]:t}}function Th(x){return Oc(function(P){var V=P.length,ye=V,Ve=Di.prototype.thru;for(x&&P.reverse();ye--;){var dt=P[ye];if(typeof dt!="function")throw new Il(a);if(Ve&&!Kt&&kd(dt)=="wrapper")var Kt=new Di([],!0)}for(ye=Kt?ye:V;++ye<V;){dt=P[ye];var qt=kd(dt),sn=qt=="wrapper"?ah(dt):t;sn&&ue(sn[0])&&sn[1]==(N|re|Y|ie)&&!sn[4].length&&sn[9]==1?Kt=Kt[kd(sn[0])].apply(Kt,sn[3]):Kt=dt.length==1&&ue(dt)?Kt[qt]():Kt.thru(dt)}return function(){var $n=arguments,Vn=$n[0];if(Kt&&$n.length==1&&vo(Vn))return Kt.plant(Vn).value();for(var pr=0,Zr=V?P[pr].apply(this,$n):Vn;++pr<V;)Zr=P[pr].call(this,Zr);return Zr}})}function Bd(x,P,V,ye,Ve,dt,Kt,qt,sn,$n){var Vn=P&N,pr=P&z,Zr=P&q,xi=P&(re|X),Ji=P&he,os=Zr?t:Bc(x);function eo(){for(var ws=arguments.length,Ls=an(ws),Nh=ws;Nh--;)Ls[Nh]=arguments[Nh];if(xi)var zd=Hc(eo),Wh=Yd(Ls,zd);if(ye&&(Ls=ic(Ls,ye,Ve,xi)),dt&&(Ls=Ih(Ls,dt,Kt,xi)),ws-=Wh,xi&&ws<$n){var eA=tl(Ls,zd);return ql(x,P,Bd,eo.placeholder,V,Ls,eA,qt,sn,$n-ws)}var Zf=pr?V:this,Em=Zr?Zf[x]:x;return ws=Ls.length,qt?Ls=br(Ls,qt):Ji&&ws>1&&Ls.reverse(),Vn&&sn<ws&&(Ls.length=sn),this&&this!==vr&&this instanceof eo&&(Em=os||Bc(Em)),Em.apply(Zf,Ls)}return eo}function xp(x,P){return function(V,ye){return Yu(V,x,P(ye),{})}}function sh(x,P){return function(V,ye){var Ve;if(V===t&&ye===t)return P;if(V!==t&&(Ve=V),ye!==t){if(Ve===t)return ye;typeof V=="string"||typeof ye=="string"?(V=Wo(V),ye=Wo(ye)):(V=ka(V),ye=ka(ye)),Ve=x(V,ye)}return Ve}}function Lf(x){return Oc(function(P){return P=Ss(P,pu(di())),In(function(V){var ye=this;return x(P,function(Ve){return Hs(Ve,ye,V)})})})}function Uf(x,P){P=P===t?" ":Wo(P);var V=P.length;if(V<2)return V?vn(P,x):P;var ye=vn(P,ZA(x/jc(P)));return zc(P)?sa(Fu(ye),0,x).join(""):ye.slice(0,x)}function wp(x,P,V,ye){var Ve=P&z,dt=Bc(x);function Kt(){for(var qt=-1,sn=arguments.length,$n=-1,Vn=ye.length,pr=an(Vn+sn),Zr=this&&this!==vr&&this instanceof Kt?dt:x;++$n<Vn;)pr[$n]=ye[$n];for(;sn--;)pr[$n++]=arguments[++qt];return Hs(Zr,Ve?V:this,pr)}return Kt}function Od(x){return function(P,V,ye){return ye&&typeof ye!="number"&&B(P,V,ye)&&(V=ye=t),P=v(P),V===t?(V=P,P=0):V=v(V),ye=ye===t?P<V?1:-1:v(ye),bn(P,V,ye,x)}}function sf(x){return function(P,V){return typeof P=="string"&&typeof V=="string"||(P=L(P),V=L(V)),x(P,V)}}function ql(x,P,V,ye,Ve,dt,Kt,qt,sn,$n){var Vn=P&re,pr=Vn?Kt:t,Zr=Vn?t:Kt,xi=Vn?dt:t,Ji=Vn?t:dt;P|=Vn?Y:ee,P&=~(Vn?ee:Y),P&Q||(P&=-4);var os=[x,P,Ve,xi,pr,Ji,Zr,qt,sn,$n],eo=V.apply(t,os);return ue(x)&&Lr(eo,os),eo.placeholder=ye,Xi(eo,x,P)}function Rl(x){var P=oa[x];return function(V,ye){if(V=L(V),ye=ye==null?0:cs(w(ye),292),ye&&Yc(V)){var Ve=(ne(V)+"e").split("e"),dt=P(Ve[0]+"e"+(+Ve[1]+ye));return Ve=(ne(dt)+"e").split("e"),+(Ve[0]+"e"+(+Ve[1]-ye))}return P(V)}}var Am=dl&&1/Ol(new dl([,-0]))[1]==Qe?function(x){return new dl(x)}:B3;function zf(x){return function(P){var V=gl(P);return V==Ut?hd(P):V==Dn?$o(P):am(P,x(P))}}function Io(x,P,V,ye,Ve,dt,Kt,qt){var sn=P&q;if(!sn&&typeof x!="function")throw new Il(a);var $n=ye?ye.length:0;if($n||(P&=-97,ye=Ve=t),Kt=Kt===t?Kt:zo(w(Kt),0),qt=qt===t?qt:w(qt),$n-=Ve?Ve.length:0,P&ee){var Vn=ye,pr=Ve;ye=Ve=t}var Zr=sn?t:ah(x),xi=[x,P,V,ye,Ve,Vn,pr,dt,Kt,qt];if(Zr&&Qt(xi,Zr),x=xi[0],P=xi[1],V=xi[2],ye=xi[3],Ve=xi[4],qt=xi[9]=xi[9]===t?sn?0:x.length:zo(xi[9]-$n,0),!qt&&P&(re|X)&&(P&=-25),!P||P==z)var Ji=kh(x,P,V);else P==re||P==X?Ji=um(x,P,qt):(P==Y||P==(z|Y))&&!Ve.length?Ji=wp(x,P,V,ye):Ji=Bd.apply(t,xi);var os=Zr?Bi:Lr;return Xi(os(Ji,xi),x,P)}function Hu(x,P,V,ye){return x===t||lh(x,kl[V])&&!Uo.call(ye,V)?P:x}function af(x,P,V,ye,Ve,dt){return bl(x)&&bl(P)&&(dt.set(P,x),pt(x,P,t,af,dt),dt.delete(P)),x}function Id(x){return $f(x)?t:x}function TA(x,P,V,ye,Ve,dt){var Kt=V&k,qt=x.length,sn=P.length;if(qt!=sn&&!(Kt&&sn>qt))return!1;var $n=dt.get(x),Vn=dt.get(P);if($n&&Vn)return $n==P&&Vn==x;var pr=-1,Zr=!0,xi=V&U?new nc:t;for(dt.set(x,P),dt.set(P,x);++pr<qt;){var Ji=x[pr],os=P[pr];if(ye)var eo=Kt?ye(os,Ji,pr,P,x,dt):ye(Ji,os,pr,x,P,dt);if(eo!==t){if(eo)continue;Zr=!1;break}if(xi){if(!sA(P,function(ws,Ls){if(!mu(xi,Ls)&&(Ji===ws||Ve(Ji,ws,V,ye,dt)))return xi.push(Ls)})){Zr=!1;break}}else if(!(Ji===os||Ve(Ji,os,V,ye,dt))){Zr=!1;break}}return dt.delete(x),dt.delete(P),Zr}function Ph(x,P,V,ye,Ve,dt,Kt){switch(V){case Ae:if(x.byteLength!=P.byteLength||x.byteOffset!=P.byteOffset)return!1;x=x.buffer,P=P.buffer;case Ge:return!(x.byteLength!=P.byteLength||!dt(new Wc(x),new Wc(P)));case Le:case Pe:case en:return lh(+x,+P);case nt:return x.name==P.name&&x.message==P.message;case ir:case fn:return x==P+"";case Ut:var qt=hd;case Dn:var sn=ye&k;if(qt||(qt=Ol),x.size!=P.size&&!sn)return!1;var $n=Kt.get(x);if($n)return $n==P;ye|=U,Kt.set(x,P);var Vn=TA(qt(x),qt(P),ye,Ve,dt,Kt);return Kt.delete(x),Vn;case Hn:if(Cu)return Cu.call(x)==Cu.call(P)}return!1}function Mp(x,P,V,ye,Ve,dt){var Kt=V&k,qt=lf(x),sn=qt.length,$n=lf(P),Vn=$n.length;if(sn!=Vn&&!Kt)return!1;for(var pr=sn;pr--;){var Zr=qt[pr];if(!(Kt?Zr in P:Uo.call(P,Zr)))return!1}var xi=dt.get(x),Ji=dt.get(P);if(xi&&Ji)return xi==P&&Ji==x;var os=!0;dt.set(x,P),dt.set(P,x);for(var eo=Kt;++pr<sn;){Zr=qt[pr];var ws=x[Zr],Ls=P[Zr];if(ye)var Nh=Kt?ye(Ls,ws,Zr,P,x,dt):ye(ws,Ls,Zr,x,P,dt);if(!(Nh===t?ws===Ls||Ve(ws,Ls,V,ye,dt):Nh)){os=!1;break}eo||(eo=Zr=="constructor")}if(os&&!eo){var zd=x.constructor,Wh=P.constructor;zd!=Wh&&"constructor"in x&&"constructor"in P&&!(typeof zd=="function"&&zd instanceof zd&&typeof Wh=="function"&&Wh instanceof Wh)&&(os=!1)}return dt.delete(x),dt.delete(P),os}function Oc(x){return Wr(Zn(x,t,Xc),x+"")}function lf(x){return Ca(x,Nr,Su)}function uf(x){return Ca(x,Qr,Ym)}var ah=gd?function(x){return gd.get(x)}:B3;function kd(x){for(var P=x.name+"",V=ju[P],ye=Uo.call(ju,P)?V.length:0;ye--;){var Ve=V[ye],dt=Ve.func;if(dt==null||dt==x)return Ve.name}return P}function Hc(x){var P=Uo.call(it,"placeholder")?it:x;return P.placeholder}function di(){var x=it.iteratee||S3;return x=x===S3?we:x,arguments.length?x(arguments[0],arguments[1]):x}function Zc(x,P){var V=x.__data__;return H(P)?V[typeof P=="string"?"string":"hash"]:V.map}function is(x){for(var P=Nr(x),V=P.length;V--;){var ye=P[V],Ve=x[ye];P[V]=[ye,Ve,mt(Ve)]}return P}function Td(x,P){var V=GA(x,P);return j(V)?V:t}function Sp(x){var P=Uo.call(x,HA),V=x[HA];try{x[HA]=t;var ye=!0}catch{}var Ve=_A.call(x);return ye&&(P?x[HA]=V:delete x[HA]),Ve}var Su=qc?function(x){return x==null?[]:(x=Vo(x),Ru(qc(x),function(P){return yc.call(x,P)}))}:O3,Ym=qc?function(x){for(var P=[];x;)Ku(P,Su(x)),x=za(x);return P}:O3,gl=Xs;(XA&&gl(new XA(new ArrayBuffer(1)))!=Ae||Nl&&gl(new Nl)!=Ut||xA&&gl(xA.resolve())!=jn||dl&&gl(new dl)!=Dn||JA&&gl(new JA)!=Qn)&&(gl=function(x){var P=Xs(x),V=P==mn?x.constructor:t,ye=V?ba(V):"";if(ye)switch(ye){case eh:return Ae;case ec:return Ut;case Nu:return jn;case Wu:return Dn;case wA:return Qn}return P});function cm(x,P,V){for(var ye=-1,Ve=V.length;++ye<Ve;){var dt=V[ye],Kt=dt.size;switch(dt.type){case"drop":x+=Kt;break;case"dropRight":P-=Kt;break;case"take":P=cs(P,x+Kt);break;case"takeRight":x=zo(x,P-Kt);break}}return{start:x,end:P}}function ha(x){var P=x.match(Er);return P?P[1].split(Dr):[]}function dm(x,P,V){P=Js(P,x);for(var ye=-1,Ve=P.length,dt=!1;++ye<Ve;){var Kt=_a(P[ye]);if(!(dt=x!=null&&V(x,Kt)))break;x=x[Kt]}return dt||++ye!=Ve?dt:(Ve=x==null?0:x.length,!!Ve&&V0(Ve)&&I(Kt,Ve)&&(vo(x)||bm(x)))}function Af(x){var P=x.length,V=new x.constructor(P);return P&&typeof x[0]=="string"&&Uo.call(x,"index")&&(V.index=x.index,V.input=x.input),V}function il(x){return typeof x.constructor=="function"&&!ze(x)?ja(za(x)):{}}function Ep(x,P,V){var ye=x.constructor;switch(P){case Ge:return qs(x);case Le:case Pe:return new ye(+x);case Ae:return nl(x,V);case pe:case et:case St:case Yt:case rn:case er:case Be:case oe:case ve:return Bh(x,V);case Ut:return new ye;case en:case fn:return new ye(x);case ir:return rl(x);case Dn:return new ye;case Hn:return Md(x)}}function A(x,P){var V=P.length;if(!V)return x;var ye=V-1;return P[ye]=(V>1?"& ":"")+P[ye],P=P.join(V>2?", ":" "),x.replace(Or,`{
|
||
/* [wrapped with `+P+`] */
|
||
`)}function y(x){return vo(x)||bm(x)||!!(of&&x&&x[of])}function I(x,P){var V=typeof x;return P=P??He,!!P&&(V=="number"||V!="symbol"&&Ea.test(x))&&x>-1&&x%1==0&&x<P}function B(x,P,V){if(!bl(V))return!1;var ye=typeof P;return(ye=="number"?Ic(V)&&I(P,V.length):ye=="string"&&P in V)?lh(V[P],x):!1}function D(x,P){if(vo(x))return!1;var V=typeof x;return V=="number"||V=="symbol"||V=="boolean"||x==null||DA(x)?!0:Bn.test(x)||!Rn.test(x)||P!=null&&x in Vo(P)}function H(x){var P=typeof x;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?x!=="__proto__":x===null}function ue(x){var P=kd(x),V=it[P];if(typeof V!="function"||!(P in $r.prototype))return!1;if(x===V)return!0;var ye=ah(V);return!!ye&&x===ye[0]}function _e(x){return!!$A&&$A in x}var ke=Wi?ac:I3;function ze(x){var P=x&&x.constructor,V=typeof P=="function"&&P.prototype||kl;return x===V}function mt(x){return x===x&&!bl(x)}function Mt(x,P){return function(V){return V==null?!1:V[x]===P&&(P!==t||x in Vo(V))}}function Xt(x){var P=Cr(x,function(ye){return V.size===g&&V.clear(),ye}),V=P.cache;return P}function Qt(x,P){var V=x[1],ye=P[1],Ve=V|ye,dt=Ve<(z|q|N),Kt=ye==N&&V==re||ye==N&&V==ie&&x[7].length<=P[8]||ye==(N|ie)&&P[7].length<=P[8]&&V==re;if(!(dt||Kt))return x;ye&z&&(x[2]=P[2],Ve|=V&z?0:Q);var qt=P[3];if(qt){var sn=x[3];x[3]=sn?ic(sn,qt,P[4]):qt,x[4]=sn?tl(x[3],b):P[4]}return qt=P[5],qt&&(sn=x[5],x[5]=sn?Ih(sn,qt,P[6]):qt,x[6]=sn?tl(x[5],b):P[6]),qt=P[7],qt&&(x[7]=qt),ye&N&&(x[8]=x[8]==null?P[8]:cs(x[8],P[8])),x[9]==null&&(x[9]=P[9]),x[0]=P[0],x[1]=Ve,x}function Mn(x){var P=[];if(x!=null)for(var V in Vo(x))P.push(V);return P}function Kn(x){return _A.call(x)}function Zn(x,P,V){return P=zo(P===t?x.length-1:P,0),function(){for(var ye=arguments,Ve=-1,dt=zo(ye.length-P,0),Kt=an(dt);++Ve<dt;)Kt[Ve]=ye[P+Ve];Ve=-1;for(var qt=an(P+1);++Ve<P;)qt[Ve]=ye[Ve];return qt[P]=V(Kt),Hs(x,this,qt)}}function or(x,P){return P.length<2?x:wu(x,Si(P,0,-1))}function br(x,P){for(var V=x.length,ye=cs(P.length,V),Ve=Ta(x);ye--;){var dt=P[ye];x[ye]=I(dt,V)?Ve[dt]:t}return x}function dr(x,P){if(!(P==="constructor"&&typeof x[P]=="function")&&P!="__proto__")return x[P]}var Lr=ko(Bi),ai=Qc||function(x,P){return vr.setTimeout(x,P)},Wr=ko($i);function Xi(x,P,V){var ye=P+"";return Wr(x,A(ye,Pa(ha(ye),V)))}function ko(x){var P=0,V=0;return function(){var ye=Df(),Ve=xe-(ye-V);if(V=ye,Ve>0){if(++P>=fe)return arguments[0]}else P=0;return x.apply(t,arguments)}}function Qa(x,P){var V=-1,ye=x.length,Ve=ye-1;for(P=P===t?ye:P;++V<P;){var dt=_n(V,Ve),Kt=x[dt];x[dt]=x[V],x[V]=Kt}return x.length=P,x}var aa=Xt(function(x){var P=[];return x.charCodeAt(0)===46&&P.push(""),x.replace(fr,function(V,ye,Ve,dt){P.push(Ve?dt.replace(Sa,"$1"):ye||V)}),P});function _a(x){if(typeof x=="string"||DA(x))return x;var P=x+"";return P=="0"&&1/x==-1/0?"-0":P}function ba(x){if(x!=null){try{return YA.call(x)}catch{}try{return x+""}catch{}}return""}function Pa(x,P){return Ba(bt,function(V){var ye="_."+V[0];P&V[1]&&!Du(x,ye)&&x.push(ye)}),x.sort()}function Yl(x){if(x instanceof $r)return x.clone();var P=new Di(x.__wrapped__,x.__chain__);return P.__actions__=Ta(x.__actions__),P.__index__=x.__index__,P.__values__=x.__values__,P}function qa(x,P,V){(V?B(x,P,V):P===t)?P=1:P=zo(w(P),0);var ye=x==null?0:x.length;if(!ye||P<1)return[];for(var Ve=0,dt=0,Kt=an(ZA(ye/P));Ve<ye;)Kt[dt++]=Si(x,Ve,Ve+=P);return Kt}function xa(x){for(var P=-1,V=x==null?0:x.length,ye=0,Ve=[];++P<V;){var dt=x[P];dt&&(Ve[ye++]=dt)}return Ve}function hs(){var x=arguments.length;if(!x)return[];for(var P=an(x-1),V=arguments[0],ye=x;ye--;)P[ye-1]=arguments[ye];return Ku(vo(V)?Ta(V):[V],Qs(P,1))}var gi=In(function(x,P){return _l(x)?xu(x,Qs(P,1,_l,!0)):[]}),Xo=In(function(x,P){var V=RA(P);return _l(V)&&(V=t),_l(x)?xu(x,Qs(P,1,_l,!0),di(V,2)):[]}),la=In(function(x,P){var V=RA(P);return _l(V)&&(V=t),_l(x)?xu(x,Qs(P,1,_l,!0),t,V):[]});function fa(x,P,V){var ye=x==null?0:x.length;return ye?(P=V||P===t?1:w(P),Si(x,P<0?0:P,ye)):[]}function ks(x,P,V){var ye=x==null?0:x.length;return ye?(P=V||P===t?1:w(P),P=ye-P,Si(x,0,P<0?0:P)):[]}function Dl(x,P){return x&&x.length?fl(x,di(P,3),!0,!0):[]}function Ro(x,P){return x&&x.length?fl(x,di(P,3),!0):[]}function Pd(x,P,V,ye){var Ve=x==null?0:x.length;return Ve?(V&&typeof V!="number"&&B(x,P,V)&&(V=0,ye=Ve),ih(x,P,V,ye)):[]}function yl(x,P,V){var ye=x==null?0:x.length;if(!ye)return-1;var Ve=V==null?0:w(V);return Ve<0&&(Ve=zo(ye+Ve,0)),hc(x,di(P,3),Ve)}function PA(x,P,V){var ye=x==null?0:x.length;if(!ye)return-1;var Ve=ye-1;return V!==t&&(Ve=w(V),Ve=V<0?zo(ye+Ve,0):cs(Ve,ye-1)),hc(x,di(P,3),Ve,!0)}function Xc(x){var P=x==null?0:x.length;return P?Qs(x,1):[]}function vl(x){var P=x==null?0:x.length;return P?Qs(x,Qe):[]}function Cl(x,P){var V=x==null?0:x.length;return V?(P=P===t?1:w(P),Qs(x,P)):[]}function cf(x){for(var P=-1,V=x==null?0:x.length,ye={};++P<V;){var Ve=x[P];ye[Ve[0]]=Ve[1]}return ye}function jf(x){return x&&x.length?x[0]:t}function Rh(x,P,V){var ye=x==null?0:x.length;if(!ye)return-1;var Ve=V==null?0:w(V);return Ve<0&&(Ve=zo(ye+Ve,0)),Zs(x,P,Ve)}function df(x){var P=x==null?0:x.length;return P?Si(x,0,-1):[]}var $m=In(function(x){var P=Ss(x,IA);return P.length&&P[0]===x[0]?Sc(P):[]}),hf=In(function(x){var P=RA(x),V=Ss(x,IA);return P===RA(V)?P=t:V.pop(),V.length&&V[0]===x[0]?Sc(V,di(P,2)):[]}),Vm=In(function(x){var P=RA(x),V=Ss(x,IA);return P=typeof P=="function"?P:t,P&&V.pop(),V.length&&V[0]===x[0]?Sc(V,t,P):[]});function ff(x,P){return x==null?"":vc.call(x,P)}function RA(x){var P=x==null?0:x.length;return P?x[P-1]:t}function hm(x,P,V){var ye=x==null?0:x.length;if(!ye)return-1;var Ve=ye;return V!==t&&(Ve=w(V),Ve=Ve<0?zo(ye+Ve,0):cs(Ve,ye-1)),P===P?lm(x,P,Ve):hc(x,Jh,Ve,!0)}function L0(x,P){return x&&x.length?Bt(x,w(P)):t}var fm=In(Nf);function Nf(x,P){return x&&x.length&&P&&P.length?tn(x,P):x}function dA(x,P,V){return x&&x.length&&P&&P.length?tn(x,P,di(V,2)):x}function Dh(x,P,V){return x&&x.length&&P&&P.length?tn(x,P,t,V):x}var Jc=Oc(function(x,P){var V=x==null?0:x.length,ye=rc(x,P);return Zt(x,Ss(P,function(Ve){return I(Ve,V)?+Ve:Ve}).sort(Oh)),ye});function sc(x,P){var V=[];if(!(x&&x.length))return V;var ye=-1,Ve=[],dt=x.length;for(P=di(P,3);++ye<dt;){var Kt=x[ye];P(Kt,ye,x)&&(V.push(Kt),Ve.push(ye))}return Zt(x,Ve),V}function Wf(x){return x==null?x:Uu.call(x)}function U0(x,P,V){var ye=x==null?0:x.length;return ye?(V&&typeof V!="number"&&B(x,P,V)?(P=0,V=ye):(P=P==null?0:w(P),V=V===t?ye:w(V)),Si(x,P,V)):[]}function Hm(x,P){return No(x,P)}function Wy(x,P,V){return xo(x,P,di(V,2))}function pf(x,P){var V=x==null?0:x.length;if(V){var ye=No(x,P);if(ye<V&&lh(x[ye],P))return ye}return-1}function Qg(x,P){return No(x,P,!0)}function Zm(x,P,V){return xo(x,P,di(V,2),!0)}function Gf(x,P){var V=x==null?0:x.length;if(V){var ye=No(x,P,!0)-1;if(lh(x[ye],P))return ye}return-1}function z0(x){return x&&x.length?yo(x):[]}function Rd(x,P){return x&&x.length?yo(x,di(P,2)):[]}function j0(x){var P=x==null?0:x.length;return P?Si(x,1,P):[]}function Xm(x,P,V){return x&&x.length?(P=V||P===t?1:w(P),Si(x,0,P<0?0:P)):[]}function Jm(x,P,V){var ye=x==null?0:x.length;return ye?(P=V||P===t?1:w(P),P=ye-P,Si(x,P<0?0:P,ye)):[]}function Ya(x,P){return x&&x.length?fl(x,di(P,3),!1,!0):[]}function N0(x,P){return x&&x.length?fl(x,di(P,3)):[]}var Gy=In(function(x){return ds(Qs(x,1,_l,!0))}),W0=In(function(x){var P=RA(x);return _l(P)&&(P=t),ds(Qs(x,1,_l,!0),di(P,2))}),e0=In(function(x){var P=RA(x);return P=typeof P=="function"?P:t,ds(Qs(x,1,_l,!0),t,P)});function Kh(x){return x&&x.length?ds(x):[]}function Qy(x,P){return x&&x.length?ds(x,di(P,2)):[]}function Bp(x,P){return P=typeof P=="function"?P:t,x&&x.length?ds(x,t,P):[]}function t0(x){if(!(x&&x.length))return[];var P=0;return x=Ru(x,function(V){if(_l(V))return P=zo(V.length,P),!0}),dd(P,function(V){return Ss(x,ef(V))})}function ol(x,P){if(!(x&&x.length))return[];var V=t0(x);return P==null?V:Ss(V,function(ye){return Hs(P,t,ye)})}var qg=In(function(x,P){return _l(x)?xu(x,P):[]}),hA=In(function(x){return uu(Ru(x,_l))}),G0=In(function(x){var P=RA(x);return _l(P)&&(P=t),uu(Ru(x,_l),di(P,2))}),Yg=In(function(x){var P=RA(x);return P=typeof P=="function"?P:t,uu(Ru(x,_l),t,P)}),Fh=In(t0);function Op(x,P){return OA(x||[],P||[],xc)}function pm(x,P){return OA(x||[],P||[],Tr)}var Zu=In(function(x){var P=x.length,V=P>1?x[P-1]:t;return V=typeof V=="function"?(x.pop(),V):t,ol(x,V)});function Qf(x){var P=it(x);return P.__chain__=!0,P}function n0(x,P){return P(x),x}function Dd(x,P){return P(x)}var r0=Oc(function(x){var P=x.length,V=P?x[0]:0,ye=this.__wrapped__,Ve=function(dt){return rc(dt,x)};return P>1||this.__actions__.length||!(ye instanceof $r)||!I(V)?this.thru(Ve):(ye=ye.slice(V,+V+(P?1:0)),ye.__actions__.push({func:Dd,args:[Ve],thisArg:t}),new Di(ye,this.__chain__).thru(function(dt){return P&&!dt.length&&dt.push(t),dt}))});function mf(){return Qf(this)}function mm(){return new Di(this.value(),this.__chain__)}function Q0(){this.__values__===t&&(this.__values__=h(this.value()));var x=this.__index__>=this.__values__.length,P=x?t:this.__values__[this.__index__++];return{done:x,value:P}}function i0(){return this}function $g(x){for(var P,V=this;V instanceof Bo;){var ye=Yl(V);ye.__index__=0,ye.__values__=t,P?Ve.__wrapped__=ye:P=ye;var Ve=ye;V=V.__wrapped__}return Ve.__wrapped__=x,P}function gm(){var x=this.__wrapped__;if(x instanceof $r){var P=x;return this.__actions__.length&&(P=new $r(this)),P=P.reverse(),P.__actions__.push({func:Dd,args:[Wf],thisArg:t}),new Di(P,this.__chain__)}return this.thru(Wf)}function q0(){return pl(this.__wrapped__,this.__actions__)}var Vg=Ec(function(x,P,V){Uo.call(x,V)?++x[V]:Qu(x,V,1)});function Hg(x,P,V){var ye=vo(x)?ld:rh;return V&&B(x,P,V)&&(P=t),ye(x,di(P,3))}function ym(x,P){var V=vo(x)?Ru:BA;return V(x,di(P,3))}var vm=oc(yl),Ip=oc(PA);function ed(x,P){return Qs(kp(x,P),1)}function Lh(x,P){return Qs(kp(x,P),Qe)}function o0(x,P,V){return V=V===t?1:w(V),Qs(kp(x,P),V)}function qf(x,P){var V=vo(x)?Ba:Po;return V(x,di(P,3))}function s0(x,P){var V=vo(x)?cl:Is;return V(x,di(P,3))}var a0=Ec(function(x,P,V){Uo.call(x,V)?x[V].push(P):Qu(x,V,[P])});function Cm(x,P,V,ye){x=Ic(x)?x:Ko(x),V=V&&!ye?w(V):0;var Ve=x.length;return V<0&&(V=zo(Ve+V,0)),xm(x)?V<=Ve&&x.indexOf(P,V)>-1:!!Ve&&Zs(x,P,V)>-1}var Y0=In(function(x,P,V){var ye=-1,Ve=typeof P=="function",dt=Ic(x)?an(x.length):[];return Po(x,function(Kt){dt[++ye]=Ve?Hs(P,Kt,V):Ql(Kt,P,V)}),dt}),l0=Ec(function(x,P,V){Qu(x,V,P)});function kp(x,P){var V=vo(x)?Ss:Ze;return V(x,di(P,3))}function Yf(x,P,V,ye){return x==null?[]:(vo(P)||(P=P==null?[]:[P]),V=ye?t:V,vo(V)||(V=V==null?[]:[V]),kt(x,P,V))}var Tp=Ec(function(x,P,V){x[V?0:1].push(P)},function(){return[[],[]]});function _m(x,P,V){var ye=vo(x)?ud:fc,Ve=arguments.length<3;return ye(x,di(P,4),V,Ve,Po)}function m(x,P,V){var ye=vo(x)?gp:fc,Ve=arguments.length<3;return ye(x,di(P,4),V,Ve,Is)}function C(x,P){var V=vo(x)?Ru:BA;return V(x,ni(di(P,3)))}function F(x){var P=vo(x)?Gu:Wn;return P(x)}function G(x,P,V){(V?B(x,P,V):P===t)?P=1:P=w(P);var ye=vo(x)?bc:Sn;return ye(x,P)}function ae(x){var P=vo(x)?nh:Oo;return P(x)}function ge(x){if(x==null)return 0;if(Ic(x))return xm(x)?jc(x):x.length;var P=gl(x);return P==Ut||P==Dn?x.size:Ie(x).length}function Je(x,P,V){var ye=vo(x)?sA:jo;return V&&B(x,P,V)&&(P=t),ye(x,di(P,3))}var It=In(function(x,P){if(x==null)return[];var V=P.length;return V>1&&B(x,P[0],P[1])?P=[]:V>2&&B(P[0],P[1],P[2])&&(P=[P[0]]),kt(x,Qs(P,1),[])}),Wt=Ho||function(){return vr.Date.now()};function xn(x,P){if(typeof P!="function")throw new Il(a);return x=w(x),function(){if(--x<1)return P.apply(this,arguments)}}function Ar(x,P,V){return P=V?t:P,P=x&&P==null?x.length:P,Io(x,N,t,t,t,t,P)}function mr(x,P){var V;if(typeof P!="function")throw new Il(a);return x=w(x),function(){return--x>0&&(V=P.apply(this,arguments)),x<=1&&(P=t),V}}var Jn=In(function(x,P,V){var ye=z;if(V.length){var Ve=tl(V,Hc(Jn));ye|=Y}return Io(x,ye,P,V,Ve)}),zr=In(function(x,P,V){var ye=z|q;if(V.length){var Ve=tl(V,Hc(zr));ye|=Y}return Io(P,ye,x,V,Ve)});function ii(x,P,V){P=V?t:P;var ye=Io(x,re,t,t,t,t,t,P);return ye.placeholder=ii.placeholder,ye}function li(x,P,V){P=V?t:P;var ye=Io(x,X,t,t,t,t,t,P);return ye.placeholder=li.placeholder,ye}function sl(x,P,V){var ye,Ve,dt,Kt,qt,sn,$n=0,Vn=!1,pr=!1,Zr=!0;if(typeof x!="function")throw new Il(a);P=L(P)||0,bl(V)&&(Vn=!!V.leading,pr="maxWait"in V,dt=pr?zo(L(V.maxWait)||0,P):dt,Zr="trailing"in V?!!V.trailing:Zr);function xi(eA){var Zf=ye,Em=Ve;return ye=Ve=t,$n=eA,Kt=x.apply(Em,Zf),Kt}function Ji(eA){return $n=eA,qt=ai(ws,P),Vn?xi(eA):Kt}function os(eA){var Zf=eA-sn,Em=eA-$n,J8=P-Zf;return pr?cs(J8,dt-Em):J8}function eo(eA){var Zf=eA-sn,Em=eA-$n;return sn===t||Zf>=P||Zf<0||pr&&Em>=dt}function ws(){var eA=Wt();if(eo(eA))return Ls(eA);qt=ai(ws,os(eA))}function Ls(eA){return qt=t,Zr&&ye?xi(eA):(ye=Ve=t,Kt)}function Nh(){qt!==t&&Pl(qt),$n=0,ye=sn=Ve=qt=t}function zd(){return qt===t?Kt:Ls(Wt())}function Wh(){var eA=Wt(),Zf=eo(eA);if(ye=arguments,Ve=this,sn=eA,Zf){if(qt===t)return Ji(sn);if(pr)return Pl(qt),qt=ai(ws,P),xi(sn)}return qt===t&&(qt=ai(ws,P)),Kt}return Wh.cancel=Nh,Wh.flush=zd,Wh}var ln=In(function(x,P){return Ff(x,1,P)}),Jt=In(function(x,P,V){return Ff(x,L(P)||0,V)});function cn(x){return Io(x,he)}function Cr(x,P){if(typeof x!="function"||P!=null&&typeof P!="function")throw new Il(a);var V=function(){var ye=arguments,Ve=P?P.apply(this,ye):ye[0],dt=V.cache;if(dt.has(Ve))return dt.get(Ve);var Kt=x.apply(this,ye);return V.cache=dt.set(Ve,Kt)||dt,Kt};return V.cache=new(Cr.Cache||Mi),V}Cr.Cache=Mi;function ni(x){if(typeof x!="function")throw new Il(a);return function(){var P=arguments;switch(P.length){case 0:return!x.call(this);case 1:return!x.call(this,P[0]);case 2:return!x.call(this,P[0],P[1]);case 3:return!x.call(this,P[0],P[1],P[2])}return!x.apply(this,P)}}function Ii(x){return mr(2,x)}var Oi=ml(function(x,P){P=P.length==1&&vo(P[0])?Ss(P[0],pu(di())):Ss(Qs(P,1),pu(di()));var V=P.length;return In(function(ye){for(var Ve=-1,dt=cs(ye.length,V);++Ve<dt;)ye[Ve]=P[Ve].call(this,ye[Ve]);return Hs(x,this,ye)})}),zi=In(function(x,P){var V=tl(P,Hc(zi));return Io(x,Y,t,P,V)}),Fs=In(function(x,P){var V=tl(P,Hc(Fs));return Io(x,ee,t,P,V)}),Jo=Oc(function(x,P){return Io(x,ie,t,t,t,P)});function Uh(x,P){if(typeof x!="function")throw new Il(a);return P=P===t?P:w(P),In(x,P)}function Zg(x,P){if(typeof x!="function")throw new Il(a);return P=P==null?0:zo(w(P),0),In(function(V){var ye=V[P],Ve=sa(V,0,P);return ye&&Ku(Ve,ye),Hs(x,this,Ve)})}function s_(x,P,V){var ye=!0,Ve=!0;if(typeof x!="function")throw new Il(a);return bl(V)&&(ye="leading"in V?!!V.leading:ye,Ve="trailing"in V?!!V.trailing:Ve),sl(x,P,{leading:ye,maxWait:P,trailing:Ve})}function a_(x){return Ar(x,1)}function l_(x,P){return zi(Vu(P),x)}function u_(){if(!arguments.length)return[];var x=arguments[0];return vo(x)?x:[x]}function c3(x){return bs(x,O)}function A_(x,P){return P=typeof P=="function"?P:t,bs(x,O,P)}function Pp(x){return bs(x,E|O)}function c_(x,P){return P=typeof P=="function"?P:t,bs(x,E|O,P)}function d_(x,P){return P==null||su(x,P,Nr(P))}function lh(x,P){return x===P||x!==x&&P!==P}var h_=sf(au),d3=sf(function(x,P){return x>=P}),bm=wd(function(){return arguments}())?wd:function(x){return xl(x)&&Uo.call(x,"callee")&&!yc.call(x,"callee")},vo=an.isArray,$0=Hi?pu(Hi):T;function Ic(x){return x!=null&&V0(x.length)&&!ac(x)}function _l(x){return xl(x)&&Ic(x)}function f_(x){return x===!0||x===!1||xl(x)&&Xs(x)==Le}var zh=Jd||I3,Xg=Zi?pu(Zi):l;function Jg(x){return xl(x)&&x.nodeType===1&&!$f(x)}function h3(x){if(x==null)return!0;if(Ic(x)&&(vo(x)||typeof x=="string"||typeof x.splice=="function"||zh(x)||Dp(x)||bm(x)))return!x.length;var P=gl(x);if(P==Ut||P==Dn)return!x.size;if(ze(x))return!Ie(x).length;for(var V in x)if(Uo.call(x,V))return!1;return!0}function f3(x,P){return c(x,P)}function p3(x,P,V){V=typeof V=="function"?V:t;var ye=V?V(x,P):t;return ye===t?c(x,P,t,V):!!ye}function Rp(x){if(!xl(x))return!1;var P=Xs(x);return P==nt||P==Ee||typeof x.message=="string"&&typeof x.name=="string"&&!$f(x)}function fA(x){return typeof x=="number"&&Yc(x)}function ac(x){if(!bl(x))return!1;var P=Xs(x);return P==_t||P==ht||P==Pt||P==nn}function e1(x){return typeof x=="number"&&x==w(x)}function V0(x){return typeof x=="number"&&x>-1&&x%1==0&&x<=He}function bl(x){var P=typeof x;return x!=null&&(P=="object"||P=="function")}function xl(x){return x!=null&&typeof x=="object"}var p_=us?pu(us):M;function m_(x,P){return x===P||R(x,P,is(P))}function g_(x,P,V){return V=typeof V=="function"?V:t,R(x,P,is(P),V)}function m3(x){return $y(x)&&x!=+x}function y_(x){if(ke(x))throw new Ci(s);return j(x)}function qy(x){return x===null}function Yy(x){return x==null}function $y(x){return typeof x=="number"||xl(x)&&Xs(x)==en}function $f(x){if(!xl(x)||Xs(x)!=mn)return!1;var P=za(x);if(P===null)return!0;var V=Uo.call(P,"constructor")&&P.constructor;return typeof V=="function"&&V instanceof V&&YA.call(V)==lA}var H0=ya?pu(ya):$;function v_(x){return e1(x)&&x>=-9007199254740991&&x<=He}var t1=Ua?pu(Ua):te;function xm(x){return typeof x=="string"||!vo(x)&&xl(x)&&Xs(x)==fn}function DA(x){return typeof x=="symbol"||xl(x)&&Xs(x)==Hn}var Dp=fu?pu(fu):se;function Vy(x){return x===t}function Hy(x){return xl(x)&&gl(x)==Qn}function g3(x){return xl(x)&&Xs(x)==Xn}var f=sf($e),u=sf(function(x,P){return x<=P});function h(x){if(!x)return[];if(Ic(x))return xm(x)?Fu(x):Ta(x);if(bA&&x[bA])return Rf(x[bA]());var P=gl(x),V=P==Ut?hd:P==Dn?Ol:Ko;return V(x)}function v(x){if(!x)return x===0?x:0;if(x=L(x),x===Qe||x===-1/0){var P=x<0?-1:1;return P*We}return x===x?x:0}function w(x){var P=v(x),V=P%1;return P===P?V?P-V:P:0}function K(x){return x?bu(w(x),0,Te):0}function L(x){if(typeof x=="number")return x;if(DA(x))return Ce;if(bl(x)){var P=typeof x.valueOf=="function"?x.valueOf():x;x=bl(P)?P+"":P}if(typeof x!="string")return x===0?x:+x;x=Lc(x);var V=Mo.test(x);return V||La.test(x)?Yn(x.slice(2),V?2:8):oo.test(x)?Ce:+x}function W(x){return Au(x,Qr(x))}function Z(x){return x?bu(w(x),-9007199254740991,He):x===0?x:0}function ne(x){return x==null?"":Wo(x)}var ce=kA(function(x,P){if(ze(P)||Ic(P)){Au(P,Nr(P),x);return}for(var V in P)Uo.call(P,V)&&xc(x,V,P[V])}),be=kA(function(x,P){Au(P,Qr(P),x)}),Ke=kA(function(x,P,V,ye){Au(P,Qr(P),x,ye)}),Ue=kA(function(x,P,V,ye){Au(P,Nr(P),x,ye)}),Ne=Oc(rc);function Xe(x,P){var V=ja(x);return P==null?V:gr(V,P)}var ut=In(function(x,P){x=Vo(x);var V=-1,ye=P.length,Ve=ye>2?P[2]:t;for(Ve&&B(P[0],P[1],Ve)&&(ye=1);++V<ye;)for(var dt=P[V],Kt=Qr(dt),qt=-1,sn=Kt.length;++qt<sn;){var $n=Kt[qt],Vn=x[$n];(Vn===t||lh(Vn,kl[$n])&&!Uo.call(x,$n))&&(x[$n]=dt[$n])}return x}),Ct=In(function(x){return x.push(t,af),Hs($l,t,x)});function Nt(x,P){return Pf(x,di(P,3),hl)}function Et(x,P){return Pf(x,di(P,3),qu)}function Fe(x,P){return x==null?x:wc(x,di(P,3),Qr)}function st(x,P){return x==null?x:Gl(x,di(P,3),Qr)}function Ot(x,P){return x&&hl(x,di(P,3))}function un(x,P){return x&&qu(x,di(P,3))}function zn(x){return x==null?[]:Mc(x,Nr(x))}function yn(x){return x==null?[]:Mc(x,Qr(x))}function wn(x,P,V){var ye=x==null?t:wu(x,P);return ye===t?V:ye}function tr(x,P){return x!=null&&dm(x,P,lu)}function Un(x,P){return x!=null&&dm(x,P,cA)}var cr=xp(function(x,P,V){P!=null&&typeof P.toString!="function"&&(P=_A.call(P)),x[P]=V},Ud(ch)),On=xp(function(x,P,V){P!=null&&typeof P.toString!="function"&&(P=_A.call(P)),Uo.call(x,P)?x[P].push(V):x[P]=[V]},di),Gr=In(Ql);function Nr(x){return Ic(x)?ou(x):Ie(x)}function Qr(x){return Ic(x)?ou(x,!0):Re(x)}function ei(x,P){var V={};return P=di(P,3),hl(x,function(ye,Ve,dt){Qu(V,P(ye,Ve,dt),ye)}),V}function Do(x,P){var V={};return P=di(P,3),hl(x,function(ye,Ve,dt){Qu(V,Ve,P(ye,Ve,dt))}),V}var al=kA(function(x,P,V){pt(x,P,V)}),$l=kA(function(x,P,V,ye){pt(x,P,V,ye)}),Xu=Oc(function(x,P){var V={};if(x==null)return V;var ye=!1;P=Ss(P,function(dt){return dt=Js(dt,x),ye||(ye=dt.length>1),dt}),Au(x,uf(x),V),ye&&(V=bs(V,E|S|O,Id));for(var Ve=P.length;Ve--;)Wa(V,P[Ve]);return V});function uh(x,P){return Eu(x,ni(di(P)))}var lc=Oc(function(x,P){return x==null?{}:Rt(x,P)});function Eu(x,P){if(x==null)return{};var V=Ss(uf(x),function(ye){return[ye]});return P=di(P),zt(x,V,function(ye,Ve){return P(ye,Ve[0])})}function pA(x,P,V){P=Js(P,x);var ye=-1,Ve=P.length;for(Ve||(Ve=1,x=t);++ye<Ve;){var dt=x==null?t:x[_a(P[ye])];dt===t&&(ye=Ve,dt=V),x=ac(dt)?dt.call(x):dt}return x}function wl(x,P,V){return x==null?x:Tr(x,P,V)}function cu(x,P,V,ye){return ye=typeof ye=="function"?ye:t,x==null?x:Tr(x,P,V,ye)}var KA=zf(Nr),FA=zf(Qr);function uc(x,P,V){var ye=vo(x),Ve=ye||zh(x)||Dp(x);if(P=di(P,4),V==null){var dt=x&&x.constructor;Ve?V=ye?new dt:[]:bl(x)?V=ac(dt)?ja(za(x)):{}:V={}}return(Ve?Ba:hl)(x,function(Kt,qt,sn){return P(V,Kt,qt,sn)}),V}function du(x,P){return x==null?!0:Wa(x,P)}function Kd(x,P,V){return x==null?x:$u(x,P,Vu(V))}function kc(x,P,V,ye){return ye=typeof ye=="function"?ye:t,x==null?x:$u(x,P,Vu(V),ye)}function Ko(x){return x==null?[]:Sh(x,Nr(x))}function mA(x){return x==null?[]:Sh(x,Qr(x))}function $a(x,P,V){return V===t&&(V=P,P=t),V!==t&&(V=L(V),V=V===V?V:0),P!==t&&(P=L(P),P=P===P?P:0),bu(L(x),P,V)}function ll(x,P,V){return P=v(P),V===t?(V=P,P=0):V=v(V),x=L(x),Mu(x,P,V)}function Bu(x,P,V){if(V&&typeof V!="boolean"&&B(x,P,V)&&(P=V=t),V===t&&(typeof P=="boolean"?(V=P,P=t):typeof x=="boolean"&&(V=x,x=t)),x===t&&P===t?(x=0,P=1):(x=v(x),P===t?(P=x,x=0):P=v(P)),x>P){var ye=x;x=P,P=ye}if(V||x%1||P%1){var Ve=md();return cs(x+Ve*(P-x+Ir("1e-"+((Ve+"").length-1))),P)}return _n(x,P)}var wm=oh(function(x,P,V){return P=P.toLowerCase(),x+(V?td(P):P)});function td(x){return Jy(ne(x).toLowerCase())}function Z0(x){return x=ne(x),x&&x.replace(ns,tf).replace(oA,"")}function Ah(x,P,V){x=ne(x),P=Wo(P);var ye=x.length;V=V===t?ye:bu(w(V),0,ye);var Ve=V;return V-=P.length,V>=0&&x.slice(V,Ve)==P}function nd(x){return x=ne(x),x&&Gt.test(x)?x.replace(ct,iu):x}function Ju(x){return x=ne(x),x&&on.test(x)?x.replace(Sr,"\\$&"):x}var Fd=oh(function(x,P,V){return x+(V?"-":"")+P.toLowerCase()}),Vf=oh(function(x,P,V){return x+(V?" ":"")+P.toLowerCase()}),C_=bp("toLowerCase");function __(x,P,V){x=ne(x),P=w(P);var ye=P?jc(x):0;if(!P||ye>=P)return x;var Ve=(P-ye)/2;return Uf(Lu(Ve),V)+x+Uf(ZA(Ve),V)}function b_(x,P,V){x=ne(x),P=w(P);var ye=P?jc(x):0;return P&&ye<P?x+Uf(P-ye,V):x}function x_(x,P,V){x=ne(x),P=w(P);var ye=P?jc(x):0;return P&&ye<P?Uf(P-ye,V)+x:x}function Zy(x,P,V){return V||P==null?P=0:P&&(P=+P),pd(ne(x).replace(Nn,""),P||0)}function Xy(x,P,V){return(V?B(x,P,V):P===t)?P=1:P=w(P),vn(ne(x),P)}function Hf(){var x=arguments,P=ne(x[0]);return x.length<3?P:P.replace(x[1],x[2])}var w_=oh(function(x,P,V){return x+(V?"_":"")+P.toLowerCase()});function M_(x,P,V){return V&&typeof V!="number"&&B(x,P,V)&&(P=V=t),V=V===t?Te:V>>>0,V?(x=ne(x),x&&(typeof P=="string"||P!=null&&!H0(P))&&(P=Wo(P),!P&&zc(x))?sa(Fu(x),0,V):x.split(P,V)):[]}var y3=oh(function(x,P,V){return x+(V?" ":"")+Jy(P)});function v3(x,P,V){return x=ne(x),V=V==null?0:bu(w(V),0,x.length),P=Wo(P),x.slice(V,V+P.length)==P}function C3(x,P,V){var ye=it.templateSettings;V&&B(x,P,V)&&(P=t),x=ne(x),P=Ke({},P,ye,Hu);var Ve=Ke({},P.imports,ye.imports,Hu),dt=Nr(Ve),Kt=Sh(Ve,dt),qt,sn,$n=0,Vn=P.interpolate||Aa,pr="__p += '",Zr=QA((P.escape||Aa).source+"|"+Vn.source+"|"+(Vn===xt?qi:Aa).source+"|"+(P.evaluate||Aa).source+"|$","g"),xi="//# sourceURL="+(Uo.call(P,"sourceURL")?(P.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ni+"]")+`
|
||
`;x.replace(Zr,function(eo,ws,Ls,Nh,zd,Wh){return Ls||(Ls=Nh),pr+=x.slice($n,Wh).replace(Al,Bl),ws&&(qt=!0,pr+=`' +
|
||
__e(`+ws+`) +
|
||
'`),zd&&(sn=!0,pr+=`';
|
||
`+zd+`;
|
||
__p += '`),Ls&&(pr+=`' +
|
||
((__t = (`+Ls+`)) == null ? '' : __t) +
|
||
'`),$n=Wh+eo.length,eo}),pr+=`';
|
||
`;var Ji=Uo.call(P,"variable")&&P.variable;if(!Ji)pr=`with (obj) {
|
||
`+pr+`
|
||
}
|
||
`;else if(co.test(Ji))throw new Ci(o);pr=(sn?pr.replace(p,""):pr).replace(je,"$1").replace(Ye,"$1;"),pr="function("+(Ji||"obj")+`) {
|
||
`+(Ji?"":`obj || (obj = {});
|
||
`)+"var __t, __p = ''"+(qt?", __e = _.escape":"")+(sn?`, __j = Array.prototype.join;
|
||
function print() { __p += __j.call(arguments, '') }
|
||
`:`;
|
||
`)+pr+`return __p
|
||
}`;var os=B_(function(){return _o(dt,xi+"return "+pr).apply(t,Kt)});if(os.source=pr,Rp(os))throw os;return os}function _3(x){return ne(x).toLowerCase()}function b3(x){return ne(x).toUpperCase()}function x3(x,P,V){if(x=ne(x),x&&(V||P===t))return Lc(x);if(!x||!(P=Wo(P)))return x;var ye=Fu(x),Ve=Fu(P),dt=aA(ye,Ve),Kt=Uc(ye,Ve)+1;return sa(ye,dt,Kt).join("")}function w3(x,P,V){if(x=ne(x),x&&(V||P===t))return x.slice(0,$d(x)+1);if(!x||!(P=Wo(P)))return x;var ye=Fu(x),Ve=Uc(ye,Fu(P))+1;return sa(ye,0,Ve).join("")}function M3(x,P,V){if(x=ne(x),x&&(V||P===t))return x.replace(Nn,"");if(!x||!(P=Wo(P)))return x;var ye=Fu(x),Ve=aA(ye,Fu(P));return sa(ye,Ve).join("")}function jh(x,P){var V=de,ye=Me;if(bl(P)){var Ve="separator"in P?P.separator:Ve;V="length"in P?w(P.length):V,ye="omission"in P?Wo(P.omission):ye}x=ne(x);var dt=x.length;if(zc(x)){var Kt=Fu(x);dt=Kt.length}if(V>=dt)return x;var qt=V-jc(ye);if(qt<1)return ye;var sn=Kt?sa(Kt,0,qt).join(""):x.slice(0,qt);if(Ve===t)return sn+ye;if(Kt&&(qt+=sn.length-qt),H0(Ve)){if(x.slice(qt).search(Ve)){var $n,Vn=sn;for(Ve.global||(Ve=QA(Ve.source,ne(yi.exec(Ve))+"g")),Ve.lastIndex=0;$n=Ve.exec(Vn);)var pr=$n.index;sn=sn.slice(0,pr===t?qt:pr)}}else if(x.indexOf(Wo(Ve),qt)!=qt){var Zr=sn.lastIndexOf(Ve);Zr>-1&&(sn=sn.slice(0,Zr))}return sn+ye}function n1(x){return x=ne(x),x&&At.test(x)?x.replace(tt,Vd):x}var S_=oh(function(x,P,V){return x+(V?" ":"")+P.toUpperCase()}),Jy=bp("toUpperCase");function E_(x,P,V){return x=ne(x),P=V?t:P,P===t?nf(x)?rf(x):yp(x):x.match(P)||[]}var B_=In(function(x,P){try{return Hs(x,t,P)}catch(V){return Rp(V)?V:new Ci(V)}}),LA=Oc(function(x,P){return Ba(P,function(V){V=_a(V),Qu(x,V,Jn(x[V],x))}),x});function Ld(x){var P=x==null?0:x.length,V=di();return x=P?Ss(x,function(ye){if(typeof ye[1]!="function")throw new Il(a);return[V(ye[0]),ye[1]]}):[],In(function(ye){for(var Ve=-1;++Ve<P;){var dt=x[Ve];if(Hs(dt[0],this,ye))return Hs(dt[1],this,ye)}})}function Mm(x){return Kf(bs(x,E))}function Ud(x){return function(){return x}}function Sm(x,P){return x==null||x!==x?P:x}var gf=Th(),iG=Th(!0);function ch(x){return x}function S3(x){return we(typeof x=="function"?x:bs(x,E))}function oG(x){return ft(bs(x,E))}function sG(x,P){return lt(x,bs(P,E))}var aG=In(function(x,P){return function(V){return Ql(V,x,P)}}),lG=In(function(x,P){return function(V){return Ql(x,V,P)}});function E3(x,P,V){var ye=Nr(P),Ve=Mc(P,ye);V==null&&!(bl(P)&&(Ve.length||!ye.length))&&(V=P,P=x,x=this,Ve=Mc(P,Nr(P)));var dt=!(bl(V)&&"chain"in V)||!!V.chain,Kt=ac(x);return Ba(Ve,function(qt){var sn=P[qt];x[qt]=sn,Kt&&(x.prototype[qt]=function(){var $n=this.__chain__;if(dt||$n){var Vn=x(this.__wrapped__),pr=Vn.__actions__=Ta(this.__actions__);return pr.push({func:sn,args:arguments,thisArg:x}),Vn.__chain__=$n,Vn}return sn.apply(x,Ku([this.value()],arguments))})}),x}function uG(){return vr._===this&&(vr._=Tl),this}function B3(){}function AG(x){return x=w(x),In(function(P){return Bt(P,x)})}var cG=Lf(Ss),dG=Lf(ld),hG=Lf(sA);function X8(x){return D(x)?ef(_a(x)):Tt(x)}function fG(x){return function(P){return x==null?t:wu(x,P)}}var pG=Od(),mG=Od(!0);function O3(){return[]}function I3(){return!1}function gG(){return{}}function yG(){return""}function vG(){return!0}function CG(x,P){if(x=w(x),x<1||x>He)return[];var V=Te,ye=cs(x,Te);P=di(P),x-=Te;for(var Ve=dd(ye,P);++V<x;)P(V);return Ve}function _G(x){return vo(x)?Ss(x,_a):DA(x)?[x]:Ta(aa(ne(x)))}function bG(x){var P=++Nc;return ne(x)+P}var xG=sh(function(x,P){return x+P},0),wG=Rl("ceil"),MG=sh(function(x,P){return x/P},1),SG=Rl("floor");function EG(x){return x&&x.length?EA(x,ch,au):t}function BG(x,P){return x&&x.length?EA(x,di(P,2),au):t}function OG(x){return Ad(x,ch)}function IG(x,P){return Ad(x,di(P,2))}function kG(x){return x&&x.length?EA(x,ch,$e):t}function TG(x,P){return x&&x.length?EA(x,di(P,2),$e):t}var PG=sh(function(x,P){return x*P},1),RG=Rl("round"),DG=sh(function(x,P){return x-P},0);function KG(x){return x&&x.length?Mh(x,ch):0}function FG(x,P){return x&&x.length?Mh(x,di(P,2)):0}return it.after=xn,it.ary=Ar,it.assign=ce,it.assignIn=be,it.assignInWith=Ke,it.assignWith=Ue,it.at=Ne,it.before=mr,it.bind=Jn,it.bindAll=LA,it.bindKey=zr,it.castArray=u_,it.chain=Qf,it.chunk=qa,it.compact=xa,it.concat=hs,it.cond=Ld,it.conforms=Mm,it.constant=Ud,it.countBy=Vg,it.create=Xe,it.curry=ii,it.curryRight=li,it.debounce=sl,it.defaults=ut,it.defaultsDeep=Ct,it.defer=ln,it.delay=Jt,it.difference=gi,it.differenceBy=Xo,it.differenceWith=la,it.drop=fa,it.dropRight=ks,it.dropRightWhile=Dl,it.dropWhile=Ro,it.fill=Pd,it.filter=ym,it.flatMap=ed,it.flatMapDeep=Lh,it.flatMapDepth=o0,it.flatten=Xc,it.flattenDeep=vl,it.flattenDepth=Cl,it.flip=cn,it.flow=gf,it.flowRight=iG,it.fromPairs=cf,it.functions=zn,it.functionsIn=yn,it.groupBy=a0,it.initial=df,it.intersection=$m,it.intersectionBy=hf,it.intersectionWith=Vm,it.invert=cr,it.invertBy=On,it.invokeMap=Y0,it.iteratee=S3,it.keyBy=l0,it.keys=Nr,it.keysIn=Qr,it.map=kp,it.mapKeys=ei,it.mapValues=Do,it.matches=oG,it.matchesProperty=sG,it.memoize=Cr,it.merge=al,it.mergeWith=$l,it.method=aG,it.methodOf=lG,it.mixin=E3,it.negate=ni,it.nthArg=AG,it.omit=Xu,it.omitBy=uh,it.once=Ii,it.orderBy=Yf,it.over=cG,it.overArgs=Oi,it.overEvery=dG,it.overSome=hG,it.partial=zi,it.partialRight=Fs,it.partition=Tp,it.pick=lc,it.pickBy=Eu,it.property=X8,it.propertyOf=fG,it.pull=fm,it.pullAll=Nf,it.pullAllBy=dA,it.pullAllWith=Dh,it.pullAt=Jc,it.range=pG,it.rangeRight=mG,it.rearg=Jo,it.reject=C,it.remove=sc,it.rest=Uh,it.reverse=Wf,it.sampleSize=G,it.set=wl,it.setWith=cu,it.shuffle=ae,it.slice=U0,it.sortBy=It,it.sortedUniq=z0,it.sortedUniqBy=Rd,it.split=M_,it.spread=Zg,it.tail=j0,it.take=Xm,it.takeRight=Jm,it.takeRightWhile=Ya,it.takeWhile=N0,it.tap=n0,it.throttle=s_,it.thru=Dd,it.toArray=h,it.toPairs=KA,it.toPairsIn=FA,it.toPath=_G,it.toPlainObject=W,it.transform=uc,it.unary=a_,it.union=Gy,it.unionBy=W0,it.unionWith=e0,it.uniq=Kh,it.uniqBy=Qy,it.uniqWith=Bp,it.unset=du,it.unzip=t0,it.unzipWith=ol,it.update=Kd,it.updateWith=kc,it.values=Ko,it.valuesIn=mA,it.without=qg,it.words=E_,it.wrap=l_,it.xor=hA,it.xorBy=G0,it.xorWith=Yg,it.zip=Fh,it.zipObject=Op,it.zipObjectDeep=pm,it.zipWith=Zu,it.entries=KA,it.entriesIn=FA,it.extend=be,it.extendWith=Ke,E3(it,it),it.add=xG,it.attempt=B_,it.camelCase=wm,it.capitalize=td,it.ceil=wG,it.clamp=$a,it.clone=c3,it.cloneDeep=Pp,it.cloneDeepWith=c_,it.cloneWith=A_,it.conformsTo=d_,it.deburr=Z0,it.defaultTo=Sm,it.divide=MG,it.endsWith=Ah,it.eq=lh,it.escape=nd,it.escapeRegExp=Ju,it.every=Hg,it.find=vm,it.findIndex=yl,it.findKey=Nt,it.findLast=Ip,it.findLastIndex=PA,it.findLastKey=Et,it.floor=SG,it.forEach=qf,it.forEachRight=s0,it.forIn=Fe,it.forInRight=st,it.forOwn=Ot,it.forOwnRight=un,it.get=wn,it.gt=h_,it.gte=d3,it.has=tr,it.hasIn=Un,it.head=jf,it.identity=ch,it.includes=Cm,it.indexOf=Rh,it.inRange=ll,it.invoke=Gr,it.isArguments=bm,it.isArray=vo,it.isArrayBuffer=$0,it.isArrayLike=Ic,it.isArrayLikeObject=_l,it.isBoolean=f_,it.isBuffer=zh,it.isDate=Xg,it.isElement=Jg,it.isEmpty=h3,it.isEqual=f3,it.isEqualWith=p3,it.isError=Rp,it.isFinite=fA,it.isFunction=ac,it.isInteger=e1,it.isLength=V0,it.isMap=p_,it.isMatch=m_,it.isMatchWith=g_,it.isNaN=m3,it.isNative=y_,it.isNil=Yy,it.isNull=qy,it.isNumber=$y,it.isObject=bl,it.isObjectLike=xl,it.isPlainObject=$f,it.isRegExp=H0,it.isSafeInteger=v_,it.isSet=t1,it.isString=xm,it.isSymbol=DA,it.isTypedArray=Dp,it.isUndefined=Vy,it.isWeakMap=Hy,it.isWeakSet=g3,it.join=ff,it.kebabCase=Fd,it.last=RA,it.lastIndexOf=hm,it.lowerCase=Vf,it.lowerFirst=C_,it.lt=f,it.lte=u,it.max=EG,it.maxBy=BG,it.mean=OG,it.meanBy=IG,it.min=kG,it.minBy=TG,it.stubArray=O3,it.stubFalse=I3,it.stubObject=gG,it.stubString=yG,it.stubTrue=vG,it.multiply=PG,it.nth=L0,it.noConflict=uG,it.noop=B3,it.now=Wt,it.pad=__,it.padEnd=b_,it.padStart=x_,it.parseInt=Zy,it.random=Bu,it.reduce=_m,it.reduceRight=m,it.repeat=Xy,it.replace=Hf,it.result=pA,it.round=RG,it.runInContext=Ht,it.sample=F,it.size=ge,it.snakeCase=w_,it.some=Je,it.sortedIndex=Hm,it.sortedIndexBy=Wy,it.sortedIndexOf=pf,it.sortedLastIndex=Qg,it.sortedLastIndexBy=Zm,it.sortedLastIndexOf=Gf,it.startCase=y3,it.startsWith=v3,it.subtract=DG,it.sum=KG,it.sumBy=FG,it.template=C3,it.times=CG,it.toFinite=v,it.toInteger=w,it.toLength=K,it.toLower=_3,it.toNumber=L,it.toSafeInteger=Z,it.toString=ne,it.toUpper=b3,it.trim=x3,it.trimEnd=w3,it.trimStart=M3,it.truncate=jh,it.unescape=n1,it.uniqueId=bG,it.upperCase=S_,it.upperFirst=Jy,it.each=qf,it.eachRight=s0,it.first=jf,E3(it,function(){var x={};return hl(it,function(P,V){Uo.call(it.prototype,V)||(x[V]=P)}),x}(),{chain:!1}),it.VERSION=r,Ba(["bind","bindKey","curry","curryRight","partial","partialRight"],function(x){it[x].placeholder=it}),Ba(["drop","take"],function(x,P){$r.prototype[x]=function(V){V=V===t?1:zo(w(V),0);var ye=this.__filtered__&&!P?new $r(this):this.clone();return ye.__filtered__?ye.__takeCount__=cs(V,ye.__takeCount__):ye.__views__.push({size:cs(V,Te),type:x+(ye.__dir__<0?"Right":"")}),ye},$r.prototype[x+"Right"]=function(V){return this.reverse()[x](V).reverse()}}),Ba(["filter","map","takeWhile"],function(x,P){var V=P+1,ye=V==De||V==at;$r.prototype[x]=function(Ve){var dt=this.clone();return dt.__iteratees__.push({iteratee:di(Ve,3),type:V}),dt.__filtered__=dt.__filtered__||ye,dt}}),Ba(["head","last"],function(x,P){var V="take"+(P?"Right":"");$r.prototype[x]=function(){return this[V](1).value()[0]}}),Ba(["initial","tail"],function(x,P){var V="drop"+(P?"":"Right");$r.prototype[x]=function(){return this.__filtered__?new $r(this):this[V](1)}}),$r.prototype.compact=function(){return this.filter(ch)},$r.prototype.find=function(x){return this.filter(x).head()},$r.prototype.findLast=function(x){return this.reverse().find(x)},$r.prototype.invokeMap=In(function(x,P){return typeof x=="function"?new $r(this):this.map(function(V){return Ql(V,x,P)})}),$r.prototype.reject=function(x){return this.filter(ni(di(x)))},$r.prototype.slice=function(x,P){x=w(x);var V=this;return V.__filtered__&&(x>0||P<0)?new $r(V):(x<0?V=V.takeRight(-x):x&&(V=V.drop(x)),P!==t&&(P=w(P),V=P<0?V.dropRight(-P):V.take(P-x)),V)},$r.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},$r.prototype.toArray=function(){return this.take(Te)},hl($r.prototype,function(x,P){var V=/^(?:filter|find|map|reject)|While$/.test(P),ye=/^(?:head|last)$/.test(P),Ve=it[ye?"take"+(P=="last"?"Right":""):P],dt=ye||/^find/.test(P);Ve&&(it.prototype[P]=function(){var Kt=this.__wrapped__,qt=ye?[1]:arguments,sn=Kt instanceof $r,$n=qt[0],Vn=sn||vo(Kt),pr=function(ws){var Ls=Ve.apply(it,Ku([ws],qt));return ye&&Zr?Ls[0]:Ls};Vn&&V&&typeof $n=="function"&&$n.length!=1&&(sn=Vn=!1);var Zr=this.__chain__,xi=!!this.__actions__.length,Ji=dt&&!Zr,os=sn&&!xi;if(!dt&&Vn){Kt=os?Kt:new $r(this);var eo=x.apply(Kt,qt);return eo.__actions__.push({func:Dd,args:[pr],thisArg:t}),new Di(eo,Zr)}return Ji&&os?x.apply(this,qt):(eo=this.thru(pr),Ji?ye?eo.value()[0]:eo.value():eo)})}),Ba(["pop","push","shift","sort","splice","unshift"],function(x){var P=yu[x],V=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",ye=/^(?:pop|shift)$/.test(x);it.prototype[x]=function(){var Ve=arguments;if(ye&&!this.__chain__){var dt=this.value();return P.apply(vo(dt)?dt:[],Ve)}return this[V](function(Kt){return P.apply(vo(Kt)?Kt:[],Ve)})}}),hl($r.prototype,function(x,P){var V=it[P];if(V){var ye=V.name+"";Uo.call(ju,ye)||(ju[ye]=[]),ju[ye].push({name:P,func:V})}}),ju[Bd(t,q).name]=[{name:"wrapper",func:t}],$r.prototype.clone=Es,$r.prototype.reverse=yd,$r.prototype.value=th,it.prototype.at=r0,it.prototype.chain=mf,it.prototype.commit=mm,it.prototype.next=Q0,it.prototype.plant=$g,it.prototype.reverse=gm,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=q0,it.prototype.first=it.prototype.head,bA&&(it.prototype[bA]=i0),it},gu=mc();vi?((vi.exports=gu)._=gu,kr._=gu):vr._=gu}).call(Sq)}(yv,yv.exports)),yv.exports}var V2=Eq();const t6=Ha(V2);function Bq(n,e,t){const r=e<0?n.length+e:e;if(r>=0&&r<n.length){const i=t<0?n.length+t:t,[s]=n.splice(e,1);n.splice(i,0,s)}}var G3,NI;function Oq(){if(NI)return G3;NI=1;function n(e){for(var t=5381,r=e.length;r;)t=t*33^e.charCodeAt(--r);return t>>>0}return G3=n,G3}var Iq=Oq();const WI=Ha(Iq);var kq=8,Tq={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"}},Pq={"*":{type:"source"}},Rq=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Dq={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:"*"}},Kq={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:"*"}},Fq={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:"*"}},Lq={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"}},Uq={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"}}},zq={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"}}},jq={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"}},Nq=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wq={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Gq={"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"}},Qq={"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"}},qq={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Yq={"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"}},$q={"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"}},Vq={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Hq={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Zq={type:"array",value:"*"},Xq={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},Jq={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},eY={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},tY={type:"array",value:"*",minimum:1},nY={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}},rY={"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}},iY={source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},oY={type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},sY=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],aY={"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"}},lY={"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"}},uY={"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"}},AY={"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"}},cY={"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"}},dY={"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"}},hY={"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"}},fY={"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"}},pY={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},mY={"*":{type:"string"}},Ys={$version:kq,$root:Tq,sources:Pq,source:Rq,source_vector:Dq,source_raster:Kq,source_raster_dem:Fq,source_geojson:Lq,source_video:Uq,source_image:zq,layer:jq,layout:Nq,layout_background:Wq,layout_fill:Gq,layout_circle:Qq,layout_heatmap:qq,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Yq,layout_symbol:$q,layout_raster:Vq,layout_hillshade:Hq,filter:Zq,filter_operator:Xq,geometry_type:Jq,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:eY,expression:tY,light:nY,sky:rY,terrain:iY,projection:oY,paint:sY,paint_fill:aY,"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:lY,paint_circle:uY,paint_heatmap:AY,paint_symbol:cY,paint_raster:dY,paint_hillshade:hY,paint_background:fY,transition:pY,"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:mY};const gY=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function yY(n,e){const t={};for(const r in n)r!=="ref"&&(t[r]=n[r]);return gY.forEach(r=>{r in e&&(t[r]=e[r])}),t}function vY(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=yY(n[t],e[n[t].ref]));return n}function wa(n,e){if(Array.isArray(n)){if(!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(!wa(n[t],e[t]))return!1;return!0}if(typeof n=="object"&&n!==null&&e!==null){if(typeof e!="object"||Object.keys(n).length!==Object.keys(e).length)return!1;for(const r in n)if(!wa(n[r],e[r]))return!1;return!0}return n===e}function Cf(n,e){n.push(e)}function eL(n,e,t){Cf(t,{command:"addSource",args:[n,e[n]]})}function tL(n,e,t){Cf(e,{command:"removeSource",args:[n]}),t[n]=!0}function CY(n,e,t,r){tL(n,t,r),eL(n,e,t)}function _Y(n,e,t){let r;for(r in n[t])if(Object.prototype.hasOwnProperty.call(n[t],r)&&r!=="data"&&!wa(n[t][r],e[t][r]))return!1;for(r in e[t])if(Object.prototype.hasOwnProperty.call(e[t],r)&&r!=="data"&&!wa(n[t][r],e[t][r]))return!1;return!0}function bY(n,e,t,r){n=n||{},e=e||{};let i;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(Object.prototype.hasOwnProperty.call(e,i)||tL(i,t,r));for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(n,i)?wa(n[i],e[i])||(n[i].type==="geojson"&&e[i].type==="geojson"&&_Y(n,e,i)?Cf(t,{command:"setGeoJSONSourceData",args:[i,e[i].data]}):CY(i,e,t,r)):eL(i,e,t))}function P_(n,e,t,r,i,s){n=n||{},e=e||{};for(const a in n)Object.prototype.hasOwnProperty.call(n,a)&&(wa(n[a],e[a])||t.push({command:s,args:[r,a,e[a],i]}));for(const a in e)!Object.prototype.hasOwnProperty.call(e,a)||Object.prototype.hasOwnProperty.call(n,a)||wa(n[a],e[a])||t.push({command:s,args:[r,a,e[a],i]})}function GI(n){return n.id}function QI(n,e){return n[e.id]=e,n}function xY(n,e,t){n=n||[],e=e||[];const r=n.map(GI),i=e.map(GI),s=n.reduce(QI,{}),a=e.reduce(QI,{}),o=r.slice(),d=Object.create(null);let g,b,E,S,O;for(let k=0,U=0;k<r.length;k++)g=r[k],Object.prototype.hasOwnProperty.call(a,g)?U++:(Cf(t,{command:"removeLayer",args:[g]}),o.splice(o.indexOf(g,U),1));for(let k=0,U=0;k<i.length;k++)g=i[i.length-1-k],o[o.length-1-k]!==g&&(Object.prototype.hasOwnProperty.call(s,g)?(Cf(t,{command:"removeLayer",args:[g]}),o.splice(o.lastIndexOf(g,o.length-U),1)):U++,S=o[o.length-k],Cf(t,{command:"addLayer",args:[a[g],S]}),o.splice(o.length-k,0,g),d[g]=!0);for(let k=0;k<i.length;k++)if(g=i[k],b=s[g],E=a[g],!(d[g]||wa(b,E))){if(!wa(b.source,E.source)||!wa(b["source-layer"],E["source-layer"])||!wa(b.type,E.type)){Cf(t,{command:"removeLayer",args:[g]}),S=o[o.lastIndexOf(g)+1],Cf(t,{command:"addLayer",args:[E,S]});continue}P_(b.layout,E.layout,t,g,null,"setLayoutProperty"),P_(b.paint,E.paint,t,g,null,"setPaintProperty"),wa(b.filter,E.filter)||Cf(t,{command:"setFilter",args:[g,E.filter]}),(!wa(b.minzoom,E.minzoom)||!wa(b.maxzoom,E.maxzoom))&&Cf(t,{command:"setLayerZoomRange",args:[g,E.minzoom,E.maxzoom]});for(O in b)Object.prototype.hasOwnProperty.call(b,O)&&(O==="layout"||O==="paint"||O==="filter"||O==="metadata"||O==="minzoom"||O==="maxzoom"||(O.indexOf("paint.")===0?P_(b[O],E[O],t,g,O.slice(6),"setPaintProperty"):wa(b[O],E[O])||Cf(t,{command:"setLayerProperty",args:[g,O,E[O]]})));for(O in E)!Object.prototype.hasOwnProperty.call(E,O)||Object.prototype.hasOwnProperty.call(b,O)||O==="layout"||O==="paint"||O==="filter"||O==="metadata"||O==="minzoom"||O==="maxzoom"||(O.indexOf("paint.")===0?P_(b[O],E[O],t,g,O.slice(6),"setPaintProperty"):wa(b[O],E[O])||Cf(t,{command:"setLayerProperty",args:[g,O,E[O]]}))}}function wY(n,e){if(!n)return[{command:"setStyle",args:[e]}];let t=[];try{if(!wa(n.version,e.version))return[{command:"setStyle",args:[e]}];wa(n.center,e.center)||t.push({command:"setCenter",args:[e.center]}),wa(n.centerAltitude,e.centerAltitude)||t.push({command:"setCenterAltitude",args:[e.centerAltitude]}),wa(n.zoom,e.zoom)||t.push({command:"setZoom",args:[e.zoom]}),wa(n.bearing,e.bearing)||t.push({command:"setBearing",args:[e.bearing]}),wa(n.pitch,e.pitch)||t.push({command:"setPitch",args:[e.pitch]}),wa(n.roll,e.roll)||t.push({command:"setRoll",args:[e.roll]}),wa(n.sprite,e.sprite)||t.push({command:"setSprite",args:[e.sprite]}),wa(n.glyphs,e.glyphs)||t.push({command:"setGlyphs",args:[e.glyphs]}),wa(n.transition,e.transition)||t.push({command:"setTransition",args:[e.transition]}),wa(n.light,e.light)||t.push({command:"setLight",args:[e.light]}),wa(n.terrain,e.terrain)||t.push({command:"setTerrain",args:[e.terrain]}),wa(n.sky,e.sky)||t.push({command:"setSky",args:[e.sky]}),wa(n.projection,e.projection)||t.push({command:"setProjection",args:[e.projection]});const r={},i=[];bY(n.sources,e.sources,i,r);const s=[];n.layers&&n.layers.forEach(a=>{"source"in a&&r[a.source]?t.push({command:"removeLayer",args:[a.id]}):s.push(a)}),t=t.concat(i),xY(s,e.layers,t)}catch(r){console.warn("Unable to compute style diff:",r),t=[{command:"setStyle",args:[e]}]}return t}class Br{constructor(e,t,r,i){this.message=(e?`${e}: `:"")+r,i&&(this.identifier=i),t!=null&&t.__line__&&(this.line=t.__line__)}}function py(n,...e){for(const t of e)for(const r in t)n[r]=t[r];return n}class Wp extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}let MY=class nL{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[r,i]of t)this.bindings[r]=i}concat(e){return new nL(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}};const H2={kind:"null"},Rr={kind:"number"},ss={kind:"string"},Go={kind:"boolean"},Vp={kind:"color"},Z2={kind:"projectionDefinition"},J1={kind:"object"},qo={kind:"value"},SY={kind:"error"},X2={kind:"collator"},J2={kind:"formatted"},ex={kind:"padding"},TC={kind:"resolvedImage"},tx={kind:"variableAnchorOffsetCollection"};function qh(n,e){return{kind:"array",itemType:n,N:e}}function Zl(n){if(n.kind==="array"){const e=Zl(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const EY=[H2,Rr,ss,Go,Vp,Z2,J2,J1,qh(qo),ex,TC,tx];function Xv(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Xv(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of EY)if(!Xv(t,e))return null}}return`Expected ${Zl(n)} but found ${Zl(e)} instead.`}function _B(n,e){return e.some(t=>t.kind===n.kind)}function _g(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}function o1(n,e){return n.kind==="array"&&e.kind==="array"?n.itemType.kind===e.itemType.kind&&typeof n.N=="number":n.kind===e.kind}const rL=.96422,iL=1,oL=.82521,sL=4/29,ey=6/29,aL=3*ey*ey,BY=ey*ey*ey,OY=Math.PI/180,IY=180/Math.PI;function lL(n){return n=n%360,n<0&&(n+=360),n}function uL([n,e,t,r]){n=Q3(n),e=Q3(e),t=Q3(t);let i,s;const a=q3((.2225045*n+.7168786*e+.0606169*t)/iL);n===e&&e===t?i=s=a:(i=q3((.4360747*n+.3850649*e+.1430804*t)/rL),s=q3((.0139322*n+.0971045*e+.7141733*t)/oL));const o=116*a-16;return[o<0?0:o,500*(i-a),200*(a-s),r]}function Q3(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function q3(n){return n>BY?Math.pow(n,1/3):n/aL+sL}function AL([n,e,t,r]){let i=(n+16)/116,s=isNaN(e)?i:i+e/500,a=isNaN(t)?i:i-t/200;return i=iL*$3(i),s=rL*$3(s),a=oL*$3(a),[Y3(3.1338561*s-1.6168667*i-.4906146*a),Y3(-.9787684*s+1.9161415*i+.033454*a),Y3(.0719453*s-.2289914*i+1.4052427*a),r]}function Y3(n){return n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055,n<0?0:n>1?1:n}function $3(n){return n>ey?n*n*n:aL*(n-sL)}function kY(n){const[e,t,r,i]=uL(n),s=Math.sqrt(t*t+r*r);return[Math.round(s*1e4)?lL(Math.atan2(r,t)*IY):NaN,s,e,i]}function TY([n,e,t,r]){return n=isNaN(n)?0:n*OY,AL([t,Math.cos(n)*e,Math.sin(n)*e,r])}function PY([n,e,t,r]){n=lL(n),e/=100,t/=100;function i(s){const a=(s+n/30)%12,o=e*Math.min(t,1-t);return t-o*Math.max(-1,Math.min(a-3,9-a,1))}return[i(0),i(8),i(4),r]}function RY(n){if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];const e=DY[n];if(e){const[i,s,a]=e;return[i/255,s/255,a/255,1]}if(n.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(n)){const s=n.length<6?1:2;let a=1;return[R_(n.slice(a,a+=s)),R_(n.slice(a,a+=s)),R_(n.slice(a,a+=s)),R_(n.slice(a,a+s)||"ff")]}if(n.startsWith("rgb")){const i=/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,s=n.match(i);if(s){const[a,o,d,g,b,E,S,O,k,U,z,q]=s,Q=[g||" ",S||" ",U].join("");if(Q===" "||Q===" /"||Q===",,"||Q===",,,"){const re=[d,E,k].join(""),X=re==="%%%"?100:re===""?255:0;if(X){const Y=[R1(+o/X,0,1),R1(+b/X,0,1),R1(+O/X,0,1),z?qI(+z,q):1];if(YI(Y))return Y}}return}}const t=/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/,r=n.match(t);if(r){const[i,s,a,o,d,g,b,E,S]=r,O=[a||" ",d||" ",b].join("");if(O===" "||O===" /"||O===",,"||O===",,,"){const k=[+s,R1(+o,0,100),R1(+g,0,100),E?qI(+E,S):1];if(YI(k))return PY(k)}}}function R_(n){return parseInt(n.padEnd(2,n),16)/255}function qI(n,e){return R1(e?n/100:n,0,1)}function R1(n,e,t){return Math.min(Math.max(e,n),t)}function YI(n){return!n.some(Number.isNaN)}const DY={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 S0(n,e,t){return n+t*(e-n)}function Jv(n,e,t){return n.map((r,i)=>S0(r,e[i],t))}function KY(n){return n==="rgb"||n==="hcl"||n==="lab"}let Ul=class D1{constructor(e,t,r,i=1,s=!0){this.r=e,this.g=t,this.b=r,this.a=i,s||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof D1)return e;if(typeof e!="string")return;const t=RY(e);if(t)return new D1(...t,!1)}get rgb(){const{r:e,g:t,b:r,a:i}=this,s=i||1/0;return this.overwriteGetter("rgb",[e/s,t/s,r/s,i])}get hcl(){return this.overwriteGetter("hcl",kY(this.rgb))}get lab(){return this.overwriteGetter("lab",uL(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(s=>Math.round(s*255)).join(",")},${i})`}static interpolate(e,t,r,i="rgb"){switch(i){case"rgb":{const[s,a,o,d]=Jv(e.rgb,t.rgb,r);return new D1(s,a,o,d,!1)}case"hcl":{const[s,a,o,d]=e.hcl,[g,b,E,S]=t.hcl;let O,k;if(!isNaN(s)&&!isNaN(g)){let re=g-s;g>s&&re>180?re-=360:g<s&&s-g>180&&(re+=360),O=s+r*re}else isNaN(s)?isNaN(g)?O=NaN:(O=g,(o===1||o===0)&&(k=b)):(O=s,(E===1||E===0)&&(k=a));const[U,z,q,Q]=TY([O,k??S0(a,b,r),S0(o,E,r),S0(d,S,r)]);return new D1(U,z,q,Q,!1)}case"lab":{const[s,a,o,d]=AL(Jv(e.lab,t.lab,r));return new D1(s,a,o,d,!1)}}}};Ul.black=new Ul(0,0,0,1);Ul.white=new Ul(1,1,1,1);Ul.transparent=new Ul(0,0,0,0);Ul.red=new Ul(1,0,0,1);let bB=class{constructor(e,t,r){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};const FY=["bottom","center","top"];let n6=class{constructor(e,t,r,i,s,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=s,this.verticalAlign=a}},Ey=class Cb{constructor(e){this.sections=e}static fromString(e){return new Cb([new n6(e,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Cb?e:Cb.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}};class Gd{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Gd)return e;if(typeof e=="number")return new Gd([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if(typeof t!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]];break}return new Gd(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new Gd(Jv(e.values,t.values,r))}}let rA=class{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}};const LY=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Ef{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ef)return e;if(!(!Array.isArray(e)||e.length<1||e.length%2!==0)){for(let t=0;t<e.length;t+=2){const r=e[t],i=e[t+1];if(typeof r!="string"||!LY.has(r)||!Array.isArray(i)||i.length!==2||typeof i[0]!="number"||typeof i[1]!="number")return}return new Ef(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){const i=e.values,s=t.values;if(i.length!==s.length)throw new rA(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);const a=[];for(let o=0;o<i.length;o+=2){if(i[o]!==s[o])throw new rA(`Cannot interpolate values containing mismatched anchors. from[${o}]: ${i[o]}, to[${o}]: ${s[o]}`);a.push(i[o]);const[d,g]=i[o+1],[b,E]=s[o+1];a.push([S0(d,b,r),S0(g,E,r)])}return new Ef(a)}}let Kg=class cL{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new cL({name:e,available:!1}):null}};class bf{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}static interpolate(e,t,r){return new bf(e,t,r)}static parse(e){if(e instanceof bf)return e;if(Array.isArray(e)&&e.length===3&&typeof e[0]=="string"&&typeof e[1]=="string"&&typeof e[2]=="number")return new bf(e[0],e[1],e[2]);if(typeof e=="object"&&typeof e.from=="string"&&typeof e.to=="string"&&typeof e.transition=="number")return new bf(e.from,e.to,e.transition);if(typeof e=="string")return new bf(e,e,1)}}function dL(n,e,t,r){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof r>"u"||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[n,e,t,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[n,e,t,r]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function eC(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof bf||n instanceof Ul||n instanceof bB||n instanceof Ey||n instanceof Gd||n instanceof Ef||n instanceof Kg)return!0;if(Array.isArray(n)){for(const e of n)if(!eC(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!eC(n[e]))return!1;return!0}else return!1}function NA(n){if(n===null)return H2;if(typeof n=="string")return ss;if(typeof n=="boolean")return Go;if(typeof n=="number")return Rr;if(n instanceof Ul)return Vp;if(n instanceof bf)return Z2;if(n instanceof bB)return X2;if(n instanceof Ey)return J2;if(n instanceof Gd)return ex;if(n instanceof Ef)return tx;if(n instanceof Kg)return TC;if(Array.isArray(n)){const e=n.length;let t;for(const r of n){const i=NA(r);if(!t)t=i;else{if(t===i)continue;t=qo;break}}return qh(t||qo,e)}else return J1}function Uv(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof Ul||n instanceof bf||n instanceof Ey||n instanceof Gd||n instanceof Ef||n instanceof Kg?n.toString():JSON.stringify(n)}let jb=class hL{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!eC(e[1]))return t.error("invalid value");const r=e[1];let i=NA(r);const s=t.expectedType;return i.kind==="array"&&i.N===0&&s&&s.kind==="array"&&(typeof s.N!="number"||s.N===0)&&(i=s),new hL(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};const D_={string:ss,number:Rr,boolean:Go,object:J1};let Rm=class fL{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=1,i;const s=e[0];if(s==="array"){let o;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in D_)||g==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=D_[g],r++}else o=qo;let d;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);d=e[2],r++}i=qh(o,d)}else{if(!D_[s])throw new Error(`Types doesn't contain name = ${s}`);i=D_[s]}const a=[];for(;r<e.length;r++){const o=t.parse(e[r],r,qo);if(!o)return null;a.push(o)}return new fL(i,a)}evaluate(e){for(let t=0;t<this.args.length;t++){const r=this.args[t].evaluate(e);if(Xv(this.type,NA(r))){if(t===this.args.length-1)throw new rA(`Expected value to be of type ${Zl(this.type)}, but found ${Zl(NA(r))} instead.`)}else return r}throw new Error}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const $I={"to-boolean":Go,"to-color":Vp,"to-number":Rr,"to-string":ss};let W1=class pL{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if(!$I[r])throw new Error(`Can't parse ${r} as it is not part of the known types`);if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");const i=$I[r],s=[];for(let a=1;a<e.length;a++){const o=t.parse(e[a],a,qo);if(!o)return null;s.push(o)}return new pL(i,s)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(const i of this.args){if(t=i.evaluate(e),r=null,t instanceof Ul)return t;if(typeof t=="string"){const s=e.parseColor(t);if(s)return s}else if(Array.isArray(t)&&(t.length<3||t.length>4?r=`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:r=dL(t[0],t[1],t[2],t[3]),!r))return new Ul(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new rA(r||`Could not parse color from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const r of this.args){t=r.evaluate(e);const i=Gd.parse(t);if(i)return i}throw new rA(`Could not parse padding from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const r of this.args){t=r.evaluate(e);const i=Ef.parse(t);if(i)return i}throw new rA(`Could not parse variableAnchorOffsetCollection from value '${typeof t=="string"?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const r of this.args){if(t=r.evaluate(e),t===null)return 0;const i=Number(t);if(!isNaN(i))return i}throw new rA(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return Ey.fromString(Uv(this.args[0].evaluate(e)));case"resolvedImage":return Kg.fromString(Uv(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return Uv(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const UY=["Unknown","Point","LineString","Polygon"];let mL=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"?UY[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Ul.parse(e)),t}},gL=class yL{constructor(e,t,r=[],i,s=new MY,a=[]){this.registry=e,this.path=r,this.key=r.map(o=>`[${o}]`).join(""),this.scope=s,this.errors=a,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,s={}){return t?this.concat(t,r,i)._parse(e,s):this._parse(e,s)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function r(i,s,a){return a==="assert"?new Rm(s,[i]):a==="coerce"?new W1(s,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const s=this.registry[i];if(s){let a=s.parse(e,this);if(!a)return null;if(this.expectedType){const o=this.expectedType,d=a.type;if((o.kind==="string"||o.kind==="number"||o.kind==="boolean"||o.kind==="object"||o.kind==="array")&&d.kind==="value")a=r(a,o,t.typeAnnotation||"assert");else if(o.kind==="projectionDefinition"&&(d.kind==="string"||d.kind==="array"))a=r(a,o,t.typeAnnotation||"coerce");else if((o.kind==="color"||o.kind==="formatted"||o.kind==="resolvedImage")&&(d.kind==="value"||d.kind==="string"))a=r(a,o,t.typeAnnotation||"coerce");else if(o.kind==="padding"&&(d.kind==="value"||d.kind==="number"||d.kind==="array"))a=r(a,o,t.typeAnnotation||"coerce");else if(o.kind==="variableAnchorOffsetCollection"&&(d.kind==="value"||d.kind==="array"))a=r(a,o,t.typeAnnotation||"coerce");else if(this.checkSubtype(o,d))return null}if(!(a instanceof jb)&&a.type.kind!=="resolvedImage"&&this._isConstant(a)){const o=new mL;try{a=new jb(a.type,a.evaluate(o))}catch(d){return this.error(d.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const i=typeof e=="number"?this.path.concat(e):this.path,s=r?this.scope.concat(r):this.scope;return new yL(this.registry,this._isConstant,i,t||null,s,this.errors)}error(e,...t){const r=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new Wp(r,e))}checkSubtype(e,t){const r=Xv(e,t);return r&&this.error(r),r}},vL=class CL{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let s=1;s<e.length-1;s+=2){const a=e[s];if(typeof a!="string")return t.error(`Expected string, but found ${typeof a} instead.`,s);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",s);const o=t.parse(e[s+1],s+1);if(!o)return null;r.push([a,o])}const i=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return i?new CL(r,i):null}outputDefined(){return this.result.outputDefined()}},_L=class bL{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new bL(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},zY=class xL{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Rr),i=t.parse(e[2],2,qh(t.expectedType||qo));if(!r||!i)return null;const s=i.type;return new xL(s.itemType,r,i)}evaluate(e){const t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new rA(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new rA(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new rA(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},jY=class wL{constructor(e,t){this.type=Go,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,qo),i=t.parse(e[2],2,qo);return!r||!i?null:_B(r.type,[Go,ss,Rr,H2,qo])?new wL(r,i):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Zl(r.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!_g(t,["boolean","string","number","null"]))throw new rA(`Expected first argument to be of type boolean, string, number or null, but found ${Zl(NA(t))} instead.`);if(!_g(r,["string","array"]))throw new rA(`Expected second argument to be of type array or string, but found ${Zl(NA(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},NY=class r6{constructor(e,t,r){this.type=Rr,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,qo),i=t.parse(e[2],2,qo);if(!r||!i)return null;if(!_B(r.type,[Go,ss,Rr,H2,qo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Zl(r.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,Rr);return s?new r6(r,i,s):null}else return new r6(r,i)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!_g(t,["boolean","string","number","null"]))throw new rA(`Expected first argument to be of type boolean, string, number or null, but found ${Zl(NA(t))} instead.`);let i;if(this.fromIndex&&(i=this.fromIndex.evaluate(e)),_g(r,["string"])){const s=r.indexOf(t,i);return s===-1?-1:[...r.slice(0,s)].length}else{if(_g(r,["array"]))return r.indexOf(t,i);throw new rA(`Expected second argument to be of type array or string, but found ${Zl(NA(r))} instead.`)}}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},WY=class ML{constructor(e,t,r,i,s,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=s,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let r,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const s={},a=[];for(let g=2;g<e.length-1;g+=2){let b=e[g];const E=e[g+1];Array.isArray(b)||(b=[b]);const S=t.concat(g);if(b.length===0)return S.error("Expected at least one branch label.");for(const k of b){if(typeof k!="number"&&typeof k!="string")return S.error("Branch labels must be numbers or strings.");if(typeof k=="number"&&Math.abs(k)>Number.MAX_SAFE_INTEGER)return S.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof k=="number"&&Math.floor(k)!==k)return S.error("Numeric branch labels must be integer values.");if(!r)r=NA(k);else if(S.checkSubtype(r,NA(k)))return null;if(typeof s[String(k)]<"u")return S.error("Branch labels must be unique.");s[String(k)]=a.length}const O=t.parse(E,g,i);if(!O)return null;i=i||O.type,a.push(O)}const o=t.parse(e[1],1,qo);if(!o)return null;const d=t.parse(e[e.length-1],e.length-1,i);return!d||o.type.kind!=="value"&&t.concat(1).checkSubtype(r,o.type)?null:new ML(r,i,o,s,a,d)}evaluate(e){const t=this.input.evaluate(e);return(NA(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},GY=class SL{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const i=[];for(let a=1;a<e.length-1;a+=2){const o=t.parse(e[a],a,Go);if(!o)return null;const d=t.parse(e[a+1],a+1,r);if(!d)return null;i.push([o,d]),r=r||d.type}const s=t.parse(e[e.length-1],e.length-1,r);if(!s)return null;if(!r)throw new Error("Can't infer output type");return new SL(r,i,s)}evaluate(e){for(const[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},QY=class i6{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,qo),i=t.parse(e[2],2,Rr);if(!r||!i)return null;if(!_B(r.type,[qh(qo),ss,qo]))return t.error(`Expected first argument to be of type array or string, but found ${Zl(r.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,Rr);return s?new i6(r.type,r,i,s):null}else return new i6(r.type,r,i)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);let i;if(this.endIndex&&(i=this.endIndex.evaluate(e)),_g(t,["string"]))return[...t].slice(r,i).join("");if(_g(t,["array"]))return t.slice(r,i);throw new rA(`Expected first argument to be of type array or string, but found ${Zl(NA(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}};function nx(n,e){const t=n.length-1;let r=0,i=t,s=0,a,o;for(;r<=i;)if(s=Math.floor((r+i)/2),a=n[s],o=n[s+1],a<=e){if(s===t||e<o)return s;r=s+1}else if(a>e)i=s-1;else throw new rA("Input is not a number.");return 0}let EL=class BL{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[i,s]of r)this.labels.push(i),this.outputs.push(s)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,Rr);if(!r)return null;const i=[];let s=null;t.expectedType&&t.expectedType.kind!=="value"&&(s=t.expectedType);for(let a=1;a<e.length;a+=2){const o=a===1?-1/0:e[a],d=e[a+1],g=a,b=a+1;if(typeof o!="number")return t.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]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const E=t.parse(d,b,s);if(!E)return null;s=s||E.type,i.push([o,E])}return new BL(s,r,i)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const s=t.length;if(i>=t[s-1])return r[s-1].evaluate(e);const a=nx(t,i);return r[a].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function qY(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var V3,VI;function YY(){if(VI)return V3;VI=1,V3=n;function n(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return n.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(t===void 0&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var s=this.sampleCurveX(r)-e;if(Math.abs(s)<t)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r=r-s/a}var o=0,d=1;for(r=e,i=0;i<20&&(s=this.sampleCurveX(r),!(Math.abs(s-e)<t));i++)e>s?o=r:d=r,r=(d-o)*.5+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},V3}var $Y=YY(),VY=qY($Y);let Fm=class o6{constructor(e,t,r,i,s){this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(const[a,o]of s)this.labels.push(a),this.outputs.push(o)}static interpolationFactor(e,t,r,i){let s=0;if(e.name==="exponential")s=H3(t,e.base,r,i);else if(e.name==="linear")s=H3(t,1,r,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;s=new VY(a[0],a[1],a[2],a[3]).solve(H3(t,1,r,i))}return s}static parse(e,t){let[r,i,s,...a]=e;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const g=i[1];if(typeof g!="number")return t.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 t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:g}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(s=t.parse(s,2,Rr),!s)return null;const o=[];let d=null;r==="interpolate-hcl"||r==="interpolate-lab"?d=Vp:t.expectedType&&t.expectedType.kind!=="value"&&(d=t.expectedType);for(let g=0;g<a.length;g+=2){const b=a[g],E=a[g+1],S=g+3,O=g+4;if(typeof b!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(o.length&&o[o.length-1][0]>=b)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',S);const k=t.parse(E,O,d);if(!k)return null;d=d||k.type,o.push([b,k])}return!o1(d,Rr)&&!o1(d,Z2)&&!o1(d,Vp)&&!o1(d,ex)&&!o1(d,tx)&&!o1(d,qh(Rr))?t.error(`Type ${Zl(d)} is not interpolatable.`):new o6(d,r,i,s,o)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const s=t.length;if(i>=t[s-1])return r[s-1].evaluate(e);const a=nx(t,i),o=t[a],d=t[a+1],g=o6.interpolationFactor(this.interpolation,i,o,d),b=r[a].evaluate(e),E=r[a+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return S0(b,E,g);case"color":return Ul.interpolate(b,E,g);case"padding":return Gd.interpolate(b,E,g);case"variableAnchorOffsetCollection":return Ef.interpolate(b,E,g);case"array":return Jv(b,E,g);case"projectionDefinition":return bf.interpolate(b,E,g)}case"interpolate-hcl":return Ul.interpolate(b,E,g,"hcl");case"interpolate-lab":return Ul.interpolate(b,E,g,"lab")}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function H3(n,e,t,r){const i=r-t,s=n-t;return i===0?0:e===1?s/i:(Math.pow(e,s)-1)/(Math.pow(e,i)-1)}const HY={color:Ul.interpolate,number:S0,padding:Gd.interpolate,variableAnchorOffsetCollection:Ef.interpolate,array:Jv};let OL=class s6{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null;const i=t.expectedType;i&&i.kind!=="value"&&(r=i);const s=[];for(const o of e.slice(1)){const d=t.parse(o,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!d)return null;r=r||d.type,s.push(d)}if(!r)throw new Error("No output type");return i&&s.some(o=>Xv(i,o.type))?new s6(qo,s):new s6(r,s)}evaluate(e){let t=null,r=0,i;for(const s of this.args)if(r++,t=s.evaluate(e),t&&t instanceof Kg&&!t.available&&(i||(i=t.name),t=null,r===this.args.length&&(t=i)),t!==null)break;return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function HI(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function ZY(n,e,t){return e===t}function XY(n,e,t){return e!==t}function JY(n,e,t){return e<t}function e$(n,e,t){return e>t}function t$(n,e,t){return e<=t}function n$(n,e,t){return e>=t}function IL(n,e,t,r){return r.compare(e,t)===0}function r$(n,e,t,r){return!IL(n,e,t,r)}function i$(n,e,t,r){return r.compare(e,t)<0}function o$(n,e,t,r){return r.compare(e,t)>0}function s$(n,e,t,r){return r.compare(e,t)<=0}function a$(n,e,t,r){return r.compare(e,t)>=0}function By(n,e,t){const r=n!=="=="&&n!=="!=";return class kL{constructor(s,a,o){this.type=Go,this.lhs=s,this.rhs=a,this.collator=o,this.hasUntypedArgument=s.type.kind==="value"||a.type.kind==="value"}static parse(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");const o=s[0];let d=a.parse(s[1],1,qo);if(!d)return null;if(!HI(o,d.type))return a.concat(1).error(`"${o}" comparisons are not supported for type '${Zl(d.type)}'.`);let g=a.parse(s[2],2,qo);if(!g)return null;if(!HI(o,g.type))return a.concat(2).error(`"${o}" comparisons are not supported for type '${Zl(g.type)}'.`);if(d.type.kind!==g.type.kind&&d.type.kind!=="value"&&g.type.kind!=="value")return a.error(`Cannot compare types '${Zl(d.type)}' and '${Zl(g.type)}'.`);r&&(d.type.kind==="value"&&g.type.kind!=="value"?d=new Rm(g.type,[d]):d.type.kind!=="value"&&g.type.kind==="value"&&(g=new Rm(d.type,[g])));let b=null;if(s.length===4){if(d.type.kind!=="string"&&g.type.kind!=="string"&&d.type.kind!=="value"&&g.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(b=a.parse(s[3],3,X2),!b)return null}return new kL(d,g,b)}evaluate(s){const a=this.lhs.evaluate(s),o=this.rhs.evaluate(s);if(r&&this.hasUntypedArgument){const d=NA(a),g=NA(o);if(d.kind!==g.kind||!(d.kind==="string"||d.kind==="number"))throw new rA(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${d.kind}, ${g.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const d=NA(a),g=NA(o);if(d.kind!=="string"||g.kind!=="string")return e(s,a,o)}return this.collator?t(s,a,o,this.collator.evaluate(s)):e(s,a,o)}eachChild(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)}outputDefined(){return!0}}}const l$=By("==",ZY,IL),u$=By("!=",XY,r$),A$=By("<",JY,i$),c$=By(">",e$,o$),d$=By("<=",t$,s$),h$=By(">=",n$,a$);let TL=class PL{constructor(e,t,r){this.type=X2,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");const i=t.parse(r["case-sensitive"]===void 0?!1:r["case-sensitive"],1,Go);if(!i)return null;const s=t.parse(r["diacritic-sensitive"]===void 0?!1:r["diacritic-sensitive"],1,Go);if(!s)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,ss),!a)?null:new PL(i,s,a)}evaluate(e){return new bB(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}},f$=class RL{constructor(e,t,r,i,s){this.type=ss,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=s}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Rr);if(!r)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let s=null;if(i.locale&&(s=t.parse(i.locale,1,ss),!s))return null;let a=null;if(i.currency&&(a=t.parse(i.currency,1,ss),!a))return null;let o=null;if(i["min-fraction-digits"]&&(o=t.parse(i["min-fraction-digits"],1,Rr),!o))return null;let d=null;return i["max-fraction-digits"]&&(d=t.parse(i["max-fraction-digits"],1,Rr),!d)?null:new RL(r,s,a,o,d)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},p$=class DL{constructor(e){this.type=J2,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");const i=[];let s=!1;for(let a=1;a<=e.length-1;++a){const o=e[a];if(s&&typeof o=="object"&&!Array.isArray(o)){s=!1;let d=null;if(o["font-scale"]&&(d=t.parse(o["font-scale"],1,Rr),!d))return null;let g=null;if(o["text-font"]&&(g=t.parse(o["text-font"],1,qh(ss)),!g))return null;let b=null;if(o["text-color"]&&(b=t.parse(o["text-color"],1,Vp),!b))return null;let E=null;if(o["vertical-align"]){if(typeof o["vertical-align"]=="string"&&!FY.includes(o["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${o["vertical-align"]}' instead.`);if(E=t.parse(o["vertical-align"],1,ss),!E)return null}const S=i[i.length-1];S.scale=d,S.font=g,S.textColor=b,S.verticalAlign=E}else{const d=t.parse(e[a],1,qo);if(!d)return null;const g=d.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");s=!0,i.push({content:d,scale:null,font:null,textColor:null,verticalAlign:null})}}return new DL(i)}evaluate(e){const t=r=>{const i=r.content.evaluate(e);return NA(i)===TC?new n6("",i,null,null,null,r.verticalAlign?r.verticalAlign.evaluate(e):null):new n6(Uv(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null,r.verticalAlign?r.verticalAlign.evaluate(e):null)};return new Ey(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}},m$=class KL{constructor(e){this.type=TC,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const r=t.parse(e[1],1,ss);return r?new KL(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=Kg.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},g$=class FL{constructor(e){this.type=Rr,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${Zl(r.type)} instead.`):new FL(r):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return[...t].length;if(Array.isArray(t))return t.length;throw new rA(`Expected value to be of type string or array, but found ${Zl(NA(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}};const Hp=8192;function y$(n,e){const t=v$(n[0]),r=_$(n[1]),i=Math.pow(2,e.z);return[Math.round(t*i*Hp),Math.round(r*i*Hp)]}function xB(n,e){const t=Math.pow(2,e.z),r=(n[0]/Hp+e.x)/t,i=(n[1]/Hp+e.y)/t;return[C$(r),b$(i)]}function v$(n){return(180+n)/360}function C$(n){return n*360-180}function _$(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function b$(n){return 360/Math.PI*Math.atan(Math.exp((180-n*360)*Math.PI/180))-90}function PC(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function tC(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function x$(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function w$(n,e,t){const r=n[0]-e[0],i=n[1]-e[1],s=n[0]-t[0],a=n[1]-t[1];return r*a-s*i===0&&r*s<=0&&i*a<=0}function rx(n,e,t,r){const i=[e[0]-n[0],e[1]-n[1]],s=[r[0]-t[0],r[1]-t[1]];return B$(s,i)===0?!1:!!(ZI(n,e,t,r)&&ZI(t,r,n,e))}function M$(n,e,t){for(const r of t)for(let i=0;i<r.length-1;++i)if(rx(n,e,r[i],r[i+1]))return!0;return!1}function Oy(n,e,t=!1){let r=!1;for(const i of e)for(let s=0;s<i.length-1;s++){if(w$(n,i[s],i[s+1]))return t;x$(n,i[s],i[s+1])&&(r=!r)}return r}function S$(n,e){for(const t of e)if(Oy(n,t))return!0;return!1}function LL(n,e){for(const t of n)if(!Oy(t,e))return!1;for(let t=0;t<n.length-1;++t)if(M$(n[t],n[t+1],e))return!1;return!0}function E$(n,e){for(const t of e)if(LL(n,t))return!0;return!1}function B$(n,e){return n[0]*e[1]-n[1]*e[0]}function ZI(n,e,t,r){const i=n[0]-t[0],s=n[1]-t[1],a=e[0]-t[0],o=e[1]-t[1],d=r[0]-t[0],g=r[1]-t[1],b=i*g-d*s,E=a*g-d*o;return b>0&&E<0||b<0&&E>0}function wB(n,e,t){const r=[];for(let i=0;i<n.length;i++){const s=[];for(let a=0;a<n[i].length;a++){const o=y$(n[i][a],t);PC(e,o),s.push(o)}r.push(s)}return r}function UL(n,e,t){const r=[];for(let i=0;i<n.length;i++){const s=wB(n[i],e,t);r.push(s)}return r}function zL(n,e,t,r){if(n[0]<t[0]||n[0]>t[2]){const i=r*.5;let s=n[0]-t[0]>i?-r:t[0]-n[0]>i?r:0;s===0&&(s=n[0]-t[2]>i?-r:t[2]-n[0]>i?r:0),n[0]+=s}PC(e,n)}function O$(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function XI(n,e,t,r){const i=Math.pow(2,r.z)*Hp,s=[r.x*Hp,r.y*Hp],a=[];for(const o of n)for(const d of o){const g=[d.x+s[0],d.y+s[1]];zL(g,e,t,i),a.push(g)}return a}function JI(n,e,t,r){const i=Math.pow(2,r.z)*Hp,s=[r.x*Hp,r.y*Hp],a=[];for(const o of n){const d=[];for(const g of o){const b=[g.x+s[0],g.y+s[1]];PC(e,b),d.push(b)}a.push(d)}if(e[2]-e[0]<=i/2){O$(e);for(const o of a)for(const d of o)zL(d,e,t,i)}return a}function I$(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(e.type==="Polygon"){const s=wB(e.coordinates,r,i),a=XI(n.geometry(),t,r,i);if(!tC(t,r))return!1;for(const o of a)if(!Oy(o,s))return!1}if(e.type==="MultiPolygon"){const s=UL(e.coordinates,r,i),a=XI(n.geometry(),t,r,i);if(!tC(t,r))return!1;for(const o of a)if(!S$(o,s))return!1}return!0}function k$(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(e.type==="Polygon"){const s=wB(e.coordinates,r,i),a=JI(n.geometry(),t,r,i);if(!tC(t,r))return!1;for(const o of a)if(!LL(o,s))return!1}if(e.type==="MultiPolygon"){const s=UL(e.coordinates,r,i),a=JI(n.geometry(),t,r,i);if(!tC(t,r))return!1;for(const o of a)if(!E$(o,s))return!1}return!0}let MB=class _b{constructor(e,t){this.type=Go,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(eC(e[1])){const r=e[1];if(r.type==="FeatureCollection"){const i=[];for(const s of r.features){const{type:a,coordinates:o}=s.geometry;a==="Polygon"&&i.push(o),a==="MultiPolygon"&&i.push(...o)}if(i.length){const s={type:"MultiPolygon",coordinates:i};return new _b(r,s)}}else if(r.type==="Feature"){const i=r.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new _b(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new _b(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return I$(e,this.geometries);if(e.geometryType()==="LineString")return k$(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}};class jL{constructor(e=[],t=(r,i)=>r<i?-1:r>i?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(this.length===0)return;const e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:r}=this,i=t[e];for(;e>0;){const s=e-1>>1,a=t[s];if(r(i,a)>=0)break;t[e]=a,e=s}t[e]=i}_down(e){const{data:t,compare:r}=this,i=this.length>>1,s=t[e];for(;e<i;){let a=(e<<1)+1;const o=a+1;if(o<this.length&&r(t[o],t[a])<0&&(a=o),r(t[a],s)>=0)break;t[e]=t[a],e=a}t[e]=s}}function T$(n,e){if(n.length<=1)return[n];const r=[];let i,s;for(const a of n){const o=P$(a);o!==0&&(a.area=Math.abs(o),s===void 0&&(s=o<0),s===o<0?(i&&r.push(i),i=[a]):i.push(a))}return i&&r.push(i),r}function P$(n){let e=0;for(let t=0,r=n.length,i=r-1,s,a;t<r;i=t++)s=n[t],a=n[i],e+=(a.x-s.x)*(s.y+a.y);return e}const R$=6378.137,e7=1/298.257223563,t7=e7*(2-e7),n7=Math.PI/180;class SB{constructor(e){const t=n7*R$*1e3,r=Math.cos(e*n7),i=1/(1-t7*(1-r*r)),s=Math.sqrt(i);this.kx=t*s*r,this.ky=t*s*i*(1-t7)}distance(e,t){const r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r=1/0,i,s,a,o;for(let d=0;d<e.length-1;d++){let g=e[d][0],b=e[d][1],E=this.wrap(e[d+1][0]-g)*this.kx,S=(e[d+1][1]-b)*this.ky,O=0;(E!==0||S!==0)&&(O=(this.wrap(t[0]-g)*this.kx*E+(t[1]-b)*this.ky*S)/(E*E+S*S),O>1?(g=e[d+1][0],b=e[d+1][1]):O>0&&(g+=E/this.kx*O,b+=S/this.ky*O)),E=this.wrap(t[0]-g)*this.kx,S=(t[1]-b)*this.ky;const k=E*E+S*S;k<r&&(r=k,i=g,s=b,a=d,o=O)}return{point:[i,s],index:a,t:Math.max(0,Math.min(1,o))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}}const a6=100,l6=50;function NL(n,e){return e[0]-n[0]}function Nb(n){return n[1]-n[0]+1}function Nm(n,e){return n[1]>=n[0]&&n[1]<e}function u6(n,e){if(n[0]>n[1])return[null,null];const t=Nb(n);if(e){if(t===2)return[n,null];const i=Math.floor(t/2);return[[n[0],n[0]+i],[n[0]+i,n[1]]]}if(t===1)return[n,null];const r=Math.floor(t/2)-1;return[[n[0],n[0]+r],[n[0]+r+1,n[1]]]}function A6(n,e){if(!Nm(e,n.length))return[1/0,1/0,-1/0,-1/0];const t=[1/0,1/0,-1/0,-1/0];for(let r=e[0];r<=e[1];++r)PC(t,n[r]);return t}function c6(n){const e=[1/0,1/0,-1/0,-1/0];for(const t of n)for(const r of t)PC(e,r);return e}function r7(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function EB(n,e,t){if(!r7(n)||!r7(e))return NaN;let r=0,i=0;return n[2]<e[0]&&(r=e[0]-n[2]),n[0]>e[2]&&(r=n[0]-e[2]),n[1]>e[3]&&(i=n[1]-e[3]),n[3]<e[1]&&(i=e[1]-n[3]),t.distance([0,0],[r,i])}function fg(n,e,t){const r=t.pointOnLine(e,n);return t.distance(n,r.point)}function BB(n,e,t,r,i){const s=Math.min(fg(n,[t,r],i),fg(e,[t,r],i)),a=Math.min(fg(t,[n,e],i),fg(r,[n,e],i));return Math.min(s,a)}function D$(n,e,t,r,i){if(!(Nm(e,n.length)&&Nm(r,t.length)))return 1/0;let a=1/0;for(let o=e[0];o<e[1];++o){const d=n[o],g=n[o+1];for(let b=r[0];b<r[1];++b){const E=t[b],S=t[b+1];if(rx(d,g,E,S))return 0;a=Math.min(a,BB(d,g,E,S,i))}}return a}function K$(n,e,t,r,i){if(!(Nm(e,n.length)&&Nm(r,t.length)))return NaN;let a=1/0;for(let o=e[0];o<=e[1];++o)for(let d=r[0];d<=r[1];++d)if(a=Math.min(a,i.distance(n[o],t[d])),a===0)return a;return a}function F$(n,e,t){if(Oy(n,e,!0))return 0;let r=1/0;for(const i of e){const s=i[0],a=i[i.length-1];if(s!==a&&(r=Math.min(r,fg(n,[a,s],t)),r===0))return r;const o=t.pointOnLine(i,n);if(r=Math.min(r,t.distance(n,o.point)),r===0)return r}return r}function L$(n,e,t,r){if(!Nm(e,n.length))return NaN;for(let s=e[0];s<=e[1];++s)if(Oy(n[s],t,!0))return 0;let i=1/0;for(let s=e[0];s<e[1];++s){const a=n[s],o=n[s+1];for(const d of t)for(let g=0,b=d.length,E=b-1;g<b;E=g++){const S=d[E],O=d[g];if(rx(a,o,S,O))return 0;i=Math.min(i,BB(a,o,S,O,r))}}return i}function i7(n,e){for(const t of n)for(const r of t)if(Oy(r,e,!0))return!0;return!1}function U$(n,e,t,r=1/0){const i=c6(n),s=c6(e);if(r!==1/0&&EB(i,s,t)>=r)return r;if(tC(i,s)){if(i7(n,e))return 0}else if(i7(e,n))return 0;let a=1/0;for(const o of n)for(let d=0,g=o.length,b=g-1;d<g;b=d++){const E=o[b],S=o[d];for(const O of e)for(let k=0,U=O.length,z=U-1;k<U;z=k++){const q=O[z],Q=O[k];if(rx(E,S,q,Q))return 0;a=Math.min(a,BB(E,S,q,Q,t))}}return a}function o7(n,e,t,r,i,s){if(!s)return;const a=EB(A6(r,s),i,t);a<e&&n.push([a,s,[0,0]])}function K_(n,e,t,r,i,s,a){if(!s||!a)return;const o=EB(A6(r,s),A6(i,a),t);o<e&&n.push([o,s,a])}function Wb(n,e,t,r,i=1/0){let s=Math.min(r.distance(n[0],t[0][0]),i);if(s===0)return s;const a=new jL([[0,[0,n.length-1],[0,0]]],NL),o=c6(t);for(;a.length>0;){const d=a.pop();if(d[0]>=s)continue;const g=d[1],b=e?l6:a6;if(Nb(g)<=b){if(!Nm(g,n.length))return NaN;if(e){const E=L$(n,g,t,r);if(isNaN(E)||E===0)return E;s=Math.min(s,E)}else for(let E=g[0];E<=g[1];++E){const S=F$(n[E],t,r);if(s=Math.min(s,S),s===0)return 0}}else{const E=u6(g,e);o7(a,s,r,n,o,E[0]),o7(a,s,r,n,o,E[1])}}return s}function Gb(n,e,t,r,i,s=1/0){let a=Math.min(s,i.distance(n[0],t[0]));if(a===0)return a;const o=new jL([[0,[0,n.length-1],[0,t.length-1]]],NL);for(;o.length>0;){const d=o.pop();if(d[0]>=a)continue;const g=d[1],b=d[2],E=e?l6:a6,S=r?l6:a6;if(Nb(g)<=E&&Nb(b)<=S){if(!Nm(g,n.length)&&Nm(b,t.length))return NaN;let O;if(e&&r)O=D$(n,g,t,b,i),a=Math.min(a,O);else if(e&&!r){const k=n.slice(g[0],g[1]+1);for(let U=b[0];U<=b[1];++U)if(O=fg(t[U],k,i),a=Math.min(a,O),a===0)return a}else if(!e&&r){const k=t.slice(b[0],b[1]+1);for(let U=g[0];U<=g[1];++U)if(O=fg(n[U],k,i),a=Math.min(a,O),a===0)return a}else O=K$(n,g,t,b,i),a=Math.min(a,O)}else{const O=u6(g,e),k=u6(b,r);K_(o,a,i,n,t,O[0],k[0]),K_(o,a,i,n,t,O[0],k[1]),K_(o,a,i,n,t,O[1],k[0]),K_(o,a,i,n,t,O[1],k[1])}}return a}function z$(n,e){const t=n.geometry(),r=t.flat().map(a=>xB([a.x,a.y],n.canonical));if(t.length===0)return NaN;const i=new SB(r[0][1]);let s=1/0;for(const a of e){switch(a.type){case"Point":s=Math.min(s,Gb(r,!1,[a.coordinates],!1,i,s));break;case"LineString":s=Math.min(s,Gb(r,!1,a.coordinates,!0,i,s));break;case"Polygon":s=Math.min(s,Wb(r,!1,a.coordinates,i,s));break}if(s===0)return s}return s}function j$(n,e){const t=n.geometry(),r=t.flat().map(a=>xB([a.x,a.y],n.canonical));if(t.length===0)return NaN;const i=new SB(r[0][1]);let s=1/0;for(const a of e){switch(a.type){case"Point":s=Math.min(s,Gb(r,!0,[a.coordinates],!1,i,s));break;case"LineString":s=Math.min(s,Gb(r,!0,a.coordinates,!0,i,s));break;case"Polygon":s=Math.min(s,Wb(r,!0,a.coordinates,i,s));break}if(s===0)return s}return s}function N$(n,e){const t=n.geometry();if(t.length===0||t[0].length===0)return NaN;const r=T$(t).map(a=>a.map(o=>o.map(d=>xB([d.x,d.y],n.canonical)))),i=new SB(r[0][0][0][1]);let s=1/0;for(const a of e)for(const o of r){switch(a.type){case"Point":s=Math.min(s,Wb([a.coordinates],!1,o,i,s));break;case"LineString":s=Math.min(s,Wb(a.coordinates,!0,o,i,s));break;case"Polygon":s=Math.min(s,U$(o,a.coordinates,i,s));break}if(s===0)return s}return s}function Z3(n){return n.type==="MultiPolygon"?n.coordinates.map(e=>({type:"Polygon",coordinates:e})):n.type==="MultiLineString"?n.coordinates.map(e=>({type:"LineString",coordinates:e})):n.type==="MultiPoint"?n.coordinates.map(e=>({type:"Point",coordinates:e})):[n]}class bg{constructor(e,t){this.type=Rr,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(eC(e[1])){const r=e[1];if(r.type==="FeatureCollection")return new bg(r,r.features.map(i=>Z3(i.geometry)).flat());if(r.type==="Feature")return new bg(r,Z3(r.geometry));if("type"in r&&"coordinates"in r)return new bg(r,Z3(r))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return z$(e,this.geometries);if(e.geometryType()==="LineString")return j$(e,this.geometries);if(e.geometryType()==="Polygon")return N$(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const OB={"==":l$,"!=":u$,">":c$,"<":A$,">=":h$,"<=":d$,array:Rm,at:zY,boolean:Rm,case:GY,coalesce:OL,collator:TL,format:p$,image:m$,in:jY,"index-of":NY,interpolate:Fm,"interpolate-hcl":Fm,"interpolate-lab":Fm,length:g$,let:vL,literal:jb,match:WY,number:Rm,"number-format":f$,object:Rm,slice:QY,step:EL,string:Rm,"to-boolean":W1,"to-color":W1,"to-number":W1,"to-string":W1,var:_L,within:MB,distance:bg};let Iy=class vv{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){const r=e[0],i=vv.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const s=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=a.filter(([g])=>!Array.isArray(g)||g.length===e.length-1);let d=null;for(const[g,b]of o){d=new gL(t.registry,Qb,t.path,null,t.scope);const E=[];let S=!1;for(let O=1;O<e.length;O++){const k=e[O],U=Array.isArray(g)?g[O-1]:g.type,z=d.parse(k,1+E.length,U);if(!z){S=!0;break}E.push(z)}if(!S){if(Array.isArray(g)&&g.length!==E.length){d.error(`Expected ${g.length} arguments, but found ${E.length} instead.`);continue}for(let O=0;O<E.length;O++){const k=Array.isArray(g)?g[O]:g.type,U=E[O];d.concat(O+1).checkSubtype(k,U.type)}if(d.errors.length===0)return new vv(r,s,b,E)}}if(o.length===1)t.errors.push(...d.errors);else{const b=(o.length?o:a).map(([S])=>G$(S)).join(" | "),E=[];for(let S=1;S<e.length;S++){const O=t.parse(e[S],1+E.length);if(!O)return null;E.push(Zl(O.type))}t.error(`Expected arguments of type ${b}, but found (${E.join(", ")}) instead.`)}return null}static register(e,t){vv.definitions=t;for(const r in t)e[r]=vv}};function s7(n,[e,t,r,i]){e=e.evaluate(n),t=t.evaluate(n),r=r.evaluate(n);const s=i?i.evaluate(n):1,a=dL(e,t,r,s);if(a)throw new rA(a);return new Ul(e/255,t/255,r/255,s,!1)}function a7(n,e){return n in e}function X3(n,e){const t=e[n];return typeof t>"u"?null:t}function W$(n,e,t,r){for(;t<=r;){const i=t+r>>1;if(e[i]===n)return!0;e[i]>n?r=i-1:t=i+1}return!1}function X0(n){return{type:n}}Iy.register(OB,{error:[SY,[ss],(n,[e])=>{throw new rA(e.evaluate(n))}],typeof:[ss,[qo],(n,[e])=>Zl(NA(e.evaluate(n)))],"to-rgba":[qh(Rr,4),[Vp],(n,[e])=>{const[t,r,i,s]=e.evaluate(n).rgb;return[t*255,r*255,i*255,s]}],rgb:[Vp,[Rr,Rr,Rr],s7],rgba:[Vp,[Rr,Rr,Rr,Rr],s7],has:{type:Go,overloads:[[[ss],(n,[e])=>a7(e.evaluate(n),n.properties())],[[ss,J1],(n,[e,t])=>a7(e.evaluate(n),t.evaluate(n))]]},get:{type:qo,overloads:[[[ss],(n,[e])=>X3(e.evaluate(n),n.properties())],[[ss,J1],(n,[e,t])=>X3(e.evaluate(n),t.evaluate(n))]]},"feature-state":[qo,[ss],(n,[e])=>X3(e.evaluate(n),n.featureState||{})],properties:[J1,[],n=>n.properties()],"geometry-type":[ss,[],n=>n.geometryType()],id:[qo,[],n=>n.id()],zoom:[Rr,[],n=>n.globals.zoom],"heatmap-density":[Rr,[],n=>n.globals.heatmapDensity||0],"line-progress":[Rr,[],n=>n.globals.lineProgress||0],accumulated:[qo,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Rr,X0(Rr),(n,e)=>{let t=0;for(const r of e)t+=r.evaluate(n);return t}],"*":[Rr,X0(Rr),(n,e)=>{let t=1;for(const r of e)t*=r.evaluate(n);return t}],"-":{type:Rr,overloads:[[[Rr,Rr],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[Rr],(n,[e])=>-e.evaluate(n)]]},"/":[Rr,[Rr,Rr],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[Rr,[Rr,Rr],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[Rr,[],()=>Math.LN2],pi:[Rr,[],()=>Math.PI],e:[Rr,[],()=>Math.E],"^":[Rr,[Rr,Rr],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[Rr,[Rr],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[Rr,[Rr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[Rr,[Rr],(n,[e])=>Math.log(e.evaluate(n))],log2:[Rr,[Rr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[Rr,[Rr],(n,[e])=>Math.sin(e.evaluate(n))],cos:[Rr,[Rr],(n,[e])=>Math.cos(e.evaluate(n))],tan:[Rr,[Rr],(n,[e])=>Math.tan(e.evaluate(n))],asin:[Rr,[Rr],(n,[e])=>Math.asin(e.evaluate(n))],acos:[Rr,[Rr],(n,[e])=>Math.acos(e.evaluate(n))],atan:[Rr,[Rr],(n,[e])=>Math.atan(e.evaluate(n))],min:[Rr,X0(Rr),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[Rr,X0(Rr),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[Rr,[Rr],(n,[e])=>Math.abs(e.evaluate(n))],round:[Rr,[Rr],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[Rr,[Rr],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[Rr,[Rr],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[Go,[ss,qo],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[Go,[qo],(n,[e])=>n.id()===e.value],"filter-type-==":[Go,[ss],(n,[e])=>n.geometryType()===e.value],"filter-<":[Go,[ss,qo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<i}],"filter-id-<":[Go,[qo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<r}],"filter->":[Go,[ss,qo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>i}],"filter-id->":[Go,[qo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>r}],"filter-<=":[Go,[ss,qo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[Go,[qo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<=r}],"filter->=":[Go,[ss,qo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[Go,[qo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>=r}],"filter-has":[Go,[qo],(n,[e])=>e.value in n.properties()],"filter-has-id":[Go,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Go,[qh(ss)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[Go,[qh(qo)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[Go,[ss,qh(qo)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[Go,[ss,qh(qo)],(n,[e,t])=>W$(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:Go,overloads:[[[Go,Go],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[X0(Go),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:Go,overloads:[[[Go,Go],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[X0(Go),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[Go,[Go],(n,[e])=>!e.evaluate(n)],"is-supported-script":[Go,[ss],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[ss,[ss],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[ss,[ss],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[ss,X0(qo),(n,e)=>e.map(t=>Uv(t.evaluate(n))).join("")],"resolved-locale":[ss,[X2],(n,[e])=>e.evaluate(n).resolvedLocale()]});function G$(n){return Array.isArray(n)?`(${n.map(Zl).join(", ")})`:`(${Zl(n.type)}...)`}function Qb(n){if(n instanceof _L)return Qb(n.boundExpression);if(n instanceof Iy&&n.name==="error")return!1;if(n instanceof TL)return!1;if(n instanceof MB)return!1;if(n instanceof bg)return!1;const e=n instanceof W1||n instanceof Rm;let t=!0;return n.eachChild(r=>{e?t=t&&Qb(r):t=t&&r instanceof jb}),t?ix(n)&&ox(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function ix(n){if(n instanceof Iy){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof MB||n instanceof bg)return!1;let e=!0;return n.eachChild(t=>{e&&!ix(t)&&(e=!1)}),e}function nC(n){if(n instanceof Iy&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!nC(t)&&(e=!1)}),e}function ox(n,e){if(n instanceof Iy&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(r=>{t&&!ox(r,e)&&(t=!1)}),t}function d6(n){return{result:"success",value:n}}function K1(n){return{result:"error",value:n}}function qb(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function WL(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function IB(n){return!!n.expression&&n.expression.interpolated}function js(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function RC(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Q$(n){return n}function kB(n,e){const t=e.type==="color",r=n.stops&&typeof n.stops[0][0]=="object",i=r||n.property!==void 0,s=r||!i,a=n.type||(IB(e)?"exponential":"interval");if(t||e.type==="padding"){const b=t?Ul.parse:Gd.parse;n=py({},n),n.stops&&(n.stops=n.stops.map(E=>[E[0],b(E[1])])),n.default?n.default=b(n.default):n.default=b(e.default)}if(n.colorSpace&&!KY(n.colorSpace))throw new Error(`Unknown color space: "${n.colorSpace}"`);let o,d,g;if(a==="exponential")o=l7;else if(a==="interval")o=Y$;else if(a==="categorical"){o=q$,d=Object.create(null);for(const b of n.stops)d[b[0]]=b[1];g=typeof n.stops[0][0]}else if(a==="identity")o=$$;else throw new Error(`Unknown function type "${a}"`);if(r){const b={},E=[];for(let k=0;k<n.stops.length;k++){const U=n.stops[k],z=U[0].zoom;b[z]===void 0&&(b[z]={zoom:z,type:n.type,property:n.property,default:n.default,stops:[]},E.push(z)),b[z].stops.push([U[0].value,U[1]])}const S=[];for(const k of E)S.push([b[k].zoom,kB(b[k],e)]);const O={name:"linear"};return{kind:"composite",interpolationType:O,interpolationFactor:Fm.interpolationFactor.bind(void 0,O),zoomStops:S.map(k=>k[0]),evaluate({zoom:k},U){return l7({stops:S,base:n.base},e,k).evaluate(k,U)}}}else if(s){const b=a==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:b,interpolationFactor:Fm.interpolationFactor.bind(void 0,b),zoomStops:n.stops.map(E=>E[0]),evaluate:({zoom:E})=>o(n,e,E,d,g)}}else return{kind:"source",evaluate(b,E){const S=E&&E.properties?E.properties[n.property]:void 0;return S===void 0?DC(n.default,e.default):o(n,e,S,d,g)}}}function DC(n,e,t){if(n!==void 0)return n;if(e!==void 0)return e;if(t!==void 0)return t}function q$(n,e,t,r,i){const s=typeof t===i?r[t]:void 0;return DC(s,n.default,e.default)}function Y$(n,e,t){if(js(t)!=="number")return DC(n.default,e.default);const r=n.stops.length;if(r===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[r-1][0])return n.stops[r-1][1];const i=nx(n.stops.map(s=>s[0]),t);return n.stops[i][1]}function l7(n,e,t){const r=n.base!==void 0?n.base:1;if(js(t)!=="number")return DC(n.default,e.default);const i=n.stops.length;if(i===1||t<=n.stops[0][0])return n.stops[0][1];if(t>=n.stops[i-1][0])return n.stops[i-1][1];const s=nx(n.stops.map(b=>b[0]),t),a=V$(t,r,n.stops[s][0],n.stops[s+1][0]),o=n.stops[s][1],d=n.stops[s+1][1],g=HY[e.type]||Q$;return typeof o.evaluate=="function"?{evaluate(...b){const E=o.evaluate.apply(void 0,b),S=d.evaluate.apply(void 0,b);if(!(E===void 0||S===void 0))return g(E,S,a,n.colorSpace)}}:g(o,d,a,n.colorSpace)}function $$(n,e,t){switch(e.type){case"color":t=Ul.parse(t);break;case"formatted":t=Ey.fromString(t.toString());break;case"resolvedImage":t=Kg.fromString(t.toString());break;case"padding":t=Gd.parse(t);break;default:js(t)!==e.type&&(e.type!=="enum"||!e.values[t])&&(t=void 0)}return DC(t,n.default,e.default)}function V$(n,e,t,r){const i=r-t,s=n-t;return i===0?0:e===1?s/i:(Math.pow(e,s)-1)/(Math.pow(e,i)-1)}let GL=class{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new mL,this._defaultValue=t?J$(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,r,i,s,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,s,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=a||null;try{const o=this.expression.evaluate(this._evaluator);if(o==null||typeof o=="number"&&o!==o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new rA(`Expected value to be one of ${Object.keys(this._enumValues).map(d=>JSON.stringify(d)).join(", ")}, but found ${JSON.stringify(o)} instead.`);return o}catch(o){return this._warningHistory[o.message]||(this._warningHistory[o.message]=!0,typeof console<"u"&&console.warn(o.message)),this._defaultValue}}};function KC(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in OB}function TB(n,e){const t=new gL(OB,Qb,[],e?X$(e):void 0),r=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return r?d6(new GL(r,e)):K1(t.errors)}let h6=class{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!nC(t.expression)}evaluateWithoutErrorHandling(e,t,r,i,s,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,s,a)}evaluate(e,t,r,i,s,a){return this._styleExpression.evaluate(e,t,r,i,s,a)}},f6=class{constructor(e,t,r,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!nC(t.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,t,r,i,s,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,s,a)}evaluate(e,t,r,i,s,a){return this._styleExpression.evaluate(e,t,r,i,s,a)}interpolationFactor(e,t,r){return this.interpolationType?Fm.interpolationFactor(this.interpolationType,e,t,r):0}};function H$(n){return n._styleExpression!==void 0}function PB(n,e){const t=TB(n,e);if(t.result==="error")return t;const r=t.value.expression,i=ix(r);if(!i&&!qb(e))return K1([new Wp("","data expressions not supported")]);const s=ox(r,["zoom"]);if(!s&&!WL(e))return K1([new Wp("","zoom expressions not supported")]);const a=bb(r);if(!a&&!s)return K1([new Wp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Wp)return K1([a]);if(a instanceof Fm&&!IB(e))return K1([new Wp("",'"interpolate" expressions cannot be used with this property')]);if(!a)return d6(i?new h6("constant",t.value):new h6("source",t.value));const o=a instanceof Fm?a.interpolation:void 0;return d6(i?new f6("camera",t.value,a.labels,o):new f6("composite",t.value,a.labels,o))}class sx{constructor(e,t){this._parameters=e,this._specification=t,py(this,kB(this._parameters,this._specification))}static deserialize(e){return new sx(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Z$(n,e){if(RC(n))return new sx(n,e);if(KC(n)){const t=PB(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value}else{let t=n;return e.type==="color"&&typeof n=="string"?t=Ul.parse(n):e.type==="padding"&&(typeof n=="number"||Array.isArray(n))?t=Gd.parse(n):e.type==="variableAnchorOffsetCollection"&&Array.isArray(n)?t=Ef.parse(n):e.type==="projectionDefinition"&&typeof n=="string"&&(t=bf.parse(n)),{kind:"constant",evaluate:()=>t}}}function bb(n){let e=null;if(n instanceof vL)e=bb(n.result);else if(n instanceof OL){for(const t of n.args)if(e=bb(t),e)break}else(n instanceof EL||n instanceof Fm)&&n.input instanceof Iy&&n.input.name==="zoom"&&(e=n);return e instanceof Wp||n.eachChild(t=>{const r=bb(t);r instanceof Wp?e=r:!e&&r?e=new Wp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Wp("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function X$(n){const e={color:Vp,string:ss,number:Rr,enum:ss,boolean:Go,formatted:J2,padding:ex,projectionDefinition:Z2,resolvedImage:TC,variableAnchorOffsetCollection:tx};return n.type==="array"?qh(e[n.value]||qo,n.length):e[n.type]}function J$(n){return n.type==="color"&&RC(n.default)?new Ul(0,0,0,0):n.type==="color"?Ul.parse(n.default)||null:n.type==="padding"?Gd.parse(n.default)||null:n.type==="variableAnchorOffsetCollection"?Ef.parse(n.default)||null:n.type==="projectionDefinition"?bf.parse(n.default)||null:n.default===void 0?null:n.default}function ax(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const e of n.slice(1))if(!ax(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function zv(n,e={}){if(ax(n))return n;if(!n)return!0;const t=n,r=t[0];if(n.length<=1)return r!=="any";switch(r){case"==":case"!=":case"<":case">":case"<=":case">=":{const[,i,s]=n;return tV(i,s,r,e)}case"any":{const[,...i]=t;return["any",...i.map(a=>{const o={},d=zv(a,o),g=eV(o);return g===!0?d:["case",g,d,!1]})]}case"all":{const[,...i]=t,s=i.map(a=>zv(a,e));return s.length>1?["all",...s]:s[0]}case"none":{const[,...i]=t;return["!",zv(["any",...i],{})]}case"in":{const[,i,...s]=t;return u7(i,s)}case"!in":{const[,i,...s]=t;return u7(i,s,!0)}case"has":return A7(t[1]);case"!has":return["!",A7(t[1])];default:return!0}}function eV(n){const e=[];for(const t in n){const r=t==="$id"?["id"]:["get",t];e.push(["==",["typeof",r],n[t]])}return e.length===0?!0:e.length===1?e[0]:["all",...e]}function tV(n,e,t,r){let i;if(n==="$type")return[t,["geometry-type"],e];if(n==="$id"?i=["id"]:i=["get",n],r&&e!==null){const s=typeof e;r[n]=s}return t==="=="&&n!=="$id"&&e===null?["all",["has",n],["==",i,null]]:t==="!="&&n!=="$id"&&e===null?["any",["!",["has",n]],["!=",i,null]]:[t,i,e]}function u7(n,e,t=!1){if(e.length===0)return t;let r;n==="$type"?r=["geometry-type"]:n==="$id"?r=["id"]:r=["get",n];let i=!0;const s=typeof e[0];for(const a of e)if(typeof a!==s){i=!1;break}if(i&&(s==="string"||s==="number")){const a=e.sort().filter((o,d)=>d===0||e[d-1]!==o);return["match",r,a,!t,t]}return t?["all",...e.map(a=>["!=",r,a])]:["any",...e.map(a=>["==",r,a])]}function A7(n){return n==="$type"?!0:n==="$id"?["!=",["id"],null]:["has",n]}function rC(n){return typeof n=="object"?["literal",n]:n}function QL(n,e){let t=n.stops;if(!t)return nV(n,e);const r=t&&typeof t[0][0]=="object",i=r||n.property!==void 0,s=r||!i;return t=t.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],qL(a[1])]:[a[0],rC(a[1])]),r?rV(n,e,t):s?oV(n,e,t):p6(n,e,t)}function nV(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const r=[e.type==="color"?"to-color":e.type,t,rC(n.default)];return e.type==="array"&&r.splice(1,0,e.value,e.length||null),r}}function RB(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function rV(n,e,t){const r={},i={},s=[];for(let o=0;o<t.length;o++){const d=t[o],g=d[0].zoom;r[g]===void 0&&(r[g]={zoom:g,type:n.type,property:n.property,default:n.default},i[g]=[],s.push(g)),i[g].push([d[0].value,d[1]])}if(KB({},e)==="exponential"){const o=[RB(n),["linear"],["zoom"]];for(const d of s){const g=p6(r[d],e,i[d]);ty(o,d,g,!1)}return o}else{const o=["step",["zoom"]];for(const d of s){const g=p6(r[d],e,i[d]);ty(o,d,g,!0)}return DB(o),o}}function iV(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function c7(n,e){const t=rC(iV(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function p6(n,e,t){const r=KB(n,e),i=["get",n.property];if(r==="categorical"&&typeof t[0][0]=="boolean"){const s=["case"];for(const a of t)s.push(["==",i,a[0]],a[1]);return s.push(c7(n,e)),s}else if(r==="categorical"){const s=["match",i];for(const a of t)ty(s,a[0],a[1],!1);return s.push(c7(n,e)),s}else if(r==="interval"){const s=["step",["number",i]];for(const a of t)ty(s,a[0],a[1],!0);return DB(s),n.default===void 0?s:["case",["==",["typeof",i],"number"],s,rC(n.default)]}else if(r==="exponential"){const s=n.base!==void 0?n.base:1,a=[RB(n),s===1?["linear"]:["exponential",s],["number",i]];for(const o of t)ty(a,o[0],o[1],!1);return n.default===void 0?a:["case",["==",["typeof",i],"number"],a,rC(n.default)]}else throw new Error(`Unknown property function type ${r}`)}function oV(n,e,t,r=["zoom"]){const i=KB(n,e);let s,a=!1;if(i==="interval")s=["step",r],a=!0;else if(i==="exponential"){const o=n.base!==void 0?n.base:1;s=[RB(n),o===1?["linear"]:["exponential",o],r]}else throw new Error(`Unknown zoom function type "${i}"`);for(const o of t)ty(s,o[0],o[1],a);return DB(s),s}function DB(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function ty(n,e,t,r){n.length>3&&e===n[n.length-2]||(r&&n.length===2||n.push(e),n.push(t))}function KB(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function qL(n){const e=["concat"],t=/{([^{}]+)}/g;let r=0;for(let i=t.exec(n);i!==null;i=t.exec(n)){const s=n.slice(r,t.lastIndex-i[0].length);r=t.lastIndex,s.length>0&&e.push(s),e.push(["get",i[1]])}if(e.length===1)return n;if(r<n.length)e.push(n.slice(r));else if(e.length===2)return["to-string",e[1]];return e}function sV(n){for(let e=0;e<Ys.layout.length;e++)for(const t in Ys[Ys.layout[e]])if(t===n)return Ys[Ys.layout[e]][t];for(let e=0;e<Ys.paint.length;e++)for(const t in Ys[Ys.paint[e]])if(t===n)return Ys[Ys.paint[e]][t];return null}function aV(n,e){for(const t in n.sources)e(n.sources[t])}function jv(n,e){for(const t of n.layers)e(t)}function FB(n,e,t){function r(i,s){const a=i[s];a&&Object.keys(a).forEach(o=>{t({path:[i.id,s,o],key:o,value:a[o],reference:sV(o),set(d){a[o]=d}})})}jv(n,i=>{e.paint&&r(i,"paint"),e.layout&&r(i,"layout")})}function YL(n){const e=n.key,t=n.value;return t?[new Br(e,t,"constants have been deprecated as of v8")]:[]}function Iu(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function Bg(n){if(Array.isArray(n))return n.map(Bg);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=Bg(n[t]);return e}return Iu(n)}function wf(n){const e=n.key,t=n.value,r=n.valueSpec||{},i=n.objectElementValidators||{},s=n.style,a=n.styleSpec,o=n.validateSpec;let d=[];const g=js(t);if(g!=="object")return[new Br(e,t,`object expected, ${g} found`)];for(const b in t){const E=b.split(".")[0],S=r[E]||r["*"];let O;if(i[E])O=i[E];else if(r[E])O=o;else if(i["*"])O=i["*"];else if(r["*"])O=o;else{d.push(new Br(e,t[b],`unknown property "${b}"`));continue}d=d.concat(O({key:(e&&`${e}.`)+b,value:t[b],valueSpec:S,style:s,styleSpec:a,object:t,objectKey:b,validateSpec:o},t))}for(const b in r)i[b]||r[b].required&&r[b].default===void 0&&t[b]===void 0&&d.push(new Br(e,t,`missing required property "${b}"`));return d}function LB(n){const e=n.value,t=n.valueSpec,r=n.validateSpec,i=n.style,s=n.styleSpec,a=n.key,o=n.arrayElementValidator||r;if(js(e)!=="array")return[new Br(a,e,`array expected, ${js(e)} found`)];if(t.length&&e.length!==t.length)return[new Br(a,e,`array length ${t.length} expected, length ${e.length} found`)];if(t["min-length"]&&e.length<t["min-length"])return[new Br(a,e,`array length at least ${t["min-length"]} expected, length ${e.length} found`)];let d={type:t.value,values:t.values};s.$version<7&&(d.function=t.function),js(t.value)==="object"&&(d=t.value);let g=[];for(let b=0;b<e.length;b++)g=g.concat(o({array:e,arrayIndex:b,value:e[b],valueSpec:d,validateSpec:n.validateSpec,style:i,styleSpec:s,key:`${a}[${b}]`}));return g}function UB(n){const e=n.key,t=n.value,r=n.valueSpec;let i=js(t);return i==="number"&&t!==t&&(i="NaN"),i!=="number"?[new Br(e,t,`number expected, ${i} found`)]:"minimum"in r&&t<r.minimum?[new Br(e,t,`${t} is less than the minimum value ${r.minimum}`)]:"maximum"in r&&t>r.maximum?[new Br(e,t,`${t} is greater than the maximum value ${r.maximum}`)]:[]}function $L(n){const e=n.valueSpec,t=Iu(n.value.type);let r,i={},s,a;const o=t!=="categorical"&&n.value.property===void 0,d=!o,g=js(n.value.stops)==="array"&&js(n.value.stops[0])==="array"&&js(n.value.stops[0][0])==="object",b=wf({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:E,default:k}});return t==="identity"&&o&&b.push(new Br(n.key,n.value,'missing required property "property"')),t!=="identity"&&!n.value.stops&&b.push(new Br(n.key,n.value,'missing required property "stops"')),t==="exponential"&&n.valueSpec.expression&&!IB(n.valueSpec)&&b.push(new Br(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(d&&!qb(n.valueSpec)?b.push(new Br(n.key,n.value,"property functions not supported")):o&&!WL(n.valueSpec)&&b.push(new Br(n.key,n.value,"zoom functions not supported"))),(t==="categorical"||g)&&n.value.property===void 0&&b.push(new Br(n.key,n.value,'"property" property is required')),b;function E(U){if(t==="identity")return[new Br(U.key,U.value,'identity function may not have a "stops" property')];let z=[];const q=U.value;return z=z.concat(LB({key:U.key,value:q,valueSpec:U.valueSpec,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec,arrayElementValidator:S})),js(q)==="array"&&q.length===0&&z.push(new Br(U.key,q,"array must have at least one stop")),z}function S(U){let z=[];const q=U.value,Q=U.key;if(js(q)!=="array")return[new Br(Q,q,`array expected, ${js(q)} found`)];if(q.length!==2)return[new Br(Q,q,`array length 2 expected, length ${q.length} found`)];if(g){if(js(q[0])!=="object")return[new Br(Q,q,`object expected, ${js(q[0])} found`)];if(q[0].zoom===void 0)return[new Br(Q,q,"object stop key must have zoom")];if(q[0].value===void 0)return[new Br(Q,q,"object stop key must have value")];if(a&&a>Iu(q[0].zoom))return[new Br(Q,q[0].zoom,"stop zoom values must appear in ascending order")];Iu(q[0].zoom)!==a&&(a=Iu(q[0].zoom),s=void 0,i={}),z=z.concat(wf({key:`${Q}[0]`,value:q[0],valueSpec:{zoom:{}},validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec,objectElementValidators:{zoom:UB,value:O}}))}else z=z.concat(O({key:`${Q}[0]`,value:q[0],valueSpec:{},validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec},q));return KC(Bg(q[1]))?z.concat([new Br(`${Q}[1]`,q[1],"expressions are not allowed in function stops.")]):z.concat(U.validateSpec({key:`${Q}[1]`,value:q[1],valueSpec:e,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec}))}function O(U,z){const q=js(U.value),Q=Iu(U.value),re=U.value!==null?U.value:z;if(!r)r=q;else if(q!==r)return[new Br(U.key,re,`${q} stop domain type must match previous stop domain type ${r}`)];if(q!=="number"&&q!=="string"&&q!=="boolean")return[new Br(U.key,re,"stop domain value must be a number, string, or boolean")];if(q!=="number"&&t!=="categorical"){let X=`number expected, ${q} found`;return qb(e)&&t===void 0&&(X+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Br(U.key,re,X)]}return t==="categorical"&&q==="number"&&(!isFinite(Q)||Math.floor(Q)!==Q)?[new Br(U.key,re,`integer expected, found ${Q}`)]:t!=="categorical"&&q==="number"&&s!==void 0&&Q<s?[new Br(U.key,re,"stop domain values must appear in ascending order")]:(s=Q,t==="categorical"&&Q in i?[new Br(U.key,re,"stop domain values must be unique")]:(i[Q]=!0,[]))}function k(U){return U.validateSpec({key:U.key,value:U.value,valueSpec:e,validateSpec:U.validateSpec,style:U.style,styleSpec:U.styleSpec})}}function my(n){const e=(n.expressionContext==="property"?PB:TB)(Bg(n.value),n.valueSpec);if(e.result==="error")return e.value.map(r=>new Br(`${n.key}${r.key}`,n.value,r.message));const t=e.value.expression||e.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!t.outputDefined())return[new Br(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!nC(t))return[new Br(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!nC(t))return[new Br(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!ox(t,["zoom","feature-state"]))return[new Br(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!ix(t))return[new Br(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function lV(n){const e=n.value,t=n.key,r=js(e);return r!=="boolean"?[new Br(t,e,`boolean expected, ${r} found`)]:[]}function uV(n){const e=n.key,t=n.value,r=js(t);return r!=="string"?[new Br(e,t,`color expected, ${r} found`)]:Ul.parse(String(t))?[]:[new Br(e,t,`color expected, "${t}" found`)]}function iC(n){const e=n.key,t=n.value,r=n.valueSpec,i=[];return Array.isArray(r.values)?r.values.indexOf(Iu(t))===-1&&i.push(new Br(e,t,`expected one of [${r.values.join(", ")}], ${JSON.stringify(t)} found`)):Object.keys(r.values).indexOf(Iu(t))===-1&&i.push(new Br(e,t,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(t)} found`)),i}function zB(n){return ax(Bg(n.value))?my(py({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):VL(n)}function VL(n){const e=n.value,t=n.key;if(js(e)!=="array")return[new Br(t,e,`array expected, ${js(e)} found`)];const r=n.styleSpec;let i,s=[];if(e.length<1)return[new Br(t,e,"filter array must have at least 1 element")];switch(s=s.concat(iC({key:`${t}[0]`,value:e[0],valueSpec:r.filter_operator,style:n.style,styleSpec:n.styleSpec})),Iu(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Iu(e[1])==="$type"&&s.push(new Br(t,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&s.push(new Br(t,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(i=js(e[1]),i!=="string"&&s.push(new Br(`${t}[1]`,e[1],`string expected, ${i} found`)));for(let a=2;a<e.length;a++)i=js(e[a]),Iu(e[1])==="$type"?s=s.concat(iC({key:`${t}[${a}]`,value:e[a],valueSpec:r.geometry_type,style:n.style,styleSpec:n.styleSpec})):i!=="string"&&i!=="number"&&i!=="boolean"&&s.push(new Br(`${t}[${a}]`,e[a],`string, number, or boolean expected, ${i} found`));break;case"any":case"all":case"none":for(let a=1;a<e.length;a++)s=s.concat(VL({key:`${t}[${a}]`,value:e[a],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":i=js(e[1]),e.length!==2?s.push(new Br(t,e,`filter array for "${e[0]}" operator must have 2 elements`)):i!=="string"&&s.push(new Br(`${t}[1]`,e[1],`string expected, ${i} found`));break}return s}function HL(n,e){const t=n.key,r=n.validateSpec,i=n.style,s=n.styleSpec,a=n.value,o=n.objectKey,d=s[`${e}_${n.layerType}`];if(!d)return[];const g=o.match(/^(.*)-transition$/);if(e==="paint"&&g&&d[g[1]]&&d[g[1]].transition)return r({key:t,value:a,valueSpec:s.transition,style:i,styleSpec:s});const b=n.valueSpec||d[o];if(!b)return[new Br(t,a,`unknown property "${o}"`)];let E;if(js(a)==="string"&&qb(b)&&!b.tokens&&(E=/^{([^}]+)}$/.exec(a)))return[new Br(t,a,`"${o}" does not support interpolation syntax
|
||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(E[1])} }\`.`)];const S=[];return n.layerType==="symbol"&&(o==="text-field"&&i&&!i.glyphs&&S.push(new Br(t,a,'use of "text-field" requires a style "glyphs" property')),o==="text-font"&&RC(Bg(a))&&Iu(a.type)==="identity"&&S.push(new Br(t,a,'"text-font" does not support identity functions'))),S.concat(r({key:n.key,value:a,valueSpec:b,style:i,styleSpec:s,expressionContext:"property",propertyType:e,propertyKey:o}))}function ZL(n){return HL(n,"paint")}function XL(n){return HL(n,"layout")}function JL(n){let e=[];const t=n.value,r=n.key,i=n.style,s=n.styleSpec;!t.type&&!t.ref&&e.push(new Br(r,t,'either "type" or "ref" is required'));let a=Iu(t.type);const o=Iu(t.ref);if(t.id){const d=Iu(t.id);for(let g=0;g<n.arrayIndex;g++){const b=i.layers[g];Iu(b.id)===d&&e.push(new Br(r,t.id,`duplicate layer id "${t.id}", previously used at line ${b.id.__line__}`))}}if("ref"in t){["type","source","source-layer","filter","layout"].forEach(g=>{g in t&&e.push(new Br(r,t[g],`"${g}" is prohibited for ref layers`))});let d;i.layers.forEach(g=>{Iu(g.id)===o&&(d=g)}),d?d.ref?e.push(new Br(r,t.ref,"ref cannot reference another ref layer")):a=Iu(d.type):e.push(new Br(r,t.ref,`ref layer "${o}" not found`))}else if(a!=="background")if(!t.source)e.push(new Br(r,t,'missing required property "source"'));else{const d=i.sources&&i.sources[t.source],g=d&&Iu(d.type);d?g==="vector"&&a==="raster"?e.push(new Br(r,t.source,`layer "${t.id}" requires a raster source`)):g!=="raster-dem"&&a==="hillshade"?e.push(new Br(r,t.source,`layer "${t.id}" requires a raster-dem source`)):g==="raster"&&a!=="raster"?e.push(new Br(r,t.source,`layer "${t.id}" requires a vector source`)):g==="vector"&&!t["source-layer"]?e.push(new Br(r,t,`layer "${t.id}" must specify a "source-layer"`)):g==="raster-dem"&&a!=="hillshade"?e.push(new Br(r,t.source,"raster-dem source can only be used with layer type 'hillshade'.")):a==="line"&&t.paint&&t.paint["line-gradient"]&&(g!=="geojson"||!d.lineMetrics)&&e.push(new Br(r,t,`layer "${t.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new Br(r,t.source,`source "${t.source}" not found`))}return e=e.concat(wf({key:r,value:t,valueSpec:s.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*"(){return[]},type(){return n.validateSpec({key:`${r}.type`,value:t.type,valueSpec:s.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:t,objectKey:"type"})},filter:zB,layout(d){return wf({layer:t,key:d.key,value:d.value,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*"(g){return XL(py({layerType:a},g))}}})},paint(d){return wf({layer:t,key:d.key,value:d.value,style:d.style,styleSpec:d.styleSpec,validateSpec:d.validateSpec,objectElementValidators:{"*"(g){return ZL(py({layerType:a},g))}}})}}})),e}function Og(n){const e=n.value,t=n.key,r=js(e);return r!=="string"?[new Br(t,e,`string expected, ${r} found`)]:[]}function AV(n){var e;const t=(e=n.sourceName)!==null&&e!==void 0?e:"",r=n.value,i=n.styleSpec,s=i.source_raster_dem,a=n.style;let o=[];const d=js(r);if(r===void 0)return o;if(d!=="object")return o.push(new Br("source_raster_dem",r,`object expected, ${d} found`)),o;const b=Iu(r.encoding)==="custom",E=["redFactor","greenFactor","blueFactor","baseShift"],S=n.value.encoding?`"${n.value.encoding}"`:"Default";for(const O in r)!b&&E.includes(O)?o.push(new Br(O,r[O],`In "${t}": "${O}" is only valid when "encoding" is set to "custom". ${S} encoding found`)):s[O]?o=o.concat(n.validateSpec({key:O,value:r[O],valueSpec:s[O],validateSpec:n.validateSpec,style:a,styleSpec:i})):o.push(new Br(O,r[O],`unknown property "${O}"`));return o}const d7={promoteId:cV};function eU(n){const e=n.value,t=n.key,r=n.styleSpec,i=n.style,s=n.validateSpec;if(!e.type)return[new Br(t,e,'"type" is required')];const a=Iu(e.type);let o;switch(a){case"vector":case"raster":return o=wf({key:t,value:e,valueSpec:r[`source_${a.replace("-","_")}`],style:n.style,styleSpec:r,objectElementValidators:d7,validateSpec:s}),o;case"raster-dem":return o=AV({sourceName:t,value:e,style:n.style,styleSpec:r,validateSpec:s}),o;case"geojson":if(o=wf({key:t,value:e,valueSpec:r.source_geojson,style:i,styleSpec:r,validateSpec:s,objectElementValidators:d7}),e.cluster)for(const d in e.clusterProperties){const[g,b]=e.clusterProperties[d],E=typeof g=="string"?[g,["accumulated"],["get",d]]:g;o.push(...my({key:`${t}.${d}.map`,value:b,validateSpec:s,expressionContext:"cluster-map"})),o.push(...my({key:`${t}.${d}.reduce`,value:E,validateSpec:s,expressionContext:"cluster-reduce"}))}return o;case"video":return wf({key:t,value:e,valueSpec:r.source_video,style:i,validateSpec:s,styleSpec:r});case"image":return wf({key:t,value:e,valueSpec:r.source_image,style:i,validateSpec:s,styleSpec:r});case"canvas":return[new Br(t,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return iC({key:`${t}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:s,styleSpec:r})}}function cV({key:n,value:e}){if(js(e)==="string")return Og({key:n,value:e});{const t=[];for(const r in e)t.push(...Og({key:`${n}.${r}`,value:e[r]}));return t}}function tU(n){const e=n.value,t=n.styleSpec,r=t.light,i=n.style;let s=[];const a=js(e);if(e===void 0)return s;if(a!=="object")return s=s.concat([new Br("light",e,`object expected, ${a} found`)]),s;for(const o in e){const d=o.match(/^(.*)-transition$/);d&&r[d[1]]&&r[d[1]].transition?s=s.concat(n.validateSpec({key:o,value:e[o],valueSpec:t.transition,validateSpec:n.validateSpec,style:i,styleSpec:t})):r[o]?s=s.concat(n.validateSpec({key:o,value:e[o],valueSpec:r[o],validateSpec:n.validateSpec,style:i,styleSpec:t})):s=s.concat([new Br(o,e[o],`unknown property "${o}"`)])}return s}function nU(n){const e=n.value,t=n.styleSpec,r=t.sky,i=n.style,s=js(e);if(e===void 0)return[];if(s!=="object")return[new Br("sky",e,`object expected, ${s} found`)];let a=[];for(const o in e)r[o]?a=a.concat(n.validateSpec({key:o,value:e[o],valueSpec:r[o],style:i,styleSpec:t})):a=a.concat([new Br(o,e[o],`unknown property "${o}"`)]);return a}function rU(n){const e=n.value,t=n.styleSpec,r=t.terrain,i=n.style;let s=[];const a=js(e);if(e===void 0)return s;if(a!=="object")return s=s.concat([new Br("terrain",e,`object expected, ${a} found`)]),s;for(const o in e)r[o]?s=s.concat(n.validateSpec({key:o,value:e[o],valueSpec:r[o],validateSpec:n.validateSpec,style:i,styleSpec:t})):s=s.concat([new Br(o,e[o],`unknown property "${o}"`)]);return s}function dV(n){return Og(n).length===0?[]:my(n)}function hV(n){return Og(n).length===0?[]:my(n)}function fV(n){const e=n.key,t=n.value;if(js(t)==="array"){if(t.length<1||t.length>4)return[new Br(e,t,`padding requires 1 to 4 values; ${t.length} values found`)];const i={type:"number"};let s=[];for(let a=0;a<t.length;a++)s=s.concat(n.validateSpec({key:`${e}[${a}]`,value:t[a],validateSpec:n.validateSpec,valueSpec:i}));return s}else return UB({key:e,value:t,valueSpec:{}})}function pV(n){const e=n.key,t=n.value,r=js(t),i=n.styleSpec;if(r!=="array"||t.length<1||t.length%2!==0)return[new Br(e,t,"variableAnchorOffsetCollection requires a non-empty array of even length")];let s=[];for(let a=0;a<t.length;a+=2)s=s.concat(iC({key:`${e}[${a}]`,value:t[a],valueSpec:i.layout_symbol["text-anchor"]})),s=s.concat(LB({key:`${e}[${a+1}]`,value:t[a+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:i}));return s}function iU(n){let e=[];const t=n.value,r=n.key;if(Array.isArray(t)){const i=[],s=[];for(const a in t){t[a].id&&i.includes(t[a].id)&&e.push(new Br(r,t,`all the sprites' ids must be unique, but ${t[a].id} is duplicated`)),i.push(t[a].id),t[a].url&&s.includes(t[a].url)&&e.push(new Br(r,t,`all the sprites' URLs must be unique, but ${t[a].url} is duplicated`)),s.push(t[a].url);const o={id:{type:"string",required:!0},url:{type:"string",required:!0}};e=e.concat(wf({key:`${r}[${a}]`,value:t[a],valueSpec:o,validateSpec:n.validateSpec}))}return e}else return Og({key:r,value:t})}function mV(n){const e=n.value,t=n.styleSpec,r=t.projection,i=n.style,s=js(e);if(e===void 0)return[];if(s!=="object")return[new Br("projection",e,`object expected, ${s} found`)];let a=[];for(const o in e)r[o]?a=a.concat(n.validateSpec({key:o,value:e[o],valueSpec:r[o],style:i,styleSpec:t})):a=a.concat([new Br(o,e[o],`unknown property "${o}"`)]);return a}function gV(n){const e=n.key;let t=n.value;t=t instanceof String?t.valueOf():t;const r=js(t);return r==="array"&&!vV(t)&&!yV(t)?[new Br(e,t,`projection expected, invalid array ${JSON.stringify(t)} found`)]:["array","string"].includes(r)?[]:[new Br(e,t,`projection expected, invalid type "${r}" found`)]}function yV(n){return!!["interpolate","step","literal"].includes(n[0])}function vV(n){return Array.isArray(n)&&n.length===3&&typeof n[0]=="string"&&typeof n[1]=="string"&&typeof n[2]=="number"}const h7={"*"(){return[]},array:LB,boolean:lV,number:UB,color:uV,constants:YL,enum:iC,filter:zB,function:$L,layer:JL,object:wf,source:eU,light:tU,sky:nU,terrain:rU,projection:mV,projectionDefinition:gV,string:Og,formatted:dV,resolvedImage:hV,padding:fV,variableAnchorOffsetCollection:pV,sprite:iU};function Nv(n){const e=n.value,t=n.valueSpec,r=n.styleSpec;return n.validateSpec=Nv,t.expression&&RC(Iu(e))?$L(n):t.expression&&KC(Bg(e))?my(n):t.type&&h7[t.type]?h7[t.type](n):wf(py({},n,{valueSpec:t.type?r[t.type]:t}))}function oU(n){const e=n.value,t=n.key,r=Og(n);return r.length||(e.indexOf("{fontstack}")===-1&&r.push(new Br(t,e,'"glyphs" url must include a "{fontstack}" token')),e.indexOf("{range}")===-1&&r.push(new Br(t,e,'"glyphs" url must include a "{range}" token'))),r}function kf(n,e=Ys){let t=[];return t=t.concat(Nv({key:"",value:n,valueSpec:e.$root,styleSpec:e,style:n,validateSpec:Nv,objectElementValidators:{glyphs:oU,"*"(){return[]}}})),n.constants&&(t=t.concat(YL({key:"constants",value:n.constants,style:n,styleSpec:e,validateSpec:Nv}))),sU(t)}kf.source=om(im(eU));kf.sprite=om(im(iU));kf.glyphs=om(im(oU));kf.light=om(im(tU));kf.sky=om(im(nU));kf.terrain=om(im(rU));kf.layer=om(im(JL));kf.filter=om(im(zB));kf.paintProperty=om(im(ZL));kf.layoutProperty=om(im(XL));function im(n){return function(e){return n({...e,validateSpec:Nv})}}function sU(n){return[].concat(n).sort((e,t)=>e.line-t.line)}function om(n){return function(...e){return sU(n.apply(this,e))}}const CV=/("(?:[^\\"]|\\.)*")|[:,]/g;function _V(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),r=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:i}=e;return function s(a,o,d){a&&typeof a.toJSON=="function"&&(a=a.toJSON());const g=JSON.stringify(a,i);if(g===void 0)return g;const b=r-o.length-d;if(g.length<=b){const E=g.replace(CV,(S,O)=>O||`${S} `);if(E.length<=b)return E}if(i!=null&&(a=JSON.parse(g),i=void 0),typeof a=="object"&&a!==null){const E=o+t,S=[];let O=0,k,U;if(Array.isArray(a)){k="[",U="]";const{length:z}=a;for(;O<z;O++)S.push(s(a[O],E,O===z-1?0:1)||"null")}else{k="{",U="}";const z=Object.keys(a),{length:q}=z;for(;O<q;O++){const Q=z[O],re=`${JSON.stringify(Q)}: `,X=s(a[Q],E,re.length+(O===q-1?0:1));X!==void 0&&S.push(re+X)}}if(S.length>0)return[k,t+S.join(`,
|
||
${E}`),U].join(`
|
||
${o}`)}return g}(n,"",0)}function f7(n,e){const t={};for(const r in e)n[r]!==void 0&&(t[r]=n[r]);for(const r in n)t[r]===void 0&&(t[r]=n[r]);return t}function aU(n,e=2){return n=f7(n,Ys.$root),n.layers&&(n.layers=n.layers.map(t=>f7(t,Ys.layer))),_V(n,{indent:e})}function J3(n,e){for(const t in n)t.indexOf("layout")===0&&e(n[t],t)}function p7(n,e){for(const t in n)t.indexOf("paint")===0&&e(n[t],t)}function m6(n,e){return typeof e=="string"&&e[0]==="@"?m6(n,n.constants[e]):e}function bV(n){return Array.isArray(n.stops)}function sv(n,e,t){n[t]=n[e],delete n[e]}function xV(n){n.version=8,aV(n,i=>{i.type==="video"&&i.url!==void 0&&sv(i,"url","urls"),i.type==="video"&&i.coordinates.forEach(s=>s.reverse())}),jv(n,i=>{J3(i,s=>{s["symbol-min-distance"]!==void 0&&sv(s,"symbol-min-distance","symbol-spacing")}),p7(i,s=>{s["background-image"]!==void 0&&sv(s,"background-image","background-pattern"),s["line-image"]!==void 0&&sv(s,"line-image","line-pattern"),s["fill-image"]!==void 0&&sv(s,"fill-image","fill-pattern")})}),FB(n,{paint:!0,layout:!0},i=>{const s=m6(n,i.value);bV(s)&&s.stops.forEach(a=>{a[1]=m6(n,a[1])}),i.set(s)}),delete n.constants,jv(n,i=>{J3(i,s=>{delete s["text-max-size"],delete s["icon-max-size"]}),p7(i,s=>{s["text-size"]&&(i.layout||(i.layout={}),i.layout["text-size"]=s["text-size"],delete s["text-size"]),s["icon-size"]&&(i.layout||(i.layout={}),i.layout["icon-size"]=s["icon-size"],delete s["icon-size"])})});function e(i){function s(a){return a.split(",").map(o=>o.trim())}if(Array.isArray(i))return i;if(typeof i=="string")return s(i);if(typeof i=="object")return i.stops.forEach(a=>{a[1]=s(a[1])}),i;throw new Error("unexpected font value")}jv(n,i=>{J3(i,s=>{s["text-font"]&&(s["text-font"]=e(s["text-font"]))})});let t=0;for(let i=n.layers.length-1;i>=0;i--)if(n.layers[i].type!=="symbol"){t=i+1;break}const r=n.layers.splice(t);return r.reverse(),n.layers=n.layers.concat(r),n}function wV(n){const e=[];return jv(n,t=>{t.filter&&(t.filter=zv(t.filter))}),FB(n,{paint:!0,layout:!0},({path:t,value:r,reference:i,set:s})=>{KC(r)||(typeof r=="object"&&!Array.isArray(r)?(s(QL(r,i)),e.push(t.join("."))):i.tokens&&typeof r=="string"&&s(qL(r)))}),n}function MV(n){return JSON.parse(SV(JSON.stringify(n)))}function SV(n){return n.replace(/"hsla?\((.+?)\)"/gi,(e,t)=>{const r=t.match(/^(.+?)\s*,\s*(.+?)\s*,\s*(.+?)(?:\s*,\s*(.+))?$/i);if(r){let[i,s,a,o]=r.slice(1);return[s,a]=[s,a].map(d=>d.endsWith("%")?d:`${parseFloat(d)*100}%`),`"hsl${typeof o=="string"?"a":""}(${[i,s,a,o].filter(Boolean).join(",")})"`}return e})}function EV(n){let e=!1;if(n.version===7&&(n=xV(n),e=!0),n.version===8&&(e=!!wV(n),e=!0),FB(n,{paint:!0,layout:!0},({value:t,reference:r,set:i})=>{r.type==="color"&&i(MV(t))}),!e)throw new Error(`Cannot migrate from ${n.version}`);return n}const BV={StyleExpression:GL,StylePropertyFunction:sx,ZoomConstantExpression:h6,ZoomDependentExpression:f6,createExpression:TB,createPropertyExpression:PB,isExpression:KC,isExpressionFilter:ax,isZoomExpression:H$,normalizePropertyExpression:Z$},OV={convertFunction:QL,createFunction:kB,isFunction:RC};var lx=kC();const IV=Ha(lx);var xb={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 kV=xb.exports,m7;function TV(){return m7||(m7=1,function(n,e){(function(t,r){n.exports=r()})(kV,function(){var t={},r={};function i(a,o,d){if(r[a]=d,a==="index"){var g="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",b={};return r.shared(b),r.index(t,b),typeof window<"u"&&t.setWorkerUrl(window.URL.createObjectURL(new Blob([g],{type:"text/javascript"}))),t}}i("shared",["exports"],function(a){function o(f,u,h,v){return new(h||(h=Promise))(function(w,K){function L(ne){try{Z(v.next(ne))}catch(ce){K(ce)}}function W(ne){try{Z(v.throw(ne))}catch(ce){K(ce)}}function Z(ne){var ce;ne.done?w(ne.value):(ce=ne.value,ce instanceof h?ce:new h(function(be){be(ce)})).then(L,W)}Z((v=v.apply(f,u||[])).next())})}function d(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var g,b;function E(){if(b)return g;function f(u,h){this.x=u,this.y=h}return b=1,g=f,f.prototype={clone:function(){return new f(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,h){return this.clone()._rotateAround(u,h)},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 h=u.x-this.x,v=u.y-this.y;return h*h+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,h){return Math.atan2(this.x*h-this.y*u,this.x*u+this.y*h)},_matMult:function(u){var h=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=h,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 h=Math.cos(u),v=Math.sin(u),w=v*this.x+h*this.y;return this.x=h*this.x-v*this.y,this.y=w,this},_rotateAround:function(u,h){var v=Math.cos(u),w=Math.sin(u),K=h.y+w*(this.x-h.x)+v*(this.y-h.y);return this.x=h.x+v*(this.x-h.x)-w*(this.y-h.y),this.y=K,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(u){return u instanceof f?u:Array.isArray(u)?new f(u[0],u[1]):u},g}typeof SuppressedError=="function"&&SuppressedError;var S,O,k=d(E()),U=function(){if(O)return S;function f(u,h,v,w){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*h,this.by=3*(w-h)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=h,this.p2x=v,this.p2y=w}return O=1,S=f,f.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,h){if(h===void 0&&(h=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,w=0;w<8;w++){var K=this.sampleCurveX(v)-u;if(Math.abs(K)<h)return v;var L=this.sampleCurveDerivativeX(v);if(Math.abs(L)<1e-6)break;v-=K/L}var W=0,Z=1;for(v=u,w=0;w<20&&(K=this.sampleCurveX(v),!(Math.abs(K-u)<h));w++)u>K?W=v:Z=v,v=.5*(Z-W)+W;return v},solve:function(u,h){return this.sampleCurveY(this.solveCurveX(u,h))}},S}(),z=d(U);let q,Q;function re(){return q==null&&(q=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),q}function X(){if(Q==null&&(Q=!1,re())){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 h=u.getImageData(0,0,5,5).data;for(let v=0;v<5*5*4;v++)if(v%4!=3&&h[v]!==v){Q=!0;break}}}return Q||!1}var Y,ee=1e-6,N=typeof Float32Array<"u"?Float32Array:Array;function ie(){var f=new N(9);return N!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[5]=0,f[6]=0,f[7]=0),f[0]=1,f[4]=1,f[8]=1,f}function he(f){return f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function de(){var f=new N(3);return N!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f}function Me(f,u,h){var v=new N(3);return v[0]=f,v[1]=u,v[2]=h,v}function fe(f,u,h){var v=u[0],w=u[1],K=u[2],L=u[3];return f[0]=h[0]*v+h[4]*w+h[8]*K+h[12]*L,f[1]=h[1]*v+h[5]*w+h[9]*K+h[13]*L,f[2]=h[2]*v+h[6]*w+h[10]*K+h[14]*L,f[3]=h[3]*v+h[7]*w+h[11]*K+h[15]*L,f}function xe(){var f=new N(4);return N!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f[3]=1,f}function De(){var f=new N(2);return N!=Float32Array&&(f[0]=0,f[1]=0),f}function me(f,u){var h=new N(2);return h[0]=f,h[1]=u,h}Math.hypot||(Math.hypot=function(){for(var f=0,u=arguments.length;u--;)f+=arguments[u]*arguments[u];return Math.sqrt(f)}),de(),Y=new N(4),N!=Float32Array&&(Y[0]=0,Y[1]=0,Y[2]=0,Y[3]=0),de(),Me(1,0,0),Me(0,1,0),xe(),xe(),ie(),De();const at=8192;function Qe(f,u,h){return u*(at/(f.tileSize*Math.pow(2,h-f.tileID.overscaledZ)))}function He(f,u){return(f%u+u)%u}function We(f,u,h){return f*(1-h)+u*h}function Ce(f){if(f<=0)return 0;if(f>=1)return 1;const u=f*f,h=u*f;return 4*(f<.5?h:3*(f-u)+h-.75)}function Te(f,u,h,v){const w=new z(f,u,h,v);return K=>w.solve(K)}const rt=Te(.25,.1,.25,1);function yt(f,u,h){return Math.min(h,Math.max(u,f))}function bt(f,u,h){const v=h-u,w=((f-u)%v+v)%v+u;return w===u?h:w}function gt(f,...u){for(const h of u)for(const v in h)f[v]=h[v];return f}let Dt=1;function Pt(f,u,h){const v={};for(const w in f)v[w]=u.call(this,f[w],w,f);return v}function Le(f,u,h){const v={};for(const w in f)u.call(this,f[w],w,f)&&(v[w]=f[w]);return v}function Pe(f){return Array.isArray(f)?f.map(Pe):typeof f=="object"&&f?Pt(f,Pe):f}const Ee={};function nt(f){Ee[f]||(typeof console<"u"&&console.warn(f),Ee[f]=!0)}function _t(f,u,h){return(h.y-f.y)*(u.x-f.x)>(u.y-f.y)*(h.x-f.x)}function ht(f){return typeof WorkerGlobalScope<"u"&&f!==void 0&&f instanceof WorkerGlobalScope}let Ut=null;function en(f){return typeof ImageBitmap<"u"&&f instanceof ImageBitmap}const Ft="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function mn(f,u,h,v,w){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const K=new VideoFrame(f,{timestamp:0});try{const L=K==null?void 0:K.format;if(!L||!L.startsWith("BGR")&&!L.startsWith("RGB"))throw new Error(`Unrecognized format ${L}`);const W=L.startsWith("BGR"),Z=new Uint8ClampedArray(v*w*4);if(yield K.copyTo(Z,function(ne,ce,be,Ke,Ue){const Ne=4*Math.max(1,0),Xe=(Math.max(0,be)-be)*Ke*4+Ne,ut=4*Ke,Ct=Math.max(0,ce),Nt=Math.max(0,be);return{rect:{x:Ct,y:Nt,width:Math.min(ne.width,ce+Ke)-Ct,height:Math.min(ne.height,be+Ue)-Nt},layout:[{offset:Xe,stride:ut}]}}(f,u,h,v,w)),W)for(let ne=0;ne<Z.length;ne+=4){const ce=Z[ne];Z[ne]=Z[ne+2],Z[ne+2]=ce}return Z}finally{K.close()}})}let jn,nn;function ir(f){return f/Math.PI*180}const Dn="AbortError";function fn(){return new Error(Dn)}const Hn={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function wr(f){return Hn.REGISTERED_PROTOCOLS[f.substring(0,f.indexOf("://"))]}const Qn="global-dispatcher";class Xn extends Error{constructor(u,h,v,w){super(`AJAXError: ${h} (${u}): ${v}`),this.status=u,this.statusText=h,this.url=v,this.body=w}}const Ge=()=>ht(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Ae=function(f,u){if(/:\/\//.test(f.url)&&!/^https?:|^file:/.test(f.url)){const v=wr(f.url);if(v)return v(f,u);if(ht(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:f,targetMapId:Qn},u)}if(!(/^file:/.test(h=f.url)||/^file:/.test(Ge())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(v,w){return o(this,void 0,void 0,function*(){const K=new Request(v.url,{method:v.method||"GET",body:v.body,credentials:v.credentials,headers:v.headers,cache:v.cache,referrer:Ge(),signal:w.signal});let L,W;v.type!=="json"||K.headers.has("Accept")||K.headers.set("Accept","application/json");try{L=yield fetch(K)}catch(ne){throw new Xn(0,ne.message,v.url,new Blob)}if(!L.ok){const ne=yield L.blob();throw new Xn(L.status,L.statusText,v.url,ne)}W=v.type==="arrayBuffer"||v.type==="image"?L.arrayBuffer():v.type==="json"?L.json():L.text();const Z=yield W;if(w.signal.aborted)throw fn();return{data:Z,cacheControl:L.headers.get("Cache-Control"),expires:L.headers.get("Expires")}})}(f,u);if(ht(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:f,mustQueue:!0,targetMapId:Qn},u)}var h;return function(v,w){return new Promise((K,L)=>{var W;const Z=new XMLHttpRequest;Z.open(v.method||"GET",v.url,!0),v.type!=="arrayBuffer"&&v.type!=="image"||(Z.responseType="arraybuffer");for(const ne in v.headers)Z.setRequestHeader(ne,v.headers[ne]);v.type==="json"&&(Z.responseType="text",!((W=v.headers)===null||W===void 0)&&W.Accept||Z.setRequestHeader("Accept","application/json")),Z.withCredentials=v.credentials==="include",Z.onerror=()=>{L(new Error(Z.statusText))},Z.onload=()=>{if(!w.signal.aborted)if((Z.status>=200&&Z.status<300||Z.status===0)&&Z.response!==null){let ne=Z.response;if(v.type==="json")try{ne=JSON.parse(Z.response)}catch(ce){return void L(ce)}K({data:ne,cacheControl:Z.getResponseHeader("Cache-Control"),expires:Z.getResponseHeader("Expires")})}else{const ne=new Blob([Z.response],{type:Z.getResponseHeader("Content-Type")});L(new Xn(Z.status,Z.statusText,v.url,ne))}},w.signal.addEventListener("abort",()=>{Z.abort(),L(fn())}),Z.send(v.body)})}(f,u)};function pe(f){if(!f||f.indexOf("://")<=0||f.indexOf("data:image/")===0||f.indexOf("blob:")===0)return!0;const u=new URL(f),h=window.location;return u.protocol===h.protocol&&u.host===h.host}function et(f,u,h){h[f]&&h[f].indexOf(u)!==-1||(h[f]=h[f]||[],h[f].push(u))}function St(f,u,h){if(h&&h[f]){const v=h[f].indexOf(u);v!==-1&&h[f].splice(v,1)}}class Yt{constructor(u,h={}){gt(this,h),this.type=u}}class rn extends Yt{constructor(u,h={}){super("error",gt({error:u},h))}}class er{on(u,h){return this._listeners=this._listeners||{},et(u,h,this._listeners),{unsubscribe:()=>{this.off(u,h)}}}off(u,h){return St(u,h,this._listeners),St(u,h,this._oneTimeListeners),this}once(u,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},et(u,h,this._oneTimeListeners),this):new Promise(v=>this.once(u,v))}fire(u,h){typeof u=="string"&&(u=new Yt(u,h||{}));const v=u.type;if(this.listens(v)){u.target=this;const w=this._listeners&&this._listeners[v]?this._listeners[v].slice():[];for(const W of w)W.call(this,u);const K=this._oneTimeListeners&&this._oneTimeListeners[v]?this._oneTimeListeners[v].slice():[];for(const W of K)St(v,W,this._oneTimeListeners),W.call(this,u);const L=this._eventedParent;L&&(gt(u,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),L.fire(u))}else u instanceof rn&&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,h){return this._eventedParent=u,this._eventedParentData=h,this}}var Be={$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 oe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ve(f,u){const h={};for(const v in f)v!=="ref"&&(h[v]=f[v]);return oe.forEach(v=>{v in u&&(h[v]=u[v])}),h}function p(f,u){if(Array.isArray(f)){if(!Array.isArray(u)||f.length!==u.length)return!1;for(let h=0;h<f.length;h++)if(!p(f[h],u[h]))return!1;return!0}if(typeof f=="object"&&f!==null&&u!==null){if(typeof u!="object"||Object.keys(f).length!==Object.keys(u).length)return!1;for(const h in f)if(!p(f[h],u[h]))return!1;return!0}return f===u}function je(f,u){f.push(u)}function Ye(f,u,h){je(h,{command:"addSource",args:[f,u[f]]})}function tt(f,u,h){je(u,{command:"removeSource",args:[f]}),h[f]=!0}function ct(f,u,h,v){tt(f,h,v),Ye(f,u,h)}function At(f,u,h){let v;for(v in f[h])if(Object.prototype.hasOwnProperty.call(f[h],v)&&v!=="data"&&!p(f[h][v],u[h][v]))return!1;for(v in u[h])if(Object.prototype.hasOwnProperty.call(u[h],v)&&v!=="data"&&!p(f[h][v],u[h][v]))return!1;return!0}function Gt(f,u,h,v,w,K){f=f||{},u=u||{};for(const L in f)Object.prototype.hasOwnProperty.call(f,L)&&(p(f[L],u[L])||h.push({command:K,args:[v,L,u[L],w]}));for(const L in u)Object.prototype.hasOwnProperty.call(u,L)&&!Object.prototype.hasOwnProperty.call(f,L)&&(p(f[L],u[L])||h.push({command:K,args:[v,L,u[L],w]}))}function $t(f){return f.id}function jt(f,u){return f[u.id]=u,f}class xt{constructor(u,h,v,w){this.message=(u?`${u}: `:"")+v,w&&(this.identifier=w),h!=null&&h.__line__&&(this.line=h.__line__)}}function Rn(f,...u){for(const h of u)for(const v in h)f[v]=h[v];return f}class Bn extends Error{constructor(u,h){super(h),this.message=h,this.key=u}}class fr{constructor(u,h=[]){this.parent=u,this.bindings={};for(const[v,w]of h)this.bindings[v]=w}concat(u){return new fr(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 Sr={kind:"null"},on={kind:"number"},Nn={kind:"string"},Fn={kind:"boolean"},Or={kind:"color"},Er={kind:"projectionDefinition"},Dr={kind:"object"},ur={kind:"value"},co={kind:"collator"},Sa={kind:"formatted"},qi={kind:"padding"},yi={kind:"resolvedImage"},oo={kind:"variableAnchorOffsetCollection"};function Mo(f,u){return{kind:"array",itemType:f,N:u}}function Ti(f){if(f.kind==="array"){const u=Ti(f.itemType);return typeof f.N=="number"?`array<${u}, ${f.N}>`:f.itemType.kind==="value"?"array":`array<${u}>`}return f.kind}const La=[Sr,on,Nn,Fn,Or,Er,Sa,Dr,Mo(ur),qi,yi,oo];function Ea(f,u){if(u.kind==="error")return null;if(f.kind==="array"){if(u.kind==="array"&&(u.N===0&&u.itemType.kind==="value"||!Ea(f.itemType,u.itemType))&&(typeof f.N!="number"||f.N===u.N))return null}else{if(f.kind===u.kind)return null;if(f.kind==="value"){for(const h of La)if(!Ea(h,u))return null}}return`Expected ${Ti(f)} but found ${Ti(u)} instead.`}function ns(f,u){return u.some(h=>h.kind===f.kind)}function Aa(f,u){return u.some(h=>h==="null"?f===null:h==="array"?Array.isArray(f):h==="object"?f&&!Array.isArray(f)&&typeof f=="object":h===typeof f)}function Al(f,u){return f.kind==="array"&&u.kind==="array"?f.itemType.kind===u.itemType.kind&&typeof f.N=="number":f.kind===u.kind}const ao=.96422,Pu=.82521,tu=4/29,so=6/29,Kr=3*so*so,Za=so*so*so,Ps=Math.PI/180,ia=180/Math.PI;function qe(f){return(f%=360)<0&&(f+=360),f}function wt([f,u,h,v]){let w,K;const L=qn((.2225045*(f=gn(f))+.7168786*(u=gn(u))+.0606169*(h=gn(h)))/1);f===u&&u===h?w=K=L:(w=qn((.4360747*f+.3850649*u+.1430804*h)/ao),K=qn((.0139322*f+.0971045*u+.7141733*h)/Pu));const W=116*L-16;return[W<0?0:W,500*(w-L),200*(L-K),v]}function gn(f){return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)}function qn(f){return f>Za?Math.pow(f,1/3):f/Kr+tu}function An([f,u,h,v]){let w=(f+16)/116,K=isNaN(u)?w:w+u/500,L=isNaN(h)?w:w-h/200;return w=1*Pi(w),K=ao*Pi(K),L=Pu*Pi(L),[sr(3.1338561*K-1.6168667*w-.4906146*L),sr(-.9787684*K+1.9161415*w+.033454*L),sr(.0719453*K-.2289914*w+1.4052427*L),v]}function sr(f){return(f=f<=.00304?12.92*f:1.055*Math.pow(f,1/2.4)-.055)<0?0:f>1?1:f}function Pi(f){return f>so?f*f*f:Kr*(f-tu)}function ho(f){return parseInt(f.padEnd(2,f),16)/255}function Cs(f,u){return Ns(u?f/100:f,0,1)}function Ns(f,u,h){return Math.min(Math.max(u,f),h)}function vA(f){return!f.some(Number.isNaN)}const ri={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 wi(f,u,h){return f+h*(u-f)}function Xa(f,u,h){return f.map((v,w)=>wi(v,u[w],h))}class Ai{constructor(u,h,v,w=1,K=!0){this.r=u,this.g=h,this.b=v,this.a=w,K||(this.r*=w,this.g*=w,this.b*=w,w||this.overwriteGetter("rgb",[u,h,v,w]))}static parse(u){if(u instanceof Ai)return u;if(typeof u!="string")return;const h=function(v){if((v=v.toLowerCase().trim())==="transparent")return[0,0,0,0];const w=ri[v];if(w){const[L,W,Z]=w;return[L/255,W/255,Z/255,1]}if(v.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(v)){const L=v.length<6?1:2;let W=1;return[ho(v.slice(W,W+=L)),ho(v.slice(W,W+=L)),ho(v.slice(W,W+=L)),ho(v.slice(W,W+L)||"ff")]}if(v.startsWith("rgb")){const L=v.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(L){const[W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt]=L,Et=[ce||" ",Ue||" ",ut].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){const Fe=[ne,Ke,Xe].join(""),st=Fe==="%%%"?100:Fe===""?255:0;if(st){const Ot=[Ns(+Z/st,0,1),Ns(+be/st,0,1),Ns(+Ne/st,0,1),Ct?Cs(+Ct,Nt):1];if(vA(Ot))return Ot}}return}}const K=v.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(K){const[L,W,Z,ne,ce,be,Ke,Ue,Ne]=K,Xe=[Z||" ",ce||" ",Ke].join("");if(Xe===" "||Xe===" /"||Xe===",,"||Xe===",,,"){const ut=[+W,Ns(+ne,0,100),Ns(+be,0,100),Ue?Cs(+Ue,Ne):1];if(vA(ut))return function([Ct,Nt,Et,Fe]){function st(Ot){const un=(Ot+Ct/30)%12,zn=Nt*Math.min(Et,1-Et);return Et-zn*Math.max(-1,Math.min(un-3,9-un,1))}return Ct=qe(Ct),Nt/=100,Et/=100,[st(0),st(8),st(4),Fe]}(ut)}}}(u);return h?new Ai(...h,!1):void 0}get rgb(){const{r:u,g:h,b:v,a:w}=this,K=w||1/0;return this.overwriteGetter("rgb",[u/K,h/K,v/K,w])}get hcl(){return this.overwriteGetter("hcl",function(u){const[h,v,w,K]=wt(u),L=Math.sqrt(v*v+w*w);return[Math.round(1e4*L)?qe(Math.atan2(w,v)*ia):NaN,L,h,K]}(this.rgb))}get lab(){return this.overwriteGetter("lab",wt(this.rgb))}overwriteGetter(u,h){return Object.defineProperty(this,u,{value:h}),h}toString(){const[u,h,v,w]=this.rgb;return`rgba(${[u,h,v].map(K=>Math.round(255*K)).join(",")},${w})`}static interpolate(u,h,v,w="rgb"){switch(w){case"rgb":{const[K,L,W,Z]=Xa(u.rgb,h.rgb,v);return new Ai(K,L,W,Z,!1)}case"hcl":{const[K,L,W,Z]=u.hcl,[ne,ce,be,Ke]=h.hcl;let Ue,Ne;if(isNaN(K)||isNaN(ne))isNaN(K)?isNaN(ne)?Ue=NaN:(Ue=ne,W!==1&&W!==0||(Ne=ce)):(Ue=K,be!==1&&be!==0||(Ne=L));else{let Et=ne-K;ne>K&&Et>180?Et-=360:ne<K&&K-ne>180&&(Et+=360),Ue=K+v*Et}const[Xe,ut,Ct,Nt]=function([Et,Fe,st,Ot]){return Et=isNaN(Et)?0:Et*Ps,An([st,Math.cos(Et)*Fe,Math.sin(Et)*Fe,Ot])}([Ue,Ne??wi(L,ce,v),wi(W,be,v),wi(Z,Ke,v)]);return new Ai(Xe,ut,Ct,Nt,!1)}case"lab":{const[K,L,W,Z]=An(Xa(u.lab,h.lab,v));return new Ai(K,L,W,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 ca{constructor(u,h,v){this.sensitivity=u?h?"variant":"case":h?"accent":"base",this.locale=v,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,h){return this.collator.compare(u,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class iA{constructor(u,h,v,w,K){this.text=u,this.image=h,this.scale=v,this.fontStack=w,this.textColor=K}}class ls{constructor(u){this.sections=u}static fromString(u){return new ls([new iA(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 ls?u:ls.fromString(u)}toString(){return this.sections.length===0?"":this.sections.map(u=>u.text).join("")}}class Fr{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Fr)return u;if(typeof u=="number")return new Fr([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const h of u)if(typeof h!="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 Fr(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,h,v){return new Fr(Xa(u.values,h.values,v))}}class Ei{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Ja=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Rs{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Rs)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let h=0;h<u.length;h+=2){const v=u[h],w=u[h+1];if(typeof v!="string"||!Ja.has(v)||!Array.isArray(w)||w.length!==2||typeof w[0]!="number"||typeof w[1]!="number")return}return new Rs(u)}}toString(){return JSON.stringify(this.values)}static interpolate(u,h,v){const w=u.values,K=h.values;if(w.length!==K.length)throw new Ei(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${h.toString()}`);const L=[];for(let W=0;W<w.length;W+=2){if(w[W]!==K[W])throw new Ei(`Cannot interpolate values containing mismatched anchors. from[${W}]: ${w[W]}, to[${W}]: ${K[W]}`);L.push(w[W]);const[Z,ne]=w[W+1],[ce,be]=K[W+1];L.push([wi(Z,ce,v),wi(ne,be,v)])}return new Rs(L)}}class So{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new So({name:u,available:!1}):null}}class Ws{constructor(u,h,v){this.from=u,this.to=h,this.transition=v}static interpolate(u,h,v){return new Ws(u,h,v)}static parse(u){return u instanceof Ws?u:Array.isArray(u)&&u.length===3&&typeof u[0]=="string"&&typeof u[1]=="string"&&typeof u[2]=="number"?new Ws(u[0],u[1],u[2]):typeof u=="object"&&typeof u.from=="string"&&typeof u.to=="string"&&typeof u.transition=="number"?new Ws(u.from,u.to,u.transition):typeof u=="string"?new Ws(u,u,1):void 0}}function hu(f,u,h,v){return typeof f=="number"&&f>=0&&f<=255&&typeof u=="number"&&u>=0&&u<=255&&typeof h=="number"&&h>=0&&h<=255?v===void 0||typeof v=="number"&&v>=0&&v<=1?null:`Invalid rgba value [${[f,u,h,v].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof v=="number"?[f,u,h,v]:[f,u,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function zl(f){if(f===null||typeof f=="string"||typeof f=="boolean"||typeof f=="number"||f instanceof Ws||f instanceof Ai||f instanceof ca||f instanceof ls||f instanceof Fr||f instanceof Rs||f instanceof So)return!0;if(Array.isArray(f)){for(const u of f)if(!zl(u))return!1;return!0}if(typeof f=="object"){for(const u in f)if(!zl(f[u]))return!1;return!0}return!1}function rs(f){if(f===null)return Sr;if(typeof f=="string")return Nn;if(typeof f=="boolean")return Fn;if(typeof f=="number")return on;if(f instanceof Ai)return Or;if(f instanceof Ws)return Er;if(f instanceof ca)return co;if(f instanceof ls)return Sa;if(f instanceof Fr)return qi;if(f instanceof Rs)return oo;if(f instanceof So)return yi;if(Array.isArray(f)){const u=f.length;let h;for(const v of f){const w=rs(v);if(h){if(h===w)continue;h=ur;break}h=w}return Mo(h||ur,u)}return Dr}function Vs(f){const u=typeof f;return f===null?"":u==="string"||u==="number"||u==="boolean"?String(f):f instanceof Ai||f instanceof Ws||f instanceof ls||f instanceof Fr||f instanceof Rs||f instanceof So?f.toString():JSON.stringify(f)}class fo{constructor(u,h){this.type=u,this.value=h}static parse(u,h){if(u.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!zl(u[1]))return h.error("invalid value");const v=u[1];let w=rs(v);const K=h.expectedType;return w.kind!=="array"||w.N!==0||!K||K.kind!=="array"||typeof K.N=="number"&&K.N!==0||(w=K),new fo(w,v)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const ms={string:Nn,number:on,boolean:Fn,object:Dr};class Ms{constructor(u,h){this.type=u,this.args=h}static parse(u,h){if(u.length<2)return h.error("Expected at least one argument.");let v,w=1;const K=u[0];if(K==="array"){let W,Z;if(u.length>2){const ne=u[1];if(typeof ne!="string"||!(ne in ms)||ne==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);W=ms[ne],w++}else W=ur;if(u.length>3){if(u[2]!==null&&(typeof u[2]!="number"||u[2]<0||u[2]!==Math.floor(u[2])))return h.error('The length argument to "array" must be a positive integer literal',2);Z=u[2],w++}v=Mo(W,Z)}else{if(!ms[K])throw new Error(`Types doesn't contain name = ${K}`);v=ms[K]}const L=[];for(;w<u.length;w++){const W=h.parse(u[w],w,ur);if(!W)return null;L.push(W)}return new Ms(v,L)}evaluate(u){for(let h=0;h<this.args.length;h++){const v=this.args[h].evaluate(u);if(!Ea(this.type,rs(v)))return v;if(h===this.args.length-1)throw new Ei(`Expected value to be of type ${Ti(this.type)}, but found ${Ti(rs(v))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}const el={"to-boolean":Fn,"to-color":Or,"to-number":on,"to-string":Nn};class Ds{constructor(u,h){this.type=u,this.args=h}static parse(u,h){if(u.length<2)return h.error("Expected at least one argument.");const v=u[0];if(!el[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 h.error("Expected one argument.");const w=el[v],K=[];for(let L=1;L<u.length;L++){const W=h.parse(u[L],L,ur);if(!W)return null;K.push(W)}return new Ds(w,K)}evaluate(u){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(u);case"color":{let h,v;for(const w of this.args){if(h=w.evaluate(u),v=null,h instanceof Ai)return h;if(typeof h=="string"){const K=u.parseColor(h);if(K)return K}else if(Array.isArray(h)&&(v=h.length<3||h.length>4?`Invalid rgba value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:hu(h[0],h[1],h[2],h[3]),!v))return new Ai(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new Ei(v||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const v of this.args){h=v.evaluate(u);const w=Fr.parse(h);if(w)return w}throw new Ei(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const v of this.args){h=v.evaluate(u);const w=Rs.parse(h);if(w)return w}throw new Ei(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const v of this.args){if(h=v.evaluate(u),h===null)return 0;const w=Number(h);if(!isNaN(w))return w}throw new Ei(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return ls.fromString(Vs(this.args[0].evaluate(u)));case"resolvedImage":return So.fromString(Vs(this.args[0].evaluate(u)));case"projectionDefinition":return this.args[0].evaluate(u);default:return Vs(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}const El=["Unknown","Point","LineString","Polygon"];class oA{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"?El[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 h=this._parseColorCache[u];return h||(h=this._parseColorCache[u]=Ai.parse(u)),h}}class Vi{constructor(u,h,v=[],w,K=new fr,L=[]){this.registry=u,this.path=v,this.key=v.map(W=>`[${W}]`).join(""),this.scope=K,this.errors=L,this.expectedType=w,this._isConstant=h}parse(u,h,v,w,K={}){return h?this.concat(h,v,w)._parse(u,K):this._parse(u,K)}_parse(u,h){function v(w,K,L){return L==="assert"?new Ms(K,[w]):L==="coerce"?new Ds(K,[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 K=this.registry[w];if(K){let L=K.parse(u,this);if(!L)return null;if(this.expectedType){const W=this.expectedType,Z=L.type;if(W.kind!=="string"&&W.kind!=="number"&&W.kind!=="boolean"&&W.kind!=="object"&&W.kind!=="array"||Z.kind!=="value")if(W.kind!=="projectionDefinition"||Z.kind!=="string"&&Z.kind!=="array")if(W.kind!=="color"&&W.kind!=="formatted"&&W.kind!=="resolvedImage"||Z.kind!=="value"&&Z.kind!=="string")if(W.kind!=="padding"||Z.kind!=="value"&&Z.kind!=="number"&&Z.kind!=="array")if(W.kind!=="variableAnchorOffsetCollection"||Z.kind!=="value"&&Z.kind!=="array"){if(this.checkSubtype(W,Z))return null}else L=v(L,W,h.typeAnnotation||"coerce");else L=v(L,W,h.typeAnnotation||"coerce");else L=v(L,W,h.typeAnnotation||"coerce");else L=v(L,W,h.typeAnnotation||"coerce");else L=v(L,W,h.typeAnnotation||"assert")}if(!(L instanceof fo)&&L.type.kind!=="resolvedImage"&&this._isConstant(L)){const W=new oA;try{L=new fo(L.type,L.evaluate(W))}catch(Z){return this.error(Z.message),null}}return L}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,h,v){const w=typeof u=="number"?this.path.concat(u):this.path,K=v?this.scope.concat(v):this.scope;return new Vi(this.registry,this._isConstant,w,h||null,K,this.errors)}error(u,...h){const v=`${this.key}${h.map(w=>`[${w}]`).join("")}`;this.errors.push(new Bn(v,u))}checkSubtype(u,h){const v=Ea(u,h);return v&&this.error(v),v}}class nu{constructor(u,h){this.type=h.type,this.bindings=[].concat(u),this.result=h}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const h of this.bindings)u(h[1]);u(this.result)}static parse(u,h){if(u.length<4)return h.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const v=[];for(let K=1;K<u.length-1;K+=2){const L=u[K];if(typeof L!="string")return h.error(`Expected string, but found ${typeof L} instead.`,K);if(/[^a-zA-Z0-9_]/.test(L))return h.error("Variable names must contain only alphanumeric characters or '_'.",K);const W=h.parse(u[K+1],K+1);if(!W)return null;v.push([L,W])}const w=h.parse(u[u.length-1],u.length-1,h.expectedType,v);return w?new nu(v,w):null}outputDefined(){return this.result.outputDefined()}}class Ui{constructor(u,h){this.type=h.type,this.name=u,this.boundExpression=h}static parse(u,h){if(u.length!==2||typeof u[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const v=u[1];return h.scope.has(v)?new Ui(v,h.scope.get(v)):h.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 Jr{constructor(u,h,v){this.type=u,this.index=h,this.input=v}static parse(u,h){if(u.length!==3)return h.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const v=h.parse(u[1],1,on),w=h.parse(u[2],2,Mo(h.expectedType||ur));return v&&w?new Jr(w.type.itemType,v,w):null}evaluate(u){const h=this.index.evaluate(u),v=this.input.evaluate(u);if(h<0)throw new Ei(`Array index out of bounds: ${h} < 0.`);if(h>=v.length)throw new Ei(`Array index out of bounds: ${h} > ${v.length-1}.`);if(h!==Math.floor(h))throw new Ei(`Array index must be an integer, but found ${h} instead.`);return v[h]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class ru{constructor(u,h){this.type=Fn,this.needle=u,this.haystack=h}static parse(u,h){if(u.length!==3)return h.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const v=h.parse(u[1],1,ur),w=h.parse(u[2],2,ur);return v&&w?ns(v.type,[Fn,Nn,on,Sr,ur])?new ru(v,w):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(v.type)} instead`):null}evaluate(u){const h=this.needle.evaluate(u),v=this.haystack.evaluate(u);if(!v)return!1;if(!Aa(h,["boolean","string","number","null"]))throw new Ei(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(rs(h))} instead.`);if(!Aa(v,["string","array"]))throw new Ei(`Expected second argument to be of type array or string, but found ${Ti(rs(v))} instead.`);return v.indexOf(h)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class Ni{constructor(u,h,v){this.type=on,this.needle=u,this.haystack=h,this.fromIndex=v}static parse(u,h){if(u.length<=2||u.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const v=h.parse(u[1],1,ur),w=h.parse(u[2],2,ur);if(!v||!w)return null;if(!ns(v.type,[Fn,Nn,on,Sr,ur]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(v.type)} instead`);if(u.length===4){const K=h.parse(u[3],3,on);return K?new Ni(v,w,K):null}return new Ni(v,w)}evaluate(u){const h=this.needle.evaluate(u),v=this.haystack.evaluate(u);if(!Aa(h,["boolean","string","number","null"]))throw new Ei(`Expected first argument to be of type boolean, string, number or null, but found ${Ti(rs(h))} instead.`);let w;if(this.fromIndex&&(w=this.fromIndex.evaluate(u)),Aa(v,["string"])){const K=v.indexOf(h,w);return K===-1?-1:[...v.slice(0,K)].length}if(Aa(v,["array"]))return v.indexOf(h,w);throw new Ei(`Expected second argument to be of type array or string, but found ${Ti(rs(v))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class lo{constructor(u,h,v,w,K,L){this.inputType=u,this.type=h,this.input=v,this.cases=w,this.outputs=K,this.otherwise=L}static parse(u,h){if(u.length<5)return h.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return h.error("Expected an even number of arguments.");let v,w;h.expectedType&&h.expectedType.kind!=="value"&&(w=h.expectedType);const K={},L=[];for(let ne=2;ne<u.length-1;ne+=2){let ce=u[ne];const be=u[ne+1];Array.isArray(ce)||(ce=[ce]);const Ke=h.concat(ne);if(ce.length===0)return Ke.error("Expected at least one branch label.");for(const Ne of ce){if(typeof Ne!="number"&&typeof Ne!="string")return Ke.error("Branch labels must be numbers or strings.");if(typeof Ne=="number"&&Math.abs(Ne)>Number.MAX_SAFE_INTEGER)return Ke.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ne=="number"&&Math.floor(Ne)!==Ne)return Ke.error("Numeric branch labels must be integer values.");if(v){if(Ke.checkSubtype(v,rs(Ne)))return null}else v=rs(Ne);if(K[String(Ne)]!==void 0)return Ke.error("Branch labels must be unique.");K[String(Ne)]=L.length}const Ue=h.parse(be,ne,w);if(!Ue)return null;w=w||Ue.type,L.push(Ue)}const W=h.parse(u[1],1,ur);if(!W)return null;const Z=h.parse(u[u.length-1],u.length-1,w);return Z?W.type.kind!=="value"&&h.concat(1).checkSubtype(v,W.type)?null:new lo(v,w,W,K,L,Z):null}evaluate(u){const h=this.input.evaluate(u);return(rs(h)===this.inputType&&this.outputs[this.cases[h]]||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 Ri{constructor(u,h,v){this.type=u,this.branches=h,this.otherwise=v}static parse(u,h){if(u.length<4)return h.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return h.error("Expected an odd number of arguments.");let v;h.expectedType&&h.expectedType.kind!=="value"&&(v=h.expectedType);const w=[];for(let L=1;L<u.length-1;L+=2){const W=h.parse(u[L],L,Fn);if(!W)return null;const Z=h.parse(u[L+1],L+1,v);if(!Z)return null;w.push([W,Z]),v=v||Z.type}const K=h.parse(u[u.length-1],u.length-1,v);if(!K)return null;if(!v)throw new Error("Can't infer output type");return new Ri(v,w,K)}evaluate(u){for(const[h,v]of this.branches)if(h.evaluate(u))return v.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[h,v]of this.branches)u(h),u(v);u(this.otherwise)}outputDefined(){return this.branches.every(([u,h])=>h.outputDefined())&&this.otherwise.outputDefined()}}class J{constructor(u,h,v,w){this.type=u,this.input=h,this.beginIndex=v,this.endIndex=w}static parse(u,h){if(u.length<=2||u.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const v=h.parse(u[1],1,ur),w=h.parse(u[2],2,on);if(!v||!w)return null;if(!ns(v.type,[Mo(ur),Nn,ur]))return h.error(`Expected first argument to be of type array or string, but found ${Ti(v.type)} instead`);if(u.length===4){const K=h.parse(u[3],3,on);return K?new J(v.type,v,w,K):null}return new J(v.type,v,w)}evaluate(u){const h=this.input.evaluate(u),v=this.beginIndex.evaluate(u);let w;if(this.endIndex&&(w=this.endIndex.evaluate(u)),Aa(h,["string"]))return[...h].slice(v,w).join("");if(Aa(h,["array"]))return h.slice(v,w);throw new Ei(`Expected first argument to be of type array or string, but found ${Ti(rs(h))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function Oe(f,u){const h=f.length-1;let v,w,K=0,L=h,W=0;for(;K<=L;)if(W=Math.floor((K+L)/2),v=f[W],w=f[W+1],v<=u){if(W===h||u<w)return W;K=W+1}else{if(!(v>u))throw new Ei("Input is not a number.");L=W-1}return 0}class ot{constructor(u,h,v){this.type=u,this.input=h,this.labels=[],this.outputs=[];for(const[w,K]of v)this.labels.push(w),this.outputs.push(K)}static parse(u,h){if(u.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return h.error("Expected an even number of arguments.");const v=h.parse(u[1],1,on);if(!v)return null;const w=[];let K=null;h.expectedType&&h.expectedType.kind!=="value"&&(K=h.expectedType);for(let L=1;L<u.length;L+=2){const W=L===1?-1/0:u[L],Z=u[L+1],ne=L,ce=L+1;if(typeof W!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ne);if(w.length&&w[w.length-1][0]>=W)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ne);const be=h.parse(Z,ce,K);if(!be)return null;K=K||be.type,w.push([W,be])}return new ot(K,v,w)}evaluate(u){const h=this.labels,v=this.outputs;if(h.length===1)return v[0].evaluate(u);const w=this.input.evaluate(u);if(w<=h[0])return v[0].evaluate(u);const K=h.length;return w>=h[K-1]?v[K-1].evaluate(u):v[Oe(h,w)].evaluate(u)}eachChild(u){u(this.input);for(const h of this.outputs)u(h)}outputDefined(){return this.outputs.every(u=>u.outputDefined())}}function Vt(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var Ir,Yn,si=function(){if(Yn)return Ir;function f(u,h,v,w){this.cx=3*u,this.bx=3*(v-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*h,this.by=3*(w-h)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=h,this.p2x=v,this.p2y=w}return Yn=1,Ir=f,f.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,h){if(h===void 0&&(h=1e-6),u<0)return 0;if(u>1)return 1;for(var v=u,w=0;w<8;w++){var K=this.sampleCurveX(v)-u;if(Math.abs(K)<h)return v;var L=this.sampleCurveDerivativeX(v);if(Math.abs(L)<1e-6)break;v-=K/L}var W=0,Z=1;for(v=u,w=0;w<20&&(K=this.sampleCurveX(v),!(Math.abs(K-u)<h));w++)u>K?W=v:Z=v,v=.5*(Z-W)+W;return v},solve:function(u,h){return this.sampleCurveY(this.solveCurveX(u,h))}},Ir}(),ci=Vt(si);class vr{constructor(u,h,v,w,K){this.type=u,this.operator=h,this.interpolation=v,this.input=w,this.labels=[],this.outputs=[];for(const[L,W]of K)this.labels.push(L),this.outputs.push(W)}static interpolationFactor(u,h,v,w){let K=0;if(u.name==="exponential")K=kr(h,u.base,v,w);else if(u.name==="linear")K=kr(h,1,v,w);else if(u.name==="cubic-bezier"){const L=u.controlPoints;K=new ci(L[0],L[1],L[2],L[3]).solve(kr(h,1,v,w))}return K}static parse(u,h){let[v,w,K,...L]=u;if(!Array.isArray(w)||w.length===0)return h.error("Expected an interpolation type expression.",1);if(w[0]==="linear")w={name:"linear"};else if(w[0]==="exponential"){const ne=w[1];if(typeof ne!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);w={name:"exponential",base:ne}}else{if(w[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(w[0])}`,1,0);{const ne=w.slice(1);if(ne.length!==4||ne.some(ce=>typeof ce!="number"||ce<0||ce>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);w={name:"cubic-bezier",controlPoints:ne}}}if(u.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(K=h.parse(K,2,on),!K)return null;const W=[];let Z=null;v==="interpolate-hcl"||v==="interpolate-lab"?Z=Or:h.expectedType&&h.expectedType.kind!=="value"&&(Z=h.expectedType);for(let ne=0;ne<L.length;ne+=2){const ce=L[ne],be=L[ne+1],Ke=ne+3,Ue=ne+4;if(typeof ce!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ke);if(W.length&&W[W.length-1][0]>=ce)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Ke);const Ne=h.parse(be,Ue,Z);if(!Ne)return null;Z=Z||Ne.type,W.push([ce,Ne])}return Al(Z,on)||Al(Z,Er)||Al(Z,Or)||Al(Z,qi)||Al(Z,oo)||Al(Z,Mo(on))?new vr(Z,v,w,K,W):h.error(`Type ${Ti(Z)} is not interpolatable.`)}evaluate(u){const h=this.labels,v=this.outputs;if(h.length===1)return v[0].evaluate(u);const w=this.input.evaluate(u);if(w<=h[0])return v[0].evaluate(u);const K=h.length;if(w>=h[K-1])return v[K-1].evaluate(u);const L=Oe(h,w),W=vr.interpolationFactor(this.interpolation,w,h[L],h[L+1]),Z=v[L].evaluate(u),ne=v[L+1].evaluate(u);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return wi(Z,ne,W);case"color":return Ai.interpolate(Z,ne,W);case"padding":return Fr.interpolate(Z,ne,W);case"variableAnchorOffsetCollection":return Rs.interpolate(Z,ne,W);case"array":return Xa(Z,ne,W);case"projectionDefinition":return Ws.interpolate(Z,ne,W)}case"interpolate-hcl":return Ai.interpolate(Z,ne,W,"hcl");case"interpolate-lab":return Ai.interpolate(Z,ne,W,"lab")}}eachChild(u){u(this.input);for(const h of this.outputs)u(h)}outputDefined(){return this.outputs.every(u=>u.outputDefined())}}function kr(f,u,h,v){const w=v-h,K=f-h;return w===0?0:u===1?K/w:(Math.pow(u,K)-1)/(Math.pow(u,w)-1)}const vi={color:Ai.interpolate,number:wi,padding:Fr.interpolate,variableAnchorOffsetCollection:Rs.interpolate,array:Xa};class Eo{constructor(u,h){this.type=u,this.args=h}static parse(u,h){if(u.length<2)return h.error("Expected at least one argument.");let v=null;const w=h.expectedType;w&&w.kind!=="value"&&(v=w);const K=[];for(const W of u.slice(1)){const Z=h.parse(W,1+K.length,v,void 0,{typeAnnotation:"omit"});if(!Z)return null;v=v||Z.type,K.push(Z)}if(!v)throw new Error("No output type");const L=w&&K.some(W=>Ea(w,W.type));return new Eo(L?ur:v,K)}evaluate(u){let h,v=null,w=0;for(const K of this.args)if(w++,v=K.evaluate(u),v&&v instanceof So&&!v.available&&(h||(h=v.name),v=null,w===this.args.length&&(v=h)),v!==null)break;return v}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every(u=>u.outputDefined())}}function ki(f,u){return f==="=="||f==="!="?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 qr(f,u,h,v){return v.compare(u,h)===0}function Hi(f,u,h){const v=f!=="=="&&f!=="!=";return class lU{constructor(K,L,W){this.type=Fn,this.lhs=K,this.rhs=L,this.collator=W,this.hasUntypedArgument=K.type.kind==="value"||L.type.kind==="value"}static parse(K,L){if(K.length!==3&&K.length!==4)return L.error("Expected two or three arguments.");const W=K[0];let Z=L.parse(K[1],1,ur);if(!Z)return null;if(!ki(W,Z.type))return L.concat(1).error(`"${W}" comparisons are not supported for type '${Ti(Z.type)}'.`);let ne=L.parse(K[2],2,ur);if(!ne)return null;if(!ki(W,ne.type))return L.concat(2).error(`"${W}" comparisons are not supported for type '${Ti(ne.type)}'.`);if(Z.type.kind!==ne.type.kind&&Z.type.kind!=="value"&&ne.type.kind!=="value")return L.error(`Cannot compare types '${Ti(Z.type)}' and '${Ti(ne.type)}'.`);v&&(Z.type.kind==="value"&&ne.type.kind!=="value"?Z=new Ms(ne.type,[Z]):Z.type.kind!=="value"&&ne.type.kind==="value"&&(ne=new Ms(Z.type,[ne])));let ce=null;if(K.length===4){if(Z.type.kind!=="string"&&ne.type.kind!=="string"&&Z.type.kind!=="value"&&ne.type.kind!=="value")return L.error("Cannot use collator to compare non-string types.");if(ce=L.parse(K[3],3,co),!ce)return null}return new lU(Z,ne,ce)}evaluate(K){const L=this.lhs.evaluate(K),W=this.rhs.evaluate(K);if(v&&this.hasUntypedArgument){const Z=rs(L),ne=rs(W);if(Z.kind!==ne.kind||Z.kind!=="string"&&Z.kind!=="number")throw new Ei(`Expected arguments for "${f}" to be (string, string) or (number, number), but found (${Z.kind}, ${ne.kind}) instead.`)}if(this.collator&&!v&&this.hasUntypedArgument){const Z=rs(L),ne=rs(W);if(Z.kind!=="string"||ne.kind!=="string")return u(K,L,W)}return this.collator?h(K,L,W,this.collator.evaluate(K)):u(K,L,W)}eachChild(K){K(this.lhs),K(this.rhs),this.collator&&K(this.collator)}outputDefined(){return!0}}}const Zi=Hi("==",function(f,u,h){return u===h},qr),us=Hi("!=",function(f,u,h){return u!==h},function(f,u,h,v){return!qr(0,u,h,v)}),ya=Hi("<",function(f,u,h){return u<h},function(f,u,h,v){return v.compare(u,h)<0}),Ua=Hi(">",function(f,u,h){return u>h},function(f,u,h,v){return v.compare(u,h)>0}),fu=Hi("<=",function(f,u,h){return u<=h},function(f,u,h,v){return v.compare(u,h)<=0}),Hs=Hi(">=",function(f,u,h){return u>=h},function(f,u,h,v){return v.compare(u,h)>=0});class dc{constructor(u,h,v){this.type=co,this.locale=v,this.caseSensitive=u,this.diacriticSensitive=h}static parse(u,h){if(u.length!==2)return h.error("Expected one argument.");const v=u[1];if(typeof v!="object"||Array.isArray(v))return h.error("Collator options argument must be an object.");const w=h.parse(v["case-sensitive"]!==void 0&&v["case-sensitive"],1,Fn);if(!w)return null;const K=h.parse(v["diacritic-sensitive"]!==void 0&&v["diacritic-sensitive"],1,Fn);if(!K)return null;let L=null;return v.locale&&(L=h.parse(v.locale,1,Nn),!L)?null:new dc(w,K,L)}evaluate(u){return new ca(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 Ba{constructor(u,h,v,w,K){this.type=Nn,this.number=u,this.locale=h,this.currency=v,this.minFractionDigits=w,this.maxFractionDigits=K}static parse(u,h){if(u.length!==3)return h.error("Expected two arguments.");const v=h.parse(u[1],1,on);if(!v)return null;const w=u[2];if(typeof w!="object"||Array.isArray(w))return h.error("NumberFormat options argument must be an object.");let K=null;if(w.locale&&(K=h.parse(w.locale,1,Nn),!K))return null;let L=null;if(w.currency&&(L=h.parse(w.currency,1,Nn),!L))return null;let W=null;if(w["min-fraction-digits"]&&(W=h.parse(w["min-fraction-digits"],1,on),!W))return null;let Z=null;return w["max-fraction-digits"]&&(Z=h.parse(w["max-fraction-digits"],1,on),!Z)?null:new Ba(v,K,L,W,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 cl{constructor(u){this.type=Sa,this.sections=u}static parse(u,h){if(u.length<2)return h.error("Expected at least one argument.");const v=u[1];if(!Array.isArray(v)&&typeof v=="object")return h.error("First argument must be an image or text section.");const w=[];let K=!1;for(let L=1;L<=u.length-1;++L){const W=u[L];if(K&&typeof W=="object"&&!Array.isArray(W)){K=!1;let Z=null;if(W["font-scale"]&&(Z=h.parse(W["font-scale"],1,on),!Z))return null;let ne=null;if(W["text-font"]&&(ne=h.parse(W["text-font"],1,Mo(Nn)),!ne))return null;let ce=null;if(W["text-color"]&&(ce=h.parse(W["text-color"],1,Or),!ce))return null;const be=w[w.length-1];be.scale=Z,be.font=ne,be.textColor=ce}else{const Z=h.parse(u[L],1,ur);if(!Z)return null;const ne=Z.type.kind;if(ne!=="string"&&ne!=="value"&&ne!=="null"&&ne!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");K=!0,w.push({content:Z,scale:null,font:null,textColor:null})}}return new cl(w)}evaluate(u){return new ls(this.sections.map(h=>{const v=h.content.evaluate(u);return rs(v)===yi?new iA("",v,null,null,null):new iA(Vs(v),null,h.scale?h.scale.evaluate(u):null,h.font?h.font.evaluate(u).join(","):null,h.textColor?h.textColor.evaluate(u):null)}))}eachChild(u){for(const h of this.sections)u(h.content),h.scale&&u(h.scale),h.font&&u(h.font),h.textColor&&u(h.textColor)}outputDefined(){return!1}}class ld{constructor(u){this.type=yi,this.input=u}static parse(u,h){if(u.length!==2)return h.error("Expected two arguments.");const v=h.parse(u[1],1,Nn);return v?new ld(v):h.error("No image name provided.")}evaluate(u){const h=this.input.evaluate(u),v=So.fromString(h);return v&&u.availableImages&&(v.available=u.availableImages.indexOf(h)>-1),v}eachChild(u){u(this.input)}outputDefined(){return!1}}class Ru{constructor(u){this.type=on,this.input=u}static parse(u,h){if(u.length!==2)return h.error(`Expected 1 argument, but found ${u.length-1} instead.`);const v=h.parse(u[1],1);return v?v.type.kind!=="array"&&v.type.kind!=="string"&&v.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${Ti(v.type)} instead.`):new Ru(v):null}evaluate(u){const h=this.input.evaluate(u);if(typeof h=="string")return[...h].length;if(Array.isArray(h))return h.length;throw new Ei(`Expected value to be of type string or array, but found ${Ti(rs(h))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const Du=8192;function bh(f,u){const h=(180+f[0])/360,v=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f[1]*Math.PI/360)))/360,w=Math.pow(2,u.z);return[Math.round(h*w*Du),Math.round(v*w*Du)]}function Ss(f,u){const h=Math.pow(2,u.z);return[(w=(f[0]/Du+u.x)/h,360*w-180),(v=(f[1]/Du+u.y)/h,360/Math.PI*Math.atan(Math.exp((180-360*v)*Math.PI/180))-90)];var v,w}function Ku(f,u){f[0]=Math.min(f[0],u[0]),f[1]=Math.min(f[1],u[1]),f[2]=Math.max(f[2],u[0]),f[3]=Math.max(f[3],u[1])}function ud(f,u){return!(f[0]<=u[0]||f[2]>=u[2]||f[1]<=u[1]||f[3]>=u[3])}function gp(f,u,h){const v=f[0]-u[0],w=f[1]-u[1],K=f[0]-h[0],L=f[1]-h[1];return v*L-K*w==0&&v*K<=0&&w*L<=0}function sA(f,u,h,v){return(w=[v[0]-h[0],v[1]-h[1]])[0]*(K=[u[0]-f[0],u[1]-f[1]])[1]-w[1]*K[0]!=0&&!(!Zs(f,u,h,v)||!Zs(h,v,f,u));var w,K}function qd(f,u,h){for(const v of h)for(let w=0;w<v.length-1;++w)if(sA(f,u,v[w],v[w+1]))return!0;return!1}function Fc(f,u,h=!1){let v=!1;for(const W of u)for(let Z=0;Z<W.length-1;Z++){if(gp(f,W[Z],W[Z+1]))return h;(K=W[Z])[1]>(w=f)[1]!=(L=W[Z+1])[1]>w[1]&&w[0]<(L[0]-K[0])*(w[1]-K[1])/(L[1]-K[1])+K[0]&&(v=!v)}var w,K,L;return v}function yp(f,u){for(const h of u)if(Fc(f,h))return!0;return!1}function Pf(f,u){for(const h of f)if(!Fc(h,u))return!1;for(let h=0;h<f.length-1;++h)if(qd(f[h],f[h+1],u))return!1;return!0}function hc(f,u){for(const h of u)if(Pf(f,h))return!0;return!1}function Zs(f,u,h,v){const w=v[0]-h[0],K=v[1]-h[1],L=(f[0]-h[0])*K-w*(f[1]-h[1]),W=(u[0]-h[0])*K-w*(u[1]-h[1]);return L>0&&W<0||L<0&&W>0}function xh(f,u,h){const v=[];for(let w=0;w<f.length;w++){const K=[];for(let L=0;L<f[w].length;L++){const W=bh(f[w][L],h);Ku(u,W),K.push(W)}v.push(K)}return v}function Jh(f,u,h){const v=[];for(let w=0;w<f.length;w++){const K=xh(f[w],u,h);v.push(K)}return v}function Ad(f,u,h,v){if(f[0]<h[0]||f[0]>h[2]){const w=.5*v;let K=f[0]-h[0]>w?-v:h[0]-f[0]>w?v:0;K===0&&(K=f[0]-h[2]>w?-v:h[2]-f[0]>w?v:0),f[0]+=K}Ku(u,f)}function ef(f,u,h,v){const w=Math.pow(2,v.z)*Du,K=[v.x*Du,v.y*Du],L=[];for(const W of f)for(const Z of W){const ne=[Z.x+K[0],Z.y+K[1]];Ad(ne,u,h,w),L.push(ne)}return L}function cd(f,u,h,v){const w=Math.pow(2,v.z)*Du,K=[v.x*Du,v.y*Du],L=[];for(const Z of f){const ne=[];for(const ce of Z){const be=[ce.x+K[0],ce.y+K[1]];Ku(u,be),ne.push(be)}L.push(ne)}if(u[2]-u[0]<=w/2){(W=u)[0]=W[1]=1/0,W[2]=W[3]=-1/0;for(const Z of L)for(const ne of Z)Ad(ne,u,h,w)}var W;return L}class fc{constructor(u,h){this.type=Fn,this.geojson=u,this.geometries=h}static parse(u,h){if(u.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(zl(u[1])){const v=u[1];if(v.type==="FeatureCollection"){const w=[];for(const K of v.features){const{type:L,coordinates:W}=K.geometry;L==="Polygon"&&w.push(W),L==="MultiPolygon"&&w.push(...W)}if(w.length)return new fc(v,{type:"MultiPolygon",coordinates:w})}else if(v.type==="Feature"){const w=v.geometry.type;if(w==="Polygon"||w==="MultiPolygon")return new fc(v,v.geometry)}else if(v.type==="Polygon"||v.type==="MultiPolygon")return new fc(v,v)}return h.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(h,v){const w=[1/0,1/0,-1/0,-1/0],K=[1/0,1/0,-1/0,-1/0],L=h.canonicalID();if(v.type==="Polygon"){const W=xh(v.coordinates,K,L),Z=ef(h.geometry(),w,K,L);if(!ud(w,K))return!1;for(const ne of Z)if(!Fc(ne,W))return!1}if(v.type==="MultiPolygon"){const W=Jh(v.coordinates,K,L),Z=ef(h.geometry(),w,K,L);if(!ud(w,K))return!1;for(const ne of Z)if(!yp(ne,W))return!1}return!0}(u,this.geometries);if(u.geometryType()==="LineString")return function(h,v){const w=[1/0,1/0,-1/0,-1/0],K=[1/0,1/0,-1/0,-1/0],L=h.canonicalID();if(v.type==="Polygon"){const W=xh(v.coordinates,K,L),Z=cd(h.geometry(),w,K,L);if(!ud(w,K))return!1;for(const ne of Z)if(!Pf(ne,W))return!1}if(v.type==="MultiPolygon"){const W=Jh(v.coordinates,K,L),Z=cd(h.geometry(),w,K,L);if(!ud(w,K))return!1;for(const ne of Z)if(!hc(ne,W))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let wh=class{constructor(f=[],u=(h,v)=>h<v?-1:h>v?1:0){if(this.data=f,this.length=this.data.length,this.compare=u,this.length>0)for(let h=(this.length>>1)-1;h>=0;h--)this._down(h)}push(f){this.data.push(f),this._up(this.length++)}pop(){if(this.length===0)return;const f=this.data[0],u=this.data.pop();return--this.length>0&&(this.data[0]=u,this._down(0)),f}peek(){return this.data[0]}_up(f){const{data:u,compare:h}=this,v=u[f];for(;f>0;){const w=f-1>>1,K=u[w];if(h(v,K)>=0)break;u[f]=K,f=w}u[f]=v}_down(f){const{data:u,compare:h}=this,v=this.length>>1,w=u[f];for(;f<v;){let K=1+(f<<1);const L=K+1;if(L<this.length&&h(u[L],u[K])<0&&(K=L),h(u[K],w)>=0)break;u[f]=u[K],f=K}u[f]=w}};function Mh(f,u,h=0,v=f.length-1,w=am){for(;v>h;){if(v-h>600){const Z=v-h+1,ne=u-h+1,ce=Math.log(Z),be=.5*Math.exp(2*ce/3),Ke=.5*Math.sqrt(ce*be*(Z-be)/Z)*(ne-Z/2<0?-1:1);Mh(f,u,Math.max(h,Math.floor(u-ne*be/Z+Ke)),Math.min(v,Math.floor(u+(Z-ne)*be/Z+Ke)),w)}const K=f[u];let L=h,W=v;for(dd(f,h,u),w(f[v],K)>0&&dd(f,h,v);L<W;){for(dd(f,L,W),L++,W--;w(f[L],K)<0;)L++;for(;w(f[W],K)>0;)W--}w(f[h],K)===0?dd(f,h,W):(W++,dd(f,W,v)),W<=u&&(h=W+1),u<=W&&(v=W-1)}}function dd(f,u,h){const v=f[u];f[u]=f[h],f[h]=v}function am(f,u){return f<u?-1:f>u?1:0}function Lc(f,u){if(f.length<=1)return[f];const h=[];let v,w;for(const K of f){const L=Sh(K);L!==0&&(K.area=Math.abs(L),w===void 0&&(w=L<0),w===L<0?(v&&h.push(v),v=[K]):v.push(K))}if(v&&h.push(v),u>1)for(let K=0;K<h.length;K++)h[K].length<=u||(Mh(h[K],u,1,h[K].length-1,pu),h[K]=h[K].slice(0,u));return h}function pu(f,u){return u.area-f.area}function Sh(f){let u=0;for(let h,v,w=0,K=f.length,L=K-1;w<K;L=w++)h=f[w],v=f[L],u+=(v.x-h.x)*(h.y+v.y);return u}const mu=1/298.257223563,aA=mu*(2-mu),Uc=Math.PI/180;class Yd{constructor(u){const h=6378.137*Uc*1e3,v=Math.cos(u*Uc),w=1/(1-aA*(1-v*v)),K=Math.sqrt(w);this.kx=h*K*v,this.ky=h*K*w*(1-aA)}distance(u,h){const v=this.wrap(u[0]-h[0])*this.kx,w=(u[1]-h[1])*this.ky;return Math.sqrt(v*v+w*w)}pointOnLine(u,h){let v,w,K,L,W=1/0;for(let Z=0;Z<u.length-1;Z++){let ne=u[Z][0],ce=u[Z][1],be=this.wrap(u[Z+1][0]-ne)*this.kx,Ke=(u[Z+1][1]-ce)*this.ky,Ue=0;be===0&&Ke===0||(Ue=(this.wrap(h[0]-ne)*this.kx*be+(h[1]-ce)*this.ky*Ke)/(be*be+Ke*Ke),Ue>1?(ne=u[Z+1][0],ce=u[Z+1][1]):Ue>0&&(ne+=be/this.kx*Ue,ce+=Ke/this.ky*Ue)),be=this.wrap(h[0]-ne)*this.kx,Ke=(h[1]-ce)*this.ky;const Ne=be*be+Ke*Ke;Ne<W&&(W=Ne,v=ne,w=ce,K=Z,L=Ue)}return{point:[v,w],index:K,t:Math.max(0,Math.min(1,L))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function tf(f,u){return u[0]-f[0]}function iu(f){return f[1]-f[0]+1}function Bl(f,u){return f[1]>=f[0]&&f[1]<u}function GA(f,u){if(f[0]>f[1])return[null,null];const h=iu(f);if(u){if(h===2)return[f,null];const w=Math.floor(h/2);return[[f[0],f[0]+w],[f[0]+w,f[1]]]}if(h===1)return[f,null];const v=Math.floor(h/2)-1;return[[f[0],f[0]+v],[f[0]+v+1,f[1]]]}function zc(f,u){if(!Bl(u,f.length))return[1/0,1/0,-1/0,-1/0];const h=[1/0,1/0,-1/0,-1/0];for(let v=u[0];v<=u[1];++v)Ku(h,f[v]);return h}function nf(f){const u=[1/0,1/0,-1/0,-1/0];for(const h of f)for(const v of h)Ku(u,v);return u}function Rf(f){return f[0]!==-1/0&&f[1]!==-1/0&&f[2]!==1/0&&f[3]!==1/0}function hd(f,u,h){if(!Rf(f)||!Rf(u))return NaN;let v=0,w=0;return f[2]<u[0]&&(v=u[0]-f[2]),f[0]>u[2]&&(v=f[0]-u[2]),f[1]>u[3]&&(w=f[1]-u[3]),f[3]<u[1]&&(w=u[1]-f[3]),h.distance([0,0],[v,w])}function CA(f,u,h){const v=h.pointOnLine(u,f);return h.distance(f,v.point)}function tl(f,u,h,v,w){const K=Math.min(CA(f,[h,v],w),CA(u,[h,v],w)),L=Math.min(CA(h,[f,u],w),CA(v,[f,u],w));return Math.min(K,L)}function Ol(f,u,h,v,w){if(!Bl(u,f.length)||!Bl(v,h.length))return 1/0;let K=1/0;for(let L=u[0];L<u[1];++L){const W=f[L],Z=f[L+1];for(let ne=v[0];ne<v[1];++ne){const ce=h[ne],be=h[ne+1];if(sA(W,Z,ce,be))return 0;K=Math.min(K,tl(W,Z,ce,be,w))}}return K}function $o(f,u,h,v,w){if(!Bl(u,f.length)||!Bl(v,h.length))return NaN;let K=1/0;for(let L=u[0];L<=u[1];++L)for(let W=v[0];W<=v[1];++W)if(K=Math.min(K,w.distance(f[L],h[W])),K===0)return K;return K}function Eh(f,u,h){if(Fc(f,u,!0))return 0;let v=1/0;for(const w of u){const K=w[0],L=w[w.length-1];if(K!==L&&(v=Math.min(v,CA(f,[L,K],h)),v===0))return v;const W=h.pointOnLine(w,f);if(v=Math.min(v,h.distance(f,W.point)),v===0)return v}return v}function lm(f,u,h,v){if(!Bl(u,f.length))return NaN;for(let K=u[0];K<=u[1];++K)if(Fc(f[K],h,!0))return 0;let w=1/0;for(let K=u[0];K<u[1];++K){const L=f[K],W=f[K+1];for(const Z of h)for(let ne=0,ce=Z.length,be=ce-1;ne<ce;be=ne++){const Ke=Z[be],Ue=Z[ne];if(sA(L,W,Ke,Ue))return 0;w=Math.min(w,tl(L,W,Ke,Ue,v))}}return w}function jc(f,u){for(const h of f)for(const v of h)if(Fc(v,u,!0))return!0;return!1}function Fu(f,u,h,v=1/0){const w=nf(f),K=nf(u);if(v!==1/0&&hd(w,K,h)>=v)return v;if(ud(w,K)){if(jc(f,u))return 0}else if(jc(u,f))return 0;let L=1/0;for(const W of f)for(let Z=0,ne=W.length,ce=ne-1;Z<ne;ce=Z++){const be=W[ce],Ke=W[Z];for(const Ue of u)for(let Ne=0,Xe=Ue.length,ut=Xe-1;Ne<Xe;ut=Ne++){const Ct=Ue[ut],Nt=Ue[Ne];if(sA(be,Ke,Ct,Nt))return 0;L=Math.min(L,tl(be,Ke,Ct,Nt,h))}}return L}function $d(f,u,h,v,w,K){if(!K)return;const L=hd(zc(v,K),w,h);L<u&&f.push([L,K,[0,0]])}function Vd(f,u,h,v,w,K,L){if(!K||!L)return;const W=hd(zc(v,K),zc(w,L),h);W<u&&f.push([W,K,L])}function pc(f,u,h,v,w=1/0){let K=Math.min(v.distance(f[0],h[0][0]),w);if(K===0)return K;const L=new wh([[0,[0,f.length-1],[0,0]]],tf),W=nf(h);for(;L.length>0;){const Z=L.pop();if(Z[0]>=K)continue;const ne=Z[1],ce=u?50:100;if(iu(ne)<=ce){if(!Bl(ne,f.length))return NaN;if(u){const be=lm(f,ne,h,v);if(isNaN(be)||be===0)return be;K=Math.min(K,be)}else for(let be=ne[0];be<=ne[1];++be){const Ke=Eh(f[be],h,v);if(K=Math.min(K,Ke),K===0)return 0}}else{const be=GA(ne,u);$d(L,K,v,f,W,be[0]),$d(L,K,v,f,W,be[1])}}return K}function Hd(f,u,h,v,w,K=1/0){let L=Math.min(K,w.distance(f[0],h[0]));if(L===0)return L;const W=new wh([[0,[0,f.length-1],[0,h.length-1]]],tf);for(;W.length>0;){const Z=W.pop();if(Z[0]>=L)continue;const ne=Z[1],ce=Z[2],be=u?50:100,Ke=v?50:100;if(iu(ne)<=be&&iu(ce)<=Ke){if(!Bl(ne,f.length)&&Bl(ce,h.length))return NaN;let Ue;if(u&&v)Ue=Ol(f,ne,h,ce,w),L=Math.min(L,Ue);else if(u&&!v){const Ne=f.slice(ne[0],ne[1]+1);for(let Xe=ce[0];Xe<=ce[1];++Xe)if(Ue=CA(h[Xe],Ne,w),L=Math.min(L,Ue),L===0)return L}else if(!u&&v){const Ne=h.slice(ce[0],ce[1]+1);for(let Xe=ne[0];Xe<=ne[1];++Xe)if(Ue=CA(f[Xe],Ne,w),L=Math.min(L,Ue),L===0)return L}else Ue=$o(f,ne,h,ce,w),L=Math.min(L,Ue)}else{const Ue=GA(ne,u),Ne=GA(ce,v);Vd(W,L,w,f,h,Ue[0],Ne[0]),Vd(W,L,w,f,h,Ue[0],Ne[1]),Vd(W,L,w,f,h,Ue[1],Ne[0]),Vd(W,L,w,f,h,Ue[1],Ne[1])}}return L}function rf(f){return f.type==="MultiPolygon"?f.coordinates.map(u=>({type:"Polygon",coordinates:u})):f.type==="MultiLineString"?f.coordinates.map(u=>({type:"LineString",coordinates:u})):f.type==="MultiPoint"?f.coordinates.map(u=>({type:"Point",coordinates:u})):[f]}class mc{constructor(u,h){this.type=on,this.geojson=u,this.geometries=h}static parse(u,h){if(u.length!==2)return h.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(zl(u[1])){const v=u[1];if(v.type==="FeatureCollection")return new mc(v,v.features.map(w=>rf(w.geometry)).flat());if(v.type==="Feature")return new mc(v,rf(v.geometry));if("type"in v&&"coordinates"in v)return new mc(v,rf(v))}return h.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(h,v){const w=h.geometry(),K=w.flat().map(Z=>Ss([Z.x,Z.y],h.canonical));if(w.length===0)return NaN;const L=new Yd(K[0][1]);let W=1/0;for(const Z of v){switch(Z.type){case"Point":W=Math.min(W,Hd(K,!1,[Z.coordinates],!1,L,W));break;case"LineString":W=Math.min(W,Hd(K,!1,Z.coordinates,!0,L,W));break;case"Polygon":W=Math.min(W,pc(K,!1,Z.coordinates,L,W))}if(W===0)return W}return W}(u,this.geometries);if(u.geometryType()==="LineString")return function(h,v){const w=h.geometry(),K=w.flat().map(Z=>Ss([Z.x,Z.y],h.canonical));if(w.length===0)return NaN;const L=new Yd(K[0][1]);let W=1/0;for(const Z of v){switch(Z.type){case"Point":W=Math.min(W,Hd(K,!0,[Z.coordinates],!1,L,W));break;case"LineString":W=Math.min(W,Hd(K,!0,Z.coordinates,!0,L,W));break;case"Polygon":W=Math.min(W,pc(K,!0,Z.coordinates,L,W))}if(W===0)return W}return W}(u,this.geometries);if(u.geometryType()==="Polygon")return function(h,v){const w=h.geometry();if(w.length===0||w[0].length===0)return NaN;const K=Lc(w,0).map(Z=>Z.map(ne=>ne.map(ce=>Ss([ce.x,ce.y],h.canonical)))),L=new Yd(K[0][0][0][1]);let W=1/0;for(const Z of v)for(const ne of K){switch(Z.type){case"Point":W=Math.min(W,pc([Z.coordinates],!1,ne,L,W));break;case"LineString":W=Math.min(W,pc(Z.coordinates,!0,ne,L,W));break;case"Polygon":W=Math.min(W,Fu(ne,Z.coordinates,L,W))}if(W===0)return W}return W}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const gu={"==":Zi,"!=":us,">":Ua,"<":ya,">=":Hs,"<=":fu,array:Ms,at:Jr,boolean:Ms,case:Ri,coalesce:Eo,collator:dc,format:cl,image:ld,in:ru,"index-of":Ni,interpolate:vr,"interpolate-hcl":vr,"interpolate-lab":vr,length:Ru,let:nu,literal:fo,match:lo,number:Ms,"number-format":Ba,object:Ms,slice:J,step:ot,string:Ms,"to-boolean":Ds,"to-color":Ds,"to-number":Ds,"to-string":Ds,var:Ui,within:fc,distance:mc};class Ht{constructor(u,h,v,w){this.name=u,this.type=h,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,h){const v=u[0],w=Ht.definitions[v];if(!w)return h.error(`Unknown expression "${v}". If you wanted a literal array, use ["literal", [...]].`,0);const K=Array.isArray(w)?w[0]:w.type,L=Array.isArray(w)?[[w[1],w[2]]]:w.overloads,W=L.filter(([ne])=>!Array.isArray(ne)||ne.length===u.length-1);let Z=null;for(const[ne,ce]of W){Z=new Vi(h.registry,_o,h.path,null,h.scope);const be=[];let Ke=!1;for(let Ue=1;Ue<u.length;Ue++){const Ne=u[Ue],Xe=Array.isArray(ne)?ne[Ue-1]:ne.type,ut=Z.parse(Ne,1+be.length,Xe);if(!ut){Ke=!0;break}be.push(ut)}if(!Ke)if(Array.isArray(ne)&&ne.length!==be.length)Z.error(`Expected ${ne.length} arguments, but found ${be.length} instead.`);else{for(let Ue=0;Ue<be.length;Ue++){const Ne=Array.isArray(ne)?ne[Ue]:ne.type,Xe=be[Ue];Z.concat(Ue+1).checkSubtype(Ne,Xe.type)}if(Z.errors.length===0)return new Ht(v,K,ce,be)}}if(W.length===1)h.errors.push(...Z.errors);else{const ne=(W.length?W:L).map(([be])=>{return Ke=be,Array.isArray(Ke)?`(${Ke.map(Ti).join(", ")})`:`(${Ti(Ke.type)}...)`;var Ke}).join(" | "),ce=[];for(let be=1;be<u.length;be++){const Ke=h.parse(u[be],1+ce.length);if(!Ke)return null;ce.push(Ti(Ke.type))}h.error(`Expected arguments of type ${ne}, but found (${ce.join(", ")}) instead.`)}return null}static register(u,h){Ht.definitions=h;for(const v in h)u[v]=Ht}}function Pn(f,[u,h,v,w]){u=u.evaluate(f),h=h.evaluate(f),v=v.evaluate(f);const K=w?w.evaluate(f):1,L=hu(u,h,v,K);if(L)throw new Ei(L);return new Ai(u/255,h/255,v/255,K,!1)}function an(f,u){return f in u}function Ur(f,u){const h=u[f];return h===void 0?null:h}function Ci(f){return{type:f}}function _o(f){if(f instanceof Ui)return _o(f.boundExpression);if(f instanceof Ht&&f.name==="error"||f instanceof dc||f instanceof fc||f instanceof mc)return!1;const u=f instanceof Ds||f instanceof Ms;let h=!0;return f.eachChild(v=>{h=u?h&&_o(v):h&&v instanceof fo}),!!h&&oa(f)&&QA(f,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function oa(f){if(f instanceof Ht&&(f.name==="get"&&f.args.length===1||f.name==="feature-state"||f.name==="has"&&f.args.length===1||f.name==="properties"||f.name==="geometry-type"||f.name==="id"||/^filter-/.test(f.name))||f instanceof fc||f instanceof mc)return!1;let u=!0;return f.eachChild(h=>{u&&!oa(h)&&(u=!1)}),u}function Vo(f){if(f instanceof Ht&&f.name==="feature-state")return!1;let u=!0;return f.eachChild(h=>{u&&!Vo(h)&&(u=!1)}),u}function QA(f,u){if(f instanceof Ht&&u.indexOf(f.name)>=0)return!1;let h=!0;return f.eachChild(v=>{h&&!QA(v,u)&&(h=!1)}),h}function vp(f){return{result:"success",value:f}}function Il(f){return{result:"error",value:f}}function yu(f){return f["property-type"]==="data-driven"||f["property-type"]==="cross-faded-data-driven"}function qA(f){return!!f.expression&&f.expression.parameters.indexOf("zoom")>-1}function kl(f){return!!f.expression&&f.expression.interpolated}function Wi(f){return f instanceof Number?"number":f instanceof String?"string":f instanceof Boolean?"boolean":Array.isArray(f)?"array":f===null?"null":typeof f}function YA(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)}function Uo(f){return f}function Nc(f,u){const h=u.type==="color",v=f.stops&&typeof f.stops[0][0]=="object",w=v||!(v||f.property!==void 0),K=f.type||(kl(u)?"exponential":"interval");if(h||u.type==="padding"){const ce=h?Ai.parse:Fr.parse;(f=Rn({},f)).stops&&(f.stops=f.stops.map(be=>[be[0],ce(be[1])])),f.default=ce(f.default?f.default:u.default)}if(f.colorSpace&&(L=f.colorSpace)!=="rgb"&&L!=="hcl"&&L!=="lab")throw new Error(`Unknown color space: "${f.colorSpace}"`);var L;let W,Z,ne;if(K==="exponential")W=Tl;else if(K==="interval")W=lA;else if(K==="categorical"){W=_A,Z=Object.create(null);for(const ce of f.stops)Z[ce[0]]=ce[1];ne=typeof f.stops[0][0]}else{if(K!=="identity")throw new Error(`Unknown function type "${K}"`);W=gc}if(v){const ce={},be=[];for(let Ne=0;Ne<f.stops.length;Ne++){const Xe=f.stops[Ne],ut=Xe[0].zoom;ce[ut]===void 0&&(ce[ut]={zoom:ut,type:f.type,property:f.property,default:f.default,stops:[]},be.push(ut)),ce[ut].stops.push([Xe[0].value,Xe[1]])}const Ke=[];for(const Ne of be)Ke.push([ce[Ne].zoom,Nc(ce[Ne],u)]);const Ue={name:"linear"};return{kind:"composite",interpolationType:Ue,interpolationFactor:vr.interpolationFactor.bind(void 0,Ue),zoomStops:Ke.map(Ne=>Ne[0]),evaluate:({zoom:Ne},Xe)=>Tl({stops:Ke,base:f.base},u,Ne).evaluate(Ne,Xe)}}if(w){const ce=K==="exponential"?{name:"exponential",base:f.base!==void 0?f.base:1}:null;return{kind:"camera",interpolationType:ce,interpolationFactor:vr.interpolationFactor.bind(void 0,ce),zoomStops:f.stops.map(be=>be[0]),evaluate:({zoom:be})=>W(f,u,be,Z,ne)}}return{kind:"source",evaluate(ce,be){const Ke=be&&be.properties?be.properties[f.property]:void 0;return Ke===void 0?$A(f.default,u.default):W(f,u,Ke,Z,ne)}}}function $A(f,u,h){return f!==void 0?f:u!==void 0?u:h!==void 0?h:void 0}function _A(f,u,h,v,w){return $A(typeof h===w?v[h]:void 0,f.default,u.default)}function lA(f,u,h){if(Wi(h)!=="number")return $A(f.default,u.default);const v=f.stops.length;if(v===1||h<=f.stops[0][0])return f.stops[0][1];if(h>=f.stops[v-1][0])return f.stops[v-1][1];const w=Oe(f.stops.map(K=>K[0]),h);return f.stops[w][1]}function Tl(f,u,h){const v=f.base!==void 0?f.base:1;if(Wi(h)!=="number")return $A(f.default,u.default);const w=f.stops.length;if(w===1||h<=f.stops[0][0])return f.stops[0][1];if(h>=f.stops[w-1][0])return f.stops[w-1][1];const K=Oe(f.stops.map(ce=>ce[0]),h),L=function(ce,be,Ke,Ue){const Ne=Ue-Ke,Xe=ce-Ke;return Ne===0?0:be===1?Xe/Ne:(Math.pow(be,Xe)-1)/(Math.pow(be,Ne)-1)}(h,v,f.stops[K][0],f.stops[K+1][0]),W=f.stops[K][1],Z=f.stops[K+1][1],ne=vi[u.type]||Uo;return typeof W.evaluate=="function"?{evaluate(...ce){const be=W.evaluate.apply(void 0,ce),Ke=Z.evaluate.apply(void 0,ce);if(be!==void 0&&Ke!==void 0)return ne(be,Ke,L,f.colorSpace)}}:ne(W,Z,L,f.colorSpace)}function gc(f,u,h){switch(u.type){case"color":h=Ai.parse(h);break;case"formatted":h=ls.fromString(h.toString());break;case"resolvedImage":h=So.fromString(h.toString());break;case"padding":h=Fr.parse(h);break;default:Wi(h)===u.type||u.type==="enum"&&u.values[h]||(h=void 0)}return $A(h,f.default,u.default)}Ht.register(gu,{error:[{kind:"error"},[Nn],(f,[u])=>{throw new Ei(u.evaluate(f))}],typeof:[Nn,[ur],(f,[u])=>Ti(rs(u.evaluate(f)))],"to-rgba":[Mo(on,4),[Or],(f,[u])=>{const[h,v,w,K]=u.evaluate(f).rgb;return[255*h,255*v,255*w,K]}],rgb:[Or,[on,on,on],Pn],rgba:[Or,[on,on,on,on],Pn],has:{type:Fn,overloads:[[[Nn],(f,[u])=>an(u.evaluate(f),f.properties())],[[Nn,Dr],(f,[u,h])=>an(u.evaluate(f),h.evaluate(f))]]},get:{type:ur,overloads:[[[Nn],(f,[u])=>Ur(u.evaluate(f),f.properties())],[[Nn,Dr],(f,[u,h])=>Ur(u.evaluate(f),h.evaluate(f))]]},"feature-state":[ur,[Nn],(f,[u])=>Ur(u.evaluate(f),f.featureState||{})],properties:[Dr,[],f=>f.properties()],"geometry-type":[Nn,[],f=>f.geometryType()],id:[ur,[],f=>f.id()],zoom:[on,[],f=>f.globals.zoom],"heatmap-density":[on,[],f=>f.globals.heatmapDensity||0],"line-progress":[on,[],f=>f.globals.lineProgress||0],accumulated:[ur,[],f=>f.globals.accumulated===void 0?null:f.globals.accumulated],"+":[on,Ci(on),(f,u)=>{let h=0;for(const v of u)h+=v.evaluate(f);return h}],"*":[on,Ci(on),(f,u)=>{let h=1;for(const v of u)h*=v.evaluate(f);return h}],"-":{type:on,overloads:[[[on,on],(f,[u,h])=>u.evaluate(f)-h.evaluate(f)],[[on],(f,[u])=>-u.evaluate(f)]]},"/":[on,[on,on],(f,[u,h])=>u.evaluate(f)/h.evaluate(f)],"%":[on,[on,on],(f,[u,h])=>u.evaluate(f)%h.evaluate(f)],ln2:[on,[],()=>Math.LN2],pi:[on,[],()=>Math.PI],e:[on,[],()=>Math.E],"^":[on,[on,on],(f,[u,h])=>Math.pow(u.evaluate(f),h.evaluate(f))],sqrt:[on,[on],(f,[u])=>Math.sqrt(u.evaluate(f))],log10:[on,[on],(f,[u])=>Math.log(u.evaluate(f))/Math.LN10],ln:[on,[on],(f,[u])=>Math.log(u.evaluate(f))],log2:[on,[on],(f,[u])=>Math.log(u.evaluate(f))/Math.LN2],sin:[on,[on],(f,[u])=>Math.sin(u.evaluate(f))],cos:[on,[on],(f,[u])=>Math.cos(u.evaluate(f))],tan:[on,[on],(f,[u])=>Math.tan(u.evaluate(f))],asin:[on,[on],(f,[u])=>Math.asin(u.evaluate(f))],acos:[on,[on],(f,[u])=>Math.acos(u.evaluate(f))],atan:[on,[on],(f,[u])=>Math.atan(u.evaluate(f))],min:[on,Ci(on),(f,u)=>Math.min(...u.map(h=>h.evaluate(f)))],max:[on,Ci(on),(f,u)=>Math.max(...u.map(h=>h.evaluate(f)))],abs:[on,[on],(f,[u])=>Math.abs(u.evaluate(f))],round:[on,[on],(f,[u])=>{const h=u.evaluate(f);return h<0?-Math.round(-h):Math.round(h)}],floor:[on,[on],(f,[u])=>Math.floor(u.evaluate(f))],ceil:[on,[on],(f,[u])=>Math.ceil(u.evaluate(f))],"filter-==":[Fn,[Nn,ur],(f,[u,h])=>f.properties()[u.value]===h.value],"filter-id-==":[Fn,[ur],(f,[u])=>f.id()===u.value],"filter-type-==":[Fn,[Nn],(f,[u])=>f.geometryType()===u.value],"filter-<":[Fn,[Nn,ur],(f,[u,h])=>{const v=f.properties()[u.value],w=h.value;return typeof v==typeof w&&v<w}],"filter-id-<":[Fn,[ur],(f,[u])=>{const h=f.id(),v=u.value;return typeof h==typeof v&&h<v}],"filter->":[Fn,[Nn,ur],(f,[u,h])=>{const v=f.properties()[u.value],w=h.value;return typeof v==typeof w&&v>w}],"filter-id->":[Fn,[ur],(f,[u])=>{const h=f.id(),v=u.value;return typeof h==typeof v&&h>v}],"filter-<=":[Fn,[Nn,ur],(f,[u,h])=>{const v=f.properties()[u.value],w=h.value;return typeof v==typeof w&&v<=w}],"filter-id-<=":[Fn,[ur],(f,[u])=>{const h=f.id(),v=u.value;return typeof h==typeof v&&h<=v}],"filter->=":[Fn,[Nn,ur],(f,[u,h])=>{const v=f.properties()[u.value],w=h.value;return typeof v==typeof w&&v>=w}],"filter-id->=":[Fn,[ur],(f,[u])=>{const h=f.id(),v=u.value;return typeof h==typeof v&&h>=v}],"filter-has":[Fn,[ur],(f,[u])=>u.value in f.properties()],"filter-has-id":[Fn,[],f=>f.id()!==null&&f.id()!==void 0],"filter-type-in":[Fn,[Mo(Nn)],(f,[u])=>u.value.indexOf(f.geometryType())>=0],"filter-id-in":[Fn,[Mo(ur)],(f,[u])=>u.value.indexOf(f.id())>=0],"filter-in-small":[Fn,[Nn,Mo(ur)],(f,[u,h])=>h.value.indexOf(f.properties()[u.value])>=0],"filter-in-large":[Fn,[Nn,Mo(ur)],(f,[u,h])=>function(v,w,K,L){for(;K<=L;){const W=K+L>>1;if(w[W]===v)return!0;w[W]>v?L=W-1:K=W+1}return!1}(f.properties()[u.value],h.value,0,h.value.length-1)],all:{type:Fn,overloads:[[[Fn,Fn],(f,[u,h])=>u.evaluate(f)&&h.evaluate(f)],[Ci(Fn),(f,u)=>{for(const h of u)if(!h.evaluate(f))return!1;return!0}]]},any:{type:Fn,overloads:[[[Fn,Fn],(f,[u,h])=>u.evaluate(f)||h.evaluate(f)],[Ci(Fn),(f,u)=>{for(const h of u)if(h.evaluate(f))return!0;return!1}]]},"!":[Fn,[Fn],(f,[u])=>!u.evaluate(f)],"is-supported-script":[Fn,[Nn],(f,[u])=>{const h=f.globals&&f.globals.isSupportedScript;return!h||h(u.evaluate(f))}],upcase:[Nn,[Nn],(f,[u])=>u.evaluate(f).toUpperCase()],downcase:[Nn,[Nn],(f,[u])=>u.evaluate(f).toLowerCase()],concat:[Nn,Ci(ur),(f,u)=>u.map(h=>Vs(h.evaluate(f))).join("")],"resolved-locale":[Nn,[co],(f,[u])=>u.evaluate(f).resolvedLocale()]});class vu{constructor(u,h){var v;this.expression=u,this._warningHistory={},this._evaluator=new oA,this._defaultValue=h?(v=h).type==="color"&&YA(v.default)?new Ai(0,0,0,0):v.type==="color"?Ai.parse(v.default)||null:v.type==="padding"?Fr.parse(v.default)||null:v.type==="variableAnchorOffsetCollection"?Rs.parse(v.default)||null:v.type==="projectionDefinition"?Ws.parse(v.default)||null:v.default===void 0?null:v.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(u,h,v,w,K,L){return this._evaluator.globals=u,this._evaluator.feature=h,this._evaluator.featureState=v,this._evaluator.canonical=w,this._evaluator.availableImages=K||null,this._evaluator.formattedSection=L,this.expression.evaluate(this._evaluator)}evaluate(u,h,v,w,K,L){this._evaluator.globals=u,this._evaluator.feature=h||null,this._evaluator.featureState=v||null,this._evaluator.canonical=w,this._evaluator.availableImages=K||null,this._evaluator.formattedSection=L||null;try{const W=this.expression.evaluate(this._evaluator);if(W==null||typeof W=="number"&&W!=W)return this._defaultValue;if(this._enumValues&&!(W in this._enumValues))throw new Ei(`Expected value to be one of ${Object.keys(this._enumValues).map(Z=>JSON.stringify(Z)).join(", ")}, but found ${JSON.stringify(W)} instead.`);return W}catch(W){return this._warningHistory[W.message]||(this._warningHistory[W.message]=!0,typeof console<"u"&&console.warn(W.message)),this._defaultValue}}}function jl(f){return Array.isArray(f)&&f.length>0&&typeof f[0]=="string"&&f[0]in gu}function Wc(f,u){const h=new Vi(gu,_o,[],u?function(w){const K={color:Or,string:Nn,number:on,enum:Nn,boolean:Fn,formatted:Sa,padding:qi,projectionDefinition:Er,resolvedImage:yi,variableAnchorOffsetCollection:oo};return w.type==="array"?Mo(K[w.value]||ur,w.length):K[w.type]}(u):void 0),v=h.parse(f,void 0,void 0,void 0,u&&u.type==="string"?{typeAnnotation:"coerce"}:void 0);return v?vp(new vu(v,u)):Il(h.errors)}class Zd{constructor(u,h){this.kind=u,this._styleExpression=h,this.isStateDependent=u!=="constant"&&!Vo(h.expression)}evaluateWithoutErrorHandling(u,h,v,w,K,L){return this._styleExpression.evaluateWithoutErrorHandling(u,h,v,w,K,L)}evaluate(u,h,v,w,K,L){return this._styleExpression.evaluate(u,h,v,w,K,L)}}class za{constructor(u,h,v,w){this.kind=u,this.zoomStops=v,this._styleExpression=h,this.isStateDependent=u!=="camera"&&!Vo(h.expression),this.interpolationType=w}evaluateWithoutErrorHandling(u,h,v,w,K,L){return this._styleExpression.evaluateWithoutErrorHandling(u,h,v,w,K,L)}evaluate(u,h,v,w,K,L){return this._styleExpression.evaluate(u,h,v,w,K,L)}interpolationFactor(u,h,v){return this.interpolationType?vr.interpolationFactor(this.interpolationType,u,h,v):0}}function fd(f,u){const h=Wc(f,u);if(h.result==="error")return h;const v=h.value.expression,w=oa(v);if(!w&&!yu(u))return Il([new Bn("","data expressions not supported")]);const K=QA(v,["zoom"]);if(!K&&!qA(u))return Il([new Bn("","zoom expressions not supported")]);const L=VA(v);return L||K?L instanceof Bn?Il([L]):L instanceof vr&&!kl(u)?Il([new Bn("",'"interpolate" expressions cannot be used with this property')]):vp(L?new za(w?"camera":"composite",h.value,L.labels,L instanceof vr?L.interpolation:void 0):new Zd(w?"constant":"source",h.value)):Il([new Bn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yc{constructor(u,h){this._parameters=u,this._specification=h,Rn(this,Nc(this._parameters,this._specification))}static deserialize(u){return new yc(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function VA(f){let u=null;if(f instanceof nu)u=VA(f.result);else if(f instanceof Eo){for(const h of f.args)if(u=VA(h),u)break}else(f instanceof ot||f instanceof vr)&&f.input instanceof Ht&&f.input.name==="zoom"&&(u=f);return u instanceof Bn||f.eachChild(h=>{const v=VA(h);v instanceof Bn?u=v:!u&&v?u=new Bn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):u&&v&&u!==v&&(u=new Bn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),u}function of(f){if(f===!0||f===!1)return!0;if(!Array.isArray(f)||f.length===0)return!1;switch(f[0]){case"has":return f.length>=2&&f[1]!=="$id"&&f[1]!=="$type";case"in":return f.length>=3&&(typeof f[1]!="string"||Array.isArray(f[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return f.length!==3||Array.isArray(f[1])||Array.isArray(f[2]);case"any":case"all":for(const u of f.slice(1))if(!of(u)&&typeof u!="boolean")return!1;return!0;default:return!0}}const bA={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function HA(f){if(f==null)return{filter:()=>!0,needGeometry:!1};of(f)||(f=Ho(f));const u=Wc(f,bA);if(u.result==="error")throw new Error(u.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,v,w)=>u.value.evaluate(h,v,{},w),needGeometry:Xd(f)}}function Gc(f,u){return f<u?-1:f>u?1:0}function Xd(f){if(!Array.isArray(f))return!1;if(f[0]==="within"||f[0]==="distance")return!0;for(let u=1;u<f.length;u++)if(Xd(f[u]))return!0;return!1}function Ho(f){if(!f)return!0;const u=f[0];return f.length<=1?u!=="any":u==="=="?Qc(f[1],f[2],"=="):u==="!="?qc(Qc(f[1],f[2],"==")):u==="<"||u===">"||u==="<="||u===">="?Qc(f[1],f[2],u):u==="any"?(h=f.slice(1),["any"].concat(h.map(Ho))):u==="all"?["all"].concat(f.slice(1).map(Ho)):u==="none"?["all"].concat(f.slice(1).map(Ho).map(qc)):u==="in"?ZA(f[1],f.slice(2)):u==="!in"?qc(ZA(f[1],f.slice(2))):u==="has"?Lu(f[1]):u!=="!has"||qc(Lu(f[1]));var h}function Qc(f,u,h){switch(f){case"$type":return[`filter-type-${h}`,u];case"$id":return[`filter-id-${h}`,u];default:return[`filter-${h}`,f,u]}}function ZA(f,u){if(u.length===0)return!1;switch(f){case"$type":return["filter-type-in",["literal",u]];case"$id":return["filter-id-in",["literal",u]];default:return u.length>200&&!u.some(h=>typeof h!=typeof u[0])?["filter-in-large",f,["literal",u.sort(Gc)]]:["filter-in-small",f,["literal",u]]}}function Lu(f){switch(f){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",f]}}function qc(f){return["!",f]}function Jd(f){const u=typeof f;if(u==="number"||u==="boolean"||u==="string"||f==null)return JSON.stringify(f);if(Array.isArray(f)){let w="[";for(const K of f)w+=`${Jd(K)},`;return`${w}]`}const h=Object.keys(f).sort();let v="{";for(let w=0;w<h.length;w++)v+=`${JSON.stringify(h[w])}:${Jd(f[h[w]])},`;return`${v}}`}function Yc(f){let u="";for(const h of oe)u+=`/${Jd(f[h])}`;return u}function vc(f){const u=f.value;return u?[new xt(f.key,u,"constants have been deprecated as of v8")]:[]}function As(f){return f instanceof Number||f instanceof String||f instanceof Boolean?f.valueOf():f}function zo(f){if(Array.isArray(f))return f.map(zo);if(f instanceof Object&&!(f instanceof Number||f instanceof String||f instanceof Boolean)){const u={};for(const h in f)u[h]=zo(f[h]);return u}return As(f)}function cs(f){const u=f.key,h=f.value,v=f.valueSpec||{},w=f.objectElementValidators||{},K=f.style,L=f.styleSpec,W=f.validateSpec;let Z=[];const ne=Wi(h);if(ne!=="object")return[new xt(u,h,`object expected, ${ne} found`)];for(const ce in h){const be=ce.split(".")[0],Ke=v[be]||v["*"];let Ue;if(w[be])Ue=w[be];else if(v[be])Ue=W;else if(w["*"])Ue=w["*"];else{if(!v["*"]){Z.push(new xt(u,h[ce],`unknown property "${ce}"`));continue}Ue=W}Z=Z.concat(Ue({key:(u&&`${u}.`)+ce,value:h[ce],valueSpec:Ke,style:K,styleSpec:L,object:h,objectKey:ce,validateSpec:W},h))}for(const ce in v)w[ce]||v[ce].required&&v[ce].default===void 0&&h[ce]===void 0&&Z.push(new xt(u,h,`missing required property "${ce}"`));return Z}function Df(f){const u=f.value,h=f.valueSpec,v=f.style,w=f.styleSpec,K=f.key,L=f.arrayElementValidator||f.validateSpec;if(Wi(u)!=="array")return[new xt(K,u,`array expected, ${Wi(u)} found`)];if(h.length&&u.length!==h.length)return[new xt(K,u,`array length ${h.length} expected, length ${u.length} found`)];if(h["min-length"]&&u.length<h["min-length"])return[new xt(K,u,`array length at least ${h["min-length"]} expected, length ${u.length} found`)];let W={type:h.value,values:h.values};w.$version<7&&(W.function=h.function),Wi(h.value)==="object"&&(W=h.value);let Z=[];for(let ne=0;ne<u.length;ne++)Z=Z.concat(L({array:u,arrayIndex:ne,value:u[ne],valueSpec:W,validateSpec:f.validateSpec,style:v,styleSpec:w,key:`${K}[${ne}]`}));return Z}function pd(f){const u=f.key,h=f.value,v=f.valueSpec;let w=Wi(h);return w==="number"&&h!=h&&(w="NaN"),w!=="number"?[new xt(u,h,`number expected, ${w} found`)]:"minimum"in v&&h<v.minimum?[new xt(u,h,`${h} is less than the minimum value ${v.minimum}`)]:"maximum"in v&&h>v.maximum?[new xt(u,h,`${h} is greater than the maximum value ${v.maximum}`)]:[]}function md(f){const u=f.valueSpec,h=As(f.value.type);let v,w,K,L={};const W=h!=="categorical"&&f.value.property===void 0,Z=!W,ne=Wi(f.value.stops)==="array"&&Wi(f.value.stops[0])==="array"&&Wi(f.value.stops[0][0])==="object",ce=cs({key:f.key,value:f.value,valueSpec:f.styleSpec.function,validateSpec:f.validateSpec,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{stops:function(Ue){if(h==="identity")return[new xt(Ue.key,Ue.value,'identity function may not have a "stops" property')];let Ne=[];const Xe=Ue.value;return Ne=Ne.concat(Df({key:Ue.key,value:Xe,valueSpec:Ue.valueSpec,validateSpec:Ue.validateSpec,style:Ue.style,styleSpec:Ue.styleSpec,arrayElementValidator:be})),Wi(Xe)==="array"&&Xe.length===0&&Ne.push(new xt(Ue.key,Xe,"array must have at least one stop")),Ne},default:function(Ue){return Ue.validateSpec({key:Ue.key,value:Ue.value,valueSpec:u,validateSpec:Ue.validateSpec,style:Ue.style,styleSpec:Ue.styleSpec})}}});return h==="identity"&&W&&ce.push(new xt(f.key,f.value,'missing required property "property"')),h==="identity"||f.value.stops||ce.push(new xt(f.key,f.value,'missing required property "stops"')),h==="exponential"&&f.valueSpec.expression&&!kl(f.valueSpec)&&ce.push(new xt(f.key,f.value,"exponential functions not supported")),f.styleSpec.$version>=8&&(Z&&!yu(f.valueSpec)?ce.push(new xt(f.key,f.value,"property functions not supported")):W&&!qA(f.valueSpec)&&ce.push(new xt(f.key,f.value,"zoom functions not supported"))),h!=="categorical"&&!ne||f.value.property!==void 0||ce.push(new xt(f.key,f.value,'"property" property is required')),ce;function be(Ue){let Ne=[];const Xe=Ue.value,ut=Ue.key;if(Wi(Xe)!=="array")return[new xt(ut,Xe,`array expected, ${Wi(Xe)} found`)];if(Xe.length!==2)return[new xt(ut,Xe,`array length 2 expected, length ${Xe.length} found`)];if(ne){if(Wi(Xe[0])!=="object")return[new xt(ut,Xe,`object expected, ${Wi(Xe[0])} found`)];if(Xe[0].zoom===void 0)return[new xt(ut,Xe,"object stop key must have zoom")];if(Xe[0].value===void 0)return[new xt(ut,Xe,"object stop key must have value")];if(K&&K>As(Xe[0].zoom))return[new xt(ut,Xe[0].zoom,"stop zoom values must appear in ascending order")];As(Xe[0].zoom)!==K&&(K=As(Xe[0].zoom),w=void 0,L={}),Ne=Ne.concat(cs({key:`${ut}[0]`,value:Xe[0],valueSpec:{zoom:{}},validateSpec:Ue.validateSpec,style:Ue.style,styleSpec:Ue.styleSpec,objectElementValidators:{zoom:pd,value:Ke}}))}else Ne=Ne.concat(Ke({key:`${ut}[0]`,value:Xe[0],valueSpec:{},validateSpec:Ue.validateSpec,style:Ue.style,styleSpec:Ue.styleSpec},Xe));return jl(zo(Xe[1]))?Ne.concat([new xt(`${ut}[1]`,Xe[1],"expressions are not allowed in function stops.")]):Ne.concat(Ue.validateSpec({key:`${ut}[1]`,value:Xe[1],valueSpec:u,validateSpec:Ue.validateSpec,style:Ue.style,styleSpec:Ue.styleSpec}))}function Ke(Ue,Ne){const Xe=Wi(Ue.value),ut=As(Ue.value),Ct=Ue.value!==null?Ue.value:Ne;if(v){if(Xe!==v)return[new xt(Ue.key,Ct,`${Xe} stop domain type must match previous stop domain type ${v}`)]}else v=Xe;if(Xe!=="number"&&Xe!=="string"&&Xe!=="boolean")return[new xt(Ue.key,Ct,"stop domain value must be a number, string, or boolean")];if(Xe!=="number"&&h!=="categorical"){let Nt=`number expected, ${Xe} found`;return yu(u)&&h===void 0&&(Nt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xt(Ue.key,Ct,Nt)]}return h!=="categorical"||Xe!=="number"||isFinite(ut)&&Math.floor(ut)===ut?h!=="categorical"&&Xe==="number"&&w!==void 0&&ut<w?[new xt(Ue.key,Ct,"stop domain values must appear in ascending order")]:(w=ut,h==="categorical"&&ut in L?[new xt(Ue.key,Ct,"stop domain values must be unique")]:(L[ut]=!0,[])):[new xt(Ue.key,Ct,`integer expected, found ${ut}`)]}}function Uu(f){const u=(f.expressionContext==="property"?fd:Wc)(zo(f.value),f.valueSpec);if(u.result==="error")return u.value.map(v=>new xt(`${f.key}${v.key}`,f.value,v.message));const h=u.value.expression||u.value._styleExpression.expression;if(f.expressionContext==="property"&&f.propertyKey==="text-font"&&!h.outputDefined())return[new xt(f.key,f.value,`Invalid data expression for "${f.propertyKey}". Output values must be contained as literals within the expression.`)];if(f.expressionContext==="property"&&f.propertyType==="layout"&&!Vo(h))return[new xt(f.key,f.value,'"feature-state" data expressions are not supported with layout properties.')];if(f.expressionContext==="filter"&&!Vo(h))return[new xt(f.key,f.value,'"feature-state" data expressions are not supported with filters.')];if(f.expressionContext&&f.expressionContext.indexOf("cluster")===0){if(!QA(h,["zoom","feature-state"]))return[new xt(f.key,f.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(f.expressionContext==="cluster-initial"&&!oa(h))return[new xt(f.key,f.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function XA(f){const u=f.key,h=f.value,v=f.valueSpec,w=[];return Array.isArray(v.values)?v.values.indexOf(As(h))===-1&&w.push(new xt(u,h,`expected one of [${v.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(v.values).indexOf(As(h))===-1&&w.push(new xt(u,h,`expected one of [${Object.keys(v.values).join(", ")}], ${JSON.stringify(h)} found`)),w}function Nl(f){return of(zo(f.value))?Uu(Rn({},f,{expressionContext:"filter",valueSpec:{value:"boolean"}})):xA(f)}function xA(f){const u=f.value,h=f.key;if(Wi(u)!=="array")return[new xt(h,u,`array expected, ${Wi(u)} found`)];const v=f.styleSpec;let w,K=[];if(u.length<1)return[new xt(h,u,"filter array must have at least 1 element")];switch(K=K.concat(XA({key:`${h}[0]`,value:u[0],valueSpec:v.filter_operator,style:f.style,styleSpec:f.styleSpec})),As(u[0])){case"<":case"<=":case">":case">=":u.length>=2&&As(u[1])==="$type"&&K.push(new xt(h,u,`"$type" cannot be use with operator "${u[0]}"`));case"==":case"!=":u.length!==3&&K.push(new xt(h,u,`filter array for operator "${u[0]}" must have 3 elements`));case"in":case"!in":u.length>=2&&(w=Wi(u[1]),w!=="string"&&K.push(new xt(`${h}[1]`,u[1],`string expected, ${w} found`)));for(let L=2;L<u.length;L++)w=Wi(u[L]),As(u[1])==="$type"?K=K.concat(XA({key:`${h}[${L}]`,value:u[L],valueSpec:v.geometry_type,style:f.style,styleSpec:f.styleSpec})):w!=="string"&&w!=="number"&&w!=="boolean"&&K.push(new xt(`${h}[${L}]`,u[L],`string, number, or boolean expected, ${w} found`));break;case"any":case"all":case"none":for(let L=1;L<u.length;L++)K=K.concat(xA({key:`${h}[${L}]`,value:u[L],style:f.style,styleSpec:f.styleSpec}));break;case"has":case"!has":w=Wi(u[1]),u.length!==2?K.push(new xt(h,u,`filter array for "${u[0]}" operator must have 2 elements`)):w!=="string"&&K.push(new xt(`${h}[1]`,u[1],`string expected, ${w} found`))}return K}function dl(f,u){const h=f.key,v=f.validateSpec,w=f.style,K=f.styleSpec,L=f.value,W=f.objectKey,Z=K[`${u}_${f.layerType}`];if(!Z)return[];const ne=W.match(/^(.*)-transition$/);if(u==="paint"&&ne&&Z[ne[1]]&&Z[ne[1]].transition)return v({key:h,value:L,valueSpec:K.transition,style:w,styleSpec:K});const ce=f.valueSpec||Z[W];if(!ce)return[new xt(h,L,`unknown property "${W}"`)];let be;if(Wi(L)==="string"&&yu(ce)&&!ce.tokens&&(be=/^{([^}]+)}$/.exec(L)))return[new xt(h,L,`"${W}" does not support interpolation syntax
|
||
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(be[1])} }\`.`)];const Ke=[];return f.layerType==="symbol"&&(W==="text-field"&&w&&!w.glyphs&&Ke.push(new xt(h,L,'use of "text-field" requires a style "glyphs" property')),W==="text-font"&&YA(zo(L))&&As(L.type)==="identity"&&Ke.push(new xt(h,L,'"text-font" does not support identity functions'))),Ke.concat(v({key:f.key,value:L,valueSpec:ce,style:w,styleSpec:K,expressionContext:"property",propertyType:u,propertyKey:W}))}function JA(f){return dl(f,"paint")}function zu(f){return dl(f,"layout")}function gd(f){let u=[];const h=f.value,v=f.key,w=f.style,K=f.styleSpec;h.type||h.ref||u.push(new xt(v,h,'either "type" or "ref" is required'));let L=As(h.type);const W=As(h.ref);if(h.id){const Z=As(h.id);for(let ne=0;ne<f.arrayIndex;ne++){const ce=w.layers[ne];As(ce.id)===Z&&u.push(new xt(v,h.id,`duplicate layer id "${h.id}", previously used at line ${ce.id.__line__}`))}}if("ref"in h){let Z;["type","source","source-layer","filter","layout"].forEach(ne=>{ne in h&&u.push(new xt(v,h[ne],`"${ne}" is prohibited for ref layers`))}),w.layers.forEach(ne=>{As(ne.id)===W&&(Z=ne)}),Z?Z.ref?u.push(new xt(v,h.ref,"ref cannot reference another ref layer")):L=As(Z.type):u.push(new xt(v,h.ref,`ref layer "${W}" not found`))}else if(L!=="background")if(h.source){const Z=w.sources&&w.sources[h.source],ne=Z&&As(Z.type);Z?ne==="vector"&&L==="raster"?u.push(new xt(v,h.source,`layer "${h.id}" requires a raster source`)):ne!=="raster-dem"&&L==="hillshade"?u.push(new xt(v,h.source,`layer "${h.id}" requires a raster-dem source`)):ne==="raster"&&L!=="raster"?u.push(new xt(v,h.source,`layer "${h.id}" requires a vector source`)):ne!=="vector"||h["source-layer"]?ne==="raster-dem"&&L!=="hillshade"?u.push(new xt(v,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):L!=="line"||!h.paint||!h.paint["line-gradient"]||ne==="geojson"&&Z.lineMetrics||u.push(new xt(v,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):u.push(new xt(v,h,`layer "${h.id}" must specify a "source-layer"`)):u.push(new xt(v,h.source,`source "${h.source}" not found`))}else u.push(new xt(v,h,'missing required property "source"'));return u=u.concat(cs({key:v,value:h,valueSpec:K.layer,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,objectElementValidators:{"*":()=>[],type:()=>f.validateSpec({key:`${v}.type`,value:h.type,valueSpec:K.layer.type,style:f.style,styleSpec:f.styleSpec,validateSpec:f.validateSpec,object:h,objectKey:"type"}),filter:Nl,layout:Z=>cs({layer:h,key:Z.key,value:Z.value,style:Z.style,styleSpec:Z.styleSpec,validateSpec:Z.validateSpec,objectElementValidators:{"*":ne=>zu(Rn({layerType:L},ne))}}),paint:Z=>cs({layer:h,key:Z.key,value:Z.value,style:Z.style,styleSpec:Z.styleSpec,validateSpec:Z.validateSpec,objectElementValidators:{"*":ne=>JA(Rn({layerType:L},ne))}})}})),u}function ju(f){const u=f.value,h=f.key,v=Wi(u);return v!=="string"?[new xt(h,u,`string expected, ${v} found`)]:[]}const eh={promoteId:function({key:f,value:u}){if(Wi(u)==="string")return ju({key:f,value:u});{const h=[];for(const v in u)h.push(...ju({key:`${f}.${v}`,value:u[v]}));return h}}};function ec(f){const u=f.value,h=f.key,v=f.styleSpec,w=f.style,K=f.validateSpec;if(!u.type)return[new xt(h,u,'"type" is required')];const L=As(u.type);let W;switch(L){case"vector":case"raster":return W=cs({key:h,value:u,valueSpec:v[`source_${L.replace("-","_")}`],style:f.style,styleSpec:v,objectElementValidators:eh,validateSpec:K}),W;case"raster-dem":return W=function(Z){var ne;const ce=(ne=Z.sourceName)!==null&&ne!==void 0?ne:"",be=Z.value,Ke=Z.styleSpec,Ue=Ke.source_raster_dem,Ne=Z.style;let Xe=[];const ut=Wi(be);if(be===void 0)return Xe;if(ut!=="object")return Xe.push(new xt("source_raster_dem",be,`object expected, ${ut} found`)),Xe;const Ct=As(be.encoding)==="custom",Nt=["redFactor","greenFactor","blueFactor","baseShift"],Et=Z.value.encoding?`"${Z.value.encoding}"`:"Default";for(const Fe in be)!Ct&&Nt.includes(Fe)?Xe.push(new xt(Fe,be[Fe],`In "${ce}": "${Fe}" is only valid when "encoding" is set to "custom". ${Et} encoding found`)):Ue[Fe]?Xe=Xe.concat(Z.validateSpec({key:Fe,value:be[Fe],valueSpec:Ue[Fe],validateSpec:Z.validateSpec,style:Ne,styleSpec:Ke})):Xe.push(new xt(Fe,be[Fe],`unknown property "${Fe}"`));return Xe}({sourceName:h,value:u,style:f.style,styleSpec:v,validateSpec:K}),W;case"geojson":if(W=cs({key:h,value:u,valueSpec:v.source_geojson,style:w,styleSpec:v,validateSpec:K,objectElementValidators:eh}),u.cluster)for(const Z in u.clusterProperties){const[ne,ce]=u.clusterProperties[Z],be=typeof ne=="string"?[ne,["accumulated"],["get",Z]]:ne;W.push(...Uu({key:`${h}.${Z}.map`,value:ce,validateSpec:K,expressionContext:"cluster-map"})),W.push(...Uu({key:`${h}.${Z}.reduce`,value:be,validateSpec:K,expressionContext:"cluster-reduce"}))}return W;case"video":return cs({key:h,value:u,valueSpec:v.source_video,style:w,validateSpec:K,styleSpec:v});case"image":return cs({key:h,value:u,valueSpec:v.source_image,style:w,validateSpec:K,styleSpec:v});case"canvas":return[new xt(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return XA({key:`${h}.type`,value:u.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:w,validateSpec:K,styleSpec:v})}}function Nu(f){const u=f.value,h=f.styleSpec,v=h.light,w=f.style;let K=[];const L=Wi(u);if(u===void 0)return K;if(L!=="object")return K=K.concat([new xt("light",u,`object expected, ${L} found`)]),K;for(const W in u){const Z=W.match(/^(.*)-transition$/);K=K.concat(Z&&v[Z[1]]&&v[Z[1]].transition?f.validateSpec({key:W,value:u[W],valueSpec:h.transition,validateSpec:f.validateSpec,style:w,styleSpec:h}):v[W]?f.validateSpec({key:W,value:u[W],valueSpec:v[W],validateSpec:f.validateSpec,style:w,styleSpec:h}):[new xt(W,u[W],`unknown property "${W}"`)])}return K}function Wu(f){const u=f.value,h=f.styleSpec,v=h.sky,w=f.style,K=Wi(u);if(u===void 0)return[];if(K!=="object")return[new xt("sky",u,`object expected, ${K} found`)];let L=[];for(const W in u)L=L.concat(v[W]?f.validateSpec({key:W,value:u[W],valueSpec:v[W],style:w,styleSpec:h}):[new xt(W,u[W],`unknown property "${W}"`)]);return L}function wA(f){const u=f.value,h=f.styleSpec,v=h.terrain,w=f.style;let K=[];const L=Wi(u);if(u===void 0)return K;if(L!=="object")return K=K.concat([new xt("terrain",u,`object expected, ${L} found`)]),K;for(const W in u)K=K.concat(v[W]?f.validateSpec({key:W,value:u[W],valueSpec:v[W],validateSpec:f.validateSpec,style:w,styleSpec:h}):[new xt(W,u[W],`unknown property "${W}"`)]);return K}function Cc(f){let u=[];const h=f.value,v=f.key;if(Array.isArray(h)){const w=[],K=[];for(const L in h)h[L].id&&w.includes(h[L].id)&&u.push(new xt(v,h,`all the sprites' ids must be unique, but ${h[L].id} is duplicated`)),w.push(h[L].id),h[L].url&&K.includes(h[L].url)&&u.push(new xt(v,h,`all the sprites' URLs must be unique, but ${h[L].url} is duplicated`)),K.push(h[L].url),u=u.concat(cs({key:`${v}[${L}]`,value:h[L],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:f.validateSpec}));return u}return ju({key:v,value:h})}const Cu={"*":()=>[],array:Df,boolean:function(f){const u=f.value,h=f.key,v=Wi(u);return v!=="boolean"?[new xt(h,u,`boolean expected, ${v} found`)]:[]},number:pd,color:function(f){const u=f.key,h=f.value,v=Wi(h);return v!=="string"?[new xt(u,h,`color expected, ${v} found`)]:Ai.parse(String(h))?[]:[new xt(u,h,`color expected, "${h}" found`)]},constants:vc,enum:XA,filter:Nl,function:md,layer:gd,object:cs,source:ec,light:Nu,sky:Wu,terrain:wA,projection:function(f){const u=f.value,h=f.styleSpec,v=h.projection,w=f.style,K=Wi(u);if(u===void 0)return[];if(K!=="object")return[new xt("projection",u,`object expected, ${K} found`)];let L=[];for(const W in u)L=L.concat(v[W]?f.validateSpec({key:W,value:u[W],valueSpec:v[W],style:w,styleSpec:h}):[new xt(W,u[W],`unknown property "${W}"`)]);return L},projectionDefinition:function(f){const u=f.key;let h=f.value;h=h instanceof String?h.valueOf():h;const v=Wi(h);return v!=="array"||function(w){return Array.isArray(w)&&w.length===3&&typeof w[0]=="string"&&typeof w[1]=="string"&&typeof w[2]=="number"}(h)||function(w){return!!["interpolate","step","literal"].includes(w[0])}(h)?["array","string"].includes(v)?[]:[new xt(u,h,`projection expected, invalid type "${v}" found`)]:[new xt(u,h,`projection expected, invalid array ${JSON.stringify(h)} found`)]},string:ju,formatted:function(f){return ju(f).length===0?[]:Uu(f)},resolvedImage:function(f){return ju(f).length===0?[]:Uu(f)},padding:function(f){const u=f.key,h=f.value;if(Wi(h)==="array"){if(h.length<1||h.length>4)return[new xt(u,h,`padding requires 1 to 4 values; ${h.length} values found`)];const v={type:"number"};let w=[];for(let K=0;K<h.length;K++)w=w.concat(f.validateSpec({key:`${u}[${K}]`,value:h[K],validateSpec:f.validateSpec,valueSpec:v}));return w}return pd({key:u,value:h,valueSpec:{}})},variableAnchorOffsetCollection:function(f){const u=f.key,h=f.value,v=Wi(h),w=f.styleSpec;if(v!=="array"||h.length<1||h.length%2!=0)return[new xt(u,h,"variableAnchorOffsetCollection requires a non-empty array of even length")];let K=[];for(let L=0;L<h.length;L+=2)K=K.concat(XA({key:`${u}[${L}]`,value:h[L],valueSpec:w.layout_symbol["text-anchor"]})),K=K.concat(Df({key:`${u}[${L+1}]`,value:h[L+1],valueSpec:{length:2,value:"number"},validateSpec:f.validateSpec,style:f.style,styleSpec:w}));return K},sprite:Cc};function $c(f){const u=f.value,h=f.valueSpec,v=f.styleSpec;return f.validateSpec=$c,h.expression&&YA(As(u))?md(f):h.expression&&jl(zo(u))?Uu(f):h.type&&Cu[h.type]?Cu[h.type](f):cs(Rn({},f,{valueSpec:h.type?v[h.type]:h}))}function it(f){const u=f.value,h=f.key,v=ju(f);return v.length||(u.indexOf("{fontstack}")===-1&&v.push(new xt(h,u,'"glyphs" url must include a "{fontstack}" token')),u.indexOf("{range}")===-1&&v.push(new xt(h,u,'"glyphs" url must include a "{range}" token'))),v}function ja(f,u=Be){let h=[];return h=h.concat($c({key:"",value:f,valueSpec:u.$root,styleSpec:u,style:f,validateSpec:$c,objectElementValidators:{glyphs:it,"*":()=>[]}})),f.constants&&(h=h.concat(vc({key:"constants",value:f.constants,style:f,styleSpec:u,validateSpec:$c}))),Di(h)}function Bo(f){return function(u){return f({...u,validateSpec:$c})}}function Di(f){return[].concat(f).sort((u,h)=>u.line-h.line)}function $r(f){return function(...u){return Di(f.apply(this,u))}}ja.source=$r(Bo(ec)),ja.sprite=$r(Bo(Cc)),ja.glyphs=$r(Bo(it)),ja.light=$r(Bo(Nu)),ja.sky=$r(Bo(Wu)),ja.terrain=$r(Bo(wA)),ja.layer=$r(Bo(gd)),ja.filter=$r(Bo(Nl)),ja.paintProperty=$r(Bo(JA)),ja.layoutProperty=$r(Bo(zu));const Es=ja,yd=Es.light,th=Es.sky,Oa=Es.paintProperty,Gs=Es.layoutProperty;function _s(f,u){let h=!1;if(u&&u.length)for(const v of u)f.fire(new rn(new Error(v.message))),h=!0;return h}class uA{constructor(u,h,v){const w=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const L=new Int32Array(this.arrayBuffer);u=L[0],this.d=(h=L[1])+2*(v=L[2]);for(let Z=0;Z<this.d*this.d;Z++){const ne=L[3+Z],ce=L[3+Z+1];w.push(ne===ce?null:L.subarray(ne,ce))}const W=L[3+w.length+1];this.keys=L.subarray(L[3+w.length],W),this.bboxes=L.subarray(W),this.insert=this._insertReadonly}else{this.d=h+2*v;for(let L=0;L<this.d*this.d;L++)w.push([]);this.keys=[],this.bboxes=[]}this.n=h,this.extent=u,this.padding=v,this.scale=h/u,this.uid=0;const K=v/h*u;this.min=-K,this.max=u+K}insert(u,h,v,w,K){this._forEachCell(h,v,w,K,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(h),this.bboxes.push(v),this.bboxes.push(w),this.bboxes.push(K)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,h,v,w,K,L){this.cells[K].push(L)}query(u,h,v,w,K){const L=this.min,W=this.max;if(u<=L&&h<=L&&W<=v&&W<=w&&!K)return Array.prototype.slice.call(this.keys);{const Z=[];return this._forEachCell(u,h,v,w,this._queryCell,Z,{},K),Z}}_queryCell(u,h,v,w,K,L,W,Z){const ne=this.cells[K];if(ne!==null){const ce=this.keys,be=this.bboxes;for(let Ke=0;Ke<ne.length;Ke++){const Ue=ne[Ke];if(W[Ue]===void 0){const Ne=4*Ue;(Z?Z(be[Ne+0],be[Ne+1],be[Ne+2],be[Ne+3]):u<=be[Ne+2]&&h<=be[Ne+3]&&v>=be[Ne+0]&&w>=be[Ne+1])?(W[Ue]=!0,L.push(ce[Ue])):W[Ue]=!1}}}}_forEachCell(u,h,v,w,K,L,W,Z){const ne=this._convertToCellCoord(u),ce=this._convertToCellCoord(h),be=this._convertToCellCoord(v),Ke=this._convertToCellCoord(w);for(let Ue=ne;Ue<=be;Ue++)for(let Ne=ce;Ne<=Ke;Ne++){const Xe=this.d*Ne+Ue;if((!Z||Z(this._convertFromCellCoord(Ue),this._convertFromCellCoord(Ne),this._convertFromCellCoord(Ue+1),this._convertFromCellCoord(Ne+1)))&&K.call(this,u,h,v,w,Xe,L,W,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,h=3+this.cells.length+1+1;let v=0;for(let L=0;L<this.cells.length;L++)v+=this.cells[L].length;const w=new Int32Array(h+v+this.keys.length+this.bboxes.length);w[0]=this.extent,w[1]=this.n,w[2]=this.padding;let K=h;for(let L=0;L<u.length;L++){const W=u[L];w[3+L]=K,w.set(W,K),K+=W.length}return w[3+u.length]=K,w.set(this.keys,K),K+=this.keys.length,w[3+u.length+1]=K,w.set(this.bboxes,K),K+=this.bboxes.length,w.buffer}static serialize(u,h){const v=u.toArrayBuffer();return h&&h.push(v),{buffer:v}}static deserialize(u){return new uA(u.buffer)}}const Bs={};function yr(f,u,h={}){if(Bs[f])throw new Error(`${f} is already registered.`);Object.defineProperty(u,"_classRegistryKey",{value:f,writeable:!1}),Bs[f]={klass:u,omit:h.omit||[],shallow:h.shallow||[]}}yr("Object",Object),yr("TransferableGridIndex",uA),yr("Color",Ai),yr("Error",Error),yr("AJAXError",Xn),yr("ResolvedImage",So),yr("StylePropertyFunction",yc),yr("StyleExpression",vu,{omit:["_evaluator"]}),yr("ZoomDependentExpression",za),yr("ZoomConstantExpression",Zd),yr("CompoundExpression",Ht,{omit:["_evaluate"]});for(const f in gu)gu[f]._classRegistryKey||yr(`Expression_${f}`,gu[f]);function va(f){return f&&typeof ArrayBuffer<"u"&&(f instanceof ArrayBuffer||f.constructor&&f.constructor.name==="ArrayBuffer")}function Vc(f){return f.$name||f.constructor._classRegistryKey}function Ia(f){return!function(u){if(u===null||typeof u!="object")return!1;const h=Vc(u);return!(!h||h==="Object")}(f)&&(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||f instanceof Blob||f instanceof Error||va(f)||en(f)||ArrayBuffer.isView(f)||f instanceof ImageData)}function tc(f,u){if(Ia(f))return(va(f)||en(f))&&u&&u.push(f),ArrayBuffer.isView(f)&&u&&u.push(f.buffer),f instanceof ImageData&&u&&u.push(f.data.buffer),f;if(Array.isArray(f)){const K=[];for(const L of f)K.push(tc(L,u));return K}if(typeof f!="object")throw new Error("can't serialize object of type "+typeof f);const h=Vc(f);if(!h)throw new Error(`can't serialize object of unregistered class ${f.constructor.name}`);if(!Bs[h])throw new Error(`${h} is not registered.`);const{klass:v}=Bs[h],w=v.serialize?v.serialize(f,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 K in f){if(!f.hasOwnProperty(K)||Bs[h].omit.indexOf(K)>=0)continue;const L=f[K];w[K]=Bs[h].shallow.indexOf(K)>=0?L:tc(L,u)}f instanceof Error&&(w.message=f.message)}if(w.$name)throw new Error("$name property is reserved for worker serialization logic.");return h!=="Object"&&(w.$name=h),w}function vd(f){if(Ia(f))return f;if(Array.isArray(f))return f.map(vd);if(typeof f!="object")throw new Error("can't deserialize object of type "+typeof f);const u=Vc(f)||"Object";if(!Bs[u])throw new Error(`can't deserialize unregistered class ${u}`);const{klass:h}=Bs[u];if(!h)throw new Error(`can't deserialize unregistered class ${u}`);if(h.deserialize)return h.deserialize(f);const v=Object.create(h.prototype);for(const w of Object.keys(f)){if(w==="$name")continue;const K=f[w];v[w]=Bs[u].shallow.indexOf(w)>=0?K:vd(K)}return v}class Cd{constructor(){this.first=!0}update(u,h){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=h):this.lastFloorZoom<v&&(this.lastIntegerZoom=v,this.lastIntegerZoomTime=h),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=v,!0))}}const Mi={"Latin-1 Supplement":f=>f>=128&&f<=255,"Hangul Jamo":f=>f>=4352&&f<=4607,Khmer:f=>f>=6016&&f<=6143,"General Punctuation":f=>f>=8192&&f<=8303,"Letterlike Symbols":f=>f>=8448&&f<=8527,"Number Forms":f=>f>=8528&&f<=8591,"Miscellaneous Technical":f=>f>=8960&&f<=9215,"Control Pictures":f=>f>=9216&&f<=9279,"Optical Character Recognition":f=>f>=9280&&f<=9311,"Enclosed Alphanumerics":f=>f>=9312&&f<=9471,"Geometric Shapes":f=>f>=9632&&f<=9727,"Miscellaneous Symbols":f=>f>=9728&&f<=9983,"Miscellaneous Symbols and Arrows":f=>f>=11008&&f<=11263,"Ideographic Description Characters":f=>f>=12272&&f<=12287,"CJK Symbols and Punctuation":f=>f>=12288&&f<=12351,Katakana:f=>f>=12448&&f<=12543,Kanbun:f=>f>=12688&&f<=12703,"CJK Strokes":f=>f>=12736&&f<=12783,"Enclosed CJK Letters and Months":f=>f>=12800&&f<=13055,"CJK Compatibility":f=>f>=13056&&f<=13311,"Yijing Hexagram Symbols":f=>f>=19904&&f<=19967,"Private Use Area":f=>f>=57344&&f<=63743,"Vertical Forms":f=>f>=65040&&f<=65055,"CJK Compatibility Forms":f=>f>=65072&&f<=65103,"Small Form Variants":f=>f>=65104&&f<=65135,"Halfwidth and Fullwidth Forms":f=>f>=65280&&f<=65519};function _d(f){for(const u of f)if(AA(u.charCodeAt(0)))return!0;return!1}function Wl(f){for(const u of f)if(!MA(u.charCodeAt(0)))return!1;return!0}function bd(f){const u=f.map(h=>{try{return new RegExp(`\\p{sc=${h}}`,"u").source}catch{return null}}).filter(h=>h);return new RegExp(u.join("|"),"u")}const xd=bd(["Arab","Dupl","Mong","Ougr","Syrc"]);function MA(f){return!xd.test(String.fromCodePoint(f))}const nc=bd(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function AA(f){return!(f!==746&&f!==747&&(f<4352||!(Mi["CJK Compatibility Forms"](f)&&!(f>=65097&&f<=65103)||Mi["CJK Compatibility"](f)||Mi["CJK Strokes"](f)||!(!Mi["CJK Symbols and Punctuation"](f)||f>=12296&&f<=12305||f>=12308&&f<=12319||f===12336)||Mi["Enclosed CJK Letters and Months"](f)||Mi["Ideographic Description Characters"](f)||Mi.Kanbun(f)||Mi.Katakana(f)&&f!==12540||!(!Mi["Halfwidth and Fullwidth Forms"](f)||f===65288||f===65289||f===65293||f>=65306&&f<=65310||f===65339||f===65341||f===65343||f>=65371&&f<=65503||f===65507||f>=65512&&f<=65519)||!(!Mi["Small Form Variants"](f)||f>=65112&&f<=65118||f>=65123&&f<=65126)||Mi["Vertical Forms"](f)||Mi["Yijing Hexagram Symbols"](f)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(f))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(f))||nc.test(String.fromCodePoint(f)))))}function _c(f){return!(AA(f)||function(u){return!!(Mi["Latin-1 Supplement"](u)&&(u===167||u===169||u===174||u===177||u===188||u===189||u===190||u===215||u===247)||Mi["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)||Mi["Letterlike Symbols"](u)||Mi["Number Forms"](u)||Mi["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)||Mi["Control Pictures"](u)&&u!==9251||Mi["Optical Character Recognition"](u)||Mi["Enclosed Alphanumerics"](u)||Mi["Geometric Shapes"](u)||Mi["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||Mi["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||Mi["CJK Symbols and Punctuation"](u)||Mi.Katakana(u)||Mi["Private Use Area"](u)||Mi["CJK Compatibility Forms"](u)||Mi["Small Form Variants"](u)||Mi["Halfwidth and Fullwidth Forms"](u)||u===8734||u===8756||u===8757||u>=9984&&u<=10087||u>=10102&&u<=10131||u===65532||u===65533)}(f))}const Os=bd(["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(f){return Os.test(String.fromCodePoint(f))}function _u(f,u){return!(!u&&bo(f)||f>=2304&&f<=3583||f>=3840&&f<=4255||Mi.Khmer(f))}function Na(f){for(const u of f)if(bo(u.charCodeAt(0)))return!0;return!1}const Ks=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(f){this.pluginStatus=f.pluginStatus,this.pluginURL=f.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(f){if(Ks.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=f.applyArabicShaping,this.processBidirectionalText=f.processBidirectionalText,this.processStyledBidirectionalText=f.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(f,u){return o(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(f.pluginStatus!=="loading")return this.setState(f),f;const h=f.pluginURL,v=new Promise(K=>{this.loadScriptResolve=K});u(h);const w=new Promise(K=>setTimeout(()=>K(),this.TIMEOUT));if(yield Promise.race([v,w]),this.isParsed()){const K={pluginStatus:"loaded",pluginURL:h};return this.setState(K),K}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${h}`)})}};class Zo{constructor(u,h){this.zoom=u,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Cd,this.transition={})}isSupportedScript(u){return function(h,v){for(const w of h)if(!_u(w.charCodeAt(0),v))return!1;return!0}(u,Ks.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,h=u-Math.floor(u),v=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*v}:{fromScale:.5,toScale:1,t:1-(1-v)*h}}}class ou{constructor(u,h){this.property=u,this.value=h,this.expression=function(v,w){if(YA(v))return new yc(v,w);if(jl(v)){const K=fd(v,w);if(K.result==="error")throw new Error(K.value.map(L=>`${L.key}: ${L.message}`).join(", "));return K.value}{let K=v;return w.type==="color"&&typeof v=="string"?K=Ai.parse(v):w.type!=="padding"||typeof v!="number"&&!Array.isArray(v)?w.type==="variableAnchorOffsetCollection"&&Array.isArray(v)?K=Rs.parse(v):w.type==="projectionDefinition"&&typeof v=="string"&&(K=Ws.parse(v)):K=Fr.parse(v),{kind:"constant",evaluate:()=>K}}}(h===void 0?u.specification.default:h,u.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(u,h,v){return this.property.possiblyEvaluate(this,u,h,v)}}class Gu{constructor(u){this.property=u,this.value=new ou(u,void 0)}transitioned(u,h){return new nh(this.property,this.value,h,gt({},u.transition,this.transition),u.now)}untransitioned(){return new nh(this.property,this.value,null,{},0)}}class bc{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return Pe(this._values[u].value.value)}setValue(u,h){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Gu(this._values[u].property)),this._values[u].value=new ou(this._values[u].property,h===null?void 0:Pe(h))}getTransition(u){return Pe(this._values[u].transition)}setTransition(u,h){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Gu(this._values[u].property)),this._values[u].transition=Pe(h)||void 0}serialize(){const u={};for(const h of Object.keys(this._values)){const v=this.getValue(h);v!==void 0&&(u[h]=v);const w=this.getTransition(h);w!==void 0&&(u[`${h}-transition`]=w)}return u}transitioned(u,h){const v=new SA(this._properties);for(const w of Object.keys(this._values))v._values[w]=this._values[w].transitioned(u,h._values[w]);return v}untransitioned(){const u=new SA(this._properties);for(const h of Object.keys(this._values))u._values[h]=this._values[h].untransitioned();return u}}class nh{constructor(u,h,v,w,K){this.property=u,this.value=h,this.begin=K+w.delay||0,this.end=this.begin+w.duration||0,u.specification.transition&&(w.delay||w.duration)&&(this.prior=v)}possiblyEvaluate(u,h,v){const w=u.now||0,K=this.value.possiblyEvaluate(u,h,v),L=this.prior;if(L){if(w>this.end)return this.prior=null,K;if(this.value.isDataDriven())return this.prior=null,K;if(w<this.begin)return L.possiblyEvaluate(u,h,v);{const W=(w-this.begin)/(this.end-this.begin);return this.property.interpolate(L.possiblyEvaluate(u,h,v),K,Ce(W))}}return K}}class SA{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,h,v){const w=new da(this._properties);for(const K of Object.keys(this._values))w._values[K]=this._values[K].possiblyEvaluate(u,h,v);return w}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class xc{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return this._values[u].value!==void 0}getValue(u){return Pe(this._values[u].value)}setValue(u,h){this._values[u]=new ou(this._values[u].property,h===null?void 0:Pe(h))}serialize(){const u={};for(const h of Object.keys(this._values)){const v=this.getValue(h);v!==void 0&&(u[h]=v)}return u}possiblyEvaluate(u,h,v){const w=new da(this._properties);for(const K of Object.keys(this._values))w._values[K]=this._values[K].possiblyEvaluate(u,h,v);return w}}class gs{constructor(u,h,v){this.property=u,this.value=h,this.parameters=v}isConstant(){return this.value.kind==="constant"}constantOr(u){return this.value.kind==="constant"?this.value.value:u}evaluate(u,h,v,w){return this.property.evaluate(this.value,this.parameters,u,h,v,w)}}class da{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class gr{constructor(u){this.specification=u}possiblyEvaluate(u,h){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(h)}interpolate(u,h,v){const w=vi[this.specification.type];return w?w(u,h,v):u}}class Hr{constructor(u,h){this.specification=u,this.overrides=h}possiblyEvaluate(u,h,v,w){return new gs(this,u.expression.kind==="constant"||u.expression.kind==="camera"?{kind:"constant",value:u.expression.evaluate(h,null,{},v,w)}:u.expression,h)}interpolate(u,h,v){if(u.value.kind!=="constant"||h.value.kind!=="constant")return u;if(u.value.value===void 0||h.value.value===void 0)return new gs(this,{kind:"constant",value:void 0},u.parameters);const w=vi[this.specification.type];if(w){const K=w(u.value.value,h.value.value,v);return new gs(this,{kind:"constant",value:K},u.parameters)}return u}evaluate(u,h,v,w,K,L){return u.kind==="constant"?u.value:u.evaluate(h,v,w,K,L)}}class Qu extends Hr{possiblyEvaluate(u,h,v,w){if(u.value===void 0)return new gs(this,{kind:"constant",value:void 0},h);if(u.expression.kind==="constant"){const K=u.expression.evaluate(h,null,{},v,w),L=u.property.specification.type==="resolvedImage"&&typeof K!="string"?K.name:K,W=this._calculate(L,L,L,h);return new gs(this,{kind:"constant",value:W},h)}if(u.expression.kind==="camera"){const K=this._calculate(u.expression.evaluate({zoom:h.zoom-1}),u.expression.evaluate({zoom:h.zoom}),u.expression.evaluate({zoom:h.zoom+1}),h);return new gs(this,{kind:"constant",value:K},h)}return new gs(this,u.expression,h)}evaluate(u,h,v,w,K,L){if(u.kind==="source"){const W=u.evaluate(h,v,w,K,L);return this._calculate(W,W,W,h)}return u.kind==="composite"?this._calculate(u.evaluate({zoom:Math.floor(h.zoom)-1},v,w),u.evaluate({zoom:Math.floor(h.zoom)},v,w),u.evaluate({zoom:Math.floor(h.zoom)+1},v,w),h):u.value}_calculate(u,h,v,w){return w.zoom>w.zoomHistory.lastIntegerZoom?{from:u,to:h}:{from:v,to:h}}interpolate(u){return u}}class rc{constructor(u){this.specification=u}possiblyEvaluate(u,h,v,w){if(u.value!==void 0){if(u.expression.kind==="constant"){const K=u.expression.evaluate(h,null,{},v,w);return this._calculate(K,K,K,h)}return this._calculate(u.expression.evaluate(new Zo(Math.floor(h.zoom-1),h)),u.expression.evaluate(new Zo(Math.floor(h.zoom),h)),u.expression.evaluate(new Zo(Math.floor(h.zoom+1),h)),h)}}_calculate(u,h,v,w){return w.zoom>w.zoomHistory.lastIntegerZoom?{from:u,to:h}:{from:v,to:h}}interpolate(u){return u}}class bu{constructor(u){this.specification=u}possiblyEvaluate(u,h,v,w){return!!u.expression.evaluate(h,null,{},v,w)}interpolate(){return!1}}class bs{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in u){const v=u[h];v.specification.overridable&&this.overridableProperties.push(h);const w=this.defaultPropertyValues[h]=new ou(v,void 0),K=this.defaultTransitionablePropertyValues[h]=new Gu(v);this.defaultTransitioningPropertyValues[h]=K.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=w.possiblyEvaluate({})}}}yr("DataDrivenProperty",Hr),yr("DataConstantProperty",gr),yr("CrossFadedDataDrivenProperty",Qu),yr("CrossFadedProperty",rc),yr("ColorRampProperty",bu);const Kf="-transition";class su extends er{constructor(u,h){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),h.layout&&(this._unevaluatedLayout=new xc(h.layout)),h.paint)){this._transitionablePaint=new bc(h.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 da(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return u==="visibility"?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,h,v={}){h!=null&&this._validate(Gs,`layers.${this.id}.layout.${u}`,u,h,v)||(u!=="visibility"?this._unevaluatedLayout.setValue(u,h):this.visibility=h)}getPaintProperty(u){return u.endsWith(Kf)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,h,v={}){if(h!=null&&this._validate(Oa,`layers.${this.id}.paint.${u}`,u,h,v))return!1;if(u.endsWith(Kf))return this._transitionablePaint.setTransition(u.slice(0,-11),h||void 0),!1;{const w=this._transitionablePaint._values[u],K=w.property.specification["property-type"]==="cross-faded-data-driven",L=w.value.isDataDriven(),W=w.value;this._transitionablePaint.setValue(u,h),this._handleSpecialPaintPropertyUpdate(u);const Z=this._transitionablePaint._values[u].value;return Z.isDataDriven()||L||K||this._handleOverridablePaintPropertyUpdate(u,W,Z)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,h,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,h){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,h)}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),Le(u,(h,v)=>!(h===void 0||v==="layout"&&!Object.keys(h).length||v==="paint"&&!Object.keys(h).length))}_validate(u,h,v,w,K={}){return(!K||K.validate!==!1)&&_s(this,u.call(Es,{key:h,layerType:this.type,objectKey:v,value:w,styleSpec:Be,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const h=this.paint.get(u);if(h instanceof gs&&yu(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const Ff={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class xu{constructor(u,h){this._structArray=u,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Po{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,h){return u._trim(),h&&(u.isTransferred=!0,h.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const h=Object.create(this.prototype);return h.arrayBuffer=u.arrayBuffer,h.length=u.length,h.capacity=u.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(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 h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Is(f,u=1){let h=0,v=0;return{members:f.map(w=>{const K=Ff[w.type].BYTES_PER_ELEMENT,L=h=rh(h,Math.max(u,K)),W=w.components||1;return v=Math.max(v,K),h+=K*W,{name:w.name,type:w.type,components:W,offset:L}}),size:rh(h,Math.max(v,u)),alignment:u}}function rh(f,u){return Math.ceil(f/u)*u}class EA extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h){const v=this.length;return this.resize(v+1),this.emplace(v,u,h)}emplace(u,h,v){const w=2*u;return this.int16[w+0]=h,this.int16[w+1]=v,u}}EA.prototype.bytesPerElement=4,yr("StructArrayLayout2i4",EA);class ih extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,h,v)}emplace(u,h,v,w){const K=3*u;return this.int16[K+0]=h,this.int16[K+1]=v,this.int16[K+2]=w,u}}ih.prototype.bytesPerElement=6,yr("StructArrayLayout3i6",ih);class BA extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w){const K=this.length;return this.resize(K+1),this.emplace(K,u,h,v,w)}emplace(u,h,v,w,K){const L=4*u;return this.int16[L+0]=h,this.int16[L+1]=v,this.int16[L+2]=w,this.int16[L+3]=K,u}}BA.prototype.bytesPerElement=8,yr("StructArrayLayout4i8",BA);class Qs extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L){const W=this.length;return this.resize(W+1),this.emplace(W,u,h,v,w,K,L)}emplace(u,h,v,w,K,L,W){const Z=6*u;return this.int16[Z+0]=h,this.int16[Z+1]=v,this.int16[Z+2]=w,this.int16[Z+3]=K,this.int16[Z+4]=L,this.int16[Z+5]=W,u}}Qs.prototype.bytesPerElement=12,yr("StructArrayLayout2i4i12",Qs);class wc extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L){const W=this.length;return this.resize(W+1),this.emplace(W,u,h,v,w,K,L)}emplace(u,h,v,w,K,L,W){const Z=4*u,ne=8*u;return this.int16[Z+0]=h,this.int16[Z+1]=v,this.uint8[ne+4]=w,this.uint8[ne+5]=K,this.uint8[ne+6]=L,this.uint8[ne+7]=W,u}}wc.prototype.bytesPerElement=8,yr("StructArrayLayout2i4ub8",wc);class Gl extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,h){const v=this.length;return this.resize(v+1),this.emplace(v,u,h)}emplace(u,h,v){const w=2*u;return this.float32[w+0]=h,this.float32[w+1]=v,u}}Gl.prototype.bytesPerElement=8,yr("StructArrayLayout2f8",Gl);class hl extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L,W,Z,ne,ce){const be=this.length;return this.resize(be+1),this.emplace(be,u,h,v,w,K,L,W,Z,ne,ce)}emplace(u,h,v,w,K,L,W,Z,ne,ce,be){const Ke=10*u;return this.uint16[Ke+0]=h,this.uint16[Ke+1]=v,this.uint16[Ke+2]=w,this.uint16[Ke+3]=K,this.uint16[Ke+4]=L,this.uint16[Ke+5]=W,this.uint16[Ke+6]=Z,this.uint16[Ke+7]=ne,this.uint16[Ke+8]=ce,this.uint16[Ke+9]=be,u}}hl.prototype.bytesPerElement=20,yr("StructArrayLayout10ui20",hl);class qu extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L,W,Z,ne,ce,be,Ke){const Ue=this.length;return this.resize(Ue+1),this.emplace(Ue,u,h,v,w,K,L,W,Z,ne,ce,be,Ke)}emplace(u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue){const Ne=12*u;return this.int16[Ne+0]=h,this.int16[Ne+1]=v,this.int16[Ne+2]=w,this.int16[Ne+3]=K,this.uint16[Ne+4]=L,this.uint16[Ne+5]=W,this.uint16[Ne+6]=Z,this.uint16[Ne+7]=ne,this.int16[Ne+8]=ce,this.int16[Ne+9]=be,this.int16[Ne+10]=Ke,this.int16[Ne+11]=Ue,u}}qu.prototype.bytesPerElement=24,yr("StructArrayLayout4i4ui4i24",qu);class Mc extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,h,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,h,v)}emplace(u,h,v,w){const K=3*u;return this.float32[K+0]=h,this.float32[K+1]=v,this.float32[K+2]=w,u}}Mc.prototype.bytesPerElement=12,yr("StructArrayLayout3f12",Mc);class wu extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const h=this.length;return this.resize(h+1),this.emplace(h,u)}emplace(u,h){return this.uint32[1*u+0]=h,u}}wu.prototype.bytesPerElement=4,yr("StructArrayLayout1ul4",wu);class Ca extends Po{_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,h,v,w,K,L,W,Z,ne){const ce=this.length;return this.resize(ce+1),this.emplace(ce,u,h,v,w,K,L,W,Z,ne)}emplace(u,h,v,w,K,L,W,Z,ne,ce){const be=10*u,Ke=5*u;return this.int16[be+0]=h,this.int16[be+1]=v,this.int16[be+2]=w,this.int16[be+3]=K,this.int16[be+4]=L,this.int16[be+5]=W,this.uint32[Ke+3]=Z,this.uint16[be+8]=ne,this.uint16[be+9]=ce,u}}Ca.prototype.bytesPerElement=20,yr("StructArrayLayout6i1ul2ui20",Ca);class Xs extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L){const W=this.length;return this.resize(W+1),this.emplace(W,u,h,v,w,K,L)}emplace(u,h,v,w,K,L,W){const Z=6*u;return this.int16[Z+0]=h,this.int16[Z+1]=v,this.int16[Z+2]=w,this.int16[Z+3]=K,this.int16[Z+4]=L,this.int16[Z+5]=W,u}}Xs.prototype.bytesPerElement=12,yr("StructArrayLayout2i2i2i12",Xs);class au extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K){const L=this.length;return this.resize(L+1),this.emplace(L,u,h,v,w,K)}emplace(u,h,v,w,K,L){const W=4*u,Z=8*u;return this.float32[W+0]=h,this.float32[W+1]=v,this.float32[W+2]=w,this.int16[Z+6]=K,this.int16[Z+7]=L,u}}au.prototype.bytesPerElement=16,yr("StructArrayLayout2f1f2i16",au);class lu extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,h,v,w,K,L){const W=this.length;return this.resize(W+1),this.emplace(W,u,h,v,w,K,L)}emplace(u,h,v,w,K,L,W){const Z=16*u,ne=4*u,ce=8*u;return this.uint8[Z+0]=h,this.uint8[Z+1]=v,this.float32[ne+1]=w,this.float32[ne+2]=K,this.int16[ce+6]=L,this.int16[ce+7]=W,u}}lu.prototype.bytesPerElement=16,yr("StructArrayLayout2ub2f2i16",lu);class cA extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,h,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,h,v)}emplace(u,h,v,w){const K=3*u;return this.uint16[K+0]=h,this.uint16[K+1]=v,this.uint16[K+2]=w,u}}cA.prototype.bytesPerElement=6,yr("StructArrayLayout3ui6",cA);class Mu extends Po{_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,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct){const Nt=this.length;return this.resize(Nt+1),this.emplace(Nt,u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct)}emplace(u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt){const Et=24*u,Fe=12*u,st=48*u;return this.int16[Et+0]=h,this.int16[Et+1]=v,this.uint16[Et+2]=w,this.uint16[Et+3]=K,this.uint32[Fe+2]=L,this.uint32[Fe+3]=W,this.uint32[Fe+4]=Z,this.uint16[Et+10]=ne,this.uint16[Et+11]=ce,this.uint16[Et+12]=be,this.float32[Fe+7]=Ke,this.float32[Fe+8]=Ue,this.uint8[st+36]=Ne,this.uint8[st+37]=Xe,this.uint8[st+38]=ut,this.uint32[Fe+10]=Ct,this.int16[Et+22]=Nt,u}}Mu.prototype.bytesPerElement=48,yr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Mu);class Sc extends Po{_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,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt,Et,Fe,st,Ot,un,zn,yn,wn,tr,Un){const cr=this.length;return this.resize(cr+1),this.emplace(cr,u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt,Et,Fe,st,Ot,un,zn,yn,wn,tr,Un)}emplace(u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt,Et,Fe,st,Ot,un,zn,yn,wn,tr,Un,cr){const On=32*u,Gr=16*u;return this.int16[On+0]=h,this.int16[On+1]=v,this.int16[On+2]=w,this.int16[On+3]=K,this.int16[On+4]=L,this.int16[On+5]=W,this.int16[On+6]=Z,this.int16[On+7]=ne,this.uint16[On+8]=ce,this.uint16[On+9]=be,this.uint16[On+10]=Ke,this.uint16[On+11]=Ue,this.uint16[On+12]=Ne,this.uint16[On+13]=Xe,this.uint16[On+14]=ut,this.uint16[On+15]=Ct,this.uint16[On+16]=Nt,this.uint16[On+17]=Et,this.uint16[On+18]=Fe,this.uint16[On+19]=st,this.uint16[On+20]=Ot,this.uint16[On+21]=un,this.uint16[On+22]=zn,this.uint32[Gr+12]=yn,this.float32[Gr+13]=wn,this.float32[Gr+14]=tr,this.uint16[On+30]=Un,this.uint16[On+31]=cr,u}}Sc.prototype.bytesPerElement=64,yr("StructArrayLayout8i15ui1ul2f2ui64",Sc);class Yu extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const h=this.length;return this.resize(h+1),this.emplace(h,u)}emplace(u,h){return this.float32[1*u+0]=h,u}}Yu.prototype.bytesPerElement=4,yr("StructArrayLayout1f4",Yu);class Ql extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,h,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,h,v)}emplace(u,h,v,w){const K=3*u;return this.uint16[6*u+0]=h,this.float32[K+1]=v,this.float32[K+2]=w,u}}Ql.prototype.bytesPerElement=12,yr("StructArrayLayout1ui2f12",Ql);class wd extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,h,v){const w=this.length;return this.resize(w+1),this.emplace(w,u,h,v)}emplace(u,h,v,w){const K=4*u;return this.uint32[2*u+0]=h,this.uint16[K+2]=v,this.uint16[K+3]=w,u}}wd.prototype.bytesPerElement=8,yr("StructArrayLayout1ul2ui8",wd);class T extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,h){const v=this.length;return this.resize(v+1),this.emplace(v,u,h)}emplace(u,h,v){const w=2*u;return this.uint16[w+0]=h,this.uint16[w+1]=v,u}}T.prototype.bytesPerElement=4,yr("StructArrayLayout2ui4",T);class l extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const h=this.length;return this.resize(h+1),this.emplace(h,u)}emplace(u,h){return this.uint16[1*u+0]=h,u}}l.prototype.bytesPerElement=2,yr("StructArrayLayout1ui2",l);class c extends Po{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,h,v,w){const K=this.length;return this.resize(K+1),this.emplace(K,u,h,v,w)}emplace(u,h,v,w,K){const L=4*u;return this.float32[L+0]=h,this.float32[L+1]=v,this.float32[L+2]=w,this.float32[L+3]=K,u}}c.prototype.bytesPerElement=16,yr("StructArrayLayout4f16",c);class _ extends xu{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 k(this.anchorPointX,this.anchorPointY)}}_.prototype.size=20;class M extends Ca{get(u){return new _(this,u)}}yr("CollisionBoxArray",M);class R extends xu{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]}}R.prototype.size=48;class j extends Mu{get(u){return new R(this,u)}}yr("PlacedSymbolArray",j);class $ extends xu{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]}}$.prototype.size=64;class te extends Sc{get(u){return new $(this,u)}}yr("SymbolInstanceArray",te);class se extends Yu{getoffsetX(u){return this.float32[1*u+0]}}yr("GlyphOffsetArray",se);class we extends ih{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}yr("SymbolLineVertexArray",we);class Ie extends xu{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]}}Ie.prototype.size=12;class Re extends Ql{get(u){return new Ie(this,u)}}yr("TextAnchorOffsetArray",Re);class $e extends xu{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 Ze extends wd{get(u){return new $e(this,u)}}yr("FeatureIndexArray",Ze);class ft extends EA{}class lt extends EA{}class pt extends EA{}class vt extends Qs{}class Bt extends wc{}class kt extends Gl{}class Rt extends hl{}class zt extends qu{}class Tt extends Mc{}class tn extends wu{}class Zt extends Xs{}class _n extends lu{}class bn extends cA{}class vn extends T{}const In=Is([{name:"a_pos",components:2,type:"Int16"}],4),{members:Wn}=In;class Sn{constructor(u=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=u}prepareSegment(u,h,v,w){const K=this.segments[this.segments.length-1];return u>Sn.MAX_VERTEX_ARRAY_LENGTH&&nt(`Max vertices per segment is ${Sn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Sn.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!K||K.vertexLength+u>Sn.MAX_VERTEX_ARRAY_LENGTH||K.sortKey!==w?this.createNewSegment(h,v,w):K}createNewSegment(u,h,v){const w={vertexOffset:u.length,primitiveOffset:h.length,vertexLength:0,primitiveLength:0,vaos:{}};return v!==void 0&&(w.sortKey=v),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(w),w}getOrCreateLatestSegment(u,h,v){return this.prepareSegment(0,u,h,v)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const u of this.segments)for(const h in u.vaos)u.vaos[h].destroy()}static simpleSegment(u,h,v,w){return new Sn([{vertexOffset:u,primitiveOffset:h,vertexLength:v,primitiveLength:w,vaos:{},sortKey:0}])}}function Tr(f,u){return 256*(f=yt(Math.floor(f),0,255))+yt(Math.floor(u),0,255)}Sn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,yr("SegmentVector",Sn);const Bi=Is([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var $i,Oo,Si,jo={exports:{}},No={exports:{}},xo={exports:{}},yo=function(){if(Si)return jo.exports;Si=1;var f=($i||($i=1,No.exports=function(h,v){var w,K,L,W,Z,ne,ce,be;for(K=h.length-(w=3&h.length),L=v,Z=3432918353,ne=461845907,be=0;be<K;)ce=255&h.charCodeAt(be)|(255&h.charCodeAt(++be))<<8|(255&h.charCodeAt(++be))<<16|(255&h.charCodeAt(++be))<<24,++be,L=27492+(65535&(W=5*(65535&(L=(L^=ce=(65535&(ce=(ce=(65535&ce)*Z+(((ce>>>16)*Z&65535)<<16)&4294967295)<<15|ce>>>17))*ne+(((ce>>>16)*ne&65535)<<16)&4294967295)<<13|L>>>19))+((5*(L>>>16)&65535)<<16)&4294967295))+((58964+(W>>>16)&65535)<<16);switch(ce=0,w){case 3:ce^=(255&h.charCodeAt(be+2))<<16;case 2:ce^=(255&h.charCodeAt(be+1))<<8;case 1:L^=ce=(65535&(ce=(ce=(65535&(ce^=255&h.charCodeAt(be)))*Z+(((ce>>>16)*Z&65535)<<16)&4294967295)<<15|ce>>>17))*ne+(((ce>>>16)*ne&65535)<<16)&4294967295}return L^=h.length,L=2246822507*(65535&(L^=L>>>16))+((2246822507*(L>>>16)&65535)<<16)&4294967295,L=3266489909*(65535&(L^=L>>>13))+((3266489909*(L>>>16)&65535)<<16)&4294967295,(L^=L>>>16)>>>0}),No.exports),u=(Oo||(Oo=1,xo.exports=function(h,v){for(var w,K=h.length,L=v^K,W=0;K>=4;)w=1540483477*(65535&(w=255&h.charCodeAt(W)|(255&h.charCodeAt(++W))<<8|(255&h.charCodeAt(++W))<<16|(255&h.charCodeAt(++W))<<24))+((1540483477*(w>>>16)&65535)<<16),L=1540483477*(65535&L)+((1540483477*(L>>>16)&65535)<<16)^(w=1540483477*(65535&(w^=w>>>24))+((1540483477*(w>>>16)&65535)<<16)),K-=4,++W;switch(K){case 3:L^=(255&h.charCodeAt(W+2))<<16;case 2:L^=(255&h.charCodeAt(W+1))<<8;case 1:L=1540483477*(65535&(L^=255&h.charCodeAt(W)))+((1540483477*(L>>>16)&65535)<<16)}return L=1540483477*(65535&(L^=L>>>13))+((1540483477*(L>>>16)&65535)<<16),(L^=L>>>15)>>>0}),xo.exports);return jo.exports=f,jo.exports.murmur3=f,jo.exports.murmur2=u,jo.exports}(),ka=d(yo);class Wo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,h,v,w){this.ids.push(ds(u)),this.positions.push(h,v,w)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=ds(u);let v=0,w=this.ids.length-1;for(;v<w;){const L=v+w>>1;this.ids[L]>=h?w=L:v=L+1}const K=[];for(;this.ids[v]===h;)K.push({index:this.positions[3*v],start:this.positions[3*v+1],end:this.positions[3*v+2]}),v++;return K}static serialize(u,h){const v=new Float64Array(u.ids),w=new Uint32Array(u.positions);return Wa(v,w,0,v.length-1),h&&h.push(v.buffer,w.buffer),{ids:v,positions:w}}static deserialize(u){const h=new Wo;return h.ids=u.ids,h.positions=u.positions,h.indexed=!0,h}}function ds(f){const u=+f;return!isNaN(u)&&u<=Number.MAX_SAFE_INTEGER?u:ka(String(f))}function Wa(f,u,h,v){for(;h<v;){const w=f[h+v>>1];let K=h-1,L=v+1;for(;;){do K++;while(f[K]<w);do L--;while(f[L]>w);if(K>=L)break;$u(f,K,L),$u(u,3*K,3*L),$u(u,3*K+1,3*L+1),$u(u,3*K+2,3*L+2)}L-h<v-L?(Wa(f,u,h,L),h=L+1):(Wa(f,u,L+1,v),v=L)}}function $u(f,u,h){const v=f[u];f[u]=f[h],f[h]=v}yr("FeaturePositionMap",Wo);class fl{constructor(u,h){this.gl=u.gl,this.location=h}}class pl extends fl{constructor(u,h){super(u,h),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class uu extends fl{constructor(u,h){super(u,h),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 OA extends fl{constructor(u,h){super(u,h),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 IA=new Float32Array(16);function Vu(f){return[Tr(255*f.r,255*f.g),Tr(255*f.b,255*f.a)]}class Js{constructor(u,h,v){this.value=u,this.uniformNames=h.map(w=>`u_${w}`),this.type=v}setUniform(u,h,v){u.set(v.constantOr(this.value))}getBinding(u,h,v){return this.type==="color"?new OA(u,h):new pl(u,h)}}class ml{constructor(u,h){this.uniformNames=h.map(v=>`u_${v}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=u.tlbr}setUniform(u,h,v,w){const K=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;K&&u.set(K)}getBinding(u,h,v){return v.substr(0,9)==="u_pattern"?new uu(u,h):new pl(u,h)}}class sa{constructor(u,h,v,w){this.expression=u,this.type=v,this.maxValue=0,this.paintVertexAttributes=h.map(K=>({name:`a_${K}`,type:"Float32",components:v==="color"?2:1,offset:0})),this.paintVertexArray=new w}populatePaintArray(u,h,v,w,K){const L=this.paintVertexArray.length,W=this.expression.evaluate(new Zo(0),h,{},w,[],K);this.paintVertexArray.resize(u),this._setPaintValue(L,u,W)}updatePaintArray(u,h,v,w){const K=this.expression.evaluate({zoom:0},v,w);this._setPaintValue(u,h,K)}_setPaintValue(u,h,v){if(this.type==="color"){const w=Vu(v);for(let K=u;K<h;K++)this.paintVertexArray.emplace(K,w[0],w[1])}else{for(let w=u;w<h;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 Pl{constructor(u,h,v,w,K,L){this.expression=u,this.uniformNames=h.map(W=>`u_${W}_t`),this.type=v,this.useIntegerZoom=w,this.zoom=K,this.maxValue=0,this.paintVertexAttributes=h.map(W=>({name:`a_${W}`,type:"Float32",components:v==="color"?4:2,offset:0})),this.paintVertexArray=new L}populatePaintArray(u,h,v,w,K){const L=this.expression.evaluate(new Zo(this.zoom),h,{},w,[],K),W=this.expression.evaluate(new Zo(this.zoom+1),h,{},w,[],K),Z=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(Z,u,L,W)}updatePaintArray(u,h,v,w){const K=this.expression.evaluate({zoom:this.zoom},v,w),L=this.expression.evaluate({zoom:this.zoom+1},v,w);this._setPaintValue(u,h,K,L)}_setPaintValue(u,h,v,w){if(this.type==="color"){const K=Vu(v),L=Vu(w);for(let W=u;W<h;W++)this.paintVertexArray.emplace(W,K[0],K[1],L[0],L[1])}else{for(let K=u;K<h;K++)this.paintVertexArray.emplace(K,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,h){const v=this.useIntegerZoom?Math.floor(h.zoom):h.zoom,w=yt(this.expression.interpolationFactor(v,this.zoom,this.zoom+1),0,1);u.set(w)}getBinding(u,h,v){return new pl(u,h)}}class xs{constructor(u,h,v,w,K,L){this.expression=u,this.type=h,this.useIntegerZoom=v,this.zoom=w,this.layerId=L,this.zoomInPaintVertexArray=new K,this.zoomOutPaintVertexArray=new K}populatePaintArray(u,h,v){const w=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(w,u,h.patterns&&h.patterns[this.layerId],v)}updatePaintArray(u,h,v,w,K){this._setPaintValues(u,h,v.patterns&&v.patterns[this.layerId],K)}_setPaintValues(u,h,v,w){if(!w||!v)return;const{min:K,mid:L,max:W}=v,Z=w[K],ne=w[L],ce=w[W];if(Z&&ne&&ce)for(let be=u;be<h;be++)this.zoomInPaintVertexArray.emplace(be,ne.tl[0],ne.tl[1],ne.br[0],ne.br[1],Z.tl[0],Z.tl[1],Z.br[0],Z.br[1],ne.pixelRatio,Z.pixelRatio),this.zoomOutPaintVertexArray.emplace(be,ne.tl[0],ne.tl[1],ne.br[0],ne.br[1],ce.tl[0],ce.tl[1],ce.br[0],ce.br[1],ne.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 qs{constructor(u,h,v){this.binders={},this._buffers=[];const w=[];for(const K in u.paint._values){if(!v(K))continue;const L=u.paint.get(K);if(!(L instanceof gs&&yu(L.property.specification)))continue;const W=rl(K,u.type),Z=L.value,ne=L.property.specification.type,ce=L.property.useIntegerZoom,be=L.property.specification["property-type"],Ke=be==="cross-faded"||be==="cross-faded-data-driven";if(Z.kind==="constant")this.binders[K]=Ke?new ml(Z.value,W):new Js(Z.value,W,ne),w.push(`/u_${K}`);else if(Z.kind==="source"||Ke){const Ue=Md(K,ne,"source");this.binders[K]=Ke?new xs(Z,ne,ce,h,Ue,u.id):new sa(Z,W,ne,Ue),w.push(`/a_${K}`)}else{const Ue=Md(K,ne,"composite");this.binders[K]=new Pl(Z,W,ne,ce,h,Ue),w.push(`/z_${K}`)}}this.cacheKey=w.sort().join("")}getMaxValue(u){const h=this.binders[u];return h instanceof sa||h instanceof Pl?h.maxValue:0}populatePaintArrays(u,h,v,w,K){for(const L in this.binders){const W=this.binders[L];(W instanceof sa||W instanceof Pl||W instanceof xs)&&W.populatePaintArray(u,h,v,w,K)}}setConstantPatternPositions(u,h){for(const v in this.binders){const w=this.binders[v];w instanceof ml&&w.setConstantPatternPositions(u,h)}}updatePaintArrays(u,h,v,w,K){let L=!1;for(const W in u){const Z=h.getPositions(W);for(const ne of Z){const ce=v.feature(ne.index);for(const be in this.binders){const Ke=this.binders[be];if((Ke instanceof sa||Ke instanceof Pl||Ke instanceof xs)&&Ke.expression.isStateDependent===!0){const Ue=w.paint.get(be);Ke.expression=Ue.value,Ke.updatePaintArray(ne.start,ne.end,ce,u[W],K),L=!0}}}}return L}defines(){const u=[];for(const h in this.binders){const v=this.binders[h];(v instanceof Js||v instanceof ml)&&u.push(...v.uniformNames.map(w=>`#define HAS_UNIFORM_${w}`))}return u}getBinderAttributes(){const u=[];for(const h in this.binders){const v=this.binders[h];if(v instanceof sa||v instanceof Pl)for(let w=0;w<v.paintVertexAttributes.length;w++)u.push(v.paintVertexAttributes[w].name);else if(v instanceof xs)for(let w=0;w<Bi.members.length;w++)u.push(Bi.members[w].name)}return u}getBinderUniforms(){const u=[];for(const h in this.binders){const v=this.binders[h];if(v instanceof Js||v instanceof ml||v instanceof Pl)for(const w of v.uniformNames)u.push(w)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,h){const v=[];for(const w in this.binders){const K=this.binders[w];if(K instanceof Js||K instanceof ml||K instanceof Pl){for(const L of K.uniformNames)if(h[L]){const W=K.getBinding(u,h[L],L);v.push({name:L,property:w,binding:W})}}}return v}setUniforms(u,h,v,w){for(const{name:K,property:L,binding:W}of h)this.binders[L].setUniform(W,w,v.get(L),K)}updatePaintBuffers(u){this._buffers=[];for(const h in this.binders){const v=this.binders[h];if(u&&v instanceof xs){const w=u.fromScale===2?v.zoomInPaintVertexBuffer:v.zoomOutPaintVertexBuffer;w&&this._buffers.push(w)}else(v instanceof sa||v instanceof Pl)&&v.paintVertexBuffer&&this._buffers.push(v.paintVertexBuffer)}}upload(u){for(const h in this.binders){const v=this.binders[h];(v instanceof sa||v instanceof Pl||v instanceof xs)&&v.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const h=this.binders[u];(h instanceof sa||h instanceof Pl||h instanceof xs)&&h.destroy()}}}class nl{constructor(u,h,v=()=>!0){this.programConfigurations={};for(const w of u)this.programConfigurations[w.id]=new qs(w,h,v);this.needsUpload=!1,this._featureMap=new Wo,this._bufferOffset=0}populatePaintArrays(u,h,v,w,K,L){for(const W in this.programConfigurations)this.programConfigurations[W].populatePaintArrays(u,h,w,K,L);h.id!==void 0&&this._featureMap.add(h.id,v,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,h,v,w){for(const K of v)this.needsUpload=this.programConfigurations[K.id].updatePaintArrays(u,this._featureMap,h,K,w)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function rl(f,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"]}[f]||[f.replace(`${u}-`,"").replace(/-/g,"_")]}function Md(f,u,h){const v={color:{source:Gl,composite:c},number:{source:Yu,composite:Gl}},w=function(K){return{"line-pattern":{source:Rt,composite:Rt},"fill-pattern":{source:Rt,composite:Rt},"fill-extrusion-pattern":{source:Rt,composite:Rt}}[K]}(f);return w&&w[h]||v[u][h]}yr("ConstantBinder",Js),yr("CrossFadedConstantBinder",ml),yr("SourceExpressionBinder",sa),yr("CrossFadedCompositeBinder",xs),yr("CompositeExpressionBinder",Pl),yr("ProgramConfiguration",qs,{omit:["_buffers"]}),yr("ProgramConfigurationSet",nl);const Bh=Math.pow(2,14)-1,Oh=-Bh-1;function Sd(f){const u=at/f.extent,h=f.loadGeometry();for(let v=0;v<h.length;v++){const w=h[v];for(let K=0;K<w.length;K++){const L=w[K],W=Math.round(L.x*u),Z=Math.round(L.y*u);L.x=yt(W,Oh,Bh),L.y=yt(Z,Oh,Bh),(W<L.x||W>L.x+1||Z<L.y||Z>L.y+1)&&nt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function ic(f,u){return{type:f.type,id:f.id,properties:f.properties,geometry:u?Sd(f):[]}}const Ih=-32768;function Ta(f,u,h,v,w){f.emplaceBack(Ih+8*u+v,Ih+8*h+w)}class Au{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(h=>h.id),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new lt,this.indexArray=new bn,this.segments=new Sn,this.programConfigurations=new nl(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(u,h,v){const w=this.layers[0],K=[];let L=null,W=!1,Z=w.type==="heatmap";if(w.type==="circle"){const ce=w;L=ce.layout.get("circle-sort-key"),W=!L.isConstant(),Z=Z||ce.paint.get("circle-pitch-alignment")==="map"}const ne=Z?h.subdivisionGranularity.circle:1;for(const{feature:ce,id:be,index:Ke,sourceLayerIndex:Ue}of u){const Ne=this.layers[0]._featureFilter.needGeometry,Xe=ic(ce,Ne);if(!this.layers[0]._featureFilter.filter(new Zo(this.zoom),Xe,v))continue;const ut=W?L.evaluate(Xe,{},v):void 0,Ct={id:be,properties:ce.properties,type:ce.type,sourceLayerIndex:Ue,index:Ke,geometry:Ne?Xe.geometry:Sd(ce),patterns:{},sortKey:ut};K.push(Ct)}W&&K.sort((ce,be)=>ce.sortKey-be.sortKey);for(const ce of K){const{geometry:be,index:Ke,sourceLayerIndex:Ue}=ce,Ne=u[Ke].feature;this.addFeature(ce,be,Ke,v,ne),h.featureIndex.insert(Ne,be,Ke,Ue,this.index)}}update(u,h,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,h,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,Wn),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,h,v,w,K=1){let L;switch(K){case 1:L=[0,7];break;case 3:L=[0,2,5,7];break;case 5:L=[0,1,3,4,6,7];break;case 7:L=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${K}; valid values are 1, 3, 5, 7.`)}const W=L.length;for(const Z of h)for(const ne of Z){const ce=ne.x,be=ne.y;if(ce<0||ce>=at||be<0||be>=at)continue;const Ke=this.segments.prepareSegment(W*W,this.layoutVertexArray,this.indexArray,u.sortKey),Ue=Ke.vertexLength;for(let Ne=0;Ne<W;Ne++)for(let Xe=0;Xe<W;Xe++)Ta(this.layoutVertexArray,ce,be,L[Xe],L[Ne]);for(let Ne=0;Ne<W-1;Ne++)for(let Xe=0;Xe<W-1;Xe++){const ut=Ue+Ne*W+Xe,Ct=Ue+(Ne+1)*W+Xe;this.indexArray.emplaceBack(ut,Ct+1,ut+1),this.indexArray.emplaceBack(ut,Ct,Ct+1)}Ke.vertexLength+=W*W,Ke.primitiveLength+=(W-1)*(W-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,{},w)}}function Ed(f,u){for(let h=0;h<f.length;h++)if(Bc(u,f[h]))return!0;for(let h=0;h<u.length;h++)if(Bc(f,u[h]))return!0;return!!Ga(f,u)}function Cp(f,u,h){return!!Bc(f,u)||!!kh(u,f,h)}function Ec(f,u){if(f.length===1)return oh(u,f[0]);for(let h=0;h<u.length;h++){const v=u[h];for(let w=0;w<v.length;w++)if(Bc(f,v[w]))return!0}for(let h=0;h<f.length;h++)if(oh(u,f[h]))return!0;for(let h=0;h<u.length;h++)if(Ga(f,u[h]))return!0;return!1}function kA(f,u,h){if(f.length>1){if(Ga(f,u))return!0;for(let v=0;v<u.length;v++)if(kh(u[v],f,h))return!0}for(let v=0;v<f.length;v++)if(kh(f[v],u,h))return!0;return!1}function Ga(f,u){if(f.length===0||u.length===0)return!1;for(let h=0;h<f.length-1;h++){const v=f[h],w=f[h+1];for(let K=0;K<u.length-1;K++)if(_p(v,w,u[K],u[K+1]))return!0}return!1}function _p(f,u,h,v){return _t(f,h,v)!==_t(u,h,v)&&_t(f,u,h)!==_t(f,u,v)}function kh(f,u,h){const v=h*h;if(u.length===1)return f.distSqr(u[0])<v;for(let w=1;w<u.length;w++)if(bp(f,u[w-1],u[w])<v)return!0;return!1}function bp(f,u,h){const v=u.distSqr(h);if(v===0)return f.distSqr(u);const w=((f.x-u.x)*(h.x-u.x)+(f.y-u.y)*(h.y-u.y))/v;return f.distSqr(w<0?u:w>1?h:h.sub(u)._mult(w)._add(u))}function oh(f,u){let h,v,w,K=!1;for(let L=0;L<f.length;L++){h=f[L];for(let W=0,Z=h.length-1;W<h.length;Z=W++)v=h[W],w=h[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&&(K=!K)}return K}function Bc(f,u){let h=!1;for(let v=0,w=f.length-1;v<f.length;w=v++){const K=f[v],L=f[w];K.y>u.y!=L.y>u.y&&u.x<(L.x-K.x)*(u.y-K.y)/(L.y-K.y)+K.x&&(h=!h)}return h}function um(f,u,h){const v=h[0],w=h[2];if(f.x<v.x&&u.x<v.x||f.x>w.x&&u.x>w.x||f.y<v.y&&u.y<v.y||f.y>w.y&&u.y>w.y)return!1;const K=_t(f,u,h[0]);return K!==_t(f,u,h[1])||K!==_t(f,u,h[2])||K!==_t(f,u,h[3])}function oc(f,u,h){const v=u.paint.get(f).value;return v.kind==="constant"?v.value:h.programConfigurations.get(u.id).getMaxValue(f)}function Th(f){return Math.sqrt(f[0]*f[0]+f[1]*f[1])}function Bd(f,u,h,v,w){if(!u[0]&&!u[1])return f;const K=k.convert(u)._mult(w);h==="viewport"&&K._rotate(-v);const L=[];for(let W=0;W<f.length;W++)L.push(f[W].sub(K));return L}let xp,sh;yr("CircleBucket",Au,{omit:["layers"]});var Lf={get paint(){return sh=sh||new bs({"circle-radius":new Hr(Be.paint_circle["circle-radius"]),"circle-color":new Hr(Be.paint_circle["circle-color"]),"circle-blur":new Hr(Be.paint_circle["circle-blur"]),"circle-opacity":new Hr(Be.paint_circle["circle-opacity"]),"circle-translate":new gr(Be.paint_circle["circle-translate"]),"circle-translate-anchor":new gr(Be.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new gr(Be.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new gr(Be.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Hr(Be.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Hr(Be.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Hr(Be.paint_circle["circle-stroke-opacity"])})},get layout(){return xp=xp||new bs({"circle-sort-key":new Hr(Be.layout_circle["circle-sort-key"])})}};class Uf extends su{constructor(u){super(u,Lf)}createBucket(u){return new Au(u)}queryRadius(u){const h=u;return oc("circle-radius",this,h)+oc("circle-stroke-width",this,h)+Th(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:u,feature:h,featureState:v,geometry:w,transform:K,pixelsToTileUnits:L,pixelPosMatrix:W}){const Z=Bd(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-K.bearingInRadians,L),ne=this.paint.get("circle-radius").evaluate(h,v)+this.paint.get("circle-stroke-width").evaluate(h,v),ce=this.paint.get("circle-pitch-alignment")==="map",be=ce?Z:function(Ue,Ne){return Ue.map(Xe=>wp(Xe,Ne))}(Z,W),Ke=ce?ne*L:ne;for(const Ue of w)for(const Ne of Ue){const Xe=ce?Ne:wp(Ne,W);let ut=Ke;const Ct=fe([],[Ne.x,Ne.y,0,1],W);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ut*=Ct[3]/K.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ut*=K.cameraToCenterDistance/Ct[3]),Cp(be,Xe,ut))return!0}return!1}}function wp(f,u){const h=fe([],[f.x,f.y,0,1],u);return new k(h[0]/h[3],h[1]/h[3])}class Od extends Au{}let sf;yr("HeatmapBucket",Od,{omit:["layers"]});var ql={get paint(){return sf=sf||new bs({"heatmap-radius":new Hr(Be.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Hr(Be.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new gr(Be.paint_heatmap["heatmap-intensity"]),"heatmap-color":new bu(Be.paint_heatmap["heatmap-color"]),"heatmap-opacity":new gr(Be.paint_heatmap["heatmap-opacity"])})}};function Rl(f,{width:u,height:h},v,w){if(w){if(w instanceof Uint8ClampedArray)w=new Uint8Array(w.buffer);else if(w.length!==u*h*v)throw new RangeError(`mismatched image size. expected: ${w.length} but got: ${u*h*v}`)}else w=new Uint8Array(u*h*v);return f.width=u,f.height=h,f.data=w,f}function Am(f,{width:u,height:h},v){if(u===f.width&&h===f.height)return;const w=Rl({},{width:u,height:h},v);zf(f,w,{x:0,y:0},{x:0,y:0},{width:Math.min(f.width,u),height:Math.min(f.height,h)},v),f.width=u,f.height=h,f.data=w.data}function zf(f,u,h,v,w,K){if(w.width===0||w.height===0)return u;if(w.width>f.width||w.height>f.height||h.x>f.width-w.width||h.y>f.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 L=f.data,W=u.data;if(L===W)throw new Error("srcData equals dstData, so image is already copied");for(let Z=0;Z<w.height;Z++){const ne=((h.y+Z)*f.width+h.x)*K,ce=((v.y+Z)*u.width+v.x)*K;for(let be=0;be<w.width*K;be++)W[ce+be]=L[ne+be]}return u}class Io{constructor(u,h){Rl(this,u,1,h)}resize(u){Am(this,u,1)}clone(){return new Io({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,h,v,w,K){zf(u,h,v,w,K,1)}}class Hu{constructor(u,h){Rl(this,u,4,h)}resize(u){Am(this,u,4)}replace(u,h){h?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Hu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,h,v,w,K){zf(u,h,v,w,K,4)}}function af(f){const u={},h=f.resolution||256,v=f.clips?f.clips.length:1,w=f.image||new Hu({width:h,height:v});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const K=(L,W,Z)=>{u[f.evaluationKey]=Z;const ne=f.expression.evaluate(u);w.data[L+W+0]=Math.floor(255*ne.r/ne.a),w.data[L+W+1]=Math.floor(255*ne.g/ne.a),w.data[L+W+2]=Math.floor(255*ne.b/ne.a),w.data[L+W+3]=Math.floor(255*ne.a)};if(f.clips)for(let L=0,W=0;L<v;++L,W+=4*h)for(let Z=0,ne=0;Z<h;Z++,ne+=4){const ce=Z/(h-1),{start:be,end:Ke}=f.clips[L];K(W,ne,be*(1-ce)+Ke*ce)}else for(let L=0,W=0;L<h;L++,W+=4)K(0,W,L/(h-1));return w}yr("AlphaImage",Io),yr("RGBAImage",Hu);const Id="big-fb";class TA extends su{createBucket(u){return new Od(u)}constructor(u){super(u,ql),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){u==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=af({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Id)&&this.heatmapFbos.delete(Id)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Ph;var Mp={get paint(){return Ph=Ph||new bs({"hillshade-illumination-direction":new gr(Be.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new gr(Be.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new gr(Be.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new gr(Be.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new gr(Be.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new gr(Be.paint_hillshade["hillshade-accent-color"])})}};class Oc extends su{constructor(u){super(u,Mp)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const lf=Is([{name:"a_pos",components:2,type:"Int16"}],4),{members:uf}=lf;function ah(f,u,h){const v=h.patternDependencies;let w=!1;for(const K of u){const L=K.paint.get(`${f}-pattern`);L.isConstant()||(w=!0);const W=L.constantOr(null);W&&(w=!0,v[W.to]=!0,v[W.from]=!0)}return w}function kd(f,u,h,v,w){const K=w.patternDependencies;for(const L of u){const W=L.paint.get(`${f}-pattern`).value;if(W.kind!=="constant"){let Z=W.evaluate({zoom:v-1},h,{},w.availableImages),ne=W.evaluate({zoom:v},h,{},w.availableImages),ce=W.evaluate({zoom:v+1},h,{},w.availableImages);Z=Z&&Z.name?Z.name:Z,ne=ne&&ne.name?ne.name:ne,ce=ce&&ce.name?ce.name:ce,K[Z]=!0,K[ne]=!0,K[ce]=!0,h.patterns[L.id]={min:Z,mid:ne,max:ce}}}return h}function Hc(f,u,h,v,w){let K;if(w===function(L,W,Z,ne){let ce=0;for(let be=W,Ke=Z-ne;be<Z;be+=ne)ce+=(L[Ke]-L[be])*(L[be+1]+L[Ke+1]),Ke=be;return ce}(f,u,h,v)>0)for(let L=u;L<h;L+=v)K=_e(L/v|0,f[L],f[L+1],K);else for(let L=h-v;L>=u;L-=v)K=_e(L/v|0,f[L],f[L+1],K);return K&&y(K,K.next)&&(ke(K),K=K.next),K}function di(f,u){if(!f)return f;u||(u=f);let h,v=f;do if(h=!1,v.steiner||!y(v,v.next)&&A(v.prev,v,v.next)!==0)v=v.next;else{if(ke(v),v=u=v.prev,v===v.next)break;h=!0}while(h||v!==u);return u}function Zc(f,u,h,v,w,K,L){if(!f)return;!L&&K&&function(Z,ne,ce,be){let Ke=Z;do Ke.z===0&&(Ke.z=ha(Ke.x,Ke.y,ne,ce,be)),Ke.prevZ=Ke.prev,Ke.nextZ=Ke.next,Ke=Ke.next;while(Ke!==Z);Ke.prevZ.nextZ=null,Ke.prevZ=null,function(Ue){let Ne,Xe=1;do{let ut,Ct=Ue;Ue=null;let Nt=null;for(Ne=0;Ct;){Ne++;let Et=Ct,Fe=0;for(let Ot=0;Ot<Xe&&(Fe++,Et=Et.nextZ,Et);Ot++);let st=Xe;for(;Fe>0||st>0&&Et;)Fe!==0&&(st===0||!Et||Ct.z<=Et.z)?(ut=Ct,Ct=Ct.nextZ,Fe--):(ut=Et,Et=Et.nextZ,st--),Nt?Nt.nextZ=ut:Ue=ut,ut.prevZ=Nt,Nt=ut;Ct=Et}Nt.nextZ=null,Xe*=2}while(Ne>1)}(Ke)}(f,v,w,K);let W=f;for(;f.prev!==f.next;){const Z=f.prev,ne=f.next;if(K?Td(f,v,w,K):is(f))u.push(Z.i,f.i,ne.i),ke(f),f=ne.next,W=ne.next;else if((f=ne)===W){L?L===1?Zc(f=Sp(di(f),u),u,h,v,w,K,2):L===2&&Su(f,u,h,v,w,K):Zc(di(f),u,h,v,w,K,1);break}}}function is(f){const u=f.prev,h=f,v=f.next;if(A(u,h,v)>=0)return!1;const w=u.x,K=h.x,L=v.x,W=u.y,Z=h.y,ne=v.y,ce=Math.min(w,K,L),be=Math.min(W,Z,ne),Ke=Math.max(w,K,L),Ue=Math.max(W,Z,ne);let Ne=v.next;for(;Ne!==u;){if(Ne.x>=ce&&Ne.x<=Ke&&Ne.y>=be&&Ne.y<=Ue&&il(w,W,K,Z,L,ne,Ne.x,Ne.y)&&A(Ne.prev,Ne,Ne.next)>=0)return!1;Ne=Ne.next}return!0}function Td(f,u,h,v){const w=f.prev,K=f,L=f.next;if(A(w,K,L)>=0)return!1;const W=w.x,Z=K.x,ne=L.x,ce=w.y,be=K.y,Ke=L.y,Ue=Math.min(W,Z,ne),Ne=Math.min(ce,be,Ke),Xe=Math.max(W,Z,ne),ut=Math.max(ce,be,Ke),Ct=ha(Ue,Ne,u,h,v),Nt=ha(Xe,ut,u,h,v);let Et=f.prevZ,Fe=f.nextZ;for(;Et&&Et.z>=Ct&&Fe&&Fe.z<=Nt;){if(Et.x>=Ue&&Et.x<=Xe&&Et.y>=Ne&&Et.y<=ut&&Et!==w&&Et!==L&&il(W,ce,Z,be,ne,Ke,Et.x,Et.y)&&A(Et.prev,Et,Et.next)>=0||(Et=Et.prevZ,Fe.x>=Ue&&Fe.x<=Xe&&Fe.y>=Ne&&Fe.y<=ut&&Fe!==w&&Fe!==L&&il(W,ce,Z,be,ne,Ke,Fe.x,Fe.y)&&A(Fe.prev,Fe,Fe.next)>=0))return!1;Fe=Fe.nextZ}for(;Et&&Et.z>=Ct;){if(Et.x>=Ue&&Et.x<=Xe&&Et.y>=Ne&&Et.y<=ut&&Et!==w&&Et!==L&&il(W,ce,Z,be,ne,Ke,Et.x,Et.y)&&A(Et.prev,Et,Et.next)>=0)return!1;Et=Et.prevZ}for(;Fe&&Fe.z<=Nt;){if(Fe.x>=Ue&&Fe.x<=Xe&&Fe.y>=Ne&&Fe.y<=ut&&Fe!==w&&Fe!==L&&il(W,ce,Z,be,ne,Ke,Fe.x,Fe.y)&&A(Fe.prev,Fe,Fe.next)>=0)return!1;Fe=Fe.nextZ}return!0}function Sp(f,u){let h=f;do{const v=h.prev,w=h.next.next;!y(v,w)&&I(v,h,h.next,w)&&H(v,w)&&H(w,v)&&(u.push(v.i,h.i,w.i),ke(h),ke(h.next),h=f=w),h=h.next}while(h!==f);return di(h)}function Su(f,u,h,v,w,K){let L=f;do{let W=L.next.next;for(;W!==L.prev;){if(L.i!==W.i&&Ep(L,W)){let Z=ue(L,W);return L=di(L,L.next),Z=di(Z,Z.next),Zc(L,u,h,v,w,K,0),void Zc(Z,u,h,v,w,K,0)}W=W.next}L=L.next}while(L!==f)}function Ym(f,u){let h=f.x-u.x;return h===0&&(h=f.y-u.y,h===0)&&(h=(f.next.y-f.y)/(f.next.x-f.x)-(u.next.y-u.y)/(u.next.x-u.x)),h}function gl(f,u){const h=function(w,K){let L=K;const W=w.x,Z=w.y;let ne,ce=-1/0;if(y(w,L))return L;do{if(y(w,L.next))return L.next;if(Z<=L.y&&Z>=L.next.y&&L.next.y!==L.y){const Xe=L.x+(Z-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(Xe<=W&&Xe>ce&&(ce=Xe,ne=L.x<L.next.x?L:L.next,Xe===W))return ne}L=L.next}while(L!==K);if(!ne)return null;const be=ne,Ke=ne.x,Ue=ne.y;let Ne=1/0;L=ne;do{if(W>=L.x&&L.x>=Ke&&W!==L.x&&Af(Z<Ue?W:ce,Z,Ke,Ue,Z<Ue?ce:W,Z,L.x,L.y)){const Xe=Math.abs(Z-L.y)/(W-L.x);H(L,w)&&(Xe<Ne||Xe===Ne&&(L.x>ne.x||L.x===ne.x&&cm(ne,L)))&&(ne=L,Ne=Xe)}L=L.next}while(L!==be);return ne}(f,u);if(!h)return u;const v=ue(h,f);return di(v,v.next),di(h,h.next)}function cm(f,u){return A(f.prev,f,u.prev)<0&&A(u.next,f,f.next)<0}function ha(f,u,h,v,w){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=(f-h)*w|0)|f<<8))|f<<4))|f<<2))|f<<1))|(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-v)*w|0)|u<<8))|u<<4))|u<<2))|u<<1))<<1}function dm(f){let u=f,h=f;do(u.x<h.x||u.x===h.x&&u.y<h.y)&&(h=u),u=u.next;while(u!==f);return h}function Af(f,u,h,v,w,K,L,W){return(w-L)*(u-W)>=(f-L)*(K-W)&&(f-L)*(v-W)>=(h-L)*(u-W)&&(h-L)*(K-W)>=(w-L)*(v-W)}function il(f,u,h,v,w,K,L,W){return!(f===L&&u===W)&&Af(f,u,h,v,w,K,L,W)}function Ep(f,u){return f.next.i!==u.i&&f.prev.i!==u.i&&!function(h,v){let w=h;do{if(w.i!==h.i&&w.next.i!==h.i&&w.i!==v.i&&w.next.i!==v.i&&I(w,w.next,h,v))return!0;w=w.next}while(w!==h);return!1}(f,u)&&(H(f,u)&&H(u,f)&&function(h,v){let w=h,K=!1;const L=(h.x+v.x)/2,W=(h.y+v.y)/2;do w.y>W!=w.next.y>W&&w.next.y!==w.y&&L<(w.next.x-w.x)*(W-w.y)/(w.next.y-w.y)+w.x&&(K=!K),w=w.next;while(w!==h);return K}(f,u)&&(A(f.prev,f,u.prev)||A(f,u.prev,u))||y(f,u)&&A(f.prev,f,f.next)>0&&A(u.prev,u,u.next)>0)}function A(f,u,h){return(u.y-f.y)*(h.x-u.x)-(u.x-f.x)*(h.y-u.y)}function y(f,u){return f.x===u.x&&f.y===u.y}function I(f,u,h,v){const w=D(A(f,u,h)),K=D(A(f,u,v)),L=D(A(h,v,f)),W=D(A(h,v,u));return w!==K&&L!==W||!(w!==0||!B(f,h,u))||!(K!==0||!B(f,v,u))||!(L!==0||!B(h,f,v))||!(W!==0||!B(h,u,v))}function B(f,u,h){return u.x<=Math.max(f.x,h.x)&&u.x>=Math.min(f.x,h.x)&&u.y<=Math.max(f.y,h.y)&&u.y>=Math.min(f.y,h.y)}function D(f){return f>0?1:f<0?-1:0}function H(f,u){return A(f.prev,f,f.next)<0?A(f,u,f.next)>=0&&A(f,f.prev,u)>=0:A(f,u,f.prev)<0||A(f,f.next,u)<0}function ue(f,u){const h=ze(f.i,f.x,f.y),v=ze(u.i,u.x,u.y),w=f.next,K=u.prev;return f.next=u,u.prev=f,h.next=w,w.prev=h,v.next=h,h.prev=v,K.next=v,v.prev=K,v}function _e(f,u,h,v){const w=ze(f,u,h);return v?(w.next=v.next,w.prev=v,v.next.prev=w,v.next=w):(w.prev=w,w.next=w),w}function ke(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function ze(f,u,h){return{i:f,x:u,y:h,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class mt{constructor(u,h){if(h>u)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=u,this._minGranularity=h}getGranularityForZoomLevel(u){return Math.max(Math.floor(this._baseZoomGranularity/(1<<u)),this._minGranularity,1)}}class Mt{constructor(u){this.fill=u.fill,this.line=u.line,this.tile=u.tile,this.stencil=u.stencil,this.circle=u.circle}}Mt.noSubdivision=new Mt({fill:new mt(0,0),line:new mt(0,0),tile:new mt(0,0),stencil:new mt(0,0),circle:1}),yr("SubdivisionGranularityExpression",mt),yr("SubdivisionGranularitySetting",Mt);const Xt=-32768,Qt=32767;class Mn{constructor(u,h){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=u,this._granularityCellSize=at/u,this._canonical=h}_getKey(u,h){return(u+=32768)<<16|(h+=32768)<<0}_vertexToIndex(u,h){if(u<-32768||h<-32768||u>32767||h>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const v=0|Math.round(u),w=0|Math.round(h),K=this._getKey(v,w);if(this._vertexDictionary.has(K))return this._vertexDictionary.get(K);const L=this._vertexBuffer.length/2;return this._vertexDictionary.set(K,L),this._vertexBuffer.push(v,w),L}_subdivideTrianglesScanline(u){if(this._granularity<2)return function(w,K){const L=[];for(let W=0;W<K.length;W+=3){const Z=K[W],ne=K[W+1],ce=K[W+2],be=w[2*Z],Ke=w[2*Z+1];(w[2*ne]-be)*(w[2*ce+1]-Ke)-(w[2*ne+1]-Ke)*(w[2*ce]-be)>0?(L.push(Z),L.push(ce),L.push(ne)):(L.push(Z),L.push(ne),L.push(ce))}return L}(this._vertexBuffer,u);const h=[],v=u.length;for(let w=0;w<v;w+=3){const K=[u[w+0],u[w+1],u[w+2]],L=[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 W=1/0,Z=1/0,ne=-1/0,ce=-1/0;for(let Xe=0;Xe<3;Xe++){const ut=L[2*Xe],Ct=L[2*Xe+1];W=Math.min(W,ut),ne=Math.max(ne,ut),Z=Math.min(Z,Ct),ce=Math.max(ce,Ct)}if(W===ne||Z===ce)continue;const be=Math.floor(W/this._granularityCellSize),Ke=Math.ceil(ne/this._granularityCellSize),Ue=Math.floor(Z/this._granularityCellSize),Ne=Math.ceil(ce/this._granularityCellSize);if(be!==Ke||Ue!==Ne)for(let Xe=Ue;Xe<Ne;Xe++){const ut=this._scanlineGenerateVertexRingForCellRow(Xe,L,K);or(this._vertexBuffer,ut,h)}else h.push(...K)}return h}_scanlineGenerateVertexRingForCellRow(u,h,v){const w=u*this._granularityCellSize,K=w+this._granularityCellSize,L=[];for(let W=0;W<3;W++){const Z=h[2*W],ne=h[2*W+1],ce=h[2*(W+1)%6],be=h[(2*(W+1)+1)%6],Ke=h[2*(W+2)%6],Ue=h[(2*(W+2)+1)%6],Ne=ce-Z,Xe=be-ne,ut=Ne===0,Ct=Xe===0,Nt=(w-ne)/Xe,Et=(K-ne)/Xe,Fe=Math.min(Nt,Et),st=Math.max(Nt,Et);if(!Ct&&(Fe>=1||st<=0)||Ct&&(ne<w||ne>K)){be>=w&&be<=K&&L.push(v[(W+1)%3]);continue}!Ct&&Fe>0&&L.push(this._vertexToIndex(Z+Ne*Fe,ne+Xe*Fe));const Ot=Z+Ne*Math.max(Fe,0),un=Z+Ne*Math.min(st,1);ut||this._generateIntraEdgeVertices(L,Z,ne,ce,be,Ot,un),!Ct&&st<1&&L.push(this._vertexToIndex(Z+Ne*st,ne+Xe*st)),(Ct||be>=w&&be<=K)&&L.push(v[(W+1)%3]),!Ct&&(be<=w||be>=K)&&this._generateInterEdgeVertices(L,Z,ne,ce,be,Ke,Ue,un,w,K)}return L}_generateIntraEdgeVertices(u,h,v,w,K,L,W){const Z=w-h,ne=K-v,ce=ne===0,be=ce?Math.min(h,w):Math.min(L,W),Ke=ce?Math.max(h,w):Math.max(L,W),Ue=Math.floor(be/this._granularityCellSize)+1,Ne=Math.ceil(Ke/this._granularityCellSize)-1;if(ce?h<w:L<W)for(let Xe=Ue;Xe<=Ne;Xe++){const ut=Xe*this._granularityCellSize;u.push(this._vertexToIndex(ut,v+ne*(ut-h)/Z))}else for(let Xe=Ne;Xe>=Ue;Xe--){const ut=Xe*this._granularityCellSize;u.push(this._vertexToIndex(ut,v+ne*(ut-h)/Z))}}_generateInterEdgeVertices(u,h,v,w,K,L,W,Z,ne,ce){const be=K-v,Ke=L-w,Ue=W-K,Ne=(ne-K)/Ue,Xe=(ce-K)/Ue,ut=Math.min(Ne,Xe),Ct=Math.max(Ne,Xe),Nt=w+Ke*ut;let Et=Math.floor(Math.min(Nt,Z)/this._granularityCellSize)+1,Fe=Math.ceil(Math.max(Nt,Z)/this._granularityCellSize)-1,st=Z<Nt;const Ot=Ue===0;if(Ot&&(W===ne||W===ce))return;if(Ot||ut>=1||Ct<=0){const zn=v-W,yn=L+(h-L)*Math.min((ne-W)/zn,(ce-W)/zn);Et=Math.floor(Math.min(yn,Z)/this._granularityCellSize)+1,Fe=Math.ceil(Math.max(yn,Z)/this._granularityCellSize)-1,st=Z<yn}const un=be>0?ce:ne;if(st)for(let zn=Et;zn<=Fe;zn++)u.push(this._vertexToIndex(zn*this._granularityCellSize,un));else for(let zn=Fe;zn>=Et;zn--)u.push(this._vertexToIndex(zn*this._granularityCellSize,un))}_generateOutline(u){const h=[];for(const v of u){const w=Zn(v,this._granularity,!0),K=this._pointArrayToIndices(w),L=[];for(let W=1;W<K.length;W++)L.push(K[W-1]),L.push(K[W]);h.push(L)}return h}_handlePoles(u){let h=!1,v=!1;this._canonical&&(this._canonical.y===0&&(h=!0),this._canonical.y===(1<<this._canonical.z)-1&&(v=!0)),(h||v)&&this._fillPoles(u,h,v)}_ensureNoPoleVertices(){const u=this._vertexBuffer;for(let h=0;h<u.length;h+=2){const v=u[h+1];v===Xt&&(u[h+1]=-32767),v===Qt&&(u[h+1]=32766)}}_generatePoleQuad(u,h,v,w,K,L){w>K!=(L===Xt)?(u.push(h),u.push(v),u.push(this._vertexToIndex(w,L)),u.push(v),u.push(this._vertexToIndex(K,L)),u.push(this._vertexToIndex(w,L))):(u.push(v),u.push(h),u.push(this._vertexToIndex(w,L)),u.push(this._vertexToIndex(K,L)),u.push(v),u.push(this._vertexToIndex(w,L)))}_fillPoles(u,h,v){const w=this._vertexBuffer,K=at,L=u.length;for(let W=2;W<L;W+=3){const Z=u[W-2],ne=u[W-1],ce=u[W],be=w[2*Z],Ke=w[2*Z+1],Ue=w[2*ne],Ne=w[2*ne+1],Xe=w[2*ce],ut=w[2*ce+1];h&&(Ke===0&&Ne===0&&this._generatePoleQuad(u,Z,ne,be,Ue,Xt),Ne===0&&ut===0&&this._generatePoleQuad(u,ne,ce,Ue,Xe,Xt),ut===0&&Ke===0&&this._generatePoleQuad(u,ce,Z,Xe,be,Xt)),v&&(Ke===K&&Ne===K&&this._generatePoleQuad(u,Z,ne,be,Ue,Qt),Ne===K&&ut===K&&this._generatePoleQuad(u,ne,ce,Ue,Xe,Qt),ut===K&&Ke===K&&this._generatePoleQuad(u,ce,Z,Xe,be,Qt))}}_initializeVertices(u){for(let h=0;h<u.length;h+=2)this._vertexToIndex(u[h],u[h+1])}subdividePolygonInternal(u,h){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:v,holeIndices:w}=function(W){const Z=[],ne=[];for(const ce of W)if(ce.length!==0){ce!==W[0]&&Z.push(ne.length/2);for(let be=0;be<ce.length;be++)ne.push(ce[be].x),ne.push(ce[be].y)}return{flattened:ne,holeIndices:Z}}(u);let K;this._initializeVertices(v);try{const W=function(ne,ce,be=2){const Ke=ce&&ce.length,Ue=Ke?ce[0]*be:ne.length;let Ne=Hc(ne,0,Ue,be,!0);const Xe=[];if(!Ne||Ne.next===Ne.prev)return Xe;let ut,Ct,Nt;if(Ke&&(Ne=function(Et,Fe,st,Ot){const un=[];for(let zn=0,yn=Fe.length;zn<yn;zn++){const wn=Hc(Et,Fe[zn]*Ot,zn<yn-1?Fe[zn+1]*Ot:Et.length,Ot,!1);wn===wn.next&&(wn.steiner=!0),un.push(dm(wn))}un.sort(Ym);for(let zn=0;zn<un.length;zn++)st=gl(un[zn],st);return st}(ne,ce,Ne,be)),ne.length>80*be){ut=1/0,Ct=1/0;let Et=-1/0,Fe=-1/0;for(let st=be;st<Ue;st+=be){const Ot=ne[st],un=ne[st+1];Ot<ut&&(ut=Ot),un<Ct&&(Ct=un),Ot>Et&&(Et=Ot),un>Fe&&(Fe=un)}Nt=Math.max(Et-ut,Fe-Ct),Nt=Nt!==0?32767/Nt:0}return Zc(Ne,Xe,be,ut,Ct,Nt,0),Xe}(v,w),Z=this._convertIndices(v,W);K=this._subdivideTrianglesScanline(Z)}catch(W){console.error(W)}let L=[];return h&&(L=this._generateOutline(u)),this._ensureNoPoleVertices(),this._handlePoles(K),{verticesFlattened:this._vertexBuffer,indicesTriangles:K,indicesLineList:L}}_convertIndices(u,h){const v=[];for(let w=0;w<h.length;w++)v.push(this._vertexToIndex(u[2*h[w]],u[2*h[w]+1]));return v}_pointArrayToIndices(u){const h=[];for(let v=0;v<u.length;v++){const w=u[v];h.push(this._vertexToIndex(w.x,w.y))}return h}}function Kn(f,u,h,v=!0){return new Mn(h,u).subdividePolygonInternal(f,v)}function Zn(f,u,h=!1){if(!f||f.length<1)return[];if(f.length<2)return[];const v=f[0],w=f[f.length-1],K=h&&(v.x!==w.x||v.y!==w.y);if(u<2)return K?[...f,f[0]]:[...f];const L=Math.floor(at/u),W=[];W.push(new k(f[0].x,f[0].y));const Z=f.length,ne=K?Z:Z-1;for(let ce=0;ce<ne;ce++){const be=f[ce],Ke=ce<Z-1?f[ce+1]:f[0],Ue=be.x,Ne=be.y,Xe=Ke.x,ut=Ke.y,Ct=Ue!==Xe,Nt=Ne!==ut;if(!Ct&&!Nt)continue;const Et=Xe-Ue,Fe=ut-Ne,st=Math.abs(Et),Ot=Math.abs(Fe);let un=Ue,zn=Ne;for(;;){const wn=Et>0?(Math.floor(un/L)+1)*L:(Math.ceil(un/L)-1)*L,tr=Fe>0?(Math.floor(zn/L)+1)*L:(Math.ceil(zn/L)-1)*L,Un=Math.abs(un-wn),cr=Math.abs(zn-tr),On=Math.abs(un-Xe),Gr=Math.abs(zn-ut),Nr=Ct?Un/st:Number.POSITIVE_INFINITY,Qr=Nt?cr/Ot:Number.POSITIVE_INFINITY;if((On<=Un||!Ct)&&(Gr<=cr||!Nt))break;if(Nr<Qr&&Ct||!Nt){un=wn,zn+=Fe*Nr;const ei=new k(un,Math.round(zn));W[W.length-1].x===ei.x&&W[W.length-1].y===ei.y||W.push(ei)}else{un+=Et*Qr,zn=tr;const ei=new k(Math.round(un),zn);W[W.length-1].x===ei.x&&W[W.length-1].y===ei.y||W.push(ei)}}const yn=new k(Xe,ut);W[W.length-1].x===yn.x&&W[W.length-1].y===yn.y||W.push(yn)}return W}function or(f,u,h){if(u.length===0)throw new Error("Subdivision vertex ring is empty.");let v=0,w=f[2*u[0]];for(let Z=1;Z<u.length;Z++){const ne=f[2*u[Z]];ne<w&&(w=ne,v=Z)}const K=u.length;let L=v,W=(L+1)%K;for(;;){const Z=L-1>=0?L-1:K-1,ne=(W+1)%K,ce=f[2*u[Z]],be=f[2*u[ne]],Ke=f[2*u[L]],Ue=f[2*u[L]+1],Ne=f[2*u[W]+1];let Xe=!1;if(ce<be)Xe=!0;else if(ce>be)Xe=!1;else{const ut=Ne-Ue,Ct=-(f[2*u[W]]-Ke),Nt=Ue<Ne?1:-1;((ce-Ke)*ut+(f[2*u[Z]+1]-Ue)*Ct)*Nt>((be-Ke)*ut+(f[2*u[ne]+1]-Ue)*Ct)*Nt&&(Xe=!0)}if(Xe){const ut=u[Z],Ct=u[L],Nt=u[W];ut!==Ct&&ut!==Nt&&Ct!==Nt&&h.push(Nt,Ct,ut),L--,L<0&&(L=K-1)}else{const ut=u[ne],Ct=u[L],Nt=u[W];ut!==Ct&&ut!==Nt&&Ct!==Nt&&h.push(Nt,Ct,ut),W++,W>=K&&(W=0)}if(Z===ne)break}}function br(f,u,h,v,w,K,L,W,Z){const ne=w.length/2,ce=L&&W&&Z;if(ne<Sn.MAX_VERTEX_ARRAY_LENGTH){const be=u.prepareSegment(ne,h,v),Ke=be.vertexLength;for(let Xe=0;Xe<K.length;Xe+=3)v.emplaceBack(Ke+K[Xe],Ke+K[Xe+1],Ke+K[Xe+2]);let Ue,Ne;be.vertexLength+=ne,be.primitiveLength+=K.length/3,ce&&(Ne=L.prepareSegment(ne,h,W),Ue=Ne.vertexLength,Ne.vertexLength+=ne);for(let Xe=0;Xe<w.length;Xe+=2)f(w[Xe],w[Xe+1]);if(ce)for(let Xe=0;Xe<Z.length;Xe++){const ut=Z[Xe];for(let Ct=1;Ct<ut.length;Ct+=2)W.emplaceBack(Ue+ut[Ct-1],Ue+ut[Ct]);Ne.primitiveLength+=ut.length/2}}else(function(be,Ke,Ue,Ne,Xe,ut){const Ct=[];for(let Ot=0;Ot<Ne.length/2;Ot++)Ct.push(-1);const Nt={count:0};let Et=0,Fe=be.getOrCreateLatestSegment(Ke,Ue),st=Fe.vertexLength;for(let Ot=2;Ot<Xe.length;Ot+=3){const un=Xe[Ot-2],zn=Xe[Ot-1],yn=Xe[Ot];let wn=Ct[un]<Et,tr=Ct[zn]<Et,Un=Ct[yn]<Et;Fe.vertexLength+((wn?1:0)+(tr?1:0)+(Un?1:0))>Sn.MAX_VERTEX_ARRAY_LENGTH&&(Fe=be.createNewSegment(Ke,Ue),Et=Nt.count,wn=!0,tr=!0,Un=!0,st=0);const cr=dr(Ct,Ne,ut,Nt,un,wn,Fe),On=dr(Ct,Ne,ut,Nt,zn,tr,Fe),Gr=dr(Ct,Ne,ut,Nt,yn,Un,Fe);Ue.emplaceBack(st+cr-Et,st+On-Et,st+Gr-Et),Fe.primitiveLength++}})(u,h,v,w,K,f),ce&&function(be,Ke,Ue,Ne,Xe,ut){const Ct=[];for(let Ot=0;Ot<Ne.length/2;Ot++)Ct.push(-1);const Nt={count:0};let Et=0,Fe=be.getOrCreateLatestSegment(Ke,Ue),st=Fe.vertexLength;for(let Ot=0;Ot<Xe.length;Ot++){const un=Xe[Ot];for(let zn=1;zn<Xe[Ot].length;zn+=2){const yn=un[zn-1],wn=un[zn];let tr=Ct[yn]<Et,Un=Ct[wn]<Et;Fe.vertexLength+((tr?1:0)+(Un?1:0))>Sn.MAX_VERTEX_ARRAY_LENGTH&&(Fe=be.createNewSegment(Ke,Ue),Et=Nt.count,tr=!0,Un=!0,st=0);const cr=dr(Ct,Ne,ut,Nt,yn,tr,Fe),On=dr(Ct,Ne,ut,Nt,wn,Un,Fe);Ue.emplaceBack(st+cr-Et,st+On-Et),Fe.primitiveLength++}}}(L,h,W,w,Z,f),u.forceNewSegmentOnNextPrepare(),L==null||L.forceNewSegmentOnNextPrepare()}function dr(f,u,h,v,w,K,L){if(K){const W=v.count;return h(u[2*w],u[2*w+1]),f[w]=v.count,v.count++,L.vertexLength++,W}return f[w]}class Lr{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(h=>h.id),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new pt,this.indexArray=new bn,this.indexArray2=new vn,this.programConfigurations=new nl(u.layers,u.zoom),this.segments=new Sn,this.segments2=new Sn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(u,h,v){this.hasPattern=ah("fill",this.layers,h);const w=this.layers[0].layout.get("fill-sort-key"),K=!w.isConstant(),L=[];for(const{feature:W,id:Z,index:ne,sourceLayerIndex:ce}of u){const be=this.layers[0]._featureFilter.needGeometry,Ke=ic(W,be);if(!this.layers[0]._featureFilter.filter(new Zo(this.zoom),Ke,v))continue;const Ue=K?w.evaluate(Ke,{},v,h.availableImages):void 0,Ne={id:Z,properties:W.properties,type:W.type,sourceLayerIndex:ce,index:ne,geometry:be?Ke.geometry:Sd(W),patterns:{},sortKey:Ue};L.push(Ne)}K&&L.sort((W,Z)=>W.sortKey-Z.sortKey);for(const W of L){const{geometry:Z,index:ne,sourceLayerIndex:ce}=W;if(this.hasPattern){const be=kd("fill",this.layers,W,this.zoom,h);this.patternFeatures.push(be)}else this.addFeature(W,Z,ne,v,{},h.subdivisionGranularity);h.featureIndex.insert(u[ne].feature,Z,ne,ce,this.index)}}update(u,h,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,h,this.stateDependentLayers,v)}addFeatures(u,h,v){for(const w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,h,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,uf),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,h,v,w,K,L){for(const W of Lc(h,500)){const Z=Kn(W,w,L.fill.getGranularityForZoomLevel(w.z)),ne=this.layoutVertexArray;br((ce,be)=>{ne.emplaceBack(ce,be)},this.segments,this.layoutVertexArray,this.indexArray,Z.verticesFlattened,Z.indicesTriangles,this.segments2,this.indexArray2,Z.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,K,w)}}let ai,Wr;yr("FillBucket",Lr,{omit:["layers","patternFeatures"]});var Xi={get paint(){return Wr=Wr||new bs({"fill-antialias":new gr(Be.paint_fill["fill-antialias"]),"fill-opacity":new Hr(Be.paint_fill["fill-opacity"]),"fill-color":new Hr(Be.paint_fill["fill-color"]),"fill-outline-color":new Hr(Be.paint_fill["fill-outline-color"]),"fill-translate":new gr(Be.paint_fill["fill-translate"]),"fill-translate-anchor":new gr(Be.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qu(Be.paint_fill["fill-pattern"])})},get layout(){return ai=ai||new bs({"fill-sort-key":new Hr(Be.layout_fill["fill-sort-key"])})}};class ko extends su{constructor(u){super(u,Xi)}recalculate(u,h){super.recalculate(u,h);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 Lr(u)}queryRadius(){return Th(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:u,geometry:h,transform:v,pixelsToTileUnits:w}){return Ec(Bd(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-v.bearingInRadians,w),h)}isTileClipped(){return!0}}const Qa=Is([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aa=Is([{name:"a_centroid",components:2,type:"Int16"}],4),{members:_a}=Qa;var ba,Pa,Yl,qa,xa,hs,gi,Xo={};function la(){if(Pa)return ba;Pa=1;var f=E();function u(w,K,L,W,Z){this.properties={},this.extent=L,this.type=0,this._pbf=w,this._geometry=-1,this._keys=W,this._values=Z,w.readFields(h,this,K)}function h(w,K,L){w==1?K.id=L.readVarint():w==2?function(W,Z){for(var ne=W.readVarint()+W.pos;W.pos<ne;){var ce=Z._keys[W.readVarint()],be=Z._values[W.readVarint()];Z.properties[ce]=be}}(L,K):w==3?K.type=L.readVarint():w==4&&(K._geometry=L.pos)}function v(w){for(var K,L,W=0,Z=0,ne=w.length,ce=ne-1;Z<ne;ce=Z++)W+=((L=w[ce]).x-(K=w[Z]).x)*(K.y+L.y);return W}return ba=u,u.types=["Unknown","Point","LineString","Polygon"],u.prototype.loadGeometry=function(){var w=this._pbf;w.pos=this._geometry;for(var K,L=w.readVarint()+w.pos,W=1,Z=0,ne=0,ce=0,be=[];w.pos<L;){if(Z<=0){var Ke=w.readVarint();W=7&Ke,Z=Ke>>3}if(Z--,W===1||W===2)ne+=w.readSVarint(),ce+=w.readSVarint(),W===1&&(K&&be.push(K),K=[]),K.push(new f(ne,ce));else{if(W!==7)throw new Error("unknown command "+W);K&&K.push(K[0].clone())}}return K&&be.push(K),be},u.prototype.bbox=function(){var w=this._pbf;w.pos=this._geometry;for(var K=w.readVarint()+w.pos,L=1,W=0,Z=0,ne=0,ce=1/0,be=-1/0,Ke=1/0,Ue=-1/0;w.pos<K;){if(W<=0){var Ne=w.readVarint();L=7&Ne,W=Ne>>3}if(W--,L===1||L===2)(Z+=w.readSVarint())<ce&&(ce=Z),Z>be&&(be=Z),(ne+=w.readSVarint())<Ke&&(Ke=ne),ne>Ue&&(Ue=ne);else if(L!==7)throw new Error("unknown command "+L)}return[ce,Ke,be,Ue]},u.prototype.toGeoJSON=function(w,K,L){var W,Z,ne=this.extent*Math.pow(2,L),ce=this.extent*w,be=this.extent*K,Ke=this.loadGeometry(),Ue=u.types[this.type];function Ne(Ct){for(var Nt=0;Nt<Ct.length;Nt++){var Et=Ct[Nt];Ct[Nt]=[360*(Et.x+ce)/ne-180,360/Math.PI*Math.atan(Math.exp((180-360*(Et.y+be)/ne)*Math.PI/180))-90]}}switch(this.type){case 1:var Xe=[];for(W=0;W<Ke.length;W++)Xe[W]=Ke[W][0];Ne(Ke=Xe);break;case 2:for(W=0;W<Ke.length;W++)Ne(Ke[W]);break;case 3:for(Ke=function(Ct){var Nt=Ct.length;if(Nt<=1)return[Ct];for(var Et,Fe,st=[],Ot=0;Ot<Nt;Ot++){var un=v(Ct[Ot]);un!==0&&(Fe===void 0&&(Fe=un<0),Fe===un<0?(Et&&st.push(Et),Et=[Ct[Ot]]):Et.push(Ct[Ot]))}return Et&&st.push(Et),st}(Ke),W=0;W<Ke.length;W++)for(Z=0;Z<Ke[W].length;Z++)Ne(Ke[W][Z])}Ke.length===1?Ke=Ke[0]:Ue="Multi"+Ue;var ut={type:"Feature",geometry:{type:Ue,coordinates:Ke},properties:this.properties};return"id"in this&&(ut.id=this.id),ut},ba}function fa(){if(qa)return Yl;qa=1;var f=la();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(h,this,w),this.length=this._features.length}function h(v,w,K){v===15?w.version=K.readVarint():v===1?w.name=K.readString():v===5?w.extent=K.readVarint():v===2?w._features.push(K.pos):v===3?w._keys.push(K.readString()):v===4&&w._values.push(function(L){for(var W=null,Z=L.readVarint()+L.pos;L.pos<Z;){var ne=L.readVarint()>>3;W=ne===1?L.readString():ne===2?L.readFloat():ne===3?L.readDouble():ne===4?L.readVarint64():ne===5?L.readVarint():ne===6?L.readSVarint():ne===7?L.readBoolean():null}return W}(K))}return Yl=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 f(this._pbf,w,this.extent,this._keys,this._values)},Yl}function ks(){return gi||(gi=1,Xo.VectorTile=function(){if(hs)return xa;hs=1;var f=fa();function u(h,v,w){if(h===3){var K=new f(w,w.readVarint()+w.pos);K.length&&(v[K.name]=K)}}return xa=function(h,v){this.layers=h.readFields(u,{},v)},xa}(),Xo.VectorTileFeature=la(),Xo.VectorTileLayer=fa()),Xo}var Dl=d(ks());const Ro=Dl.VectorTileFeature.types,Pd=Math.pow(2,13);function yl(f,u,h,v,w,K,L,W){f.emplaceBack(u,h,2*Math.floor(v*Pd)+L,w*Pd*2,K*Pd*2,Math.round(W))}class PA{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(h=>h.id),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new vt,this.centroidVertexArray=new ft,this.indexArray=new bn,this.programConfigurations=new nl(u.layers,u.zoom),this.segments=new Sn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(u,h,v){this.features=[],this.hasPattern=ah("fill-extrusion",this.layers,h);for(const{feature:w,id:K,index:L,sourceLayerIndex:W}of u){const Z=this.layers[0]._featureFilter.needGeometry,ne=ic(w,Z);if(!this.layers[0]._featureFilter.filter(new Zo(this.zoom),ne,v))continue;const ce={id:K,sourceLayerIndex:W,index:L,geometry:Z?ne.geometry:Sd(w),properties:w.properties,type:w.type,patterns:{}};this.hasPattern?this.features.push(kd("fill-extrusion",this.layers,ce,this.zoom,h)):this.addFeature(ce,ce.geometry,L,v,{},h.subdivisionGranularity),h.featureIndex.insert(w,ce.geometry,L,W,this.index,!0)}}addFeatures(u,h,v){for(const w of this.features){const{geometry:K}=w;this.addFeature(w,K,w.index,h,v,u.subdivisionGranularity)}}update(u,h,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,h,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,_a),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,aa.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,h,v,w,K,L){for(const W of Lc(h,500)){const Z={x:0,y:0,sampleCount:0},ne=this.layoutVertexArray.length;this.processPolygon(Z,w,u,W,L);const ce=this.layoutVertexArray.length-ne,be=Math.floor(Z.x/Z.sampleCount),Ke=Math.floor(Z.y/Z.sampleCount);for(let Ue=0;Ue<ce;Ue++)this.centroidVertexArray.emplaceBack(be,Ke)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,K,w)}processPolygon(u,h,v,w,K){if(w.length<1||Cl(w[0]))return;for(const be of w)be.length!==0&&Xc(u,be);const L={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},W=K.fill.getGranularityForZoomLevel(h.z),Z=Ro[v.type]==="Polygon";for(const be of w){if(be.length===0||Cl(be))continue;const Ke=Zn(be,W,Z);this._generateSideFaces(Ke,L)}if(!Z)return;const ne=Kn(w,h,W,!1),ce=this.layoutVertexArray;br((be,Ke)=>{yl(ce,be,Ke,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,ne.verticesFlattened,ne.indicesTriangles)}_generateSideFaces(u,h){let v=0;for(let w=1;w<u.length;w++){const K=u[w],L=u[w-1];if(vl(K,L))continue;h.segment.vertexLength+4>Sn.MAX_VERTEX_ARRAY_LENGTH&&(h.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const W=K.sub(L)._perp()._unit(),Z=L.dist(K);v+Z>32768&&(v=0),yl(this.layoutVertexArray,K.x,K.y,W.x,W.y,0,0,v),yl(this.layoutVertexArray,K.x,K.y,W.x,W.y,0,1,v),v+=Z,yl(this.layoutVertexArray,L.x,L.y,W.x,W.y,0,0,v),yl(this.layoutVertexArray,L.x,L.y,W.x,W.y,0,1,v);const ne=h.segment.vertexLength;this.indexArray.emplaceBack(ne,ne+2,ne+1),this.indexArray.emplaceBack(ne+1,ne+2,ne+3),h.segment.vertexLength+=4,h.segment.primitiveLength+=2}}}function Xc(f,u){for(let h=0;h<u.length;h++){const v=u[h];h===u.length-1&&u[0].x===v.x&&u[0].y===v.y||(f.x+=v.x,f.y+=v.y,f.sampleCount++)}}function vl(f,u){return f.x===u.x&&(f.x<0||f.x>at)||f.y===u.y&&(f.y<0||f.y>at)}function Cl(f){return f.every(u=>u.x<0)||f.every(u=>u.x>at)||f.every(u=>u.y<0)||f.every(u=>u.y>at)}let cf;yr("FillExtrusionBucket",PA,{omit:["layers","features"]});var jf={get paint(){return cf=cf||new bs({"fill-extrusion-opacity":new gr(Be["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Hr(Be["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new gr(Be["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new gr(Be["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qu(Be["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Hr(Be["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Hr(Be["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new gr(Be["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Rh extends su{constructor(u){super(u,jf)}createBucket(u){return new PA(u)}queryRadius(){return Th(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:u,feature:h,featureState:v,geometry:w,transform:K,pixelsToTileUnits:L,pixelPosMatrix:W}){const Z=Bd(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-K.bearingInRadians,L),ne=this.paint.get("fill-extrusion-height").evaluate(h,v),ce=this.paint.get("fill-extrusion-base").evaluate(h,v),be=function(Ue,Ne,Xe){const ut=[];for(const Ct of Ue){const Nt=[Ct.x,Ct.y,0,1];fe(Nt,Nt,Ne),ut.push(new k(Nt[0]/Nt[3],Nt[1]/Nt[3]))}return ut}(Z,W),Ke=function(Ue,Ne,Xe,ut){const Ct=[],Nt=[],Et=ut[8]*Ne,Fe=ut[9]*Ne,st=ut[10]*Ne,Ot=ut[11]*Ne,un=ut[8]*Xe,zn=ut[9]*Xe,yn=ut[10]*Xe,wn=ut[11]*Xe;for(const tr of Ue){const Un=[],cr=[];for(const On of tr){const Gr=On.x,Nr=On.y,Qr=ut[0]*Gr+ut[4]*Nr+ut[12],ei=ut[1]*Gr+ut[5]*Nr+ut[13],Do=ut[2]*Gr+ut[6]*Nr+ut[14],al=ut[3]*Gr+ut[7]*Nr+ut[15],$l=Do+st,Xu=al+Ot,uh=Qr+un,lc=ei+zn,Eu=Do+yn,pA=al+wn,wl=new k((Qr+Et)/Xu,(ei+Fe)/Xu);wl.z=$l/Xu,Un.push(wl);const cu=new k(uh/pA,lc/pA);cu.z=Eu/pA,cr.push(cu)}Ct.push(Un),Nt.push(cr)}return[Ct,Nt]}(w,ce,ne,W);return function(Ue,Ne,Xe){let ut=1/0;Ec(Xe,Ne)&&(ut=$m(Xe,Ne[0]));for(let Ct=0;Ct<Ne.length;Ct++){const Nt=Ne[Ct],Et=Ue[Ct];for(let Fe=0;Fe<Nt.length-1;Fe++){const st=Nt[Fe],Ot=[st,Nt[Fe+1],Et[Fe+1],Et[Fe],st];Ed(Xe,Ot)&&(ut=Math.min(ut,$m(Xe,Ot)))}}return ut!==1/0&&ut}(Ke[0],Ke[1],be)}}function df(f,u){return f.x*u.x+f.y*u.y}function $m(f,u){if(f.length===1){let h=0;const v=u[h++];let w;for(;!w||v.equals(w);)if(w=u[h++],!w)return 1/0;for(;h<u.length;h++){const K=u[h],L=f[0],W=w.sub(v),Z=K.sub(v),ne=L.sub(v),ce=df(W,W),be=df(W,Z),Ke=df(Z,Z),Ue=df(ne,W),Ne=df(ne,Z),Xe=ce*Ke-be*be,ut=(Ke*Ue-be*Ne)/Xe,Ct=(ce*Ne-be*Ue)/Xe,Nt=v.z*(1-ut-Ct)+w.z*ut+K.z*Ct;if(isFinite(Nt))return Nt}return 1/0}{let h=1/0;for(const v of u)h=Math.min(h,v.z);return h}}const hf=Is([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:Vm}=hf,ff=Is([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:RA}=ff,hm=Dl.VectorTileFeature.types,L0=Math.cos(Math.PI/180*37.5),fm=Math.pow(2,14)/.5;class Nf{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(h=>h.id),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new Bt,this.layoutVertexArray2=new kt,this.indexArray=new bn,this.programConfigurations=new nl(u.layers,u.zoom),this.segments=new Sn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(u,h,v){this.hasPattern=ah("line",this.layers,h);const w=this.layers[0].layout.get("line-sort-key"),K=!w.isConstant(),L=[];for(const{feature:W,id:Z,index:ne,sourceLayerIndex:ce}of u){const be=this.layers[0]._featureFilter.needGeometry,Ke=ic(W,be);if(!this.layers[0]._featureFilter.filter(new Zo(this.zoom),Ke,v))continue;const Ue=K?w.evaluate(Ke,{},v):void 0,Ne={id:Z,properties:W.properties,type:W.type,sourceLayerIndex:ce,index:ne,geometry:be?Ke.geometry:Sd(W),patterns:{},sortKey:Ue};L.push(Ne)}K&&L.sort((W,Z)=>W.sortKey-Z.sortKey);for(const W of L){const{geometry:Z,index:ne,sourceLayerIndex:ce}=W;if(this.hasPattern){const be=kd("line",this.layers,W,this.zoom,h);this.patternFeatures.push(be)}else this.addFeature(W,Z,ne,v,{},h.subdivisionGranularity);h.featureIndex.insert(u[ne].feature,Z,ne,ce,this.index)}}update(u,h,v){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,h,this.stateDependentLayers,v)}addFeatures(u,h,v){for(const w of this.patternFeatures)this.addFeature(w,w.geometry,w.index,h,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,RA)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Vm),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,h,v,w,K,L){const W=this.layers[0].layout,Z=W.get("line-join").evaluate(u,{}),ne=W.get("line-cap"),ce=W.get("line-miter-limit"),be=W.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const Ke of h)this.addLine(Ke,u,Z,ne,ce,be,w,L);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,v,K,w)}addLine(u,h,v,w,K,L,W,Z){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,u=Zn(u,W?Z.line.getGranularityForZoomLevel(W.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Et=0;Et<u.length-1;Et++)this.totalDistance+=u[Et].dist(u[Et+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const ne=hm[h.type]==="Polygon";let ce=u.length;for(;ce>=2&&u[ce-1].equals(u[ce-2]);)ce--;let be=0;for(;be<ce-1&&u[be].equals(u[be+1]);)be++;if(ce<(ne?3:2))return;v==="bevel"&&(K=1.05);const Ke=this.overscaling<=16?15*at/(512*this.overscaling):0,Ue=this.segments.prepareSegment(10*ce,this.layoutVertexArray,this.indexArray);let Ne,Xe,ut,Ct,Nt;this.e1=this.e2=-1,ne&&(Ne=u[ce-2],Nt=u[be].sub(Ne)._unit()._perp());for(let Et=be;Et<ce;Et++){if(ut=Et===ce-1?ne?u[be+1]:void 0:u[Et+1],ut&&u[Et].equals(ut))continue;Nt&&(Ct=Nt),Ne&&(Xe=Ne),Ne=u[Et],Nt=ut?ut.sub(Ne)._unit()._perp():Ct,Ct=Ct||Nt;let Fe=Ct.add(Nt);Fe.x===0&&Fe.y===0||Fe._unit();const st=Ct.x*Nt.x+Ct.y*Nt.y,Ot=Fe.x*Nt.x+Fe.y*Nt.y,un=Ot!==0?1/Ot:1/0,zn=2*Math.sqrt(2-2*Ot),yn=Ot<L0&&Xe&&ut,wn=Ct.x*Nt.y-Ct.y*Nt.x>0;if(yn&&Et>be){const cr=Ne.dist(Xe);if(cr>2*Ke){const On=Ne.sub(Ne.sub(Xe)._mult(Ke/cr)._round());this.updateDistance(Xe,On),this.addCurrentVertex(On,Ct,0,0,Ue),Xe=On}}const tr=Xe&&ut;let Un=tr?v:ne?"butt":w;if(tr&&Un==="round"&&(un<L?Un="miter":un<=2&&(Un="fakeround")),Un==="miter"&&un>K&&(Un="bevel"),Un==="bevel"&&(un>2&&(Un="flipbevel"),un<K&&(Un="miter")),Xe&&this.updateDistance(Xe,Ne),Un==="miter")Fe._mult(un),this.addCurrentVertex(Ne,Fe,0,0,Ue);else if(Un==="flipbevel"){if(un>100)Fe=Nt.mult(-1);else{const cr=un*Ct.add(Nt).mag()/Ct.sub(Nt).mag();Fe._perp()._mult(cr*(wn?-1:1))}this.addCurrentVertex(Ne,Fe,0,0,Ue),this.addCurrentVertex(Ne,Fe.mult(-1),0,0,Ue)}else if(Un==="bevel"||Un==="fakeround"){const cr=-Math.sqrt(un*un-1),On=wn?cr:0,Gr=wn?0:cr;if(Xe&&this.addCurrentVertex(Ne,Ct,On,Gr,Ue),Un==="fakeround"){const Nr=Math.round(180*zn/Math.PI/20);for(let Qr=1;Qr<Nr;Qr++){let ei=Qr/Nr;if(ei!==.5){const al=ei-.5;ei+=ei*al*(ei-1)*((1.0904+st*(st*(3.55645-1.43519*st)-3.2452))*al*al+(.848013+st*(.215638*st-1.06021)))}const Do=Nt.sub(Ct)._mult(ei)._add(Ct)._unit()._mult(wn?-1:1);this.addHalfVertex(Ne,Do.x,Do.y,!1,wn,0,Ue)}}ut&&this.addCurrentVertex(Ne,Nt,-On,-Gr,Ue)}else if(Un==="butt")this.addCurrentVertex(Ne,Fe,0,0,Ue);else if(Un==="square"){const cr=Xe?1:-1;this.addCurrentVertex(Ne,Fe,cr,cr,Ue)}else Un==="round"&&(Xe&&(this.addCurrentVertex(Ne,Ct,0,0,Ue),this.addCurrentVertex(Ne,Ct,1,1,Ue,!0)),ut&&(this.addCurrentVertex(Ne,Nt,-1,-1,Ue,!0),this.addCurrentVertex(Ne,Nt,0,0,Ue)));if(yn&&Et<ce-1){const cr=Ne.dist(ut);if(cr>2*Ke){const On=Ne.add(ut.sub(Ne)._mult(Ke/cr)._round());this.updateDistance(Ne,On),this.addCurrentVertex(On,Nt,0,0,Ue),Ne=On}}}}addCurrentVertex(u,h,v,w,K,L=!1){const W=h.y*w-h.x,Z=-h.y-h.x*w;this.addHalfVertex(u,h.x+h.y*v,h.y-h.x*v,L,!1,v,K),this.addHalfVertex(u,W,Z,L,!0,-w,K),this.distance>fm/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,h,v,w,K,L))}addHalfVertex({x:u,y:h},v,w,K,L,W,Z){const ne=.5*(this.lineClips?this.scaledDistance*(fm-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(K?1:0),(h<<1)+(L?1:0),Math.round(63*v)+128,Math.round(63*w)+128,1+(W===0?0:W<0?-1:1)|(63&ne)<<2,ne>>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++),L?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,h){this.distance+=u.dist(h),this.updateScaledDistance()}}let dA,Dh;yr("LineBucket",Nf,{omit:["layers","patternFeatures"]});var Jc={get paint(){return Dh=Dh||new bs({"line-opacity":new Hr(Be.paint_line["line-opacity"]),"line-color":new Hr(Be.paint_line["line-color"]),"line-translate":new gr(Be.paint_line["line-translate"]),"line-translate-anchor":new gr(Be.paint_line["line-translate-anchor"]),"line-width":new Hr(Be.paint_line["line-width"]),"line-gap-width":new Hr(Be.paint_line["line-gap-width"]),"line-offset":new Hr(Be.paint_line["line-offset"]),"line-blur":new Hr(Be.paint_line["line-blur"]),"line-dasharray":new rc(Be.paint_line["line-dasharray"]),"line-pattern":new Qu(Be.paint_line["line-pattern"]),"line-gradient":new bu(Be.paint_line["line-gradient"])})},get layout(){return dA=dA||new bs({"line-cap":new gr(Be.layout_line["line-cap"]),"line-join":new Hr(Be.layout_line["line-join"]),"line-miter-limit":new gr(Be.layout_line["line-miter-limit"]),"line-round-limit":new gr(Be.layout_line["line-round-limit"]),"line-sort-key":new Hr(Be.layout_line["line-sort-key"])})}};class sc extends Hr{possiblyEvaluate(u,h){return h=new Zo(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(u,h)}evaluate(u,h,v,w){return h=gt({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(u,h,v,w)}}let Wf;class U0 extends su{constructor(u){super(u,Jc),this.gradientVersion=0,Wf||(Wf=new sc(Jc.paint.properties["line-width"].specification),Wf.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if(u==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(v){return v._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof ot,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,h){super.recalculate(u,h),this.paint._values["line-floorwidth"]=Wf.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Nf(u)}queryRadius(u){const h=u,v=Hm(oc("line-width",this,h),oc("line-gap-width",this,h)),w=oc("line-offset",this,h);return v/2+Math.abs(w)+Th(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:u,feature:h,featureState:v,geometry:w,transform:K,pixelsToTileUnits:L}){const W=Bd(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-K.bearingInRadians,L),Z=L/2*Hm(this.paint.get("line-width").evaluate(h,v),this.paint.get("line-gap-width").evaluate(h,v)),ne=this.paint.get("line-offset").evaluate(h,v);return ne&&(w=function(ce,be){const Ke=[];for(let Ue=0;Ue<ce.length;Ue++){const Ne=ce[Ue],Xe=[];for(let ut=0;ut<Ne.length;ut++){const Ct=Ne[ut-1],Nt=Ne[ut],Et=Ne[ut+1],Fe=ut===0?new k(0,0):Nt.sub(Ct)._unit()._perp(),st=ut===Ne.length-1?new k(0,0):Et.sub(Nt)._unit()._perp(),Ot=Fe._add(st)._unit(),un=Ot.x*st.x+Ot.y*st.y;un!==0&&Ot._mult(1/un),Xe.push(Ot._mult(be)._add(Nt))}Ke.push(Xe)}return Ke}(w,ne*L)),function(ce,be,Ke){for(let Ue=0;Ue<be.length;Ue++){const Ne=be[Ue];if(ce.length>=3){for(let Xe=0;Xe<Ne.length;Xe++)if(Bc(ce,Ne[Xe]))return!0}if(kA(ce,Ne,Ke))return!0}return!1}(W,w,Z)}isTileClipped(){return!0}}function Hm(f,u){return u>0?u+2*f:f}const Wy=Is([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),pf=Is([{name:"a_projected_pos",components:3,type:"Float32"}],4);Is([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Qg=Is([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Is([{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 Zm=Is([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Gf=Is([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function z0(f,u,h){return f.sections.forEach(v=>{v.text=function(w,K,L){const W=K.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?w=w.toLocaleUpperCase():W==="lowercase"&&(w=w.toLocaleLowerCase()),Ks.applyArabicShaping&&(w=Ks.applyArabicShaping(w)),w}(v.text,u,h)}),f}Is([{name:"triangle",components:3,type:"Uint16"}]),Is([{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"}]),Is([{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"}]),Is([{type:"Float32",name:"offsetX"}]),Is([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Is([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Rd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var j0,Xm,Jm,Ya=24,N0={};function Gy(){return j0||(j0=1,N0.read=function(f,u,h,v,w){var K,L,W=8*w-v-1,Z=(1<<W)-1,ne=Z>>1,ce=-7,be=h?w-1:0,Ke=h?-1:1,Ue=f[u+be];for(be+=Ke,K=Ue&(1<<-ce)-1,Ue>>=-ce,ce+=W;ce>0;K=256*K+f[u+be],be+=Ke,ce-=8);for(L=K&(1<<-ce)-1,K>>=-ce,ce+=v;ce>0;L=256*L+f[u+be],be+=Ke,ce-=8);if(K===0)K=1-ne;else{if(K===Z)return L?NaN:1/0*(Ue?-1:1);L+=Math.pow(2,v),K-=ne}return(Ue?-1:1)*L*Math.pow(2,K-v)},N0.write=function(f,u,h,v,w,K){var L,W,Z,ne=8*K-w-1,ce=(1<<ne)-1,be=ce>>1,Ke=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ue=v?0:K-1,Ne=v?1:-1,Xe=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(W=isNaN(u)?1:0,L=ce):(L=Math.floor(Math.log(u)/Math.LN2),u*(Z=Math.pow(2,-L))<1&&(L--,Z*=2),(u+=L+be>=1?Ke/Z:Ke*Math.pow(2,1-be))*Z>=2&&(L++,Z/=2),L+be>=ce?(W=0,L=ce):L+be>=1?(W=(u*Z-1)*Math.pow(2,w),L+=be):(W=u*Math.pow(2,be-1)*Math.pow(2,w),L=0));w>=8;f[h+Ue]=255&W,Ue+=Ne,W/=256,w-=8);for(L=L<<w|W,ne+=w;ne>0;f[h+Ue]=255&L,Ue+=Ne,L/=256,ne-=8);f[h+Ue-Ne]|=128*Xe}),N0}function W0(){if(Jm)return Xm;Jm=1,Xm=u;var f=Gy();function u(Fe){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(Fe)?Fe:new Uint8Array(Fe||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 h=4294967296,v=1/h,w=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function K(Fe){return Fe.type===u.Bytes?Fe.readVarint()+Fe.pos:Fe.pos+1}function L(Fe,st,Ot){return Ot?4294967296*st+(Fe>>>0):4294967296*(st>>>0)+(Fe>>>0)}function W(Fe,st,Ot){var un=st<=16383?1:st<=2097151?2:st<=268435455?3:Math.floor(Math.log(st)/(7*Math.LN2));Ot.realloc(un);for(var zn=Ot.pos-1;zn>=Fe;zn--)Ot.buf[zn+un]=Ot.buf[zn]}function Z(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeVarint(Fe[Ot])}function ne(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeSVarint(Fe[Ot])}function ce(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeFloat(Fe[Ot])}function be(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeDouble(Fe[Ot])}function Ke(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeBoolean(Fe[Ot])}function Ue(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeFixed32(Fe[Ot])}function Ne(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeSFixed32(Fe[Ot])}function Xe(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeFixed64(Fe[Ot])}function ut(Fe,st){for(var Ot=0;Ot<Fe.length;Ot++)st.writeSFixed64(Fe[Ot])}function Ct(Fe,st){return(Fe[st]|Fe[st+1]<<8|Fe[st+2]<<16)+16777216*Fe[st+3]}function Nt(Fe,st,Ot){Fe[Ot]=st,Fe[Ot+1]=st>>>8,Fe[Ot+2]=st>>>16,Fe[Ot+3]=st>>>24}function Et(Fe,st){return(Fe[st]|Fe[st+1]<<8|Fe[st+2]<<16)+(Fe[st+3]<<24)}return u.prototype={destroy:function(){this.buf=null},readFields:function(Fe,st,Ot){for(Ot=Ot||this.length;this.pos<Ot;){var un=this.readVarint(),zn=un>>3,yn=this.pos;this.type=7&un,Fe(zn,st,this),this.pos===yn&&this.skip(un)}return st},readMessage:function(Fe,st){return this.readFields(Fe,st,this.readVarint()+this.pos)},readFixed32:function(){var Fe=Ct(this.buf,this.pos);return this.pos+=4,Fe},readSFixed32:function(){var Fe=Et(this.buf,this.pos);return this.pos+=4,Fe},readFixed64:function(){var Fe=Ct(this.buf,this.pos)+Ct(this.buf,this.pos+4)*h;return this.pos+=8,Fe},readSFixed64:function(){var Fe=Ct(this.buf,this.pos)+Et(this.buf,this.pos+4)*h;return this.pos+=8,Fe},readFloat:function(){var Fe=f.read(this.buf,this.pos,!0,23,4);return this.pos+=4,Fe},readDouble:function(){var Fe=f.read(this.buf,this.pos,!0,52,8);return this.pos+=8,Fe},readVarint:function(Fe){var st,Ot,un=this.buf;return st=127&(Ot=un[this.pos++]),Ot<128?st:(st|=(127&(Ot=un[this.pos++]))<<7,Ot<128?st:(st|=(127&(Ot=un[this.pos++]))<<14,Ot<128?st:(st|=(127&(Ot=un[this.pos++]))<<21,Ot<128?st:function(zn,yn,wn){var tr,Un,cr=wn.buf;if(tr=(112&(Un=cr[wn.pos++]))>>4,Un<128||(tr|=(127&(Un=cr[wn.pos++]))<<3,Un<128)||(tr|=(127&(Un=cr[wn.pos++]))<<10,Un<128)||(tr|=(127&(Un=cr[wn.pos++]))<<17,Un<128)||(tr|=(127&(Un=cr[wn.pos++]))<<24,Un<128)||(tr|=(1&(Un=cr[wn.pos++]))<<31,Un<128))return L(zn,tr,yn);throw new Error("Expected varint not more than 10 bytes")}(st|=(15&(Ot=un[this.pos]))<<28,Fe,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var Fe=this.readVarint();return Fe%2==1?(Fe+1)/-2:Fe/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var Fe=this.readVarint()+this.pos,st=this.pos;return this.pos=Fe,Fe-st>=12&&w?function(Ot,un,zn){return w.decode(Ot.subarray(un,zn))}(this.buf,st,Fe):function(Ot,un,zn){for(var yn="",wn=un;wn<zn;){var tr,Un,cr,On=Ot[wn],Gr=null,Nr=On>239?4:On>223?3:On>191?2:1;if(wn+Nr>zn)break;Nr===1?On<128&&(Gr=On):Nr===2?(192&(tr=Ot[wn+1]))==128&&(Gr=(31&On)<<6|63&tr)<=127&&(Gr=null):Nr===3?(Un=Ot[wn+2],(192&(tr=Ot[wn+1]))==128&&(192&Un)==128&&((Gr=(15&On)<<12|(63&tr)<<6|63&Un)<=2047||Gr>=55296&&Gr<=57343)&&(Gr=null)):Nr===4&&(Un=Ot[wn+2],cr=Ot[wn+3],(192&(tr=Ot[wn+1]))==128&&(192&Un)==128&&(192&cr)==128&&((Gr=(15&On)<<18|(63&tr)<<12|(63&Un)<<6|63&cr)<=65535||Gr>=1114112)&&(Gr=null)),Gr===null?(Gr=65533,Nr=1):Gr>65535&&(Gr-=65536,yn+=String.fromCharCode(Gr>>>10&1023|55296),Gr=56320|1023&Gr),yn+=String.fromCharCode(Gr),wn+=Nr}return yn}(this.buf,st,Fe)},readBytes:function(){var Fe=this.readVarint()+this.pos,st=this.buf.subarray(this.pos,Fe);return this.pos=Fe,st},readPackedVarint:function(Fe,st){if(this.type!==u.Bytes)return Fe.push(this.readVarint(st));var Ot=K(this);for(Fe=Fe||[];this.pos<Ot;)Fe.push(this.readVarint(st));return Fe},readPackedSVarint:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readSVarint());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readSVarint());return Fe},readPackedBoolean:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readBoolean());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readBoolean());return Fe},readPackedFloat:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readFloat());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readFloat());return Fe},readPackedDouble:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readDouble());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readDouble());return Fe},readPackedFixed32:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readFixed32());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readFixed32());return Fe},readPackedSFixed32:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readSFixed32());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readSFixed32());return Fe},readPackedFixed64:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readFixed64());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readFixed64());return Fe},readPackedSFixed64:function(Fe){if(this.type!==u.Bytes)return Fe.push(this.readSFixed64());var st=K(this);for(Fe=Fe||[];this.pos<st;)Fe.push(this.readSFixed64());return Fe},skip:function(Fe){var st=7&Fe;if(st===u.Varint)for(;this.buf[this.pos++]>127;);else if(st===u.Bytes)this.pos=this.readVarint()+this.pos;else if(st===u.Fixed32)this.pos+=4;else{if(st!==u.Fixed64)throw new Error("Unimplemented type: "+st);this.pos+=8}},writeTag:function(Fe,st){this.writeVarint(Fe<<3|st)},realloc:function(Fe){for(var st=this.length||16;st<this.pos+Fe;)st*=2;if(st!==this.length){var Ot=new Uint8Array(st);Ot.set(this.buf),this.buf=Ot,this.length=st}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(Fe){this.realloc(4),Nt(this.buf,Fe,this.pos),this.pos+=4},writeSFixed32:function(Fe){this.realloc(4),Nt(this.buf,Fe,this.pos),this.pos+=4},writeFixed64:function(Fe){this.realloc(8),Nt(this.buf,-1&Fe,this.pos),Nt(this.buf,Math.floor(Fe*v),this.pos+4),this.pos+=8},writeSFixed64:function(Fe){this.realloc(8),Nt(this.buf,-1&Fe,this.pos),Nt(this.buf,Math.floor(Fe*v),this.pos+4),this.pos+=8},writeVarint:function(Fe){(Fe=+Fe||0)>268435455||Fe<0?function(st,Ot){var un,zn;if(st>=0?(un=st%4294967296|0,zn=st/4294967296|0):(zn=~(-st/4294967296),4294967295^(un=~(-st%4294967296))?un=un+1|0:(un=0,zn=zn+1|0)),st>=18446744073709552e3||st<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");Ot.realloc(10),function(yn,wn,tr){tr.buf[tr.pos++]=127&yn|128,yn>>>=7,tr.buf[tr.pos++]=127&yn|128,yn>>>=7,tr.buf[tr.pos++]=127&yn|128,yn>>>=7,tr.buf[tr.pos++]=127&yn|128,tr.buf[tr.pos]=127&(yn>>>=7)}(un,0,Ot),function(yn,wn){var tr=(7&yn)<<4;wn.buf[wn.pos++]|=tr|((yn>>>=3)?128:0),yn&&(wn.buf[wn.pos++]=127&yn|((yn>>>=7)?128:0),yn&&(wn.buf[wn.pos++]=127&yn|((yn>>>=7)?128:0),yn&&(wn.buf[wn.pos++]=127&yn|((yn>>>=7)?128:0),yn&&(wn.buf[wn.pos++]=127&yn|((yn>>>=7)?128:0),yn&&(wn.buf[wn.pos++]=127&yn)))))}(zn,Ot)}(Fe,this):(this.realloc(4),this.buf[this.pos++]=127&Fe|(Fe>127?128:0),Fe<=127||(this.buf[this.pos++]=127&(Fe>>>=7)|(Fe>127?128:0),Fe<=127||(this.buf[this.pos++]=127&(Fe>>>=7)|(Fe>127?128:0),Fe<=127||(this.buf[this.pos++]=Fe>>>7&127))))},writeSVarint:function(Fe){this.writeVarint(Fe<0?2*-Fe-1:2*Fe)},writeBoolean:function(Fe){this.writeVarint(!!Fe)},writeString:function(Fe){Fe=String(Fe),this.realloc(4*Fe.length),this.pos++;var st=this.pos;this.pos=function(un,zn,yn){for(var wn,tr,Un=0;Un<zn.length;Un++){if((wn=zn.charCodeAt(Un))>55295&&wn<57344){if(!tr){wn>56319||Un+1===zn.length?(un[yn++]=239,un[yn++]=191,un[yn++]=189):tr=wn;continue}if(wn<56320){un[yn++]=239,un[yn++]=191,un[yn++]=189,tr=wn;continue}wn=tr-55296<<10|wn-56320|65536,tr=null}else tr&&(un[yn++]=239,un[yn++]=191,un[yn++]=189,tr=null);wn<128?un[yn++]=wn:(wn<2048?un[yn++]=wn>>6|192:(wn<65536?un[yn++]=wn>>12|224:(un[yn++]=wn>>18|240,un[yn++]=wn>>12&63|128),un[yn++]=wn>>6&63|128),un[yn++]=63&wn|128)}return yn}(this.buf,Fe,this.pos);var Ot=this.pos-st;Ot>=128&&W(st,Ot,this),this.pos=st-1,this.writeVarint(Ot),this.pos+=Ot},writeFloat:function(Fe){this.realloc(4),f.write(this.buf,Fe,this.pos,!0,23,4),this.pos+=4},writeDouble:function(Fe){this.realloc(8),f.write(this.buf,Fe,this.pos,!0,52,8),this.pos+=8},writeBytes:function(Fe){var st=Fe.length;this.writeVarint(st),this.realloc(st);for(var Ot=0;Ot<st;Ot++)this.buf[this.pos++]=Fe[Ot]},writeRawMessage:function(Fe,st){this.pos++;var Ot=this.pos;Fe(st,this);var un=this.pos-Ot;un>=128&&W(Ot,un,this),this.pos=Ot-1,this.writeVarint(un),this.pos+=un},writeMessage:function(Fe,st,Ot){this.writeTag(Fe,u.Bytes),this.writeRawMessage(st,Ot)},writePackedVarint:function(Fe,st){st.length&&this.writeMessage(Fe,Z,st)},writePackedSVarint:function(Fe,st){st.length&&this.writeMessage(Fe,ne,st)},writePackedBoolean:function(Fe,st){st.length&&this.writeMessage(Fe,Ke,st)},writePackedFloat:function(Fe,st){st.length&&this.writeMessage(Fe,ce,st)},writePackedDouble:function(Fe,st){st.length&&this.writeMessage(Fe,be,st)},writePackedFixed32:function(Fe,st){st.length&&this.writeMessage(Fe,Ue,st)},writePackedSFixed32:function(Fe,st){st.length&&this.writeMessage(Fe,Ne,st)},writePackedFixed64:function(Fe,st){st.length&&this.writeMessage(Fe,Xe,st)},writePackedSFixed64:function(Fe,st){st.length&&this.writeMessage(Fe,ut,st)},writeBytesField:function(Fe,st){this.writeTag(Fe,u.Bytes),this.writeBytes(st)},writeFixed32Field:function(Fe,st){this.writeTag(Fe,u.Fixed32),this.writeFixed32(st)},writeSFixed32Field:function(Fe,st){this.writeTag(Fe,u.Fixed32),this.writeSFixed32(st)},writeFixed64Field:function(Fe,st){this.writeTag(Fe,u.Fixed64),this.writeFixed64(st)},writeSFixed64Field:function(Fe,st){this.writeTag(Fe,u.Fixed64),this.writeSFixed64(st)},writeVarintField:function(Fe,st){this.writeTag(Fe,u.Varint),this.writeVarint(st)},writeSVarintField:function(Fe,st){this.writeTag(Fe,u.Varint),this.writeSVarint(st)},writeStringField:function(Fe,st){this.writeTag(Fe,u.Bytes),this.writeString(st)},writeFloatField:function(Fe,st){this.writeTag(Fe,u.Fixed32),this.writeFloat(st)},writeDoubleField:function(Fe,st){this.writeTag(Fe,u.Fixed64),this.writeDouble(st)},writeBooleanField:function(Fe,st){this.writeVarintField(Fe,!!st)}},Xm}var e0=d(W0());const Kh=3;function Qy(f,u,h){f===1&&h.readMessage(Bp,u)}function Bp(f,u,h){if(f===3){const{id:v,bitmap:w,width:K,height:L,left:W,top:Z,advance:ne}=h.readMessage(t0,{});u.push({id:v,bitmap:new Io({width:K+2*Kh,height:L+2*Kh},w),metrics:{width:K,height:L,left:W,top:Z,advance:ne}})}}function t0(f,u,h){f===1?u.id=h.readVarint():f===2?u.bitmap=h.readBytes():f===3?u.width=h.readVarint():f===4?u.height=h.readVarint():f===5?u.left=h.readSVarint():f===6?u.top=h.readSVarint():f===7&&(u.advance=h.readVarint())}const ol=Kh;function qg(f){let u=0,h=0;for(const L of f)u+=L.w*L.h,h=Math.max(h,L.w);f.sort((L,W)=>W.h-L.h);const v=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(u/.95)),h),h:1/0}];let w=0,K=0;for(const L of f)for(let W=v.length-1;W>=0;W--){const Z=v[W];if(!(L.w>Z.w||L.h>Z.h)){if(L.x=Z.x,L.y=Z.y,K=Math.max(K,L.y+L.h),w=Math.max(w,L.x+L.w),L.w===Z.w&&L.h===Z.h){const ne=v.pop();W<v.length&&(v[W]=ne)}else L.h===Z.h?(Z.x+=L.w,Z.w-=L.w):L.w===Z.w?(Z.y+=L.h,Z.h-=L.h):(v.push({x:Z.x+L.w,y:Z.y,w:Z.w-L.w,h:L.h}),Z.y+=L.h,Z.h-=L.h);break}}return{w,h:K,fill:u/(w*K)||0}}const hA=1;class G0{constructor(u,{pixelRatio:h,version:v,stretchX:w,stretchY:K,content:L,textFitWidth:W,textFitHeight:Z}){this.paddedRect=u,this.pixelRatio=h,this.stretchX=w,this.stretchY=K,this.content=L,this.version=v,this.textFitWidth=W,this.textFitHeight=Z}get tl(){return[this.paddedRect.x+hA,this.paddedRect.y+hA]}get br(){return[this.paddedRect.x+this.paddedRect.w-hA,this.paddedRect.y+this.paddedRect.h-hA]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*hA)/this.pixelRatio,(this.paddedRect.h-2*hA)/this.pixelRatio]}}class Yg{constructor(u,h){const v={},w={};this.haveRenderCallbacks=[];const K=[];this.addImages(u,v,K),this.addImages(h,w,K);const{w:L,h:W}=qg(K),Z=new Hu({width:L||1,height:W||1});for(const ne in u){const ce=u[ne],be=v[ne].paddedRect;Hu.copy(ce.data,Z,{x:0,y:0},{x:be.x+hA,y:be.y+hA},ce.data)}for(const ne in h){const ce=h[ne],be=w[ne].paddedRect,Ke=be.x+hA,Ue=be.y+hA,Ne=ce.data.width,Xe=ce.data.height;Hu.copy(ce.data,Z,{x:0,y:0},{x:Ke,y:Ue},ce.data),Hu.copy(ce.data,Z,{x:0,y:Xe-1},{x:Ke,y:Ue-1},{width:Ne,height:1}),Hu.copy(ce.data,Z,{x:0,y:0},{x:Ke,y:Ue+Xe},{width:Ne,height:1}),Hu.copy(ce.data,Z,{x:Ne-1,y:0},{x:Ke-1,y:Ue},{width:1,height:Xe}),Hu.copy(ce.data,Z,{x:0,y:0},{x:Ke+Ne,y:Ue},{width:1,height:Xe})}this.image=Z,this.iconPositions=v,this.patternPositions=w}addImages(u,h,v){for(const w in u){const K=u[w],L={x:0,y:0,w:K.data.width+2*hA,h:K.data.height+2*hA};v.push(L),h[w]=new G0(L,K),K.hasRenderCallback&&this.haveRenderCallbacks.push(w)}}patchUpdatedImages(u,h){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const v in u.updatedImages)this.patchUpdatedImage(this.iconPositions[v],u.getImage(v),h),this.patchUpdatedImage(this.patternPositions[v],u.getImage(v),h)}patchUpdatedImage(u,h,v){if(!u||!h||u.version===h.version)return;u.version=h.version;const[w,K]=u.tl;v.update(h.data,void 0,{x:w,y:K})}}var Fh;yr("ImagePosition",G0),yr("ImageAtlas",Yg),a.ai=void 0,(Fh=a.ai||(a.ai={}))[Fh.none=0]="none",Fh[Fh.horizontal=1]="horizontal",Fh[Fh.vertical=2]="vertical",Fh[Fh.horizontalOnly=3]="horizontalOnly";const Op=-17;class pm{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,h){const v=new pm;return v.scale=u||1,v.fontStack=h,v}static forImage(u){const h=new pm;return h.imageName=u,h}}class Zu{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,h){const v=new Zu;for(let w=0;w<u.sections.length;w++){const K=u.sections[w];K.image?v.addImageSection(K):v.addTextSection(K,h)}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 h="";for(let v=0;v<u.length;v++){const w=u.charCodeAt(v+1)||null,K=u.charCodeAt(v-1)||null;h+=w&&_c(w)&&!Rd[u[v+1]]||K&&_c(K)&&!Rd[u[v-1]]||!Rd[u[v]]?u[v]:Rd[u[v]]}return h}(this.text)}trim(){let u=0;for(let v=0;v<this.text.length&&n0[this.text.charCodeAt(v)];v++)u++;let h=this.text.length;for(let v=this.text.length-1;v>=0&&v>=u&&n0[this.text.charCodeAt(v)];v--)h--;this.text=this.text.substring(u,h),this.sectionIndex=this.sectionIndex.slice(u,h)}substring(u,h){const v=new Zu;return v.text=this.text.substring(u,h),v.sectionIndex=this.sectionIndex.slice(u,h),v.sections=this.sections,v}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((u,h)=>Math.max(u,this.sections[h].scale),0)}addTextSection(u,h){this.text+=u.text,this.sections.push(pm.forText(u.scale,u.fontStack||h));const v=this.sections.length-1;for(let w=0;w<u.text.length;++w)this.sectionIndex.push(v)}addImageSection(u){const h=u.image?u.image.name:"";if(h.length===0)return void nt("Can't add FormattedSection with an empty image.");const v=this.getNextImageSectionCharCode();v?(this.text+=String.fromCharCode(v),this.sections.push(pm.forImage(h)),this.sectionIndex.push(this.sections.length-1)):nt("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qf(f,u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne){const Xe=Zu.fromFeature(f,w);let ut;be===a.ai.vertical&&Xe.verticalizePunctuation();const{processBidirectionalText:Ct,processStyledBidirectionalText:Nt}=Ks;if(Ct&&Xe.sections.length===1){ut=[];const st=Ct(Xe.toString(),gm(Xe,ne,K,u,v,Ue));for(const Ot of st){const un=new Zu;un.text=Ot,un.sections=Xe.sections;for(let zn=0;zn<Ot.length;zn++)un.sectionIndex.push(0);ut.push(un)}}else if(Nt){ut=[];const st=Nt(Xe.text,Xe.sectionIndex,gm(Xe,ne,K,u,v,Ue));for(const Ot of st){const un=new Zu;un.text=Ot[0],un.sectionIndex=Ot[1],un.sections=Xe.sections,ut.push(un)}}else ut=function(st,Ot){const un=[],zn=st.text;let yn=0;for(const wn of Ot)un.push(st.substring(yn,wn)),yn=wn;return yn<zn.length&&un.push(st.substring(yn,zn.length)),un}(Xe,gm(Xe,ne,K,u,v,Ue));const Et=[],Fe={positionedLines:Et,text:Xe.toString(),top:ce[1],bottom:ce[1],left:ce[0],right:ce[0],writingMode:be,iconsInText:!1,verticalizable:!1};return function(st,Ot,un,zn,yn,wn,tr,Un,cr,On,Gr,Nr){let Qr=0,ei=Op,Do=0,al=0;const $l=Un==="right"?1:Un==="left"?0:.5;let Xu=0;for(const wl of yn){wl.trim();const cu=wl.getMaxScale(),KA=(cu-1)*Ya,FA={positionedGlyphs:[],lineOffset:0};st.positionedLines[Xu]=FA;const uc=FA.positionedGlyphs;let du=0;if(!wl.length()){ei+=wn,++Xu;continue}for(let kc=0;kc<wl.length();kc++){const Ko=wl.getSection(kc),mA=wl.getSectionIndex(kc),$a=wl.getCharCode(kc);let ll=0,Bu=null,wm=null,td=null,Z0=Ya;const Ah=!(cr===a.ai.horizontal||!Gr&&!AA($a)||Gr&&(n0[$a]||(uh=$a,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(uh)))));if(Ko.imageName){const nd=zn[Ko.imageName];if(!nd)continue;td=Ko.imageName,st.iconsInText=st.iconsInText||!0,wm=nd.paddedRect;const Ju=nd.displaySize;Ko.scale=Ko.scale*Ya/Nr,Bu={width:Ju[0],height:Ju[1],left:hA,top:-3,advance:Ah?Ju[1]:Ju[0]},ll=KA+(Ya-Ju[1]*Ko.scale),Z0=Bu.advance;const Fd=Ah?Ju[0]*Ko.scale-Ya*cu:Ju[1]*Ko.scale-Ya*cu;Fd>0&&Fd>du&&(du=Fd)}else{const nd=un[Ko.fontStack],Ju=nd&&nd[$a];if(Ju&&Ju.rect)wm=Ju.rect,Bu=Ju.metrics;else{const Fd=Ot[Ko.fontStack],Vf=Fd&&Fd[$a];if(!Vf)continue;Bu=Vf.metrics}ll=(cu-Ko.scale)*Ya}Ah?(st.verticalizable=!0,uc.push({glyph:$a,imageName:td,x:Qr,y:ei+ll,vertical:Ah,scale:Ko.scale,fontStack:Ko.fontStack,sectionIndex:mA,metrics:Bu,rect:wm}),Qr+=Z0*Ko.scale+On):(uc.push({glyph:$a,imageName:td,x:Qr,y:ei+ll,vertical:Ah,scale:Ko.scale,fontStack:Ko.fontStack,sectionIndex:mA,metrics:Bu,rect:wm}),Qr+=Bu.advance*Ko.scale+On)}uc.length!==0&&(Do=Math.max(Qr-On,Do),Vg(uc,0,uc.length-1,$l,du)),Qr=0;const Kd=wn*cu+du;FA.lineOffset=Math.max(du,KA),ei+=Kd,al=Math.max(Kd,al),++Xu}var uh;const lc=ei-Op,{horizontalAlign:Eu,verticalAlign:pA}=q0(tr);(function(wl,cu,KA,FA,uc,du,Kd,kc,Ko){const mA=(cu-KA)*uc;let $a=0;$a=du!==Kd?-kc*FA-Op:(-FA*Ko+.5)*Kd;for(const ll of wl)for(const Bu of ll.positionedGlyphs)Bu.x+=mA,Bu.y+=$a})(st.positionedLines,$l,Eu,pA,Do,al,wn,lc,yn.length),st.top+=-pA*lc,st.bottom=st.top+lc,st.left+=-Eu*Do,st.right=st.left+Do}(Fe,u,h,v,ut,L,W,Z,be,ne,Ke,Ne),!function(st){for(const Ot of st)if(Ot.positionedGlyphs.length!==0)return!1;return!0}(Et)&&Fe}const n0={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dd={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},r0={40:!0};function mf(f,u,h,v,w,K){if(u.imageName){const L=v[u.imageName];return L?L.displaySize[0]*u.scale*Ya/K+w:0}{const L=h[u.fontStack],W=L&&L[f];return W?W.metrics.advance*u.scale+w:0}}function mm(f,u,h,v){const w=Math.pow(f-u,2);return v?f<u?w/2:2*w:w+Math.abs(h)*h}function Q0(f,u,h){let v=0;return f===10&&(v-=1e4),h&&(v+=150),f!==40&&f!==65288||(v+=50),u!==41&&u!==65289||(v+=50),v}function i0(f,u,h,v,w,K){let L=null,W=mm(u,h,w,K);for(const Z of v){const ne=mm(u-Z.x,h,w,K)+Z.badness;ne<=W&&(L=Z,W=ne)}return{index:f,x:u,priorBreak:L,badness:W}}function $g(f){return f?$g(f.priorBreak).concat(f.index):[]}function gm(f,u,h,v,w,K){if(!f)return[];const L=[],W=function(be,Ke,Ue,Ne,Xe,ut){let Ct=0;for(let Nt=0;Nt<be.length();Nt++){const Et=be.getSection(Nt);Ct+=mf(be.getCharCode(Nt),Et,Ne,Xe,Ke,ut)}return Ct/Math.max(1,Math.ceil(Ct/Ue))}(f,u,h,v,w,K),Z=f.text.indexOf("")>=0;let ne=0;for(let be=0;be<f.length();be++){const Ke=f.getSection(be),Ue=f.getCharCode(be);if(n0[Ue]||(ne+=mf(Ue,Ke,v,w,u,K)),be<f.length()-1){const Ne=!((ce=Ue)<11904)&&(!!Mi["CJK Compatibility Forms"](ce)||!!Mi["CJK Compatibility"](ce)||!!Mi["CJK Strokes"](ce)||!!Mi["CJK Symbols and Punctuation"](ce)||!!Mi["Enclosed CJK Letters and Months"](ce)||!!Mi["Halfwidth and Fullwidth Forms"](ce)||!!Mi["Ideographic Description Characters"](ce)||!!Mi["Vertical Forms"](ce)||nc.test(String.fromCodePoint(ce)));(Dd[Ue]||Ne||Ke.imageName||be!==f.length()-2&&r0[f.getCharCode(be+1)])&&L.push(i0(be+1,ne,W,L,Q0(Ue,f.getCharCode(be+1),Ne&&Z),!1))}}var ce;return $g(i0(f.length(),ne,W,L,0,!0))}function q0(f){let u=.5,h=.5;switch(f){case"right":case"top-right":case"bottom-right":u=1;break;case"left":case"top-left":case"bottom-left":u=0}switch(f){case"bottom":case"bottom-right":case"bottom-left":h=1;break;case"top":case"top-right":case"top-left":h=0}return{horizontalAlign:u,verticalAlign:h}}function Vg(f,u,h,v,w){if(!v&&!w)return;const K=f[h],L=(f[h].x+K.metrics.advance*K.scale)*v;for(let W=u;W<=h;W++)f[W].x-=L,f[W].y+=w}function Hg(f,u,h){const{horizontalAlign:v,verticalAlign:w}=q0(h),K=u[0]-f.displaySize[0]*v,L=u[1]-f.displaySize[1]*w;return{image:f,top:L,bottom:L+f.displaySize[1],left:K,right:K+f.displaySize[0]}}function ym(f){var u,h;let v=f.left,w=f.top,K=f.right-v,L=f.bottom-w;const W=(u=f.image.textFitWidth)!==null&&u!==void 0?u:"stretchOrShrink",Z=(h=f.image.textFitHeight)!==null&&h!==void 0?h:"stretchOrShrink",ne=(f.image.content[2]-f.image.content[0])/(f.image.content[3]-f.image.content[1]);if(Z==="proportional"){if(W==="stretchOnly"&&K/L<ne||W==="proportional"){const ce=Math.ceil(L*ne);v*=ce/K,K=ce}}else if(W==="proportional"&&Z==="stretchOnly"&&ne!==0&&K/L>ne){const ce=Math.ceil(K/ne);w*=ce/L,L=ce}return{x1:v,y1:w,x2:v+K,y2:w+L}}function vm(f,u,h,v,w,K){const L=f.image;let W;if(L.content){const ut=L.content,Ct=L.pixelRatio||1;W=[ut[0]/Ct,ut[1]/Ct,L.displaySize[0]-ut[2]/Ct,L.displaySize[1]-ut[3]/Ct]}const Z=u.left*K,ne=u.right*K;let ce,be,Ke,Ue;h==="width"||h==="both"?(Ue=w[0]+Z-v[3],be=w[0]+ne+v[1]):(Ue=w[0]+(Z+ne-L.displaySize[0])/2,be=Ue+L.displaySize[0]);const Ne=u.top*K,Xe=u.bottom*K;return h==="height"||h==="both"?(ce=w[1]+Ne-v[0],Ke=w[1]+Xe+v[2]):(ce=w[1]+(Ne+Xe-L.displaySize[1])/2,Ke=ce+L.displaySize[1]),{image:L,top:ce,right:be,bottom:Ke,left:Ue,collisionPadding:W}}const Ip=255,ed=128,Lh=Ip*ed;function o0(f,u){const{expression:h}=u;if(h.kind==="constant")return{kind:"constant",layoutSize:h.evaluate(new Zo(f+1))};if(h.kind==="source")return{kind:"source"};{const{zoomStops:v,interpolationType:w}=h;let K=0;for(;K<v.length&&v[K]<=f;)K++;K=Math.max(0,K-1);let L=K;for(;L<v.length&&v[L]<f+1;)L++;L=Math.min(v.length-1,L);const W=v[K],Z=v[L];return h.kind==="composite"?{kind:"composite",minZoom:W,maxZoom:Z,interpolationType:w}:{kind:"camera",minZoom:W,maxZoom:Z,minSize:h.evaluate(new Zo(W)),maxSize:h.evaluate(new Zo(Z)),interpolationType:w}}}function qf(f,u,h){let v="never";const w=f.get(u);return w?v=w:f.get(h)&&(v="always"),v}const s0=Dl.VectorTileFeature.types,a0=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Cm(f,u,h,v,w,K,L,W,Z,ne,ce,be,Ke){const Ue=W?Math.min(Lh,Math.round(W[0])):0,Ne=W?Math.min(Lh,Math.round(W[1])):0;f.emplaceBack(u,h,Math.round(32*v),Math.round(32*w),K,L,(Ue<<1)+(Z?1:0),Ne,16*ne,16*ce,256*be,256*Ke)}function Y0(f,u,h){f.emplaceBack(u.x,u.y,h),f.emplaceBack(u.x,u.y,h),f.emplaceBack(u.x,u.y,h),f.emplaceBack(u.x,u.y,h)}function l0(f){for(const u of f.sections)if(Na(u.text))return!0;return!1}class kp{constructor(u){this.layoutVertexArray=new zt,this.indexArray=new bn,this.programConfigurations=u,this.segments=new Sn,this.dynamicLayoutVertexArray=new Tt,this.opacityVertexArray=new tn,this.hasVisibleVertices=!1,this.placedSymbolArray=new j}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(u,h,v,w){this.isEmpty()||(v&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Wy.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,h),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,pf.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,a0,!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())}}yr("SymbolBuffers",kp);class Yf{constructor(u,h,v){this.layoutVertexArray=new u,this.layoutAttributes=h,this.indexArray=new v,this.segments=new Sn,this.collisionVertexArray=new _n}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,Qg.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}yr("CollisionBuffers",Yf);class Tp{constructor(u){this.collisionBoxArray=u.collisionBoxArray,this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map(L=>L.id),this.index=u.index,this.pixelRatio=u.pixelRatio,this.sourceLayerIndex=u.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=o0(this.zoom,h["text-size"]),this.iconSizeData=o0(this.zoom,h["icon-size"]);const v=this.layers[0].layout,w=v.get("symbol-sort-key"),K=v.get("symbol-z-order");this.canOverlap=qf(v,"text-overlap","text-allow-overlap")!=="never"||qf(v,"icon-overlap","icon-allow-overlap")!=="never"||v.get("text-ignore-placement")||v.get("icon-ignore-placement"),this.sortFeaturesByKey=K!=="viewport-y"&&!w.isConstant(),this.sortFeaturesByY=(K==="viewport-y"||K==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,v.get("symbol-placement")==="point"&&(this.writingModes=v.get("text-writing-mode").map(L=>a.ai[L])),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id),this.sourceID=u.sourceID}createArrays(){this.text=new kp(new nl(this.layers,this.zoom,u=>/^text/.test(u))),this.icon=new kp(new nl(this.layers,this.zoom,u=>/^icon/.test(u))),this.glyphOffsetArray=new se,this.lineVertexArray=new we,this.symbolInstances=new te,this.textAnchorOffsets=new Re}calculateGlyphDependencies(u,h,v,w,K){for(let L=0;L<u.length;L++)if(h[u.charCodeAt(L)]=!0,(v||w)&&K){const W=Rd[u.charAt(L)];W&&(h[W.charCodeAt(0)]=!0)}}populate(u,h,v){const w=this.layers[0],K=w.layout,L=K.get("text-font"),W=K.get("text-field"),Z=K.get("icon-image"),ne=(W.value.kind!=="constant"||W.value.value instanceof ls&&!W.value.value.isEmpty()||W.value.value.toString().length>0)&&(L.value.kind!=="constant"||L.value.value.length>0),ce=Z.value.kind!=="constant"||!!Z.value.value||Object.keys(Z.parameters).length>0,be=K.get("symbol-sort-key");if(this.features=[],!ne&&!ce)return;const Ke=h.iconDependencies,Ue=h.glyphDependencies,Ne=h.availableImages,Xe=new Zo(this.zoom);for(const{feature:ut,id:Ct,index:Nt,sourceLayerIndex:Et}of u){const Fe=w._featureFilter.needGeometry,st=ic(ut,Fe);if(!w._featureFilter.filter(Xe,st,v))continue;let Ot,un;if(Fe||(st.geometry=Sd(ut)),ne){const yn=w.getValueAndResolveTokens("text-field",st,v,Ne),wn=ls.factory(yn),tr=this.hasRTLText=this.hasRTLText||l0(wn);(!tr||Ks.getRTLTextPluginStatus()==="unavailable"||tr&&Ks.isParsed())&&(Ot=z0(wn,w,st))}if(ce){const yn=w.getValueAndResolveTokens("icon-image",st,v,Ne);un=yn instanceof So?yn:So.fromString(yn)}if(!Ot&&!un)continue;const zn=this.sortFeaturesByKey?be.evaluate(st,{},v):void 0;if(this.features.push({id:Ct,text:Ot,icon:un,index:Nt,sourceLayerIndex:Et,geometry:st.geometry,properties:ut.properties,type:s0[ut.type],sortKey:zn}),un&&(Ke[un.name]=!0),Ot){const yn=L.evaluate(st,{},v).join(","),wn=K.get("text-rotation-alignment")!=="viewport"&&K.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(a.ai.vertical)>=0;for(const tr of Ot.sections)if(tr.image)Ke[tr.image.name]=!0;else{const Un=_d(Ot.toString()),cr=tr.fontStack||yn,On=Ue[cr]=Ue[cr]||{};this.calculateGlyphDependencies(tr.text,On,wn,this.allowVerticalPlacement,Un)}}}K.get("symbol-placement")==="line"&&(this.features=function(ut){const Ct={},Nt={},Et=[];let Fe=0;function st(yn){Et.push(ut[yn]),Fe++}function Ot(yn,wn,tr){const Un=Nt[yn];return delete Nt[yn],Nt[wn]=Un,Et[Un].geometry[0].pop(),Et[Un].geometry[0]=Et[Un].geometry[0].concat(tr[0]),Un}function un(yn,wn,tr){const Un=Ct[wn];return delete Ct[wn],Ct[yn]=Un,Et[Un].geometry[0].shift(),Et[Un].geometry[0]=tr[0].concat(Et[Un].geometry[0]),Un}function zn(yn,wn,tr){const Un=tr?wn[0][wn[0].length-1]:wn[0][0];return`${yn}:${Un.x}:${Un.y}`}for(let yn=0;yn<ut.length;yn++){const wn=ut[yn],tr=wn.geometry,Un=wn.text?wn.text.toString():null;if(!Un){st(yn);continue}const cr=zn(Un,tr),On=zn(Un,tr,!0);if(cr in Nt&&On in Ct&&Nt[cr]!==Ct[On]){const Gr=un(cr,On,tr),Nr=Ot(cr,On,Et[Gr].geometry);delete Ct[cr],delete Nt[On],Nt[zn(Un,Et[Nr].geometry,!0)]=Nr,Et[Gr].geometry=null}else cr in Nt?Ot(cr,On,tr):On in Ct?un(cr,On,tr):(st(yn),Ct[cr]=Fe-1,Nt[On]=Fe-1)}return Et.filter(yn=>yn.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ut,Ct)=>ut.sortKey-Ct.sortKey)}update(u,h,v){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,h,this.layers,v),this.icon.programConfigurations.updatePaintArrays(u,h,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,h){const v=this.lineVertexArray.length;if(u.segment!==void 0){let w=u.dist(h[u.segment+1]),K=u.dist(h[u.segment]);const L={};for(let W=u.segment+1;W<h.length;W++)L[W]={x:h[W].x,y:h[W].y,tileUnitDistanceFromAnchor:w},W<h.length-1&&(w+=h[W+1].dist(h[W]));for(let W=u.segment||0;W>=0;W--)L[W]={x:h[W].x,y:h[W].y,tileUnitDistanceFromAnchor:K},W>0&&(K+=h[W-1].dist(h[W]));for(let W=0;W<h.length;W++){const Z=L[W];this.lineVertexArray.emplaceBack(Z.x,Z.y,Z.tileUnitDistanceFromAnchor)}}return{lineStartIndex:v,lineLength:this.lineVertexArray.length-v}}addSymbols(u,h,v,w,K,L,W,Z,ne,ce,be,Ke){const Ue=u.indexArray,Ne=u.layoutVertexArray,Xe=u.segments.prepareSegment(4*h.length,Ne,Ue,this.canOverlap?L.sortKey:void 0),ut=this.glyphOffsetArray.length,Ct=Xe.vertexLength,Nt=this.allowVerticalPlacement&&W===a.ai.vertical?Math.PI/2:0,Et=L.text&&L.text.sections;for(let Fe=0;Fe<h.length;Fe++){const{tl:st,tr:Ot,bl:un,br:zn,tex:yn,pixelOffsetTL:wn,pixelOffsetBR:tr,minFontScaleX:Un,minFontScaleY:cr,glyphOffset:On,isSDF:Gr,sectionIndex:Nr}=h[Fe],Qr=Xe.vertexLength,ei=On[1];Cm(Ne,Z.x,Z.y,st.x,ei+st.y,yn.x,yn.y,v,Gr,wn.x,wn.y,Un,cr),Cm(Ne,Z.x,Z.y,Ot.x,ei+Ot.y,yn.x+yn.w,yn.y,v,Gr,tr.x,wn.y,Un,cr),Cm(Ne,Z.x,Z.y,un.x,ei+un.y,yn.x,yn.y+yn.h,v,Gr,wn.x,tr.y,Un,cr),Cm(Ne,Z.x,Z.y,zn.x,ei+zn.y,yn.x+yn.w,yn.y+yn.h,v,Gr,tr.x,tr.y,Un,cr),Y0(u.dynamicLayoutVertexArray,Z,Nt),Ue.emplaceBack(Qr,Qr+2,Qr+1),Ue.emplaceBack(Qr+1,Qr+2,Qr+3),Xe.vertexLength+=4,Xe.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(On[0]),Fe!==h.length-1&&Nr===h[Fe+1].sectionIndex||u.programConfigurations.populatePaintArrays(Ne.length,L,L.index,{},Ke,Et&&Et[Nr])}u.placedSymbolArray.emplaceBack(Z.x,Z.y,ut,this.glyphOffsetArray.length-ut,Ct,ne,ce,Z.segment,v?v[0]:0,v?v[1]:0,w[0],w[1],W,0,!1,0,be)}_addCollisionDebugVertex(u,h,v,w,K,L){return h.emplaceBack(0,0),u.emplaceBack(v.x,v.y,w,K,Math.round(L.x),Math.round(L.y))}addCollisionDebugVertices(u,h,v,w,K,L,W){const Z=K.segments.prepareSegment(4,K.layoutVertexArray,K.indexArray),ne=Z.vertexLength,ce=K.layoutVertexArray,be=K.collisionVertexArray,Ke=W.anchorX,Ue=W.anchorY;this._addCollisionDebugVertex(ce,be,L,Ke,Ue,new k(u,h)),this._addCollisionDebugVertex(ce,be,L,Ke,Ue,new k(v,h)),this._addCollisionDebugVertex(ce,be,L,Ke,Ue,new k(v,w)),this._addCollisionDebugVertex(ce,be,L,Ke,Ue,new k(u,w)),Z.vertexLength+=4;const Ne=K.indexArray;Ne.emplaceBack(ne,ne+1),Ne.emplaceBack(ne+1,ne+2),Ne.emplaceBack(ne+2,ne+3),Ne.emplaceBack(ne+3,ne),Z.primitiveLength+=4}addDebugCollisionBoxes(u,h,v,w){for(let K=u;K<h;K++){const L=this.collisionBoxArray.get(K);this.addCollisionDebugVertices(L.x1,L.y1,L.x2,L.y2,w?this.textCollisionBox:this.iconCollisionBox,L.anchorPoint,v)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Yf(Zt,Zm.members,vn),this.iconCollisionBox=new Yf(Zt,Zm.members,vn);for(let u=0;u<this.symbolInstances.length;u++){const h=this.symbolInstances.get(u);this.addDebugCollisionBoxes(h.textBoxStartIndex,h.textBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.verticalTextBoxStartIndex,h.verticalTextBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.iconBoxStartIndex,h.iconBoxEndIndex,h,!1),this.addDebugCollisionBoxes(h.verticalIconBoxStartIndex,h.verticalIconBoxEndIndex,h,!1)}}_deserializeCollisionBoxesForSymbol(u,h,v,w,K,L,W,Z,ne){const ce={};for(let be=h;be<v;be++){const Ke=u.get(be);ce.textBox={x1:Ke.x1,y1:Ke.y1,x2:Ke.x2,y2:Ke.y2,anchorPointX:Ke.anchorPointX,anchorPointY:Ke.anchorPointY},ce.textFeatureIndex=Ke.featureIndex;break}for(let be=w;be<K;be++){const Ke=u.get(be);ce.verticalTextBox={x1:Ke.x1,y1:Ke.y1,x2:Ke.x2,y2:Ke.y2,anchorPointX:Ke.anchorPointX,anchorPointY:Ke.anchorPointY},ce.verticalTextFeatureIndex=Ke.featureIndex;break}for(let be=L;be<W;be++){const Ke=u.get(be);ce.iconBox={x1:Ke.x1,y1:Ke.y1,x2:Ke.x2,y2:Ke.y2,anchorPointX:Ke.anchorPointX,anchorPointY:Ke.anchorPointY},ce.iconFeatureIndex=Ke.featureIndex;break}for(let be=Z;be<ne;be++){const Ke=u.get(be);ce.verticalIconBox={x1:Ke.x1,y1:Ke.y1,x2:Ke.x2,y2:Ke.y2,anchorPointX:Ke.anchorPointX,anchorPointY:Ke.anchorPointY},ce.verticalIconFeatureIndex=Ke.featureIndex;break}return ce}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let h=0;h<this.symbolInstances.length;h++){const v=this.symbolInstances.get(h);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,h){const v=u.placedSymbolArray.get(h),w=v.vertexStartIndex+4*v.numGlyphs;for(let K=v.vertexStartIndex;K<w;K+=4)u.indexArray.emplaceBack(K,K+2,K+1),u.indexArray.emplaceBack(K+1,K+2,K+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(u),v=Math.cos(u),w=[],K=[],L=[];for(let W=0;W<this.symbolInstances.length;++W){L.push(W);const Z=this.symbolInstances.get(W);w.push(0|Math.round(h*Z.anchorX+v*Z.anchorY)),K.push(Z.featureIndex)}return L.sort((W,Z)=>w[W]-w[Z]||K[Z]-K[W]),L}addToSortKeyRanges(u,h){const v=this.sortKeyRanges[this.sortKeyRanges.length-1];v&&v.sortKey===h?v.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:h,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 h of this.symbolInstanceIndexes){const v=this.symbolInstances.get(h);this.featureSortOrder.push(v.featureIndex),[v.rightJustifiedTextSymbolIndex,v.centerJustifiedTextSymbolIndex,v.leftJustifiedTextSymbolIndex].forEach((w,K,L)=>{w>=0&&L.indexOf(w)===K&&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 _m,m;yr("SymbolBucket",Tp,{omit:["layers","collisionBoxArray","features","compareText"]}),Tp.MAX_GLYPHS=65535,Tp.addDynamicAttributes=Y0;var C={get paint(){return m=m||new bs({"icon-opacity":new Hr(Be.paint_symbol["icon-opacity"]),"icon-color":new Hr(Be.paint_symbol["icon-color"]),"icon-halo-color":new Hr(Be.paint_symbol["icon-halo-color"]),"icon-halo-width":new Hr(Be.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Hr(Be.paint_symbol["icon-halo-blur"]),"icon-translate":new gr(Be.paint_symbol["icon-translate"]),"icon-translate-anchor":new gr(Be.paint_symbol["icon-translate-anchor"]),"text-opacity":new Hr(Be.paint_symbol["text-opacity"]),"text-color":new Hr(Be.paint_symbol["text-color"],{runtimeType:Or,getOverride:f=>f.textColor,hasOverride:f=>!!f.textColor}),"text-halo-color":new Hr(Be.paint_symbol["text-halo-color"]),"text-halo-width":new Hr(Be.paint_symbol["text-halo-width"]),"text-halo-blur":new Hr(Be.paint_symbol["text-halo-blur"]),"text-translate":new gr(Be.paint_symbol["text-translate"]),"text-translate-anchor":new gr(Be.paint_symbol["text-translate-anchor"])})},get layout(){return _m=_m||new bs({"symbol-placement":new gr(Be.layout_symbol["symbol-placement"]),"symbol-spacing":new gr(Be.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new gr(Be.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Hr(Be.layout_symbol["symbol-sort-key"]),"symbol-z-order":new gr(Be.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new gr(Be.layout_symbol["icon-allow-overlap"]),"icon-overlap":new gr(Be.layout_symbol["icon-overlap"]),"icon-ignore-placement":new gr(Be.layout_symbol["icon-ignore-placement"]),"icon-optional":new gr(Be.layout_symbol["icon-optional"]),"icon-rotation-alignment":new gr(Be.layout_symbol["icon-rotation-alignment"]),"icon-size":new Hr(Be.layout_symbol["icon-size"]),"icon-text-fit":new gr(Be.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new gr(Be.layout_symbol["icon-text-fit-padding"]),"icon-image":new Hr(Be.layout_symbol["icon-image"]),"icon-rotate":new Hr(Be.layout_symbol["icon-rotate"]),"icon-padding":new Hr(Be.layout_symbol["icon-padding"]),"icon-keep-upright":new gr(Be.layout_symbol["icon-keep-upright"]),"icon-offset":new Hr(Be.layout_symbol["icon-offset"]),"icon-anchor":new Hr(Be.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new gr(Be.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new gr(Be.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new gr(Be.layout_symbol["text-rotation-alignment"]),"text-field":new Hr(Be.layout_symbol["text-field"]),"text-font":new Hr(Be.layout_symbol["text-font"]),"text-size":new Hr(Be.layout_symbol["text-size"]),"text-max-width":new Hr(Be.layout_symbol["text-max-width"]),"text-line-height":new gr(Be.layout_symbol["text-line-height"]),"text-letter-spacing":new Hr(Be.layout_symbol["text-letter-spacing"]),"text-justify":new Hr(Be.layout_symbol["text-justify"]),"text-radial-offset":new Hr(Be.layout_symbol["text-radial-offset"]),"text-variable-anchor":new gr(Be.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Hr(Be.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Hr(Be.layout_symbol["text-anchor"]),"text-max-angle":new gr(Be.layout_symbol["text-max-angle"]),"text-writing-mode":new gr(Be.layout_symbol["text-writing-mode"]),"text-rotate":new Hr(Be.layout_symbol["text-rotate"]),"text-padding":new gr(Be.layout_symbol["text-padding"]),"text-keep-upright":new gr(Be.layout_symbol["text-keep-upright"]),"text-transform":new Hr(Be.layout_symbol["text-transform"]),"text-offset":new Hr(Be.layout_symbol["text-offset"]),"text-allow-overlap":new gr(Be.layout_symbol["text-allow-overlap"]),"text-overlap":new gr(Be.layout_symbol["text-overlap"]),"text-ignore-placement":new gr(Be.layout_symbol["text-ignore-placement"]),"text-optional":new gr(Be.layout_symbol["text-optional"])})}};class F{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:Sr,this.defaultValue=u}evaluate(u){if(u.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(u.formattedSection))return h.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}}yr("FormatSectionOverride",F,{omit:["defaultValue"]});class G extends su{constructor(u){super(u,C)}recalculate(u,h){if(super.recalculate(u,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const v=this.layout.get("text-writing-mode");if(v){const w=[];for(const K of v)w.indexOf(K)<0&&w.push(K);this.layout._values["text-writing-mode"]=w}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,h,v,w){const K=this.layout.get(u).evaluate(h,{},v,w),L=this._unevaluatedLayout._values[u];return L.isDataDriven()||jl(L.value)||!K?K:function(W,Z){return Z.replace(/{([^{}]+)}/g,(ne,ce)=>W&&ce in W?String(W[ce]):"")}(h.properties,K)}createBucket(u){return new Tp(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of C.paint.overridableProperties){if(!G.hasPaintOverride(this.layout,u))continue;const h=this.paint.get(u),v=new F(h),w=new vu(v,h.property.specification);let K=null;K=h.value.kind==="constant"||h.value.kind==="source"?new Zd("source",w):new za("composite",w,h.value.zoomStops),this.paint._values[u]=new gs(h.property,K,h.parameters)}}_handleOverridablePaintPropertyUpdate(u,h,v){return!(!this.layout||h.isDataDriven()||v.isDataDriven())&&G.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,h){const v=u.get("text-field"),w=C.paint.properties[h];let K=!1;const L=W=>{for(const Z of W)if(w.overrides&&w.overrides.hasOverride(Z))return void(K=!0)};if(v.value.kind==="constant"&&v.value.value instanceof ls)L(v.value.value.sections);else if(v.value.kind==="source"){const W=ne=>{K||(ne instanceof fo&&rs(ne.value)===Sa?L(ne.value.sections):ne instanceof cl?L(ne.sections):ne.eachChild(W))},Z=v.value;Z._styleExpression&&W(Z._styleExpression.expression)}return K}}let ae;var ge={get paint(){return ae=ae||new bs({"background-color":new gr(Be.paint_background["background-color"]),"background-pattern":new rc(Be.paint_background["background-pattern"]),"background-opacity":new gr(Be.paint_background["background-opacity"])})}};class Je extends su{constructor(u){super(u,ge)}}let It;var Wt={get paint(){return It=It||new bs({"raster-opacity":new gr(Be.paint_raster["raster-opacity"]),"raster-hue-rotate":new gr(Be.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new gr(Be.paint_raster["raster-brightness-min"]),"raster-brightness-max":new gr(Be.paint_raster["raster-brightness-max"]),"raster-saturation":new gr(Be.paint_raster["raster-saturation"]),"raster-contrast":new gr(Be.paint_raster["raster-contrast"]),"raster-resampling":new gr(Be.paint_raster["raster-resampling"]),"raster-fade-duration":new gr(Be.paint_raster["raster-fade-duration"])})}};class xn extends su{constructor(u){super(u,Wt)}}class Ar extends su{constructor(u){super(u,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=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 mr{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 Jn=63710088e-1;class zr{constructor(u,h){if(isNaN(u)||isNaN(h))throw new Error(`Invalid LngLat object: (${u}, ${h})`);if(this.lng=+u,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zr(bt(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const h=Math.PI/180,v=this.lat*h,w=u.lat*h,K=Math.sin(v)*Math.sin(w)+Math.cos(v)*Math.cos(w)*Math.cos((u.lng-this.lng)*h);return Jn*Math.acos(Math.min(K,1))}static convert(u){if(u instanceof zr)return u;if(Array.isArray(u)&&(u.length===2||u.length===3))return new zr(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&typeof u=="object"&&u!==null)return new zr(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 ii=2*Math.PI*Jn;function li(f){return ii*Math.cos(f*Math.PI/180)}function sl(f){return(180+f)/360}function ln(f){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360}function Jt(f,u){return f/li(u)}function cn(f){return 360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90}function Cr(f,u){return f*li(cn(u))}class ni{constructor(u,h,v=0){this.x=+u,this.y=+h,this.z=+v}static fromLngLat(u,h=0){const v=zr.convert(u);return new ni(sl(v.lng),ln(v.lat),Jt(h,v.lat))}toLngLat(){return new zr(360*this.x-180,cn(this.y))}toAltitude(){return Cr(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/ii*(u=cn(this.y),1/Math.cos(u*Math.PI/180));var u}}function Ii(f,u,h){var v=2*Math.PI*6378137/256/Math.pow(2,h);return[f*v-2*Math.PI*6378137/2,u*v-2*Math.PI*6378137/2]}class Oi{constructor(u,h,v){if(!function(w,K,L){return!(w<0||w>25||L<0||L>=Math.pow(2,w)||K<0||K>=Math.pow(2,w))}(u,h,v))throw new Error(`x=${h}, 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=h,this.y=v,this.key=Jo(0,u,u,h,v)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,h,v){const w=(L=this.y,W=this.z,Z=Ii(256*(K=this.x),256*(L=Math.pow(2,W)-L-1),W),ne=Ii(256*(K+1),256*(L+1),W),Z[0]+","+Z[1]+","+ne[0]+","+ne[1]);var K,L,W,Z,ne;const ce=function(be,Ke,Ue){let Ne,Xe="";for(let ut=be;ut>0;ut--)Ne=1<<ut-1,Xe+=(Ke&Ne?1:0)+(Ue&Ne?2:0);return Xe}(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,h>1?"@2x":"").replace(/{quadkey}/g,ce).replace(/{bbox-epsg-3857}/g,w)}isChildOf(u){const h=this.z-u.z;return h>0&&u.x===this.x>>h&&u.y===this.y>>h}getTilePoint(u){const h=Math.pow(2,this.z);return new k((u.x*h-this.x)*at,(u.y*h-this.y)*at)}toString(){return`${this.z}/${this.x}/${this.y}`}}class zi{constructor(u,h){this.wrap=u,this.canonical=h,this.key=Jo(u,h.z,h.z,h.x,h.y)}}class Fs{constructor(u,h,v,w,K){if(this.terrainRttPosMatrix32f=null,u<v)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${v}`);this.overscaledZ=u,this.wrap=h,this.canonical=new Oi(v,+w,+K),this.key=Jo(h,u,v,w,K)}clone(){return new Fs(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 h=this.canonical.z-u;return u>this.canonical.z?new Fs(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Fs(u,this.wrap,u,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(u,h){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?Jo(this.wrap*+h,u,this.canonical.z,this.canonical.x,this.canonical.y):Jo(this.wrap*+h,u,u,this.canonical.x>>v,this.canonical.y>>v)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const h=this.canonical.z-u.canonical.z;return u.overscaledZ===0||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>h&&u.canonical.y===this.canonical.y>>h}children(u){if(this.overscaledZ>=u)return[new Fs(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,v=2*this.canonical.x,w=2*this.canonical.y;return[new Fs(h,this.wrap,h,v,w),new Fs(h,this.wrap,h,v+1,w),new Fs(h,this.wrap,h,v,w+1),new Fs(h,this.wrap,h,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 Fs(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new Fs(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 zi(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 Jo(f,u,h,v,w){(f*=2)<0&&(f=-1*f-1);const K=1<<h;return(K*K*f+K*w+v).toString(36)+h.toString(36)+u.toString(36)}yr("CanonicalTileID",Oi),yr("OverscaledTileID",Fs,{omit:["terrainRttPosMatrix32f"]});class Uh{constructor(u,h,v,w=1,K=1,L=1,W=0){if(this.uid=u,h.height!==h.width)throw new RangeError("DEM tiles must be square");if(v&&!["mapbox","terrarium","custom"].includes(v))return void nt(`"${v}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=h.height;const Z=this.dim=h.height-2;switch(this.data=new Uint32Array(h.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=K,this.blueFactor=L,this.baseShift=W;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ne=0;ne<Z;ne++)this.data[this._idx(-1,ne)]=this.data[this._idx(0,ne)],this.data[this._idx(Z,ne)]=this.data[this._idx(Z-1,ne)],this.data[this._idx(ne,-1)]=this.data[this._idx(ne,0)],this.data[this._idx(ne,Z)]=this.data[this._idx(ne,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 ne=0;ne<Z;ne++)for(let ce=0;ce<Z;ce++){const be=this.get(ne,ce);be>this.max&&(this.max=be),be<this.min&&(this.min=be)}}get(u,h){const v=new Uint8Array(this.data.buffer),w=4*this._idx(u,h);return this.unpack(v[w],v[w+1],v[w+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,h){if(u<-1||u>=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(u+1)}unpack(u,h,v){return u*this.redFactor+h*this.greenFactor+v*this.blueFactor-this.baseShift}getPixels(){return new Hu({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,h,v){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let w=h*this.dim,K=h*this.dim+this.dim,L=v*this.dim,W=v*this.dim+this.dim;switch(h){case-1:w=K-1;break;case 1:K=w+1}switch(v){case-1:L=W-1;break;case 1:W=L+1}const Z=-h*this.dim,ne=-v*this.dim;for(let ce=L;ce<W;ce++)for(let be=w;be<K;be++)this.data[this._idx(be,ce)]=u.data[this._idx(be+Z,ce+ne)]}}yr("DEMData",Uh);class Zg{constructor(u){this._stringToNumber={},this._numberToString=[];for(let h=0;h<u.length;h++){const v=u[h];this._stringToNumber[v]=h,this._numberToString[h]=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 s_{constructor(u,h,v,w,K){this.type="Feature",this._vectorTileFeature=u,u._z=h,u._x=v,u._y=w,this.properties=u.properties,this.id=K}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 h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(u[h]=this[h]);return u}}class a_{constructor(u,h){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new uA(at,16,0),this.grid3D=new uA(at,16,0),this.featureIndexArray=new Ze,this.promoteId=h}insert(u,h,v,w,K,L){const W=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(v,w,K);const Z=L?this.grid3D:this.grid;for(let ne=0;ne<h.length;ne++){const ce=h[ne],be=[1/0,1/0,-1/0,-1/0];for(let Ke=0;Ke<ce.length;Ke++){const Ue=ce[Ke];be[0]=Math.min(be[0],Ue.x),be[1]=Math.min(be[1],Ue.y),be[2]=Math.max(be[2],Ue.x),be[3]=Math.max(be[3],Ue.y)}be[0]<at&&be[1]<at&&be[2]>=0&&be[3]>=0&&Z.insert(W,be[0],be[1],be[2],be[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Dl.VectorTile(new e0(this.rawTileData)).layers,this.sourceLayerCoder=new Zg(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,h,v,w){this.loadVTLayers();const K=u.params,L=at/u.tileSize/u.scale,W=HA(K.filter),Z=u.queryGeometry,ne=u.queryPadding*L,ce=u_(Z),be=this.grid.query(ce.minX-ne,ce.minY-ne,ce.maxX+ne,ce.maxY+ne),Ke=u_(u.cameraQueryGeometry),Ue=this.grid3D.query(Ke.minX-ne,Ke.minY-ne,Ke.maxX+ne,Ke.maxY+ne,(ut,Ct,Nt,Et)=>function(Fe,st,Ot,un,zn){for(const wn of Fe)if(st<=wn.x&&Ot<=wn.y&&un>=wn.x&&zn>=wn.y)return!0;const yn=[new k(st,Ot),new k(st,zn),new k(un,zn),new k(un,Ot)];if(Fe.length>2){for(const wn of yn)if(Bc(Fe,wn))return!0}for(let wn=0;wn<Fe.length-1;wn++)if(um(Fe[wn],Fe[wn+1],yn))return!0;return!1}(u.cameraQueryGeometry,ut-ne,Ct-ne,Nt+ne,Et+ne));for(const ut of Ue)be.push(ut);be.sort(c3);const Ne={};let Xe;for(let ut=0;ut<be.length;ut++){const Ct=be[ut];if(Ct===Xe)continue;Xe=Ct;const Nt=this.featureIndexArray.get(Ct);let Et=null;this.loadMatchingFeature(Ne,Nt.bucketIndex,Nt.sourceLayerIndex,Nt.featureIndex,W,K.layers,K.availableImages,h,v,w,(Fe,st,Ot)=>(Et||(Et=Sd(Fe)),st.queryIntersectsFeature({queryGeometry:Z,feature:Fe,featureState:Ot,geometry:Et,zoom:this.z,transform:u.transform,pixelsToTileUnits:L,pixelPosMatrix:u.pixelPosMatrix})))}return Ne}loadMatchingFeature(u,h,v,w,K,L,W,Z,ne,ce,be){const Ke=this.bucketLayerIDs[h];if(L&&!Ke.some(ut=>L.has(ut)))return;const Ue=this.sourceLayerCoder.decode(v),Ne=this.vtLayers[Ue].feature(w);if(K.needGeometry){const ut=ic(Ne,!0);if(!K.filter(new Zo(this.tileID.overscaledZ),ut,this.tileID.canonical))return}else if(!K.filter(new Zo(this.tileID.overscaledZ),Ne))return;const Xe=this.getId(Ne,Ue);for(let ut=0;ut<Ke.length;ut++){const Ct=Ke[ut];if(L&&!L.has(Ct))continue;const Nt=Z[Ct];if(!Nt)continue;let Et={};Xe&&ce&&(Et=ce.getState(Nt.sourceLayer||"_geojsonTileLayer",Xe));const Fe=gt({},ne[Ct]);Fe.paint=l_(Fe.paint,Nt.paint,Ne,Et,W),Fe.layout=l_(Fe.layout,Nt.layout,Ne,Et,W);const st=!be||be(Ne,Nt,Et);if(!st)continue;const Ot=new s_(Ne,this.z,this.x,this.y,Xe);Ot.layer=Fe;let un=u[Ct];un===void 0&&(un=u[Ct]=[]),un.push({featureIndex:w,feature:Ot,intersectionZ:st})}}lookupSymbolFeatures(u,h,v,w,K,L,W,Z){const ne={};this.loadVTLayers();const ce=HA(K);for(const be of u)this.loadMatchingFeature(ne,v,w,be,ce,L,W,Z,h);return ne}hasLayer(u){for(const h of this.bucketLayerIDs)for(const v of h)if(u===v)return!0;return!1}getId(u,h){var v;let w=u.id;return this.promoteId&&(w=u.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[h]],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 l_(f,u,h,v,w){return Pt(f,(K,L)=>{const W=u instanceof da?u.get(L):null;return W&&W.evaluate?W.evaluate(h,v,w):W})}function u_(f){let u=1/0,h=1/0,v=-1/0,w=-1/0;for(const K of f)u=Math.min(u,K.x),h=Math.min(h,K.y),v=Math.max(v,K.x),w=Math.max(w,K.y);return{minX:u,minY:h,maxX:v,maxY:w}}function c3(f,u){return u-f}function A_(f,u,h,v,w){const K=[];for(let L=0;L<f.length;L++){const W=f[L];let Z;for(let ne=0;ne<W.length-1;ne++){let ce=W[ne],be=W[ne+1];ce.x<u&&be.x<u||(ce.x<u?ce=new k(u,ce.y+(u-ce.x)/(be.x-ce.x)*(be.y-ce.y))._round():be.x<u&&(be=new k(u,ce.y+(u-ce.x)/(be.x-ce.x)*(be.y-ce.y))._round()),ce.y<h&&be.y<h||(ce.y<h?ce=new k(ce.x+(h-ce.y)/(be.y-ce.y)*(be.x-ce.x),h)._round():be.y<h&&(be=new k(ce.x+(h-ce.y)/(be.y-ce.y)*(be.x-ce.x),h)._round()),ce.x>=v&&be.x>=v||(ce.x>=v?ce=new k(v,ce.y+(v-ce.x)/(be.x-ce.x)*(be.y-ce.y))._round():be.x>=v&&(be=new k(v,ce.y+(v-ce.x)/(be.x-ce.x)*(be.y-ce.y))._round()),ce.y>=w&&be.y>=w||(ce.y>=w?ce=new k(ce.x+(w-ce.y)/(be.y-ce.y)*(be.x-ce.x),w)._round():be.y>=w&&(be=new k(ce.x+(w-ce.y)/(be.y-ce.y)*(be.x-ce.x),w)._round()),Z&&ce.equals(Z[Z.length-1])||(Z=[ce],K.push(Z)),Z.push(be)))))}}return K}yr("FeatureIndex",a_,{omit:["rawTileData","sourceLayerCoder"]});class Pp extends k{constructor(u,h,v,w){super(u,h),this.angle=v,w!==void 0&&(this.segment=w)}clone(){return new Pp(this.x,this.y,this.angle,this.segment)}}function c_(f,u,h,v,w){if(u.segment===void 0||h===0)return!0;let K=u,L=u.segment+1,W=0;for(;W>-h/2;){if(L--,L<0)return!1;W-=f[L].dist(K),K=f[L]}W+=f[L].dist(f[L+1]),L++;const Z=[];let ne=0;for(;W<h/2;){const ce=f[L],be=f[L+1];if(!be)return!1;let Ke=f[L-1].angleTo(ce)-ce.angleTo(be);for(Ke=Math.abs((Ke+3*Math.PI)%(2*Math.PI)-Math.PI),Z.push({distance:W,angleDelta:Ke}),ne+=Ke;W-Z[0].distance>v;)ne-=Z.shift().angleDelta;if(ne>w)return!1;L++,W+=ce.dist(be)}return!0}function d_(f){let u=0;for(let h=0;h<f.length-1;h++)u+=f[h].dist(f[h+1]);return u}function lh(f,u,h){return f?.6*u*h:0}function h_(f,u){return Math.max(f?f.right-f.left:0,u?u.right-u.left:0)}function d3(f,u,h,v,w,K){const L=lh(h,w,K),W=h_(h,v)*K;let Z=0;const ne=d_(f)/2;for(let ce=0;ce<f.length-1;ce++){const be=f[ce],Ke=f[ce+1],Ue=be.dist(Ke);if(Z+Ue>ne){const Ne=(ne-Z)/Ue,Xe=vi.number(be.x,Ke.x,Ne),ut=vi.number(be.y,Ke.y,Ne),Ct=new Pp(Xe,ut,Ke.angleTo(be),ce);return Ct._round(),!L||c_(f,Ct,W,L,u)?Ct:void 0}Z+=Ue}}function bm(f,u,h,v,w,K,L,W,Z){const ne=lh(v,K,L),ce=h_(v,w),be=ce*L,Ke=f[0].x===0||f[0].x===Z||f[0].y===0||f[0].y===Z;return u-be<u/4&&(u=be+u/4),vo(f,Ke?u/2*W%u:(ce/2+2*K)*L*W%u,u,ne,h,be,Ke,!1,Z)}function vo(f,u,h,v,w,K,L,W,Z){const ne=K/2,ce=d_(f);let be=0,Ke=u-h,Ue=[];for(let Ne=0;Ne<f.length-1;Ne++){const Xe=f[Ne],ut=f[Ne+1],Ct=Xe.dist(ut),Nt=ut.angleTo(Xe);for(;Ke+h<be+Ct;){Ke+=h;const Et=(Ke-be)/Ct,Fe=vi.number(Xe.x,ut.x,Et),st=vi.number(Xe.y,ut.y,Et);if(Fe>=0&&Fe<Z&&st>=0&&st<Z&&Ke-ne>=0&&Ke+ne<=ce){const Ot=new Pp(Fe,st,Nt,Ne);Ot._round(),v&&!c_(f,Ot,K,v,w)||Ue.push(Ot)}}be+=Ct}return W||Ue.length||L||(Ue=vo(f,be/2,h,v,w,K,L,!0,Z)),Ue}yr("Anchor",Pp);const $0=hA;function Ic(f,u,h,v){const w=[],K=f.image,L=K.pixelRatio,W=K.paddedRect.w-2*$0,Z=K.paddedRect.h-2*$0;let ne={x1:f.left,y1:f.top,x2:f.right,y2:f.bottom};const ce=K.stretchX||[[0,W]],be=K.stretchY||[[0,Z]],Ke=(On,Gr)=>On+Gr[1]-Gr[0],Ue=ce.reduce(Ke,0),Ne=be.reduce(Ke,0),Xe=W-Ue,ut=Z-Ne;let Ct=0,Nt=Ue,Et=0,Fe=Ne,st=0,Ot=Xe,un=0,zn=ut;if(K.content&&v){const On=K.content,Gr=On[2]-On[0],Nr=On[3]-On[1];(K.textFitWidth||K.textFitHeight)&&(ne=ym(f)),Ct=_l(ce,0,On[0]),Et=_l(be,0,On[1]),Nt=_l(ce,On[0],On[2]),Fe=_l(be,On[1],On[3]),st=On[0]-Ct,un=On[1]-Et,Ot=Gr-Nt,zn=Nr-Fe}const yn=ne.x1,wn=ne.y1,tr=ne.x2-yn,Un=ne.y2-wn,cr=(On,Gr,Nr,Qr)=>{const ei=zh(On.stretch-Ct,Nt,tr,yn),Do=Xg(On.fixed-st,Ot,On.stretch,Ue),al=zh(Gr.stretch-Et,Fe,Un,wn),$l=Xg(Gr.fixed-un,zn,Gr.stretch,Ne),Xu=zh(Nr.stretch-Ct,Nt,tr,yn),uh=Xg(Nr.fixed-st,Ot,Nr.stretch,Ue),lc=zh(Qr.stretch-Et,Fe,Un,wn),Eu=Xg(Qr.fixed-un,zn,Qr.stretch,Ne),pA=new k(ei,al),wl=new k(Xu,al),cu=new k(Xu,lc),KA=new k(ei,lc),FA=new k(Do/L,$l/L),uc=new k(uh/L,Eu/L),du=u*Math.PI/180;if(du){const Ko=Math.sin(du),mA=Math.cos(du),$a=[mA,-Ko,Ko,mA];pA._matMult($a),wl._matMult($a),KA._matMult($a),cu._matMult($a)}const Kd=On.stretch+On.fixed,kc=Gr.stretch+Gr.fixed;return{tl:pA,tr:wl,bl:KA,br:cu,tex:{x:K.paddedRect.x+$0+Kd,y:K.paddedRect.y+$0+kc,w:Nr.stretch+Nr.fixed-Kd,h:Qr.stretch+Qr.fixed-kc},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:FA,pixelOffsetBR:uc,minFontScaleX:Ot/L/tr,minFontScaleY:zn/L/Un,isSDF:h}};if(v&&(K.stretchX||K.stretchY)){const On=f_(ce,Xe,Ue),Gr=f_(be,ut,Ne);for(let Nr=0;Nr<On.length-1;Nr++){const Qr=On[Nr],ei=On[Nr+1];for(let Do=0;Do<Gr.length-1;Do++)w.push(cr(Qr,Gr[Do],ei,Gr[Do+1]))}}else w.push(cr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:W+1},{fixed:0,stretch:Z+1}));return w}function _l(f,u,h){let v=0;for(const w of f)v+=Math.max(u,Math.min(h,w[1]))-Math.max(u,Math.min(h,w[0]));return v}function f_(f,u,h){const v=[{fixed:-1,stretch:0}];for(const[w,K]of f){const L=v[v.length-1];v.push({fixed:w-L.stretch,stretch:L.stretch}),v.push({fixed:w-L.stretch,stretch:L.stretch+(K-w)})}return v.push({fixed:u+$0,stretch:h}),v}function zh(f,u,h,v){return f/u*h+v}function Xg(f,u,h,v){return f-u*h/v}class Jg{constructor(u,h,v,w,K,L,W,Z,ne,ce){var be;if(this.boxStartIndex=u.length,ne){let Ke=L.top,Ue=L.bottom;const Ne=L.collisionPadding;Ne&&(Ke-=Ne[1],Ue+=Ne[3]);let Xe=Ue-Ke;Xe>0&&(Xe=Math.max(10,Xe),this.circleDiameter=Xe)}else{const Ke=!((be=L.image)===null||be===void 0)&&be.content&&(L.image.textFitWidth||L.image.textFitHeight)?ym(L):{x1:L.left,y1:L.top,x2:L.right,y2:L.bottom};Ke.y1=Ke.y1*W-Z[0],Ke.y2=Ke.y2*W+Z[2],Ke.x1=Ke.x1*W-Z[3],Ke.x2=Ke.x2*W+Z[1];const Ue=L.collisionPadding;if(Ue&&(Ke.x1-=Ue[0]*W,Ke.y1-=Ue[1]*W,Ke.x2+=Ue[2]*W,Ke.y2+=Ue[3]*W),ce){const Ne=new k(Ke.x1,Ke.y1),Xe=new k(Ke.x2,Ke.y1),ut=new k(Ke.x1,Ke.y2),Ct=new k(Ke.x2,Ke.y2),Nt=ce*Math.PI/180;Ne._rotate(Nt),Xe._rotate(Nt),ut._rotate(Nt),Ct._rotate(Nt),Ke.x1=Math.min(Ne.x,Xe.x,ut.x,Ct.x),Ke.x2=Math.max(Ne.x,Xe.x,ut.x,Ct.x),Ke.y1=Math.min(Ne.y,Xe.y,ut.y,Ct.y),Ke.y2=Math.max(Ne.y,Xe.y,ut.y,Ct.y)}u.emplaceBack(h.x,h.y,Ke.x1,Ke.y1,Ke.x2,Ke.y2,v,w,K)}this.boxEndIndex=u.length}}class h3{constructor(u=[],h=(v,w)=>v<w?-1:v>w?1:0){if(this.data=u,this.length=this.data.length,this.compare=h,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],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:h,compare:v}=this,w=h[u];for(;u>0;){const K=u-1>>1,L=h[K];if(v(w,L)>=0)break;h[u]=L,u=K}h[u]=w}_down(u){const{data:h,compare:v}=this,w=this.length>>1,K=h[u];for(;u<w;){let L=1+(u<<1);const W=L+1;if(W<this.length&&v(h[W],h[L])<0&&(L=W),v(h[L],K)>=0)break;h[u]=h[L],u=L}h[u]=K}}function f3(f,u=1,h=!1){let v=1/0,w=1/0,K=-1/0,L=-1/0;const W=f[0];for(let Ue=0;Ue<W.length;Ue++){const Ne=W[Ue];(!Ue||Ne.x<v)&&(v=Ne.x),(!Ue||Ne.y<w)&&(w=Ne.y),(!Ue||Ne.x>K)&&(K=Ne.x),(!Ue||Ne.y>L)&&(L=Ne.y)}const Z=Math.min(K-v,L-w);let ne=Z/2;const ce=new h3([],p3);if(Z===0)return new k(v,w);for(let Ue=v;Ue<K;Ue+=Z)for(let Ne=w;Ne<L;Ne+=Z)ce.push(new Rp(Ue+ne,Ne+ne,ne,f));let be=function(Ue){let Ne=0,Xe=0,ut=0;const Ct=Ue[0];for(let Nt=0,Et=Ct.length,Fe=Et-1;Nt<Et;Fe=Nt++){const st=Ct[Nt],Ot=Ct[Fe],un=st.x*Ot.y-Ot.x*st.y;Xe+=(st.x+Ot.x)*un,ut+=(st.y+Ot.y)*un,Ne+=3*un}return new Rp(Xe/Ne,ut/Ne,0,Ue)}(f),Ke=ce.length;for(;ce.length;){const Ue=ce.pop();(Ue.d>be.d||!be.d)&&(be=Ue,h&&console.log("found best %d after %d probes",Math.round(1e4*Ue.d)/1e4,Ke)),Ue.max-be.d<=u||(ne=Ue.h/2,ce.push(new Rp(Ue.p.x-ne,Ue.p.y-ne,ne,f)),ce.push(new Rp(Ue.p.x+ne,Ue.p.y-ne,ne,f)),ce.push(new Rp(Ue.p.x-ne,Ue.p.y+ne,ne,f)),ce.push(new Rp(Ue.p.x+ne,Ue.p.y+ne,ne,f)),Ke+=4)}return h&&(console.log(`num probes: ${Ke}`),console.log(`best distance: ${be.d}`)),be.p}function p3(f,u){return u.max-f.max}function Rp(f,u,h,v){this.p=new k(f,u),this.h=h,this.d=function(w,K){let L=!1,W=1/0;for(let Z=0;Z<K.length;Z++){const ne=K[Z];for(let ce=0,be=ne.length,Ke=be-1;ce<be;Ke=ce++){const Ue=ne[ce],Ne=ne[Ke];Ue.y>w.y!=Ne.y>w.y&&w.x<(Ne.x-Ue.x)*(w.y-Ue.y)/(Ne.y-Ue.y)+Ue.x&&(L=!L),W=Math.min(W,bp(w,Ue,Ne))}}return(L?1:-1)*Math.sqrt(W)}(this.p,v),this.max=this.d+this.h*Math.SQRT2}var fA;a.av=void 0,(fA=a.av||(a.av={}))[fA.center=1]="center",fA[fA.left=2]="left",fA[fA.right=3]="right",fA[fA.top=4]="top",fA[fA.bottom=5]="bottom",fA[fA["top-left"]=6]="top-left",fA[fA["top-right"]=7]="top-right",fA[fA["bottom-left"]=8]="bottom-left",fA[fA["bottom-right"]=9]="bottom-right";const ac=7,e1=Number.POSITIVE_INFINITY;function V0(f,u){return u[1]!==e1?function(h,v,w){let K=0,L=0;switch(v=Math.abs(v),w=Math.abs(w),h){case"top-right":case"top-left":case"top":L=w-ac;break;case"bottom-right":case"bottom-left":case"bottom":L=-w+ac}switch(h){case"top-right":case"bottom-right":case"right":K=-v;break;case"top-left":case"bottom-left":case"left":K=v}return[K,L]}(f,u[0],u[1]):function(h,v){let w=0,K=0;v<0&&(v=0);const L=v/Math.SQRT2;switch(h){case"top-right":case"top-left":K=L-ac;break;case"bottom-right":case"bottom-left":K=-L+ac;break;case"bottom":K=-v+ac;break;case"top":K=v-ac}switch(h){case"top-right":case"bottom-right":w=-L;break;case"top-left":case"bottom-left":w=L;break;case"left":w=v;break;case"right":w=-v}return[w,K]}(f,u[0])}function bl(f,u,h){var v;const w=f.layout,K=(v=w.get("text-variable-anchor-offset"))===null||v===void 0?void 0:v.evaluate(u,{},h);if(K){const W=K.values,Z=[];for(let ne=0;ne<W.length;ne+=2){const ce=Z[ne]=W[ne],be=W[ne+1].map(Ke=>Ke*Ya);ce.startsWith("top")?be[1]-=ac:ce.startsWith("bottom")&&(be[1]+=ac),Z[ne+1]=be}return new Rs(Z)}const L=w.get("text-variable-anchor");if(L){let W;W=f._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[w.get("text-radial-offset").evaluate(u,{},h)*Ya,e1]:w.get("text-offset").evaluate(u,{},h).map(ne=>ne*Ya);const Z=[];for(const ne of L)Z.push(ne,V0(ne,W));return new Rs(Z)}return null}function xl(f){switch(f){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function p_(f,u,h,v,w,K,L,W,Z,ne,ce,be){let Ke=K.textMaxSize.evaluate(u,{});Ke===void 0&&(Ke=L);const Ue=f.layers[0].layout,Ne=Ue.get("icon-offset").evaluate(u,{},ce),Xe=g_(h.horizontal),ut=L/24,Ct=f.tilePixelRatio*ut,Nt=f.tilePixelRatio*Ke/24,Et=f.tilePixelRatio*W,Fe=f.tilePixelRatio*Ue.get("symbol-spacing"),st=Ue.get("text-padding")*f.tilePixelRatio,Ot=function(Nr,Qr,ei,Do=1){const al=Nr.get("icon-padding").evaluate(Qr,{},ei),$l=al&&al.values;return[$l[0]*Do,$l[1]*Do,$l[2]*Do,$l[3]*Do]}(Ue,u,ce,f.tilePixelRatio),un=Ue.get("text-max-angle")/180*Math.PI,zn=Ue.get("text-rotation-alignment")!=="viewport"&&Ue.get("symbol-placement")!=="point",yn=Ue.get("icon-rotation-alignment")==="map"&&Ue.get("symbol-placement")!=="point",wn=Ue.get("symbol-placement"),tr=Fe/2,Un=Ue.get("icon-text-fit");let cr;v&&Un!=="none"&&(f.allowVerticalPlacement&&h.vertical&&(cr=vm(v,h.vertical,Un,Ue.get("icon-text-fit-padding"),Ne,ut)),Xe&&(v=vm(v,Xe,Un,Ue.get("icon-text-fit-padding"),Ne,ut)));const On=ce?be.line.getGranularityForZoomLevel(ce.z):1,Gr=(Nr,Qr)=>{Qr.x<0||Qr.x>=at||Qr.y<0||Qr.y>=at||function(ei,Do,al,$l,Xu,uh,lc,Eu,pA,wl,cu,KA,FA,uc,du,Kd,kc,Ko,mA,$a,ll,Bu,wm,td,Z0){const Ah=ei.addToLineVertexArray(Do,al);let nd,Ju,Fd,Vf,C_=0,__=0,b_=0,x_=0,Zy=-1,Xy=-1;const Hf={};let w_=ka("");if(ei.allowVerticalPlacement&&$l.vertical){const LA=Eu.layout.get("text-rotate").evaluate(ll,{},td)+90;Fd=new Jg(pA,Do,wl,cu,KA,$l.vertical,FA,uc,du,LA),lc&&(Vf=new Jg(pA,Do,wl,cu,KA,lc,kc,Ko,du,LA))}if(Xu){const LA=Eu.layout.get("icon-rotate").evaluate(ll,{}),Ld=Eu.layout.get("icon-text-fit")!=="none",Mm=Ic(Xu,LA,wm,Ld),Ud=lc?Ic(lc,LA,wm,Ld):void 0;Ju=new Jg(pA,Do,wl,cu,KA,Xu,kc,Ko,!1,LA),C_=4*Mm.length;const Sm=ei.iconSizeData;let gf=null;Sm.kind==="source"?(gf=[ed*Eu.layout.get("icon-size").evaluate(ll,{})],gf[0]>Lh&&nt(`${ei.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)):Sm.kind==="composite"&&(gf=[ed*Bu.compositeIconSizes[0].evaluate(ll,{},td),ed*Bu.compositeIconSizes[1].evaluate(ll,{},td)],(gf[0]>Lh||gf[1]>Lh)&&nt(`${ei.layerIds[0]}: Value for "icon-size" is >= ${Ip}. Reduce your "icon-size".`)),ei.addSymbols(ei.icon,Mm,gf,$a,mA,ll,a.ai.none,Do,Ah.lineStartIndex,Ah.lineLength,-1,td),Zy=ei.icon.placedSymbolArray.length-1,Ud&&(__=4*Ud.length,ei.addSymbols(ei.icon,Ud,gf,$a,mA,ll,a.ai.vertical,Do,Ah.lineStartIndex,Ah.lineLength,-1,td),Xy=ei.icon.placedSymbolArray.length-1)}const M_=Object.keys($l.horizontal);for(const LA of M_){const Ld=$l.horizontal[LA];if(!nd){w_=ka(Ld.text);const Ud=Eu.layout.get("text-rotate").evaluate(ll,{},td);nd=new Jg(pA,Do,wl,cu,KA,Ld,FA,uc,du,Ud)}const Mm=Ld.positionedLines.length===1;if(b_+=m_(ei,Do,Ld,uh,Eu,du,ll,Kd,Ah,$l.vertical?a.ai.horizontal:a.ai.horizontalOnly,Mm?M_:[LA],Hf,Zy,Bu,td),Mm)break}$l.vertical&&(x_+=m_(ei,Do,$l.vertical,uh,Eu,du,ll,Kd,Ah,a.ai.vertical,["vertical"],Hf,Xy,Bu,td));const y3=nd?nd.boxStartIndex:ei.collisionBoxArray.length,v3=nd?nd.boxEndIndex:ei.collisionBoxArray.length,C3=Fd?Fd.boxStartIndex:ei.collisionBoxArray.length,_3=Fd?Fd.boxEndIndex:ei.collisionBoxArray.length,b3=Ju?Ju.boxStartIndex:ei.collisionBoxArray.length,x3=Ju?Ju.boxEndIndex:ei.collisionBoxArray.length,w3=Vf?Vf.boxStartIndex:ei.collisionBoxArray.length,M3=Vf?Vf.boxEndIndex:ei.collisionBoxArray.length;let jh=-1;const n1=(LA,Ld)=>LA&&LA.circleDiameter?Math.max(LA.circleDiameter,Ld):Ld;jh=n1(nd,jh),jh=n1(Fd,jh),jh=n1(Ju,jh),jh=n1(Vf,jh);const S_=jh>-1?1:0;S_&&(jh*=Z0/Ya),ei.glyphOffsetArray.length>=Tp.MAX_GLYPHS&&nt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ll.sortKey!==void 0&&ei.addToSortKeyRanges(ei.symbolInstances.length,ll.sortKey);const Jy=bl(Eu,ll,td),[E_,B_]=function(LA,Ld){const Mm=LA.length,Ud=Ld==null?void 0:Ld.values;if((Ud==null?void 0:Ud.length)>0)for(let Sm=0;Sm<Ud.length;Sm+=2){const gf=Ud[Sm+1];LA.emplaceBack(a.av[Ud[Sm]],gf[0],gf[1])}return[Mm,LA.length]}(ei.textAnchorOffsets,Jy);ei.symbolInstances.emplaceBack(Do.x,Do.y,Hf.right>=0?Hf.right:-1,Hf.center>=0?Hf.center:-1,Hf.left>=0?Hf.left:-1,Hf.vertical||-1,Zy,Xy,w_,y3,v3,C3,_3,b3,x3,w3,M3,wl,b_,x_,C_,__,S_,0,FA,jh,E_,B_)}(f,Qr,Nr,h,v,w,cr,f.layers[0],f.collisionBoxArray,u.index,u.sourceLayerIndex,f.index,Ct,[st,st,st,st],zn,Z,Et,Ot,yn,Ne,u,K,ne,ce,L)};if(wn==="line")for(const Nr of A_(u.geometry,0,0,at,at)){const Qr=Zn(Nr,On),ei=bm(Qr,Fe,un,h.vertical||Xe,v,24,Nt,f.overscaling,at);for(const Do of ei)Xe&&m3(f,Xe.text,tr,Do)||Gr(Qr,Do)}else if(wn==="line-center"){for(const Nr of u.geometry)if(Nr.length>1){const Qr=Zn(Nr,On),ei=d3(Qr,un,h.vertical||Xe,v,24,Nt);ei&&Gr(Qr,ei)}}else if(u.type==="Polygon")for(const Nr of Lc(u.geometry,0)){const Qr=f3(Nr,16);Gr(Zn(Nr[0],On,!0),new Pp(Qr.x,Qr.y,0))}else if(u.type==="LineString")for(const Nr of u.geometry){const Qr=Zn(Nr,On);Gr(Qr,new Pp(Qr[0].x,Qr[0].y,0))}else if(u.type==="Point")for(const Nr of u.geometry)for(const Qr of Nr)Gr([Qr],new Pp(Qr.x,Qr.y,0))}function m_(f,u,h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne){const Xe=function(Nt,Et,Fe,st,Ot,un,zn,yn){const wn=st.layout.get("text-rotate").evaluate(un,{})*Math.PI/180,tr=[];for(const Un of Et.positionedLines)for(const cr of Un.positionedGlyphs){if(!cr.rect)continue;const On=cr.rect||{};let Gr=ol+1,Nr=!0,Qr=1,ei=0;const Do=(Ot||yn)&&cr.vertical,al=cr.metrics.advance*cr.scale/2;if(yn&&Et.verticalizable&&(ei=Un.lineOffset/2-(cr.imageName?-(Ya-cr.metrics.width*cr.scale)/2:(cr.scale-1)*Ya)),cr.imageName){const Ko=zn[cr.imageName];Nr=Ko.sdf,Qr=Ko.pixelRatio,Gr=hA/Qr}const $l=Ot?[cr.x+al,cr.y]:[0,0];let Xu=Ot?[0,0]:[cr.x+al+Fe[0],cr.y+Fe[1]-ei],uh=[0,0];Do&&(uh=Xu,Xu=[0,0]);const lc=cr.metrics.isDoubleResolution?2:1,Eu=(cr.metrics.left-Gr)*cr.scale-al+Xu[0],pA=(-cr.metrics.top-Gr)*cr.scale+Xu[1],wl=Eu+On.w/lc*cr.scale/Qr,cu=pA+On.h/lc*cr.scale/Qr,KA=new k(Eu,pA),FA=new k(wl,pA),uc=new k(Eu,cu),du=new k(wl,cu);if(Do){const Ko=new k(-al,al-Op),mA=-Math.PI/2,$a=Ya/2-al,ll=new k(5-Op-$a,-(cr.imageName?$a:0)),Bu=new k(...uh);KA._rotateAround(mA,Ko)._add(ll)._add(Bu),FA._rotateAround(mA,Ko)._add(ll)._add(Bu),uc._rotateAround(mA,Ko)._add(ll)._add(Bu),du._rotateAround(mA,Ko)._add(ll)._add(Bu)}if(wn){const Ko=Math.sin(wn),mA=Math.cos(wn),$a=[mA,-Ko,Ko,mA];KA._matMult($a),FA._matMult($a),uc._matMult($a),du._matMult($a)}const Kd=new k(0,0),kc=new k(0,0);tr.push({tl:KA,tr:FA,bl:uc,br:du,tex:On,writingMode:Et.writingMode,glyphOffset:$l,sectionIndex:cr.sectionIndex,isSDF:Nr,pixelOffsetTL:Kd,pixelOffsetBR:kc,minFontScaleX:0,minFontScaleY:0})}return tr}(0,h,W,w,K,L,v,f.allowVerticalPlacement),ut=f.textSizeData;let Ct=null;ut.kind==="source"?(Ct=[ed*w.layout.get("text-size").evaluate(L,{})],Ct[0]>Lh&&nt(`${f.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)):ut.kind==="composite"&&(Ct=[ed*Ue.compositeTextSizes[0].evaluate(L,{},Ne),ed*Ue.compositeTextSizes[1].evaluate(L,{},Ne)],(Ct[0]>Lh||Ct[1]>Lh)&&nt(`${f.layerIds[0]}: Value for "text-size" is >= ${Ip}. Reduce your "text-size".`)),f.addSymbols(f.text,Xe,Ct,W,K,L,ne,u,Z.lineStartIndex,Z.lineLength,Ke,Ne);for(const Nt of ce)be[Nt]=f.text.placedSymbolArray.length-1;return 4*Xe.length}function g_(f){for(const u in f)return f[u];return null}function m3(f,u,h,v){const w=f.compareText;if(u in w){const K=w[u];for(let L=K.length-1;L>=0;L--)if(v.dist(K[L])<h)return!0}else w[u]=[];return w[u].push(v),!1}const y_=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class qy{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[h,v]=new Uint8Array(u,0,2);if(h!==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 K=y_[15&v];if(!K)throw new Error("Unrecognized array type.");const[L]=new Uint16Array(u,2,1),[W]=new Uint32Array(u,4,1);return new qy(W,L,K,u)}constructor(u,h=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(+h,2),65535),this.ArrayType=v,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const K=y_.indexOf(this.ArrayType),L=2*u*this.ArrayType.BYTES_PER_ELEMENT,W=u*this.IndexArrayType.BYTES_PER_ELEMENT,Z=(8-W%8)%8;if(K<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+W+Z,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+L+W+Z),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+W+Z,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+K]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=u)}add(u,h){const v=this._pos>>1;return this.ids[v]=v,this.coords[this._pos++]=u,this.coords[this._pos++]=h,v}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return Yy(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,h,v,w){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:K,coords:L,nodeSize:W}=this,Z=[0,K.length-1,0],ne=[];for(;Z.length;){const ce=Z.pop()||0,be=Z.pop()||0,Ke=Z.pop()||0;if(be-Ke<=W){for(let ut=Ke;ut<=be;ut++){const Ct=L[2*ut],Nt=L[2*ut+1];Ct>=u&&Ct<=v&&Nt>=h&&Nt<=w&&ne.push(K[ut])}continue}const Ue=Ke+be>>1,Ne=L[2*Ue],Xe=L[2*Ue+1];Ne>=u&&Ne<=v&&Xe>=h&&Xe<=w&&ne.push(K[Ue]),(ce===0?u<=Ne:h<=Xe)&&(Z.push(Ke),Z.push(Ue-1),Z.push(1-ce)),(ce===0?v>=Ne:w>=Xe)&&(Z.push(Ue+1),Z.push(be),Z.push(1-ce))}return ne}within(u,h,v){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:w,coords:K,nodeSize:L}=this,W=[0,w.length-1,0],Z=[],ne=v*v;for(;W.length;){const ce=W.pop()||0,be=W.pop()||0,Ke=W.pop()||0;if(be-Ke<=L){for(let ut=Ke;ut<=be;ut++)v_(K[2*ut],K[2*ut+1],u,h)<=ne&&Z.push(w[ut]);continue}const Ue=Ke+be>>1,Ne=K[2*Ue],Xe=K[2*Ue+1];v_(Ne,Xe,u,h)<=ne&&Z.push(w[Ue]),(ce===0?u-v<=Ne:h-v<=Xe)&&(W.push(Ke),W.push(Ue-1),W.push(1-ce)),(ce===0?u+v>=Ne:h+v>=Xe)&&(W.push(Ue+1),W.push(be),W.push(1-ce))}return Z}}function Yy(f,u,h,v,w,K){if(w-v<=h)return;const L=v+w>>1;$y(f,u,L,v,w,K),Yy(f,u,h,v,L-1,1-K),Yy(f,u,h,L+1,w,1-K)}function $y(f,u,h,v,w,K){for(;w>v;){if(w-v>600){const ne=w-v+1,ce=h-v+1,be=Math.log(ne),Ke=.5*Math.exp(2*be/3),Ue=.5*Math.sqrt(be*Ke*(ne-Ke)/ne)*(ce-ne/2<0?-1:1);$y(f,u,h,Math.max(v,Math.floor(h-ce*Ke/ne+Ue)),Math.min(w,Math.floor(h+(ne-ce)*Ke/ne+Ue)),K)}const L=u[2*h+K];let W=v,Z=w;for($f(f,u,v,h),u[2*w+K]>L&&$f(f,u,v,w);W<Z;){for($f(f,u,W,Z),W++,Z--;u[2*W+K]<L;)W++;for(;u[2*Z+K]>L;)Z--}u[2*v+K]===L?$f(f,u,v,Z):(Z++,$f(f,u,Z,w)),Z<=h&&(v=Z+1),h<=Z&&(w=Z-1)}}function $f(f,u,h,v){H0(f,h,v),H0(u,2*h,2*v),H0(u,2*h+1,2*v+1)}function H0(f,u,h){const v=f[u];f[u]=f[h],f[h]=v}function v_(f,u,h,v){const w=f-h,K=u-v;return w*w+K*K}var t1;a.ce=void 0,(t1=a.ce||(a.ce={})).create="create",t1.load="load",t1.fullLoad="fullLoad";let xm=null,DA=[];const Dp=1e3/60,Vy="loadTime",Hy="fullLoadTime",g3={mark(f){performance.mark(f)},frame(f){const u=f;xm!=null&&DA.push(u-xm),xm=u},clearMetrics(){xm=null,DA=[],performance.clearMeasures(Vy),performance.clearMeasures(Hy);for(const f in a.ce)performance.clearMarks(a.ce[f])},getPerformanceMetrics(){performance.measure(Vy,a.ce.create,a.ce.load),performance.measure(Hy,a.ce.create,a.ce.fullLoad);const f=performance.getEntriesByName(Vy)[0].duration,u=performance.getEntriesByName(Hy)[0].duration,h=DA.length,v=1/(DA.reduce((K,L)=>K+L,0)/h/1e3),w=DA.filter(K=>K>Dp).reduce((K,L)=>K+(L-Dp)/Dp,0);return{loadTime:f,fullLoadTime:u,fps:v,percentDroppedFrames:w/(h+w)*100,totalFrames:h}}};a.$=xt,a.A=N,a.B=th,a.C=function(f){if(Ut==null){const u=f.navigator?f.navigator.userAgent:null;Ut=!!f.safari||!(!u||!(/\b(iPad|iPhone|iPod)\b/.test(u)||u.match("Safari")&&!u.match("Chrome")))}return Ut},a.D=gr,a.E=er,a.F=class{constructor(f,u){this.target=f,this.mapId=u,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mr(()=>this.process()),this.subscription=function(h,v,w,K){return h.addEventListener(v,w,!1),{unsubscribe:()=>{h.removeEventListener(v,w,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=ht(self)?f:window}registerMessageHandler(f,u){this.messageHandlers[f]=u}sendAsync(f,u){return new Promise((h,v)=>{const w=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[w]={resolve:h,reject:v},u&&u.signal.addEventListener("abort",()=>{delete this.resolveRejects[w];const W={id:w,type:"<cancel>",origin:location.origin,targetMapId:f.targetMapId,sourceMapId:this.mapId};this.target.postMessage(W)},{once:!0});const K=[],L=Object.assign(Object.assign({},f),{id:w,sourceMapId:this.mapId,origin:location.origin,data:tc(f.data,K)});this.target.postMessage(L,{transfer:K})})}receive(f){const u=f.data,h=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[h];const v=this.abortControllers[h];return delete this.abortControllers[h],void(v&&v.abort())}if(ht(self)||u.mustQueue)return this.tasks[h]=u,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,u)}}process(){if(this.taskQueue.length===0)return;const f=this.taskQueue.shift(),u=this.tasks[f];delete this.tasks[f],this.taskQueue.length>0&&this.invoker.trigger(),u&&this.processTask(f,u)}processTask(f,u){return o(this,void 0,void 0,function*(){if(u.type==="<response>"){const w=this.resolveRejects[f];return delete this.resolveRejects[f],w?void(u.error?w.reject(vd(u.error)):w.resolve(vd(u.data))):void 0}if(!this.messageHandlers[u.type])return void this.completeTask(f,new Error(`Could not find a registered handler for ${u.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=vd(u.data),v=new AbortController;this.abortControllers[f]=v;try{const w=yield this.messageHandlers[u.type](u.sourceMapId,h,v);this.completeTask(f,null,w)}catch(w){this.completeTask(f,w)}})}completeTask(f,u,h){const v=[];delete this.abortControllers[f];const w={id:f,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:u?tc(u):null,data:tc(h,v)};this.target.postMessage(w,{transfer:v})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.G=Qn,a.H=function(){var f=new N(16);return N!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0),f[0]=1,f[5]=1,f[10]=1,f[15]=1,f},a.I=G0,a.J=function(f,u,h){var v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe=h[0],ut=h[1],Ct=h[2];return u===f?(f[12]=u[0]*Xe+u[4]*ut+u[8]*Ct+u[12],f[13]=u[1]*Xe+u[5]*ut+u[9]*Ct+u[13],f[14]=u[2]*Xe+u[6]*ut+u[10]*Ct+u[14],f[15]=u[3]*Xe+u[7]*ut+u[11]*Ct+u[15]):(w=u[1],K=u[2],L=u[3],W=u[4],Z=u[5],ne=u[6],ce=u[7],be=u[8],Ke=u[9],Ue=u[10],Ne=u[11],f[0]=v=u[0],f[1]=w,f[2]=K,f[3]=L,f[4]=W,f[5]=Z,f[6]=ne,f[7]=ce,f[8]=be,f[9]=Ke,f[10]=Ue,f[11]=Ne,f[12]=v*Xe+W*ut+be*Ct+u[12],f[13]=w*Xe+Z*ut+Ke*Ct+u[13],f[14]=K*Xe+ne*ut+Ue*Ct+u[14],f[15]=L*Xe+ce*ut+Ne*Ct+u[15]),f},a.K=function(f,u,h){var v=h[0],w=h[1],K=h[2];return f[0]=u[0]*v,f[1]=u[1]*v,f[2]=u[2]*v,f[3]=u[3]*v,f[4]=u[4]*w,f[5]=u[5]*w,f[6]=u[6]*w,f[7]=u[7]*w,f[8]=u[8]*K,f[9]=u[9]*K,f[10]=u[10]*K,f[11]=u[11]*K,f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15],f},a.L=function(f,u,h){var v=u[0],w=u[1],K=u[2],L=u[3],W=u[4],Z=u[5],ne=u[6],ce=u[7],be=u[8],Ke=u[9],Ue=u[10],Ne=u[11],Xe=u[12],ut=u[13],Ct=u[14],Nt=u[15],Et=h[0],Fe=h[1],st=h[2],Ot=h[3];return f[0]=Et*v+Fe*W+st*be+Ot*Xe,f[1]=Et*w+Fe*Z+st*Ke+Ot*ut,f[2]=Et*K+Fe*ne+st*Ue+Ot*Ct,f[3]=Et*L+Fe*ce+st*Ne+Ot*Nt,f[4]=(Et=h[4])*v+(Fe=h[5])*W+(st=h[6])*be+(Ot=h[7])*Xe,f[5]=Et*w+Fe*Z+st*Ke+Ot*ut,f[6]=Et*K+Fe*ne+st*Ue+Ot*Ct,f[7]=Et*L+Fe*ce+st*Ne+Ot*Nt,f[8]=(Et=h[8])*v+(Fe=h[9])*W+(st=h[10])*be+(Ot=h[11])*Xe,f[9]=Et*w+Fe*Z+st*Ke+Ot*ut,f[10]=Et*K+Fe*ne+st*Ue+Ot*Ct,f[11]=Et*L+Fe*ce+st*Ne+Ot*Nt,f[12]=(Et=h[12])*v+(Fe=h[13])*W+(st=h[14])*be+(Ot=h[15])*Xe,f[13]=Et*w+Fe*Z+st*Ke+Ot*ut,f[14]=Et*K+Fe*ne+st*Ue+Ot*Ct,f[15]=Et*L+Fe*ce+st*Ne+Ot*Nt,f},a.M=function(f,u){const h={};for(let v=0;v<u.length;v++){const w=u[v];w in f&&(h[w]=f[w])}return h},a.N=zr,a.O=sl,a.P=k,a.Q=ln,a.R=Hu,a.S=Fs,a.T=bc,a.U=re,a.V=X,a.W=mn,a.X=at,a.Y=ni,a.Z=Oi,a._=o,a.a=Hn,a.a$=function(){return new Float64Array(16)},a.a0=f=>{const u=window.document.createElement("video");return u.muted=!0,new Promise(h=>{u.onloadstart=()=>{h(u)};for(const v of f){const w=window.document.createElement("source");pe(v)||(u.crossOrigin="Anonymous"),w.src=v,u.appendChild(w)}})},a.a1=function(){return Dt++},a.a2=M,a.a3=Tp,a.a4=HA,a.a5=ic,a.a6=s_,a.a7=function(f){const u={};if(f.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,v,w,K)=>{const L=w||K;return u[v]=!L||L.toLowerCase(),""}),u["max-age"]){const h=parseInt(u["max-age"],10);isNaN(h)?delete u["max-age"]:u["max-age"]=h}return u},a.a8=function(f){return Math.log(f)/Math.LN2},a.a9=function(f){var u=f[0],h=f[1];return u*u+h*h},a.aA=Is,a.aB=Mt,a.aC=ft,a.aD=Sn,a.aE=bn,a.aF=85.051129,a.aG=function(f){return Math.pow(2,f)},a.aH=Jt,a.aI=bt,a.aJ=ir,a.aK=Cr,a.aL=function(f,u,h){return f[0]=u[0]*h,f[1]=u[1]*h,f[2]=u[2]*h,f},a.aM=function(f,u,h){return f[0]=u[0]+h[0],f[1]=u[1]+h[1],f[2]=u[2]+h[2],f},a.aN=function(f){var u=new N(3);return u[0]=f[0],u[1]=f[1],u[2]=f[2],u},a.aO=function(f,u,h){return f[0]=u[0]*h[0],f[1]=u[1]*h[1],f[2]=u[2]*h[2],f[3]=u[3]*h[3],f},a.aP=function(f,u,h){return f[0]=u[0]-h[0],f[1]=u[1]-h[1],f[2]=u[2]-h[2],f},a.aQ=function(f,u){var h=u[0],v=u[1],w=u[2],K=h*h+v*v+w*w;return K>0&&(K=1/Math.sqrt(K)),f[0]=u[0]*K,f[1]=u[1]*K,f[2]=u[2]*K,f},a.aR=function(f,u,h){var v=u[0],w=u[1],K=u[2],L=h[0],W=h[1],Z=h[2];return f[0]=w*Z-K*W,f[1]=K*L-v*Z,f[2]=v*W-w*L,f},a.aS=function(f,u){return f[0]*u[0]+f[1]*u[1]+f[2]*u[2]},a.aT=zi,a.aU=Jo,a.aV=function(f,u,h,v,w){var K,L=1/Math.tan(u/2);return f[0]=L/h,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=L,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=-1,f[12]=0,f[13]=0,f[15]=0,w!=null&&w!==1/0?(f[10]=(w+v)*(K=1/(v-w)),f[14]=2*w*v*K):(f[10]=-1,f[14]=-2*v),f},a.aW=function(f){var u=new N(16);return u[0]=f[0],u[1]=f[1],u[2]=f[2],u[3]=f[3],u[4]=f[4],u[5]=f[5],u[6]=f[6],u[7]=f[7],u[8]=f[8],u[9]=f[9],u[10]=f[10],u[11]=f[11],u[12]=f[12],u[13]=f[13],u[14]=f[14],u[15]=f[15],u},a.aX=function(f,u,h){var v=Math.sin(h),w=Math.cos(h),K=u[0],L=u[1],W=u[2],Z=u[3],ne=u[4],ce=u[5],be=u[6],Ke=u[7];return u!==f&&(f[8]=u[8],f[9]=u[9],f[10]=u[10],f[11]=u[11],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[0]=K*w+ne*v,f[1]=L*w+ce*v,f[2]=W*w+be*v,f[3]=Z*w+Ke*v,f[4]=ne*w-K*v,f[5]=ce*w-L*v,f[6]=be*w-W*v,f[7]=Ke*w-Z*v,f},a.aY=function(f,u,h){var v=Math.sin(h),w=Math.cos(h),K=u[4],L=u[5],W=u[6],Z=u[7],ne=u[8],ce=u[9],be=u[10],Ke=u[11];return u!==f&&(f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[4]=K*w+ne*v,f[5]=L*w+ce*v,f[6]=W*w+be*v,f[7]=Z*w+Ke*v,f[8]=ne*w-K*v,f[9]=ce*w-L*v,f[10]=be*w-W*v,f[11]=Ke*w-Z*v,f},a.aZ=function(){const f=new Float32Array(16);return he(f),f},a.a_=function(){const f=new Float64Array(16);return he(f),f},a.aa=function(f){return f*Math.PI/180},a.ab=yt,a.ac=function(f,u){const h=[];for(const v in f)v in u||h.push(v);return h},a.ad=De,a.ae=function(f){return Math.hypot(f[0],f[1])},a.af=function(f){return f[0]=0,f[1]=0,f},a.ag=function(f,u,h){return f[0]=u[0]*h,f[1]=u[1]*h,f},a.ah=function(f,u){let h=0,v=0;if(f.kind==="constant")v=f.layoutSize;else if(f.kind!=="source"){const{interpolationType:w,minZoom:K,maxZoom:L}=f,W=w?yt(vr.interpolationFactor(w,u,K,L),0,1):0;f.kind==="camera"?v=vi.number(f.minSize,f.maxSize,W):h=W}return{uSizeT:h,uSize:v}},a.aj=function(f,{uSize:u,uSizeT:h},{lowerSize:v,upperSize:w}){return f.kind==="source"?v/ed:f.kind==="composite"?vi.number(v/ed,w/ed,h):u},a.ak=Y0,a.al=fe,a.am=function(f,u,h,v){const w=u.y-f.y,K=u.x-f.x,L=v.y-h.y,W=v.x-h.x,Z=L*K-W*w;if(Z===0)return null;const ne=(W*(f.y-h.y)-L*(f.x-h.x))/Z;return new k(f.x+ne*K,f.y+ne*w)},a.an=function(f,u){var h=u[0],v=u[1],w=u[2],K=u[3],L=u[4],W=u[5],Z=u[6],ne=u[7],ce=u[8],be=u[9],Ke=u[10],Ue=u[11],Ne=u[12],Xe=u[13],ut=u[14],Ct=u[15],Nt=h*W-v*L,Et=h*Z-w*L,Fe=h*ne-K*L,st=v*Z-w*W,Ot=v*ne-K*W,un=w*ne-K*Z,zn=ce*Xe-be*Ne,yn=ce*ut-Ke*Ne,wn=ce*Ct-Ue*Ne,tr=be*ut-Ke*Xe,Un=be*Ct-Ue*Xe,cr=Ke*Ct-Ue*ut,On=Nt*cr-Et*Un+Fe*tr+st*wn-Ot*yn+un*zn;return On?(f[0]=(W*cr-Z*Un+ne*tr)*(On=1/On),f[1]=(w*Un-v*cr-K*tr)*On,f[2]=(Xe*un-ut*Ot+Ct*st)*On,f[3]=(Ke*Ot-be*un-Ue*st)*On,f[4]=(Z*wn-L*cr-ne*yn)*On,f[5]=(h*cr-w*wn+K*yn)*On,f[6]=(ut*Fe-Ne*un-Ct*Et)*On,f[7]=(ce*un-Ke*Fe+Ue*Et)*On,f[8]=(L*Un-W*wn+ne*zn)*On,f[9]=(v*wn-h*Un-K*zn)*On,f[10]=(Ne*Ot-Xe*Fe+Ct*Nt)*On,f[11]=(be*Fe-ce*Ot-Ue*Nt)*On,f[12]=(W*yn-L*tr-Z*zn)*On,f[13]=(h*tr-v*yn+w*zn)*On,f[14]=(Xe*Et-Ne*st-ut*Nt)*On,f[15]=(ce*st-be*Et+Ke*Nt)*On,f):null},a.ao=A_,a.ap=Ed,a.aq=he,a.ar=function(f){let u=1/0,h=1/0,v=-1/0,w=-1/0;for(const K of f)u=Math.min(u,K.x),h=Math.min(h,K.y),v=Math.max(v,K.x),w=Math.max(w,K.y);return[u,h,v,w]},a.as=Ya,a.at=Qe,a.au=function(f,u,h,v,w=!1){if(!h[0]&&!h[1])return[0,0];const K=w?v==="map"?-f.bearingInRadians:0:v==="viewport"?f.bearingInRadians:0;if(K){const L=Math.sin(K),W=Math.cos(K);h=[h[0]*W-h[1]*L,h[0]*L+h[1]*W]}return[w?h[0]:Qe(u,h[0],f.zoom),w?h[1]:Qe(u,h[1],f.zoom)]},a.aw=qf,a.ax=xl,a.ay=q0,a.az=qy,a.b=en,a.b$=f=>f.type==="line",a.b0=function(f,u,h){const v=new Float64Array(4);return function(w,K,L,W){var Z=.5*Math.PI/180;K*=Z,L*=Z,W*=Z;var ne=Math.sin(K),ce=Math.cos(K),be=Math.sin(L),Ke=Math.cos(L),Ue=Math.sin(W),Ne=Math.cos(W);w[0]=ne*Ke*Ne-ce*be*Ue,w[1]=ce*be*Ne+ne*Ke*Ue,w[2]=ce*Ke*Ue-ne*be*Ne,w[3]=ce*Ke*Ne+ne*be*Ue}(v,f,u-90,h),v},a.b1=function(f,u,h,v){var w,K,L,W,Z,ne=u[0],ce=u[1],be=u[2],Ke=u[3],Ue=h[0],Ne=h[1],Xe=h[2],ut=h[3];return(K=ne*Ue+ce*Ne+be*Xe+Ke*ut)<0&&(K=-K,Ue=-Ue,Ne=-Ne,Xe=-Xe,ut=-ut),1-K>ee?(w=Math.acos(K),L=Math.sin(w),W=Math.sin((1-v)*w)/L,Z=Math.sin(v*w)/L):(W=1-v,Z=v),f[0]=W*ne+Z*Ue,f[1]=W*ce+Z*Ne,f[2]=W*be+Z*Xe,f[3]=W*Ke+Z*ut,f},a.b2=function(f){const u=new Float64Array(9);var h,v,w,K,L,W,Z,ne,ce,be,Ke,Ue,Ne,Xe,ut,Ct,Nt,Et;be=(w=(v=f)[0])*(Z=w+w),Ke=(K=v[1])*Z,Ne=(L=v[2])*Z,Xe=L*(ne=K+K),Ct=(W=v[3])*Z,Nt=W*ne,Et=W*(ce=L+L),(h=u)[0]=1-(Ue=K*ne)-(ut=L*ce),h[3]=Ke-Et,h[6]=Ne+Nt,h[1]=Ke+Et,h[4]=1-be-ut,h[7]=Xe-Ct,h[2]=Ne-Nt,h[5]=Xe+Ct,h[8]=1-be-Ue;const Fe=ir(-Math.asin(yt(u[2],-1,1)));let st,Ot;return Math.hypot(u[5],u[8])<.001?(st=0,Ot=-ir(Math.atan2(u[3],u[4]))):(st=ir(u[5]===0&&u[8]===0?0:Math.atan2(u[5],u[8])),Ot=ir(u[1]===0&&u[0]===0?0:Math.atan2(u[1],u[0]))),{roll:st,pitch:Fe+90,bearing:Ot}},a.b3=function(f,u){return f.roll==u.roll&&f.pitch==u.pitch&&f.bearing==u.bearing},a.b4=Ai,a.b5=pl,a.b6=Xt,a.b7=Qt,a.b8=mt,a.b9=We,a.bA=Pt,a.bB=Le,a.bC=class extends fl{constructor(f,u){super(f,u),this.current=0}set(f){this.current!==f&&(this.current=f,this.gl.uniform1i(this.location,f))}},a.bD=class extends fl{constructor(f,u){super(f,u),this.current=IA}set(f){if(f[12]!==this.current[12]||f[0]!==this.current[0])return this.current=f,void this.gl.uniformMatrix4fv(this.location,!1,f);for(let u=1;u<16;u++)if(f[u]!==this.current[u]){this.current=f,this.gl.uniformMatrix4fv(this.location,!1,f);break}}},a.bE=uu,a.bF=OA,a.bG=class extends fl{constructor(f,u){super(f,u),this.current=[0,0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]&&f[2]===this.current[2]||(this.current=f,this.gl.uniform3f(this.location,f[0],f[1],f[2]))}},a.bH=class extends fl{constructor(f,u){super(f,u),this.current=[0,0]}set(f){f[0]===this.current[0]&&f[1]===this.current[1]||(this.current=f,this.gl.uniform2f(this.location,f[0],f[1]))}},a.bI=ie,a.bJ=function(f,u){var h=Math.sin(u),v=Math.cos(u);return f[0]=v,f[1]=h,f[2]=0,f[3]=-h,f[4]=v,f[5]=0,f[6]=0,f[7]=0,f[8]=1,f},a.bK=function(f,u,h){var v=u[0],w=u[1],K=u[2];return f[0]=v*h[0]+w*h[3]+K*h[6],f[1]=v*h[1]+w*h[4]+K*h[7],f[2]=v*h[2]+w*h[5]+K*h[8],f},a.bL=function(f,u,h,v,w,K,L){var W=1/(u-h),Z=1/(v-w),ne=1/(K-L);return f[0]=-2*W,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=-2*Z,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=2*ne,f[11]=0,f[12]=(u+h)*W,f[13]=(w+v)*Z,f[14]=(L+K)*ne,f[15]=1,f},a.bM=class extends au{},a.bN=Gf,a.bO=class extends cA{},a.bP=Id,a.bQ=function(f){return f<=1?1:Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))},a.bR=af,a.bS=function(f,u,h){var v=u[0],w=u[1],K=u[2],L=h[3]*v+h[7]*w+h[11]*K+h[15];return f[0]=(h[0]*v+h[4]*w+h[8]*K+h[12])/(L=L||1),f[1]=(h[1]*v+h[5]*w+h[9]*K+h[13])/L,f[2]=(h[2]*v+h[6]*w+h[10]*K+h[14])/L,f},a.bT=class extends BA{},a.bU=class extends l{},a.bV=function(f,u){return f[0]===u[0]&&f[1]===u[1]&&f[2]===u[2]&&f[3]===u[3]&&f[4]===u[4]&&f[5]===u[5]&&f[6]===u[6]&&f[7]===u[7]&&f[8]===u[8]&&f[9]===u[9]&&f[10]===u[10]&&f[11]===u[11]&&f[12]===u[12]&&f[13]===u[13]&&f[14]===u[14]&&f[15]===u[15]},a.bW=function(f,u){var h=f[0],v=f[1],w=f[2],K=f[3],L=f[4],W=f[5],Z=f[6],ne=f[7],ce=f[8],be=f[9],Ke=f[10],Ue=f[11],Ne=f[12],Xe=f[13],ut=f[14],Ct=f[15],Nt=u[0],Et=u[1],Fe=u[2],st=u[3],Ot=u[4],un=u[5],zn=u[6],yn=u[7],wn=u[8],tr=u[9],Un=u[10],cr=u[11],On=u[12],Gr=u[13],Nr=u[14],Qr=u[15];return Math.abs(h-Nt)<=ee*Math.max(1,Math.abs(h),Math.abs(Nt))&&Math.abs(v-Et)<=ee*Math.max(1,Math.abs(v),Math.abs(Et))&&Math.abs(w-Fe)<=ee*Math.max(1,Math.abs(w),Math.abs(Fe))&&Math.abs(K-st)<=ee*Math.max(1,Math.abs(K),Math.abs(st))&&Math.abs(L-Ot)<=ee*Math.max(1,Math.abs(L),Math.abs(Ot))&&Math.abs(W-un)<=ee*Math.max(1,Math.abs(W),Math.abs(un))&&Math.abs(Z-zn)<=ee*Math.max(1,Math.abs(Z),Math.abs(zn))&&Math.abs(ne-yn)<=ee*Math.max(1,Math.abs(ne),Math.abs(yn))&&Math.abs(ce-wn)<=ee*Math.max(1,Math.abs(ce),Math.abs(wn))&&Math.abs(be-tr)<=ee*Math.max(1,Math.abs(be),Math.abs(tr))&&Math.abs(Ke-Un)<=ee*Math.max(1,Math.abs(Ke),Math.abs(Un))&&Math.abs(Ue-cr)<=ee*Math.max(1,Math.abs(Ue),Math.abs(cr))&&Math.abs(Ne-On)<=ee*Math.max(1,Math.abs(Ne),Math.abs(On))&&Math.abs(Xe-Gr)<=ee*Math.max(1,Math.abs(Xe),Math.abs(Gr))&&Math.abs(ut-Nr)<=ee*Math.max(1,Math.abs(ut),Math.abs(Nr))&&Math.abs(Ct-Qr)<=ee*Math.max(1,Math.abs(Ct),Math.abs(Qr))},a.bX=function(f,u){return f[0]=u[0],f[1]=u[1],f[2]=u[2],f[3]=u[3],f[4]=u[4],f[5]=u[5],f[6]=u[6],f[7]=u[7],f[8]=u[8],f[9]=u[9],f[10]=u[10],f[11]=u[11],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15],f},a.bY=f=>f.type==="symbol",a.bZ=f=>f.type==="circle",a.b_=f=>f.type==="heatmap",a.ba=Ce,a.bb=Ws,a.bc=function(f,u,h,v,w){return We(v,w,yt((f-u)/(h-u),0,1))},a.bd=He,a.be=function(){return new Float64Array(4)},a.bf=function(){return new Float64Array(3)},a.bg=function(f,u,h,v){var w=[],K=[];return w[0]=u[0]-h[0],w[1]=u[1]-h[1],w[2]=u[2]-h[2],K[0]=w[0]*Math.cos(v)-w[1]*Math.sin(v),K[1]=w[0]*Math.sin(v)+w[1]*Math.cos(v),K[2]=w[2],f[0]=K[0]+h[0],f[1]=K[1]+h[1],f[2]=K[2]+h[2],f},a.bh=function(f,u,h,v){var w=[],K=[];return w[0]=u[0]-h[0],w[1]=u[1]-h[1],w[2]=u[2]-h[2],K[0]=w[0],K[1]=w[1]*Math.cos(v)-w[2]*Math.sin(v),K[2]=w[1]*Math.sin(v)+w[2]*Math.cos(v),f[0]=K[0]+h[0],f[1]=K[1]+h[1],f[2]=K[2]+h[2],f},a.bi=function(f,u,h,v){var w=[],K=[];return w[0]=u[0]-h[0],w[1]=u[1]-h[1],w[2]=u[2]-h[2],K[0]=w[2]*Math.sin(v)+w[0]*Math.cos(v),K[1]=w[1],K[2]=w[2]*Math.cos(v)-w[0]*Math.sin(v),f[0]=K[0]+h[0],f[1]=K[1]+h[1],f[2]=K[2]+h[2],f},a.bj=function(f,u,h){var v=Math.sin(h),w=Math.cos(h),K=u[0],L=u[1],W=u[2],Z=u[3],ne=u[8],ce=u[9],be=u[10],Ke=u[11];return u!==f&&(f[4]=u[4],f[5]=u[5],f[6]=u[6],f[7]=u[7],f[12]=u[12],f[13]=u[13],f[14]=u[14],f[15]=u[15]),f[0]=K*w-ne*v,f[1]=L*w-ce*v,f[2]=W*w-be*v,f[3]=Z*w-Ke*v,f[8]=K*v+ne*w,f[9]=L*v+ce*w,f[10]=W*v+be*w,f[11]=Z*v+Ke*w,f},a.bk=function(f,u){const h=He(f,360),v=He(u,360),w=v-h,K=v>h?w-360:w+360;return Math.abs(w)<Math.abs(K)?w:K},a.bl=function(f){return f[0]=0,f[1]=0,f[2]=0,f},a.bm=function(f,u,h,v){const w=Math.sqrt(f*f+u*u),K=Math.sqrt(h*h+v*v);f/=w,u/=w,h/=K,v/=K;const L=Math.acos(f*h+u*v);return-u*h+f*v>0?L:-L},a.bn=function(f,u){return f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]},a.bo=Jn,a.bp=function(f,u){const h=He(f,2*Math.PI),v=He(u,2*Math.PI);return Math.min(Math.abs(h-v),Math.abs(h-v+2*Math.PI),Math.abs(h-v-2*Math.PI))},a.bq=function(f){return Math.hypot(f[0],f[1],f[2])},a.br=function(){const f={},u=Be.$version;for(const h in Be.$root){const v=Be.$root[h];if(v.required){let w=null;w=h==="version"?u:v.type==="array"?[]:{},w!=null&&(f[h]=w)}}return f},a.bs=Cd,a.bt=Ge,a.bu=function(f){f=f.slice();const u=Object.create(null);for(let h=0;h<f.length;h++)u[f[h].id]=f[h];for(let h=0;h<f.length;h++)"ref"in f[h]&&(f[h]=ve(f[h],u[f[h].ref]));return f},a.bv=function(f){if(f.type==="custom")return new Ar(f);switch(f.type){case"background":return new Je(f);case"circle":return new Uf(f);case"fill":return new ko(f);case"fill-extrusion":return new Rh(f);case"heatmap":return new TA(f);case"hillshade":return new Oc(f);case"line":return new U0(f);case"raster":return new xn(f);case"symbol":return new G(f)}},a.bw=Pe,a.bx=function(f,u){if(!f)return[{command:"setStyle",args:[u]}];let h=[];try{if(!p(f.version,u.version))return[{command:"setStyle",args:[u]}];p(f.center,u.center)||h.push({command:"setCenter",args:[u.center]}),p(f.centerAltitude,u.centerAltitude)||h.push({command:"setCenterAltitude",args:[u.centerAltitude]}),p(f.zoom,u.zoom)||h.push({command:"setZoom",args:[u.zoom]}),p(f.bearing,u.bearing)||h.push({command:"setBearing",args:[u.bearing]}),p(f.pitch,u.pitch)||h.push({command:"setPitch",args:[u.pitch]}),p(f.roll,u.roll)||h.push({command:"setRoll",args:[u.roll]}),p(f.sprite,u.sprite)||h.push({command:"setSprite",args:[u.sprite]}),p(f.glyphs,u.glyphs)||h.push({command:"setGlyphs",args:[u.glyphs]}),p(f.transition,u.transition)||h.push({command:"setTransition",args:[u.transition]}),p(f.light,u.light)||h.push({command:"setLight",args:[u.light]}),p(f.terrain,u.terrain)||h.push({command:"setTerrain",args:[u.terrain]}),p(f.sky,u.sky)||h.push({command:"setSky",args:[u.sky]}),p(f.projection,u.projection)||h.push({command:"setProjection",args:[u.projection]});const v={},w=[];(function(L,W,Z,ne){let ce;for(ce in W=W||{},L=L||{})Object.prototype.hasOwnProperty.call(L,ce)&&(Object.prototype.hasOwnProperty.call(W,ce)||tt(ce,Z,ne));for(ce in W)Object.prototype.hasOwnProperty.call(W,ce)&&(Object.prototype.hasOwnProperty.call(L,ce)?p(L[ce],W[ce])||(L[ce].type==="geojson"&&W[ce].type==="geojson"&&At(L,W,ce)?je(Z,{command:"setGeoJSONSourceData",args:[ce,W[ce].data]}):ct(ce,W,Z,ne)):Ye(ce,W,Z))})(f.sources,u.sources,w,v);const K=[];f.layers&&f.layers.forEach(L=>{"source"in L&&v[L.source]?h.push({command:"removeLayer",args:[L.id]}):K.push(L)}),h=h.concat(w),function(L,W,Z){W=W||[];const ne=(L=L||[]).map($t),ce=W.map($t),be=L.reduce(jt,{}),Ke=W.reduce(jt,{}),Ue=ne.slice(),Ne=Object.create(null);let Xe,ut,Ct,Nt,Et;for(let Fe=0,st=0;Fe<ne.length;Fe++)Xe=ne[Fe],Object.prototype.hasOwnProperty.call(Ke,Xe)?st++:(je(Z,{command:"removeLayer",args:[Xe]}),Ue.splice(Ue.indexOf(Xe,st),1));for(let Fe=0,st=0;Fe<ce.length;Fe++)Xe=ce[ce.length-1-Fe],Ue[Ue.length-1-Fe]!==Xe&&(Object.prototype.hasOwnProperty.call(be,Xe)?(je(Z,{command:"removeLayer",args:[Xe]}),Ue.splice(Ue.lastIndexOf(Xe,Ue.length-st),1)):st++,Nt=Ue[Ue.length-Fe],je(Z,{command:"addLayer",args:[Ke[Xe],Nt]}),Ue.splice(Ue.length-Fe,0,Xe),Ne[Xe]=!0);for(let Fe=0;Fe<ce.length;Fe++)if(Xe=ce[Fe],ut=be[Xe],Ct=Ke[Xe],!Ne[Xe]&&!p(ut,Ct))if(p(ut.source,Ct.source)&&p(ut["source-layer"],Ct["source-layer"])&&p(ut.type,Ct.type)){for(Et in Gt(ut.layout,Ct.layout,Z,Xe,null,"setLayoutProperty"),Gt(ut.paint,Ct.paint,Z,Xe,null,"setPaintProperty"),p(ut.filter,Ct.filter)||je(Z,{command:"setFilter",args:[Xe,Ct.filter]}),p(ut.minzoom,Ct.minzoom)&&p(ut.maxzoom,Ct.maxzoom)||je(Z,{command:"setLayerZoomRange",args:[Xe,Ct.minzoom,Ct.maxzoom]}),ut)Object.prototype.hasOwnProperty.call(ut,Et)&&Et!=="layout"&&Et!=="paint"&&Et!=="filter"&&Et!=="metadata"&&Et!=="minzoom"&&Et!=="maxzoom"&&(Et.indexOf("paint.")===0?Gt(ut[Et],Ct[Et],Z,Xe,Et.slice(6),"setPaintProperty"):p(ut[Et],Ct[Et])||je(Z,{command:"setLayerProperty",args:[Xe,Et,Ct[Et]]}));for(Et in Ct)Object.prototype.hasOwnProperty.call(Ct,Et)&&!Object.prototype.hasOwnProperty.call(ut,Et)&&Et!=="layout"&&Et!=="paint"&&Et!=="filter"&&Et!=="metadata"&&Et!=="minzoom"&&Et!=="maxzoom"&&(Et.indexOf("paint.")===0?Gt(ut[Et],Ct[Et],Z,Xe,Et.slice(6),"setPaintProperty"):p(ut[Et],Ct[Et])||je(Z,{command:"setLayerProperty",args:[Xe,Et,Ct[Et]]}))}else je(Z,{command:"removeLayer",args:[Xe]}),Nt=Ue[Ue.lastIndexOf(Xe)+1],je(Z,{command:"addLayer",args:[Ct,Nt]})}(K,u.layers,h)}catch(v){console.warn("Unable to compute style diff:",v),h=[{command:"setStyle",args:[u]}]}return h},a.by=function(f){const u=[],h=f.id;return h===void 0&&u.push({message:`layers.${h}: missing required property "id"`}),f.render===void 0&&u.push({message:`layers.${h}: missing required method "render"`}),f.renderingMode&&f.renderingMode!=="2d"&&f.renderingMode!=="3d"&&u.push({message:`layers.${h}: property "renderingMode" must be either "2d" or "3d"`}),u},a.bz=function f(u,h){if(Array.isArray(u)){if(!Array.isArray(h)||u.length!==h.length)return!1;for(let v=0;v<u.length;v++)if(!f(u[v],h[v]))return!1;return!0}if(typeof u=="object"&&u!==null&&h!==null){if(typeof h!="object"||Object.keys(u).length!==Object.keys(h).length)return!1;for(const v in u)if(!f(u[v],h[v]))return!1;return!0}return u===h},a.c=fn,a.c0=f=>f.type==="fill",a.c1=f=>f.type==="fill-extrusion",a.c2=f=>f.type==="hillshade",a.c3=f=>f.type==="raster",a.c4=f=>f.type==="background",a.c5=f=>f.type==="custom",a.c6=Te,a.c7=function(f,u,h){const v=me(u.x-h.x,u.y-h.y),w=me(f.x-h.x,f.y-h.y);var K,L;return ir(Math.atan2(v[0]*w[1]-v[1]*w[0],(K=v)[0]*(L=w)[0]+K[1]*L[1]))},a.c8=rt,a.c9=function(f,u,h){var v=u[0],w=u[1];return f[0]=h[0]*v+h[4]*w+h[12],f[1]=h[1]*v+h[5]*w+h[13],f},a.cA=W0,a.cB=Wc,a.cC=Ks,a.ca=function(f,u){const{x:h,y:v}=ni.fromLngLat(u);return!(f<0||f>25||v<0||v>=1||h<0||h>=1)},a.cb=function(f,u){return f[0]=u[0],f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=u[1],f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=u[2],f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f},a.cc=class extends ih{},a.cd=g3,a.cf=function(f){return f.message===Dn},a.cg=Xn,a.ch=function(f,u){Hn.REGISTERED_PROTOCOLS[f]=u},a.ci=function(f){delete Hn.REGISTERED_PROTOCOLS[f]},a.cj=function(f,u){const h={};for(let w=0;w<f.length;w++){const K=u&&u[f[w].id]||Yc(f[w]);u&&(u[f[w].id]=K);let L=h[K];L||(L=h[K]=[]),L.push(f[w])}const v=[];for(const w in h)v.push(h[w]);return v},a.ck=yr,a.cl=Zg,a.cm=a_,a.cn=Yg,a.co=function(f){f.bucket.createArrays(),f.bucket.tilePixelRatio=at/(512*f.bucket.overscaling),f.bucket.compareText={},f.bucket.iconsNeedLinear=!1;const u=f.bucket.layers[0],h=u.layout,v=u._unevaluatedLayout._values,w={layoutIconSize:v["icon-size"].possiblyEvaluate(new Zo(f.bucket.zoom+1),f.canonical),layoutTextSize:v["text-size"].possiblyEvaluate(new Zo(f.bucket.zoom+1),f.canonical),textMaxSize:v["text-size"].possiblyEvaluate(new Zo(18))};if(f.bucket.textSizeData.kind==="composite"){const{minZoom:ne,maxZoom:ce}=f.bucket.textSizeData;w.compositeTextSizes=[v["text-size"].possiblyEvaluate(new Zo(ne),f.canonical),v["text-size"].possiblyEvaluate(new Zo(ce),f.canonical)]}if(f.bucket.iconSizeData.kind==="composite"){const{minZoom:ne,maxZoom:ce}=f.bucket.iconSizeData;w.compositeIconSizes=[v["icon-size"].possiblyEvaluate(new Zo(ne),f.canonical),v["icon-size"].possiblyEvaluate(new Zo(ce),f.canonical)]}const K=h.get("text-line-height")*Ya,L=h.get("text-rotation-alignment")!=="viewport"&&h.get("symbol-placement")!=="point",W=h.get("text-keep-upright"),Z=h.get("text-size");for(const ne of f.bucket.features){const ce=h.get("text-font").evaluate(ne,{},f.canonical).join(","),be=Z.evaluate(ne,{},f.canonical),Ke=w.layoutTextSize.evaluate(ne,{},f.canonical),Ue=w.layoutIconSize.evaluate(ne,{},f.canonical),Ne={horizontal:{},vertical:void 0},Xe=ne.text;let ut,Ct=[0,0];if(Xe){const Fe=Xe.toString(),st=h.get("text-letter-spacing").evaluate(ne,{},f.canonical)*Ya,Ot=Wl(Fe)?st:0,un=h.get("text-anchor").evaluate(ne,{},f.canonical),zn=bl(u,ne,f.canonical);if(!zn){const Un=h.get("text-radial-offset").evaluate(ne,{},f.canonical);Ct=Un?V0(un,[Un*Ya,e1]):h.get("text-offset").evaluate(ne,{},f.canonical).map(cr=>cr*Ya)}let yn=L?"center":h.get("text-justify").evaluate(ne,{},f.canonical);const wn=h.get("symbol-placement")==="point"?h.get("text-max-width").evaluate(ne,{},f.canonical)*Ya:1/0,tr=()=>{f.bucket.allowVerticalPlacement&&_d(Fe)&&(Ne.vertical=Qf(Xe,f.glyphMap,f.glyphPositions,f.imagePositions,ce,wn,K,un,"left",Ot,Ct,a.ai.vertical,!0,Ke,be))};if(!L&&zn){const Un=new Set;if(yn==="auto")for(let On=0;On<zn.values.length;On+=2)Un.add(xl(zn.values[On]));else Un.add(yn);let cr=!1;for(const On of Un)if(!Ne.horizontal[On])if(cr)Ne.horizontal[On]=Ne.horizontal[0];else{const Gr=Qf(Xe,f.glyphMap,f.glyphPositions,f.imagePositions,ce,wn,K,"center",On,Ot,Ct,a.ai.horizontal,!1,Ke,be);Gr&&(Ne.horizontal[On]=Gr,cr=Gr.positionedLines.length===1)}tr()}else{yn==="auto"&&(yn=xl(un));const Un=Qf(Xe,f.glyphMap,f.glyphPositions,f.imagePositions,ce,wn,K,un,yn,Ot,Ct,a.ai.horizontal,!1,Ke,be);Un&&(Ne.horizontal[yn]=Un),tr(),_d(Fe)&&L&&W&&(Ne.vertical=Qf(Xe,f.glyphMap,f.glyphPositions,f.imagePositions,ce,wn,K,un,yn,Ot,Ct,a.ai.vertical,!1,Ke,be))}}let Nt=!1;if(ne.icon&&ne.icon.name){const Fe=f.imageMap[ne.icon.name];Fe&&(ut=Hg(f.imagePositions[ne.icon.name],h.get("icon-offset").evaluate(ne,{},f.canonical),h.get("icon-anchor").evaluate(ne,{},f.canonical)),Nt=!!Fe.sdf,f.bucket.sdfIcons===void 0?f.bucket.sdfIcons=Nt:f.bucket.sdfIcons!==Nt&&nt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Fe.pixelRatio!==f.bucket.pixelRatio||h.get("icon-rotate").constantOr(1)!==0)&&(f.bucket.iconsNeedLinear=!0))}const Et=g_(Ne.horizontal)||Ne.vertical;f.bucket.iconsInText=!!Et&&Et.iconsInText,(Et||ut)&&p_(f.bucket,ne,Ne,ut,f.imageMap,w,Ke,Ue,Ct,Nt,f.canonical,f.subdivisionGranularity)}f.showCollisionBoxes&&f.bucket.generateCollisionDebugBuffers()},a.cp=Nf,a.cq=Lr,a.cr=PA,a.cs=Dl,a.ct=e0,a.cu=class{constructor(f){this._marks={start:[f.url,"start"].join("#"),end:[f.url,"end"].join("#"),measure:f.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let f=performance.getEntriesByName(this._marks.measure);return f.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),f=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),f}},a.cv=function(f,u,h,v,w){return o(this,void 0,void 0,function*(){if(X())try{return yield mn(f,u,h,v,w)}catch{}return function(K,L,W,Z,ne){const ce=K.width,be=K.height;jn&&nn||(jn=new OffscreenCanvas(ce,be),nn=jn.getContext("2d",{willReadFrequently:!0})),jn.width=ce,jn.height=be,nn.drawImage(K,0,0,ce,be);const Ke=nn.getImageData(L,W,Z,ne);return nn.clearRect(0,0,ce,be),Ke.data}(f,u,h,v,w)})},a.cw=Uh,a.cx=d,a.cy=E,a.cz=ks,a.d=f=>o(void 0,void 0,void 0,function*(){if(f.byteLength===0)return createImageBitmap(new ImageData(1,1));const u=new Blob([new Uint8Array(f)],{type:"image/png"});try{return createImageBitmap(u)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),a.e=gt,a.f=f=>new Promise((u,h)=>{const v=new Image;v.onload=()=>{u(v),URL.revokeObjectURL(v.src),v.onload=null,window.requestAnimationFrame(()=>{v.src=Ft})},v.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const w=new Blob([new Uint8Array(f)],{type:"image/png"});v.src=f.byteLength?URL.createObjectURL(w):Ft}),a.g=wr,a.h=(f,u)=>Ae(gt(f,{type:"json"}),u),a.i=ht,a.j=rn,a.k=Yt,a.l=(f,u)=>Ae(gt(f,{type:"arrayBuffer"}),u),a.m=Ae,a.n=function(f){return new e0(f).readFields(Qy,[])},a.o=Io,a.p=qg,a.q=bs,a.r=yd,a.s=pe,a.t=_s,a.u=Es,a.v=Be,a.w=nt,a.x=function([f,u,h]){return u+=90,u*=Math.PI/180,h*=Math.PI/180,{x:f*Math.cos(u)*Math.sin(h),y:f*Math.sin(u)*Math.sin(h),z:f*Math.cos(h)}},a.y=vi,a.z=Zo}),i("worker",["./shared"],function(a){class o{constructor(oe){this.keyCache={},oe&&this.replace(oe)}replace(oe){this._layerConfigs={},this._layers={},this.update(oe,[])}update(oe,ve){for(const je of oe){this._layerConfigs[je.id]=je;const Ye=this._layers[je.id]=a.bv(je);Ye._featureFilter=a.a4(Ye.filter),this.keyCache[je.id]&&delete this.keyCache[je.id]}for(const je of ve)delete this.keyCache[je],delete this._layerConfigs[je],delete this._layers[je];this.familiesBySource={};const p=a.cj(Object.values(this._layerConfigs),this.keyCache);for(const je of p){const Ye=je.map(jt=>this._layers[jt.id]),tt=Ye[0];if(tt.visibility==="none")continue;const ct=tt.source||"";let At=this.familiesBySource[ct];At||(At=this.familiesBySource[ct]={});const Gt=tt.sourceLayer||"_geojsonTileLayer";let $t=At[Gt];$t||($t=At[Gt]=[]),$t.push(Ye)}}}class d{constructor(oe){const ve={},p=[];for(const ct in oe){const At=oe[ct],Gt=ve[ct]={};for(const $t in At){const jt=At[+$t];if(!jt||jt.bitmap.width===0||jt.bitmap.height===0)continue;const xt={x:0,y:0,w:jt.bitmap.width+2,h:jt.bitmap.height+2};p.push(xt),Gt[$t]={rect:xt,metrics:jt.metrics}}}const{w:je,h:Ye}=a.p(p),tt=new a.o({width:je||1,height:Ye||1});for(const ct in oe){const At=oe[ct];for(const Gt in At){const $t=At[+Gt];if(!$t||$t.bitmap.width===0||$t.bitmap.height===0)continue;const jt=ve[ct][Gt].rect;a.o.copy($t.bitmap,tt,{x:0,y:0},{x:jt.x+1,y:jt.y+1},$t.bitmap)}}this.image=tt,this.positions=ve}}a.ck("GlyphAtlas",d);class g{constructor(oe){this.tileID=new a.S(oe.tileID.overscaledZ,oe.tileID.wrap,oe.tileID.canonical.z,oe.tileID.canonical.x,oe.tileID.canonical.y),this.uid=oe.uid,this.zoom=oe.zoom,this.pixelRatio=oe.pixelRatio,this.tileSize=oe.tileSize,this.source=oe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=oe.showCollisionBoxes,this.collectResourceTiming=!!oe.collectResourceTiming,this.returnDependencies=!!oe.returnDependencies,this.promoteId=oe.promoteId,this.inFlightDependencies=[]}parse(oe,ve,p,je,Ye){return a._(this,void 0,void 0,function*(){this.status="parsing",this.data=oe,this.collisionBoxArray=new a.a2;const tt=new a.cl(Object.keys(oe.layers).sort()),ct=new a.cm(this.tileID,this.promoteId);ct.bucketLayerIDs=[];const At={},Gt={featureIndex:ct,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:p,subdivisionGranularity:Ye},$t=ve.familiesBySource[this.source];for(const Dr in $t){const ur=oe.layers[Dr];if(!ur)continue;ur.version===1&&a.w(`Vector tile source "${this.source}" layer "${Dr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const co=tt.encode(Dr),Sa=[];for(let qi=0;qi<ur.length;qi++){const yi=ur.feature(qi),oo=ct.getId(yi,Dr);Sa.push({feature:yi,id:oo,index:qi,sourceLayerIndex:co})}for(const qi of $t[Dr]){const yi=qi[0];yi.source!==this.source&&a.w(`layer.source = ${yi.source} does not equal this.source = ${this.source}`),yi.minzoom&&this.zoom<Math.floor(yi.minzoom)||yi.maxzoom&&this.zoom>=yi.maxzoom||yi.visibility!=="none"&&(b(qi,this.zoom,p),(At[yi.id]=yi.createBucket({index:ct.bucketLayerIDs.length,layers:qi,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:co,sourceID:this.source})).populate(Sa,Gt,this.tileID.canonical),ct.bucketLayerIDs.push(qi.map(oo=>oo.id)))}}const jt=a.bA(Gt.glyphDependencies,Dr=>Object.keys(Dr).map(Number));this.inFlightDependencies.forEach(Dr=>Dr==null?void 0:Dr.abort()),this.inFlightDependencies=[];let xt=Promise.resolve({});if(Object.keys(jt).length){const Dr=new AbortController;this.inFlightDependencies.push(Dr),xt=je.sendAsync({type:"GG",data:{stacks:jt,source:this.source,tileID:this.tileID,type:"glyphs"}},Dr)}const Rn=Object.keys(Gt.iconDependencies);let Bn=Promise.resolve({});if(Rn.length){const Dr=new AbortController;this.inFlightDependencies.push(Dr),Bn=je.sendAsync({type:"GI",data:{icons:Rn,source:this.source,tileID:this.tileID,type:"icons"}},Dr)}const fr=Object.keys(Gt.patternDependencies);let Sr=Promise.resolve({});if(fr.length){const Dr=new AbortController;this.inFlightDependencies.push(Dr),Sr=je.sendAsync({type:"GI",data:{icons:fr,source:this.source,tileID:this.tileID,type:"patterns"}},Dr)}const[on,Nn,Fn]=yield Promise.all([xt,Bn,Sr]),Or=new d(on),Er=new a.cn(Nn,Fn);for(const Dr in At){const ur=At[Dr];ur instanceof a.a3?(b(ur.layers,this.zoom,p),a.co({bucket:ur,glyphMap:on,glyphPositions:Or.positions,imageMap:Nn,imagePositions:Er.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Gt.subdivisionGranularity})):ur.hasPattern&&(ur instanceof a.cp||ur instanceof a.cq||ur instanceof a.cr)&&(b(ur.layers,this.zoom,p),ur.addFeatures(Gt,this.tileID.canonical,Er.patternPositions))}return this.status="done",{buckets:Object.values(At).filter(Dr=>!Dr.isEmpty()),featureIndex:ct,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Or.image,imageAtlas:Er,glyphMap:this.returnDependencies?on:null,iconMap:this.returnDependencies?Nn:null,glyphPositions:this.returnDependencies?Or.positions:null}})}}function b(Be,oe,ve){const p=new a.z(oe);for(const je of Be)je.recalculate(p,ve)}class E{constructor(oe,ve,p){this.actor=oe,this.layerIndex=ve,this.availableImages=p,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(oe,ve){return a._(this,void 0,void 0,function*(){const p=yield a.l(oe.request,ve);try{return{vectorTile:new a.cs.VectorTile(new a.ct(p.data)),rawData:p.data,cacheControl:p.cacheControl,expires:p.expires}}catch(je){const Ye=new Uint8Array(p.data);let tt=`Unable to parse the tile at ${oe.request.url}, `;throw tt+=Ye[0]===31&&Ye[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${je.message}`,new Error(tt)}})}loadTile(oe){return a._(this,void 0,void 0,function*(){const ve=oe.uid,p=!!(oe&&oe.request&&oe.request.collectResourceTiming)&&new a.cu(oe.request),je=new g(oe);this.loading[ve]=je;const Ye=new AbortController;je.abort=Ye;try{const tt=yield this.loadVectorTile(oe,Ye);if(delete this.loading[ve],!tt)return null;const ct=tt.rawData,At={};tt.expires&&(At.expires=tt.expires),tt.cacheControl&&(At.cacheControl=tt.cacheControl);const Gt={};if(p){const jt=p.finish();jt&&(Gt.resourceTiming=JSON.parse(JSON.stringify(jt)))}je.vectorTile=tt.vectorTile;const $t=je.parse(tt.vectorTile,this.layerIndex,this.availableImages,this.actor,oe.subdivisionGranularity);this.loaded[ve]=je,this.fetching[ve]={rawTileData:ct,cacheControl:At,resourceTiming:Gt};try{const jt=yield $t;return a.e({rawTileData:ct.slice(0)},jt,At,Gt)}finally{delete this.fetching[ve]}}catch(tt){throw delete this.loading[ve],je.status="done",this.loaded[ve]=je,tt}})}reloadTile(oe){return a._(this,void 0,void 0,function*(){const ve=oe.uid;if(!this.loaded||!this.loaded[ve])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const p=this.loaded[ve];if(p.showCollisionBoxes=oe.showCollisionBoxes,p.status==="parsing"){const je=yield p.parse(p.vectorTile,this.layerIndex,this.availableImages,this.actor,oe.subdivisionGranularity);let Ye;if(this.fetching[ve]){const{rawTileData:tt,cacheControl:ct,resourceTiming:At}=this.fetching[ve];delete this.fetching[ve],Ye=a.e({rawTileData:tt.slice(0)},je,ct,At)}else Ye=je;return Ye}if(p.status==="done"&&p.vectorTile)return p.parse(p.vectorTile,this.layerIndex,this.availableImages,this.actor,oe.subdivisionGranularity)})}abortTile(oe){return a._(this,void 0,void 0,function*(){const ve=this.loading,p=oe.uid;ve&&ve[p]&&ve[p].abort&&(ve[p].abort.abort(),delete ve[p])})}removeTile(oe){return a._(this,void 0,void 0,function*(){this.loaded&&this.loaded[oe.uid]&&delete this.loaded[oe.uid]})}}class S{constructor(){this.loaded={}}loadTile(oe){return a._(this,void 0,void 0,function*(){const{uid:ve,encoding:p,rawImageData:je,redFactor:Ye,greenFactor:tt,blueFactor:ct,baseShift:At}=oe,Gt=je.width+2,$t=je.height+2,jt=a.b(je)?new a.R({width:Gt,height:$t},yield a.cv(je,-1,-1,Gt,$t)):je,xt=new a.cw(ve,jt,p,Ye,tt,ct,At);return this.loaded=this.loaded||{},this.loaded[ve]=xt,xt})}removeTile(oe){const ve=this.loaded,p=oe.uid;ve&&ve[p]&&delete ve[p]}}var O,k,U=function(){if(k)return O;function Be(ve,p){if(ve.length!==0){oe(ve[0],p);for(var je=1;je<ve.length;je++)oe(ve[je],!p)}}function oe(ve,p){for(var je=0,Ye=0,tt=0,ct=ve.length,At=ct-1;tt<ct;At=tt++){var Gt=(ve[tt][0]-ve[At][0])*(ve[At][1]+ve[tt][1]),$t=je+Gt;Ye+=Math.abs(je)>=Math.abs(Gt)?je-$t+Gt:Gt-$t+je,je=$t}je+Ye>=0!=!!p&&ve.reverse()}return k=1,O=function ve(p,je){var Ye,tt=p&&p.type;if(tt==="FeatureCollection")for(Ye=0;Ye<p.features.length;Ye++)ve(p.features[Ye],je);else if(tt==="GeometryCollection")for(Ye=0;Ye<p.geometries.length;Ye++)ve(p.geometries[Ye],je);else if(tt==="Feature")ve(p.geometry,je);else if(tt==="Polygon")Be(p.coordinates,je);else if(tt==="MultiPolygon")for(Ye=0;Ye<p.coordinates.length;Ye++)Be(p.coordinates[Ye],je);return p}}(),z=a.cx(U);const q=a.cs.VectorTileFeature.prototype.toGeoJSON;class Q{constructor(oe){this._feature=oe,this.extent=a.X,this.type=oe.type,this.properties=oe.tags,"id"in oe&&!isNaN(oe.id)&&(this.id=parseInt(oe.id,10))}loadGeometry(){if(this._feature.type===1){const oe=[];for(const ve of this._feature.geometry)oe.push([new a.P(ve[0],ve[1])]);return oe}{const oe=[];for(const ve of this._feature.geometry){const p=[];for(const je of ve)p.push(new a.P(je[0],je[1]));oe.push(p)}return oe}}toGeoJSON(oe,ve,p){return q.call(this,oe,ve,p)}}class re{constructor(oe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.X,this.length=oe.length,this._features=oe}feature(oe){return new Q(this._features[oe])}}var X,Y,ee,N={exports:{}},ie=function(){if(ee)return N.exports;ee=1;var Be=a.cA(),oe=function(){if(Y)return X;Y=1;var $t=a.cy(),jt=a.cz().VectorTileFeature;function xt(Bn,fr){this.options=fr||{},this.features=Bn,this.length=Bn.length}function Rn(Bn,fr){this.id=typeof Bn.id=="number"?Bn.id:void 0,this.type=Bn.type,this.rawGeometry=Bn.type===1?[Bn.geometry]:Bn.geometry,this.properties=Bn.tags,this.extent=fr||4096}return X=xt,xt.prototype.feature=function(Bn){return new Rn(this.features[Bn],this.options.extent)},Rn.prototype.loadGeometry=function(){var Bn=this.rawGeometry;this.geometry=[];for(var fr=0;fr<Bn.length;fr++){for(var Sr=Bn[fr],on=[],Nn=0;Nn<Sr.length;Nn++)on.push(new $t(Sr[Nn][0],Sr[Nn][1]));this.geometry.push(on)}return this.geometry},Rn.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Bn=this.geometry,fr=1/0,Sr=-1/0,on=1/0,Nn=-1/0,Fn=0;Fn<Bn.length;Fn++)for(var Or=Bn[Fn],Er=0;Er<Or.length;Er++){var Dr=Or[Er];fr=Math.min(fr,Dr.x),Sr=Math.max(Sr,Dr.x),on=Math.min(on,Dr.y),Nn=Math.max(Nn,Dr.y)}return[fr,on,Sr,Nn]},Rn.prototype.toGeoJSON=jt.prototype.toGeoJSON,X}();function ve($t){var jt=new Be;return function(xt,Rn){for(var Bn in xt.layers)Rn.writeMessage(3,p,xt.layers[Bn])}($t,jt),jt.finish()}function p($t,jt){var xt;jt.writeVarintField(15,$t.version||1),jt.writeStringField(1,$t.name||""),jt.writeVarintField(5,$t.extent||4096);var Rn={keys:[],values:[],keycache:{},valuecache:{}};for(xt=0;xt<$t.length;xt++)Rn.feature=$t.feature(xt),jt.writeMessage(2,je,Rn);var Bn=Rn.keys;for(xt=0;xt<Bn.length;xt++)jt.writeStringField(3,Bn[xt]);var fr=Rn.values;for(xt=0;xt<fr.length;xt++)jt.writeMessage(4,Gt,fr[xt])}function je($t,jt){var xt=$t.feature;xt.id!==void 0&&jt.writeVarintField(1,xt.id),jt.writeMessage(2,Ye,$t),jt.writeVarintField(3,xt.type),jt.writeMessage(4,At,xt)}function Ye($t,jt){var xt=$t.feature,Rn=$t.keys,Bn=$t.values,fr=$t.keycache,Sr=$t.valuecache;for(var on in xt.properties){var Nn=xt.properties[on],Fn=fr[on];if(Nn!==null){Fn===void 0&&(Rn.push(on),fr[on]=Fn=Rn.length-1),jt.writeVarint(Fn);var Or=typeof Nn;Or!=="string"&&Or!=="boolean"&&Or!=="number"&&(Nn=JSON.stringify(Nn));var Er=Or+":"+Nn,Dr=Sr[Er];Dr===void 0&&(Bn.push(Nn),Sr[Er]=Dr=Bn.length-1),jt.writeVarint(Dr)}}}function tt($t,jt){return(jt<<3)+(7&$t)}function ct($t){return $t<<1^$t>>31}function At($t,jt){for(var xt=$t.loadGeometry(),Rn=$t.type,Bn=0,fr=0,Sr=xt.length,on=0;on<Sr;on++){var Nn=xt[on],Fn=1;Rn===1&&(Fn=Nn.length),jt.writeVarint(tt(1,Fn));for(var Or=Rn===3?Nn.length-1:Nn.length,Er=0;Er<Or;Er++){Er===1&&Rn!==1&&jt.writeVarint(tt(2,Or-1));var Dr=Nn[Er].x-Bn,ur=Nn[Er].y-fr;jt.writeVarint(ct(Dr)),jt.writeVarint(ct(ur)),Bn+=Dr,fr+=ur}Rn===3&&jt.writeVarint(tt(7,1))}}function Gt($t,jt){var xt=typeof $t;xt==="string"?jt.writeStringField(1,$t):xt==="boolean"?jt.writeBooleanField(7,$t):xt==="number"&&($t%1!=0?jt.writeDoubleField(3,$t):$t<0?jt.writeSVarintField(6,$t):jt.writeVarintField(5,$t))}return N.exports=ve,N.exports.fromVectorTileJs=ve,N.exports.fromGeojsonVt=function($t,jt){jt=jt||{};var xt={};for(var Rn in $t)xt[Rn]=new oe($t[Rn].features,jt),xt[Rn].name=Rn,xt[Rn].version=jt.version,xt[Rn].extent=jt.extent;return ve({layers:xt})},N.exports.GeoJSONWrapper=oe,N.exports}(),he=a.cx(ie);const de={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Be=>Be},Me=Math.fround||(fe=new Float32Array(1),Be=>(fe[0]=+Be,fe[0]));var fe;const xe=3,De=5,me=6;class at{constructor(oe){this.options=Object.assign(Object.create(de),oe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(oe){const{log:ve,minZoom:p,maxZoom:je}=this.options;ve&&console.time("total time");const Ye=`prepare ${oe.length} points`;ve&&console.time(Ye),this.points=oe;const tt=[];for(let At=0;At<oe.length;At++){const Gt=oe[At];if(!Gt.geometry)continue;const[$t,jt]=Gt.geometry.coordinates,xt=Me(We($t)),Rn=Me(Ce(jt));tt.push(xt,Rn,1/0,At,-1,1),this.options.reduce&&tt.push(0)}let ct=this.trees[je+1]=this._createTree(tt);ve&&console.timeEnd(Ye);for(let At=je;At>=p;At--){const Gt=+Date.now();ct=this.trees[At]=this._createTree(this._cluster(ct,At)),ve&&console.log("z%d: %d clusters in %dms",At,ct.numItems,+Date.now()-Gt)}return ve&&console.timeEnd("total time"),this}getClusters(oe,ve){let p=((oe[0]+180)%360+360)%360-180;const je=Math.max(-90,Math.min(90,oe[1]));let Ye=oe[2]===180?180:((oe[2]+180)%360+360)%360-180;const tt=Math.max(-90,Math.min(90,oe[3]));if(oe[2]-oe[0]>=360)p=-180,Ye=180;else if(p>Ye){const jt=this.getClusters([p,je,180,tt],ve),xt=this.getClusters([-180,je,Ye,tt],ve);return jt.concat(xt)}const ct=this.trees[this._limitZoom(ve)],At=ct.range(We(p),Ce(tt),We(Ye),Ce(je)),Gt=ct.data,$t=[];for(const jt of At){const xt=this.stride*jt;$t.push(Gt[xt+De]>1?Qe(Gt,xt,this.clusterProps):this.points[Gt[xt+xe]])}return $t}getChildren(oe){const ve=this._getOriginId(oe),p=this._getOriginZoom(oe),je="No cluster with the specified id.",Ye=this.trees[p];if(!Ye)throw new Error(je);const tt=Ye.data;if(ve*this.stride>=tt.length)throw new Error(je);const ct=this.options.radius/(this.options.extent*Math.pow(2,p-1)),At=Ye.within(tt[ve*this.stride],tt[ve*this.stride+1],ct),Gt=[];for(const $t of At){const jt=$t*this.stride;tt[jt+4]===oe&&Gt.push(tt[jt+De]>1?Qe(tt,jt,this.clusterProps):this.points[tt[jt+xe]])}if(Gt.length===0)throw new Error(je);return Gt}getLeaves(oe,ve,p){const je=[];return this._appendLeaves(je,oe,ve=ve||10,p=p||0,0),je}getTile(oe,ve,p){const je=this.trees[this._limitZoom(oe)],Ye=Math.pow(2,oe),{extent:tt,radius:ct}=this.options,At=ct/tt,Gt=(p-At)/Ye,$t=(p+1+At)/Ye,jt={features:[]};return this._addTileFeatures(je.range((ve-At)/Ye,Gt,(ve+1+At)/Ye,$t),je.data,ve,p,Ye,jt),ve===0&&this._addTileFeatures(je.range(1-At/Ye,Gt,1,$t),je.data,Ye,p,Ye,jt),ve===Ye-1&&this._addTileFeatures(je.range(0,Gt,At/Ye,$t),je.data,-1,p,Ye,jt),jt.features.length?jt:null}getClusterExpansionZoom(oe){let ve=this._getOriginZoom(oe)-1;for(;ve<=this.options.maxZoom;){const p=this.getChildren(oe);if(ve++,p.length!==1)break;oe=p[0].properties.cluster_id}return ve}_appendLeaves(oe,ve,p,je,Ye){const tt=this.getChildren(ve);for(const ct of tt){const At=ct.properties;if(At&&At.cluster?Ye+At.point_count<=je?Ye+=At.point_count:Ye=this._appendLeaves(oe,At.cluster_id,p,je,Ye):Ye<je?Ye++:oe.push(ct),oe.length===p)break}return Ye}_createTree(oe){const ve=new a.az(oe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let p=0;p<oe.length;p+=this.stride)ve.add(oe[p],oe[p+1]);return ve.finish(),ve.data=oe,ve}_addTileFeatures(oe,ve,p,je,Ye,tt){for(const ct of oe){const At=ct*this.stride,Gt=ve[At+De]>1;let $t,jt,xt;if(Gt)$t=He(ve,At,this.clusterProps),jt=ve[At],xt=ve[At+1];else{const fr=this.points[ve[At+xe]];$t=fr.properties;const[Sr,on]=fr.geometry.coordinates;jt=We(Sr),xt=Ce(on)}const Rn={type:1,geometry:[[Math.round(this.options.extent*(jt*Ye-p)),Math.round(this.options.extent*(xt*Ye-je))]],tags:$t};let Bn;Bn=Gt||this.options.generateId?ve[At+xe]:this.points[ve[At+xe]].id,Bn!==void 0&&(Rn.id=Bn),tt.features.push(Rn)}}_limitZoom(oe){return Math.max(this.options.minZoom,Math.min(Math.floor(+oe),this.options.maxZoom+1))}_cluster(oe,ve){const{radius:p,extent:je,reduce:Ye,minPoints:tt}=this.options,ct=p/(je*Math.pow(2,ve)),At=oe.data,Gt=[],$t=this.stride;for(let jt=0;jt<At.length;jt+=$t){if(At[jt+2]<=ve)continue;At[jt+2]=ve;const xt=At[jt],Rn=At[jt+1],Bn=oe.within(At[jt],At[jt+1],ct),fr=At[jt+De];let Sr=fr;for(const on of Bn){const Nn=on*$t;At[Nn+2]>ve&&(Sr+=At[Nn+De])}if(Sr>fr&&Sr>=tt){let on,Nn=xt*fr,Fn=Rn*fr,Or=-1;const Er=((jt/$t|0)<<5)+(ve+1)+this.points.length;for(const Dr of Bn){const ur=Dr*$t;if(At[ur+2]<=ve)continue;At[ur+2]=ve;const co=At[ur+De];Nn+=At[ur]*co,Fn+=At[ur+1]*co,At[ur+4]=Er,Ye&&(on||(on=this._map(At,jt,!0),Or=this.clusterProps.length,this.clusterProps.push(on)),Ye(on,this._map(At,ur)))}At[jt+4]=Er,Gt.push(Nn/Sr,Fn/Sr,1/0,Er,-1,Sr),Ye&&Gt.push(Or)}else{for(let on=0;on<$t;on++)Gt.push(At[jt+on]);if(Sr>1)for(const on of Bn){const Nn=on*$t;if(!(At[Nn+2]<=ve)){At[Nn+2]=ve;for(let Fn=0;Fn<$t;Fn++)Gt.push(At[Nn+Fn])}}}}return Gt}_getOriginId(oe){return oe-this.points.length>>5}_getOriginZoom(oe){return(oe-this.points.length)%32}_map(oe,ve,p){if(oe[ve+De]>1){const tt=this.clusterProps[oe[ve+me]];return p?Object.assign({},tt):tt}const je=this.points[oe[ve+xe]].properties,Ye=this.options.map(je);return p&&Ye===je?Object.assign({},Ye):Ye}}function Qe(Be,oe,ve){return{type:"Feature",id:Be[oe+xe],properties:He(Be,oe,ve),geometry:{type:"Point",coordinates:[(p=Be[oe],360*(p-.5)),Te(Be[oe+1])]}};var p}function He(Be,oe,ve){const p=Be[oe+De],je=p>=1e4?`${Math.round(p/1e3)}k`:p>=1e3?Math.round(p/100)/10+"k":p,Ye=Be[oe+me],tt=Ye===-1?{}:Object.assign({},ve[Ye]);return Object.assign(tt,{cluster:!0,cluster_id:Be[oe+xe],point_count:p,point_count_abbreviated:je})}function We(Be){return Be/360+.5}function Ce(Be){const oe=Math.sin(Be*Math.PI/180),ve=.5-.25*Math.log((1+oe)/(1-oe))/Math.PI;return ve<0?0:ve>1?1:ve}function Te(Be){const oe=(180-360*Be)*Math.PI/180;return 360*Math.atan(Math.exp(oe))/Math.PI-90}function rt(Be,oe,ve,p){let je=p;const Ye=oe+(ve-oe>>1);let tt,ct=ve-oe;const At=Be[oe],Gt=Be[oe+1],$t=Be[ve],jt=Be[ve+1];for(let xt=oe+3;xt<ve;xt+=3){const Rn=yt(Be[xt],Be[xt+1],At,Gt,$t,jt);if(Rn>je)tt=xt,je=Rn;else if(Rn===je){const Bn=Math.abs(xt-Ye);Bn<ct&&(tt=xt,ct=Bn)}}je>p&&(tt-oe>3&&rt(Be,oe,tt,p),Be[tt+2]=je,ve-tt>3&&rt(Be,tt,ve,p))}function yt(Be,oe,ve,p,je,Ye){let tt=je-ve,ct=Ye-p;if(tt!==0||ct!==0){const At=((Be-ve)*tt+(oe-p)*ct)/(tt*tt+ct*ct);At>1?(ve=je,p=Ye):At>0&&(ve+=tt*At,p+=ct*At)}return tt=Be-ve,ct=oe-p,tt*tt+ct*ct}function bt(Be,oe,ve,p){const je={id:Be??null,type:oe,geometry:ve,tags:p,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(oe==="Point"||oe==="MultiPoint"||oe==="LineString")gt(je,ve);else if(oe==="Polygon")gt(je,ve[0]);else if(oe==="MultiLineString")for(const Ye of ve)gt(je,Ye);else if(oe==="MultiPolygon")for(const Ye of ve)gt(je,Ye[0]);return je}function gt(Be,oe){for(let ve=0;ve<oe.length;ve+=3)Be.minX=Math.min(Be.minX,oe[ve]),Be.minY=Math.min(Be.minY,oe[ve+1]),Be.maxX=Math.max(Be.maxX,oe[ve]),Be.maxY=Math.max(Be.maxY,oe[ve+1])}function Dt(Be,oe,ve,p){if(!oe.geometry)return;const je=oe.geometry.coordinates;if(je&&je.length===0)return;const Ye=oe.geometry.type,tt=Math.pow(ve.tolerance/((1<<ve.maxZoom)*ve.extent),2);let ct=[],At=oe.id;if(ve.promoteId?At=oe.properties[ve.promoteId]:ve.generateId&&(At=p||0),Ye==="Point")Pt(je,ct);else if(Ye==="MultiPoint")for(const Gt of je)Pt(Gt,ct);else if(Ye==="LineString")Le(je,ct,tt,!1);else if(Ye==="MultiLineString"){if(ve.lineMetrics){for(const Gt of je)ct=[],Le(Gt,ct,tt,!1),Be.push(bt(At,"LineString",ct,oe.properties));return}Pe(je,ct,tt,!1)}else if(Ye==="Polygon")Pe(je,ct,tt,!0);else{if(Ye!=="MultiPolygon"){if(Ye==="GeometryCollection"){for(const Gt of oe.geometry.geometries)Dt(Be,{id:At,geometry:Gt,properties:oe.properties},ve,p);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Gt of je){const $t=[];Pe(Gt,$t,tt,!0),ct.push($t)}}Be.push(bt(At,Ye,ct,oe.properties))}function Pt(Be,oe){oe.push(Ee(Be[0]),nt(Be[1]),0)}function Le(Be,oe,ve,p){let je,Ye,tt=0;for(let At=0;At<Be.length;At++){const Gt=Ee(Be[At][0]),$t=nt(Be[At][1]);oe.push(Gt,$t,0),At>0&&(tt+=p?(je*$t-Gt*Ye)/2:Math.sqrt(Math.pow(Gt-je,2)+Math.pow($t-Ye,2))),je=Gt,Ye=$t}const ct=oe.length-3;oe[2]=1,rt(oe,0,ct,ve),oe[ct+2]=1,oe.size=Math.abs(tt),oe.start=0,oe.end=oe.size}function Pe(Be,oe,ve,p){for(let je=0;je<Be.length;je++){const Ye=[];Le(Be[je],Ye,ve,p),oe.push(Ye)}}function Ee(Be){return Be/360+.5}function nt(Be){const oe=Math.sin(Be*Math.PI/180),ve=.5-.25*Math.log((1+oe)/(1-oe))/Math.PI;return ve<0?0:ve>1?1:ve}function _t(Be,oe,ve,p,je,Ye,tt,ct){if(p/=oe,Ye>=(ve/=oe)&&tt<p)return Be;if(tt<ve||Ye>=p)return null;const At=[];for(const Gt of Be){const $t=Gt.geometry;let jt=Gt.type;const xt=je===0?Gt.minX:Gt.minY,Rn=je===0?Gt.maxX:Gt.maxY;if(xt>=ve&&Rn<p){At.push(Gt);continue}if(Rn<ve||xt>=p)continue;let Bn=[];if(jt==="Point"||jt==="MultiPoint")ht($t,Bn,ve,p,je);else if(jt==="LineString")Ut($t,Bn,ve,p,je,!1,ct.lineMetrics);else if(jt==="MultiLineString")Ft($t,Bn,ve,p,je,!1);else if(jt==="Polygon")Ft($t,Bn,ve,p,je,!0);else if(jt==="MultiPolygon")for(const fr of $t){const Sr=[];Ft(fr,Sr,ve,p,je,!0),Sr.length&&Bn.push(Sr)}if(Bn.length){if(ct.lineMetrics&&jt==="LineString"){for(const fr of Bn)At.push(bt(Gt.id,jt,fr,Gt.tags));continue}jt!=="LineString"&&jt!=="MultiLineString"||(Bn.length===1?(jt="LineString",Bn=Bn[0]):jt="MultiLineString"),jt!=="Point"&&jt!=="MultiPoint"||(jt=Bn.length===3?"Point":"MultiPoint"),At.push(bt(Gt.id,jt,Bn,Gt.tags))}}return At.length?At:null}function ht(Be,oe,ve,p,je){for(let Ye=0;Ye<Be.length;Ye+=3){const tt=Be[Ye+je];tt>=ve&&tt<=p&&mn(oe,Be[Ye],Be[Ye+1],Be[Ye+2])}}function Ut(Be,oe,ve,p,je,Ye,tt){let ct=en(Be);const At=je===0?jn:nn;let Gt,$t,jt=Be.start;for(let Sr=0;Sr<Be.length-3;Sr+=3){const on=Be[Sr],Nn=Be[Sr+1],Fn=Be[Sr+2],Or=Be[Sr+3],Er=Be[Sr+4],Dr=je===0?on:Nn,ur=je===0?Or:Er;let co=!1;tt&&(Gt=Math.sqrt(Math.pow(on-Or,2)+Math.pow(Nn-Er,2))),Dr<ve?ur>ve&&($t=At(ct,on,Nn,Or,Er,ve),tt&&(ct.start=jt+Gt*$t)):Dr>p?ur<p&&($t=At(ct,on,Nn,Or,Er,p),tt&&(ct.start=jt+Gt*$t)):mn(ct,on,Nn,Fn),ur<ve&&Dr>=ve&&($t=At(ct,on,Nn,Or,Er,ve),co=!0),ur>p&&Dr<=p&&($t=At(ct,on,Nn,Or,Er,p),co=!0),!Ye&&co&&(tt&&(ct.end=jt+Gt*$t),oe.push(ct),ct=en(Be)),tt&&(jt+=Gt)}let xt=Be.length-3;const Rn=Be[xt],Bn=Be[xt+1],fr=je===0?Rn:Bn;fr>=ve&&fr<=p&&mn(ct,Rn,Bn,Be[xt+2]),xt=ct.length-3,Ye&&xt>=3&&(ct[xt]!==ct[0]||ct[xt+1]!==ct[1])&&mn(ct,ct[0],ct[1],ct[2]),ct.length&&oe.push(ct)}function en(Be){const oe=[];return oe.size=Be.size,oe.start=Be.start,oe.end=Be.end,oe}function Ft(Be,oe,ve,p,je,Ye){for(const tt of Be)Ut(tt,oe,ve,p,je,Ye,!1)}function mn(Be,oe,ve,p){Be.push(oe,ve,p)}function jn(Be,oe,ve,p,je,Ye){const tt=(Ye-oe)/(p-oe);return mn(Be,Ye,ve+(je-ve)*tt,1),tt}function nn(Be,oe,ve,p,je,Ye){const tt=(Ye-ve)/(je-ve);return mn(Be,oe+(p-oe)*tt,Ye,1),tt}function ir(Be,oe){const ve=[];for(let p=0;p<Be.length;p++){const je=Be[p],Ye=je.type;let tt;if(Ye==="Point"||Ye==="MultiPoint"||Ye==="LineString")tt=Dn(je.geometry,oe);else if(Ye==="MultiLineString"||Ye==="Polygon"){tt=[];for(const ct of je.geometry)tt.push(Dn(ct,oe))}else if(Ye==="MultiPolygon"){tt=[];for(const ct of je.geometry){const At=[];for(const Gt of ct)At.push(Dn(Gt,oe));tt.push(At)}}ve.push(bt(je.id,Ye,tt,je.tags))}return ve}function Dn(Be,oe){const ve=[];ve.size=Be.size,Be.start!==void 0&&(ve.start=Be.start,ve.end=Be.end);for(let p=0;p<Be.length;p+=3)ve.push(Be[p]+oe,Be[p+1],Be[p+2]);return ve}function fn(Be,oe){if(Be.transformed)return Be;const ve=1<<Be.z,p=Be.x,je=Be.y;for(const Ye of Be.features){const tt=Ye.geometry,ct=Ye.type;if(Ye.geometry=[],ct===1)for(let At=0;At<tt.length;At+=2)Ye.geometry.push(Hn(tt[At],tt[At+1],oe,ve,p,je));else for(let At=0;At<tt.length;At++){const Gt=[];for(let $t=0;$t<tt[At].length;$t+=2)Gt.push(Hn(tt[At][$t],tt[At][$t+1],oe,ve,p,je));Ye.geometry.push(Gt)}}return Be.transformed=!0,Be}function Hn(Be,oe,ve,p,je,Ye){return[Math.round(ve*(Be*p-je)),Math.round(ve*(oe*p-Ye))]}function wr(Be,oe,ve,p,je){const Ye=oe===je.maxZoom?0:je.tolerance/((1<<oe)*je.extent),tt={features:[],numPoints:0,numSimplified:0,numFeatures:Be.length,source:null,x:ve,y:p,z:oe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const ct of Be)Qn(tt,ct,Ye,je);return tt}function Qn(Be,oe,ve,p){const je=oe.geometry,Ye=oe.type,tt=[];if(Be.minX=Math.min(Be.minX,oe.minX),Be.minY=Math.min(Be.minY,oe.minY),Be.maxX=Math.max(Be.maxX,oe.maxX),Be.maxY=Math.max(Be.maxY,oe.maxY),Ye==="Point"||Ye==="MultiPoint")for(let ct=0;ct<je.length;ct+=3)tt.push(je[ct],je[ct+1]),Be.numPoints++,Be.numSimplified++;else if(Ye==="LineString")Xn(tt,je,Be,ve,!1,!1);else if(Ye==="MultiLineString"||Ye==="Polygon")for(let ct=0;ct<je.length;ct++)Xn(tt,je[ct],Be,ve,Ye==="Polygon",ct===0);else if(Ye==="MultiPolygon")for(let ct=0;ct<je.length;ct++){const At=je[ct];for(let Gt=0;Gt<At.length;Gt++)Xn(tt,At[Gt],Be,ve,!0,Gt===0)}if(tt.length){let ct=oe.tags||null;if(Ye==="LineString"&&p.lineMetrics){ct={};for(const Gt in oe.tags)ct[Gt]=oe.tags[Gt];ct.mapbox_clip_start=je.start/je.size,ct.mapbox_clip_end=je.end/je.size}const At={geometry:tt,type:Ye==="Polygon"||Ye==="MultiPolygon"?3:Ye==="LineString"||Ye==="MultiLineString"?2:1,tags:ct};oe.id!==null&&(At.id=oe.id),Be.features.push(At)}}function Xn(Be,oe,ve,p,je,Ye){const tt=p*p;if(p>0&&oe.size<(je?tt:p))return void(ve.numPoints+=oe.length/3);const ct=[];for(let At=0;At<oe.length;At+=3)(p===0||oe[At+2]>tt)&&(ve.numSimplified++,ct.push(oe[At],oe[At+1])),ve.numPoints++;je&&function(At,Gt){let $t=0;for(let jt=0,xt=At.length,Rn=xt-2;jt<xt;Rn=jt,jt+=2)$t+=(At[jt]-At[Rn])*(At[jt+1]+At[Rn+1]);if($t>0===Gt)for(let jt=0,xt=At.length;jt<xt/2;jt+=2){const Rn=At[jt],Bn=At[jt+1];At[jt]=At[xt-2-jt],At[jt+1]=At[xt-1-jt],At[xt-2-jt]=Rn,At[xt-1-jt]=Bn}}(ct,Ye),Be.push(ct)}const Ge={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Ae{constructor(oe,ve){const p=(ve=this.options=function(Ye,tt){for(const ct in tt)Ye[ct]=tt[ct];return Ye}(Object.create(Ge),ve)).debug;if(p&&console.time("preprocess data"),ve.maxZoom<0||ve.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ve.promoteId&&ve.generateId)throw new Error("promoteId and generateId cannot be used together.");let je=function(Ye,tt){const ct=[];if(Ye.type==="FeatureCollection")for(let At=0;At<Ye.features.length;At++)Dt(ct,Ye.features[At],tt,At);else Dt(ct,Ye.type==="Feature"?Ye:{geometry:Ye},tt);return ct}(oe,ve);this.tiles={},this.tileCoords=[],p&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ve.indexMaxZoom,ve.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),je=function(Ye,tt){const ct=tt.buffer/tt.extent;let At=Ye;const Gt=_t(Ye,1,-1-ct,ct,0,-1,2,tt),$t=_t(Ye,1,1-ct,2+ct,0,-1,2,tt);return(Gt||$t)&&(At=_t(Ye,1,-ct,1+ct,0,-1,2,tt)||[],Gt&&(At=ir(Gt,1).concat(At)),$t&&(At=At.concat(ir($t,-1)))),At}(je,ve),je.length&&this.splitTile(je,0,0,0),p&&(je.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(oe,ve,p,je,Ye,tt,ct){const At=[oe,ve,p,je],Gt=this.options,$t=Gt.debug;for(;At.length;){je=At.pop(),p=At.pop(),ve=At.pop(),oe=At.pop();const jt=1<<ve,xt=pe(ve,p,je);let Rn=this.tiles[xt];if(!Rn&&($t>1&&console.time("creation"),Rn=this.tiles[xt]=wr(oe,ve,p,je,Gt),this.tileCoords.push({z:ve,x:p,y:je}),$t)){$t>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ve,p,je,Rn.numFeatures,Rn.numPoints,Rn.numSimplified),console.timeEnd("creation"));const co=`z${ve}`;this.stats[co]=(this.stats[co]||0)+1,this.total++}if(Rn.source=oe,Ye==null){if(ve===Gt.indexMaxZoom||Rn.numPoints<=Gt.indexMaxPoints)continue}else{if(ve===Gt.maxZoom||ve===Ye)continue;if(Ye!=null){const co=Ye-ve;if(p!==tt>>co||je!==ct>>co)continue}}if(Rn.source=null,oe.length===0)continue;$t>1&&console.time("clipping");const Bn=.5*Gt.buffer/Gt.extent,fr=.5-Bn,Sr=.5+Bn,on=1+Bn;let Nn=null,Fn=null,Or=null,Er=null,Dr=_t(oe,jt,p-Bn,p+Sr,0,Rn.minX,Rn.maxX,Gt),ur=_t(oe,jt,p+fr,p+on,0,Rn.minX,Rn.maxX,Gt);oe=null,Dr&&(Nn=_t(Dr,jt,je-Bn,je+Sr,1,Rn.minY,Rn.maxY,Gt),Fn=_t(Dr,jt,je+fr,je+on,1,Rn.minY,Rn.maxY,Gt),Dr=null),ur&&(Or=_t(ur,jt,je-Bn,je+Sr,1,Rn.minY,Rn.maxY,Gt),Er=_t(ur,jt,je+fr,je+on,1,Rn.minY,Rn.maxY,Gt),ur=null),$t>1&&console.timeEnd("clipping"),At.push(Nn||[],ve+1,2*p,2*je),At.push(Fn||[],ve+1,2*p,2*je+1),At.push(Or||[],ve+1,2*p+1,2*je),At.push(Er||[],ve+1,2*p+1,2*je+1)}}getTile(oe,ve,p){oe=+oe,ve=+ve,p=+p;const je=this.options,{extent:Ye,debug:tt}=je;if(oe<0||oe>24)return null;const ct=1<<oe,At=pe(oe,ve=ve+ct&ct-1,p);if(this.tiles[At])return fn(this.tiles[At],Ye);tt>1&&console.log("drilling down to z%d-%d-%d",oe,ve,p);let Gt,$t=oe,jt=ve,xt=p;for(;!Gt&&$t>0;)$t--,jt>>=1,xt>>=1,Gt=this.tiles[pe($t,jt,xt)];return Gt&&Gt.source?(tt>1&&(console.log("found parent tile z%d-%d-%d",$t,jt,xt),console.time("drilling down")),this.splitTile(Gt.source,$t,jt,xt,oe,ve,p),tt>1&&console.timeEnd("drilling down"),this.tiles[At]?fn(this.tiles[At],Ye):null):null}}function pe(Be,oe,ve){return 32*((1<<Be)*ve+oe)+Be}function et(Be,oe){return oe?Be.properties[oe]:Be.id}function St(Be,oe){if(Be==null)return!0;if(Be.type==="Feature")return et(Be,oe)!=null;if(Be.type==="FeatureCollection"){const ve=new Set;for(const p of Be.features){const je=et(p,oe);if(je==null||ve.has(je))return!1;ve.add(je)}return!0}return!1}function Yt(Be,oe){const ve=new Map;if(Be!=null)if(Be.type==="Feature")ve.set(et(Be,oe),Be);else for(const p of Be.features)ve.set(et(p,oe),p);return ve}class rn extends E{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(oe,ve){return a._(this,void 0,void 0,function*(){const p=oe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const je=this._geoJSONIndex.getTile(p.z,p.x,p.y);if(!je)return null;const Ye=new re(je.features);let tt=he(Ye);return tt.byteOffset===0&&tt.byteLength===tt.buffer.byteLength||(tt=new Uint8Array(tt)),{vectorTile:Ye,rawData:tt.buffer}})}loadData(oe){return a._(this,void 0,void 0,function*(){var ve;(ve=this._pendingRequest)===null||ve===void 0||ve.abort();const p=!!(oe&&oe.request&&oe.request.collectResourceTiming)&&new a.cu(oe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(oe,this._pendingRequest),this._geoJSONIndex=oe.cluster?new at(function({superclusterOptions:tt,clusterProperties:ct}){if(!ct||!tt)return tt;const At={},Gt={},$t={accumulated:null,zoom:0},jt={properties:null},xt=Object.keys(ct);for(const Rn of xt){const[Bn,fr]=ct[Rn],Sr=a.cB(fr),on=a.cB(typeof Bn=="string"?[Bn,["accumulated"],["get",Rn]]:Bn);At[Rn]=Sr.value,Gt[Rn]=on.value}return tt.map=Rn=>{jt.properties=Rn;const Bn={};for(const fr of xt)Bn[fr]=At[fr].evaluate($t,jt);return Bn},tt.reduce=(Rn,Bn)=>{jt.properties=Bn;for(const fr of xt)$t.accumulated=Rn[fr],Rn[fr]=Gt[fr].evaluate($t,jt)},tt}(oe)).load((yield this._pendingData).features):(je=yield this._pendingData,new Ae(je,oe.geojsonVtOptions)),this.loaded={};const Ye={};if(p){const tt=p.finish();tt&&(Ye.resourceTiming={},Ye.resourceTiming[oe.source]=JSON.parse(JSON.stringify(tt)))}return Ye}catch(Ye){if(delete this._pendingRequest,a.cf(Ye))return{abandoned:!0};throw Ye}var je})}getData(){return a._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(oe){const ve=this.loaded;return ve&&ve[oe.uid]?super.reloadTile(oe):this.loadTile(oe)}loadAndProcessGeoJSON(oe,ve){return a._(this,void 0,void 0,function*(){let p=yield this.loadGeoJSON(oe,ve);if(delete this._pendingRequest,typeof p!="object")throw new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`);if(z(p,!0),oe.filter){const je=a.cB(oe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(je.result==="error")throw new Error(je.value.map(tt=>`${tt.key}: ${tt.message}`).join(", "));p={type:"FeatureCollection",features:p.features.filter(tt=>je.value.evaluate({zoom:0},tt))}}return p})}loadGeoJSON(oe,ve){return a._(this,void 0,void 0,function*(){const{promoteId:p}=oe;if(oe.request){const je=yield a.h(oe.request,ve);return this._dataUpdateable=St(je.data,p)?Yt(je.data,p):void 0,je.data}if(typeof oe.data=="string")try{const je=JSON.parse(oe.data);return this._dataUpdateable=St(je,p)?Yt(je,p):void 0,je}catch{throw new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`)}if(!oe.dataDiff)throw new Error(`Input data given to '${oe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${oe.source}`);return function(je,Ye,tt){var ct,At,Gt,$t;if(Ye.removeAll&&je.clear(),Ye.remove)for(const jt of Ye.remove)je.delete(jt);if(Ye.add)for(const jt of Ye.add){const xt=et(jt,tt);xt!=null&&je.set(xt,jt)}if(Ye.update)for(const jt of Ye.update){let xt=je.get(jt.id);if(xt==null)continue;const Rn=!jt.removeAllProperties&&(((ct=jt.removeProperties)===null||ct===void 0?void 0:ct.length)>0||((At=jt.addOrUpdateProperties)===null||At===void 0?void 0:At.length)>0);if((jt.newGeometry||jt.removeAllProperties||Rn)&&(xt=Object.assign({},xt),je.set(jt.id,xt),Rn&&(xt.properties=Object.assign({},xt.properties))),jt.newGeometry&&(xt.geometry=jt.newGeometry),jt.removeAllProperties)xt.properties={};else if(((Gt=jt.removeProperties)===null||Gt===void 0?void 0:Gt.length)>0)for(const Bn of jt.removeProperties)Object.prototype.hasOwnProperty.call(xt.properties,Bn)&&delete xt.properties[Bn];if((($t=jt.addOrUpdateProperties)===null||$t===void 0?void 0:$t.length)>0)for(const{key:Bn,value:fr}of jt.addOrUpdateProperties)xt.properties[Bn]=fr}}(this._dataUpdateable,oe.dataDiff,p),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(oe){return a._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(oe){return this._geoJSONIndex.getClusterExpansionZoom(oe.clusterId)}getClusterChildren(oe){return this._geoJSONIndex.getChildren(oe.clusterId)}getClusterLeaves(oe){return this._geoJSONIndex.getLeaves(oe.clusterId,oe.limit,oe.offset)}}class er{constructor(oe){this.self=oe,this.actor=new a.F(oe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ve,p)=>{if(this.externalWorkerSourceTypes[ve])throw new Error(`Worker source with name "${ve}" already registered.`);this.externalWorkerSourceTypes[ve]=p},this.self.addProtocol=a.ch,this.self.removeProtocol=a.ci,this.self.registerRTLTextPlugin=ve=>{a.cC.setMethods(ve)},this.actor.registerMessageHandler("LDT",(ve,p)=>this._getDEMWorkerSource(ve,p.source).loadTile(p)),this.actor.registerMessageHandler("RDT",(ve,p)=>a._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ve,p.source).removeTile(p)})),this.actor.registerMessageHandler("GCEZ",(ve,p)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(ve,p.type,p.source).getClusterExpansionZoom(p)})),this.actor.registerMessageHandler("GCC",(ve,p)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(ve,p.type,p.source).getClusterChildren(p)})),this.actor.registerMessageHandler("GCL",(ve,p)=>a._(this,void 0,void 0,function*(){return this._getWorkerSource(ve,p.type,p.source).getClusterLeaves(p)})),this.actor.registerMessageHandler("LD",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).loadData(p)),this.actor.registerMessageHandler("GD",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).getData()),this.actor.registerMessageHandler("LT",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).loadTile(p)),this.actor.registerMessageHandler("RT",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).reloadTile(p)),this.actor.registerMessageHandler("AT",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).abortTile(p)),this.actor.registerMessageHandler("RMT",(ve,p)=>this._getWorkerSource(ve,p.type,p.source).removeTile(p)),this.actor.registerMessageHandler("RS",(ve,p)=>a._(this,void 0,void 0,function*(){if(!this.workerSources[ve]||!this.workerSources[ve][p.type]||!this.workerSources[ve][p.type][p.source])return;const je=this.workerSources[ve][p.type][p.source];delete this.workerSources[ve][p.type][p.source],je.removeSource!==void 0&&je.removeSource(p)})),this.actor.registerMessageHandler("RM",ve=>a._(this,void 0,void 0,function*(){delete this.layerIndexes[ve],delete this.availableImages[ve],delete this.workerSources[ve],delete this.demWorkerSources[ve]})),this.actor.registerMessageHandler("SR",(ve,p)=>a._(this,void 0,void 0,function*(){this.referrer=p})),this.actor.registerMessageHandler("SRPS",(ve,p)=>this._syncRTLPluginState(ve,p)),this.actor.registerMessageHandler("IS",(ve,p)=>a._(this,void 0,void 0,function*(){this.self.importScripts(p)})),this.actor.registerMessageHandler("SI",(ve,p)=>this._setImages(ve,p)),this.actor.registerMessageHandler("UL",(ve,p)=>a._(this,void 0,void 0,function*(){this._getLayerIndex(ve).update(p.layers,p.removedIds)})),this.actor.registerMessageHandler("SL",(ve,p)=>a._(this,void 0,void 0,function*(){this._getLayerIndex(ve).replace(p)}))}_setImages(oe,ve){return a._(this,void 0,void 0,function*(){this.availableImages[oe]=ve;for(const p in this.workerSources[oe]){const je=this.workerSources[oe][p];for(const Ye in je)je[Ye].availableImages=ve}})}_syncRTLPluginState(oe,ve){return a._(this,void 0,void 0,function*(){return yield a.cC.syncState(ve,this.self.importScripts)})}_getAvailableImages(oe){let ve=this.availableImages[oe];return ve||(ve=[]),ve}_getLayerIndex(oe){let ve=this.layerIndexes[oe];return ve||(ve=this.layerIndexes[oe]=new o),ve}_getWorkerSource(oe,ve,p){if(this.workerSources[oe]||(this.workerSources[oe]={}),this.workerSources[oe][ve]||(this.workerSources[oe][ve]={}),!this.workerSources[oe][ve][p]){const je={sendAsync:(Ye,tt)=>(Ye.targetMapId=oe,this.actor.sendAsync(Ye,tt))};switch(ve){case"vector":this.workerSources[oe][ve][p]=new E(je,this._getLayerIndex(oe),this._getAvailableImages(oe));break;case"geojson":this.workerSources[oe][ve][p]=new rn(je,this._getLayerIndex(oe),this._getAvailableImages(oe));break;default:this.workerSources[oe][ve][p]=new this.externalWorkerSourceTypes[ve](je,this._getLayerIndex(oe),this._getAvailableImages(oe))}}return this.workerSources[oe][ve][p]}_getDEMWorkerSource(oe,ve){return this.demWorkerSources[oe]||(this.demWorkerSources[oe]={}),this.demWorkerSources[oe][ve]||(this.demWorkerSources[oe][ve]=new S),this.demWorkerSources[oe][ve]}}return a.i(self)&&(self.worker=new er(self)),er}),i("index",["exports","./shared"],function(a,o){var d="5.0.1";function g(){var T=new o.A(4);return o.A!=Float32Array&&(T[1]=0,T[2]=0),T[0]=1,T[3]=1,T}let b,E;const S={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:T=>new Promise((l,c)=>{const _=requestAnimationFrame(l);T.signal.addEventListener("abort",()=>{cancelAnimationFrame(_),c(o.c())})}),getImageData(T,l=0){return this.getImageCanvasContext(T).getImageData(-l,-l,T.width+2*l,T.height+2*l)},getImageCanvasContext(T){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=T.width,l.height=T.height,c.drawImage(T,0,0,T.width,T.height),c},resolveURL:T=>(b||(b=document.createElement("a")),b.href=T,b.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(E==null&&(E=matchMedia("(prefers-reduced-motion: reduce)")),E.matches)}};class O{static testProp(l){if(!O.docStyle)return l[0];for(let c=0;c<l.length;c++)if(l[c]in O.docStyle)return l[c];return l[0]}static create(l,c,_){const M=window.document.createElement(l);return c!==void 0&&(M.className=c),_&&_.appendChild(M),M}static createNS(l,c){return window.document.createElementNS(l,c)}static disableDrag(){O.docStyle&&O.selectProp&&(O.userSelect=O.docStyle[O.selectProp],O.docStyle[O.selectProp]="none")}static enableDrag(){O.docStyle&&O.selectProp&&(O.docStyle[O.selectProp]=O.userSelect)}static setTransform(l,c){l.style[O.transformProp]=c}static addEventListener(l,c,_,M={}){l.addEventListener(c,_,"passive"in M?M:M.capture)}static removeEventListener(l,c,_,M={}){l.removeEventListener(c,_,"passive"in M?M:M.capture)}static suppressClickInternal(l){l.preventDefault(),l.stopPropagation(),window.removeEventListener("click",O.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",O.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",O.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,_){const M=c.boundingClientRect;return new o.P((_.clientX-M.left)/c.x-l.clientLeft,(_.clientY-M.top)/c.y-l.clientTop)}static mousePos(l,c){const _=O.getScale(l);return O.getPoint(l,_,c)}static touchPos(l,c){const _=[],M=O.getScale(l);for(let R=0;R<c.length;R++)_.push(O.getPoint(l,M,c[R]));return _}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.querySelectorAll("script");for(const M of _)M.remove();return O.clean(c),c.innerHTML}static isPossiblyDangerous(l,c){const _=c.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(l)||!_.includes("javascript:")&&!_.includes("data:"))||!!l.startsWith("on")||void 0}static clean(l){const c=l.children;for(const _ of c)O.removeAttributes(_),O.clean(_)}static removeAttributes(l){for(const{name:c,value:_}of l.attributes)O.isPossiblyDangerous(c,_)&&l.removeAttribute(c)}}O.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,O.selectProp=O.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),O.transformProp=O.testProp(["transform","WebkitTransform"]);const k={supported:!1,testSupport:function(T){!q&&z&&(Q?re(T):U=T)}};let U,z,q=!1,Q=!1;function re(T){const l=T.createTexture();T.bindTexture(T.TEXTURE_2D,l);try{if(T.texImage2D(T.TEXTURE_2D,0,T.RGBA,T.RGBA,T.UNSIGNED_BYTE,z),T.isContextLost())return;k.supported=!0}catch{}T.deleteTexture(l),q=!0}var X;typeof document<"u"&&(z=document.createElement("img"),z.onload=()=>{U&&re(U),U=null,Q=!0},z.onerror=()=>{q=!0,U=null},z.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(T){let l,c,_,M;T.resetRequestQueue=()=>{l=[],c=0,_=0,M={}},T.addThrottleControl=te=>{const se=_++;return M[se]=te,se},T.removeThrottleControl=te=>{delete M[te],j()},T.getImage=(te,se,we=!0)=>new Promise((Ie,Re)=>{k.supported&&(te.headers||(te.headers={}),te.headers.accept="image/webp,*/*"),o.e(te,{type:"image"}),l.push({abortController:se,requestParameters:te,supportImageRefresh:we,state:"queued",onError:$e=>{Re($e)},onSuccess:$e=>{Ie($e)}}),j()});const R=te=>o._(this,void 0,void 0,function*(){te.state="running";const{requestParameters:se,supportImageRefresh:we,onError:Ie,onSuccess:Re,abortController:$e}=te,Ze=we===!1&&!o.i(self)&&!o.g(se.url)&&(!se.headers||Object.keys(se.headers).reduce((pt,vt)=>pt&&vt==="accept",!0));c++;const ft=Ze?$(se,$e):o.m(se,$e);try{const pt=yield ft;delete te.abortController,te.state="completed",pt.data instanceof HTMLImageElement||o.b(pt.data)?Re(pt):pt.data&&Re({data:yield(lt=pt.data,typeof createImageBitmap=="function"?o.d(lt):o.f(lt)),cacheControl:pt.cacheControl,expires:pt.expires})}catch(pt){delete te.abortController,Ie(pt)}finally{c--,j()}var lt}),j=()=>{const te=(()=>{for(const se of Object.keys(M))if(M[se]())return!0;return!1})()?o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:o.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let se=c;se<te&&l.length>0;se++){const we=l.shift();we.abortController.signal.aborted?se--:R(we)}},$=(te,se)=>new Promise((we,Ie)=>{const Re=new Image,$e=te.url,Ze=te.credentials;Ze&&Ze==="include"?Re.crossOrigin="use-credentials":(Ze&&Ze==="same-origin"||!o.s($e))&&(Re.crossOrigin="anonymous"),se.signal.addEventListener("abort",()=>{Re.src="",Ie(o.c())}),Re.fetchPriority="high",Re.onload=()=>{Re.onerror=Re.onload=null,we({data:Re})},Re.onerror=()=>{Re.onerror=Re.onload=null,se.signal.aborted||Ie(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."))},Re.src=$e})}(X||(X={})),X.resetRequestQueue();class Y{constructor(l){this._transformRequestFn=l}transformRequest(l,c){return this._transformRequestFn&&this._transformRequestFn(l,c)||{url:l}}setTransformRequest(l){this._transformRequestFn=l}}function ee(T){const l=[];if(typeof T=="string")l.push({id:"default",url:T});else if(T&&T.length>0){const c=[];for(const{id:_,url:M}of T){const R=`${_}${M}`;c.indexOf(R)===-1&&(c.push(R),l.push({id:_,url:M}))}}return l}function N(T,l,c){try{const _=new URL(T);return _.pathname+=`${l}${c}`,_.toString()}catch{throw new Error(`Invalid sprite URL "${T}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class ie{constructor(l,c,_,M){this.context=l,this.format=_,this.texture=l.gl.createTexture(),this.update(c,M)}update(l,c,_){const{width:M,height:R}=l,j=!(this.size&&this.size[0]===M&&this.size[1]===R||_),{context:$}=this,{gl:te}=$;if(this.useMipmap=!!(c&&c.useMipmap),te.bindTexture(te.TEXTURE_2D,this.texture),$.pixelStoreUnpackFlipY.set(!1),$.pixelStoreUnpack.set(1),$.pixelStoreUnpackPremultiplyAlpha.set(this.format===te.RGBA&&(!c||c.premultiply!==!1)),j)this.size=[M,R],l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||o.b(l)?te.texImage2D(te.TEXTURE_2D,0,this.format,this.format,te.UNSIGNED_BYTE,l):te.texImage2D(te.TEXTURE_2D,0,this.format,M,R,0,this.format,te.UNSIGNED_BYTE,l.data);else{const{x:se,y:we}=_||{x:0,y:0};l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||o.b(l)?te.texSubImage2D(te.TEXTURE_2D,0,se,we,te.RGBA,te.UNSIGNED_BYTE,l):te.texSubImage2D(te.TEXTURE_2D,0,se,we,M,R,te.RGBA,te.UNSIGNED_BYTE,l.data)}this.useMipmap&&this.isSizePowerOfTwo()&&te.generateMipmap(te.TEXTURE_2D)}bind(l,c,_){const{context:M}=this,{gl:R}=M;R.bindTexture(R.TEXTURE_2D,this.texture),_!==R.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(_=R.LINEAR),l!==this.filter&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,l),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,_||l),this.filter=l),c!==this.wrap&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,c),R.texParameteri(R.TEXTURE_2D,R.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 he(T){const{userImage:l}=T;return!!(l&&l.render&&l.render())&&(T.data.replace(new Uint8Array(l.data.buffer)),!0)}class de extends o.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.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:_}of this.requestors)_(this._getImagesForIds(c));this.requestors=[]}}getImage(l){const c=this.images[l];if(c&&!c.data&&c.spriteData){const _=c.spriteData;c.data=new o.R({width:_.width,height:_.height},_.context.getImageData(_.x,_.y,_.width,_.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 _=!0;const M=c.data||c.spriteData;return this._validateStretch(c.stretchX,M&&M.width)||(this.fire(new o.j(new Error(`Image "${l}" has invalid "stretchX" value`))),_=!1),this._validateStretch(c.stretchY,M&&M.height)||(this.fire(new o.j(new Error(`Image "${l}" has invalid "stretchY" value`))),_=!1),this._validateContent(c.content,c)||(this.fire(new o.j(new Error(`Image "${l}" has invalid "content" value`))),_=!1),_}_validateStretch(l,c){if(!l)return!0;let _=0;for(const M of l){if(M[0]<_||M[1]<M[0]||c<M[1])return!1;_=M[1]}return!0}_validateContent(l,c){if(!l)return!0;if(l.length!==4)return!1;const _=c.spriteData,M=_&&_.width||c.data.width,R=_&&_.height||c.data.height;return!(l[0]<0||M<l[0]||l[1]<0||R<l[1]||l[2]<0||M<l[2]||l[3]<0||R<l[3]||l[2]<l[0]||l[3]<l[1])}updateImage(l,c,_=!0){const M=this.getImage(l);if(_&&(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,_)=>{let M=!0;if(!this.isLoaded())for(const R of l)this.images[R]||(M=!1);this.isLoaded()||M?c(this._getImagesForIds(l)):this.requestors.push({ids:l,promiseResolve:c})})}_getImagesForIds(l){const c={};for(const _ of l){let M=this.getImage(_);M||(this.fire(new o.k("styleimagemissing",{id:_})),M=this.getImage(_)),M?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)}:o.w(`Image "${_}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return c}getPixelSize(){const{width:l,height:c}=this.atlasImage;return{width:l,height:c}}getPattern(l){const c=this.patterns[l],_=this.getImage(l);if(!_)return null;if(c&&c.position.version===_.version)return c.position;if(c)c.position.version=_.version;else{const M={w:_.data.width+2,h:_.data.height+2,x:0,y:0},R=new o.I(M,_);this.patterns[l]={bin:M,position:R}}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 ie(l,this.atlasImage,c.RGBA),this.atlasTexture.bind(c.LINEAR,c.CLAMP_TO_EDGE)}_updatePatternAtlas(){const l=[];for(const R in this.patterns)l.push(this.patterns[R].bin);const{w:c,h:_}=o.p(l),M=this.atlasImage;M.resize({width:c||1,height:_||1});for(const R in this.patterns){const{bin:j}=this.patterns[R],$=j.x+1,te=j.y+1,se=this.getImage(R).data,we=se.width,Ie=se.height;o.R.copy(se,M,{x:0,y:0},{x:$,y:te},{width:we,height:Ie}),o.R.copy(se,M,{x:0,y:Ie-1},{x:$,y:te-1},{width:we,height:1}),o.R.copy(se,M,{x:0,y:0},{x:$,y:te+Ie},{width:we,height:1}),o.R.copy(se,M,{x:we-1,y:0},{x:$-1,y:te},{width:1,height:Ie}),o.R.copy(se,M,{x:0,y:0},{x:$+we,y:te},{width:1,height:Ie})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(l){for(const c of l){if(this.callbackDispatchedThisFrame[c])continue;this.callbackDispatchedThisFrame[c]=!0;const _=this.getImage(c);_||o.w(`Image with ID: "${c}" was not found`),he(_)&&this.updateImage(c,_)}}}const Me=1e20;function fe(T,l,c,_,M,R,j,$,te){for(let se=l;se<l+_;se++)xe(T,c*R+se,R,M,j,$,te);for(let se=c;se<c+M;se++)xe(T,se*R+l,1,_,j,$,te)}function xe(T,l,c,_,M,R,j){R[0]=0,j[0]=-1e20,j[1]=Me,M[0]=T[l];for(let $=1,te=0,se=0;$<_;$++){M[$]=T[l+$*c];const we=$*$;do{const Ie=R[te];se=(M[$]-M[Ie]+we-Ie*Ie)/($-Ie)/2}while(se<=j[te]&&--te>-1);te++,R[te]=$,j[te]=se,j[te+1]=Me}for(let $=0,te=0;$<_;$++){for(;j[te+1]<$;)te++;const se=R[te],we=$-se;T[l+$*c]=M[se]+we*we}}class De{constructor(l,c){this.requestManager=l,this.localIdeographFontFamily=c,this.entries={}}setURL(l){this.url=l}getGlyphs(l){return o._(this,void 0,void 0,function*(){const c=[];for(const R in l)for(const j of l[R])c.push(this._getAndCacheGlyphsPromise(R,j));const _=yield Promise.all(c),M={};for(const{stack:R,id:j,glyph:$}of _)M[R]||(M[R]={}),M[R][j]=$&&{id:$.id,bitmap:$.bitmap.clone(),metrics:$.metrics};return M})}_getAndCacheGlyphsPromise(l,c){return o._(this,void 0,void 0,function*(){let _=this.entries[l];_||(_=this.entries[l]={glyphs:{},requests:{},ranges:{}});let M=_.glyphs[c];if(M!==void 0)return{stack:l,id:c,glyph:M};if(M=this._tinySDF(_,l,c),M)return _.glyphs[c]=M,{stack:l,id:c,glyph:M};const R=Math.floor(c/256);if(256*R>65535)throw new Error("glyphs > 65535 not supported");if(_.ranges[R])return{stack:l,id:c,glyph:M};if(!this.url)throw new Error("glyphsUrl is not set");if(!_.requests[R]){const $=De.loadGlyphRange(l,R,this.url,this.requestManager);_.requests[R]=$}const j=yield _.requests[R];for(const $ in j)this._doesCharSupportLocalGlyph(+$)||(_.glyphs[+$]=j[+$]);return _.ranges[R]=!0,{stack:l,id:c,glyph:j[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,_){const M=this.localIdeographFontFamily;if(!M||!this._doesCharSupportLocalGlyph(_))return;let R=l.tinySDF;if(!R){let $="400";/bold/i.test(c)?$="900":/medium/i.test(c)?$="500":/light/i.test(c)&&($="200"),R=l.tinySDF=new De.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:M,fontWeight:$})}const j=R.draw(String.fromCharCode(_));return{id:_,bitmap:new o.o({width:j.width||60,height:j.height||60},j.data),metrics:{width:j.glyphWidth/2||24,height:j.glyphHeight/2||24,left:j.glyphLeft/2+.5||0,top:j.glyphTop/2-27.5||-8,advance:j.glyphAdvance/2||24,isDoubleResolution:!0}}}}De.loadGlyphRange=function(T,l,c,_){return o._(this,void 0,void 0,function*(){const M=256*l,R=M+255,j=_.transformRequest(c.replace("{fontstack}",T).replace("{range}",`${M}-${R}`),"Glyphs"),$=yield o.l(j,new AbortController);if(!$||!$.data)throw new Error(`Could not load glyph range. range: ${l}, ${M}-${R}`);const te={};for(const se of o.n($.data))te[se.id]=se;return te})},De.TinySDF=class{constructor({fontSize:T=24,buffer:l=3,radius:c=8,cutoff:_=.25,fontFamily:M="sans-serif",fontWeight:R="normal",fontStyle:j="normal"}={}){this.buffer=l,this.cutoff=_,this.radius=c;const $=this.size=T+4*l,te=this._createCanvas($),se=this.ctx=te.getContext("2d",{willReadFrequently:!0});se.font=`${j} ${R} ${T}px ${M}`,se.textBaseline="alphabetic",se.textAlign="left",se.fillStyle="black",this.gridOuter=new Float64Array($*$),this.gridInner=new Float64Array($*$),this.f=new Float64Array($),this.z=new Float64Array($+1),this.v=new Uint16Array($)}_createCanvas(T){const l=document.createElement("canvas");return l.width=l.height=T,l}draw(T){const{width:l,actualBoundingBoxAscent:c,actualBoundingBoxDescent:_,actualBoundingBoxLeft:M,actualBoundingBoxRight:R}=this.ctx.measureText(T),j=Math.ceil(c),$=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(R-M))),te=Math.min(this.size-this.buffer,j+Math.ceil(_)),se=$+2*this.buffer,we=te+2*this.buffer,Ie=Math.max(se*we,0),Re=new Uint8ClampedArray(Ie),$e={data:Re,width:se,height:we,glyphWidth:$,glyphHeight:te,glyphTop:j,glyphLeft:0,glyphAdvance:l};if($===0||te===0)return $e;const{ctx:Ze,buffer:ft,gridInner:lt,gridOuter:pt}=this;Ze.clearRect(ft,ft,$,te),Ze.fillText(T,ft,ft+j);const vt=Ze.getImageData(ft,ft,$,te);pt.fill(Me,0,Ie),lt.fill(0,0,Ie);for(let Bt=0;Bt<te;Bt++)for(let kt=0;kt<$;kt++){const Rt=vt.data[4*(Bt*$+kt)+3]/255;if(Rt===0)continue;const zt=(Bt+ft)*se+kt+ft;if(Rt===1)pt[zt]=0,lt[zt]=Me;else{const Tt=.5-Rt;pt[zt]=Tt>0?Tt*Tt:0,lt[zt]=Tt<0?Tt*Tt:0}}fe(pt,0,0,se,we,se,this.f,this.v,this.z),fe(lt,ft,ft,$,te,se,this.f,this.v,this.z);for(let Bt=0;Bt<Ie;Bt++){const kt=Math.sqrt(pt[Bt])-Math.sqrt(lt[Bt]);Re[Bt]=Math.round(255-255*(kt/this.radius+this.cutoff))}return $e}};class me{constructor(){this.specification=o.v.light.position}possiblyEvaluate(l,c){return o.x(l.expression.evaluate(c))}interpolate(l,c,_){return{x:o.y.number(l.x,c.x,_),y:o.y.number(l.y,c.y,_),z:o.y.number(l.z,c.z,_)}}}let at;class Qe extends o.E{constructor(l){super(),at=at||new o.q({anchor:new o.D(o.v.light.anchor),position:new me,color:new o.D(o.v.light.color),intensity:new o.D(o.v.light.intensity)}),this._transitionable=new o.T(at),this.setLight(l),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,c={}){if(!this._validate(o.r,l,c))for(const _ in l){const M=l[_];_.endsWith("-transition")?this._transitionable.setTransition(_.slice(0,-11),M):this._transitionable.setValue(_,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,_){return(!_||_.validate!==!1)&&o.t(this,l.call(o.u,{value:c,style:{glyphs:!0,sprite:!0},styleSpec:o.v}))}}const He=new o.q({"sky-color":new o.D(o.v.sky["sky-color"]),"horizon-color":new o.D(o.v.sky["horizon-color"]),"fog-color":new o.D(o.v.sky["fog-color"]),"fog-ground-blend":new o.D(o.v.sky["fog-ground-blend"]),"horizon-fog-blend":new o.D(o.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new o.D(o.v.sky["sky-horizon-blend"]),"atmosphere-blend":new o.D(o.v.sky["atmosphere-blend"])});class We extends o.E{constructor(l){super(),this._transitionable=new o.T(He),this.setSky(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.z(0))}setSky(l,c={}){if(!this._validate(o.B,l,c)){l||(l={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const _ in l){const M=l[_];_.endsWith("-transition")?this._transitionable.setTransition(_.slice(0,-11),M):this._transitionable.setValue(_,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,_={}){return(_==null?void 0:_.validate)!==!1&&o.t(this,l.call(o.u,o.e({value:c,style:{glyphs:!0,sprite:!0},styleSpec:o.v})))}calculateFogBlendOpacity(l){return l<60?0:l<70?(l-60)/10:1}}class Ce{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 _=l.join(",")+String(c);return this.dashEntry[_]||(this.dashEntry[_]=this.addDash(l,c)),this.dashEntry[_]}getDashRanges(l,c,_){const M=[];let R=l.length%2==1?-l[l.length-1]*_:0,j=l[0]*_,$=!0;M.push({left:R,right:j,isDash:$,zeroLength:l[0]===0});let te=l[0];for(let se=1;se<l.length;se++){$=!$;const we=l[se];R=te*_,te+=we,j=te*_,M.push({left:R,right:j,isDash:$,zeroLength:we===0})}return M}addRoundDash(l,c,_){const M=c/2;for(let R=-_;R<=_;R++){const j=this.width*(this.nextRow+_+R);let $=0,te=l[$];for(let se=0;se<this.width;se++){se/te.right>1&&(te=l[++$]);const we=Math.abs(se-te.left),Ie=Math.abs(se-te.right),Re=Math.min(we,Ie);let $e;const Ze=R/_*(M+1);if(te.isDash){const ft=M-Math.abs(Ze);$e=Math.sqrt(Re*Re+ft*ft)}else $e=M-Math.sqrt(Re*Re+Ze*Ze);this.data[j+se]=Math.max(0,Math.min(255,$e+128))}}}addRegularDash(l){for(let $=l.length-1;$>=0;--$){const te=l[$],se=l[$+1];te.zeroLength?l.splice($,1):se&&se.isDash===te.isDash&&(se.left=te.left,l.splice($,1))}const c=l[0],_=l[l.length-1];c.isDash===_.isDash&&(c.left=_.left-this.width,_.right=c.right+this.width);const M=this.width*this.nextRow;let R=0,j=l[R];for(let $=0;$<this.width;$++){$/j.right>1&&(j=l[++R]);const te=Math.abs($-j.left),se=Math.abs($-j.right),we=Math.min(te,se);this.data[M+$]=Math.max(0,Math.min(255,(j.isDash?we:-we)+128))}}addDash(l,c){const _=c?7:0,M=2*_+1;if(this.nextRow+M>this.height)return o.w("LineAtlas out of space"),null;let R=0;for(let $=0;$<l.length;$++)R+=l[$];if(R!==0){const $=this.width/R,te=this.getDashRanges(l,this.width,$);c?this.addRoundDash(te,$,_):this.addRegularDash(te)}const j={y:(this.nextRow+_+.5)/this.height,height:2*_/this.height,width:R};return this.nextRow+=M,this.dirty=!0,j}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 Te="maplibre_preloaded_worker_pool";class rt{constructor(){this.active={}}acquire(l){if(!this.workers)for(this.workers=[];this.workers.length<rt.workerCount;)this.workers.push(new Worker(o.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[Te]}numActive(){return Object.keys(this.active).length}}const yt=Math.floor(S.hardwareConcurrency/2);let bt,gt;function Dt(){return bt||(bt=new rt),bt}rt.workerCount=o.C(globalThis)?Math.max(Math.min(yt,3),1):1;class Pt{constructor(l,c){this.workerPool=l,this.actors=[],this.currentActor=0,this.id=c;const _=this.workerPool.acquire(c);for(let M=0;M<_.length;M++){const R=new o.F(_[M],c);R.name=`Worker ${M}`,this.actors.push(R)}if(!this.actors.length)throw new Error("No actors found")}broadcast(l,c){const _=[];for(const M of this.actors)_.push(M.sendAsync({type:l,data:c}));return Promise.all(_)}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 _ of this.actors)_.registerMessageHandler(l,c)}}function Le(){return gt||(gt=new Pt(Dt(),o.G),gt.registerMessageHandler("GR",(T,l,c)=>o.m(l,c))),gt}function Pe(T,l){const c=o.H();return o.J(c,c,[1,1,0]),o.K(c,c,[.5*T.width,.5*T.height,1]),T.calculatePosMatrix?o.L(c,c,T.calculatePosMatrix(l.toUnwrapped())):c}function Ee(T,l,c,_,M,R){var j;const $=function(Ie,Re,$e){if(Ie)for(const Ze of Ie){const ft=Re[Ze];if(ft&&ft.source===$e&&ft.type==="fill-extrusion")return!0}else for(const Ze in Re){const ft=Re[Ze];if(ft.source===$e&&ft.type==="fill-extrusion")return!0}return!1}((j=M==null?void 0:M.layers)!==null&&j!==void 0?j:null,l,T.id),te=R.maxPitchScaleFactor(),se=T.tilesIn(_,te,$);se.sort(nt);const we=[];for(const Ie of se)we.push({wrappedTileID:Ie.tileID.wrapped().key,queryResults:Ie.tile.queryRenderedFeatures(l,c,T._state,Ie.queryGeometry,Ie.cameraQueryGeometry,Ie.scale,M,R,te,Pe(T.transform,Ie.tileID))});return function(Ie,Re){for(const $e in Ie)for(const Ze of Ie[$e])_t(Ze,Re);return Ie}(function(Ie){const Re={},$e={};for(const Ze of Ie){const ft=Ze.queryResults,lt=Ze.wrappedTileID,pt=$e[lt]=$e[lt]||{};for(const vt in ft){const Bt=ft[vt],kt=pt[vt]=pt[vt]||{},Rt=Re[vt]=Re[vt]||[];for(const zt of Bt)kt[zt.featureIndex]||(kt[zt.featureIndex]=!0,Rt.push(zt))}}return Re}(we),T)}function nt(T,l){const c=T.tileID,_=l.tileID;return c.overscaledZ-_.overscaledZ||c.canonical.y-_.canonical.y||c.wrap-_.wrap||c.canonical.x-_.canonical.x}function _t(T,l){const c=T.feature,_=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=_}function ht(T,l,c){return o._(this,void 0,void 0,function*(){let _=T;if(T.url?_=(yield o.h(l.transformRequest(T.url,"Source"),c)).data:yield S.frameAsync(c),!_)return null;const M=o.M(o.e(_,T),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in _&&_.vector_layers&&(M.vectorLayerIds=_.vector_layers.map(R=>R.id)),M})}class Ut{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 o.N?new o.N(l.lng,l.lat):o.N.convert(l),this}setSouthWest(l){return this._sw=l instanceof o.N?new o.N(l.lng,l.lat):o.N.convert(l),this}extend(l){const c=this._sw,_=this._ne;let M,R;if(l instanceof o.N)M=l,R=l;else{if(!(l instanceof Ut))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(Ut.convert(l)):this.extend(o.N.convert(l)):l&&("lng"in l||"lon"in l)&&"lat"in l?this.extend(o.N.convert(l)):this;if(M=l._sw,R=l._ne,!M||!R)return this}return c||_?(c.lng=Math.min(M.lng,c.lng),c.lat=Math.min(M.lat,c.lat),_.lng=Math.max(R.lng,_.lng),_.lat=Math.max(R.lat,_.lat)):(this._sw=new o.N(M.lng,M.lat),this._ne=new o.N(R.lng,R.lat)),this}getCenter(){return new o.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 o.N(this.getWest(),this.getNorth())}getSouthEast(){return new o.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:_}=o.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<=_&&_<=this._ne.lat&&M}static convert(l){return l instanceof Ut?l:l&&new Ut(l)}static fromLngLat(l,c=0){const _=360*c/40075017,M=_/Math.cos(Math.PI/180*l.lat);return new Ut(new o.N(l.lng-M,l.lat-_),new o.N(l.lng+M,l.lat+_))}adjustAntiMeridian(){const l=new o.N(this._sw.lng,this._sw.lat),c=new o.N(this._ne.lng,this._ne.lat);return new Ut(l,l.lng>c.lng?new o.N(c.lng+360,c.lat):c)}}class en{constructor(l,c,_){this.bounds=Ut.convert(this.validateBounds(l)),this.minzoom=c||0,this.maxzoom=_||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),_=Math.floor(o.O(this.bounds.getWest())*c),M=Math.floor(o.Q(this.bounds.getNorth())*c),R=Math.ceil(o.O(this.bounds.getEast())*c),j=Math.ceil(o.Q(this.bounds.getSouth())*c);return l.x>=_&&l.x<R&&l.y>=M&&l.y<j}}class Ft extends o.E{constructor(l,c,_,M){if(super(),this.id=l,this.dispatcher=_,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.e(this,o.M(c,["url","scheme","tileSize","promoteId"])),this._options=o.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 o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const l=yield ht(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),l&&(o.e(this,l),l.bounds&&(this.tileBounds=new en(l.bounds,this.minzoom,this.maxzoom)),this.fire(new o.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.k("data",{dataType:"source",sourceDataType:"content"})))}catch(l){this._tileJSONRequest=null,this.fire(new o.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 o.e({},this._options)}loadTile(l){return o._(this,void 0,void 0,function*(){const c=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),_={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};_.request.collectResourceTiming=this._collectResourceTiming;let M="RT";if(l.actor&&l.state!=="expired"){if(l.state==="loading")return new Promise((R,j)=>{l.reloadPromise={resolve:R,reject:j}})}else l.actor=this.dispatcher.getActor(),M="LT";l.abortController=new AbortController;try{const R=yield l.actor.sendAsync({type:M,data:_},l.abortController);if(delete l.abortController,l.aborted)return;this._afterTileLoadWorkerResponse(l,R)}catch(R){if(delete l.abortController,l.aborted)return;if(R&&R.status!==404)throw R;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 _=l.reloadPromise;l.reloadPromise=null,this.loadTile(l).then(_.resolve).catch(_.reject)}}abortTile(l){return o._(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 o._(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 mn extends o.E{constructor(l,c,_,M){super(),this.id=l,this.dispatcher=_,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=o.e({type:"raster"},c),o.e(this,o.M(c,["url","scheme","tileSize"]))}load(){return o._(this,arguments,void 0,function*(l=!1){this._loaded=!1,this.fire(new o.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const c=yield ht(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,c&&(o.e(this,c),c.bounds&&(this.tileBounds=new en(c.bounds,this.minzoom,this.maxzoom)),this.fire(new o.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.k("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:l})))}catch(c){this._tileJSONRequest=null,this.fire(new o.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 o.e({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l){return o._(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 _=yield X.getImage(this.map._requestManager.transformRequest(c,"Tile"),l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(_&&_.data){this.map._refreshExpiredTiles&&_.cacheControl&&_.expires&&l.setExpiryData({cacheControl:_.cacheControl,expires:_.expires});const M=this.map.painter.context,R=M.gl,j=_.data;l.texture=this.map.painter.getTileTexture(j.width),l.texture?l.texture.update(j,{useMipmap:!0}):(l.texture=new ie(M,j,R.RGBA,{useMipmap:!0}),l.texture.bind(R.LINEAR,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST)),l.state="loaded"}}catch(_){if(delete l.abortController,l.aborted)l.state="unloaded";else if(_)throw l.state="errored",_}})}abortTile(l){return o._(this,void 0,void 0,function*(){l.abortController&&(l.abortController.abort(),delete l.abortController)})}unloadTile(l){return o._(this,void 0,void 0,function*(){l.texture&&this.map.painter.saveTileTexture(l.texture)})}hasTransition(){return!1}}class jn extends mn{constructor(l,c,_,M){super(l,c,_,M),this.type="raster-dem",this.maxzoom=22,this._options=o.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 o._(this,void 0,void 0,function*(){const c=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),_=this.map._requestManager.transformRequest(c,"Tile");l.neighboringTiles=this._getNeighboringTiles(l.tileID),l.abortController=new AbortController;try{const M=yield X.getImage(_,l.abortController,this.map._refreshExpiredTiles);if(delete l.abortController,l.aborted)return void(l.state="unloaded");if(M&&M.data){const R=M.data;this.map._refreshExpiredTiles&&M.cacheControl&&M.expires&&l.setExpiryData({cacheControl:M.cacheControl,expires:M.expires});const j=o.b(R)&&o.U()?R:yield this.readImageNow(R),$={type:this.type,uid:l.uid,source:this.id,rawImageData:j,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 te=yield l.actor.sendAsync({type:"LDT",data:$});l.dem=te,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 o._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&o.V()){const c=l.width+2,_=l.height+2;try{return new o.R({width:c,height:_},yield o.W(l,-1,-1,c,_))}catch{}}return S.getImageData(l,1)})}_getNeighboringTiles(l){const c=l.canonical,_=Math.pow(2,c.z),M=(c.x-1+_)%_,R=c.x===0?l.wrap-1:l.wrap,j=(c.x+1+_)%_,$=c.x+1===_?l.wrap+1:l.wrap,te={};return te[new o.S(l.overscaledZ,R,c.z,M,c.y).key]={backfilled:!1},te[new o.S(l.overscaledZ,$,c.z,j,c.y).key]={backfilled:!1},c.y>0&&(te[new o.S(l.overscaledZ,R,c.z,M,c.y-1).key]={backfilled:!1},te[new o.S(l.overscaledZ,l.wrap,c.z,c.x,c.y-1).key]={backfilled:!1},te[new o.S(l.overscaledZ,$,c.z,j,c.y-1).key]={backfilled:!1}),c.y+1<_&&(te[new o.S(l.overscaledZ,R,c.z,M,c.y+1).key]={backfilled:!1},te[new o.S(l.overscaledZ,l.wrap,c.z,c.x,c.y+1).key]={backfilled:!1},te[new o.S(l.overscaledZ,$,c.z,j,c.y+1).key]={backfilled:!1}),te}unloadTile(l){return o._(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 nn extends o.E{constructor(l,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=_.getActor(),this.setEventedParent(M),this._data=c.data,this._options=o.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&&o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${c.clusterMaxZoom}".`),this.workerOptions=o.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:o.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:o.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*(o.X/this.tileSize)}load(){return o._(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 o._(this,void 0,void 0,function*(){const l=o.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,_){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:l,limit:c,offset:_}})}_updateWorkerData(l){return o._(this,void 0,void 0,function*(){const c=o.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 o.k("dataloading",{dataType:"source"}));try{const _=yield this.actor.sendAsync({type:"LD",data:c});if(this._pendingLoads--,this._removed||_.abandoned)return void this.fire(new o.k("dataabort",{dataType:"source"}));let M=null;_.resourceTiming&&_.resourceTiming[this.id]&&(M=_.resourceTiming[this.id].slice(0));const R={dataType:"source"};this._collectResourceTiming&&M&&M.length>0&&o.e(R,{resourceTiming:M}),this.fire(new o.k("data",Object.assign(Object.assign({},R),{sourceDataType:"metadata"}))),this.fire(new o.k("data",Object.assign(Object.assign({},R),{sourceDataType:"content"})))}catch(_){if(this._pendingLoads--,this._removed)return void this.fire(new o.k("dataabort",{dataType:"source"}));this.fire(new o.j(_))}})}loaded(){return this._pendingLoads===0}loadTile(l){return o._(this,void 0,void 0,function*(){const c=l.actor?"RT":"LT";l.actor=this.actor;const _={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:_},l.abortController);delete l.abortController,l.unloadVectorData(),l.aborted||l.loadVectorData(M,this.map.painter,c==="RT")})}abortTile(l){return o._(this,void 0,void 0,function*(){l.abortController&&(l.abortController.abort(),delete l.abortController),l.aborted=!0})}unloadTile(l){return o._(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 o.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class ir extends o.E{constructor(l,c,_,M){super(),this.flippedWindingOrder=!1,this.id=l,this.dispatcher=_,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 o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const c=yield X.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 o.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 o.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(o.Y.fromLngLat);var _;return this.tileID=function(M){let R=1/0,j=1/0,$=-1/0,te=-1/0;for(const Re of M)R=Math.min(R,Re.x),j=Math.min(j,Re.y),$=Math.max($,Re.x),te=Math.max(te,Re.y);const se=Math.max($-R,te-j),we=Math.max(0,Math.floor(-Math.log(se)/Math.LN2)),Ie=Math.pow(2,we);return new o.Z(we,Math.floor((R+$)/2*Ie),Math.floor((j+te)/2*Ie))}(c),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=c.map(M=>this.tileID.getTilePoint(M)._round()),this.flippedWindingOrder=((_=this.tileCoords)[1].x-_[0].x)*(_[2].y-_[0].y)-(_[1].y-_[0].y)*(_[2].x-_[0].x)<0,this.fire(new o.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 ie(l,this.image,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE));let _=!1;for(const M in this.tiles){const R=this.tiles[M];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture,_=!0)}_&&this.fire(new o.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(l){return o._(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 Dn extends ir{constructor(l,c,_,M){super(l,c,_,M),this.roundZoom=!0,this.type="video",this.options=c}load(){return o._(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 o.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 o.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 o.j(new o.$(`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 ie(l,this.video,c.RGBA),this.texture.bind(c.LINEAR,c.CLAMP_TO_EDGE));let _=!1;for(const M in this.tiles){const R=this.tiles[M];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture,_=!0)}_&&this.fire(new o.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 fn extends ir{constructor(l,c,_,M){super(l,c,_,M),c.coordinates?Array.isArray(c.coordinates)&&c.coordinates.length===4&&!c.coordinates.some(R=>!Array.isArray(R)||R.length!==2||R.some(j=>typeof j!="number"))||this.fire(new o.j(new o.$(`sources.${l}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.j(new o.$(`sources.${l}`,null,'missing required property "coordinates"'))),c.animate&&typeof c.animate!="boolean"&&this.fire(new o.j(new o.$(`sources.${l}`,null,'optional "animate" property must be a boolean value'))),c.canvas?typeof c.canvas=="string"||c.canvas instanceof HTMLCanvasElement||this.fire(new o.j(new o.$(`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 o.j(new o.$(`sources.${l}`,null,'missing required property "canvas"'))),this.options=c,this.animate=c.animate===void 0||c.animate}load(){return o._(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 o.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.gl;this.texture?(l||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new ie(c,this.canvas,_.RGBA,{premultiply:!0});let M=!1;for(const R in this.tiles){const j=this.tiles[R];j.state!=="loaded"&&(j.state="loaded",j.texture=this.texture,M=!0)}M&&this.fire(new o.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 Hn={},wr=T=>{switch(T){case"geojson":return nn;case"image":return ir;case"raster":return mn;case"raster-dem":return jn;case"vector":return Ft;case"video":return Dn;case"canvas":return fn}return Hn[T]},Qn="RTLPluginLoaded";class Xn extends o.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Le()}_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 o._(this,arguments,void 0,function*(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(!_)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return o._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new o.k(Qn))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ge=null;function Ae(){return Ge||(Ge=new Xn),Ge}class pe{constructor(l,c){this.timeAdded=0,this.fadeEndTime=0,this.tileID=l,this.uid=o.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,_){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,R){const j={};if(!R)return j;for(const $ of M){const te=$.layerIds.map(se=>R.getLayer(se)).filter(Boolean);if(te.length!==0){$.layers=te,$.stateDependentLayerIds&&($.stateDependentLayers=$.stateDependentLayerIds.map(se=>te.filter(we=>we.id===se)[0]));for(const se of te)j[se.id]=$}}return j}(l.buckets,c==null?void 0:c.style),this.hasSymbolBuckets=!1;for(const M in this.buckets){const R=this.buckets[M];if(R instanceof o.a3){if(this.hasSymbolBuckets=!0,!_)break;R.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const M in this.buckets){const R=this.buckets[M];if(R instanceof o.a3&&R.hasRTLText){this.hasRTLText=!0,Ae().lazyLoad();break}}this.queryPadding=0;for(const M in this.buckets){const R=this.buckets[M];this.queryPadding=Math.max(this.queryPadding,c.style.getLayer(M).queryRadius(R))}l.imageAtlas&&(this.imageAtlas=l.imageAtlas),l.glyphAtlasImage&&(this.glyphAtlasImage=l.glyphAtlasImage)}else this.collisionBoxArray=new o.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 _ in this.buckets){const M=this.buckets[_];M.uploadPending()&&M.upload(l)}const c=l.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new ie(l,this.imageAtlas.image,c.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new ie(l,this.glyphAtlasImage,c.ALPHA),this.glyphAtlasImage=null)}prepare(l){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(l,this.imageAtlasTexture)}queryRenderedFeatures(l,c,_,M,R,j,$,te,se,we){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:M,cameraQueryGeometry:R,scale:j,tileSize:this.tileSize,pixelPosMatrix:we,transform:te,params:$,queryPadding:this.queryPadding*se},l,c,_):{}}querySourceFeatures(l,c){const _=this.latestFeatureIndex;if(!_||!_.rawTileData)return;const M=_.loadVTLayers(),R=c&&c.sourceLayer?c.sourceLayer:"",j=M._geojsonTileLayer||M[R];if(!j)return;const $=o.a4(c&&c.filter),{z:te,x:se,y:we}=this.tileID.canonical,Ie={z:te,x:se,y:we};for(let Re=0;Re<j.length;Re++){const $e=j.feature(Re);if($.needGeometry){const lt=o.a5($e,!0);if(!$.filter(new o.z(this.tileID.overscaledZ),lt,this.tileID.canonical))continue}else if(!$.filter(new o.z(this.tileID.overscaledZ),$e))continue;const Ze=_.getId($e,R),ft=new o.a6($e,te,se,we,Ze);ft.tile=Ie,l.push(ft)}}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 _=o.a7(l.cacheControl);_["max-age"]&&(this.expirationTime=Date.now()+1e3*_["max-age"])}else l.expires&&(this.expirationTime=new Date(l.expires).getTime());if(this.expirationTime){const _=Date.now();let M=!1;if(this.expirationTime>_)M=!1;else if(c)if(this.expirationTime<c)M=!0;else{const R=this.expirationTime-c;R?this.expirationTime=_+Math.max(R,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 _=this.latestFeatureIndex.loadVTLayers();for(const M in this.buckets){if(!c.style.hasLayer(M))continue;const R=this.buckets[M],j=R.layers[0].sourceLayer||"_geojsonTileLayer",$=_[j],te=l[j];if(!$||!te||Object.keys(te).length===0)continue;R.update(te,$,this.imageAtlas&&this.imageAtlas.patternPositions||{});const se=c&&c.style&&c.style.getLayer(M);se&&(this.queryPadding=Math.max(this.queryPadding,se.queryRadius(R)))}}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 _={};for(const M of c)_[M]=!0;this.dependencies[l]=_}hasDependency(l,c){for(const _ of l){const M=this.dependencies[_];if(M){for(const R of c)if(M[R])return!0}}return!1}}class et{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,_){const M=l.wrapped().key;this.data[M]===void 0&&(this.data[M]=[]);const R={value:c,timeout:void 0};if(_!==void 0&&(R.timeout=setTimeout(()=>{this.remove(l,R)},_)),this.data[M].push(R),this.order.push(M),this.order.length>this.max){const j=this._getAndRemoveByKey(this.order[0]);j&&this.onRemove(j)}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 _=l.wrapped().key,M=c===void 0?0:this.data[_].indexOf(c),R=this.data[_][M];return this.data[_].splice(M,1),R.timeout&&clearTimeout(R.timeout),this.data[_].length===0&&delete this.data[_],this.onRemove(R.value),this.order.splice(this.order.indexOf(_),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 _ in this.data)for(const M of this.data[_])l(M.value)||c.push(M);for(const _ of c)this.remove(_.value.tileID,_)}}class St{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,c,_){const M=String(c);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][M]=this.stateChanges[l][M]||{},o.e(this.stateChanges[l][M],_),this.deletedStates[l]===null){this.deletedStates[l]={};for(const R in this.state[l])R!==M&&(this.deletedStates[l][R]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][M]===null){this.deletedStates[l][M]={};for(const R in this.state[l][M])_[R]||(this.deletedStates[l][M][R]=null)}else for(const R in _)this.deletedStates[l]&&this.deletedStates[l][M]&&this.deletedStates[l][M][R]===null&&delete this.deletedStates[l][M][R]}removeFeatureState(l,c,_){if(this.deletedStates[l]===null)return;const M=String(c);if(this.deletedStates[l]=this.deletedStates[l]||{},_&&c!==void 0)this.deletedStates[l][M]!==null&&(this.deletedStates[l][M]=this.deletedStates[l][M]||{},this.deletedStates[l][M][_]=null);else if(c!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][M])for(_ in this.deletedStates[l][M]={},this.stateChanges[l][M])this.deletedStates[l][M][_]=null;else this.deletedStates[l][M]=null;else this.deletedStates[l]=null}getState(l,c){const _=String(c),M=o.e({},(this.state[l]||{})[_],(this.stateChanges[l]||{})[_]);if(this.deletedStates[l]===null)return{};if(this.deletedStates[l]){const R=this.deletedStates[l][c];if(R===null)return{};for(const j in R)delete M[j]}return M}initializeTileState(l,c){l.setFeatureState(this.state,c)}coalesceChanges(l,c){const _={};for(const M in this.stateChanges){this.state[M]=this.state[M]||{};const R={};for(const j in this.stateChanges[M])this.state[M][j]||(this.state[M][j]={}),o.e(this.state[M][j],this.stateChanges[M][j]),R[j]=this.state[M][j];_[M]=R}for(const M in this.deletedStates){this.state[M]=this.state[M]||{};const R={};if(this.deletedStates[M]===null)for(const j in this.state[M])R[j]={},this.state[M][j]={};else for(const j in this.deletedStates[M]){if(this.deletedStates[M][j]===null)this.state[M][j]={};else for(const $ of Object.keys(this.deletedStates[M][j]))delete this.state[M][j][$];R[j]=this.state[M][j]}_[M]=_[M]||{},o.e(_[M],R)}if(this.stateChanges={},this.deletedStates={},Object.keys(_).length!==0)for(const M in l)l[M].setFeatureState(_,c)}}function Yt(T,l,c){const _=l.intersectsFrustum(T);if(!c)return _;const M=l.intersectsPlane(c);return _===0||M===0?0:_===2&&M===2?2:1}function rn(T,l,c,_,M){let R=T;const j=Math.atan(l/c),$=Math.hypot(l,c);return R=T+o.a8(_/$/Math.max(.5,Math.cos(o.aa(M/2)))),R+=1*o.a8(Math.cos(j))/2,R+=o.ab(T-R,-0,0),R}function er(T,l){const c=(l.roundZoom?Math.round:Math.floor)(T.zoom+o.a8(T.tileSize/l.tileSize));return Math.max(0,c)}function Be(T,l){const c=T.getCameraFrustum(),_=T.getClippingPlane(),M=T.screenPointToMercatorCoordinate(T.getCameraPoint()),R=o.Y.fromLngLat(T.center,T.elevation);M.z=R.z+Math.cos(T.pitchInRadians)*T.cameraToCenterDistance/T.worldSize;const j=T.getCoveringTilesDetailsProvider(),$=j.allowVariableZoom(T,l),te=er(T,l),se=l.minzoom||0,we=l.maxzoom!==void 0?l.maxzoom:T.maxZoom,Ie=Math.min(Math.max(0,te),we),Re=Math.pow(2,Ie),$e=[Re*M.x,Re*M.y,0],Ze=[Re*R.x,Re*R.y,0],ft=Math.hypot(R.x-M.x,R.y-M.y),lt=Math.abs(R.z-M.z),pt=Math.hypot(ft,lt),vt=Rt=>({zoom:0,x:0,y:0,wrap:Rt,fullyVisible:!1}),Bt=[],kt=[];if(T.renderWorldCopies&&j.allowWorldCopies())for(let Rt=1;Rt<=3;Rt++)Bt.push(vt(-Rt)),Bt.push(vt(Rt));for(Bt.push(vt(0));Bt.length>0;){const Rt=Bt.pop(),zt=Rt.x,Tt=Rt.y;let tn=Rt.fullyVisible;const Zt={x:zt,y:Tt,z:Rt.zoom},_n=j.getTileAABB(Zt,Rt.wrap,T.elevation,l);if(!tn){const Wn=Yt(c,_n,_);if(Wn===0)continue;tn=Wn===2}const bn=j.distanceToTile2d(M.x,M.y,Zt,_n);let vn=te;$&&(vn=(l.calculateTileZoom||rn)(T.zoom+o.a8(T.tileSize/l.tileSize),bn,lt,pt,T.fov)),vn=(l.roundZoom?Math.round:Math.floor)(vn),vn=Math.max(0,vn);const In=Math.min(vn,we);if(Rt.wrap=j.getWrap(R,Zt,Rt.wrap),Rt.zoom>=In){if(Rt.zoom<se)continue;const Wn=Ie-Rt.zoom,Sn=$e[0]-.5-(zt<<Wn),Tr=$e[1]-.5-(Tt<<Wn),Bi=l.reparseOverscaled?Math.max(Rt.zoom,vn):Rt.zoom;kt.push({tileID:new o.S(Rt.zoom===we?Bi:Rt.zoom,Rt.wrap,Rt.zoom,zt,Tt),distanceSq:o.a9([Ze[0]-.5-zt,Ze[1]-.5-Tt]),tileDistanceToCamera:Math.sqrt(Sn*Sn+Tr*Tr)})}else for(let Wn=0;Wn<4;Wn++)Bt.push({zoom:Rt.zoom+1,x:(zt<<1)+Wn%2,y:(Tt<<1)+(Wn>>1),wrap:Rt.wrap,fullyVisible:tn})}return kt.sort((Rt,zt)=>Rt.distanceSq-zt.distanceSq).map(Rt=>Rt.tileID)}class oe extends o.E{constructor(l,c,_){super(),this.id=l,this.dispatcher=_,this.on("data",M=>this._dataHandler(M)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((M,R,j,$)=>{const te=new(wr(R.type))(M,R,j,$);if(te.id!==M)throw new Error(`Expected Source id to be ${M} instead of ${te.id}`);return te})(l,c,_,this),this._tiles={},this._cache=new et(0,M=>this._unloadTile(M)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new St,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,_){return o._(this,void 0,void 0,function*(){try{yield this._source.loadTile(l),this._tileLoaded(l,c,_)}catch(M){l.state="errored",M.status!==404?this._source.fire(new o.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 o.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 _=this._tiles[c];_.upload(l),_.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(l=>l.tileID).sort(ve).map(l=>l.key)}getRenderableIds(l){const c=[];for(const _ in this._tiles)this._isIdRenderable(_,l)&&c.push(this._tiles[_]);return l?c.sort((_,M)=>{const R=_.tileID,j=M.tileID,$=new o.P(R.canonical.x,R.canonical.y)._rotate(-this.transform.bearingInRadians),te=new o.P(j.canonical.x,j.canonical.y)._rotate(-this.transform.bearingInRadians);return R.overscaledZ-j.overscaledZ||te.y-$.y||te.x-$.x}).map(_=>_.tileID.key):c.map(_=>_.tileID).sort(ve).map(_=>_.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 o._(this,void 0,void 0,function*(){const _=this._tiles[l];_&&(_.state!=="loading"&&(_.state=c),yield this._loadTile(_,l,c))})}_tileLoaded(l,c,_){l.timeAdded=S.now(),_==="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 o.k("data",{dataType:"source",tile:l,coord:l.tileID}))}_backfillDEM(l){const c=this.getRenderableIds();for(let M=0;M<c.length;M++){const R=c[M];if(l.neighboringTiles&&l.neighboringTiles[R]){const j=this.getTileByID(R);_(l,j),_(j,l)}}function _(M,R){M.needsHillshadePrepare=!0,M.needsTerrainPrepare=!0;let j=R.tileID.canonical.x-M.tileID.canonical.x;const $=R.tileID.canonical.y-M.tileID.canonical.y,te=Math.pow(2,M.tileID.canonical.z),se=R.tileID.key;j===0&&$===0||Math.abs($)>1||(Math.abs(j)>1&&(Math.abs(j+te)===1?j+=te:Math.abs(j-te)===1&&(j-=te)),R.dem&&M.dem&&(M.dem.backfillBorder(R.dem,j,$),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,_,M){for(const R in this._tiles){let j=this._tiles[R];if(M[R]||!j.hasData()||j.tileID.overscaledZ<=c||j.tileID.overscaledZ>_)continue;let $=j.tileID;for(;j&&j.tileID.overscaledZ>c+1;){const se=j.tileID.scaledTo(j.tileID.overscaledZ-1);j=this._tiles[se.key],j&&j.hasData()&&($=se)}let te=$;for(;te.overscaledZ>c;)if(te=te.scaledTo(te.overscaledZ-1),l[te.key]||l[te.canonical.key]){M[$.key]=$;break}}}findLoadedParent(l,c){if(l.key in this._loadedParentTiles){const _=this._loadedParentTiles[l.key];return _&&_.tileID.overscaledZ>=c?_:null}for(let _=l.overscaledZ-1;_>=c;_--){const M=l.scaledTo(_),R=this._getLoadedTile(M);if(R)return R}}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,_=Math.ceil(l.height/this._source.tileSize)+1,M=Math.floor(c*_*(this._maxTileCacheZoomLevels===null?o.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),R=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,M):M;this._cache.setMaxSize(R)}handleWrapJump(l){const c=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,c){const _={};for(const M in this._tiles){const R=this._tiles[M];R.tileID=R.tileID.unwrapTo(R.tileID.wrap+c),_[R.tileID.key]=R}this._tiles=_;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,_,M,R,j){const $={},te={},se=Object.keys(l),we=S.now();for(const Ie of se){const Re=l[Ie],$e=this._tiles[Ie];if(!$e||$e.fadeEndTime!==0&&$e.fadeEndTime<=we)continue;const Ze=this.findLoadedParent(Re,c),ft=this.findLoadedSibling(Re),lt=Ze||ft||null;lt&&(this._addTile(lt.tileID),$[lt.tileID.key]=lt.tileID),te[Ie]=Re}this._retainLoadedChildren(te,M,_,l);for(const Ie in $)l[Ie]||(this._coveredTiles[Ie]=!0,l[Ie]=$[Ie]);if(j){const Ie={},Re={};for(const $e of R)this._tiles[$e.key].hasData()?Ie[$e.key]=$e:Re[$e.key]=$e;for(const $e in Re){const Ze=Re[$e].children(this._source.maxzoom);this._tiles[Ze[0].key]&&this._tiles[Ze[1].key]&&this._tiles[Ze[2].key]&&this._tiles[Ze[3].key]&&(Ie[Ze[0].key]=l[Ze[0].key]=Ze[0],Ie[Ze[1].key]=l[Ze[1].key]=Ze[1],Ie[Ze[2].key]=l[Ze[2].key]=Ze[2],Ie[Ze[3].key]=l[Ze[3].key]=Ze[3],delete Re[$e])}for(const $e in Re){const Ze=Re[$e],ft=this.findLoadedParent(Ze,this._source.minzoom),lt=this.findLoadedSibling(Ze),pt=ft||lt||null;if(pt){Ie[pt.tileID.key]=l[pt.tileID.key]=pt.tileID;for(const vt in Ie)Ie[vt].isChildOf(pt.tileID)&&delete Ie[vt]}}for(const $e in this._tiles)Ie[$e]||(this._coveredTiles[$e]=!0)}}update(l,c){if(!this._sourceLoaded||this._paused)return;let _;this.transform=l,this.terrain=c,this.updateCacheSize(l),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?_=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(we=>new o.S(we.canonical.z,we.wrap,we.canonical.z,we.canonical.x,we.canonical.y)):(_=Be(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&&(_=_.filter(we=>this._source.hasTile(we)))):_=[];const M=er(l,this._source),R=Math.max(M-oe.maxOverzooming,this._source.minzoom),j=Math.max(M+oe.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const we={};for(const Ie of _)if(Ie.canonical.z>this._source.minzoom){const Re=Ie.scaledTo(Ie.canonical.z-1);we[Re.key]=Re;const $e=Ie.scaledTo(Math.max(this._source.minzoom,Math.min(Ie.canonical.z,5)));we[$e.key]=$e}_=_.concat(Object.values(we))}const $=_.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,$&&this.fire(new o.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const te=this._updateRetainedTiles(_,M);p(this._source.type)&&this._updateCoveredAndRetainedTiles(te,R,j,M,_,c);for(const we in te)this._tiles[we].clearFadeHold();const se=o.ac(this._tiles,te);for(const we of se){const Ie=this._tiles[we];Ie.hasSymbolBuckets&&!Ie.holdingForFade()?Ie.setHoldDuration(this.map._fadeDuration):Ie.hasSymbolBuckets&&!Ie.symbolFadeFinished()||this._removeTile(we)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const l in this._tiles)this._tiles[l].holdingForFade()&&this._removeTile(l)}_updateRetainedTiles(l,c){var _;const M={},R={},j=Math.max(c-oe.maxOverzooming,this._source.minzoom),$=Math.max(c+oe.maxUnderzooming,this._source.minzoom),te={};for(const se of l){const we=this._addTile(se);M[se.key]=se,we.hasData()||c<this._source.maxzoom&&(te[se.key]=se)}this._retainLoadedChildren(te,c,$,M);for(const se of l){let we=this._tiles[se.key];if(we.hasData())continue;if(c+1>this._source.maxzoom){const Re=se.children(this._source.maxzoom)[0],$e=this.getTile(Re);if($e&&$e.hasData()){M[Re.key]=Re;continue}}else{const Re=se.children(this._source.maxzoom);if(M[Re[0].key]&&M[Re[1].key]&&M[Re[2].key]&&M[Re[3].key])continue}let Ie=we.wasRequested();for(let Re=se.overscaledZ-1;Re>=j;--Re){const $e=se.scaledTo(Re);if(R[$e.key])break;if(R[$e.key]=!0,we=this.getTile($e),!we&&Ie&&(we=this._addTile($e)),we){const Ze=we.hasData();if((Ze||!(!((_=this.map)===null||_===void 0)&&_.cancelPendingTileRequestsWhileZooming)||Ie)&&(M[$e.key]=$e),Ie=we.wasRequested(),Ze)break}}}return M}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const l in this._tiles){const c=[];let _,M=this._tiles[l].tileID;for(;M.overscaledZ>0;){if(M.key in this._loadedParentTiles){_=this._loadedParentTiles[M.key];break}c.push(M.key);const R=M.scaledTo(M.overscaledZ-1);if(_=this._getLoadedTile(R),_)break;M=R}for(const R of c)this._loadedParentTiles[R]=_}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const l in this._tiles){const c=this._tiles[l].tileID,_=this._getLoadedTile(c);this._loadedSiblingTiles[c.key]=_}}_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;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,_||this._source.fire(new o.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.getExpiryTimeout();_&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},_))}_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,_){const M=[],R=this.transform;if(!R)return M;const j=_?R.getCameraQueryGeometry(l):l,$=l.map(Ze=>R.screenPointToMercatorCoordinate(Ze,this.terrain)),te=j.map(Ze=>R.screenPointToMercatorCoordinate(Ze,this.terrain)),se=this.getIds();let we=1/0,Ie=1/0,Re=-1/0,$e=-1/0;for(const Ze of te)we=Math.min(we,Ze.x),Ie=Math.min(Ie,Ze.y),Re=Math.max(Re,Ze.x),$e=Math.max($e,Ze.y);for(let Ze=0;Ze<se.length;Ze++){const ft=this._tiles[se[Ze]];if(ft.holdingForFade())continue;const lt=ft.tileID,pt=Math.pow(2,R.zoom-ft.tileID.overscaledZ),vt=c*ft.queryPadding*o.X/ft.tileSize/pt,Bt=[lt.getTilePoint(new o.Y(we,Ie)),lt.getTilePoint(new o.Y(Re,$e))];if(Bt[0].x-vt<o.X&&Bt[0].y-vt<o.X&&Bt[1].x+vt>=0&&Bt[1].y+vt>=0){const kt=$.map(zt=>lt.getTilePoint(zt)),Rt=te.map(zt=>lt.getTilePoint(zt));M.push({tile:ft,tileID:lt,queryGeometry:kt,cameraQueryGeometry:Rt,scale:pt})}}return M}getVisibleCoordinates(l){const c=this.getRenderableIds(l).map(_=>this._tiles[_].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,_){this._state.updateState(l=l||"_geojsonTileLayer",c,_)}removeFeatureState(l,c,_){this._state.removeFeatureState(l=l||"_geojsonTileLayer",c,_)}getFeatureState(l,c){return this._state.getState(l=l||"_geojsonTileLayer",c)}setDependencies(l,c,_){const M=this._tiles[l];M&&M.setDependencies(c,_)}reloadTilesForDependencies(l,c){for(const _ in this._tiles)this._tiles[_].hasDependency(l,c)&&this._reloadTile(_,"reloading");this._cache.filter(_=>!_.hasDependency(l,c))}}function ve(T,l){const c=Math.abs(2*T.wrap)-+(T.wrap<0),_=Math.abs(2*l.wrap)-+(l.wrap<0);return T.overscaledZ-l.overscaledZ||_-c||l.canonical.y-T.canonical.y||l.canonical.x-T.canonical.x}function p(T){return T==="raster"||T==="image"||T==="video"}oe.maxOverzooming=10,oe.maxUnderzooming=3;class je{constructor(l,c){this.reset(l,c)}reset(l,c){this.points=l||[],this._distances=[0];for(let _=1;_<this.points.length;_++)this._distances[_]=this._distances[_-1]+this.points[_].dist(this.points[_-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(c||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(l){if(this.points.length===1)return this.points[0];l=o.ab(l,0,1);let c=1,_=this._distances[c];const M=l*this.paddedLength+this.padding;for(;_<M&&c<this._distances.length;)_=this._distances[++c];const R=c-1,j=this._distances[R],$=_-j,te=$>0?(M-j)/$:0;return this.points[R].mult(1-te).add(this.points[c].mult(te))}}function Ye(T,l){let c=!0;return T==="always"||T!=="never"&&l!=="never"||(c=!1),c}class tt{constructor(l,c,_){const M=this.boxCells=[],R=this.circleCells=[];this.xCellCount=Math.ceil(l/_),this.yCellCount=Math.ceil(c/_);for(let j=0;j<this.xCellCount*this.yCellCount;j++)M.push([]),R.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,_,M,R){this._forEachCell(c,_,M,R,this._insertBoxCell,this.boxUid++),this.boxKeys.push(l),this.bboxes.push(c),this.bboxes.push(_),this.bboxes.push(M),this.bboxes.push(R)}insertCircle(l,c,_,M){this._forEachCell(c-M,_-M,c+M,_+M,this._insertCircleCell,this.circleUid++),this.circleKeys.push(l),this.circles.push(c),this.circles.push(_),this.circles.push(M)}_insertBoxCell(l,c,_,M,R,j){this.boxCells[R].push(j)}_insertCircleCell(l,c,_,M,R,j){this.circleCells[R].push(j)}_query(l,c,_,M,R,j,$){if(_<0||l>this.width||M<0||c>this.height)return[];const te=[];if(l<=0&&c<=0&&this.width<=_&&this.height<=M){if(R)return[{key:null,x1:l,y1:c,x2:_,y2:M}];for(let se=0;se<this.boxKeys.length;se++)te.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 we=this.circles[3*se],Ie=this.circles[3*se+1],Re=this.circles[3*se+2];te.push({key:this.circleKeys[se],x1:we-Re,y1:Ie-Re,x2:we+Re,y2:Ie+Re})}}else this._forEachCell(l,c,_,M,this._queryCell,te,{hitTest:R,overlapMode:j,seenUids:{box:{},circle:{}}},$);return te}query(l,c,_,M){return this._query(l,c,_,M,!1,null)}hitTest(l,c,_,M,R,j){return this._query(l,c,_,M,!0,R,j).length>0}hitTestCircle(l,c,_,M,R){const j=l-_,$=l+_,te=c-_,se=c+_;if($<0||j>this.width||se<0||te>this.height)return!1;const we=[];return this._forEachCell(j,te,$,se,this._queryCellCircle,we,{hitTest:!0,overlapMode:M,circle:{x:l,y:c,radius:_},seenUids:{box:{},circle:{}}},R),we.length>0}_queryCell(l,c,_,M,R,j,$,te){const{seenUids:se,hitTest:we,overlapMode:Ie}=$,Re=this.boxCells[R];if(Re!==null){const Ze=this.bboxes;for(const ft of Re)if(!se.box[ft]){se.box[ft]=!0;const lt=4*ft,pt=this.boxKeys[ft];if(l<=Ze[lt+2]&&c<=Ze[lt+3]&&_>=Ze[lt+0]&&M>=Ze[lt+1]&&(!te||te(pt))&&(!we||!Ye(Ie,pt.overlapMode))&&(j.push({key:pt,x1:Ze[lt],y1:Ze[lt+1],x2:Ze[lt+2],y2:Ze[lt+3]}),we))return!0}}const $e=this.circleCells[R];if($e!==null){const Ze=this.circles;for(const ft of $e)if(!se.circle[ft]){se.circle[ft]=!0;const lt=3*ft,pt=this.circleKeys[ft];if(this._circleAndRectCollide(Ze[lt],Ze[lt+1],Ze[lt+2],l,c,_,M)&&(!te||te(pt))&&(!we||!Ye(Ie,pt.overlapMode))){const vt=Ze[lt],Bt=Ze[lt+1],kt=Ze[lt+2];if(j.push({key:pt,x1:vt-kt,y1:Bt-kt,x2:vt+kt,y2:Bt+kt}),we)return!0}}}return!1}_queryCellCircle(l,c,_,M,R,j,$,te){const{circle:se,seenUids:we,overlapMode:Ie}=$,Re=this.boxCells[R];if(Re!==null){const Ze=this.bboxes;for(const ft of Re)if(!we.box[ft]){we.box[ft]=!0;const lt=4*ft,pt=this.boxKeys[ft];if(this._circleAndRectCollide(se.x,se.y,se.radius,Ze[lt+0],Ze[lt+1],Ze[lt+2],Ze[lt+3])&&(!te||te(pt))&&!Ye(Ie,pt.overlapMode))return j.push(!0),!0}}const $e=this.circleCells[R];if($e!==null){const Ze=this.circles;for(const ft of $e)if(!we.circle[ft]){we.circle[ft]=!0;const lt=3*ft,pt=this.circleKeys[ft];if(this._circlesCollide(Ze[lt],Ze[lt+1],Ze[lt+2],se.x,se.y,se.radius)&&(!te||te(pt))&&!Ye(Ie,pt.overlapMode))return j.push(!0),!0}}}_forEachCell(l,c,_,M,R,j,$,te){const se=this._convertToXCellCoord(l),we=this._convertToYCellCoord(c),Ie=this._convertToXCellCoord(_),Re=this._convertToYCellCoord(M);for(let $e=se;$e<=Ie;$e++)for(let Ze=we;Ze<=Re;Ze++)if(R.call(this,l,c,_,M,this.xCellCount*Ze+$e,j,$,te))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,_,M,R,j){const $=M-l,te=R-c,se=_+j;return se*se>$*$+te*te}_circleAndRectCollide(l,c,_,M,R,j,$){const te=(j-M)/2,se=Math.abs(l-(M+te));if(se>te+_)return!1;const we=($-R)/2,Ie=Math.abs(c-(R+we));if(Ie>we+_)return!1;if(se<=te||Ie<=we)return!0;const Re=se-te,$e=Ie-we;return Re*Re+$e*$e<=_*_}}function ct(T,l,c){const _=o.H();if(!T){const{vecSouth:Ie,vecEast:Re}=Gt(l),$e=g();$e[0]=Re[0],$e[1]=Re[1],$e[2]=Ie[0],$e[3]=Ie[1],M=$e,(we=(j=(R=$e)[0])*(se=R[3])-(te=R[2])*($=R[1]))&&(M[0]=se*(we=1/we),M[1]=-$*we,M[2]=-te*we,M[3]=j*we),_[0]=$e[0],_[1]=$e[1],_[4]=$e[2],_[5]=$e[3]}var M,R,j,$,te,se,we;return o.K(_,_,[1/c,1/c,1]),_}function At(T,l,c,_){if(T){const M=o.H();if(!l){const{vecSouth:R,vecEast:j}=Gt(c);M[0]=j[0],M[1]=j[1],M[4]=R[0],M[5]=R[1]}return o.K(M,M,[_,_,1]),M}return c.pixelsToClipSpaceMatrix}function Gt(T){const l=Math.cos(T.rollInRadians),c=Math.sin(T.rollInRadians),_=Math.cos(T.pitchInRadians),M=Math.cos(T.bearingInRadians),R=Math.sin(T.bearingInRadians),j=o.ad();j[0]=-M*_*c-R*l,j[1]=-R*_*c+M*l;const $=o.ae(j);$<1e-9?o.af(j):o.ag(j,j,1/$);const te=o.ad();te[0]=M*_*l-R*c,te[1]=R*_*l+M*c;const se=o.ae(te);return se<1e-9?o.af(te):o.ag(te,te,1/se),{vecEast:te,vecSouth:j}}function $t(T,l,c,_){let M;_?(M=[T,l,_(T,l),1],o.al(M,M,c)):(M=[T,l,0,1],yi(M,M,c));const R=M[3];return{point:new o.P(M[0]/R,M[1]/R),signedDistanceFromCamera:R,isOccluded:!1}}function jt(T,l){return .5+T/l*.5}function xt(T,l){return T.x>=-l[0]&&T.x<=l[0]&&T.y>=-l[1]&&T.y<=l[1]}function Rn(T,l,c,_,M,R,j,$,te,se,we,Ie,Re){const $e=c?T.textSizeData:T.iconSizeData,Ze=o.ah($e,l.transform.zoom),ft=[256/l.width*2+1,256/l.height*2+1],lt=c?T.text.dynamicLayoutVertexArray:T.icon.dynamicLayoutVertexArray;lt.clear();const pt=T.lineVertexArray,vt=c?T.text.placedSymbolArray:T.icon.placedSymbolArray,Bt=l.transform.width/l.transform.height;let kt=!1;for(let Rt=0;Rt<vt.length;Rt++){const zt=vt.get(Rt);if(zt.hidden||zt.writingMode===o.ai.vertical&&!kt){qi(zt.numGlyphs,lt);continue}kt=!1;const Tt=new o.P(zt.anchorX,zt.anchorY),tn={getElevation:Re,pitchedLabelPlaneMatrix:_,lineVertexArray:pt,pitchWithMap:R,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:l.transform,tileAnchorPoint:Tt,unwrappedTileID:te,width:se,height:we,translation:Ie},Zt=Er(zt.anchorX,zt.anchorY,tn);if(!xt(Zt.point,ft)){qi(zt.numGlyphs,lt);continue}const _n=jt(l.transform.cameraToCenterDistance,Zt.signedDistanceFromCamera),bn=o.aj($e,Ze,zt),vn=R?bn*l.transform.getPitchedTextCorrection(zt.anchorX,zt.anchorY,te)/_n:bn*_n,In=Sr({projectionContext:tn,pitchedLabelPlaneMatrixInverse:M,symbol:zt,fontSize:vn,flip:!1,keepUpright:j,glyphOffsetArray:T.glyphOffsetArray,dynamicLayoutVertexArray:lt,aspectRatio:Bt,rotateToLine:$});kt=In.useVertical,(In.notEnoughRoom||kt||In.needsFlipping&&Sr({projectionContext:tn,pitchedLabelPlaneMatrixInverse:M,symbol:zt,fontSize:vn,flip:!0,keepUpright:j,glyphOffsetArray:T.glyphOffsetArray,dynamicLayoutVertexArray:lt,aspectRatio:Bt,rotateToLine:$}).notEnoughRoom)&&qi(zt.numGlyphs,lt)}c?T.text.dynamicLayoutVertexBuffer.updateData(lt):T.icon.dynamicLayoutVertexBuffer.updateData(lt)}function Bn(T,l,c,_,M,R,j,$){const te=R.glyphStartIndex+R.numGlyphs,se=R.lineStartIndex,we=R.lineStartIndex+R.lineLength,Ie=l.getoffsetX(R.glyphStartIndex),Re=l.getoffsetX(te-1),$e=co(T*Ie,c,_,M,R.segment,se,we,$,j);if(!$e)return null;const Ze=co(T*Re,c,_,M,R.segment,se,we,$,j);return Ze?$.projectionCache.anyProjectionOccluded?null:{first:$e,last:Ze}:null}function fr(T,l,c,_){return T===o.ai.horizontal&&Math.abs(c.y-l.y)>Math.abs(c.x-l.x)*_?{useVertical:!0}:(T===o.ai.vertical?l.y<c.y:l.x>c.x)?{needsFlipping:!0}:null}function Sr(T){const{projectionContext:l,pitchedLabelPlaneMatrixInverse:c,symbol:_,fontSize:M,flip:R,keepUpright:j,glyphOffsetArray:$,dynamicLayoutVertexArray:te,aspectRatio:se,rotateToLine:we}=T,Ie=M/24,Re=_.lineOffsetX*Ie,$e=_.lineOffsetY*Ie;let Ze;if(_.numGlyphs>1){const ft=_.glyphStartIndex+_.numGlyphs,lt=_.lineStartIndex,pt=_.lineStartIndex+_.lineLength,vt=Bn(Ie,$,Re,$e,R,_,we,l);if(!vt)return{notEnoughRoom:!0};const Bt=Or(vt.first.point.x,vt.first.point.y,l,c),kt=Or(vt.last.point.x,vt.last.point.y,l,c);if(j&&!R){const Rt=fr(_.writingMode,Bt,kt,se);if(Rt)return Rt}Ze=[vt.first];for(let Rt=_.glyphStartIndex+1;Rt<ft-1;Rt++)Ze.push(co(Ie*$.getoffsetX(Rt),Re,$e,R,_.segment,lt,pt,l,we));Ze.push(vt.last)}else{if(j&&!R){const lt=Fn(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,pt=_.lineStartIndex+_.segment+1,vt=new o.P(l.lineVertexArray.getx(pt),l.lineVertexArray.gety(pt)),Bt=Fn(vt.x,vt.y,l),kt=Bt.signedDistanceFromCamera>0?Bt.point:on(l.tileAnchorPoint,vt,lt,1,l),Rt=Or(lt.x,lt.y,l,c),zt=Or(kt.x,kt.y,l,c),Tt=fr(_.writingMode,Rt,zt,se);if(Tt)return Tt}const ft=co(Ie*$.getoffsetX(_.glyphStartIndex),Re,$e,R,_.segment,_.lineStartIndex,_.lineStartIndex+_.lineLength,l,we);if(!ft||l.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Ze=[ft]}for(const ft of Ze)o.ak(te,ft.point,ft.angle);return{}}function on(T,l,c,_,M){const R=T.add(T.sub(l)._unit()),j=Fn(R.x,R.y,M).point,$=c.sub(j);return c.add($._mult(_/$.mag()))}function Nn(T,l,c){const _=l.projectionCache;if(_.projections[T])return _.projections[T];const M=new o.P(l.lineVertexArray.getx(T),l.lineVertexArray.gety(T)),R=Fn(M.x,M.y,l);if(R.signedDistanceFromCamera>0)return _.projections[T]=R.point,_.anyProjectionOccluded=_.anyProjectionOccluded||R.isOccluded,R.point;const j=T-c.direction;return on(c.distanceFromAnchor===0?l.tileAnchorPoint:new o.P(l.lineVertexArray.getx(j),l.lineVertexArray.gety(j)),M,c.previousVertex,c.absOffsetX-c.distanceFromAnchor+1,l)}function Fn(T,l,c){const _=T+c.translation[0],M=l+c.translation[1];let R;return c.pitchWithMap?(R=$t(_,M,c.pitchedLabelPlaneMatrix,c.getElevation),R.isOccluded=!1):(R=c.transform.projectTileCoordinates(_,M,c.unwrappedTileID,c.getElevation),R.point.x=(.5*R.point.x+.5)*c.width,R.point.y=(.5*-R.point.y+.5)*c.height),R}function Or(T,l,c,_){if(c.pitchWithMap){const M=[T,l,0,1];return o.al(M,M,_),c.transform.projectTileCoordinates(M[0]/M[3],M[1]/M[3],c.unwrappedTileID,c.getElevation).point}return{x:T/c.width*2-1,y:l/c.height*2-1}}function Er(T,l,c){return c.transform.projectTileCoordinates(T,l,c.unwrappedTileID,c.getElevation)}function Dr(T,l,c){return T._unit()._perp()._mult(l*c)}function ur(T,l,c,_,M,R,j,$,te){if($.projectionCache.offsets[T])return $.projectionCache.offsets[T];const se=c.add(l);if(T+te.direction<_||T+te.direction>=M)return $.projectionCache.offsets[T]=se,se;const we=Nn(T+te.direction,$,te),Ie=Dr(we.sub(c),j,te.direction),Re=c.add(Ie),$e=we.add(Ie);return $.projectionCache.offsets[T]=o.am(R,se,Re,$e)||se,$.projectionCache.offsets[T]}function co(T,l,c,_,M,R,j,$,te){const se=_?T-l:T+l;let we=se>0?1:-1,Ie=0;_&&(we*=-1,Ie=Math.PI),we<0&&(Ie+=Math.PI);let Re,$e=we>0?R+M:R+M+1;$.projectionCache.cachedAnchorPoint?Re=$.projectionCache.cachedAnchorPoint:(Re=Fn($.tileAnchorPoint.x,$.tileAnchorPoint.y,$).point,$.projectionCache.cachedAnchorPoint=Re);let Ze,ft,lt=Re,pt=Re,vt=0,Bt=0;const kt=Math.abs(se),Rt=[];let zt;for(;vt+Bt<=kt;){if($e+=we,$e<R||$e>=j)return null;vt+=Bt,pt=lt,ft=Ze;const Zt={absOffsetX:kt,direction:we,distanceFromAnchor:vt,previousVertex:pt};if(lt=Nn($e,$,Zt),c===0)Rt.push(pt),zt=lt.sub(pt);else{let _n;const bn=lt.sub(pt);_n=bn.mag()===0?Dr(Nn($e+we,$,Zt).sub(lt),c,we):Dr(bn,c,we),ft||(ft=pt.add(_n)),Ze=ur($e,_n,lt,R,j,ft,c,$,Zt),Rt.push(ft),zt=Ze.sub(ft)}Bt=zt.mag()}const Tt=zt._mult((kt-vt)/Bt)._add(ft||pt),tn=Ie+Math.atan2(lt.y-pt.y,lt.x-pt.x);return Rt.push(Tt),{point:Tt,angle:te?tn:0,path:Rt}}const Sa=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function qi(T,l){for(let c=0;c<T;c++){const _=l.length;l.resize(_+4),l.float32.set(Sa,3*_)}}function yi(T,l,c){const _=l[0],M=l[1];return T[0]=c[0]*_+c[4]*M+c[12],T[1]=c[1]*_+c[5]*M+c[13],T[3]=c[3]*_+c[7]*M+c[15],T}const oo=100;class Mo{constructor(l,c=new tt(l.width+200,l.height+200,25),_=new tt(l.width+200,l.height+200,25)){this.transform=l,this.grid=c,this.ignoredGrid=_,this.pitchFactor=Math.cos(l.pitch*Math.PI/180)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+oo,this.screenBottomBoundary=l.height+oo,this.gridRightBoundary=l.width+200,this.gridBottomBoundary=l.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(l,c,_,M,R,j,$,te,se,we,Ie,Re){const $e=this.projectAndGetPerspectiveRatio(l.anchorPointX+te[0],l.anchorPointY+te[1],R,we,Re),Ze=_*$e.perspectiveRatio;let ft;if(j||$)ft=this._projectCollisionBox(l,Ze,M,R,j,$,te,$e,we,Ie,Re);else{const zt=$e.x+(Ie?Ie.x*Ze:0),Tt=$e.y+(Ie?Ie.y*Ze:0);ft={allPointsOccluded:!1,box:[zt+l.x1*Ze,Tt+l.y1*Ze,zt+l.x2*Ze,Tt+l.y2*Ze]}}const[lt,pt,vt,Bt]=ft.box,kt=j?ft.allPointsOccluded:$e.isOccluded;let Rt=kt;return Rt||(Rt=$e.perspectiveRatio<this.perspectiveRatioCutoff),Rt||(Rt=!this.isInsideGrid(lt,pt,vt,Bt)),Rt||c!=="always"&&this.grid.hitTest(lt,pt,vt,Bt,c,se)?{box:[lt,pt,vt,Bt],placeable:!1,offscreen:!1,occluded:kt}:{box:[lt,pt,vt,Bt],placeable:!0,offscreen:this.isOffscreen(lt,pt,vt,Bt),occluded:kt}}placeCollisionCircles(l,c,_,M,R,j,$,te,se,we,Ie,Re,$e,Ze){const ft=[],lt=new o.P(c.anchorX,c.anchorY),pt=this.getPerspectiveRatio(lt.x,lt.y,j,Ze),vt=(se?R*this.transform.getPitchedTextCorrection(c.anchorX,c.anchorY,j)/pt:R*pt)/o.as,Bt={getElevation:Ze,pitchedLabelPlaneMatrix:$,lineVertexArray:_,pitchWithMap:se,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:lt,unwrappedTileID:j,width:this.transform.width,height:this.transform.height,translation:$e},kt=Bn(vt,M,c.lineOffsetX*vt,c.lineOffsetY*vt,!1,c,!1,Bt);let Rt=!1,zt=!1,Tt=!0;if(kt){const tn=.5*Ie*pt+Re,Zt=new o.P(-100,-100),_n=new o.P(this.screenRightBoundary,this.screenBottomBoundary),bn=new je,vn=kt.first,In=kt.last;let Wn=[];for(let Bi=vn.path.length-1;Bi>=1;Bi--)Wn.push(vn.path[Bi]);for(let Bi=1;Bi<In.path.length;Bi++)Wn.push(In.path[Bi]);const Sn=2.5*tn;if(se){const Bi=this.projectPathToScreenSpace(Wn,Bt);Wn=Bi.some($i=>$i.signedDistanceFromCamera<=0)?[]:Bi.map($i=>$i.point)}let Tr=[];if(Wn.length>0){const Bi=Wn[0].clone(),$i=Wn[0].clone();for(let Oo=1;Oo<Wn.length;Oo++)Bi.x=Math.min(Bi.x,Wn[Oo].x),Bi.y=Math.min(Bi.y,Wn[Oo].y),$i.x=Math.max($i.x,Wn[Oo].x),$i.y=Math.max($i.y,Wn[Oo].y);Tr=Bi.x>=Zt.x&&$i.x<=_n.x&&Bi.y>=Zt.y&&$i.y<=_n.y?[Wn]:$i.x<Zt.x||Bi.x>_n.x||$i.y<Zt.y||Bi.y>_n.y?[]:o.ao([Wn],Zt.x,Zt.y,_n.x,_n.y)}for(const Bi of Tr){bn.reset(Bi,.25*tn);let $i=0;$i=bn.length<=.5*tn?1:Math.ceil(bn.paddedLength/Sn)+1;for(let Oo=0;Oo<$i;Oo++){const Si=Oo/Math.max($i-1,1),jo=bn.lerp(Si),No=jo.x+oo,xo=jo.y+oo;ft.push(No,xo,tn,0);const yo=No-tn,ka=xo-tn,Wo=No+tn,ds=xo+tn;if(Tt=Tt&&this.isOffscreen(yo,ka,Wo,ds),zt=zt||this.isInsideGrid(yo,ka,Wo,ds),l!=="always"&&this.grid.hitTestCircle(No,xo,tn,l,we)&&(Rt=!0,!te))return{circles:[],offscreen:!1,collisionDetected:Rt}}}}return{circles:!te&&Rt||!zt||pt<this.perspectiveRatioCutoff?[]:ft,offscreen:Tt,collisionDetected:Rt}}projectPathToScreenSpace(l,c){const _=function(M,R){const j=o.H();return o.an(j,R.pitchedLabelPlaneMatrix),M.map($=>{const te=$t($.x,$.y,j,R.getElevation),se=R.transform.projectTileCoordinates(te.point.x,te.point.y,R.unwrappedTileID,R.getElevation);return se.point.x=(.5*se.point.x+.5)*R.width,se.point.y=(.5*-se.point.y+.5)*R.height,se})}(l,c);return function(M){let R=0,j=0,$=0,te=0;for(let se=0;se<M.length;se++)M[se].isOccluded?($=se+1,te=0):(te++,te>j&&(j=te,R=$));return M.slice(R,R+j)}(_)}queryRenderedSymbols(l){if(l.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const c=[];let _=1/0,M=1/0,R=-1/0,j=-1/0;for(const we of l){const Ie=new o.P(we.x+oo,we.y+oo);_=Math.min(_,Ie.x),M=Math.min(M,Ie.y),R=Math.max(R,Ie.x),j=Math.max(j,Ie.y),c.push(Ie)}const $=this.grid.query(_,M,R,j).concat(this.ignoredGrid.query(_,M,R,j)),te={},se={};for(const we of $){const Ie=we.key;if(te[Ie.bucketInstanceId]===void 0&&(te[Ie.bucketInstanceId]={}),te[Ie.bucketInstanceId][Ie.featureIndex])continue;const Re=[new o.P(we.x1,we.y1),new o.P(we.x2,we.y1),new o.P(we.x2,we.y2),new o.P(we.x1,we.y2)];o.ap(c,Re)&&(te[Ie.bucketInstanceId][Ie.featureIndex]=!0,se[Ie.bucketInstanceId]===void 0&&(se[Ie.bucketInstanceId]=[]),se[Ie.bucketInstanceId].push(Ie.featureIndex))}return se}insertCollisionBox(l,c,_,M,R,j){(_?this.ignoredGrid:this.grid).insert({bucketInstanceId:M,featureIndex:R,collisionGroupID:j,overlapMode:c},l[0],l[1],l[2],l[3])}insertCollisionCircles(l,c,_,M,R,j){const $=_?this.ignoredGrid:this.grid,te={bucketInstanceId:M,featureIndex:R,collisionGroupID:j,overlapMode:c};for(let se=0;se<l.length;se+=4)$.insertCircle(te,l[se],l[se+1],l[se+2])}projectAndGetPerspectiveRatio(l,c,_,M,R){if(R){let j;M?(j=[l,c,M(l,c),1],o.al(j,j,R)):(j=[l,c,0,1],yi(j,j,R));const $=j[3];return{x:(j[0]/$+1)/2*this.transform.width+oo,y:(-j[1]/$+1)/2*this.transform.height+oo,perspectiveRatio:.5+this.transform.cameraToCenterDistance/$*.5,isOccluded:!1,signedDistanceFromCamera:$}}{const j=this.transform.projectTileCoordinates(l,c,_,M);return{x:(j.point.x+1)/2*this.transform.width+oo,y:(1-j.point.y)/2*this.transform.height+oo,perspectiveRatio:.5+this.transform.cameraToCenterDistance/j.signedDistanceFromCamera*.5,isOccluded:j.isOccluded,signedDistanceFromCamera:j.signedDistanceFromCamera}}}getPerspectiveRatio(l,c,_,M){const R=this.transform.projectTileCoordinates(l,c,_,M);return .5+this.transform.cameraToCenterDistance/R.signedDistanceFromCamera*.5}isOffscreen(l,c,_,M){return _<oo||l>=this.screenRightBoundary||M<oo||c>this.screenBottomBoundary}isInsideGrid(l,c,_,M){return _>=0&&l<this.gridRightBoundary&&M>=0&&c<this.gridBottomBoundary}getViewportMatrix(){const l=o.aq([]);return o.J(l,l,[-100,-100,0]),l}_projectCollisionBox(l,c,_,M,R,j,$,te,se,we,Ie){let Re=1,$e=0,Ze=0,ft=1;const lt=l.anchorPointX+$[0],pt=l.anchorPointY+$[1];if(j&&!R){const Wn=this.projectAndGetPerspectiveRatio(lt+1,pt,M,se,Ie),Sn=Wn.x-te.x,Tr=Math.atan((Wn.y-te.y)/Sn)+(Sn<0?Math.PI:0),Bi=Math.sin(Tr),$i=Math.cos(Tr);Re=$i,$e=Bi,Ze=-Bi,ft=$i}else if(!j&&R){const Wn=Gt(this.transform);Re=Wn.vecEast[0],$e=Wn.vecEast[1],Ze=Wn.vecSouth[0],ft=Wn.vecSouth[1]}let vt=te.x,Bt=te.y,kt=c;R&&(vt=lt,Bt=pt,kt=Math.pow(2,-(this.transform.zoom-_.overscaledZ)),kt*=this.transform.getPitchedTextCorrection(lt,pt,M),we||(kt*=o.ab(.5+te.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),we&&(vt+=Re*we.x*kt+Ze*we.y*kt,Bt+=$e*we.x*kt+ft*we.y*kt);const Rt=l.x1*kt,zt=l.x2*kt,Tt=(Rt+zt)/2,tn=l.y1*kt,Zt=l.y2*kt,_n=(tn+Zt)/2,bn=[{offsetX:Rt,offsetY:tn},{offsetX:Tt,offsetY:tn},{offsetX:zt,offsetY:tn},{offsetX:zt,offsetY:_n},{offsetX:zt,offsetY:Zt},{offsetX:Tt,offsetY:Zt},{offsetX:Rt,offsetY:Zt},{offsetX:Rt,offsetY:_n}];let vn=[];for(const{offsetX:Wn,offsetY:Sn}of bn)vn.push(new o.P(vt+Re*Wn+Ze*Sn,Bt+$e*Wn+ft*Sn));let In=!1;if(R){const Wn=vn.map(Sn=>this.projectAndGetPerspectiveRatio(Sn.x,Sn.y,M,se,Ie));In=Wn.some(Sn=>!Sn.isOccluded),vn=Wn.map(Sn=>new o.P(Sn.x,Sn.y))}else In=!0;return{box:o.ar(vn),allPointsOccluded:!In}}}class Ti{constructor(l,c,_,M){this.opacity=l?Math.max(0,Math.min(1,l.opacity+(l.placed?c:-c))):M&&_?1:0,this.placed=_}isHidden(){return this.opacity===0&&!this.placed}}class La{constructor(l,c,_,M,R){this.text=new Ti(l?l.text:null,c,_,R),this.icon=new Ti(l?l.icon:null,c,M,R)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ea{constructor(l,c,_){this.text=l,this.icon=c,this.skipFade=_}}class ns{constructor(l,c,_,M,R){this.bucketInstanceId=l,this.featureIndex=c,this.sourceLayerIndex=_,this.bucketIndex=M,this.tileID=R}}class Aa{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:_=>_.collisionGroupID===c}}return this.collisionGroups[l]}}function Al(T,l,c,_,M){const{horizontalAlign:R,verticalAlign:j}=o.ay(T);return new o.P(-(R-.5)*l+_[0]*M,-(j-.5)*c+_[1]*M)}class ao{constructor(l,c,_,M,R){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=_,this.retainedQueryData={},this.collisionGroups=new Aa(M),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=R,R&&(R.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(l){const c=this.terrain;return c?(_,M)=>c.getElevation(l,_,M):null}getBucketParts(l,c,_,M){const R=_.getBucket(c),j=_.latestFeatureIndex;if(!R||!j||c.id!==R.layerIds[0])return;const $=_.collisionBoxArray,te=R.layers[0].layout,se=R.layers[0].paint,we=Math.pow(2,this.transform.zoom-_.tileID.overscaledZ),Ie=_.tileSize/o.X,Re=_.tileID.toUnwrapped(),$e=te.get("text-rotation-alignment")==="map",Ze=o.at(_,1,this.transform.zoom),ft=o.au(this.collisionIndex.transform,_,se.get("text-translate"),se.get("text-translate-anchor")),lt=o.au(this.collisionIndex.transform,_,se.get("icon-translate"),se.get("icon-translate-anchor")),pt=ct($e,this.transform,Ze);this.retainedQueryData[R.bucketInstanceId]=new ns(R.bucketInstanceId,j,R.sourceLayerIndex,R.index,_.tileID);const vt={bucket:R,layout:te,translationText:ft,translationIcon:lt,unwrappedTileID:Re,pitchedLabelPlaneMatrix:pt,scale:we,textPixelRatio:Ie,holdingForFade:_.holdingForFade(),collisionBoxArray:$,partiallyEvaluatedTextSize:o.ah(R.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(R.sourceID)};if(M)for(const Bt of R.sortKeyRanges){const{sortKey:kt,symbolInstanceStart:Rt,symbolInstanceEnd:zt}=Bt;l.push({sortKey:kt,symbolInstanceStart:Rt,symbolInstanceEnd:zt,parameters:vt})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:R.symbolInstances.length,parameters:vt})}attemptAnchorPlacement(l,c,_,M,R,j,$,te,se,we,Ie,Re,$e,Ze,ft,lt,pt,vt,Bt,kt){const Rt=o.av[l.textAnchor],zt=[l.textOffset0,l.textOffset1],Tt=Al(Rt,_,M,zt,R),tn=this.collisionIndex.placeCollisionBox(c,Re,te,se,we,$,j,lt,Ie.predicate,Bt,Tt,kt);if((!vt||this.collisionIndex.placeCollisionBox(vt,Re,te,se,we,$,j,pt,Ie.predicate,Bt,Tt,kt).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:_,height:M,anchor:Rt,textBoxScale:R,prevAnchor:Zt},this.markUsedJustification(Ze,Rt,$e,ft),Ze.allowVerticalPlacement&&(this.markUsedOrientation(Ze,ft,$e),this.placedOrientations[$e.crossTileID]=ft),{shift:Tt,placedGlyphBoxes:tn}}}placeLayerBucketPart(l,c,_){const{bucket:M,layout:R,translationText:j,translationIcon:$,unwrappedTileID:te,pitchedLabelPlaneMatrix:se,textPixelRatio:we,holdingForFade:Ie,collisionBoxArray:Re,partiallyEvaluatedTextSize:$e,collisionGroup:Ze}=l.parameters,ft=R.get("text-optional"),lt=R.get("icon-optional"),pt=o.aw(R,"text-overlap","text-allow-overlap"),vt=pt==="always",Bt=o.aw(R,"icon-overlap","icon-allow-overlap"),kt=Bt==="always",Rt=R.get("text-rotation-alignment")==="map",zt=R.get("text-pitch-alignment")==="map",Tt=R.get("icon-text-fit")!=="none",tn=R.get("symbol-z-order")==="viewport-y",Zt=vt&&(kt||!M.hasIconData()||lt),_n=kt&&(vt||!M.hasTextData()||ft);!M.collisionArrays&&Re&&M.deserializeCollisionBoxes(Re);const bn=this.retainedQueryData[M.bucketInstanceId].tileID,vn=this._getTerrainElevationFunc(bn),In=this.transform.getFastPathSimpleProjectionMatrix(bn),Wn=(Sn,Tr,Bi)=>{var $i,Oo;if(c[Sn.crossTileID])return;if(Ie)return void(this.placements[Sn.crossTileID]=new Ea(!1,!1,!1));let Si=!1,jo=!1,No=!0,xo=null,yo={box:null,placeable:!1,offscreen:null,occluded:!1},ka={box:null,placeable:!1,offscreen:null},Wo=null,ds=null,Wa=null,$u=0,fl=0,pl=0;Tr.textFeatureIndex?$u=Tr.textFeatureIndex:Sn.useRuntimeCollisionCircles&&($u=Sn.featureIndex),Tr.verticalTextFeatureIndex&&(fl=Tr.verticalTextFeatureIndex);const uu=Tr.textBox;if(uu){const Js=xs=>{let qs=o.ai.horizontal;if(M.allowVerticalPlacement&&!xs&&this.prevPlacement){const nl=this.prevPlacement.placedOrientations[Sn.crossTileID];nl&&(this.placedOrientations[Sn.crossTileID]=nl,qs=nl,this.markUsedOrientation(M,qs,Sn))}return qs},ml=(xs,qs)=>{if(M.allowVerticalPlacement&&Sn.numVerticalGlyphVertices>0&&Tr.verticalTextBox){for(const nl of M.writingModes)if(nl===o.ai.vertical?(yo=qs(),ka=yo):yo=xs(),yo&&yo.placeable)break}else yo=xs()},sa=Sn.textAnchorOffsetStartIndex,Pl=Sn.textAnchorOffsetEndIndex;if(Pl===sa){const xs=(qs,nl)=>{const rl=this.collisionIndex.placeCollisionBox(qs,pt,we,bn,te,zt,Rt,j,Ze.predicate,vn,void 0,In);return rl&&rl.placeable&&(this.markUsedOrientation(M,nl,Sn),this.placedOrientations[Sn.crossTileID]=nl),rl};ml(()=>xs(uu,o.ai.horizontal),()=>{const qs=Tr.verticalTextBox;return M.allowVerticalPlacement&&Sn.numVerticalGlyphVertices>0&&qs?xs(qs,o.ai.vertical):{box:null,offscreen:null}}),Js(yo&&yo.placeable)}else{let xs=o.av[(Oo=($i=this.prevPlacement)===null||$i===void 0?void 0:$i.variableOffsets[Sn.crossTileID])===null||Oo===void 0?void 0:Oo.anchor];const qs=(rl,Md,Bh)=>{const Oh=rl.x2-rl.x1,Sd=rl.y2-rl.y1,ic=Sn.textBoxScale,Ih=Tt&&Bt==="never"?Md:null;let Ta=null,Au=pt==="never"?1:2,Ed="never";xs&&Au++;for(let Cp=0;Cp<Au;Cp++){for(let Ec=sa;Ec<Pl;Ec++){const kA=M.textAnchorOffsets.get(Ec);if(xs&&kA.textAnchor!==xs)continue;const Ga=this.attemptAnchorPlacement(kA,rl,Oh,Sd,ic,Rt,zt,we,bn,te,Ze,Ed,Sn,M,Bh,j,$,Ih,vn);if(Ga&&(Ta=Ga.placedGlyphBoxes,Ta&&Ta.placeable))return Si=!0,xo=Ga.shift,Ta}xs?xs=null:Ed=pt}return _&&!Ta&&(Ta={box:this.collisionIndex.placeCollisionBox(uu,"always",we,bn,te,zt,Rt,j,Ze.predicate,vn,void 0,In).box,offscreen:!1,placeable:!1,occluded:!1}),Ta};ml(()=>qs(uu,Tr.iconBox,o.ai.horizontal),()=>{const rl=Tr.verticalTextBox;return M.allowVerticalPlacement&&(!yo||!yo.placeable)&&Sn.numVerticalGlyphVertices>0&&rl?qs(rl,Tr.verticalIconBox,o.ai.vertical):{box:null,occluded:!0,offscreen:null}}),yo&&(Si=yo.placeable,No=yo.offscreen);const nl=Js(yo&&yo.placeable);if(!Si&&this.prevPlacement){const rl=this.prevPlacement.variableOffsets[Sn.crossTileID];rl&&(this.variableOffsets[Sn.crossTileID]=rl,this.markUsedJustification(M,rl.anchor,Sn,nl))}}}if(Wo=yo,Si=Wo&&Wo.placeable,No=Wo&&Wo.offscreen,Sn.useRuntimeCollisionCircles){const Js=M.text.placedSymbolArray.get(Sn.centerJustifiedTextSymbolIndex),ml=o.aj(M.textSizeData,$e,Js),sa=R.get("text-padding");ds=this.collisionIndex.placeCollisionCircles(pt,Js,M.lineVertexArray,M.glyphOffsetArray,ml,te,se,_,zt,Ze.predicate,Sn.collisionCircleDiameter,sa,j,vn),ds.circles.length&&ds.collisionDetected&&!_&&o.w("Collisions detected, but collision boxes are not shown"),Si=vt||ds.circles.length>0&&!ds.collisionDetected,No=No&&ds.offscreen}if(Tr.iconFeatureIndex&&(pl=Tr.iconFeatureIndex),Tr.iconBox){const Js=ml=>this.collisionIndex.placeCollisionBox(ml,Bt,we,bn,te,zt,Rt,$,Ze.predicate,vn,Tt&&xo?xo:void 0,In);ka&&ka.placeable&&Tr.verticalIconBox?(Wa=Js(Tr.verticalIconBox),jo=Wa.placeable):(Wa=Js(Tr.iconBox),jo=Wa.placeable),No=No&&Wa.offscreen}const OA=ft||Sn.numHorizontalGlyphVertices===0&&Sn.numVerticalGlyphVertices===0,IA=lt||Sn.numIconVertices===0;OA||IA?IA?OA||(jo=jo&&Si):Si=jo&&Si:jo=Si=jo&&Si;const Vu=jo&&Wa.placeable;if(Si&&Wo.placeable&&this.collisionIndex.insertCollisionBox(Wo.box,pt,R.get("text-ignore-placement"),M.bucketInstanceId,ka&&ka.placeable&&fl?fl:$u,Ze.ID),Vu&&this.collisionIndex.insertCollisionBox(Wa.box,Bt,R.get("icon-ignore-placement"),M.bucketInstanceId,pl,Ze.ID),ds&&Si&&this.collisionIndex.insertCollisionCircles(ds.circles,pt,R.get("text-ignore-placement"),M.bucketInstanceId,$u,Ze.ID),_&&this.storeCollisionData(M.bucketInstanceId,Bi,Tr,Wo,Wa,ds),Sn.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[Sn.crossTileID]=new Ea((Si||Zt)&&!(Wo!=null&&Wo.occluded),(jo||_n)&&!(Wa!=null&&Wa.occluded),No||M.justReloaded),c[Sn.crossTileID]=!0};if(tn){if(l.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Sn=M.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Tr=Sn.length-1;Tr>=0;--Tr){const Bi=Sn[Tr];Wn(M.symbolInstances.get(Bi),M.collisionArrays[Bi],Bi)}}else for(let Sn=l.symbolInstanceStart;Sn<l.symbolInstanceEnd;Sn++)Wn(M.symbolInstances.get(Sn),M.collisionArrays[Sn],Sn);M.justReloaded=!1}storeCollisionData(l,c,_,M,R,j){if(_.textBox||_.iconBox){let $,te;this.collisionBoxArrays.has(l)?$=this.collisionBoxArrays.get(l):($=new Map,this.collisionBoxArrays.set(l,$)),$.has(c)?te=$.get(c):(te={text:null,icon:null},$.set(c,te)),_.textBox&&(te.text=M.box),_.iconBox&&(te.icon=R.box)}if(j){let $=this.collisionCircleArrays[l];$===void 0&&($=this.collisionCircleArrays[l]=[]);for(let te=0;te<j.circles.length;te+=4)$.push(j.circles[te+0]-oo),$.push(j.circles[te+1]-oo),$.push(j.circles[te+2]),$.push(j.collisionDetected?1:0)}}markUsedJustification(l,c,_,M){let R;R=M===o.ai.vertical?_.verticalPlacedTextSymbolIndex:{left:_.leftJustifiedTextSymbolIndex,center:_.centerJustifiedTextSymbolIndex,right:_.rightJustifiedTextSymbolIndex}[o.ax(c)];const j=[_.leftJustifiedTextSymbolIndex,_.centerJustifiedTextSymbolIndex,_.rightJustifiedTextSymbolIndex,_.verticalPlacedTextSymbolIndex];for(const $ of j)$>=0&&(l.text.placedSymbolArray.get($).crossTileID=R>=0&&$!==R?0:_.crossTileID)}markUsedOrientation(l,c,_){const M=c===o.ai.horizontal||c===o.ai.horizontalOnly?c:0,R=c===o.ai.vertical?c:0,j=[_.leftJustifiedTextSymbolIndex,_.centerJustifiedTextSymbolIndex,_.rightJustifiedTextSymbolIndex];for(const $ of j)l.text.placedSymbolArray.get($).placedOrientation=M;_.verticalPlacedTextSymbolIndex&&(l.text.placedSymbolArray.get(_.verticalPlacedTextSymbolIndex).placedOrientation=R)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;const c=this.prevPlacement;let _=!1;this.prevZoomAdjustment=c?c.zoomAdjustment(this.transform.zoom):0;const M=c?c.symbolFadeChange(l):1,R=c?c.opacities:{},j=c?c.variableOffsets:{},$=c?c.placedOrientations:{};for(const te in this.placements){const se=this.placements[te],we=R[te];we?(this.opacities[te]=new La(we,M,se.text,se.icon),_=_||se.text!==we.text.placed||se.icon!==we.icon.placed):(this.opacities[te]=new La(null,M,se.text,se.icon,se.skipFade),_=_||se.text||se.icon)}for(const te in R){const se=R[te];if(!this.opacities[te]){const we=new La(se,M,!1,!1);we.isHidden()||(this.opacities[te]=we,_=_||se.text.placed||se.icon.placed)}}for(const te in j)this.variableOffsets[te]||!this.opacities[te]||this.opacities[te].isHidden()||(this.variableOffsets[te]=j[te]);for(const te in $)this.placedOrientations[te]||!this.opacities[te]||this.opacities[te].isHidden()||(this.placedOrientations[te]=$[te]);if(c&&c.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");_?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=c?c.lastPlacementChangeTime:l)}updateLayerOpacities(l,c){const _={};for(const M of c){const R=M.getBucket(l);R&&M.latestFeatureIndex&&l.id===R.layerIds[0]&&this.updateBucketOpacities(R,M.tileID,_,M.collisionBoxArray)}}updateBucketOpacities(l,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 R=l.layers[0],j=R.layout,$=new La(null,0,!1,!1,!0),te=j.get("text-allow-overlap"),se=j.get("icon-allow-overlap"),we=R._unevaluatedLayout.hasValue("text-variable-anchor")||R._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ie=j.get("text-rotation-alignment")==="map",Re=j.get("text-pitch-alignment")==="map",$e=j.get("icon-text-fit")!=="none",Ze=new La(null,0,te&&(se||!l.hasIconData()||j.get("icon-optional")),se&&(te||!l.hasTextData()||j.get("text-optional")),!0);!l.collisionArrays&&M&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(M);const ft=(pt,vt,Bt)=>{for(let kt=0;kt<vt/4;kt++)pt.opacityVertexArray.emplaceBack(Bt);pt.hasVisibleVertices=pt.hasVisibleVertices||Bt!==gn},lt=this.collisionBoxArrays.get(l.bucketInstanceId);for(let pt=0;pt<l.symbolInstances.length;pt++){const vt=l.symbolInstances.get(pt),{numHorizontalGlyphVertices:Bt,numVerticalGlyphVertices:kt,crossTileID:Rt}=vt;let zt=this.opacities[Rt];_[Rt]?zt=$:zt||(zt=Ze,this.opacities[Rt]=zt),_[Rt]=!0;const Tt=vt.numIconVertices>0,tn=this.placedOrientations[vt.crossTileID],Zt=tn===o.ai.vertical,_n=tn===o.ai.horizontal||tn===o.ai.horizontalOnly;if(Bt>0||kt>0){const vn=wt(zt.text);ft(l.text,Bt,Zt?gn:vn),ft(l.text,kt,_n?gn:vn);const In=zt.text.isHidden();[vt.rightJustifiedTextSymbolIndex,vt.centerJustifiedTextSymbolIndex,vt.leftJustifiedTextSymbolIndex].forEach(Tr=>{Tr>=0&&(l.text.placedSymbolArray.get(Tr).hidden=In||Zt?1:0)}),vt.verticalPlacedTextSymbolIndex>=0&&(l.text.placedSymbolArray.get(vt.verticalPlacedTextSymbolIndex).hidden=In||_n?1:0);const Wn=this.variableOffsets[vt.crossTileID];Wn&&this.markUsedJustification(l,Wn.anchor,vt,tn);const Sn=this.placedOrientations[vt.crossTileID];Sn&&(this.markUsedJustification(l,"left",vt,Sn),this.markUsedOrientation(l,Sn,vt))}if(Tt){const vn=wt(zt.icon),In=!($e&&vt.verticalPlacedIconSymbolIndex&&Zt);vt.placedIconSymbolIndex>=0&&(ft(l.icon,vt.numIconVertices,In?vn:gn),l.icon.placedSymbolArray.get(vt.placedIconSymbolIndex).hidden=zt.icon.isHidden()),vt.verticalPlacedIconSymbolIndex>=0&&(ft(l.icon,vt.numVerticalIconVertices,In?gn:vn),l.icon.placedSymbolArray.get(vt.verticalPlacedIconSymbolIndex).hidden=zt.icon.isHidden())}const bn=lt&<.has(pt)?lt.get(pt):{text:null,icon:null};if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){const vn=l.collisionArrays[pt];if(vn){let In=new o.P(0,0);if(vn.textBox||vn.verticalTextBox){let Wn=!0;if(we){const Sn=this.variableOffsets[Rt];Sn?(In=Al(Sn.anchor,Sn.width,Sn.height,Sn.textOffset,Sn.textBoxScale),Ie&&In._rotate(Re?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Wn=!1}if(vn.textBox||vn.verticalTextBox){let Sn;vn.textBox&&(Sn=Zt),vn.verticalTextBox&&(Sn=_n),Pu(l.textCollisionBox.collisionVertexArray,zt.text.placed,!Wn||Sn,bn.text,In.x,In.y)}}if(vn.iconBox||vn.verticalIconBox){const Wn=!!(!_n&&vn.verticalIconBox);let Sn;vn.iconBox&&(Sn=Wn),vn.verticalIconBox&&(Sn=!Wn),Pu(l.iconCollisionBox.collisionVertexArray,zt.icon.placed,Sn,bn.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 _=this.zoomAtLastRecencyCheck===c?1-this.zoomAdjustment(c):1;return this.zoomAtLastRecencyCheck=c,this.commitTime+this.fadeDuration*_>l}setStale(){this.stale=!0}}function Pu(T,l,c,_,M,R){_&&_.length!==0||(_=[0,0,0,0]);const j=_[0]-oo,$=_[1]-oo,te=_[2]-oo,se=_[3]-oo;T.emplaceBack(l?1:0,c?1:0,M||0,R||0,j,$),T.emplaceBack(l?1:0,c?1:0,M||0,R||0,te,$),T.emplaceBack(l?1:0,c?1:0,M||0,R||0,te,se),T.emplaceBack(l?1:0,c?1:0,M||0,R||0,j,se)}const tu=Math.pow(2,25),so=Math.pow(2,24),Kr=Math.pow(2,17),Za=Math.pow(2,16),Ps=Math.pow(2,9),ia=Math.pow(2,8),qe=Math.pow(2,1);function wt(T){if(T.opacity===0&&!T.placed)return 0;if(T.opacity===1&&T.placed)return 4294967295;const l=T.placed?1:0,c=Math.floor(127*T.opacity);return c*tu+l*so+c*Kr+l*Za+c*Ps+l*ia+c*qe+l}const gn=0;class qn{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,_,M,R){const j=this._bucketParts;for(;this._currentTileIndex<l.length;)if(c.getBucketParts(j,M,l[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,R())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,j.sort(($,te)=>$.sortKey-te.sortKey));this._currentPartIndex<j.length;)if(c.placeLayerBucketPart(j[this._currentPartIndex],this._seenCrossTileIDs,_),this._currentPartIndex++,R())return!0;return!1}}class An{constructor(l,c,_,M,R,j,$,te){this.placement=new ao(l,c,j,$,te),this._currentPlacementIndex=_.length-1,this._forceFullPlacement=M,this._showCollisionBoxes=R,this._done=!1}isDone(){return this._done}continuePlacement(l,c,_){const M=S.now(),R=()=>!this._forceFullPlacement&&S.now()-M>2;for(;this._currentPlacementIndex>=0;){const j=c[l[this._currentPlacementIndex]],$=this.placement.collisionIndex.transform.zoom;if(j.type==="symbol"&&(!j.minzoom||j.minzoom<=$)&&(!j.maxzoom||j.maxzoom>$)){if(this._inProgressLayer||(this._inProgressLayer=new qn(j)),this._inProgressLayer.continuePlacement(_[j.source],this.placement,this._showCollisionBoxes,j,R))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}const sr=512/o.X/2;class Pi{constructor(l,c,_){this.tileID=l,this.bucketInstanceId=_,this._symbolsByKey={};const M=new Map;for(let R=0;R<c.length;R++){const j=c.get(R),$=j.key,te=M.get($);te?te.push(j):M.set($,[j])}for(const[R,j]of M){const $={positions:j.map(te=>({x:Math.floor(te.anchorX*sr),y:Math.floor(te.anchorY*sr)})),crossTileIDs:j.map(te=>te.crossTileID)};if($.positions.length>128){const te=new o.az($.positions.length,16,Uint16Array);for(const{x:se,y:we}of $.positions)te.add(se,we);te.finish(),delete $.positions,$.index=te}this._symbolsByKey[R]=$}}getScaledCoordinates(l,c){const{x:_,y:M,z:R}=this.tileID.canonical,{x:j,y:$,z:te}=c.canonical,se=sr/Math.pow(2,te-R),we=($*o.X+l.anchorY)*se,Ie=M*o.X*sr;return{x:Math.floor((j*o.X+l.anchorX)*se-_*o.X*sr),y:Math.floor(we-Ie)}}findMatches(l,c,_){const M=this.tileID.canonical.z<c.canonical.z?1:Math.pow(2,this.tileID.canonical.z-c.canonical.z);for(let R=0;R<l.length;R++){const j=l.get(R);if(j.crossTileID)continue;const $=this._symbolsByKey[j.key];if(!$)continue;const te=this.getScaledCoordinates(j,c);if($.index){const se=$.index.range(te.x-M,te.y-M,te.x+M,te.y+M).sort();for(const we of se){const Ie=$.crossTileIDs[we];if(!_[Ie]){_[Ie]=!0,j.crossTileID=Ie;break}}}else if($.positions)for(let se=0;se<$.positions.length;se++){const we=$.positions[se],Ie=$.crossTileIDs[se];if(Math.abs(we.x-te.x)<=M&&Math.abs(we.y-te.y)<=M&&!_[Ie]){_[Ie]=!0,j.crossTileID=Ie;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:l})=>l)}}class ho{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Cs{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(l){const c=Math.round((l-this.lng)/360);if(c!==0)for(const _ in this.indexes){const M=this.indexes[_],R={};for(const j in M){const $=M[j];$.tileID=$.tileID.unwrapTo($.tileID.wrap+c),R[$.tileID.key]=$}this.indexes[_]=R}this.lng=l}addBucket(l,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 R=0;R<c.symbolInstances.length;R++)c.symbolInstances.get(R).crossTileID=0;this.usedCrossTileIDs[l.overscaledZ]||(this.usedCrossTileIDs[l.overscaledZ]={});const M=this.usedCrossTileIDs[l.overscaledZ];for(const R in this.indexes){const j=this.indexes[R];if(Number(R)>l.overscaledZ)for(const $ in j){const te=j[$];te.tileID.isChildOf(l)&&te.findMatches(c.symbolInstances,l,M)}else{const $=j[l.scaledTo(Number(R)).key];$&&$.findMatches(c.symbolInstances,l,M)}}for(let R=0;R<c.symbolInstances.length;R++){const j=c.symbolInstances.get(R);j.crossTileID||(j.crossTileID=_.generate(),M[j.crossTileID]=!0)}return this.indexes[l.overscaledZ]===void 0&&(this.indexes[l.overscaledZ]={}),this.indexes[l.overscaledZ][l.key]=new Pi(l,c.symbolInstances,c.bucketInstanceId),!0}removeBucketCrossTileIDs(l,c){for(const _ of c.getCrossTileIDsLists())for(const M of _)delete this.usedCrossTileIDs[l][M]}removeStaleBuckets(l){let c=!1;for(const _ in this.indexes){const M=this.indexes[_];for(const R in M)l[M[R].bucketInstanceId]||(this.removeBucketCrossTileIDs(_,M[R]),delete M[R],c=!0)}return c}}class Ns{constructor(){this.layerIndexes={},this.crossTileIDs=new ho,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(l,c,_){let M=this.layerIndexes[l.id];M===void 0&&(M=this.layerIndexes[l.id]=new Cs);let R=!1;const j={};M.handleWrapJump(_);for(const $ of c){const te=$.getBucket(l);te&&l.id===te.layerIds[0]&&(te.bucketInstanceId||(te.bucketInstanceId=++this.maxBucketInstanceId),M.addBucket($.tileID,te,this.crossTileIDs)&&(R=!0),j[te.bucketInstanceId]=!0)}return M.removeStaleBuckets(j)&&(R=!0),R}pruneUnusedLayers(l){const c={};l.forEach(_=>{c[_]=!0});for(const _ in this.layerIndexes)c[_]||delete this.layerIndexes[_]}}var vA="void main() {fragColor=vec4(1.0);}";const ri={prelude:wi(`#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:wi("","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:wi("",`#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:wi(`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:wi(`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:wi(`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:wi(vA,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:wi(`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:wi(`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:wi("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:wi("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:wi("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:wi(vA,`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:wi(`#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:wi(`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:wi(`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:wi(`#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:wi(`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:wi(`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:wi(`#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:wi(`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:wi(`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:wi(`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:wi(`#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:wi(`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:wi(`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:wi(`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:wi(`#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:wi(`#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:wi("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:wi("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:wi("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:wi("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:wi(`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:wi("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 wi(T,l){const c=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,_=l.match(/in ([\w]+) ([\w]+)/g),M=T.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),R=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),j=R?R.concat(M):M,$={};return{fragmentSource:T=T.replace(c,(te,se,we,Ie,Re)=>($[Re]=!0,se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
in ${we} ${Ie} ${Re};
|
||
#else
|
||
uniform ${we} ${Ie} u_${Re};
|
||
#endif
|
||
`:`
|
||
#ifdef HAS_UNIFORM_u_${Re}
|
||
${we} ${Ie} ${Re} = u_${Re};
|
||
#endif
|
||
`)),vertexSource:l=l.replace(c,(te,se,we,Ie,Re)=>{const $e=Ie==="float"?"vec2":"vec4",Ze=Re.match(/color/)?"color":$e;return $[Re]?se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
uniform lowp float u_${Re}_t;
|
||
in ${we} ${$e} a_${Re};
|
||
out ${we} ${Ie} ${Re};
|
||
#else
|
||
uniform ${we} ${Ie} u_${Re};
|
||
#endif
|
||
`:Ze==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
${Re} = a_${Re};
|
||
#else
|
||
${we} ${Ie} ${Re} = u_${Re};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
${Re} = unpack_mix_${Ze}(a_${Re}, u_${Re}_t);
|
||
#else
|
||
${we} ${Ie} ${Re} = u_${Re};
|
||
#endif
|
||
`:se==="define"?`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
uniform lowp float u_${Re}_t;
|
||
in ${we} ${$e} a_${Re};
|
||
#else
|
||
uniform ${we} ${Ie} u_${Re};
|
||
#endif
|
||
`:Ze==="vec4"?`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
${we} ${Ie} ${Re} = a_${Re};
|
||
#else
|
||
${we} ${Ie} ${Re} = u_${Re};
|
||
#endif
|
||
`:`
|
||
#ifndef HAS_UNIFORM_u_${Re}
|
||
${we} ${Ie} ${Re} = unpack_mix_${Ze}(a_${Re}, u_${Re}_t);
|
||
#else
|
||
${we} ${Ie} ${Re} = u_${Re};
|
||
#endif
|
||
`}),staticAttributes:_,staticUniforms:j}}class Xa{constructor(l,c,_){this.vertexBuffer=l,this.indexBuffer=c,this.segments=_}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var Ai=o.aA([{name:"a_pos",type:"Int16",components:2}]);const ca="#define PROJECTION_MERCATOR",iA="mercator";class ls{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return iA}get shaderDefine(){return ca}get shaderPreludeCode(){return ri.projectionMercator}get vertexShaderPreludeCode(){return ri.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aB.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(l){}getMeshFromTileID(l,c,_,M,R){if(this._cachedMesh)return this._cachedMesh;const j=new o.aC;j.emplaceBack(0,0),j.emplaceBack(o.X,0),j.emplaceBack(0,o.X),j.emplaceBack(o.X,o.X);const $=l.createVertexBuffer(j,Ai.members),te=o.aD.simpleSegment(0,0,4,2),se=new o.aE;se.emplaceBack(1,0,2),se.emplaceBack(1,2,3);const we=l.createIndexBuffer(se);return this._cachedMesh=new Xa($,we,te),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(l){}}function Fr(T,l){const c=o.ab(l.lat,-85.051129,o.aF);return new o.P(o.O(l.lng)*T,o.Q(c)*T)}function Ei(T,l){return new o.Y(l.x/T,l.y/T).toLngLat()}function Ja(T){return T.cameraToCenterDistance*Math.min(.85*Math.tan(o.aa(90-T.pitch)),Math.tan(o.aa(89.25-T.pitch)))}function Rs(T,l){const c=T.canonical,_=l/o.aG(c.z),M=c.x+Math.pow(2,c.z)*T.wrap,R=o.aq(new Float64Array(16));return o.J(R,R,[M*_,c.y*_,0]),o.K(R,R,[_/o.X,_/o.X,1]),R}function So(T,l,c,_,M){const R=o.Y.fromLngLat(T,l),j=M*o.aH(1,T.lat),$=j*Math.cos(o.aa(c)),te=Math.sqrt(j*j-$*$),se=te*Math.sin(o.aa(-_)),we=te*Math.cos(o.aa(-_));return new o.Y(R.x+se,R.y+we,R.z+$)}class Ws{constructor(l=0,c=0,_=0,M=0){if(isNaN(l)||l<0||isNaN(c)||c<0||isNaN(_)||_<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=_,this.right=M}interpolate(l,c,_){return c.top!=null&&l.top!=null&&(this.top=o.y.number(l.top,c.top,_)),c.bottom!=null&&l.bottom!=null&&(this.bottom=o.y.number(l.bottom,c.bottom,_)),c.left!=null&&l.left!=null&&(this.left=o.y.number(l.left,c.left,_)),c.right!=null&&l.right!=null&&(this.right=o.y.number(l.right,c.right,_)),this}getCenter(l,c){const _=o.ab((this.left+l-this.right)/2,0,l),M=o.ab((this.top+c-this.bottom)/2,0,c);return new o.P(_,M)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new Ws(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function hu(T,l){if(!T.renderWorldCopies||T.lngRange)return;const c=l.lng-T.center.lng;l.lng+=c>180?-360:c<-180?360:0}function zl(T){return Math.max(0,Math.floor(T))}class rs{constructor(l,c,_,M,R,j){this._callbacks=l,this._tileSize=512,this._renderWorldCopies=j===void 0||!!j,this._minZoom=c||0,this._maxZoom=_||22,this._minPitch=M??0,this._maxPitch=R??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.N(0,0),this._elevation=0,this._zoom=0,this._tileZoom=zl(this._zoom),this._scale=o.aG(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Ws,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(l,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=zl(this._zoom),this._scale=o.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 Ws(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=!_&&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 o.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(l){const c=o.aI(l,-180,180)*Math.PI/180;var _,M,R,j,$,te,se,we,Ie;this._bearingInRadians!==c&&(this._unmodified=!1,this._bearingInRadians=c,this._calcMatrices(),this._rotationMatrix=g(),_=this._rotationMatrix,R=-this._bearingInRadians,j=(M=this._rotationMatrix)[0],$=M[1],te=M[2],se=M[3],we=Math.sin(R),Ie=Math.cos(R),_[0]=j*Ie+te*we,_[1]=$*Ie+se*we,_[2]=j*-we+te*Ie,_[3]=$*-we+se*Ie)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(l){const c=o.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 o.aJ(this._fovInRadians)}setFov(l){l=o.ab(l,.1,150),this.fov!==l&&(this._unmodified=!1,this._fovInRadians=o.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=o.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,_){this._unmodified=!1,this._edgeInsets.interpolate(l,c,_),this._constrain(),this._calcMatrices()}resize(l,c,_=!0){this._width=l,this._height=c,_&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new Ut([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(l){l?(this._lngRange=[l.getWest(),l.getEast()],this._latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,o.aF])}getConstrained(l,c){return this._callbacks.getConstrained(l,c)}getCameraQueryGeometry(l,c){if(c.length===1)return[c[0],l];{let _=l.x,M=l.y,R=l.x,j=l.y;for(const $ of c)_=Math.min(_,$.x),M=Math.min(M,$.y),R=Math.max(R,$.x),j=Math.max(j,$.y);return[new o.P(_,M),new o.P(R,M),new o.P(R,j),new o.P(_,j),new o.P(_,M)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const l=this._unmodified,{center:c,zoom:_}=this.getConstrained(this.center,this.zoom);this.setCenter(c),this.setZoom(_),this._unmodified=l,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let l=o.aq(new Float64Array(16));o.K(l,l,[this._width/2,-this._height/2,1]),o.J(l,l,[1,-1,0]),this._clipSpaceToPixelsMatrix=l,l=o.aq(new Float64Array(16)),o.K(l,l,[1,-1,1]),o.J(l,l,[-1,-1,0]),o.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,_,M){const R=_!==void 0?_:this.bearing,j=M=M!==void 0?M:this.pitch,$=o.Y.fromLngLat(l,c),te=-Math.cos(o.aa(j)),se=Math.sin(o.aa(j)),we=se*Math.sin(o.aa(R)),Ie=-se*Math.cos(o.aa(R));let Re=this.elevation;const $e=c-Re;let Ze;te*$e>=0||Math.abs(te)<.1?(Ze=1e4,Re=c+Ze*te):Ze=-$e/te;let ft,lt,pt=o.aK(1,$.y),vt=0;do{if(vt+=1,vt>10)break;lt=Ze/pt,ft=new o.Y($.x+we*lt,$.y+Ie*lt),pt=1/ft.meterInMercatorCoordinateUnits()}while(Math.abs(Ze-lt*pt)>1e-12);return{center:ft.toLngLat(),elevation:Re,zoom:o.a8(this.height/2/Math.tan(this.fovInRadians/2)/lt/this.tileSize)}}recalculateZoomAndCenter(l){if(this.elevation-l==0)return;const c=o.aH(1,this.center.lat)*this.worldSize,_=this.cameraToCenterDistance/c,M=o.Y.fromLngLat(this.center,this.elevation),R=So(this.center,this.elevation,this.pitch,this.bearing,_);this._elevation=l;const j=this.calculateCenterFromCameraLngLatAlt(R.toLngLat(),o.aK(R.z,M.y),this.bearing,this.pitch);this._elevation=j.elevation,this._center=j.center,this.setZoom(j.zoom)}getCameraPoint(){const l=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.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=o.aH(1,this.center.lat)*this.worldSize;return So(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/o.X,1/c/o.X]}}class Vs{constructor(l,c){this.min=l,this.max=c,this.center=o.aL([],o.aM([],this.min,this.max),.5)}quadrant(l){const c=[l%2==0,l<2],_=o.aN(this.min),M=o.aN(this.max);for(let R=0;R<c.length;R++)_[R]=c[R]?this.min[R]:this.center[R],M[R]=c[R]?this.center[R]:this.max[R];return M[2]=this.max[2],new Vs(_,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 _=0;_<l.planes.length;_++){const M=this.intersectsPlane(l.planes[_]);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],_=l[3];for(let M=0;M<3;M++)l[M]>0?(c+=l[M]*this.min[M],_+=l[M]*this.max[M]):(_+=l[M]*this.min[M],c+=l[M]*this.max[M]);return c>=0?2:_<0?0:1}}class fo{distanceToTile2d(l,c,_,M){const R=M.distanceX([l,c]),j=M.distanceY([l,c]);return Math.hypot(R,j)}getWrap(l,c,_){return _}getTileAABB(l,c,_,M){var R,j;let $=_,te=_;if(M.terrain){const we=new o.S(l.z,c,l.z,l.x,l.y),Ie=M.terrain.getMinMaxElevation(we);$=(R=Ie.minElevation)!==null&&R!==void 0?R:_,te=(j=Ie.maxElevation)!==null&&j!==void 0?j:_}const se=1<<l.z;return new Vs([c+l.x/se,l.y/se,$],[c+(l.x+1)/se,(l.y+1)/se,te])}allowVariableZoom(l,c){const _=l.fov*(Math.abs(Math.cos(l.rollInRadians))*l.height+Math.abs(Math.sin(l.rollInRadians))*l.width)/l.height,M=o.ab(78.5-_/2,0,60);return!!c.terrain||l.pitch>M||l.padding.top>=.1}allowWorldCopies(){return!0}recalculateCache(){}}class ms{constructor(l,c,_){this.points=l,this.planes=c,this.aabb=_}static fromInvProjectionMatrix(l,c=1,_=0){const M=Math.pow(2,_),R=[[-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 we=1/(se=o.al([],se,l))[3]/c*M;return o.aO(se,se,[we,we,1/se[3],we])}),j=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(se=>{const we=o.aP([],R[se[0]],R[se[1]]),Ie=o.aP([],R[se[2]],R[se[1]]),Re=o.aQ([],o.aR([],we,Ie)),$e=-o.aS(Re,R[se[1]]);return Re.concat($e)}),$=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],te=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const se of R)for(let we=0;we<3;we++)$[we]=Math.min($[we],se[we]),te[we]=Math.max(te[we],se[we]);return new ms(R,j,new Vs($,te))}}class Ms{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,_){return this._helper.interpolatePadding(l,c,_)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,c,_=!0){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 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,_,M,R){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new rs({calcMatrices:()=>{this._calcMatrices()},getConstrained:(j,$)=>this.getConstrained(j,$)},l,c,_,M,R),this._coveringTilesDetailsProvider=new fo}clone(){const l=new Ms;return l.apply(this),l}apply(l,c,_){this._helper.apply(l,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 o.aT(0,l)];if(this._helper._renderWorldCopies){const _=this.screenPointToMercatorCoordinate(new o.P(0,0)),M=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,0)),R=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,this._helper._height)),j=this.screenPointToMercatorCoordinate(new o.P(0,this._helper._height)),$=Math.floor(Math.min(_.x,M.x,R.x,j.x)),te=Math.floor(Math.max(_.x,M.x,R.x,j.x)),se=1;for(let we=$-se;we<=te+se;we++)we!==0&&c.push(new o.aT(we,l))}return c}getCameraFrustum(){return ms.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){const c=this.screenPointToLocation(this.centerPoint,l),_=l?l.getElevationForLngLatZoom(c,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(_)}setLocationAtPoint(l,c){const _=o.aH(this.elevation,this.center.lat),M=this.screenPointToMercatorCoordinateAtZ(c,_),R=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,_),j=o.Y.fromLngLat(l),$=new o.Y(j.x-(M.x-R.x),j.y-(M.y-R.y));this.setCenter($==null?void 0:$.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(l,c){return c?this.coordinatePoint(o.Y.fromLngLat(l),c.getElevationForLngLatZoom(l,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(o.Y.fromLngLat(l))}screenPointToLocation(l,c){var _;return(_=this.screenPointToMercatorCoordinate(l,c))===null||_===void 0?void 0:_.toLngLat()}screenPointToMercatorCoordinate(l,c){if(c){const _=c.pointCoordinate(l);if(_!=null)return _}return this.screenPointToMercatorCoordinateAtZ(l)}screenPointToMercatorCoordinateAtZ(l,c){const _=c||0,M=[l.x,l.y,0,1],R=[l.x,l.y,1,1];o.al(M,M,this._pixelMatrixInverse),o.al(R,R,this._pixelMatrixInverse);const j=M[3],$=R[3],te=M[1]/j,se=R[1]/$,we=M[2]/j,Ie=R[2]/$,Re=we===Ie?0:(_-we)/(Ie-we);return new o.Y(o.y.number(M[0]/j,R[0]/$,Re)/this.worldSize,o.y.number(te,se,Re)/this.worldSize,_)}coordinatePoint(l,c=0,_=this._pixelMatrix){const M=[l.x*this.worldSize,l.y*this.worldSize,c,1];return o.al(M,M,_),new o.P(M[0]/M[3],M[1]/M[3])}getBounds(){const l=Math.max(0,this._helper._height/2-Ja(this));return new Ut().extend(this.screenPointToLocation(new o.P(0,l))).extend(this.screenPointToLocation(new o.P(this._helper._width,l))).extend(this.screenPointToLocation(new o.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new o.P(0,this._helper._height)))}isPointOnMapSurface(l,c){return c?c.pointCoordinate(l)!=null:l.y>this.height/2-Ja(this)}calculatePosMatrix(l,c=!1,_){var M;const R=(M=l.key)!==null&&M!==void 0?M:o.aU(l.wrap,l.canonical.z,l.canonical.z,l.canonical.x,l.canonical.y),j=c?this._alignedPosMatrixCache:this._posMatrixCache;if(j.has(R)){const se=j.get(R);return _?se.f32:se.f64}const $=Rs(l,this.worldSize);o.L($,c?this._alignedProjMatrix:this._viewProjMatrix,$);const te={f64:$,f32:new Float32Array($)};return j.set(R,te),_?te.f32:te.f64}calculateFogMatrix(l){const c=l.key,_=this._fogMatrixCacheF32;if(_.has(c))return _.get(c);const M=Rs(l,this.worldSize);return o.L(M,this._fogMatrix,M),_.set(c,new Float32Array(M)),_.get(c)}getConstrained(l,c){c=o.ab(+c,this.minZoom,this.maxZoom);const _={center:new o.N(l.lng,l.lat),zoom:c};let M=this._helper._lngRange;this._helper._renderWorldCopies||M!==null||(M=[-179.9999999999,180-1e-10]);const R=this.tileSize*o.aG(_.zoom);let j=0,$=R,te=0,se=R,we=0,Ie=0;const{x:Re,y:$e}=this.size;if(this._helper._latRange){const Bt=this._helper._latRange;j=o.Q(Bt[1])*R,$=o.Q(Bt[0])*R,$-j<$e&&(we=$e/($-j))}M&&(te=o.aI(o.O(M[0])*R,0,R),se=o.aI(o.O(M[1])*R,0,R),se<te&&(se+=R),se-te<Re&&(Ie=Re/(se-te)));const{x:Ze,y:ft}=Fr(R,l);let lt,pt;const vt=Math.max(Ie||0,we||0);if(vt){const Bt=new o.P(Ie?(se+te)/2:Ze,we?($+j)/2:ft);return _.center=Ei(R,Bt).wrap(),_.zoom+=o.a8(vt),_}if(this._helper._latRange){const Bt=$e/2;ft-Bt<j&&(pt=j+Bt),ft+Bt>$&&(pt=$-Bt)}if(M){const Bt=(te+se)/2;let kt=Ze;this._helper._renderWorldCopies&&(kt=o.aI(Ze,Bt-R/2,Bt+R/2));const Rt=Re/2;kt-Rt<te&&(lt=te+Rt),kt+Rt>se&&(lt=se-Rt)}if(lt!==void 0||pt!==void 0){const Bt=new o.P(lt??Ze,pt??ft);_.center=Ei(R,Bt).wrap()}return _}calculateCenterFromCameraLngLatAlt(l,c,_,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,c,_,M)}_calculateNearFarZIfNeeded(l,c,_){if(!this._helper.autoCalculateNearFarZ)return;const M=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),R=l-M*this._helper._pixelPerMeter/Math.cos(c),j=M<0?R:l,$=Math.PI/2+this.pitchInRadians,te=o.aa(this.fov)*(Math.abs(Math.cos(o.aa(this.roll)))*this.height+Math.abs(Math.sin(o.aa(this.roll)))*this.width)/this.height*(.5+_.y/this.height),se=Math.sin(te)*j/Math.sin(o.ab(Math.PI-$-te,.01,Math.PI-.01)),we=Ja(this),Ie=Math.atan(we/this._helper.cameraToCenterDistance),Re=o.aa(.75),$e=Ie>Re?2*Ie*(.5+_.y/(2*we)):Re,Ze=Math.sin($e)*j/Math.sin(o.ab(Math.PI-$-$e,.01,Math.PI-.01)),ft=Math.min(se,Ze);this._helper._farZ=1.01*(Math.cos(Math.PI/2-c)*ft+j),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const l=this.centerOffset,c=Fr(this.worldSize,this.center),_=c.x,M=c.y;this._helper._pixelPerMeter=o.aH(1,this.center.lat)*this.worldSize;const R=o.aa(Math.min(this.pitch,89.25)),j=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(R));let $;this._calculateNearFarZIfNeeded(j,R,l),$=new Float64Array(16),o.aV($,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),o.an(this._invProjMatrix,$),$[8]=2*-l.x/this._helper._width,$[9]=2*l.y/this._helper._height,this._projectionMatrix=o.aW($),o.K($,$,[1,-1,1]),o.J($,$,[0,0,-this._helper.cameraToCenterDistance]),o.aX($,$,-this.rollInRadians),o.aY($,$,this.pitchInRadians),o.aX($,$,-this.bearingInRadians),o.J($,$,[-_,-M,0]),this._mercatorMatrix=o.K([],$,[this.worldSize,this.worldSize,this.worldSize]),o.K($,$,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=o.L(new Float64Array(16),this.clipSpaceToPixelsMatrix,$),o.J($,$,[0,0,-this.elevation]),this._viewProjMatrix=$,this._invViewProjMatrix=o.an([],$);const te=[0,0,-1,1];o.al(te,te,this._invViewProjMatrix),this._cameraPosition=[te[0]/te[3],te[1]/te[3],te[2]/te[3]],this._fogMatrix=new Float64Array(16),o.aV(this._fogMatrix,this.fovInRadians,this.width/this.height,j,this._helper._farZ),this._fogMatrix[8]=2*-l.x/this.width,this._fogMatrix[9]=2*l.y/this.height,o.K(this._fogMatrix,this._fogMatrix,[1,-1,1]),o.J(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),o.aX(this._fogMatrix,this._fogMatrix,-this.rollInRadians),o.aY(this._fogMatrix,this._fogMatrix,this.pitchInRadians),o.aX(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),o.J(this._fogMatrix,this._fogMatrix,[-_,-M,0]),o.K(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),o.J(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=o.L(new Float64Array(16),this.clipSpaceToPixelsMatrix,$);const se=this._helper._width%2/2,we=this._helper._height%2/2,Ie=Math.cos(this.bearingInRadians),Re=Math.sin(-this.bearingInRadians),$e=_-Math.round(_)+Ie*se+Re*we,Ze=M-Math.round(M)+Ie*we+Re*se,ft=new Float64Array($);if(o.J(ft,ft,[$e>.5?$e-1:$e,Ze>.5?Ze-1:Ze,0]),this._alignedProjMatrix=ft,$=o.an(new Float64Array(16),this._pixelMatrix),!$)throw new Error("failed to invert matrix");this._pixelMatrixInverse=$,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const l=this.screenPointToMercatorCoordinate(new o.P(0,0)),c=[l.x*this.worldSize,l.y*this.worldSize,0,1];return o.al(c,c,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const l=o.aH(1,this.center.lat)*this.worldSize;return So(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/l).toLngLat()}lngLatToCameraDepth(l,c){const _=o.Y.fromLngLat(l),M=[_.x*this.worldSize,_.y*this.worldSize,c,1];return o.al(M,M,this._viewProjMatrix),M[2]/M[3]}getProjectionData(l){const{overscaledTileID:c,aligned:_,applyTerrainMatrix:M}=l,R=this._helper.getMercatorTileCoordinates(c),j=c?this.calculatePosMatrix(c,_,!0):null;let $;return $=c&&c.terrainRttPosMatrix32f&&M?c.terrainRttPosMatrix32f:j||o.aZ(),{mainMatrix:$,tileMercatorCoords:R,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:$}}isLocationOccluded(l){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(l,c,_){return 1}transformLightDirection(l){return o.aN(l)}getRayDirectionFromPixel(l){throw new Error("Not implemented.")}projectTileCoordinates(l,c,_,M){const R=this.calculatePosMatrix(_);let j;M?(j=[l,c,M(l,c),1],o.al(j,j,R)):(j=[l,c,0,1],yi(j,j,R));const $=j[3];return{point:new o.P(j[0]/$,j[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}populateCache(l){for(const c of l)this.calculatePosMatrix(c)}getMatrixForModel(l,c){const _=o.Y.fromLngLat(l,c),M=_.meterInMercatorCoordinateUnits(),R=o.a_();return o.J(R,R,[_.x,_.y,_.z]),o.aX(R,R,Math.PI),o.aY(R,R,Math.PI/2),o.K(R,R,[-M,M,M]),R}getProjectionDataForCustomLayer(l=!0){const c=new o.S(0,0,0,0,0),_=this.getProjectionData({overscaledTileID:c,applyGlobeMatrix:l}),M=Rs(c,this.worldSize);o.L(M,this._viewProjMatrix,M),_.tileMercatorCoords=[0,0,1,1];const R=[o.X,o.X,this.worldSize/this._helper.pixelsPerMeter],j=o.a$();return o.K(j,M,R),_.fallbackMatrix=j,_.mainMatrix=j,_}getFastPathSimpleProjectionMatrix(l){return this.calculatePosMatrix(l)}}function el(){o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Ds(T){if(T.useSlerp)if(T.k<1){const l=o.b0(T.startEulerAngles.roll,T.startEulerAngles.pitch,T.startEulerAngles.bearing),c=o.b0(T.endEulerAngles.roll,T.endEulerAngles.pitch,T.endEulerAngles.bearing),_=new Float64Array(4);o.b1(_,l,c,T.k);const M=o.b2(_);T.tr.setRoll(M.roll),T.tr.setPitch(M.pitch),T.tr.setBearing(M.bearing)}else T.tr.setRoll(T.endEulerAngles.roll),T.tr.setPitch(T.endEulerAngles.pitch),T.tr.setBearing(T.endEulerAngles.bearing);else T.tr.setRoll(o.y.number(T.startEulerAngles.roll,T.endEulerAngles.roll,T.k)),T.tr.setPitch(o.y.number(T.startEulerAngles.pitch,T.endEulerAngles.pitch,T.k)),T.tr.setBearing(o.y.number(T.startEulerAngles.bearing,T.endEulerAngles.bearing,T.k))}function El(T,l,c,_,M){const R=M.padding,j=Fr(M.worldSize,c.getNorthWest()),$=Fr(M.worldSize,c.getNorthEast()),te=Fr(M.worldSize,c.getSouthEast()),se=Fr(M.worldSize,c.getSouthWest()),we=o.aa(-_),Ie=j.rotate(we),Re=$.rotate(we),$e=te.rotate(we),Ze=se.rotate(we),ft=new o.P(Math.max(Ie.x,Re.x,Ze.x,$e.x),Math.max(Ie.y,Re.y,Ze.y,$e.y)),lt=new o.P(Math.min(Ie.x,Re.x,Ze.x,$e.x),Math.min(Ie.y,Re.y,Ze.y,$e.y)),pt=ft.sub(lt),vt=(M.width-(R.left+R.right+l.left+l.right))/pt.x,Bt=(M.height-(R.top+R.bottom+l.top+l.bottom))/pt.y;if(Bt<0||vt<0)return void el();const kt=Math.min(o.a8(M.scale*Math.min(vt,Bt)),T.maxZoom),Rt=o.P.convert(T.offset),zt=new o.P((l.left-l.right)/2,(l.top-l.bottom)/2).rotate(o.aa(_)),Tt=Rt.add(zt).mult(M.scale/o.aG(kt));return{center:Ei(M.worldSize,j.add(te).div(2).sub(Tt)),zoom:kt,bearing:_}}class oA{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,_){l.around.distSqr(c.centerPoint)<.01||c.setLocationAtPoint(_,l.around)}cameraForBoxAndBearing(l,c,_,M,R){return El(l,c,_,M,R)}handleJumpToCenterZoom(l,c){l.zoom!==(c.zoom!==void 0?+c.zoom:l.zoom)&&l.setZoom(+c.zoom),c.center!==void 0&&l.setCenter(o.N.convert(c.center))}handleEaseTo(l,c){const _=l.zoom,M=l.padding,R={roll:l.roll,pitch:l.pitch,bearing:l.bearing},j={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},$=c.zoom!==void 0,te=!l.isPaddingEqual(c.padding);let se=!1;const we=$?+c.zoom:l.zoom;let Ie=l.centerPoint.add(c.offsetAsPoint);const Re=l.screenPointToLocation(Ie),{center:$e,zoom:Ze}=l.getConstrained(o.N.convert(c.center||Re),we??_);hu(l,$e);const ft=Fr(l.worldSize,Re),lt=Fr(l.worldSize,$e).sub(ft),pt=o.aG(Ze-_);return se=Ze!==_,{easeFunc:vt=>{if(se&&l.setZoom(o.y.number(_,Ze,vt)),o.b3(R,j)||Ds({startEulerAngles:R,endEulerAngles:j,tr:l,k:vt,useSlerp:R.roll!=j.roll}),te&&(l.interpolatePadding(M,c.padding,vt),Ie=l.centerPoint.add(c.offsetAsPoint)),c.around)l.setLocationAtPoint(c.around,c.aroundPoint);else{const Bt=o.aG(l.zoom-_),kt=Ze>_?Math.min(2,pt):Math.max(.5,pt),Rt=Math.pow(kt,1-vt),zt=Ei(l.worldSize,ft.add(lt.mult(vt*Rt)).mult(Bt));l.setLocationAtPoint(l.renderWorldCopies?zt.wrap():zt,Ie)}},isZooming:se,elevationCenter:$e}}handleFlyTo(l,c){const _=c.zoom!==void 0,M=l.zoom,R=l.getConstrained(o.N.convert(c.center||c.locationAtOffset),_?+c.zoom:M),j=R.center,$=R.zoom;hu(l,j);const te=Fr(l.worldSize,c.locationAtOffset),se=Fr(l.worldSize,j).sub(te),we=se.mag(),Ie=o.aG($-M);let Re;if(c.minZoom!==void 0){const $e=Math.min(+c.minZoom,M,$),Ze=l.getConstrained(j,$e).zoom;Re=o.aG(Ze-M)}return{easeFunc:($e,Ze,ft,lt)=>{l.setZoom($e===1?$:M+o.a8(Ze));const pt=$e===1?j:Ei(l.worldSize,te.add(se.mult(ft)).mult(Ze));l.setLocationAtPoint(l.renderWorldCopies?pt.wrap():pt,lt)},scaleOfZoom:Ie,targetCenter:j,scaleOfMinZoom:Re,pixelPathLength:we}}}class Vi{constructor(l,c,_){this.blendFunction=l,this.blendColor=c,this.mask=_}}Vi.Replace=[1,0],Vi.disabled=new Vi(Vi.Replace,o.b4.transparent,[!1,!1,!1,!1]),Vi.unblended=new Vi(Vi.Replace,o.b4.transparent,[!0,!0,!0,!0]),Vi.alphaBlended=new Vi([1,771],o.b4.transparent,[!0,!0,!0,!0]);const nu=2305;class Ui{constructor(l,c,_){this.enable=l,this.mode=c,this.frontFace=_}}Ui.disabled=new Ui(!1,1029,nu),Ui.backCCW=new Ui(!0,1029,nu),Ui.frontCCW=new Ui(!0,1028,nu);class Jr{constructor(l,c,_){this.func=l,this.mask=c,this.range=_}}Jr.ReadOnly=!1,Jr.ReadWrite=!0,Jr.disabled=new Jr(519,Jr.ReadOnly,[0,1]);const ru=7680;class Ni{constructor(l,c,_,M,R,j){this.test=l,this.ref=c,this.mask=_,this.fail=M,this.depthFail=R,this.pass=j}}Ni.disabled=new Ni({func:519,mask:0},0,0,ru,ru,ru);const lo=new WeakMap;function Ri(T){var l;if(lo.has(T))return lo.get(T);{const c=(l=T.getParameter(T.VERSION))===null||l===void 0?void 0:l.startsWith("WebGL 2.0");return lo.set(T,c),c}}class J{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.gl;this._texFormat=_.RGBA,this._texType=_.UNSIGNED_BYTE;const M=new o.aC;M.emplaceBack(-1,-1),M.emplaceBack(2,-1),M.emplaceBack(-1,2);const R=new o.aE;R.emplaceBack(0,1,2),this._fullscreenTriangle=new Xa(c.createVertexBuffer(M,Ai.members),c.createIndexBuffer(R),o.aD.simpleSegment(0,0,M.length,R.length)),this._resultBuffer=new Uint8Array(4),c.activeTexture.set(_.TEXTURE1);const j=_.createTexture();_.bindTexture(_.TEXTURE_2D,j),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_S,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_T,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,_.NEAREST),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,_.NEAREST),_.texImage2D(_.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(j),Ri(_)&&(this._pbo=_.createBuffer(),_.bindBuffer(_.PIXEL_PACK_BUFFER,this._pbo),_.bufferData(_.PIXEL_PACK_BUFFER,4,_.STREAM_READ),_.bindBuffer(_.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 _=this._updateCount;return this._readbackQueue?_>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():_>=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 _=this._cachedRenderContext.context,M=_.gl;if(this._bindFramebuffer(),_.viewport.set([0,0,this._texWidth,this._texHeight]),_.clear({color:o.b4.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(_,M.TRIANGLES,Jr.disabled,Ni.disabled,Vi.unblended,Ui.disabled,((R,j)=>({u_input:R,u_output_expected:j}))(l,c),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ri(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 R=M.fenceSync(M.SYNC_GPU_COMMANDS_COMPLETE,0);M.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:R}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const l=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ri(l)){const c=l.clientWaitSync(this._readbackQueue.sync,0,0);if(c===l.WAIT_FAILED)return o.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=J._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 Oe=o.X/128;function ot(T,l){const c=T.granularity!==void 0?Math.max(T.granularity,1):1,_=c+(T.generateBorders?2:0),M=c+(T.extendToNorthPole||T.generateBorders?1:0)+(T.extendToSouthPole||T.generateBorders?1:0),R=_+1,j=M+1,$=T.generateBorders?-1:0,te=T.generateBorders||T.extendToNorthPole?-1:0,se=c+(T.generateBorders?1:0),we=c+(T.generateBorders||T.extendToSouthPole?1:0),Ie=R*j,Re=_*M*6,$e=R*j>65536;if($e&&l==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const Ze=$e||l==="32bit",ft=new Int16Array(2*Ie);let lt=0;for(let Bt=te;Bt<=we;Bt++)for(let kt=$;kt<=se;kt++){let Rt=kt/c*o.X;kt===-1&&(Rt=-64),kt===c+1&&(Rt=o.X+Oe);let zt=Bt/c*o.X;Bt===-1&&(zt=T.extendToNorthPole?o.b6:-64),Bt===c+1&&(zt=T.extendToSouthPole?o.b7:o.X+Oe),ft[lt++]=Rt,ft[lt++]=zt}const pt=Ze?new Uint32Array(Re):new Uint16Array(Re);let vt=0;for(let Bt=0;Bt<M;Bt++)for(let kt=0;kt<_;kt++){const Rt=kt+1+Bt*R,zt=kt+(Bt+1)*R,Tt=kt+1+(Bt+1)*R;pt[vt++]=kt+Bt*R,pt[vt++]=zt,pt[vt++]=Rt,pt[vt++]=Rt,pt[vt++]=zt,pt[vt++]=Tt}return{vertices:ft.buffer.slice(0),indices:pt.buffer.slice(0),uses32bitIndices:Ze}}const Vt=new o.aB({fill:new o.b8(128,2),line:new o.b8(512,0),tile:new o.b8(128,32),stencil:new o.b8(128,1),circle:3});class Ir{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 ri.projectionGlobe}get vertexShaderPreludeCode(){return ri.projectionMercator.vertexSource}get subdivisionGranularity(){return Vt}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(l){this._errorMeasurement||(this._errorMeasurement=new J(l));const c=o.Q(this._errorQueryLatitudeDegrees),_=2*Math.atan(Math.exp(Math.PI-c*Math.PI*2))-.5*Math.PI,M=this._errorMeasurement.updateErrorLoop(c,_),R=S.now();M!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=M,this._errorMeasurementLastChangeTime=R);const j=Math.min(Math.max((R-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=o.b9(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,o.ba(j))}_getMeshKey(l){return`${l.granularity.toString(36)}_${l.generateBorders?"b":""}${l.extendToNorthPole?"n":""}${l.extendToSouthPole?"s":""}`}getMeshFromTileID(l,c,_,M,R){const j=(R==="stencil"?Vt.stencil:Vt.tile).getGranularityForZoomLevel(c.z);return this._getMesh(l,{granularity:j,generateBorders:_,extendToNorthPole:c.y===0&&M,extendToSouthPole:c.y===(1<<c.z)-1&&M})}_getMesh(l,c){const _=this._getMeshKey(c);if(_ in this._tileMeshCache)return this._tileMeshCache[_];const M=function(R,j){const $=ot(j,"16bit"),te=o.aC.deserialize({arrayBuffer:$.vertices,length:$.vertices.byteLength/2/2}),se=o.aE.deserialize({arrayBuffer:$.indices,length:$.indices.byteLength/2/3});return new Xa(R.createVertexBuffer(te,Ai.members),R.createIndexBuffer(se),o.aD.simpleSegment(0,0,te.length,se.length))}(l,c);return this._tileMeshCache[_]=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 Yn=new o.q({type:new o.D(o.v.projection.type)});class si extends o.E{constructor(l){super(),this._transitionable=new o.T(Yn),this.setProjection(l),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.z(0)),this._mercatorProjection=new ls,this._verticalPerspectiveProjection=new Ir}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 o.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,_,M,R){return this.currentProjection.getMeshFromTileID(l,c,_,M,R)}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 ci(T){const l=vi(T.worldSize,T.center.lat);return 2*Math.PI*l}function vr(T,l,c,_,M){const R=1/(1<<M),j=l/o.X*R+_*R,$=o.bd((T/o.X*R+c*R)*Math.PI*2+Math.PI,2*Math.PI),te=2*Math.atan(Math.exp(Math.PI-j*Math.PI*2))-.5*Math.PI,se=Math.cos(te),we=new Float64Array(3);return we[0]=Math.sin($)*se,we[1]=Math.sin(te),we[2]=Math.cos($)*se,we}function kr(T){return function(l,c){const _=Math.cos(c),M=new Float64Array(3);return M[0]=Math.sin(l)*_,M[1]=Math.sin(c),M[2]=Math.cos(l)*_,M}(T.lng*Math.PI/180,T.lat*Math.PI/180)}function vi(T,l){return T/(2*Math.PI)/Math.cos(l*Math.PI/180)}function Eo(T){const l=Math.asin(T[1])/Math.PI*180,c=Math.sqrt(T[0]*T[0]+T[2]*T[2]);if(c>1e-6){const _=T[0]/c,M=Math.acos(T[2]/c),R=(_>0?M:-M)/Math.PI*180;return new o.N(o.aI(R,-180,180),l)}return new o.N(0,l)}function ki(T){return Math.cos(T*Math.PI/180)}function qr(T,l){const c=ki(T),_=ki(l);return o.a8(_/c)}function Hi(T,l){const c=T.rotate(l.bearingInRadians),_=l.zoom+qr(l.center.lat,0),M=o.b9(1/ki(l.center.lat),1/ki(Math.min(Math.abs(l.center.lat),60)),o.bc(_,7,3,0,1)),R=360/ci({worldSize:l.worldSize,center:{lat:l.center.lat}});return new o.N(l.center.lng-c.x*R*M,o.ab(l.center.lat+c.y*R,-85.051129,o.aF))}function Zi(T){const l=.5*T,c=Math.sin(l),_=Math.cos(l);return Math.log(c+_)-Math.log(_-c)}function us(T,l,c,_){const M=T.lat+c*_;if(Math.abs(c)>1){const R=(Math.sign(T.lat+c)!==Math.sign(T.lat)?-Math.abs(T.lat):Math.abs(T.lat))*Math.PI/180,j=Math.abs(T.lat+c)*Math.PI/180,$=Zi(R+_*(j-R)),te=Zi(R),se=Zi(j);return new o.N(T.lng+l*(($-te)/(se-te)),M)}return new o.N(T.lng+l*_,M)}class ya{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,_,M){const R=`${l.z}_${l.x}_${l.y}`,j=this._cache.get(R);if(j)return j;const $=this._cachePrevious.get(R);if($)return this._cache.set(R,$),$;const te=this._aabbFactory(l,c,_,M);return this._cache.set(R,te),this._hadAnyChanges=!0,te}}function Ua(T,l,c){const _=T-l;return _<0?-_:Math.max(0,_-c)}function fu(T,l,c,_,M){const R=T-c;let j;return j=R<0?Math.min(-R,1+R-M):R>1?Math.min(Math.max(R-M,0),1-R):0,Math.max(j,Ua(l,_,M))}class Hs{constructor(){this._aabbCache=new ya(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(l,c,_,M){const R=1<<_.z,j=1/R,$=_.x/R,te=_.y/R;let se=2;return se=Math.min(se,fu(l,c,$,te,j)),se=Math.min(se,fu(l,c,$+.5,-te-j,j)),se=Math.min(se,fu(l,c,$+.5,2-te-j,j)),se}getWrap(l,c,_){const M=1<<c.z,R=1/M,j=c.x/M,$=Ua(l.x,j,R),te=Ua(l.x,j-1,R),se=Ua(l.x,j+1,R),we=Math.min($,te,se);return we===se?1:we===te?-1:0}allowVariableZoom(l,c){return er(l,c)>4}allowWorldCopies(){return!1}getTileAABB(l,c,_,M){return this._aabbCache.getTileAABB(l,c,_,M)}_computeTileAABB(l,c,_,M){if(l.z<=0)return new Vs([-1,-1,-1],[1,1,1]);if(l.z===1)return new Vs([l.x===0?-1:0,l.y===0?0:-1,-1],[l.x===0?0:1,l.y===0?1:0,1]);{const R=[vr(0,0,l.x,l.y,l.z),vr(o.X,0,l.x,l.y,l.z),vr(o.X,o.X,l.x,l.y,l.z),vr(0,o.X,l.x,l.y,l.z)],j=[1,1,1],$=[-1,-1,-1];for(const te of R)for(let se=0;se<3;se++)j[se]=Math.min(j[se],te[se]),$[se]=Math.max($[se],te[se]);if(l.y===0||l.y===(1<<l.z)-1){const te=[0,l.y===0?1:-1,0];for(let se=0;se<3;se++)j[se]=Math.min(j[se],te[se]),$[se]=Math.max($[se],te[se])}return new Vs(j,$)}}}class dc{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,_){return this._helper.interpolatePadding(l,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=o.be(),this._projectionMatrix=o.a_(),this._globeViewProjMatrix32f=o.aZ(),this._globeViewProjMatrixNoCorrection=o.a_(),this._globeViewProjMatrixNoCorrectionInverted=o.a_(),this._globeProjMatrixInverted=o.a_(),this._cameraPosition=o.bf(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new rs({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,c)=>this.getConstrained(l,c)}),this._coveringTilesDetailsProvider=new Hs}clone(){const l=new dc;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=o.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:_}=l,M=this._helper.getMercatorTileCoordinates(c);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:M,clippingPlane:this._cachedClippingPlane,projectionTransition:_?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(l){const c=this.pitchInRadians,_=this.cameraToCenterDistance/l,M=Math.sin(c)*_,R=Math.cos(c)*_+1,j=1/Math.sqrt(M*M+R*R)*1;let $=-M,te=R;const se=Math.sqrt($*$+te*te);$/=se,te/=se;const we=[0,$,te];return o.bg(we,we,[0,0,0],-this.bearingInRadians),o.bh(we,we,[0,0,0],-1*this.center.lat*Math.PI/180),o.bi(we,we,[0,0,0],this.center.lng*Math.PI/180),o.aL(we,we,.25),[...we,.25*-j]}isLocationOccluded(l){return!this.isSurfacePointVisible(kr(l))}transformLightDirection(l){const c=this._helper._center.lng*Math.PI/180,_=this._helper._center.lat*Math.PI/180,M=Math.cos(_),R=[Math.sin(c)*M,Math.sin(_),Math.cos(c)*M],j=[R[2],0,-R[0]],$=[0,0,0];o.aR($,j,R),o.aQ(j,j),o.aQ($,$);const te=[0,0,0];return o.aQ(te,[j[0]*l[0]+$[0]*l[1]+R[0]*l[2],j[1]*l[0]+$[1]*l[1]+R[1]*l[2],j[2]*l[0]+$[2]*l[1]+R[2]*l[2]]),te}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,_){const M=function($,te,se){const we=1/(1<<se.z);return new o.Y($/o.X*we+se.x*we,te/o.X*we+se.y*we)}(l,c,_.canonical),R=(j=M.y,[o.bd(M.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-j*Math.PI*2))-.5*Math.PI]);var j;return this.getCircleRadiusCorrection()/Math.cos(R[1])}projectTileCoordinates(l,c,_,M){const R=_.canonical,j=vr(l,c,R.x,R.y,R.z),$=1+(M?M(l,c):0)/o.bo,te=[j[0]*$,j[1]*$,j[2]*$,1];o.al(te,te,this._globeViewProjMatrixNoCorrection);const se=this._cachedClippingPlane,we=se[0]*j[0]+se[1]*j[1]+se[2]*j[2]+se[3]<0;return{point:new o.P(te[0]/te[3],te[1]/te[3]),signedDistanceFromCamera:te[3],isOccluded:we}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const l=vi(this.worldSize,this.center.lat),c=o.a$(),_=o.a$();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*l),o.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=o.aW(c),this._globeProjMatrixInverted=o.a$(),o.an(this._globeProjMatrixInverted,c),o.J(c,c,[0,0,-this.cameraToCenterDistance]),o.aX(c,c,this.rollInRadians),o.aY(c,c,-this.pitchInRadians),o.aX(c,c,this.bearingInRadians),o.J(c,c,[0,0,-l]);const R=o.bf();R[0]=l,R[1]=l,R[2]=l,o.aY(_,c,this.center.lat*Math.PI/180),o.bj(_,_,-this.center.lng*Math.PI/180),o.K(_,_,R),this._globeViewProjMatrixNoCorrection=_,o.aY(c,c,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),o.bj(c,c,-this.center.lng*Math.PI/180),o.K(c,c,R),this._globeViewProjMatrix32f=new Float32Array(c),this._globeViewProjMatrixNoCorrectionInverted=o.a$(),o.an(this._globeViewProjMatrixNoCorrectionInverted,_);const j=o.bf();this._cameraPosition=o.bf(),this._cameraPosition[2]=this.cameraToCenterDistance/l,o.bg(this._cameraPosition,this._cameraPosition,j,-this.rollInRadians),o.bh(this._cameraPosition,this._cameraPosition,j,this.pitchInRadians),o.bg(this._cameraPosition,this._cameraPosition,j,-this.bearingInRadians),o.aM(this._cameraPosition,this._cameraPosition,[0,0,1]),o.bh(this._cameraPosition,this._cameraPosition,j,-this.center.lat*Math.PI/180),o.bi(this._cameraPosition,this._cameraPosition,j,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(l);const $=o.aW(this._globeViewProjMatrixNoCorrectionInverted);o.K($,$,[1,1,-1]),this._cachedFrustum=ms.fromInvProjectionMatrix($)}calculateFogMatrix(l){o.w("calculateFogMatrix is not supported on globe projection.");const c=o.a$();return o.aq(c),c}getVisibleUnwrappedCoordinates(l){return[new o.aT(0,l)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(l){l&&o.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 _=kr(l);o.aL(_,_,1+c/o.bo);const M=o.be();return o.al(M,[_[0],_[1],_[2],1],this._globeViewProjMatrixNoCorrection),M[2]/M[3]}populateCache(l){}getBounds(){const l=.5*this.width,c=.5*this.height,_=[new o.P(0,0),new o.P(l,0),new o.P(this.width,0),new o.P(this.width,c),new o.P(this.width,this.height),new o.P(l,this.height),new o.P(0,this.height),new o.P(0,c)],M=[];for(const Ie of _)M.push(this.unprojectScreenPoint(Ie));let R=0,j=0,$=0,te=0;const se=this.center;for(const Ie of M){const Re=o.bk(se.lng,Ie.lng),$e=o.bk(se.lat,Ie.lat);Re<j&&(j=Re),Re>R&&(R=Re),$e<te&&(te=$e),$e>$&&($=$e)}const we=[se.lng+j,se.lat+te,se.lng+R,se.lat+$];return this.isSurfacePointOnScreen([0,1,0])&&(we[3]=90,we[0]=-180,we[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(we[1]=-90,we[0]=-180,we[2]=180),new Ut(we)}getConstrained(l,c){const _=o.ab(l.lat,-85.051129,o.aF),M=o.ab(+c,this.minZoom+qr(0,_),this.maxZoom);return{center:new o.N(l.lng,_),zoom:M}}calculateCenterFromCameraLngLatAlt(l,c,_,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,c,_,M)}setLocationAtPoint(l,c){const _=kr(this.unprojectScreenPoint(c)),M=kr(l),R=o.bf();o.bl(R);const j=o.bf();o.bi(j,_,R,-this.center.lng*Math.PI/180),o.bh(j,j,R,this.center.lat*Math.PI/180);const $=M[0]*M[0]+M[2]*M[2],te=j[0]*j[0];if($<te)return;const se=Math.sqrt($-te),we=-se,Ie=o.bm(M[0],M[2],j[0],se),Re=o.bm(M[0],M[2],j[0],we),$e=o.bf();o.bi($e,M,R,-Ie);const Ze=o.bm($e[1],$e[2],j[1],j[2]),ft=o.bf();o.bi(ft,M,R,-Re);const lt=o.bm(ft[1],ft[2],j[1],j[2]),pt=.5*Math.PI,vt=Ze>=-pt&&Ze<=pt,Bt=lt>=-pt&<<=pt;let kt,Rt;if(vt&&Bt){const Zt=this.center.lng*Math.PI/180,_n=this.center.lat*Math.PI/180;o.bp(Ie,Zt)+o.bp(Ze,_n)<o.bp(Re,Zt)+o.bp(lt,_n)?(kt=Ie,Rt=Ze):(kt=Re,Rt=lt)}else if(vt)kt=Ie,Rt=Ze;else{if(!Bt)return;kt=Re,Rt=lt}const zt=kt/Math.PI*180,Tt=Rt/Math.PI*180,tn=this.center.lat;this.setCenter(new o.N(zt,o.ab(Tt,-90,90))),this.setZoom(this.zoom+qr(tn,this.center.lat))}locationToScreenPoint(l,c){const _=kr(l);if(c){const M=c.getElevationForLngLatZoom(l,this._helper._tileZoom);o.aL(_,_,1+M/o.bo)}return this._projectSurfacePointToScreen(_)}_projectSurfacePointToScreen(l){const c=o.be();return o.al(c,[...l,1],this._globeViewProjMatrixNoCorrection),c[0]/=c[3],c[1]/=c[3],new o.P((.5*c[0]+.5)*this.width,(.5*-c[1]+.5)*this.height)}screenPointToMercatorCoordinate(l,c){if(c){const _=c.pointCoordinate(l);if(_)return _}return o.Y.fromLngLat(this.unprojectScreenPoint(l))}screenPointToLocation(l,c){var _;return(_=this.screenPointToMercatorCoordinate(l,c))===null||_===void 0?void 0:_.toLngLat()}isPointOnMapSurface(l,c){const _=this._cameraPosition,M=this.getRayDirectionFromPixel(l);return!!this.rayPlanetIntersection(_,M)}getRayDirectionFromPixel(l){const c=o.be();c[0]=l.x/this.width*2-1,c[1]=-1*(l.y/this.height*2-1),c[2]=1,c[3]=1,o.al(c,c,this._globeViewProjMatrixNoCorrectionInverted),c[0]/=c[3],c[1]/=c[3],c[2]/=c[3];const _=o.bf();_[0]=c[0]-this._cameraPosition[0],_[1]=c[1]-this._cameraPosition[1],_[2]=c[2]-this._cameraPosition[2];const M=o.bf();return o.aQ(M,_),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=o.be();return o.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 _=o.aS(l,c),M=o.bf(),R=o.bf();o.aL(R,c,_),o.aP(M,l,R);const j=1-o.aS(M,M);if(j<0)return null;const $=o.aS(l,l)-1,te=-_+(_<0?1:-1)*Math.sqrt(j),se=$/te,we=te;return{tMin:Math.min(se,we),tMax:Math.max(se,we)}}unprojectScreenPoint(l){const c=this._cameraPosition,_=this.getRayDirectionFromPixel(l),M=this.rayPlanetIntersection(c,_);if(M){const se=o.bf();o.aM(se,c,[_[0]*M.tMin,_[1]*M.tMin,_[2]*M.tMin]);const we=o.bf();return o.aQ(we,se),Eo(we)}const R=this._cachedClippingPlane[0]*_[0]+this._cachedClippingPlane[1]*_[1]+this._cachedClippingPlane[2]*_[2],j=-o.bn(this._cachedClippingPlane,c)/R,$=o.bf();if(j>0)o.aM($,c,[_[0]*j,_[1]*j,_[2]*j]);else{const se=o.bf();o.aM(se,c,[2*_[0],2*_[1],2*_[2]]);const we=o.bn(this._cachedClippingPlane,se);o.aP($,se,[this._cachedClippingPlane[0]*we,this._cachedClippingPlane[1]*we,this._cachedClippingPlane[2]*we])}const te=o.bf();return o.aQ(te,$),Eo(te)}getMatrixForModel(l,c){const _=o.N.convert(l),M=1/o.bo,R=o.a_();return o.bj(R,R,_.lng/180*Math.PI),o.aY(R,R,-_.lat/180*Math.PI),o.J(R,R,[0,0,1+c/o.bo]),o.aY(R,R,.5*Math.PI),o.K(R,R,[M,M,M]),R}getProjectionDataForCustomLayer(l=!0){const c=this.getProjectionData({overscaledTileID:new o.S(0,0,0,0,0),applyGlobeMatrix:l});return c.tileMercatorCoords=[0,0,1,1],c}getFastPathSimpleProjectionMatrix(l){}}class Ba{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,_){return this._helper.interpolatePadding(l,c,_)}isPaddingEqual(l){return this._helper.isPaddingEqual(l)}resize(l,c,_=!0){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 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 rs({calcMatrices:()=>{this._calcMatrices()},getConstrained:(l,c)=>this.getConstrained(l,c)}),this._globeness=1,this._mercatorTransform=new Ms,this._verticalPerspectiveTransform=new dc}clone(){const l=new Ba;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),_=this._verticalPerspectiveTransform.getProjectionData(l);return{mainMatrix:this.isGlobeRendering?_.mainMatrix:c.mainMatrix,clippingPlane:_.clippingPlane,tileMercatorCoords:_.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 o.b9(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return o.b9(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(l,c,_){const M=this._mercatorTransform.getPitchedTextCorrection(l,c,_),R=this._verticalPerspectiveTransform.getPitchedTextCorrection(l,c,_);return o.b9(M,R,this._globeness)}projectTileCoordinates(l,c,_,M){return this.currentTransform.projectTileCoordinates(l,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,_,M){return this._helper.calculateCenterFromCameraLngLatAlt(l,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 _=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(l);return _.fallbackMatrix=c.mainMatrix,_}getFastPathSimpleProjectionMatrix(l){return this.currentTransform.getFastPathSimpleProjectionMatrix(l)}}class cl{get useGlobeControls(){return!0}handlePanInertia(l,c){const _=Hi(l,c);return Math.abs(_.lng-c.center.lng)>180&&(_.lng=c.center.lng+179.5*Math.sign(_.lng-c.center.lng)),{easingCenter:_,easingOffset:new o.P(0,0)}}handleMapControlsRollPitchBearingZoom(l,c){const _=l.around,M=c.screenPointToLocation(_);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 R=c.zoom;l.zoomDelta&&c.setZoom(c.zoom+l.zoomDelta);const j=c.zoom-R;if(j===0)return;const $=o.bk(c.center.lng,M.lng),te=$/(Math.abs($/180)+1),se=o.bk(c.center.lat,M.lat),we=c.getRayDirectionFromPixel(_),Ie=c.cameraPosition,Re=-1*o.aS(Ie,we),$e=o.bf();o.aM($e,Ie,[we[0]*Re,we[1]*Re,we[2]*Re]);const Ze=o.bq($e)-1,ft=Math.exp(.5*-Math.max(Ze-.3,0)),lt=vi(c.worldSize,c.center.lat)/Math.min(c.width,c.height),pt=o.bc(lt,.9,.5,1,.25),vt=(1-o.aG(-j))*Math.min(ft,pt),Bt=c.center.lat,kt=c.zoom,Rt=new o.N(c.center.lng+te*vt,o.ab(c.center.lat+se*vt,-85.051129,o.aF));c.setLocationAtPoint(M,_);const zt=c.center,Tt=o.bc(Math.abs($),45,85,0,1),tn=o.bc(lt,.75,.35,0,1),Zt=Math.pow(Math.max(Tt,tn),.25),_n=o.bk(zt.lng,Rt.lng),bn=o.bk(zt.lat,Rt.lat);c.setCenter(new o.N(zt.lng+_n*Zt,zt.lat+bn*Zt).wrap()),c.setZoom(kt+qr(Bt,c.center.lat))}handleMapControlsPan(l,c,_){if(!l.panDelta)return;const M=c.center.lat,R=c.zoom;c.setCenter(Hi(l.panDelta,c).wrap()),c.setZoom(R+qr(M,c.center.lat))}cameraForBoxAndBearing(l,c,_,M,R){const j=El(l,c,_,M,R),$=c.left/R.width*2-1,te=(R.width-c.right)/R.width*2-1,se=c.top/R.height*-2+1,we=(R.height-c.bottom)/R.height*-2+1,Ie=o.bk(_.getWest(),_.getEast())<0,Re=Ie?_.getEast():_.getWest(),$e=Ie?_.getWest():_.getEast(),Ze=Math.max(_.getNorth(),_.getSouth()),ft=Math.min(_.getNorth(),_.getSouth()),lt=Re+.5*o.bk(Re,$e),pt=Ze+.5*o.bk(Ze,ft),vt=R.clone();vt.setCenter(j.center),vt.setBearing(j.bearing),vt.setPitch(0),vt.setRoll(0),vt.setZoom(j.zoom);const Bt=vt.modelViewProjectionMatrix,kt=[kr(_.getNorthWest()),kr(_.getNorthEast()),kr(_.getSouthWest()),kr(_.getSouthEast()),kr(new o.N($e,pt)),kr(new o.N(Re,pt)),kr(new o.N(lt,Ze)),kr(new o.N(lt,ft))],Rt=kr(j.center);let zt=Number.POSITIVE_INFINITY;for(const Tt of kt)$<0&&(zt=cl.getLesserNonNegativeNonNull(zt,cl.solveVectorScale(Tt,Rt,Bt,"x",$))),te>0&&(zt=cl.getLesserNonNegativeNonNull(zt,cl.solveVectorScale(Tt,Rt,Bt,"x",te))),se>0&&(zt=cl.getLesserNonNegativeNonNull(zt,cl.solveVectorScale(Tt,Rt,Bt,"y",se))),we<0&&(zt=cl.getLesserNonNegativeNonNull(zt,cl.solveVectorScale(Tt,Rt,Bt,"y",we)));if(Number.isFinite(zt)&&zt!==0)return j.zoom=vt.zoom+o.a8(zt),j;el()}handleJumpToCenterZoom(l,c){const _=l.center.lat,M=l.getConstrained(c.center?o.N.convert(c.center):l.center,l.zoom).center;l.setCenter(M.wrap());const R=c.zoom!==void 0?+c.zoom:l.zoom+qr(_,M.lat);l.zoom!==R&&l.setZoom(R)}handleEaseTo(l,c){const _=l.zoom,M=l.center,R=l.padding,j={roll:l.roll,pitch:l.pitch,bearing:l.bearing},$={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},te=c.zoom!==void 0,se=!l.isPaddingEqual(c.padding);let we=!1;const Ie=c.center?o.N.convert(c.center):M,Re=l.getConstrained(Ie,_).center;hu(l,Re);const $e=l.clone();$e.setCenter(Re),$e.setZoom(te?+c.zoom:_+qr(M.lat,Ie.lat)),$e.setBearing(c.bearing);const Ze=new o.P(o.ab(l.centerPoint.x+c.offsetAsPoint.x,0,l.width),o.ab(l.centerPoint.y+c.offsetAsPoint.y,0,l.height));$e.setLocationAtPoint(Re,Ze);const ft=(c.offset&&c.offsetAsPoint.mag())>0?$e.center:Re,lt=te?+c.zoom:_+qr(M.lat,ft.lat),pt=_+qr(M.lat,0),vt=lt+qr(ft.lat,0),Bt=o.bk(M.lng,ft.lng),kt=o.bk(M.lat,ft.lat),Rt=o.aG(vt-pt);return we=lt!==_,{easeFunc:zt=>{if(o.b3(j,$)||Ds({startEulerAngles:j,endEulerAngles:$,tr:l,k:zt,useSlerp:j.roll!=$.roll}),se&&l.interpolatePadding(R,c.padding,zt),c.around)o.w("Easing around a point is not supported under globe projection."),l.setLocationAtPoint(c.around,c.aroundPoint);else{const Tt=vt>pt?Math.min(2,Rt):Math.max(.5,Rt),tn=Math.pow(Tt,1-zt),Zt=us(M,Bt,kt,zt*tn);l.setCenter(Zt.wrap())}if(we){const Tt=o.y.number(pt,vt,zt)+qr(0,l.center.lat);l.setZoom(Tt)}},isZooming:we,elevationCenter:ft}}handleFlyTo(l,c){const _=c.zoom!==void 0,M=l.center,R=l.zoom,j=!l.isPaddingEqual(c.padding),$=l.getConstrained(o.N.convert(c.center||c.locationAtOffset),R).center,te=_?+c.zoom:l.zoom+qr(l.center.lat,$.lat),se=l.clone();se.setCenter($),j&&se.setPadding(c.padding),se.setZoom(te),se.setBearing(c.bearing);const we=new o.P(o.ab(l.centerPoint.x+c.offsetAsPoint.x,0,l.width),o.ab(l.centerPoint.y+c.offsetAsPoint.y,0,l.height));se.setLocationAtPoint($,we);const Ie=se.center;hu(l,Ie);const Re=function(Bt,kt,Rt){const zt=kr(kt),Tt=kr(Rt),tn=o.aS(zt,Tt),Zt=Math.acos(tn),_n=ci(Bt);return Zt/(2*Math.PI)*_n}(l,M,Ie),$e=R+qr(M.lat,0),Ze=te+qr(Ie.lat,0),ft=o.aG(Ze-$e);let lt;if(typeof c.minZoom=="number"){const Bt=+c.minZoom+qr(Ie.lat,0),kt=Math.min(Bt,$e,Ze)+qr(0,Ie.lat),Rt=l.getConstrained(Ie,kt).zoom+qr(Ie.lat,0);lt=o.aG(Rt-$e)}const pt=o.bk(M.lng,Ie.lng),vt=o.bk(M.lat,Ie.lat);return{easeFunc:(Bt,kt,Rt,zt)=>{const Tt=us(M,pt,vt,Rt),tn=Bt===1?Ie:Tt;l.setCenter(tn.wrap());const Zt=$e+o.a8(kt);l.setZoom(Bt===1?te:Zt+qr(0,tn.lat))},scaleOfZoom:ft,targetCenter:Ie,scaleOfMinZoom:lt,pixelPathLength:Re}}static solveVectorScale(l,c,_,M,R){const j=M==="x"?[_[0],_[4],_[8],_[12]]:[_[1],_[5],_[9],_[13]],$=[_[3],_[7],_[11],_[15]],te=l[0]*j[0]+l[1]*j[1]+l[2]*j[2],se=l[0]*$[0]+l[1]*$[1]+l[2]*$[2],we=c[0]*j[0]+c[1]*j[1]+c[2]*j[2],Ie=c[0]*$[0]+c[1]*$[1]+c[2]*$[2];return we+R*se===te+R*Ie||$[3]*(te-we)+j[3]*(Ie-se)+te*Ie==we*se?null:(we+j[3]-R*Ie-R*$[3])/(we-te-R*Ie+R*se)}static getLesserNonNegativeNonNull(l,c){return c!==null&&c>=0&&c<l?c:l}}class ld{constructor(l){this._globe=l,this._mercatorCameraHelper=new oA,this._verticalPerspectiveCameraHelper=new cl}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,_){this.currentHelper.handleMapControlsPan(l,c,_)}cameraForBoxAndBearing(l,c,_,M,R){return this.currentHelper.cameraForBoxAndBearing(l,c,_,M,R)}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 Ru=(T,l)=>o.t(T,l&&l.filter(c=>c.identifier!=="source.canvas")),Du=o.br();class bh extends o.E{constructor(l,c={}){super(),this._rtlPluginLoaded=()=>{for(const _ in this.sourceCaches){const M=this.sourceCaches[_].getSource().type;M!=="vector"&&M!=="geojson"||this.sourceCaches[_].reload()}},this.map=l,this.dispatcher=new Pt(Dt(),l._getMapId()),this.dispatcher.registerMessageHandler("GG",(_,M)=>this.getGlyphs(_,M)),this.dispatcher.registerMessageHandler("GI",(_,M)=>this.getImages(_,M)),this.imageManager=new de,this.imageManager.setEventedParent(this),this.glyphManager=new De(l._requestManager,c.localIdeographFontFamily),this.lineAtlas=new Ce(256,512),this.crossTileSymbolIndex=new Ns,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.bs,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",o.bt()),Ae().on(Qn,this._rtlPluginLoaded),this.on("data",_=>{if(_.dataType!=="source"||_.sourceDataType!=="metadata")return;const M=this.sourceCaches[_.sourceId];if(!M)return;const R=M.getSource();if(R&&R.vectorLayerIds)for(const j in this._layers){const $=this._layers[j];$.source===R.id&&this._validateLayer($)}})}loadURL(l,c={},_){this.fire(new o.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 R=this._loadStyleRequest;o.h(M,this._loadStyleRequest).then(j=>{this._loadStyleRequest=null,this._load(j.data,c,_)}).catch(j=>{this._loadStyleRequest=null,j&&!R.signal.aborted&&this.fire(new o.j(j))})}loadJSON(l,c={},_){this.fire(new o.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,_)}).catch(()=>{})}loadEmpty(){this.fire(new o.k("dataloading",{dataType:"style"})),this._load(Du,{validate:!1})}_load(l,c,_){var M,R;const j=c.transformStyle?c.transformStyle(_,l):l;if(!c.validate||!Ru(this,o.u(j))){this._loaded=!0,this.stylesheet=j;for(const $ in j.sources)this.addSource($,j.sources[$],{validate:!1});j.sprite?this._loadSprite(j.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(j.glyphs),this._createLayers(),this.light=new Qe(this.stylesheet.light),this._setProjectionInternal(((M=this.stylesheet.projection)===null||M===void 0?void 0:M.type)||"mercator"),this.sky=new We(this.stylesheet.sky),this.map.setTerrain((R=this.stylesheet.terrain)!==null&&R!==void 0?R:null),this.fire(new o.k("data",{dataType:"style"})),this.fire(new o.k("style.load"))}}_createLayers(){const l=o.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 _=o.bv(c);_.setEventedParent(this,{layer:{id:c.id}}),this._layers[c.id]=_}}_loadSprite(l,c=!1,_=void 0){let M;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(R,j,$,te){return o._(this,void 0,void 0,function*(){const se=ee(R),we=$>1?"@2x":"",Ie={},Re={};for(const{id:$e,url:Ze}of se){const ft=j.transformRequest(N(Ze,we,".json"),"SpriteJSON");Ie[$e]=o.h(ft,te);const lt=j.transformRequest(N(Ze,we,".png"),"SpriteImage");Re[$e]=X.getImage(lt,te)}return yield Promise.all([...Object.values(Ie),...Object.values(Re)]),function($e,Ze){return o._(this,void 0,void 0,function*(){const ft={};for(const lt in $e){ft[lt]={};const pt=S.getImageCanvasContext((yield Ze[lt]).data),vt=(yield $e[lt]).data;for(const Bt in vt){const{width:kt,height:Rt,x:zt,y:Tt,sdf:tn,pixelRatio:Zt,stretchX:_n,stretchY:bn,content:vn,textFitWidth:In,textFitHeight:Wn}=vt[Bt];ft[lt][Bt]={data:null,pixelRatio:Zt,sdf:tn,stretchX:_n,stretchY:bn,content:vn,textFitWidth:In,textFitHeight:Wn,spriteData:{width:kt,height:Rt,x:zt,y:Tt,context:pt}}}}return ft})}(Ie,Re)})}(l,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(R=>{if(this._spriteRequest=null,R)for(const j in R){this._spritesImagesIds[j]=[];const $=this._spritesImagesIds[j]?this._spritesImagesIds[j].filter(te=>!(te in R)):[];for(const te of $)this.imageManager.removeImage(te),this._changedImages[te]=!0;for(const te in R[j]){const se=j==="default"?te:`${j}:${te}`;this._spritesImagesIds[j].push(se),se in this.imageManager.images?this.imageManager.updateImage(se,R[j][te],!1):this.imageManager.addImage(se,R[j][te]),c&&(this._changedImages[se]=!0)}}}).catch(R=>{this._spriteRequest=null,M=R,this.fire(new o.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 o.k("data",{dataType:"style"})),_&&_(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 o.k("data",{dataType:"style"}))}_validateLayer(l){const c=this.sourceCaches[l.source];if(!c)return;const _=l.sourceLayer;if(!_)return;const M=c.getSource();(M.type==="geojson"||M.vectorLayerIds&&M.vectorLayerIds.indexOf(_)===-1)&&this.fire(new o.j(new Error(`Source layer "${_}" 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 _=this._serializedAllLayers();if(!l||l.length===0)return Object.values(c?o.bw(_):_);const M=[];for(const R of l)if(_[R]){const j=c?o.bw(_[R]):_[R];M.push(j)}return M}_serializedAllLayers(){let l=this._serializedLayers;if(l)return l;l=this._serializedLayers={};const c=Object.keys(this._layers);for(const _ of c){const M=this._layers[_];M.type!=="custom"&&(l[_]=M.serialize())}return l}hasTransitions(){var l,c,_;if(!((l=this.light)===null||l===void 0)&&l.hasTransition()||!((c=this.sky)===null||c===void 0)&&c.hasTransition()||!((_=this.projection)===null||_===void 0)&&_.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),R=Object.keys(this._removedLayers);(M.length||R.length)&&this._updateWorkerLayers(M,R);for(const j in this._updatedSources){const $=this._updatedSources[j];if($==="reload")this._reloadSource(j);else{if($!=="clear")throw new Error(`Invalid action ${$}`);this._clearSource(j)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const j in this._updatedPaintProps)this._layers[j].updateTransitions(l);this.light.updateTransitions(l),this.sky.updateTransitions(l),this._resetUpdates()}const _={};for(const M in this.sourceCaches){const R=this.sourceCaches[M];_[M]=R.used,R.used=!1}for(const M of this._order){const R=this._layers[M];R.recalculate(l,this._availableImages),!R.isHidden(l.zoom)&&R.source&&(this.sourceCaches[R.source].used=!0)}for(const M in _){const R=this.sourceCaches[M];!!_[M]!=!!R.used&&R.fire(new o.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 o.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 _;this._checkLoaded();const M=this.serialize();if(l=c.transformStyle?c.transformStyle(M,l):l,((_=c.validate)===null||_===void 0||_)&&Ru(this,o.u(l)))return!1;(l=o.bw(l)).layers=o.bu(l.layers);const R=o.bx(M,l),j=this._getOperationsToPerform(R);if(j.unimplemented.length>0)throw new Error(`Unimplemented: ${j.unimplemented.join(", ")}.`);if(j.operations.length===0)return!1;for(const $ of j.operations)$();return this.stylesheet=l,this._serializedLayers=null,!0}_getOperationsToPerform(l){const 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:_.push(M.command)}return{operations:c,unimplemented:_}}addImage(l,c){if(this.getImage(l))return this.fire(new o.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 o.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 o.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(l,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(o.u.source,`sources.${l}`,c,null,_))return;this.map&&this.map._collectResourceTiming&&(c.collectResourceTiming=!0);const M=this.sourceCaches[l]=new oe(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 _ in this._layers)if(this._layers[_].source===l)return this.fire(new o.j(new Error(`Source "${l}" cannot be removed while layer "${_}" is using it.`)));const c=this.sourceCaches[l];delete this.sourceCaches[l],delete this._updatedSources[l],c.fire(new o.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 _=this.sourceCaches[l].getSource();if(_.type!=="geojson")throw new Error(`geojsonSource.type is ${_.type}, which is !== 'geojson`);_.setData(c),this._changed=!0}getSource(l){return this.sourceCaches[l]&&this.sourceCaches[l].getSource()}addLayer(l,c,_={}){this._checkLoaded();const M=l.id;if(this.getLayer(M))return void this.fire(new o.j(new Error(`Layer "${M}" already exists on this map.`)));let R;if(l.type==="custom"){if(Ru(this,o.by(l)))return;R=o.bv(l)}else{if("source"in l&&typeof l.source=="object"&&(this.addSource(M,l.source),l=o.bw(l),l=o.e(l,{source:M})),this._validate(o.u.layer,`layers.${M}`,l,{arrayIndex:-1},_))return;R=o.bv(l),this._validateLayer(R),R.setEventedParent(this,{layer:{id:M}})}const j=c?this._order.indexOf(c):this._order.length;if(c&&j===-1)this.fire(new o.j(new Error(`Cannot add layer "${M}" before non-existing layer "${c}".`)));else{if(this._order.splice(j,0,M),this._layerOrderChanged=!0,this._layers[M]=R,this._removedLayers[M]&&R.source&&R.type!=="custom"){const $=this._removedLayers[M];delete this._removedLayers[M],$.type!==R.type?this._updatedSources[R.source]="clear":(this._updatedSources[R.source]="reload",this.sourceCaches[R.source].pause())}this._updateLayer(R),R.onAdd&&R.onAdd(this.map)}}moveLayer(l,c){if(this._checkLoaded(),this._changed=!0,!this._layers[l])return void this.fire(new o.j(new Error(`The layer '${l}' does not exist in the map's style and cannot be moved.`)));if(l===c)return;const _=this._order.indexOf(l);this._order.splice(_,1);const M=c?this._order.indexOf(c):this._order.length;c&&M===-1?this.fire(new o.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 o.j(new Error(`Cannot remove non-existing layer "${l}".`)));c.setEventedParent(null);const _=this._order.indexOf(l);this._order.splice(_,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,_){this._checkLoaded();const M=this.getLayer(l);M?M.minzoom===c&&M.maxzoom===_||(c!=null&&(M.minzoom=c),_!=null&&(M.maxzoom=_),this._updateLayer(M)):this.fire(new o.j(new Error(`Cannot set the zoom range of non-existing layer "${l}".`)))}setFilter(l,c,_={}){this._checkLoaded();const M=this.getLayer(l);if(M){if(!o.bz(M.filter,c))return c==null?(M.filter=void 0,void this._updateLayer(M)):void(this._validate(o.u.filter,`layers.${M.id}.filter`,c,null,_)||(M.filter=o.bw(c),this._updateLayer(M)))}else this.fire(new o.j(new Error(`Cannot filter non-existing layer "${l}".`)))}getFilter(l){return o.bw(this.getLayer(l).filter)}setLayoutProperty(l,c,_,M={}){this._checkLoaded();const R=this.getLayer(l);R?o.bz(R.getLayoutProperty(c),_)||(R.setLayoutProperty(c,_,M),this._updateLayer(R)):this.fire(new o.j(new Error(`Cannot style non-existing layer "${l}".`)))}getLayoutProperty(l,c){const _=this.getLayer(l);if(_)return _.getLayoutProperty(c);this.fire(new o.j(new Error(`Cannot get style of non-existing layer "${l}".`)))}setPaintProperty(l,c,_,M={}){this._checkLoaded();const R=this.getLayer(l);R?o.bz(R.getPaintProperty(c),_)||(R.setPaintProperty(c,_,M)&&this._updateLayer(R),this._changed=!0,this._updatedPaintProps[l]=!0,this._serializedLayers=null):this.fire(new o.j(new Error(`Cannot style non-existing layer "${l}".`)))}getPaintProperty(l,c){return this.getLayer(l).getPaintProperty(c)}setFeatureState(l,c){this._checkLoaded();const _=l.source,M=l.sourceLayer,R=this.sourceCaches[_];if(R===void 0)return void this.fire(new o.j(new Error(`The source '${_}' does not exist in the map's style.`)));const j=R.getSource().type;j==="geojson"&&M?this.fire(new o.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):j!=="vector"||M?(l.id===void 0&&this.fire(new o.j(new Error("The feature id parameter must be provided."))),R.setFeatureState(M,l.id,c)):this.fire(new o.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(l,c){this._checkLoaded();const _=l.source,M=this.sourceCaches[_];if(M===void 0)return void this.fire(new o.j(new Error(`The source '${_}' does not exist in the map's style.`)));const R=M.getSource().type,j=R==="vector"?l.sourceLayer:void 0;R!=="vector"||j?c&&typeof l.id!="string"&&typeof l.id!="number"?this.fire(new o.j(new Error("A feature id is required to remove its specific state property."))):M.removeFeatureState(j,l.id,c):this.fire(new o.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(l){this._checkLoaded();const c=l.source,_=l.sourceLayer,M=this.sourceCaches[c];if(M!==void 0)return M.getSource().type!=="vector"||_?(l.id===void 0&&this.fire(new o.j(new Error("The feature id parameter must be provided."))),M.getFeatureState(_,l.id)):void this.fire(new o.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new o.j(new Error(`The source '${c}' does not exist in the map's style.`)))}getTransition(){return o.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const l=o.bA(this.sourceCaches,R=>R.serialize()),c=this._serializeByIds(this._order,!0),_=this.map.getTerrain()||void 0,M=this.stylesheet;return o.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:_},R=>R!==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=j=>this._layers[j].type==="fill-extrusion",_={},M=[];for(let j=this._order.length-1;j>=0;j--){const $=this._order[j];if(c($)){_[$]=j;for(const te of l){const se=te[$];if(se)for(const we of se)M.push(we)}}}M.sort((j,$)=>$.intersectionZ-j.intersectionZ);const R=[];for(let j=this._order.length-1;j>=0;j--){const $=this._order[j];if(c($))for(let te=M.length-1;te>=0;te--){const se=M[te].feature;if(_[se.layer.id]<j)break;R.push(se),M.pop()}else for(const te of l){const se=te[$];if(se)for(const we of se)R.push(we.feature)}}return R}queryRenderedFeatures(l,c,_){c&&c.filter&&this._validate(o.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 o.j(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const se of c.layers){const we=this._layers[se];if(!we)return this.fire(new o.j(new Error(`The layer '${se}' does not exist in the map's style and cannot be queried for features.`))),[];M[we.source]=!0}}const R=[];c.availableImages=this._availableImages;const j=this._serializedAllLayers(),$=c.layers instanceof Set?c.layers:Array.isArray(c.layers)?new Set(c.layers):null,te=Object.assign(Object.assign({},c),{layers:$});for(const se in this.sourceCaches)c.layers&&!M[se]||R.push(Ee(this.sourceCaches[se],this._layers,j,l,te,_));return this.placement&&R.push(function(se,we,Ie,Re,$e,Ze,ft){const lt={},pt=Ze.queryRenderedSymbols(Re),vt=[];for(const Bt of Object.keys(pt).map(Number))vt.push(ft[Bt]);vt.sort(nt);for(const Bt of vt){const kt=Bt.featureIndex.lookupSymbolFeatures(pt[Bt.bucketInstanceId],we,Bt.bucketIndex,Bt.sourceLayerIndex,$e.filter,$e.layers,$e.availableImages,se);for(const Rt in kt){const zt=lt[Rt]=lt[Rt]||[],Tt=kt[Rt];Tt.sort((tn,Zt)=>{const _n=Bt.featureSortOrder;if(_n){const bn=_n.indexOf(tn.featureIndex);return _n.indexOf(Zt.featureIndex)-bn}return Zt.featureIndex-tn.featureIndex});for(const tn of Tt)zt.push(tn)}}return function(Bt,kt,Rt){for(const zt in Bt)for(const Tt of Bt[zt])_t(Tt,Rt[kt[zt].source]);return Bt}(lt,se,Ie)}(this._layers,j,this.sourceCaches,l,te,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(R)}querySourceFeatures(l,c){c&&c.filter&&this._validate(o.u.filter,"querySourceFeatures.filter",c.filter,null,c);const _=this.sourceCaches[l];return _?function(M,R){const j=M.getRenderableIds().map(se=>M.getTileByID(se)),$=[],te={};for(let se=0;se<j.length;se++){const we=j[se],Ie=we.tileID.canonical.key;te[Ie]||(te[Ie]=!0,we.querySourceFeatures($,R))}return $}(_,c):[]}getLight(){return this.light.getLight()}setLight(l,c={}){this._checkLoaded();const _=this.light.getLight();let M=!1;for(const j in l)if(!o.bz(l[j],_[j])){M=!0;break}if(!M)return;const R={now:S.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(l,c),this.light.updateTransitions(R)}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 _=this.getSky();let M=!1;if(!l&&!_)return;if(l&&!_)M=!0;else if(!l&&_)M=!0;else for(const j in l)if(!o.bz(l[j],_[j])){M=!0;break}if(!M)return;const R={now:S.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=l,this.sky.setSky(l,c),this.sky.updateTransitions(R)}_setProjectionInternal(l){const c=function(_){if(Array.isArray(_)){const M=new si({type:_});return{projection:M,transform:new Ba,cameraHelper:new ld(M)}}switch(_){case"mercator":return{projection:new ls,transform:new Ms,cameraHelper:new oA};case"globe":{const M=new si({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:M,transform:new Ba,cameraHelper:new ld(M)}}case"vertical-perspective":return{projection:new Ir,transform:new dc,cameraHelper:new cl};default:return o.w(`Unknown projection name: ${_}. Falling back to mercator projection.`),{projection:new ls,transform:new Ms,cameraHelper:new oA}}}(l);this.projection=c.projection,this.map.migrateProjection(c.transform,c.cameraHelper);for(const _ in this.sourceCaches)this.sourceCaches[_].reload()}_validate(l,c,_,M,R={}){return(!R||R.validate!==!1)&&Ru(this,l.call(o.u,o.e({key:c,style:this.serialize(),value:_,styleSpec:o.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),Ae().off(Qn,this._rtlPluginLoaded);for(const c in this._layers)this._layers[c].setEventedParent(null);for(const c in this.sourceCaches){const _=this.sourceCaches[c];_.setEventedParent(null),_.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,_,M,R=!1){let j=!1,$=!1;const te={};for(const se of this._order){const we=this._layers[se];if(we.type!=="symbol")continue;if(!te[we.source]){const Re=this.sourceCaches[we.source];te[we.source]=Re.getRenderableIds(!0).map($e=>Re.getTileByID($e)).sort(($e,Ze)=>Ze.tileID.overscaledZ-$e.tileID.overscaledZ||($e.tileID.isLessThan(Ze.tileID)?-1:1))}const Ie=this.crossTileSymbolIndex.addLayer(we,te[we.source],l.center.lng);j=j||Ie}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((R=R||this._layerOrderChanged||_===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(S.now(),l.zoom))&&(this.pauseablePlacement=new An(l,this.map.terrain,this._order,R,c,_,M,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,te),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(S.now()),$=!0),j&&this.pauseablePlacement.placement.setStale()),$||j)for(const se of this._order){const we=this._layers[se];we.type==="symbol"&&this.placement.updateLayerOpacities(we,te[we.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 o._(this,void 0,void 0,function*(){const _=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),_})}getGlyphs(l,c){return o._(this,void 0,void 0,function*(){const _=yield this.glyphManager.getGlyphs(c.stacks),M=this.sourceCaches[c.source];return M&&M.setDependencies(c.tileID.key,c.type,[""]),_})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(l,c={}){this._checkLoaded(),l&&this._validate(o.u.glyphs,"glyphs",l,null,c)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=l,this.glyphManager.entries={},this.glyphManager.setURL(l))}addSprite(l,c,_={},M){this._checkLoaded();const R=[{id:l,url:c}],j=[...ee(this.stylesheet.sprite),...R];this._validate(o.u.sprite,"sprite",j,null,_)||(this.stylesheet.sprite=j,this._loadSprite(R,!0,M))}removeSprite(l){this._checkLoaded();const c=ee(this.stylesheet.sprite);if(c.find(_=>_.id===l)){if(this._spritesImagesIds[l])for(const _ of this._spritesImagesIds[l])this.imageManager.removeImage(_),this._changedImages[_]=!0;c.splice(c.findIndex(_=>_.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 o.k("data",{dataType:"style"}))}else this.fire(new o.j(new Error(`Sprite "${l}" doesn't exists on this map.`)))}getSprite(){return ee(this.stylesheet.sprite)}setSprite(l,c={},_){this._checkLoaded(),l&&this._validate(o.u.sprite,"sprite",l,null,c)||(this.stylesheet.sprite=l,l?this._loadSprite(l,!0,_):(this._unloadSprite(),_&&_(null)))}}var Ss=o.aA([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Ku{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(l,c,_,M,R,j,$,te,se){this.context=l;let we=this.boundPaintVertexBuffers.length!==M.length;for(let Ie=0;!we&&Ie<M.length;Ie++)this.boundPaintVertexBuffers[Ie]!==M[Ie]&&(we=!0);!this.vao||this.boundProgram!==c||this.boundLayoutVertexBuffer!==_||we||this.boundIndexBuffer!==R||this.boundVertexOffset!==j||this.boundDynamicVertexBuffer!==$||this.boundDynamicVertexBuffer2!==te||this.boundDynamicVertexBuffer3!==se?this.freshBind(c,_,M,R,j,$,te,se):(l.bindVertexArray.set(this.vao),$&&$.bind(),R&&R.dynamicDraw&&R.bind(),te&&te.bind(),se&&se.bind())}freshBind(l,c,_,M,R,j,$,te){const se=l.numAttributes,we=this.context,Ie=we.gl;this.vao&&this.destroy(),this.vao=we.createVertexArray(),we.bindVertexArray.set(this.vao),this.boundProgram=l,this.boundLayoutVertexBuffer=c,this.boundPaintVertexBuffers=_,this.boundIndexBuffer=M,this.boundVertexOffset=R,this.boundDynamicVertexBuffer=j,this.boundDynamicVertexBuffer2=$,this.boundDynamicVertexBuffer3=te,c.enableAttributes(Ie,l);for(const Re of _)Re.enableAttributes(Ie,l);j&&j.enableAttributes(Ie,l),$&&$.enableAttributes(Ie,l),te&&te.enableAttributes(Ie,l),c.bind(),c.setVertexAttribPointers(Ie,l,R);for(const Re of _)Re.bind(),Re.setVertexAttribPointers(Ie,l,R);j&&(j.bind(),j.setVertexAttribPointers(Ie,l,R)),M&&M.bind(),$&&($.bind(),$.setVertexAttribPointers(Ie,l,R)),te&&(te.bind(),te.setVertexAttribPointers(Ie,l,R)),we.currentNumAttributes=se}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ud=(T,l,c,_,M)=>({u_texture:0,u_ele_delta:T,u_fog_matrix:l,u_fog_color:c?c.properties.get("fog-color"):o.b4.white,u_fog_ground_blend:c?c.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:M?0:c?c.calculateFogBlendOpacity(_):0,u_horizon_color:c?c.properties.get("horizon-color"):o.b4.white,u_horizon_fog_blend:c?c.properties.get("horizon-fog-blend"):1,u_is_globe_mode:M?1:0}),gp={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 sA(T){const l=[];for(let c=0;c<T.length;c++){if(T[c]===null)continue;const _=T[c].split(" ");l.push(_.pop())}return l}class qd{constructor(l,c,_,M,R,j,$,te){const se=l.gl;this.program=se.createProgram();const we=sA(c.staticAttributes),Ie=_?_.getBinderAttributes():[],Re=we.concat(Ie),$e=ri.prelude.staticUniforms?sA(ri.prelude.staticUniforms):[],Ze=$.staticUniforms?sA($.staticUniforms):[],ft=c.staticUniforms?sA(c.staticUniforms):[],lt=_?_.getBinderUniforms():[],pt=$e.concat(Ze).concat(ft).concat(lt),vt=[];for(const Zt of pt)vt.indexOf(Zt)<0&&vt.push(Zt);const Bt=_?_.defines():[];Ri(se)&&Bt.unshift("#version 300 es"),R&&Bt.push("#define OVERDRAW_INSPECTOR;"),j&&Bt.push("#define TERRAIN3D;"),te&&Bt.push(te);let kt=Bt.concat(ri.prelude.fragmentSource,$.fragmentSource,c.fragmentSource).join(`
|
||
`),Rt=Bt.concat(ri.prelude.vertexSource,$.vertexSource,c.vertexSource).join(`
|
||
`);Ri(se)||(kt=function(Zt){return Zt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(kt),Rt=function(Zt){return Zt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Rt));const zt=se.createShader(se.FRAGMENT_SHADER);if(se.isContextLost())return void(this.failedToCreate=!0);if(se.shaderSource(zt,kt),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,Rt),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=Re.length;for(let Zt=0;Zt<this.numAttributes;Zt++)Re[Zt]&&(se.bindAttribLocation(this.program,Zt,Re[Zt]),this.attributes[Re[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<vt.length;Zt++){const _n=vt[Zt];if(_n&&!tn[_n]){const bn=se.getUniformLocation(this.program,_n);bn&&(tn[_n]=bn)}}this.fixedUniforms=M(l,tn),this.terrainUniforms=((Zt,_n)=>({u_depth:new o.bC(Zt,_n.u_depth),u_terrain:new o.bC(Zt,_n.u_terrain),u_terrain_dim:new o.b5(Zt,_n.u_terrain_dim),u_terrain_matrix:new o.bD(Zt,_n.u_terrain_matrix),u_terrain_unpack:new o.bE(Zt,_n.u_terrain_unpack),u_terrain_exaggeration:new o.b5(Zt,_n.u_terrain_exaggeration)}))(l,tn),this.projectionUniforms=((Zt,_n)=>({u_projection_matrix:new o.bD(Zt,_n.u_projection_matrix),u_projection_tile_mercator_coords:new o.bE(Zt,_n.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bE(Zt,_n.u_projection_clipping_plane),u_projection_transition:new o.b5(Zt,_n.u_projection_transition),u_projection_fallback_matrix:new o.bD(Zt,_n.u_projection_fallback_matrix)}))(l,tn),this.binderUniforms=_?_.getUniforms(l,tn):[]}draw(l,c,_,M,R,j,$,te,se,we,Ie,Re,$e,Ze,ft,lt,pt,vt,Bt){const kt=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(_),l.setStencilMode(M),l.setColorMode(R),l.setCullFace(j),te){l.activeTexture.set(kt.TEXTURE2),kt.bindTexture(kt.TEXTURE_2D,te.depthTexture),l.activeTexture.set(kt.TEXTURE3),kt.bindTexture(kt.TEXTURE_2D,te.texture);for(const zt in this.terrainUniforms)this.terrainUniforms[zt].set(te[zt])}if(se)for(const zt in se)this.projectionUniforms[gp[zt]].set(se[zt]);if($)for(const zt in this.fixedUniforms)this.fixedUniforms[zt].set($[zt]);lt&<.setUniforms(l,this.binderUniforms,Ze,{zoom:ft});let Rt=0;switch(c){case kt.LINES:Rt=2;break;case kt.TRIANGLES:Rt=3;break;case kt.LINE_STRIP:Rt=1}for(const zt of $e.get()){const Tt=zt.vaos||(zt.vaos={});(Tt[we]||(Tt[we]=new Ku)).bind(l,this,Ie,lt?lt.getPaintVertexBuffers():[],Re,zt.vertexOffset,pt,vt,Bt),kt.drawElements(c,zt.primitiveLength*Rt,kt.UNSIGNED_SHORT,zt.primitiveOffset*Rt*2)}}}function Fc(T,l,c){const _=1/o.at(c,1,l.transform.tileZoom),M=Math.pow(2,c.tileID.overscaledZ),R=c.tileSize*Math.pow(2,l.transform.tileZoom)/M,j=R*(c.tileID.canonical.x+c.tileID.wrap*M),$=R*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_scale:[_,T.fromScale,T.toScale],u_fade:T.t,u_pixel_coord_upper:[j>>16,$>>16],u_pixel_coord_lower:[65535&j,65535&$]}}const yp=(T,l,c,_)=>{const M=T.style.light,R=M.properties.get("position"),j=[R.x,R.y,R.z],$=o.bI();M.properties.get("anchor")==="viewport"&&o.bJ($,T.transform.bearingInRadians),o.bK(j,j,$);const te=T.transform.transformLightDirection(j),se=M.properties.get("color");return{u_lightpos:j,u_lightpos_globe:te,u_lightintensity:M.properties.get("intensity"),u_lightcolor:[se.r,se.g,se.b],u_vertical_gradient:+l,u_opacity:c,u_fill_translate:_}},Pf=(T,l,c,_,M,R,j)=>o.e(yp(T,l,c,_),Fc(R,T,j),{u_height_factor:-Math.pow(2,M.overscaledZ)/j.tileSize/8}),hc=(T,l,c,_)=>o.e(Fc(l,T,c),{u_fill_translate:_}),Zs=(T,l)=>({u_world:T,u_fill_translate:l}),xh=(T,l,c,_,M)=>o.e(hc(T,l,c,M),{u_world:_}),Jh=(T,l,c,_,M)=>{const R=T.transform;let j,$,te=0;if(c.paint.get("circle-pitch-alignment")==="map"){const se=o.at(l,1,R.zoom);j=!0,$=[se,se],te=se/(o.X*Math.pow(2,l.tileID.overscaledZ))*2*Math.PI*M}else j=!1,$=R.pixelsToGLUnits;return{u_camera_to_center_distance:R.cameraToCenterDistance,u_scale_with_map:+(c.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+j,u_device_pixel_ratio:T.pixelRatio,u_extrude_scale:$,u_globe_extrude_scale:te,u_translate:_}},Ad=T=>({u_pixel_extrude_scale:[1/T.width,1/T.height]}),ef=T=>({u_viewport_size:[T.width,T.height]}),cd=(T,l=1)=>({u_color:T,u_overlay:0,u_overlay_scale:l}),fc=(T,l,c,_)=>{const M=o.at(T,1,l)/(o.X*Math.pow(2,T.tileID.overscaledZ))*2*Math.PI*_;return{u_extrude_scale:o.at(T,1,l),u_intensity:c,u_globe_extrude_scale:M}},wh=(T,l,c,_)=>{const M=o.H();o.bL(M,0,T.width,T.height,0,0,1);const R=T.context.gl;return{u_matrix:M,u_world:[R.drawingBufferWidth,R.drawingBufferHeight],u_image:c,u_color_ramp:_,u_opacity:l.paint.get("heatmap-opacity")}},Mh=(T,l,c)=>{const _=c.paint.get("hillshade-shadow-color"),M=c.paint.get("hillshade-highlight-color"),R=c.paint.get("hillshade-accent-color");let j=c.paint.get("hillshade-illumination-direction")*(Math.PI/180);return c.paint.get("hillshade-illumination-anchor")==="viewport"&&(j+=T.transform.bearingInRadians),{u_image:0,u_latrange:am(0,l.tileID),u_light:[c.paint.get("hillshade-exaggeration"),j],u_shadow:_,u_highlight:M,u_accent:R}},dd=(T,l)=>{const c=l.stride,_=o.H();return o.bL(_,0,o.X,-8192,0,0,1),o.J(_,_,[0,-8192,0]),{u_matrix:_,u_image:1,u_dimension:[c,c],u_zoom:T.overscaledZ,u_unpack:l.getUnpackVector()}};function am(T,l){const c=Math.pow(2,l.canonical.z),_=l.canonical.y;return[new o.Y(0,_/c).toLngLat().lat,new o.Y(0,(_+1)/c).toLngLat().lat]}const Lc=(T,l,c,_)=>{const M=T.transform;return{u_translation:Uc(T,l,c),u_ratio:_/o.at(l,1,M.zoom),u_device_pixel_ratio:T.pixelRatio,u_units_to_pixels:[1/M.pixelsToGLUnits[0],1/M.pixelsToGLUnits[1]]}},pu=(T,l,c,_,M)=>o.e(Lc(T,l,c,_),{u_image:0,u_image_height:M}),Sh=(T,l,c,_,M)=>{const R=T.transform,j=aA(l,R);return{u_translation:Uc(T,l,c),u_texsize:l.imageAtlasTexture.size,u_ratio:_/o.at(l,1,R.zoom),u_device_pixel_ratio:T.pixelRatio,u_image:0,u_scale:[j,M.fromScale,M.toScale],u_fade:M.t,u_units_to_pixels:[1/R.pixelsToGLUnits[0],1/R.pixelsToGLUnits[1]]}},mu=(T,l,c,_,M,R)=>{const j=T.lineAtlas,$=aA(l,T.transform),te=c.layout.get("line-cap")==="round",se=j.getDash(M.from,te),we=j.getDash(M.to,te),Ie=se.width*R.fromScale,Re=we.width*R.toScale;return o.e(Lc(T,l,c,_),{u_patternscale_a:[$/Ie,-se.height/2],u_patternscale_b:[$/Re,-we.height/2],u_sdfgamma:j.width/(256*Math.min(Ie,Re)*T.pixelRatio)/2,u_image:0,u_tex_y_a:se.y,u_tex_y_b:we.y,u_mix:R.t})};function aA(T,l){return 1/o.at(T,1,l.tileZoom)}function Uc(T,l,c){return o.au(T.transform,l,c.paint.get("line-translate"),c.paint.get("line-translate-anchor"))}const Yd=(T,l,c,_,M)=>{return{u_tl_parent:T,u_scale_parent:l,u_buffer_scale:1,u_fade_t:c.mix,u_opacity:c.opacity*_.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:_.paint.get("raster-brightness-min"),u_brightness_high:_.paint.get("raster-brightness-max"),u_saturation_factor:(j=_.paint.get("raster-saturation"),j>0?1-1/(1.001-j):-j),u_contrast_factor:(R=_.paint.get("raster-contrast"),R>0?1/(1-R):1+R),u_spin_weights:tf(_.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 R,j};function tf(T){T*=Math.PI/180;const l=Math.sin(T),c=Math.cos(T);return[(2*c+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3]}const iu=(T,l,c,_,M,R,j,$,te,se,we,Ie,Re)=>{const $e=j.transform;return{u_is_size_zoom_constant:+(T==="constant"||T==="source"),u_is_size_feature_constant:+(T==="constant"||T==="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:j.options.fadeDuration?j.symbolFadeChange:1,u_label_plane_matrix:$,u_coord_matrix:te,u_is_text:+we,u_pitch_with_map:+_,u_is_along_line:M,u_is_variable_anchor:R,u_texsize:Ie,u_texture:0,u_translation:se,u_pitched_scale:Re}},Bl=(T,l,c,_,M,R,j,$,te,se,we,Ie,Re,$e)=>{const Ze=j.transform;return o.e(iu(T,l,c,_,M,R,j,$,te,se,we,Ie,$e),{u_gamma_scale:_?Math.cos(Ze.pitch*Math.PI/180)*Ze.cameraToCenterDistance:1,u_device_pixel_ratio:j.pixelRatio,u_is_halo:1})},GA=(T,l,c,_,M,R,j,$,te,se,we,Ie,Re)=>o.e(Bl(T,l,c,_,M,R,j,$,te,se,!0,we,0,Re),{u_texsize_icon:Ie,u_texture_icon:1}),zc=(T,l)=>({u_opacity:T,u_color:l}),nf=(T,l,c,_,M)=>o.e(function(R,j,$,te){const se=$.imageManager.getPattern(R.from.toString()),we=$.imageManager.getPattern(R.to.toString()),{width:Ie,height:Re}=$.imageManager.getPixelSize(),$e=Math.pow(2,te.tileID.overscaledZ),Ze=te.tileSize*Math.pow(2,$.transform.tileZoom)/$e,ft=Ze*(te.tileID.canonical.x+te.tileID.wrap*$e),lt=Ze*te.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:se.tl,u_pattern_br_a:se.br,u_pattern_tl_b:we.tl,u_pattern_br_b:we.br,u_texsize:[Ie,Re],u_mix:j.t,u_pattern_size_a:se.displaySize,u_pattern_size_b:we.displaySize,u_scale_a:j.fromScale,u_scale_b:j.toScale,u_tile_units_to_pixels:1/o.at(te,1,$.transform.tileZoom),u_pixel_coord_upper:[ft>>16,lt>>16],u_pixel_coord_lower:[65535&ft,65535<]}}(c,M,l,_),{u_opacity:T}),Rf=(T,l)=>{},hd={fillExtrusion:(T,l)=>({u_lightpos:new o.bG(T,l.u_lightpos),u_lightpos_globe:new o.bG(T,l.u_lightpos_globe),u_lightintensity:new o.b5(T,l.u_lightintensity),u_lightcolor:new o.bG(T,l.u_lightcolor),u_vertical_gradient:new o.b5(T,l.u_vertical_gradient),u_opacity:new o.b5(T,l.u_opacity),u_fill_translate:new o.bH(T,l.u_fill_translate)}),fillExtrusionPattern:(T,l)=>({u_lightpos:new o.bG(T,l.u_lightpos),u_lightpos_globe:new o.bG(T,l.u_lightpos_globe),u_lightintensity:new o.b5(T,l.u_lightintensity),u_lightcolor:new o.bG(T,l.u_lightcolor),u_vertical_gradient:new o.b5(T,l.u_vertical_gradient),u_height_factor:new o.b5(T,l.u_height_factor),u_opacity:new o.b5(T,l.u_opacity),u_fill_translate:new o.bH(T,l.u_fill_translate),u_image:new o.bC(T,l.u_image),u_texsize:new o.bH(T,l.u_texsize),u_pixel_coord_upper:new o.bH(T,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.bH(T,l.u_pixel_coord_lower),u_scale:new o.bG(T,l.u_scale),u_fade:new o.b5(T,l.u_fade)}),fill:(T,l)=>({u_fill_translate:new o.bH(T,l.u_fill_translate)}),fillPattern:(T,l)=>({u_image:new o.bC(T,l.u_image),u_texsize:new o.bH(T,l.u_texsize),u_pixel_coord_upper:new o.bH(T,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.bH(T,l.u_pixel_coord_lower),u_scale:new o.bG(T,l.u_scale),u_fade:new o.b5(T,l.u_fade),u_fill_translate:new o.bH(T,l.u_fill_translate)}),fillOutline:(T,l)=>({u_world:new o.bH(T,l.u_world),u_fill_translate:new o.bH(T,l.u_fill_translate)}),fillOutlinePattern:(T,l)=>({u_world:new o.bH(T,l.u_world),u_image:new o.bC(T,l.u_image),u_texsize:new o.bH(T,l.u_texsize),u_pixel_coord_upper:new o.bH(T,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.bH(T,l.u_pixel_coord_lower),u_scale:new o.bG(T,l.u_scale),u_fade:new o.b5(T,l.u_fade),u_fill_translate:new o.bH(T,l.u_fill_translate)}),circle:(T,l)=>({u_camera_to_center_distance:new o.b5(T,l.u_camera_to_center_distance),u_scale_with_map:new o.bC(T,l.u_scale_with_map),u_pitch_with_map:new o.bC(T,l.u_pitch_with_map),u_extrude_scale:new o.bH(T,l.u_extrude_scale),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_globe_extrude_scale:new o.b5(T,l.u_globe_extrude_scale),u_translate:new o.bH(T,l.u_translate)}),collisionBox:(T,l)=>({u_pixel_extrude_scale:new o.bH(T,l.u_pixel_extrude_scale)}),collisionCircle:(T,l)=>({u_viewport_size:new o.bH(T,l.u_viewport_size)}),debug:(T,l)=>({u_color:new o.bF(T,l.u_color),u_overlay:new o.bC(T,l.u_overlay),u_overlay_scale:new o.b5(T,l.u_overlay_scale)}),depth:Rf,clippingMask:Rf,heatmap:(T,l)=>({u_extrude_scale:new o.b5(T,l.u_extrude_scale),u_intensity:new o.b5(T,l.u_intensity),u_globe_extrude_scale:new o.b5(T,l.u_globe_extrude_scale)}),heatmapTexture:(T,l)=>({u_matrix:new o.bD(T,l.u_matrix),u_world:new o.bH(T,l.u_world),u_image:new o.bC(T,l.u_image),u_color_ramp:new o.bC(T,l.u_color_ramp),u_opacity:new o.b5(T,l.u_opacity)}),hillshade:(T,l)=>({u_image:new o.bC(T,l.u_image),u_latrange:new o.bH(T,l.u_latrange),u_light:new o.bH(T,l.u_light),u_shadow:new o.bF(T,l.u_shadow),u_highlight:new o.bF(T,l.u_highlight),u_accent:new o.bF(T,l.u_accent)}),hillshadePrepare:(T,l)=>({u_matrix:new o.bD(T,l.u_matrix),u_image:new o.bC(T,l.u_image),u_dimension:new o.bH(T,l.u_dimension),u_zoom:new o.b5(T,l.u_zoom),u_unpack:new o.bE(T,l.u_unpack)}),line:(T,l)=>({u_translation:new o.bH(T,l.u_translation),u_ratio:new o.b5(T,l.u_ratio),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_units_to_pixels:new o.bH(T,l.u_units_to_pixels)}),lineGradient:(T,l)=>({u_translation:new o.bH(T,l.u_translation),u_ratio:new o.b5(T,l.u_ratio),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_units_to_pixels:new o.bH(T,l.u_units_to_pixels),u_image:new o.bC(T,l.u_image),u_image_height:new o.b5(T,l.u_image_height)}),linePattern:(T,l)=>({u_translation:new o.bH(T,l.u_translation),u_texsize:new o.bH(T,l.u_texsize),u_ratio:new o.b5(T,l.u_ratio),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_image:new o.bC(T,l.u_image),u_units_to_pixels:new o.bH(T,l.u_units_to_pixels),u_scale:new o.bG(T,l.u_scale),u_fade:new o.b5(T,l.u_fade)}),lineSDF:(T,l)=>({u_translation:new o.bH(T,l.u_translation),u_ratio:new o.b5(T,l.u_ratio),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_units_to_pixels:new o.bH(T,l.u_units_to_pixels),u_patternscale_a:new o.bH(T,l.u_patternscale_a),u_patternscale_b:new o.bH(T,l.u_patternscale_b),u_sdfgamma:new o.b5(T,l.u_sdfgamma),u_image:new o.bC(T,l.u_image),u_tex_y_a:new o.b5(T,l.u_tex_y_a),u_tex_y_b:new o.b5(T,l.u_tex_y_b),u_mix:new o.b5(T,l.u_mix)}),raster:(T,l)=>({u_tl_parent:new o.bH(T,l.u_tl_parent),u_scale_parent:new o.b5(T,l.u_scale_parent),u_buffer_scale:new o.b5(T,l.u_buffer_scale),u_fade_t:new o.b5(T,l.u_fade_t),u_opacity:new o.b5(T,l.u_opacity),u_image0:new o.bC(T,l.u_image0),u_image1:new o.bC(T,l.u_image1),u_brightness_low:new o.b5(T,l.u_brightness_low),u_brightness_high:new o.b5(T,l.u_brightness_high),u_saturation_factor:new o.b5(T,l.u_saturation_factor),u_contrast_factor:new o.b5(T,l.u_contrast_factor),u_spin_weights:new o.bG(T,l.u_spin_weights),u_coords_top:new o.bE(T,l.u_coords_top),u_coords_bottom:new o.bE(T,l.u_coords_bottom)}),symbolIcon:(T,l)=>({u_is_size_zoom_constant:new o.bC(T,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bC(T,l.u_is_size_feature_constant),u_size_t:new o.b5(T,l.u_size_t),u_size:new o.b5(T,l.u_size),u_camera_to_center_distance:new o.b5(T,l.u_camera_to_center_distance),u_pitch:new o.b5(T,l.u_pitch),u_rotate_symbol:new o.bC(T,l.u_rotate_symbol),u_aspect_ratio:new o.b5(T,l.u_aspect_ratio),u_fade_change:new o.b5(T,l.u_fade_change),u_label_plane_matrix:new o.bD(T,l.u_label_plane_matrix),u_coord_matrix:new o.bD(T,l.u_coord_matrix),u_is_text:new o.bC(T,l.u_is_text),u_pitch_with_map:new o.bC(T,l.u_pitch_with_map),u_is_along_line:new o.bC(T,l.u_is_along_line),u_is_variable_anchor:new o.bC(T,l.u_is_variable_anchor),u_texsize:new o.bH(T,l.u_texsize),u_texture:new o.bC(T,l.u_texture),u_translation:new o.bH(T,l.u_translation),u_pitched_scale:new o.b5(T,l.u_pitched_scale)}),symbolSDF:(T,l)=>({u_is_size_zoom_constant:new o.bC(T,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bC(T,l.u_is_size_feature_constant),u_size_t:new o.b5(T,l.u_size_t),u_size:new o.b5(T,l.u_size),u_camera_to_center_distance:new o.b5(T,l.u_camera_to_center_distance),u_pitch:new o.b5(T,l.u_pitch),u_rotate_symbol:new o.bC(T,l.u_rotate_symbol),u_aspect_ratio:new o.b5(T,l.u_aspect_ratio),u_fade_change:new o.b5(T,l.u_fade_change),u_label_plane_matrix:new o.bD(T,l.u_label_plane_matrix),u_coord_matrix:new o.bD(T,l.u_coord_matrix),u_is_text:new o.bC(T,l.u_is_text),u_pitch_with_map:new o.bC(T,l.u_pitch_with_map),u_is_along_line:new o.bC(T,l.u_is_along_line),u_is_variable_anchor:new o.bC(T,l.u_is_variable_anchor),u_texsize:new o.bH(T,l.u_texsize),u_texture:new o.bC(T,l.u_texture),u_gamma_scale:new o.b5(T,l.u_gamma_scale),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_is_halo:new o.bC(T,l.u_is_halo),u_translation:new o.bH(T,l.u_translation),u_pitched_scale:new o.b5(T,l.u_pitched_scale)}),symbolTextAndIcon:(T,l)=>({u_is_size_zoom_constant:new o.bC(T,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bC(T,l.u_is_size_feature_constant),u_size_t:new o.b5(T,l.u_size_t),u_size:new o.b5(T,l.u_size),u_camera_to_center_distance:new o.b5(T,l.u_camera_to_center_distance),u_pitch:new o.b5(T,l.u_pitch),u_rotate_symbol:new o.bC(T,l.u_rotate_symbol),u_aspect_ratio:new o.b5(T,l.u_aspect_ratio),u_fade_change:new o.b5(T,l.u_fade_change),u_label_plane_matrix:new o.bD(T,l.u_label_plane_matrix),u_coord_matrix:new o.bD(T,l.u_coord_matrix),u_is_text:new o.bC(T,l.u_is_text),u_pitch_with_map:new o.bC(T,l.u_pitch_with_map),u_is_along_line:new o.bC(T,l.u_is_along_line),u_is_variable_anchor:new o.bC(T,l.u_is_variable_anchor),u_texsize:new o.bH(T,l.u_texsize),u_texsize_icon:new o.bH(T,l.u_texsize_icon),u_texture:new o.bC(T,l.u_texture),u_texture_icon:new o.bC(T,l.u_texture_icon),u_gamma_scale:new o.b5(T,l.u_gamma_scale),u_device_pixel_ratio:new o.b5(T,l.u_device_pixel_ratio),u_is_halo:new o.bC(T,l.u_is_halo),u_translation:new o.bH(T,l.u_translation),u_pitched_scale:new o.b5(T,l.u_pitched_scale)}),background:(T,l)=>({u_opacity:new o.b5(T,l.u_opacity),u_color:new o.bF(T,l.u_color)}),backgroundPattern:(T,l)=>({u_opacity:new o.b5(T,l.u_opacity),u_image:new o.bC(T,l.u_image),u_pattern_tl_a:new o.bH(T,l.u_pattern_tl_a),u_pattern_br_a:new o.bH(T,l.u_pattern_br_a),u_pattern_tl_b:new o.bH(T,l.u_pattern_tl_b),u_pattern_br_b:new o.bH(T,l.u_pattern_br_b),u_texsize:new o.bH(T,l.u_texsize),u_mix:new o.b5(T,l.u_mix),u_pattern_size_a:new o.bH(T,l.u_pattern_size_a),u_pattern_size_b:new o.bH(T,l.u_pattern_size_b),u_scale_a:new o.b5(T,l.u_scale_a),u_scale_b:new o.b5(T,l.u_scale_b),u_pixel_coord_upper:new o.bH(T,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.bH(T,l.u_pixel_coord_lower),u_tile_units_to_pixels:new o.b5(T,l.u_tile_units_to_pixels)}),terrain:(T,l)=>({u_texture:new o.bC(T,l.u_texture),u_ele_delta:new o.b5(T,l.u_ele_delta),u_fog_matrix:new o.bD(T,l.u_fog_matrix),u_fog_color:new o.bF(T,l.u_fog_color),u_fog_ground_blend:new o.b5(T,l.u_fog_ground_blend),u_fog_ground_blend_opacity:new o.b5(T,l.u_fog_ground_blend_opacity),u_horizon_color:new o.bF(T,l.u_horizon_color),u_horizon_fog_blend:new o.b5(T,l.u_horizon_fog_blend),u_is_globe_mode:new o.b5(T,l.u_is_globe_mode)}),terrainDepth:(T,l)=>({u_ele_delta:new o.b5(T,l.u_ele_delta)}),terrainCoords:(T,l)=>({u_texture:new o.bC(T,l.u_texture),u_terrain_coords_id:new o.b5(T,l.u_terrain_coords_id),u_ele_delta:new o.b5(T,l.u_ele_delta)}),projectionErrorMeasurement:(T,l)=>({u_input:new o.b5(T,l.u_input),u_output_expected:new o.b5(T,l.u_output_expected)}),atmosphere:(T,l)=>({u_sun_pos:new o.bG(T,l.u_sun_pos),u_atmosphere_blend:new o.b5(T,l.u_atmosphere_blend),u_globe_position:new o.bG(T,l.u_globe_position),u_globe_radius:new o.b5(T,l.u_globe_radius),u_inv_proj_matrix:new o.bD(T,l.u_inv_proj_matrix)}),sky:(T,l)=>({u_sky_color:new o.bF(T,l.u_sky_color),u_horizon_color:new o.bF(T,l.u_horizon_color),u_horizon:new o.bH(T,l.u_horizon),u_horizon_normal:new o.bH(T,l.u_horizon_normal),u_sky_horizon_blend:new o.b5(T,l.u_sky_horizon_blend),u_sky_blend:new o.b5(T,l.u_sky_blend)})};class CA{constructor(l,c,_){this.context=l;const M=l.gl;this.buffer=M.createBuffer(),this.dynamicDraw=!!_,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 tl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ol{constructor(l,c,_,M){this.length=c.length,this.attributes=_,this.itemSize=c.bytesPerElement,this.dynamicDraw=M,this.context=l;const R=l.gl;this.buffer=R.createBuffer(),l.bindVertexBuffer.set(this.buffer),R.bufferData(R.ARRAY_BUFFER,c.arrayBuffer,this.dynamicDraw?R.DYNAMIC_DRAW:R.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 _=0;_<this.attributes.length;_++){const M=c.attributes[this.attributes[_].name];M!==void 0&&l.enableVertexAttribArray(M)}}setVertexAttribPointers(l,c,_){for(let M=0;M<this.attributes.length;M++){const R=this.attributes[M],j=c.attributes[R.name];j!==void 0&&l.vertexAttribPointer(j,R.components,l[tl[R.type]],!1,this.itemSize,R.offset+this.itemSize*(_||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class $o{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 Eh extends $o{getDefault(){return o.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 lm extends $o{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class jc extends $o{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class Fu extends $o{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 $d extends $o{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class Vd extends $o{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class pc extends $o{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 Hd extends $o{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 rf extends $o{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 mc extends $o{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 gu extends $o{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 $o{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 $o{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 an extends $o{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 Ur extends $o{getDefault(){return o.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 Ci extends $o{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class _o extends $o{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 oa extends $o{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class Vo extends $o{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class QA extends $o{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class vp extends $o{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class Il extends $o{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 yu extends $o{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 qA extends $o{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 kl extends $o{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 Wi extends $o{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 YA extends $o{getDefault(){return null}set(l){const c=this.gl;c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Uo extends $o{getDefault(){return null}set(l){var c;if(l===this.current&&!this.dirty)return;const _=this.gl;Ri(_)?_.bindVertexArray(l):(c=_.getExtension("OES_vertex_array_object"))===null||c===void 0||c.bindVertexArrayOES(l),this.current=l,this.dirty=!1}}class Nc extends $o{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 $A extends $o{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 _A extends $o{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 lA extends $o{constructor(l,c){super(l),this.context=l,this.parent=c}getDefault(){return null}}class Tl extends lA{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 gc extends lA{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 vu extends lA{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 jl="Framebuffer is not complete";class Wc{constructor(l,c,_,M,R){this.context=l,this.width=c,this.height=_;const j=l.gl,$=this.framebuffer=j.createFramebuffer();if(this.colorAttachment=new Tl(l,$),M)this.depthAttachment=R?new vu(l,$):new gc(l,$);else if(R)throw new Error("Stencil cannot be set without depth");if(j.checkFramebufferStatus(j.FRAMEBUFFER)!==j.FRAMEBUFFER_COMPLETE)throw new Error(jl)}destroy(){const l=this.context.gl,c=this.colorAttachment.get();if(c&&l.deleteTexture(c),this.depthAttachment){const _=this.depthAttachment.get();_&&l.deleteRenderbuffer(_)}l.deleteFramebuffer(this.framebuffer)}}class Zd{constructor(l){var c,_;if(this.gl=l,this.clearColor=new Eh(this),this.clearDepth=new lm(this),this.clearStencil=new jc(this),this.colorMask=new Fu(this),this.depthMask=new $d(this),this.stencilMask=new Vd(this),this.stencilFunc=new pc(this),this.stencilOp=new Hd(this),this.stencilTest=new rf(this),this.depthRange=new mc(this),this.depthTest=new gu(this),this.depthFunc=new Ht(this),this.blend=new Pn(this),this.blendFunc=new an(this),this.blendColor=new Ur(this),this.blendEquation=new Ci(this),this.cullFace=new _o(this),this.cullFaceSide=new oa(this),this.frontFace=new Vo(this),this.program=new QA(this),this.activeTexture=new vp(this),this.viewport=new Il(this),this.bindFramebuffer=new yu(this),this.bindRenderbuffer=new qA(this),this.bindTexture=new kl(this),this.bindVertexBuffer=new Wi(this),this.bindElementBuffer=new YA(this),this.bindVertexArray=new Uo(this),this.pixelStoreUnpack=new Nc(this),this.pixelStoreUnpackPremultiplyAlpha=new $A(this),this.pixelStoreUnpackFlipY=new _A(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),Ri(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=(_=l.RGB16F)!==null&&_!==void 0?_: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 CA(this,l,c)}createVertexBuffer(l,c,_){return new Ol(this,l,c,_)}createRenderbuffer(l,c,_){const M=this.gl,R=M.createRenderbuffer();return this.bindRenderbuffer.set(R),M.renderbufferStorage(M.RENDERBUFFER,l,c,_),this.bindRenderbuffer.set(null),R}createFramebuffer(l,c,_,M){return new Wc(this,l,c,_,M)}clear({color:l,depth:c,stencil:_}){const M=this.gl;let R=0;l&&(R|=M.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),c!==void 0&&(R|=M.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(c),this.depthMask.set(!0)),_!==void 0&&(R|=M.STENCIL_BUFFER_BIT,this.clearStencil.set(_),this.stencilMask.set(255)),M.clear(R)}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){o.bz(l.blendFunction,Vi.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 Ri(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 Ri(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 za;function fd(T,l,c,_,M){const R=T.context,j=T.transform,$=R.gl,te=T.useProgram("collisionBox"),se=[];let we=0,Ie=0;for(let pt=0;pt<_.length;pt++){const vt=_[pt],Bt=l.getTile(vt).getBucket(c);if(!Bt)continue;const kt=M?Bt.textCollisionBox:Bt.iconCollisionBox,Rt=Bt.collisionCircleArray;Rt.length>0&&(se.push({circleArray:Rt,circleOffset:Ie,coord:vt}),we+=Rt.length/4,Ie=we),kt&&te.draw(R,$.LINES,Jr.disabled,Ni.disabled,T.colorModeForRenderPass(),Ui.disabled,Ad(T.transform),T.style.map.terrain&&T.style.map.terrain.getTerrainData(vt),j.getProjectionData({overscaledTileID:vt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c.id,kt.layoutVertexBuffer,kt.indexBuffer,kt.segments,null,T.transform.zoom,null,null,kt.collisionVertexBuffer)}if(!M||!se.length)return;const Re=T.useProgram("collisionCircle"),$e=new o.bM;$e.resize(4*we),$e._trim();let Ze=0;for(const pt of se)for(let vt=0;vt<pt.circleArray.length/4;vt++){const Bt=4*vt,kt=pt.circleArray[Bt+0],Rt=pt.circleArray[Bt+1],zt=pt.circleArray[Bt+2],Tt=pt.circleArray[Bt+3];$e.emplace(Ze++,kt,Rt,zt,Tt,0),$e.emplace(Ze++,kt,Rt,zt,Tt,1),$e.emplace(Ze++,kt,Rt,zt,Tt,2),$e.emplace(Ze++,kt,Rt,zt,Tt,3)}(!za||za.length<2*we)&&(za=function(pt){const vt=2*pt,Bt=new o.bO;Bt.resize(vt),Bt._trim();for(let kt=0;kt<vt;kt++){const Rt=6*kt;Bt.uint16[Rt+0]=4*kt+0,Bt.uint16[Rt+1]=4*kt+1,Bt.uint16[Rt+2]=4*kt+2,Bt.uint16[Rt+3]=4*kt+2,Bt.uint16[Rt+4]=4*kt+3,Bt.uint16[Rt+5]=4*kt+0}return Bt}(we));const ft=R.createIndexBuffer(za,!0),lt=R.createVertexBuffer($e,o.bN.members,!0);for(const pt of se){const vt=ef(T.transform);Re.draw(R,$.TRIANGLES,Jr.disabled,Ni.disabled,T.colorModeForRenderPass(),Ui.disabled,vt,T.style.map.terrain&&T.style.map.terrain.getTerrainData(pt.coord),null,c.id,lt,ft,o.aD.simpleSegment(0,2*pt.circleOffset,pt.circleArray.length,pt.circleArray.length/2),null,T.transform.zoom,null,null,null)}lt.destroy(),ft.destroy()}const yc=o.aq(new Float32Array(16));function VA(T,l,c,_,M,R){const{horizontalAlign:j,verticalAlign:$}=o.ay(T);return new o.P((-(j-.5)*l/M+_[0])*R,(-($-.5)*c/M+_[1])*R)}function of(T,l,c,_,M,R){const j=l.tileAnchorPoint.add(new o.P(l.translation[0],l.translation[1]));if(l.pitchWithMap){let $=_.mult(R);c||($=$.rotate(-M));const te=j.add($);return $t(te.x,te.y,l.pitchedLabelPlaneMatrix,l.getElevation).point}if(c){const $=Fn(l.tileAnchorPoint.x+1,l.tileAnchorPoint.y,l).point.sub(T),te=Math.atan($.y/$.x)+($.x<0?Math.PI:0);return T.add(_.rotate(te))}return T.add(_)}function bA(T,l,c,_,M,R,j,$,te,se,we,Ie){const Re=T.text.placedSymbolArray,$e=T.text.dynamicLayoutVertexArray,Ze=T.icon.dynamicLayoutVertexArray,ft={};$e.clear();for(let lt=0;lt<Re.length;lt++){const pt=Re.get(lt),vt=pt.hidden||!pt.crossTileID||T.allowVerticalPlacement&&!pt.placedOrientation?null:_[pt.crossTileID];if(vt){const Bt=new o.P(pt.anchorX,pt.anchorY),kt={getElevation:Ie,width:M.width,height:M.height,pitchedLabelPlaneMatrix:R,lineVertexArray:null,pitchWithMap:c,transform:M,projectionCache:null,tileAnchorPoint:Bt,translation:se,unwrappedTileID:we},Rt=c?Er(Bt.x,Bt.y,kt):Fn(Bt.x,Bt.y,kt),zt=jt(M.cameraToCenterDistance,Rt.signedDistanceFromCamera);let Tt=o.aj(T.textSizeData,$,pt)*zt/o.as;c&&(Tt*=T.tilePixelRatio/j);const{width:tn,height:Zt,anchor:_n,textOffset:bn,textBoxScale:vn}=vt,In=VA(_n,tn,Zt,bn,vn,Tt),Wn=M.getPitchedTextCorrection(Bt.x+se[0],Bt.y+se[1],we),Sn=of(Rt.point,kt,l,In,-M.bearingInRadians,Wn),Tr=T.allowVerticalPlacement&&pt.placedOrientation===o.ai.vertical?Math.PI/2:0;for(let Bi=0;Bi<pt.numGlyphs;Bi++)o.ak($e,Sn,Tr);te&&pt.associatedIconIndex>=0&&(ft[pt.associatedIconIndex]={shiftedAnchor:Sn,angle:Tr})}else qi(pt.numGlyphs,$e)}if(te){Ze.clear();const lt=T.icon.placedSymbolArray;for(let pt=0;pt<lt.length;pt++){const vt=lt.get(pt);if(vt.hidden)qi(vt.numGlyphs,Ze);else{const Bt=ft[pt];if(Bt)for(let kt=0;kt<vt.numGlyphs;kt++)o.ak(Ze,Bt.shiftedAnchor,Bt.angle);else qi(vt.numGlyphs,Ze)}}T.icon.dynamicLayoutVertexBuffer.updateData(Ze)}T.text.dynamicLayoutVertexBuffer.updateData($e)}function HA(T,l,c){return c.iconsInText&&l?"symbolTextAndIcon":T?"symbolSDF":"symbolIcon"}function Gc(T,l,c,_,M,R,j,$,te,se,we,Ie,Re){const $e=T.context,Ze=$e.gl,ft=T.transform,lt=$==="map",pt=te==="map",vt=$!=="viewport"&&c.layout.get("symbol-placement")!=="point",Bt=lt&&!pt&&!vt,kt=!c.layout.get("symbol-sort-key").isConstant();let Rt=!1;const zt=T.getDepthModeForSublayer(0,Jr.ReadOnly),Tt=c._unevaluatedLayout.hasValue("text-variable-anchor")||c._unevaluatedLayout.hasValue("text-variable-anchor-offset"),tn=[],Zt=ft.getCircleRadiusCorrection();for(const _n of _){const bn=l.getTile(_n),vn=bn.getBucket(c);if(!vn)continue;const In=M?vn.text:vn.icon;if(!In||!In.segments.get().length||!In.hasVisibleVertices)continue;const Wn=In.programConfigurations.get(c.id),Sn=M||vn.sdfIcons,Tr=M?vn.textSizeData:vn.iconSizeData,Bi=pt||ft.pitch!==0,$i=T.useProgram(HA(Sn,M,vn),Wn),Oo=o.ah(Tr,ft.zoom),Si=T.style.map.terrain&&T.style.map.terrain.getTerrainData(_n);let jo,No,xo,yo,ka=[0,0],Wo=null;if(M)No=bn.glyphAtlasTexture,xo=Ze.LINEAR,jo=bn.glyphAtlasTexture.size,vn.iconsInText&&(ka=bn.imageAtlasTexture.size,Wo=bn.imageAtlasTexture,yo=Bi||T.options.rotating||T.options.zooming||Tr.kind==="composite"||Tr.kind==="camera"?Ze.LINEAR:Ze.NEAREST);else{const xs=c.layout.get("icon-size").constantOr(0)!==1||vn.iconsNeedLinear;No=bn.imageAtlasTexture,xo=Sn||T.options.rotating||T.options.zooming||xs||Bi?Ze.LINEAR:Ze.NEAREST,jo=bn.imageAtlasTexture.size}const ds=o.at(bn,1,T.transform.zoom),Wa=ct(lt,T.transform,ds),$u=o.H();o.an($u,Wa);const fl=At(pt,lt,T.transform,ds),pl=o.au(ft,bn,R,j),uu=ft.getProjectionData({overscaledTileID:_n,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),OA=Tt&&vn.hasTextData(),IA=c.layout.get("icon-text-fit")!=="none"&&OA&&vn.hasIconData();if(vt){const xs=T.style.map.terrain?(nl,rl)=>T.style.map.terrain.getElevation(_n,nl,rl):null,qs=c.layout.get("text-rotation-alignment")==="map";Rn(vn,T,M,Wa,$u,pt,se,qs,_n.toUnwrapped(),ft.width,ft.height,pl,xs)}const Vu=M&&Tt||IA,Js=vt||Vu?yc:pt?Wa:T.transform.clipSpaceToPixelsMatrix,ml=Sn&&c.paint.get(M?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let sa;sa=Sn?vn.iconsInText?GA(Tr.kind,Oo,Bt,pt,vt,Vu,T,Js,fl,pl,jo,ka,Zt):Bl(Tr.kind,Oo,Bt,pt,vt,Vu,T,Js,fl,pl,M,jo,0,Zt):iu(Tr.kind,Oo,Bt,pt,vt,Vu,T,Js,fl,pl,M,jo,Zt);const Pl={program:$i,buffers:In,uniformValues:sa,projectionData:uu,atlasTexture:No,atlasTextureIcon:Wo,atlasInterpolation:xo,atlasInterpolationIcon:yo,isSDF:Sn,hasHalo:ml};if(kt&&vn.canOverlap){Rt=!0;const xs=In.segments.get();for(const qs of xs)tn.push({segments:new o.aD([qs]),sortKey:qs.sortKey,state:Pl,terrainData:Si})}else tn.push({segments:In.segments,sortKey:0,state:Pl,terrainData:Si})}Rt&&tn.sort((_n,bn)=>_n.sortKey-bn.sortKey);for(const _n of tn){const bn=_n.state;if($e.activeTexture.set(Ze.TEXTURE0),bn.atlasTexture.bind(bn.atlasInterpolation,Ze.CLAMP_TO_EDGE),bn.atlasTextureIcon&&($e.activeTexture.set(Ze.TEXTURE1),bn.atlasTextureIcon&&bn.atlasTextureIcon.bind(bn.atlasInterpolationIcon,Ze.CLAMP_TO_EDGE)),bn.isSDF){const vn=bn.uniformValues;bn.hasHalo&&(vn.u_is_halo=1,Xd(bn.buffers,_n.segments,c,T,bn.program,zt,we,Ie,vn,bn.projectionData,_n.terrainData)),vn.u_is_halo=0}Xd(bn.buffers,_n.segments,c,T,bn.program,zt,we,Ie,bn.uniformValues,bn.projectionData,_n.terrainData)}}function Xd(T,l,c,_,M,R,j,$,te,se,we){const Ie=_.context;M.draw(Ie,Ie.gl.TRIANGLES,R,j,$,Ui.backCCW,te,we,se,c.id,T.layoutVertexBuffer,T.indexBuffer,l,c.paint,_.transform.zoom,T.programConfigurations.get(c.id),T.dynamicLayoutVertexBuffer,T.opacityVertexBuffer)}function Ho(T,l,c,_,M){const R=T.context,j=R.gl,$=Ni.disabled,te=new Vi([j.ONE,j.ONE],o.b4.transparent,[!0,!0,!0,!0]),se=l.getBucket(c);if(!se)return;const we=_.key;let Ie=c.heatmapFbos.get(we);Ie||(Ie=ZA(R,l.tileSize,l.tileSize),c.heatmapFbos.set(we,Ie)),R.bindFramebuffer.set(Ie.framebuffer),R.viewport.set([0,0,l.tileSize,l.tileSize]),R.clear({color:o.b4.transparent});const Re=se.programConfigurations.get(c.id),$e=T.useProgram("heatmap",Re,!M),Ze=T.transform.getProjectionData({overscaledTileID:l.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=T.style.map.terrain.getTerrainData(_);$e.draw(R,j.TRIANGLES,Jr.disabled,$,te,Ui.disabled,fc(l,T.transform.zoom,c.paint.get("heatmap-intensity"),1),ft,Ze,c.id,se.layoutVertexBuffer,se.indexBuffer,se.segments,c.paint,T.transform.zoom,Re)}function Qc(T,l,c,_,M){const R=T.context,j=R.gl,$=T.transform;R.setColorMode(T.colorModeForRenderPass());const te=Lu(R,l),se=c.key,we=l.heatmapFbos.get(se);if(!we)return;R.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,we.colorAttachment.get()),R.activeTexture.set(j.TEXTURE1),te.bind(j.LINEAR,j.CLAMP_TO_EDGE);const Ie=$.getProjectionData({overscaledTileID:c,applyTerrainMatrix:M,applyGlobeMatrix:!_});T.useProgram("heatmapTexture").draw(R,j.TRIANGLES,Jr.disabled,Ni.disabled,T.colorModeForRenderPass(),Ui.disabled,wh(T,l,0,1),null,Ie,l.id,T.rasterBoundsBuffer,T.quadTriangleIndexBuffer,T.rasterBoundsSegments,l.paint,$.zoom),we.destroy(),l.heatmapFbos.delete(se)}function ZA(T,l,c){var _,M;const R=T.gl,j=R.createTexture();R.bindTexture(R.TEXTURE_2D,j),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,R.LINEAR),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,R.LINEAR);const $=(_=T.HALF_FLOAT)!==null&&_!==void 0?_:R.UNSIGNED_BYTE,te=(M=T.RGBA16F)!==null&&M!==void 0?M:R.RGBA;R.texImage2D(R.TEXTURE_2D,0,te,l,c,0,R.RGBA,$,null);const se=T.createFramebuffer(l,c,!1,!1);return se.colorAttachment.set(j),se}function Lu(T,l){return l.colorRampTexture||(l.colorRampTexture=new ie(T,l.colorRamp,T.gl.RGBA)),l.colorRampTexture}function qc(T,l,c,_,M){if(!c||!_||!_.imageAtlas)return;const R=_.imageAtlas.patternPositions;let j=R[c.to.toString()],$=R[c.from.toString()];if(!j&&$&&(j=$),!$&&j&&($=j),!j||!$){const te=M.getPaintProperty(l);j=R[te],$=R[te]}j&&$&&T.setConstantPatternPositions(j,$)}function Jd(T,l,c,_,M,R,j,$){const te=T.context.gl,se="fill-pattern",we=c.paint.get(se),Ie=we&&we.constantOr(1),Re=c.getCrossfadeParameters();let $e,Ze,ft,lt,pt;const vt=T.transform,Bt=c.paint.get("fill-translate"),kt=c.paint.get("fill-translate-anchor");j?(Ze=Ie&&!c.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",$e=te.LINES):(Ze=Ie?"fillPattern":"fill",$e=te.TRIANGLES);const Rt=we.constantOr(null);for(const zt of _){const Tt=l.getTile(zt);if(Ie&&!Tt.patternsLoaded())continue;const tn=Tt.getBucket(c);if(!tn)continue;const Zt=tn.programConfigurations.get(c.id),_n=T.useProgram(Ze,Zt),bn=T.style.map.terrain&&T.style.map.terrain.getTerrainData(zt);Ie&&(T.context.activeTexture.set(te.TEXTURE0),Tt.imageAtlasTexture.bind(te.LINEAR,te.CLAMP_TO_EDGE),Zt.updatePaintBuffers(Re)),qc(Zt,se,Rt,Tt,c);const vn=vt.getProjectionData({overscaledTileID:zt,applyGlobeMatrix:!$,applyTerrainMatrix:!0}),In=o.au(vt,Tt,Bt,kt);if(j){lt=tn.indexBuffer2,pt=tn.segments2;const Sn=[te.drawingBufferWidth,te.drawingBufferHeight];ft=Ze==="fillOutlinePattern"&&Ie?xh(T,Re,Tt,Sn,In):Zs(Sn,In)}else lt=tn.indexBuffer,pt=tn.segments,ft=Ie?hc(T,Re,Tt,In):{u_fill_translate:In};let Wn;if(T.renderPass==="translucent"&&$){const[Sn]=T.getStencilConfigForOverlapAndUpdateStencilID(_);Wn=Sn[zt.overscaledZ]}else Wn=T.stencilModeForClipping(zt);_n.draw(T.context,$e,M,Wn,R,Ui.backCCW,ft,bn,vn,c.id,tn.layoutVertexBuffer,lt,pt,c.paint,T.transform.zoom,Zt)}}function Yc(T,l,c,_,M,R,j,$){const te=T.context,se=te.gl,we="fill-extrusion-pattern",Ie=c.paint.get(we),Re=Ie.constantOr(1),$e=c.getCrossfadeParameters(),Ze=c.paint.get("fill-extrusion-opacity"),ft=Ie.constantOr(null),lt=T.transform;for(const pt of _){const vt=l.getTile(pt),Bt=vt.getBucket(c);if(!Bt)continue;const kt=T.style.map.terrain&&T.style.map.terrain.getTerrainData(pt),Rt=Bt.programConfigurations.get(c.id),zt=T.useProgram(Re?"fillExtrusionPattern":"fillExtrusion",Rt);Re&&(T.context.activeTexture.set(se.TEXTURE0),vt.imageAtlasTexture.bind(se.LINEAR,se.CLAMP_TO_EDGE),Rt.updatePaintBuffers($e));const Tt=lt.getProjectionData({overscaledTileID:pt,applyGlobeMatrix:!$,applyTerrainMatrix:!0});qc(Rt,we,ft,vt,c);const tn=o.au(lt,vt,c.paint.get("fill-extrusion-translate"),c.paint.get("fill-extrusion-translate-anchor")),Zt=c.paint.get("fill-extrusion-vertical-gradient"),_n=Re?Pf(T,Zt,Ze,tn,pt,$e,vt):yp(T,Zt,Ze,tn);zt.draw(te,te.gl.TRIANGLES,M,R,j,Ui.backCCW,_n,kt,Tt,c.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,c.paint,T.transform.zoom,Rt,T.style.map.terrain&&Bt.centroidVertexBuffer)}}function vc(T,l,c,_,M,R,j,$,te){var se;const we=T.style.projection,Ie=T.context,Re=T.transform,$e=Ie.gl,Ze=T.useProgram("hillshade"),ft=!T.options.moving;for(const lt of _){const pt=l.getTile(lt),vt=pt.fbo;if(!vt)continue;const Bt=we.getMeshFromTileID(Ie,lt.canonical,$,!0,"raster"),kt=(se=T.style.map.terrain)===null||se===void 0?void 0:se.getTerrainData(lt);Ie.activeTexture.set($e.TEXTURE0),$e.bindTexture($e.TEXTURE_2D,vt.colorAttachment.get());const Rt=Re.getProjectionData({overscaledTileID:lt,aligned:ft,applyGlobeMatrix:!te,applyTerrainMatrix:!0});Ze.draw(Ie,$e.TRIANGLES,R,M[lt.overscaledZ],j,Ui.backCCW,Mh(T,pt,c),kt,Rt,c.id,Bt.vertexBuffer,Bt.indexBuffer,Bt.segments)}}const As=[new o.P(0,0),new o.P(o.X,0),new o.P(o.X,o.X),new o.P(0,o.X)];function zo(T,l,c,_,M,R,j,$,te=!1,se=!1){const we=_[_.length-1].overscaledZ,Ie=T.context,Re=Ie.gl,$e=T.useProgram("raster"),Ze=T.transform,ft=T.style.projection,lt=T.colorModeForRenderPass(),pt=!T.options.moving;for(const vt of _){const Bt=T.getDepthModeForSublayer(vt.overscaledZ-we,c.paint.get("raster-opacity")===1?Jr.ReadWrite:Jr.ReadOnly,Re.LESS),kt=l.getTile(vt);kt.registerFadeDuration(c.paint.get("raster-fade-duration"));const Rt=l.findLoadedParent(vt,0),zt=l.findLoadedSibling(vt),Tt=cs(kt,Rt||zt||null,l,c,T.transform,T.style.map.terrain);let tn,Zt;const _n=c.paint.get("raster-resampling")==="nearest"?Re.NEAREST:Re.LINEAR;Ie.activeTexture.set(Re.TEXTURE0),kt.texture.bind(_n,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST),Ie.activeTexture.set(Re.TEXTURE1),Rt?(Rt.texture.bind(_n,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST),tn=Math.pow(2,Rt.tileID.overscaledZ-kt.tileID.overscaledZ),Zt=[kt.tileID.canonical.x*tn%1,kt.tileID.canonical.y*tn%1]):kt.texture.bind(_n,Re.CLAMP_TO_EDGE,Re.LINEAR_MIPMAP_NEAREST),kt.texture.useMipmap&&Ie.extTextureFilterAnisotropic&&T.transform.pitch>20&&Re.texParameterf(Re.TEXTURE_2D,Ie.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ie.extTextureFilterAnisotropicMax);const bn=T.style.map.terrain&&T.style.map.terrain.getTerrainData(vt),vn=Ze.getProjectionData({overscaledTileID:vt,aligned:pt,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),In=Yd(Zt||[0,0],tn||1,Tt,c,$),Wn=ft.getMeshFromTileID(Ie,vt.canonical,R,j,"raster");$e.draw(Ie,Re.TRIANGLES,Bt,M?M[vt.overscaledZ]:Ni.disabled,lt,te?Ui.frontCCW:Ui.backCCW,In,bn,vn,c.id,Wn.vertexBuffer,Wn.indexBuffer,Wn.segments)}}function cs(T,l,c,_,M,R){const j=_.paint.get("raster-fade-duration");if(!R&&j>0){const $=S.now(),te=($-T.timeAdded)/j,se=l?($-l.timeAdded)/j:-1,we=c.getSource(),Ie=er(M,{tileSize:we.tileSize,roundZoom:we.roundZoom}),Re=!l||Math.abs(l.tileID.overscaledZ-Ie)>Math.abs(T.tileID.overscaledZ-Ie),$e=Re&&T.refreshedUponExpiration?1:o.ab(Re?te:1-se,0,1);return T.refreshedUponExpiration&&te>=1&&(T.refreshedUponExpiration=!1),l?{opacity:1,mix:1-$e}:{opacity:$e,mix:0}}return{opacity:1,mix:0}}const Df=new o.b4(1,0,0,1),pd=new o.b4(0,1,0,1),md=new o.b4(0,0,1,1),Uu=new o.b4(1,0,1,1),XA=new o.b4(0,1,1,1);function Nl(T,l,c,_){dl(T,0,l+c/2,T.transform.width,c,_)}function xA(T,l,c,_){dl(T,l-c/2,0,c,T.transform.height,_)}function dl(T,l,c,_,M,R){const j=T.context,$=j.gl;$.enable($.SCISSOR_TEST),$.scissor(l*T.pixelRatio,c*T.pixelRatio,_*T.pixelRatio,M*T.pixelRatio),j.clear({color:R}),$.disable($.SCISSOR_TEST)}function JA(T,l,c){const _=T.context,M=_.gl,R=T.useProgram("debug"),j=Jr.disabled,$=Ni.disabled,te=T.colorModeForRenderPass(),se="$debug",we=T.style.map.terrain&&T.style.map.terrain.getTerrainData(c);_.activeTexture.set(M.TEXTURE0);const Ie=l.getTileByID(c.key).latestRawTileData,Re=Math.floor((Ie&&Ie.byteLength||0)/1024),$e=l.getTile(c).tileSize,Ze=512/Math.min($e,512)*(c.overscaledZ/T.transform.zoom)*.5;let ft=c.canonical.toString();c.overscaledZ!==c.canonical.z&&(ft+=` => ${c.overscaledZ}`),function(pt,vt){pt.initDebugOverlayCanvas();const Bt=pt.debugOverlayCanvas,kt=pt.context.gl,Rt=pt.debugOverlayCanvas.getContext("2d");Rt.clearRect(0,0,Bt.width,Bt.height),Rt.shadowColor="white",Rt.shadowBlur=2,Rt.lineWidth=1.5,Rt.strokeStyle="white",Rt.textBaseline="top",Rt.font="bold 36px Open Sans, sans-serif",Rt.fillText(vt,5,5),Rt.strokeText(vt,5,5),pt.debugOverlayTexture.update(Bt),pt.debugOverlayTexture.bind(kt.LINEAR,kt.CLAMP_TO_EDGE)}(T,`${ft} ${Re}kB`);const lt=T.transform.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!0,applyTerrainMatrix:!0});R.draw(_,M.TRIANGLES,j,$,Vi.alphaBlended,Ui.disabled,cd(o.b4.transparent,Ze),null,lt,se,T.debugBuffer,T.quadTriangleIndexBuffer,T.debugSegments),R.draw(_,M.LINE_STRIP,j,$,te,Ui.disabled,cd(o.b4.red),we,lt,se,T.debugBuffer,T.tileBorderIndexBuffer,T.debugSegments)}function zu(T,l,c,_){const{isRenderingGlobe:M}=_,R=T.context,j=R.gl,$=T.transform,te=T.colorModeForRenderPass(),se=T.getDepthModeFor3D(),we=T.useProgram("terrain");R.bindFramebuffer.set(null),R.viewport.set([0,0,T.width,T.height]);for(const Ie of c){const Re=l.getTerrainMesh(Ie.tileID),$e=T.renderToTexture.getTexture(Ie),Ze=l.getTerrainData(Ie.tileID);R.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$e.texture);const ft=l.getMeshFrameDelta($.zoom),lt=$.calculateFogMatrix(Ie.tileID.toUnwrapped()),pt=ud(ft,lt,T.style.sky,$.pitch,M),vt=$.getProjectionData({overscaledTileID:Ie.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});we.draw(R,j.TRIANGLES,se,Ni.disabled,te,Ui.backCCW,pt,Ze,vt,"terrain",Re.vertexBuffer,Re.indexBuffer,Re.segments)}}function gd(T,l){if(!l.mesh){const c=new o.aC;c.emplaceBack(-1,-1),c.emplaceBack(1,-1),c.emplaceBack(1,1),c.emplaceBack(-1,1);const _=new o.aE;_.emplaceBack(0,1,2),_.emplaceBack(0,2,3),l.mesh=new Xa(T.createVertexBuffer(c,Ai.members),T.createIndexBuffer(_),o.aD.simpleSegment(0,0,c.length,_.length))}return l.mesh}class ju{constructor(l,c){this.context=new Zd(l),this.transform=c,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.aq(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=oe.maxUnderzooming+oe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ns}resize(l,c,_){if(this.width=Math.floor(l*_),this.height=Math.floor(c*_),this.pixelRatio=_,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 o.aC;c.emplaceBack(0,0),c.emplaceBack(o.X,0),c.emplaceBack(0,o.X),c.emplaceBack(o.X,o.X),this.tileExtentBuffer=l.createVertexBuffer(c,Ai.members),this.tileExtentSegments=o.aD.simpleSegment(0,0,4,2);const _=new o.aC;_.emplaceBack(0,0),_.emplaceBack(o.X,0),_.emplaceBack(0,o.X),_.emplaceBack(o.X,o.X),this.debugBuffer=l.createVertexBuffer(_,Ai.members),this.debugSegments=o.aD.simpleSegment(0,0,4,5);const M=new o.bT;M.emplaceBack(0,0,0,0),M.emplaceBack(o.X,0,o.X,0),M.emplaceBack(0,o.X,0,o.X),M.emplaceBack(o.X,o.X,o.X,o.X),this.rasterBoundsBuffer=l.createVertexBuffer(M,Ss.members),this.rasterBoundsSegments=o.aD.simpleSegment(0,0,4,2);const R=new o.aC;R.emplaceBack(0,0),R.emplaceBack(o.X,0),R.emplaceBack(0,o.X),R.emplaceBack(o.X,o.X),this.rasterBoundsBufferPosOnly=l.createVertexBuffer(R,Ai.members),this.rasterBoundsSegmentsPosOnly=o.aD.simpleSegment(0,0,4,5);const j=new o.aC;j.emplaceBack(0,0),j.emplaceBack(1,0),j.emplaceBack(0,1),j.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(j,Ai.members),this.viewportSegments=o.aD.simpleSegment(0,0,4,2);const $=new o.bU;$.emplaceBack(0),$.emplaceBack(1),$.emplaceBack(3),$.emplaceBack(2),$.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer($);const te=new o.aE;te.emplaceBack(1,0,2),te.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(te);const se=this.context.gl;this.stencilClearMode=new Ni({func:se.ALWAYS,mask:0},0,255,se.ZERO,se.ZERO,se.ZERO),this.tileExtentMesh=new Xa(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const l=this.context,c=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const _=o.H();o.bL(_,0,this.width,this.height,0,0,1),o.K(_,_,[c.drawingBufferWidth,c.drawingBufferHeight,0]);const M={mainMatrix:_,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:_};this.useProgram("clippingMask",null,!0).draw(l,c.TRIANGLES,Jr.disabled,this.stencilClearMode,Vi.disabled,Ui.disabled,null,null,M,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,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(Vi.disabled),M.setDepthMode(Jr.disabled);const R={};for(const j of c)R[j.key]=this.nextStencilID++;this._renderTileMasks(R,c,_,!0),this._renderTileMasks(R,c,_,!1),this._tileClippingMaskIDs=R}_renderTileMasks(l,c,_,M){const R=this.context,j=R.gl,$=this.style.projection,te=this.transform,se=this.useProgram("clippingMask");for(const we of c){const Ie=l[we.key],Re=this.style.map.terrain&&this.style.map.terrain.getTerrainData(we),$e=$.getMeshFromTileID(this.context,we.canonical,M,!0,"stencil"),Ze=te.getProjectionData({overscaledTileID:we,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(R,j.TRIANGLES,Jr.disabled,new Ni({func:j.ALWAYS,mask:0},Ie,255,j.KEEP,j.KEEP,j.REPLACE),Vi.disabled,_?Ui.disabled:Ui.backCCW,null,Re,Ze,"$clipping",$e.vertexBuffer,$e.indexBuffer,$e.segments)}}_renderTilesDepthBuffer(){const l=this.context,c=l.gl,_=this.style.projection,M=this.transform,R=this.useProgram("depth"),j=this.getDepthModeFor3D(),$=Be(M,{tileSize:M.tileSize});for(const te of $){const se=this.style.map.terrain&&this.style.map.terrain.getTerrainData(te),we=_.getMeshFromTileID(this.context,te.canonical,!0,!0,"raster"),Ie=M.getProjectionData({overscaledTileID:te,applyGlobeMatrix:!0,applyTerrainMatrix:!0});R.draw(l,c.TRIANGLES,j,Ni.disabled,Vi.disabled,Ui.backCCW,null,se,Ie,"$clipping",we.vertexBuffer,we.indexBuffer,we.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,c=this.context.gl;return new Ni({func:c.NOTEQUAL,mask:255},l,255,c.KEEP,c.KEEP,c.REPLACE)}stencilModeForClipping(l){const c=this.context.gl;return new Ni({func:c.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,c.KEEP,c.KEEP,c.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(l){const c=this.context.gl,_=l.sort((j,$)=>$.overscaledZ-j.overscaledZ),M=_[_.length-1].overscaledZ,R=_[0].overscaledZ-M+1;if(R>1){this.currentStencilSource=void 0,this.nextStencilID+R>256&&this.clearStencil();const j={};for(let $=0;$<R;$++)j[$+M]=new Ni({func:c.GEQUAL,mask:255},$+this.nextStencilID,255,c.KEEP,c.KEEP,c.REPLACE);return this.nextStencilID+=R,[j,_]}return[{[M]:Ni.disabled},_]}stencilConfigForOverlapTwoPass(l){const c=this.context.gl,_=l.sort((j,$)=>$.overscaledZ-j.overscaledZ),M=_[_.length-1].overscaledZ,R=_[0].overscaledZ-M+1;if(this.clearStencil(),R>1){const j={},$={};for(let te=0;te<R;te++)j[te+M]=new Ni({func:c.GREATER,mask:255},R+1+te,255,c.KEEP,c.KEEP,c.REPLACE),$[te+M]=new Ni({func:c.GREATER,mask:255},1+te,255,c.KEEP,c.KEEP,c.REPLACE);return this.nextStencilID=2*R+1,[j,$,_]}return this.nextStencilID=3,[{[M]:new Ni({func:c.GREATER,mask:255},2,255,c.KEEP,c.KEEP,c.REPLACE)},{[M]:new Ni({func:c.GREATER,mask:255},1,255,c.KEEP,c.KEEP,c.REPLACE)},_]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new Vi([l.CONSTANT_COLOR,l.ONE],new o.b4(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Vi.unblended:Vi.alphaBlended}getDepthModeForSublayer(l,c,_){if(!this.opaquePassEnabledForLayer())return Jr.disabled;const M=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new Jr(_||this.context.gl.LEQUAL,c,[M,M])}getDepthModeFor3D(){return new Jr(this.context.gl.LEQUAL,Jr.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,c){var _,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 R=this.style._order,j=this.style.sourceCaches,$={},te={},se={},we={isRenderingToTexture:!1,isRenderingGlobe:((_=l.projection)===null||_===void 0?void 0:_.transitionState)>0};for(const Re in j){const $e=j[Re];$e.used&&$e.prepare(this.context),$[Re]=$e.getVisibleCoordinates(!1),te[Re]=$[Re].slice().reverse(),se[Re]=$e.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Re=0;Re<R.length;Re++)if(this.style._layers[R[Re]].is3D()){this.opaquePassCutoff=Re;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Re of R){const $e=this.style._layers[Re];if(!$e.hasOffscreenPass()||$e.isHidden(this.transform.zoom))continue;const Ze=te[$e.source];($e.type==="custom"||Ze.length)&&this.renderLayer(this,j[$e.source],$e,Ze,we)}if((M=this.style.projection)===null||M===void 0||M.updateGPUdependent({context:this.context,useProgram:Re=>this.useProgram(Re)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:c.showOverdrawInspector?o.b4.black:o.b4.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(Re,$e){const Ze=Re.context,ft=Ze.gl,lt=((zt,Tt,tn)=>{const Zt=Math.cos(Tt.rollInRadians),_n=Math.sin(Tt.rollInRadians),bn=Ja(Tt),vn=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-bn*_n)*tn,(Tt.height/2+bn*Zt)*tn],u_horizon_normal:[-_n,Zt],u_sky_horizon_blend:zt.properties.get("sky-horizon-blend")*Tt.height/2*tn,u_sky_blend:vn}})($e,Re.style.map.transform,Re.pixelRatio),pt=new Jr(ft.LEQUAL,Jr.ReadWrite,[0,1]),vt=Ni.disabled,Bt=Re.colorModeForRenderPass(),kt=Re.useProgram("sky"),Rt=gd(Ze,$e);kt.draw(Ze,ft.TRIANGLES,pt,vt,Bt,Ui.disabled,lt,null,void 0,"sky",Rt.vertexBuffer,Rt.indexBuffer,Rt.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=R.length-1;this.currentLayer>=0;this.currentLayer--){const Re=this.style._layers[R[this.currentLayer]],$e=j[Re.source],Ze=$[Re.source];this._renderTileClippingMasks(Re,Ze,!1),this.renderLayer(this,$e,Re,Ze,we)}this.renderPass="translucent";let Ie=!1;for(this.currentLayer=0;this.currentLayer<R.length;this.currentLayer++){const Re=this.style._layers[R[this.currentLayer]],$e=j[Re.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Re,we))continue;this.opaquePassEnabledForLayer()||Ie||(Ie=!0,we.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const Ze=(Re.type==="symbol"?se:te)[Re.source];this._renderTileClippingMasks(Re,$[Re.source],!1),this.renderLayer(this,$e,Re,Ze,we)}if(we.isRenderingGlobe&&function(Re,$e,Ze){const ft=Re.context,lt=ft.gl,pt=Re.useProgram("atmosphere"),vt=new Jr(lt.LEQUAL,Jr.ReadOnly,[0,1]),Bt=Re.transform,kt=function(vn,In){const Wn=vn.properties.get("position"),Sn=[-Wn.x,-Wn.y,-Wn.z],Tr=o.aq(new Float64Array(16));return vn.properties.get("anchor")==="map"&&(o.aX(Tr,Tr,In.rollInRadians),o.aY(Tr,Tr,-In.pitchInRadians),o.aX(Tr,Tr,In.bearingInRadians),o.aY(Tr,Tr,In.center.lat*Math.PI/180),o.bj(Tr,Tr,-In.center.lng*Math.PI/180)),o.bS(Sn,Sn,Tr),Sn}(Ze,Re.transform),Rt=Bt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),zt=$e.properties.get("atmosphere-blend")*Rt.projectionTransition;if(zt===0)return;const Tt=vi(Bt.worldSize,Bt.center.lat),tn=Bt.inverseProjectionMatrix,Zt=new Float64Array(4);Zt[3]=1,o.al(Zt,Zt,Bt.modelViewProjectionMatrix),Zt[0]/=Zt[3],Zt[1]/=Zt[3],Zt[2]/=Zt[3],Zt[3]=1,o.al(Zt,Zt,tn),Zt[0]/=Zt[3],Zt[1]/=Zt[3],Zt[2]/=Zt[3],Zt[3]=1;const _n=((vn,In,Wn,Sn,Tr)=>({u_sun_pos:vn,u_atmosphere_blend:In,u_globe_position:Wn,u_globe_radius:Sn,u_inv_proj_matrix:Tr}))(kt,zt,[Zt[0],Zt[1],Zt[2]],Tt,tn),bn=gd(ft,$e);pt.draw(ft,lt.TRIANGLES,vt,Ni.disabled,Vi.alphaBlended,Ui.disabled,_n,null,null,"atmosphere",bn.vertexBuffer,bn.indexBuffer,bn.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const Re=function($e,Ze){let ft=null;const lt=Object.values($e._layers).flatMap(kt=>kt.source&&!kt.isHidden(Ze)?[$e.sourceCaches[kt.source]]:[]),pt=lt.filter(kt=>kt.getSource().type==="vector"),vt=lt.filter(kt=>kt.getSource().type!=="vector"),Bt=kt=>{(!ft||ft.getSource().maxzoom<kt.getSource().maxzoom)&&(ft=kt)};return pt.forEach(kt=>Bt(kt)),ft||vt.forEach(kt=>Bt(kt)),ft}(this.style,this.transform.zoom);Re&&function($e,Ze,ft){for(let lt=0;lt<ft.length;lt++)JA($e,Ze,ft[lt])}(this,Re,Re.getVisibleCoordinates())}this.options.showPadding&&function(Re){const $e=Re.transform.padding;Nl(Re,Re.transform.height-($e.top||0),3,Df),Nl(Re,$e.bottom||0,3,pd),xA(Re,$e.left||0,3,md),xA(Re,Re.transform.width-($e.right||0),3,Uu);const Ze=Re.transform.centerPoint;(function(ft,lt,pt,vt){dl(ft,lt-1,pt-10,2,20,vt),dl(ft,lt-10,pt-1,20,2,vt)})(Re,Ze.x,Re.transform.height-Ze.y,XA)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(l){if(!this.style||!this.style.map||!this.style.map.terrain)return;const c=this.terrainFacilitator.matrix,_=this.transform.modelViewProjectionMatrix;let M=this.terrainFacilitator.dirty;M||(M=l?!o.bV(c,_):!o.bW(c,_)),M||(M=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),M&&(o.bX(c,_),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(R,j){const $=R.context,te=$.gl,se=R.transform,we=Vi.unblended,Ie=new Jr(te.LEQUAL,Jr.ReadWrite,[0,1]),Re=j.sourceCache.getRenderableTiles(),$e=R.useProgram("terrainDepth");$.bindFramebuffer.set(j.getFramebuffer("depth").framebuffer),$.viewport.set([0,0,R.width/devicePixelRatio,R.height/devicePixelRatio]),$.clear({color:o.b4.transparent,depth:1});for(const Ze of Re){const ft=j.getTerrainMesh(Ze.tileID),lt=j.getTerrainData(Ze.tileID),pt=se.getProjectionData({overscaledTileID:Ze.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),vt={u_ele_delta:j.getMeshFrameDelta(se.zoom)};$e.draw($,te.TRIANGLES,Ie,Ni.disabled,we,Ui.backCCW,vt,lt,pt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}$.bindFramebuffer.set(null),$.viewport.set([0,0,R.width,R.height])}(this,this.style.map.terrain),function(R,j){const $=R.context,te=$.gl,se=R.transform,we=Vi.unblended,Ie=new Jr(te.LEQUAL,Jr.ReadWrite,[0,1]),Re=j.getCoordsTexture(),$e=j.sourceCache.getRenderableTiles(),Ze=R.useProgram("terrainCoords");$.bindFramebuffer.set(j.getFramebuffer("coords").framebuffer),$.viewport.set([0,0,R.width/devicePixelRatio,R.height/devicePixelRatio]),$.clear({color:o.b4.transparent,depth:1}),j.coordsIndex=[];for(const ft of $e){const lt=j.getTerrainMesh(ft.tileID),pt=j.getTerrainData(ft.tileID);$.activeTexture.set(te.TEXTURE0),te.bindTexture(te.TEXTURE_2D,Re.texture);const vt={u_terrain_coords_id:(255-j.coordsIndex.length)/255,u_texture:0,u_ele_delta:j.getMeshFrameDelta(se.zoom)},Bt=se.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ze.draw($,te.TRIANGLES,Ie,Ni.disabled,we,Ui.backCCW,vt,pt,Bt,"terrain",lt.vertexBuffer,lt.indexBuffer,lt.segments),j.coordsIndex.push(ft.tileID.key)}$.bindFramebuffer.set(null),$.viewport.set([0,0,R.width,R.height])}(this,this.style.map.terrain))}renderLayer(l,c,_,M,R){_.isHidden(this.transform.zoom)||(_.type==="background"||_.type==="custom"||(M||[]).length)&&(this.id=_.id,o.bY(_)?function(j,$,te,se,we,Ie){if(j.renderPass!=="translucent")return;const{isRenderingToTexture:Re}=Ie,$e=Ni.disabled,Ze=j.colorModeForRenderPass();(te._unevaluatedLayout.hasValue("text-variable-anchor")||te._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ft,lt,pt,vt,Bt,kt,Rt,zt,Tt){const tn=lt.transform,Zt=lt.style.map.terrain,_n=Bt==="map",bn=kt==="map";for(const vn of ft){const In=vt.getTile(vn),Wn=In.getBucket(pt);if(!Wn||!Wn.text||!Wn.text.segments.get().length)continue;const Sn=o.ah(Wn.textSizeData,tn.zoom),Tr=o.at(In,1,lt.transform.zoom),Bi=ct(_n,lt.transform,Tr),$i=pt.layout.get("icon-text-fit")!=="none"&&Wn.hasIconData();{const Oo=Math.pow(2,tn.zoom-In.tileID.overscaledZ),Si=Zt?(jo,No)=>Zt.getElevation(vn,jo,No):null;bA(Wn,_n,bn,Tt,tn,Bi,Oo,Sn,$i,o.au(tn,In,Rt,zt),vn.toUnwrapped(),Si)}}}(se,j,te,$,te.layout.get("text-rotation-alignment"),te.layout.get("text-pitch-alignment"),te.paint.get("text-translate"),te.paint.get("text-translate-anchor"),we),te.paint.get("icon-opacity").constantOr(1)!==0&&Gc(j,$,te,se,!1,te.paint.get("icon-translate"),te.paint.get("icon-translate-anchor"),te.layout.get("icon-rotation-alignment"),te.layout.get("icon-pitch-alignment"),te.layout.get("icon-keep-upright"),$e,Ze,Re),te.paint.get("text-opacity").constantOr(1)!==0&&Gc(j,$,te,se,!0,te.paint.get("text-translate"),te.paint.get("text-translate-anchor"),te.layout.get("text-rotation-alignment"),te.layout.get("text-pitch-alignment"),te.layout.get("text-keep-upright"),$e,Ze,Re),$.map.showCollisionBoxes&&(fd(j,$,te,se,!0),fd(j,$,te,se,!1))}(l,c,_,M,this.style.placement.variableOffsets,R):o.bZ(_)?function(j,$,te,se,we){if(j.renderPass!=="translucent")return;const{isRenderingToTexture:Ie}=we,Re=te.paint.get("circle-opacity"),$e=te.paint.get("circle-stroke-width"),Ze=te.paint.get("circle-stroke-opacity"),ft=!te.layout.get("circle-sort-key").isConstant();if(Re.constantOr(1)===0&&($e.constantOr(1)===0||Ze.constantOr(1)===0))return;const lt=j.context,pt=lt.gl,vt=j.transform,Bt=j.getDepthModeForSublayer(0,Jr.ReadOnly),kt=Ni.disabled,Rt=j.colorModeForRenderPass(),zt=[],Tt=vt.getCircleRadiusCorrection();for(let tn=0;tn<se.length;tn++){const Zt=se[tn],_n=$.getTile(Zt),bn=_n.getBucket(te);if(!bn)continue;const vn=te.paint.get("circle-translate"),In=te.paint.get("circle-translate-anchor"),Wn=o.au(vt,_n,vn,In),Sn=bn.programConfigurations.get(te.id),Tr=j.useProgram("circle",Sn),Bi=bn.layoutVertexBuffer,$i=bn.indexBuffer,Oo=j.style.map.terrain&&j.style.map.terrain.getTerrainData(Zt),Si={programConfiguration:Sn,program:Tr,layoutVertexBuffer:Bi,indexBuffer:$i,uniformValues:Jh(j,_n,te,Wn,Tt),terrainData:Oo,projectionData:vt.getProjectionData({overscaledTileID:Zt,applyGlobeMatrix:!Ie,applyTerrainMatrix:!0})};if(ft){const jo=bn.segments.get();for(const No of jo)zt.push({segments:new o.aD([No]),sortKey:No.sortKey,state:Si})}else zt.push({segments:bn.segments,sortKey:0,state:Si})}ft&&zt.sort((tn,Zt)=>tn.sortKey-Zt.sortKey);for(const tn of zt){const{programConfiguration:Zt,program:_n,layoutVertexBuffer:bn,indexBuffer:vn,uniformValues:In,terrainData:Wn,projectionData:Sn}=tn.state;_n.draw(lt,pt.TRIANGLES,Bt,kt,Rt,Ui.backCCW,In,Wn,Sn,te.id,bn,vn,tn.segments,te.paint,j.transform.zoom,Zt)}}(l,c,_,M,R):o.b_(_)?function(j,$,te,se,we){if(te.paint.get("heatmap-opacity")===0)return;const Ie=j.context,{isRenderingToTexture:Re,isRenderingGlobe:$e}=we;if(j.style.map.terrain){for(const Ze of se){const ft=$.getTile(Ze);$.hasRenderableParent(Ze)||(j.renderPass==="offscreen"?Ho(j,ft,te,Ze,$e):j.renderPass==="translucent"&&Qc(j,te,Ze,Re,$e))}Ie.viewport.set([0,0,j.width,j.height])}else j.renderPass==="offscreen"?function(Ze,ft,lt,pt){const vt=Ze.context,Bt=vt.gl,kt=Ze.transform,Rt=Ni.disabled,zt=new Vi([Bt.ONE,Bt.ONE],o.b4.transparent,[!0,!0,!0,!0]);(function(Tt,tn,Zt){const _n=Tt.gl;Tt.activeTexture.set(_n.TEXTURE1),Tt.viewport.set([0,0,tn.width/4,tn.height/4]);let bn=Zt.heatmapFbos.get(o.bP);bn?(_n.bindTexture(_n.TEXTURE_2D,bn.colorAttachment.get()),Tt.bindFramebuffer.set(bn.framebuffer)):(bn=ZA(Tt,tn.width/4,tn.height/4),Zt.heatmapFbos.set(o.bP,bn))})(vt,Ze,lt),vt.clear({color:o.b4.transparent});for(let Tt=0;Tt<pt.length;Tt++){const tn=pt[Tt];if(ft.hasRenderableParent(tn))continue;const Zt=ft.getTile(tn),_n=Zt.getBucket(lt);if(!_n)continue;const bn=_n.programConfigurations.get(lt.id),vn=Ze.useProgram("heatmap",bn),In=kt.getProjectionData({overscaledTileID:tn,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Wn=kt.getCircleRadiusCorrection();vn.draw(vt,Bt.TRIANGLES,Jr.disabled,Rt,zt,Ui.backCCW,fc(Zt,kt.zoom,lt.paint.get("heatmap-intensity"),Wn),null,In,lt.id,_n.layoutVertexBuffer,_n.indexBuffer,_n.segments,lt.paint,kt.zoom,bn)}vt.viewport.set([0,0,Ze.width,Ze.height])}(j,$,te,se):j.renderPass==="translucent"&&function(Ze,ft){const lt=Ze.context,pt=lt.gl;lt.setColorMode(Ze.colorModeForRenderPass());const vt=ft.heatmapFbos.get(o.bP);vt&&(lt.activeTexture.set(pt.TEXTURE0),pt.bindTexture(pt.TEXTURE_2D,vt.colorAttachment.get()),lt.activeTexture.set(pt.TEXTURE1),Lu(lt,ft).bind(pt.LINEAR,pt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(lt,pt.TRIANGLES,Jr.disabled,Ni.disabled,Ze.colorModeForRenderPass(),Ui.disabled,wh(Ze,ft,0,1),null,null,ft.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ft.paint,Ze.transform.zoom))}(j,te)}(l,c,_,M,R):o.b$(_)?function(j,$,te,se,we){if(j.renderPass!=="translucent")return;const{isRenderingToTexture:Ie}=we,Re=te.paint.get("line-opacity"),$e=te.paint.get("line-width");if(Re.constantOr(1)===0||$e.constantOr(1)===0)return;const Ze=j.getDepthModeForSublayer(0,Jr.ReadOnly),ft=j.colorModeForRenderPass(),lt=te.paint.get("line-dasharray"),pt=te.paint.get("line-pattern"),vt=pt.constantOr(1),Bt=te.paint.get("line-gradient"),kt=te.getCrossfadeParameters(),Rt=vt?"linePattern":lt?"lineSDF":Bt?"lineGradient":"line",zt=j.context,Tt=zt.gl,tn=j.transform;let Zt=!0;for(const _n of se){const bn=$.getTile(_n);if(vt&&!bn.patternsLoaded())continue;const vn=bn.getBucket(te);if(!vn)continue;const In=vn.programConfigurations.get(te.id),Wn=j.context.program.get(),Sn=j.useProgram(Rt,In),Tr=Zt||Sn.program!==Wn,Bi=j.style.map.terrain&&j.style.map.terrain.getTerrainData(_n),$i=pt.constantOr(null);if($i&&bn.imageAtlas){const xo=bn.imageAtlas,yo=xo.patternPositions[$i.to.toString()],ka=xo.patternPositions[$i.from.toString()];yo&&ka&&In.setConstantPatternPositions(yo,ka)}const Oo=tn.getProjectionData({overscaledTileID:_n,applyGlobeMatrix:!Ie,applyTerrainMatrix:!0}),Si=tn.getPixelScale(),jo=vt?Sh(j,bn,te,Si,kt):lt?mu(j,bn,te,Si,lt,kt):Bt?pu(j,bn,te,Si,vn.lineClipsArray.length):Lc(j,bn,te,Si);if(vt)zt.activeTexture.set(Tt.TEXTURE0),bn.imageAtlasTexture.bind(Tt.LINEAR,Tt.CLAMP_TO_EDGE),In.updatePaintBuffers(kt);else if(lt&&(Tr||j.lineAtlas.dirty))zt.activeTexture.set(Tt.TEXTURE0),j.lineAtlas.bind(zt);else if(Bt){const xo=vn.gradients[te.id];let yo=xo.texture;if(te.gradientVersion!==xo.version){let ka=256;if(te.stepInterpolant){const Wo=$.getSource().maxzoom,ds=_n.canonical.z===Wo?Math.ceil(1<<j.transform.maxZoom-_n.canonical.z):1;ka=o.ab(o.bQ(vn.maxLineLength/o.X*1024*ds),256,zt.maxTextureSize)}xo.gradient=o.bR({expression:te.gradientExpression(),evaluationKey:"lineProgress",resolution:ka,image:xo.gradient||void 0,clips:vn.lineClipsArray}),xo.texture?xo.texture.update(xo.gradient):xo.texture=new ie(zt,xo.gradient,Tt.RGBA),xo.version=te.gradientVersion,yo=xo.texture}zt.activeTexture.set(Tt.TEXTURE0),yo.bind(te.stepInterpolant?Tt.NEAREST:Tt.LINEAR,Tt.CLAMP_TO_EDGE)}let No;if(Ie){const[xo]=j.getStencilConfigForOverlapAndUpdateStencilID(se);No=xo[_n.overscaledZ]}else No=j.stencilModeForClipping(_n);Sn.draw(zt,Tt.TRIANGLES,Ze,No,ft,Ui.disabled,jo,Bi,Oo,te.id,vn.layoutVertexBuffer,vn.indexBuffer,vn.segments,te.paint,j.transform.zoom,In,vn.layoutVertexBuffer2),Zt=!1}}(l,c,_,M,R):o.c0(_)?function(j,$,te,se,we){const Ie=te.paint.get("fill-color"),Re=te.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;const{isRenderingToTexture:$e}=we,Ze=j.colorModeForRenderPass(),ft=te.paint.get("fill-pattern"),lt=j.opaquePassEnabledForLayer()&&!ft.constantOr(1)&&Ie.constantOr(o.b4.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(j.renderPass===lt){const pt=j.getDepthModeForSublayer(1,j.renderPass==="opaque"?Jr.ReadWrite:Jr.ReadOnly);Jd(j,$,te,se,pt,Ze,!1,$e)}if(j.renderPass==="translucent"&&te.paint.get("fill-antialias")){const pt=j.getDepthModeForSublayer(te.getPaintProperty("fill-outline-color")?2:0,Jr.ReadOnly);Jd(j,$,te,se,pt,Ze,!0,$e)}}(l,c,_,M,R):o.c1(_)?function(j,$,te,se,we){const Ie=te.paint.get("fill-extrusion-opacity");if(Ie===0)return;const{isRenderingToTexture:Re}=we;if(j.renderPass==="translucent"){const $e=new Jr(j.context.gl.LEQUAL,Jr.ReadWrite,j.depthRangeFor3D);if(Ie!==1||te.paint.get("fill-extrusion-pattern").constantOr(1))Yc(j,$,te,se,$e,Ni.disabled,Vi.disabled,Re),Yc(j,$,te,se,$e,j.stencilModeFor3D(),j.colorModeForRenderPass(),Re);else{const Ze=j.colorModeForRenderPass();Yc(j,$,te,se,$e,Ni.disabled,Ze,Re)}}}(l,c,_,M,R):o.c2(_)?function(j,$,te,se,we){if(j.renderPass!=="offscreen"&&j.renderPass!=="translucent")return;const{isRenderingToTexture:Ie}=we,Re=j.context,$e=j.style.projection.useSubdivision,Ze=j.getDepthModeForSublayer(0,Jr.ReadOnly),ft=j.colorModeForRenderPass();if(j.renderPass==="offscreen")(function(lt,pt,vt,Bt,kt,Rt,zt){const Tt=lt.context,tn=Tt.gl;for(const Zt of vt){const _n=pt.getTile(Zt),bn=_n.dem;if(!bn||!bn.data||!_n.needsHillshadePrepare)continue;const vn=bn.dim,In=bn.stride,Wn=bn.getPixels();if(Tt.activeTexture.set(tn.TEXTURE1),Tt.pixelStoreUnpackPremultiplyAlpha.set(!1),_n.demTexture=_n.demTexture||lt.getTileTexture(In),_n.demTexture){const Tr=_n.demTexture;Tr.update(Wn,{premultiply:!1}),Tr.bind(tn.NEAREST,tn.CLAMP_TO_EDGE)}else _n.demTexture=new ie(Tt,Wn,tn.RGBA,{premultiply:!1}),_n.demTexture.bind(tn.NEAREST,tn.CLAMP_TO_EDGE);Tt.activeTexture.set(tn.TEXTURE0);let Sn=_n.fbo;if(!Sn){const Tr=new ie(Tt,{width:vn,height:vn,data:null},tn.RGBA);Tr.bind(tn.LINEAR,tn.CLAMP_TO_EDGE),Sn=_n.fbo=Tt.createFramebuffer(vn,vn,!0,!1),Sn.colorAttachment.set(Tr.texture)}Tt.bindFramebuffer.set(Sn.framebuffer),Tt.viewport.set([0,0,vn,vn]),lt.useProgram("hillshadePrepare").draw(Tt,tn.TRIANGLES,kt,Rt,zt,Ui.disabled,dd(_n.tileID,bn),null,null,Bt.id,lt.rasterBoundsBuffer,lt.quadTriangleIndexBuffer,lt.rasterBoundsSegments),_n.needsHillshadePrepare=!1}})(j,$,se,te,Ze,Ni.disabled,ft),Re.viewport.set([0,0,j.width,j.height]);else if(j.renderPass==="translucent")if($e){const[lt,pt,vt]=j.stencilConfigForOverlapTwoPass(se);vc(j,$,te,vt,lt,Ze,ft,!1,Ie),vc(j,$,te,vt,pt,Ze,ft,!0,Ie)}else{const[lt,pt]=j.getStencilConfigForOverlapAndUpdateStencilID(se);vc(j,$,te,pt,lt,Ze,ft,!1,Ie)}}(l,c,_,M,R):o.c3(_)?function(j,$,te,se,we){if(j.renderPass!=="translucent"||te.paint.get("raster-opacity")===0||!se.length)return;const{isRenderingToTexture:Ie}=we,Re=$.getSource(),$e=j.style.projection.useSubdivision;if(Re instanceof ir)zo(j,$,te,se,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,Ie);else if($e){const[Ze,ft,lt]=j.stencilConfigForOverlapTwoPass(se);zo(j,$,te,lt,Ze,!1,!0,As,!1,Ie),zo(j,$,te,lt,ft,!0,!0,As,!1,Ie)}else{const[Ze,ft]=j.getStencilConfigForOverlapAndUpdateStencilID(se);zo(j,$,te,ft,Ze,!1,!0,As,!1,Ie)}}(l,c,_,M,R):o.c4(_)?function(j,$,te,se,we){const Ie=te.paint.get("background-color"),Re=te.paint.get("background-opacity");if(Re===0)return;const{isRenderingToTexture:$e}=we,Ze=j.context,ft=Ze.gl,lt=j.style.projection,pt=j.transform,vt=pt.tileSize,Bt=te.paint.get("background-pattern");if(j.isPatternMissing(Bt))return;const kt=!Bt&&Ie.a===1&&Re===1&&j.opaquePassEnabledForLayer()?"opaque":"translucent";if(j.renderPass!==kt)return;const Rt=Ni.disabled,zt=j.getDepthModeForSublayer(0,kt==="opaque"?Jr.ReadWrite:Jr.ReadOnly),Tt=j.colorModeForRenderPass(),tn=j.useProgram(Bt?"backgroundPattern":"background"),Zt=se||Be(pt,{tileSize:vt,terrain:j.style.map.terrain});Bt&&(Ze.activeTexture.set(ft.TEXTURE0),j.imageManager.bind(j.context));const _n=te.getCrossfadeParameters();for(const bn of Zt){const vn=pt.getProjectionData({overscaledTileID:bn,applyGlobeMatrix:!$e,applyTerrainMatrix:!0}),In=Bt?nf(Re,j,Bt,{tileID:bn,tileSize:vt},_n):zc(Re,Ie),Wn=j.style.map.terrain&&j.style.map.terrain.getTerrainData(bn),Sn=lt.getMeshFromTileID(Ze,bn.canonical,!1,!0,"raster");tn.draw(Ze,ft.TRIANGLES,zt,Rt,Tt,Ui.backCCW,In,Wn,vn,te.id,Sn.vertexBuffer,Sn.indexBuffer,Sn.segments)}}(l,0,_,M,R):o.c5(_)&&function(j,$,te,se){const{isRenderingGlobe:we}=se,Ie=j.context,Re=te.implementation,$e=j.style.projection,Ze=j.transform,ft=Ze.getProjectionDataForCustomLayer(we),lt={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:$e.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
|
||
uniform mat4 u_projection_matrix;
|
||
${$e.shaderPreludeCode.vertexSource}`,define:$e.shaderDefine},defaultProjectionData:ft},pt=Re.renderingMode?Re.renderingMode:"2d";if(j.renderPass==="offscreen"){const vt=Re.prerender;vt&&(j.setCustomLayerDefaults(),Ie.setColorMode(j.colorModeForRenderPass()),vt.call(Re,Ie.gl,lt),Ie.setDirty(),j.setBaseState())}else if(j.renderPass==="translucent"){j.setCustomLayerDefaults(),Ie.setColorMode(j.colorModeForRenderPass()),Ie.setStencilMode(Ni.disabled);const vt=pt==="3d"?j.getDepthModeFor3D():j.getDepthModeForSublayer(0,Jr.ReadOnly);Ie.setDepthMode(vt),Re.render(Ie.gl,lt),Ie.setDirty(),j.setBaseState(),Ie.bindFramebuffer.set(null)}}(l,0,_,R))}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()),_=this.imageManager.getPattern(l.to.toString());return!c||!_}useProgram(l,c,_=!1){this.cache=this.cache||{};const M=!!this.style.map.terrain,R=this.style.projection,j=l+(c?c.cacheKey:"")+`/${_?iA:R.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(M?"/terrain":"");return this.cache[j]||(this.cache[j]=new qd(this.context,ri[l],c,hd[l],this._showOverdrawInspector,M,_?ri.projectionMercator:R.shaderPreludeCode,_?ca:R.shaderDefine)),this.cache[j]}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 ie(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 eh(T,l){let c,_=!1,M=null,R=null;const j=()=>{M=null,_&&(T.apply(R,c),M=setTimeout(j,l),_=!1)};return(...$)=>(_=!0,R=this,c=$,M||j(),M)}class ec{constructor(l){this._getCurrentHash=()=>{const c=window.location.hash.replace("#","");if(this._hashName){let _;return c.split("&").map(M=>M.split("=")).forEach(M=>{M[0]===this._hashName&&(_=M)}),(_&&_[1]||"").split("/")}return c.split("/")},this._onHashChange=()=>{const c=this._getCurrentHash();if(!this._isValidHash(c))return!1;const _=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:_,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.join("/");let M=_;M.split("&").length>0&&(M=M.split("&")[0]),this._hashName&&(M=`${this._hashName}=${_}`);let R=window.location.hash.replace(M,"");R.startsWith("#&")?R=R.slice(0,1)+R.slice(2):R==="#"&&(R="");let j=window.location.href.replace(/(#.+)?$/,R);j=j.replace("&&","&"),window.history.replaceState(window.history.state,null,j)},this._updateHash=eh(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(),_=Math.round(100*this._map.getZoom())/100,M=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),R=Math.pow(10,M),j=Math.round(c.lng*R)/R,$=Math.round(c.lat*R)/R,te=this._map.getBearing(),se=this._map.getPitch();let we="";if(we+=l?`/${j}/${$}/${_}`:`${_}/${$}/${j}`,(te||se)&&(we+="/"+Math.round(10*te)/10),se&&(we+=`/${Math.round(se)}`),this._hashName){const Ie=this._hashName;let Re=!1;const $e=window.location.hash.slice(1).split("&").map(Ze=>{const ft=Ze.split("=")[0];return ft===Ie?(Re=!0,`${ft}=${we}`):Ze}).filter(Ze=>Ze);return Re||$e.push(`${Ie}=${we}`),`#${$e.join("&")}`}return`#${we}`}_isValidHash(l){if(l.length<3||l.some(isNaN))return!1;try{new o.N(+l[2],+l[1])}catch{return!1}const c=+l[0],_=+(l[3]||0),M=+(l[4]||0);return c>=this._map.getMinZoom()&&c<=this._map.getMaxZoom()&&_>=0&&_<=180&&M>=this._map.getMinPitch()&&M<=this._map.getMaxPitch()}}const Nu={linearity:.3,easing:o.c6(0,0,.3,1)},Wu=o.e({deceleration:2500,maxSpeed:1400},Nu),wA=o.e({deceleration:20,maxSpeed:1400},Nu),Cc=o.e({deceleration:1e3,maxSpeed:360},Nu),Cu=o.e({deceleration:1e3,maxSpeed:90},Nu),$c=o.e({deceleration:1e3,maxSpeed:360},Nu);class it{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 o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:R}of this._inertiaBuffer)c.zoom+=R.zoomDelta||0,c.bearing+=R.bearingDelta||0,c.pitch+=R.pitchDelta||0,c.roll+=R.rollDelta||0,R.panDelta&&c.pan._add(R.panDelta),R.around&&(c.around=R.around),R.pinchAround&&(c.pinchAround=R.pinchAround);const _=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,M={};if(c.pan.mag()){const R=Bo(c.pan.mag(),_,o.e({},Wu,l||{})),j=c.pan.mult(R.amount/c.pan.mag()),$=this._map.cameraHelper.handlePanInertia(j,this._map.transform);M.center=$.easingCenter,M.offset=$.easingOffset,ja(M,R)}if(c.zoom){const R=Bo(c.zoom,_,wA);M.zoom=this._map.transform.zoom+R.amount,ja(M,R)}if(c.bearing){const R=Bo(c.bearing,_,Cc);M.bearing=this._map.transform.bearing+o.ab(R.amount,-179,179),ja(M,R)}if(c.pitch){const R=Bo(c.pitch,_,Cu);M.pitch=this._map.transform.pitch+R.amount,ja(M,R)}if(c.roll){const R=Bo(c.roll,_,$c);M.roll=this._map.transform.roll+o.ab(R.amount,-179,179),ja(M,R)}if(M.zoom||M.bearing){const R=c.pinchAround===void 0?c.around:c.pinchAround;M.around=R?this._map.unproject(R):this._map.getCenter()}return this.clear(),o.e(M,{noMoveStart:!0})}}function ja(T,l){(!T.duration||T.duration<l.duration)&&(T.duration=l.duration,T.easing=l.easing)}function Bo(T,l,c){const{maxSpeed:_,linearity:M,deceleration:R}=c,j=o.ab(T*M/(l/1e3),-_,_),$=Math.abs(j)/(R*M);return{easing:c.easing,duration:1e3*$,amount:j*($/2)}}class Di extends o.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,_,M={}){const R=O.mousePos(c.getCanvas(),_),j=c.unproject(R);super(l,o.e({point:R,lngLat:j,originalEvent:_},M)),this._defaultPrevented=!1,this.target=c}}class $r extends o.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,_){const M=l==="touchend"?_.changedTouches:_.touches,R=O.touchPos(c.getCanvasContainer(),M),j=R.map(te=>c.unproject(te)),$=R.reduce((te,se,we,Ie)=>te.add(se.div(Ie.length)),new o.P(0,0));super(l,{points:R,point:$,lngLats:j,lngLat:c.unproject($),originalEvent:_}),this._defaultPrevented=!1}}class Es extends o.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,c,_){super(l,{originalEvent:_}),this._defaultPrevented=!1}}class yd{constructor(l,c){this._map=l,this._clickTolerance=c.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new Es(l.type,this._map,l))}mousedown(l,c){return this._mousedownPos=c,this._firePreventable(new Di(l.type,this._map,l))}mouseup(l){this._map.fire(new Di(l.type,this._map,l))}click(l,c){this._mousedownPos&&this._mousedownPos.dist(c)>=this._clickTolerance||this._map.fire(new Di(l.type,this._map,l))}dblclick(l){return this._firePreventable(new Di(l.type,this._map,l))}mouseover(l){this._map.fire(new Di(l.type,this._map,l))}mouseout(l){this._map.fire(new Di(l.type,this._map,l))}touchstart(l){return this._firePreventable(new $r(l.type,this._map,l))}touchmove(l){this._map.fire(new $r(l.type,this._map,l))}touchend(l){this._map.fire(new $r(l.type,this._map,l))}touchcancel(l){this._map.fire(new $r(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class th{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new Di(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Di("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new Di(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Oa{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(o.P.convert(l),this._map.terrain)}}class Gs{constructor(l,c){this._map=l,this._tr=new Oa(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&&(O.disableDrag(),this._startPos=this._lastPos=c,this._active=!0)}mousemoveWindow(l,c){if(!this._active)return;const _=c;if(this._lastPos.equals(_)||!this._box&&_.dist(this._startPos)<this._clickTolerance)return;const M=this._startPos;this._lastPos=_,this._box||(this._box=O.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",l));const R=Math.min(M.x,_.x),j=Math.max(M.x,_.x),$=Math.min(M.y,_.y),te=Math.max(M.y,_.y);O.setTransform(this._box,`translate(${R}px,${$}px)`),this._box.style.width=j-R+"px",this._box.style.height=te-$+"px"}mouseupWindow(l,c){if(!this._active||l.button!==0)return;const _=this._startPos,M=c;if(this.reset(),O.suppressClick(),_.x!==M.x||_.y!==M.y)return this._map.fire(new o.k("boxzoomend",{originalEvent:l})),{cameraAnimation:R=>R.fitScreenCoordinates(_,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&&(O.remove(this._box),this._box=null),O.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(l,c){return this._map.fire(new o.k(l,{originalEvent:c}))}}function _s(T,l){if(T.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${T.length}, points ${l.length}`);const c={};for(let _=0;_<T.length;_++)c[T[_].identifier]=l[_];return c}class uA{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,c,_){(this.centroid||_.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),_.length===this.numTouches&&(this.centroid=function(M){const R=new o.P(0,0);for(const j of M)R._add(j);return R.div(M.length)}(c),this.touches=_s(_,c)))}touchmove(l,c,_){if(this.aborted||!this.centroid)return;const M=_s(_,c);for(const R in this.touches){const j=M[R];(!j||j.dist(this.touches[R])>30)&&(this.aborted=!0)}}touchend(l,c,_){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),_.length===0){const M=!this.aborted&&this.centroid;if(this.reset(),M)return M}}}class Bs{constructor(l){this.singleTap=new uA(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,c,_){this.singleTap.touchstart(l,c,_)}touchmove(l,c,_){this.singleTap.touchmove(l,c,_)}touchend(l,c,_){const M=this.singleTap.touchend(l,c,_);if(M){const R=l.timeStamp-this.lastTime<500,j=!this.lastTap||this.lastTap.dist(M)<30;if(R&&j||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=M,this.count===this.numTaps)return this.reset(),M}}}class yr{constructor(l){this._tr=new Oa(l),this._zoomIn=new Bs({numTouches:1,numTaps:2}),this._zoomOut=new Bs({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,c,_){this._zoomIn.touchstart(l,c,_),this._zoomOut.touchstart(l,c,_)}touchmove(l,c,_){this._zoomIn.touchmove(l,c,_),this._zoomOut.touchmove(l,c,_)}touchend(l,c,_){const M=this._zoomIn.touchend(l,c,_),R=this._zoomOut.touchend(l,c,_),j=this._tr;return M?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$=>$.easeTo({duration:300,zoom:j.zoom+1,around:j.unproject(M)},{originalEvent:l})}):R?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:$=>$.easeTo({duration:300,zoom:j.zoom-1,around:j.unproject(R)},{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 va{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 _=this._lastPoint;if(!_)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(_)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=M,this._move(_,M))}dragEnd(l){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(l)&&(this._moved&&O.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 Vc={0:1,2:2};class Ia{constructor(l){this._correctEvent=l.checkCorrectEvent}startMove(l){const c=O.mouseButton(l);this._eventButton=c}endMove(l){delete this._eventButton}isValidStartEvent(l){return this._correctEvent(l)}isValidMoveEvent(l){return!function(c,_){const M=Vc[_];return c.buttons===void 0||(c.buttons&M)!==M}(l,this._eventButton)}isValidEndEvent(l){return O.mouseButton(l)===this._eventButton}}class tc{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 vd{constructor(l=new Ia({checkCorrectEvent:()=>!0}),c=new tc){this.mouseMoveStateManager=l,this.oneFingerTouchMoveStateManager=c}_executeRelevantHandler(l,c,_){return l instanceof MouseEvent?c(l):typeof TouchEvent<"u"&&l instanceof TouchEvent?_(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 Cd=T=>{T.mousedown=T.dragStart,T.mousemoveWindow=T.dragMove,T.mouseup=T.dragEnd,T.contextmenu=l=>{l.preventDefault()}};class Mi{constructor(l,c){this._clickTolerance=l.clickTolerance||1,this._map=c,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(l){return l<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(l,c,_){return this._calculateTransform(l,c,_)}touchmove(l,c,_){if(this._active){if(!this._shouldBePrevented(_.length))return l.preventDefault(),this._calculateTransform(l,c,_);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",l)}}touchend(l,c,_){this._calculateTransform(l,c,_),this._active&&this._shouldBePrevented(_.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,c,_){_.length>0&&(this._active=!0);const M=_s(_,c),R=new o.P(0,0),j=new o.P(0,0);let $=0;for(const se in M){const we=M[se],Ie=this._touches[se];Ie&&(R._add(we),j._add(we.sub(Ie)),$++,M[se]=we)}if(this._touches=M,this._shouldBePrevented($)||!j.mag())return;const te=j.div($);return this._sum._add(te),this._sum.mag()<this._clickTolerance?void 0:{around:R.div($),panDelta:te}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class _d{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(l,c,_){this._firstTwoTouches||_.length<2||(this._firstTwoTouches=[_[0].identifier,_[1].identifier],this._start([c[0],c[1]]))}touchmove(l,c,_){if(!this._firstTwoTouches)return;l.preventDefault();const[M,R]=this._firstTwoTouches,j=Wl(_,c,M),$=Wl(_,c,R);if(!j||!$)return;const te=this._aroundCenter?null:j.add($).div(2);return this._move([j,$],te,l)}touchend(l,c,_){if(!this._firstTwoTouches)return;const[M,R]=this._firstTwoTouches,j=Wl(_,c,M),$=Wl(_,c,R);j&&$||(this._active&&O.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 Wl(T,l,c){for(let _=0;_<T.length;_++)if(T[_].identifier===c)return l[_]}function bd(T,l){return Math.log(T/l)/Math.LN2}class xd extends _d{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,c){const _=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(bd(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:bd(this._distance,_),pinchAround:c}}}function MA(T,l){return 180*T.angleWith(l)/Math.PI}class nc extends _d{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,_){const M=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:MA(this._vector,M),pinchAround:c}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const c=25/(Math.PI*this._minDiameter)*360,_=MA(l,this._startVector);return Math.abs(_)<c}}function AA(T){return Math.abs(T.y)>Math.abs(T.x)}class _c extends _d{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,_){super.touchstart(l,c,_),this._currentTouchCount=_.length}_start(l){this._lastPoints=l,AA(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,c,_){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const M=l[0].sub(this._lastPoints[0]),R=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(M,R,_.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(M.y+R.y)/2*-.5}):void 0}gestureBeginsVertically(l,c,_){if(this._valid!==void 0)return this._valid;const M=l.mag()>=2,R=c.mag()>=2;if(!M&&!R)return;if(!M||!R)return this._firstMove===void 0&&(this._firstMove=_),_-this._firstMove<100&&void 0;const j=l.y>0==c.y>0;return AA(l)&&AA(c)&&j}}const Os={panStep:100,bearingStep:15,pitchStep:10};class bo{constructor(l){this._tr=new Oa(l);const c=Os;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,_=0,M=0,R=0,j=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?_=-1:(l.preventDefault(),R=-1);break;case 39:l.shiftKey?_=1:(l.preventDefault(),R=1);break;case 38:l.shiftKey?M=1:(l.preventDefault(),j=-1);break;case 40:l.shiftKey?M=-1:(l.preventDefault(),j=1);break;default:return}return this._rotationDisabled&&(_=0,M=0),{cameraAnimation:$=>{const te=this._tr;$.easeTo({duration:300,easeId:"keyboardHandler",easing:_u,zoom:c?Math.round(te.zoom)+c*(l.shiftKey?2:1):te.zoom,bearing:te.bearing+_*this._bearingStep,pitch:te.pitch+M*this._pitchStep,offset:[-R*this._panStep,-j*this._panStep],center:te.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 _u(T){return T*(2-T)}const Na=4.000244140625;class Ks{constructor(l,c){this._onTimeout=_=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(_)},this._map=l,this._tr=new Oa(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 _=S.now(),M=_-(this._lastWheelEventTime||0);this._lastWheelEventTime=_,c!==0&&c%Na==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=O.mousePos(this._map.getCanvas(),l),_=this._tr;this._aroundPoint=this._aroundCenter?_.transform.locationToScreenPoint(o.N.convert(_.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 $=l.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=$),typeof this._targetZoom=="number"&&(this._targetZoom+=$)}if(this._delta!==0){const $=this._type==="wheel"&&Math.abs(this._delta)>Na?this._wheelZoomRate:this._defaultZoomRate;let te=2/(1+Math.exp(-Math.abs(this._delta*$)));this._delta<0&&te!==0&&(te=1/te);const se=typeof this._targetZoom!="number"?l.scale:o.aG(this._targetZoom);this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,o.a8(se*te))),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,_=this._startZoom,M=this._easing;let R,j=!1;if(this._type==="wheel"&&_&&M){const $=S.now()-this._lastWheelEventTime,te=Math.min(($+5)/200,1),se=M(te);R=o.y.number(_,c,se),te<1?this._frameId||(this._frameId=!0):j=!0}else R=c,j=!0;return this._active=!0,j&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=R,{noInertia:!0,needsRenderFrame:!j,zoomDelta:R-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let c=o.c8;if(this._prevEase){const _=this._prevEase,M=(S.now()-_.start)/_.duration,R=_.easing(M+.01)-_.easing(M),j=.27/Math.sqrt(R*R+1e-4)*.01,$=Math.sqrt(.0729-j*j);c=o.c6(j,$,.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 Zo{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 ou{constructor(l){this._tr=new Oa(l),this.reset()}reset(){this._active=!1}dblclick(l,c){return l.preventDefault(),{cameraAnimation:_=>{_.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 Gu{constructor(){this._tap=new Bs({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,_){if(!this._swipePoint)if(this._tapTime){const M=c[0],R=l.timeStamp-this._tapTime<500,j=this._tapPoint.dist(M)<30;R&&j?_.length>0&&(this._swipePoint=M,this._swipeTouch=_[0].identifier):this.reset()}else this._tap.touchstart(l,c,_)}touchmove(l,c,_){if(this._tapTime){if(this._swipePoint){if(_[0].identifier!==this._swipeTouch)return;const M=c[0],R=M.y-this._swipePoint.y;return this._swipePoint=M,l.preventDefault(),this._active=!0,{zoomDelta:R/128}}}else this._tap.touchmove(l,c,_)}touchend(l,c,_){if(this._tapTime)this._swipePoint&&_.length===0&&this.reset();else{const M=this._tap.touchend(l,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 bc{constructor(l,c,_){this._el=l,this._mousePan=c,this._touchPan=_}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 nh{constructor(l,c,_,M){this._pitchWithRotate=l.pitchWithRotate,this._rollEnabled=l.rollEnabled,this._mouseRotate=c,this._mousePitch=_,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 SA{constructor(l,c,_,M){this._el=l,this._touchZoom=c,this._touchRotate=_,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 xc{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=O.create("div","maplibregl-cooperative-gesture-screen",l);let c=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(c=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const _=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),M=document.createElement("div");M.className="maplibregl-desktop-message",M.textContent=c,this._container.appendChild(M);const R=document.createElement("div");R.className="maplibregl-mobile-message",R.textContent=_,this._container.appendChild(R),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(O.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 o.k("cooperativegestureprevented",{gestureType:l,originalEvent:c})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const gs=T=>T.zoom||T.drag||T.roll||T.pitch||T.rotate;class da extends o.k{}function gr(T){return T.panDelta&&T.panDelta.mag()||T.zoomDelta||T.bearingDelta||T.pitchDelta||T.rollDelta}class Hr{constructor(l,c){this.handleWindowEvent=M=>{this.handleEvent(M,`${M.type}Window`)},this.handleEvent=(M,R)=>{if(M.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const j=M.type==="renderFrame"?void 0:M,$={needsRenderFrame:!1},te={},se={},we=M.touches,Ie=we?this._getMapTouches(we):void 0,Re=Ie?O.touchPos(this._map.getCanvas(),Ie):O.mousePos(this._map.getCanvas(),M);for(const{handlerName:ft,handler:lt,allowed:pt}of this._handlers){if(!lt.isEnabled())continue;let vt;this._blockedByActive(se,pt,ft)?lt.reset():lt[R||M.type]&&(vt=lt[R||M.type](M,Re,Ie),this.mergeHandlerResult($,te,vt,ft,j),vt&&vt.needsRenderFrame&&this._triggerRenderFrame()),(vt||lt.isActive())&&(se[ft]=lt)}const $e={};for(const ft in this._previousActiveHandlers)se[ft]||($e[ft]=j);this._previousActiveHandlers=se,(Object.keys($e).length||gr($))&&(this._changes.push([$,te,$e]),this._triggerRenderFrame()),(Object.keys(se).length||gr($))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Ze}=$;Ze&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ze(this._map))},this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new it(l),this._bearingSnap=c.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(c);const _=this._el;this._listeners=[[_,"touchstart",{passive:!0}],[_,"touchmove",{passive:!1}],[_,"touchend",void 0],[_,"touchcancel",void 0],[_,"mousedown",void 0],[_,"mousemove",void 0],[_,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[_,"mouseover",void 0],[_,"mouseout",void 0],[_,"dblclick",void 0],[_,"click",void 0],[_,"keydown",{capture:!1}],[_,"keyup",void 0],[_,"wheel",{passive:!1}],[_,"contextmenu",void 0],[window,"blur",void 0]];for(const[M,R,j]of this._listeners)O.addEventListener(M,R,M===document?this.handleWindowEvent:this.handleEvent,j)}destroy(){for(const[l,c,_]of this._listeners)O.removeEventListener(l,c,l===document?this.handleWindowEvent:this.handleEvent,_)}_addDefaultHandlers(l){const c=this._map,_=c.getCanvasContainer();this._add("mapEvent",new yd(c,l));const M=c.boxZoom=new Gs(c,l);this._add("boxZoom",M),l.interactive&&l.boxZoom&&M.enable();const R=c.cooperativeGestures=new xc(c,l.cooperativeGestures);this._add("cooperativeGestures",R),l.cooperativeGestures&&R.enable();const j=new yr(c),$=new ou(c);c.doubleClickZoom=new Zo($,j),this._add("tapZoom",j),this._add("clickZoom",$),l.interactive&&l.doubleClickZoom&&c.doubleClickZoom.enable();const te=new Gu;this._add("tapDragZoom",te);const se=c.touchPitch=new _c(c);this._add("touchPitch",se),l.interactive&&l.touchPitch&&c.touchPitch.enable(l.touchPitch);const we=()=>c.project(c.getCenter()),Ie=function({enable:kt,clickTolerance:Rt,aroundCenter:zt=!0,minPixelCenterThreshold:Tt=100,rotateDegreesPerPixelMoved:tn=.8},Zt){const _n=new Ia({checkCorrectEvent:bn=>O.mouseButton(bn)===0&&bn.ctrlKey||O.mouseButton(bn)===2&&!bn.ctrlKey});return new va({clickTolerance:Rt,move:(bn,vn)=>{const In=Zt();if(zt&&Math.abs(In.y-bn.y)>Tt)return{bearingDelta:o.c7(new o.P(bn.x,vn.y),vn,In)};let Wn=(vn.x-bn.x)*tn;return zt&&vn.y<In.y&&(Wn=-Wn),{bearingDelta:Wn}},moveStateManager:_n,enable:kt,assignEvents:Cd})}(l,we),Re=function({enable:kt,clickTolerance:Rt,pitchDegreesPerPixelMoved:zt=-.5}){const Tt=new Ia({checkCorrectEvent:tn=>O.mouseButton(tn)===0&&tn.ctrlKey||O.mouseButton(tn)===2});return new va({clickTolerance:Rt,move:(tn,Zt)=>({pitchDelta:(Zt.y-tn.y)*zt}),moveStateManager:Tt,enable:kt,assignEvents:Cd})}(l),$e=function({enable:kt,clickTolerance:Rt,rollDegreesPerPixelMoved:zt=.3},Tt){const tn=new Ia({checkCorrectEvent:Zt=>O.mouseButton(Zt)===2&&Zt.ctrlKey});return new va({clickTolerance:Rt,move:(Zt,_n)=>{const bn=Tt();let vn=(_n.x-Zt.x)*zt;return _n.y<bn.y&&(vn=-vn),{rollDelta:vn}},moveStateManager:tn,enable:kt,assignEvents:Cd})}(l,we);c.dragRotate=new nh(l,Ie,Re,$e),this._add("mouseRotate",Ie,["mousePitch"]),this._add("mousePitch",Re,["mouseRotate","mouseRoll"]),this._add("mouseRoll",$e,["mousePitch"]),l.interactive&&l.dragRotate&&c.dragRotate.enable();const Ze=function({enable:kt,clickTolerance:Rt}){const zt=new Ia({checkCorrectEvent:Tt=>O.mouseButton(Tt)===0&&!Tt.ctrlKey});return new va({clickTolerance:Rt,move:(Tt,tn)=>({around:tn,panDelta:tn.sub(Tt)}),activateOnStart:!0,moveStateManager:zt,enable:kt,assignEvents:Cd})}(l),ft=new Mi(l,c);c.dragPan=new bc(_,Ze,ft),this._add("mousePan",Ze),this._add("touchPan",ft,["touchZoom","touchRotate"]),l.interactive&&l.dragPan&&c.dragPan.enable(l.dragPan);const lt=new nc,pt=new xd;c.touchZoomRotate=new SA(_,pt,lt,te),this._add("touchRotate",lt,["touchPan","touchZoom"]),this._add("touchZoom",pt,["touchPan","touchRotate"]),l.interactive&&l.touchZoomRotate&&c.touchZoomRotate.enable(l.touchZoomRotate);const vt=c.scrollZoom=new Ks(c,()=>this._triggerRenderFrame());this._add("scrollZoom",vt,["mousePan"]),l.interactive&&l.scrollZoom&&c.scrollZoom.enable(l.scrollZoom);const Bt=c.keyboard=new bo(c);this._add("keyboard",Bt),l.interactive&&l.keyboard&&c.keyboard.enable(),this._add("blockableMapEvent",new th(c))}_add(l,c,_){this._handlers.push({handlerName:l,handler:c,allowed:_}),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!!gs(this._eventsInProgress)||this.isZooming()}_blockedByActive(l,c,_){for(const M in l)if(M!==_&&(!c||c.indexOf(M)<0))return!0;return!1}_getMapTouches(l){const c=[];for(const _ of l)this._el.contains(_.target)&&c.push(_);return c}mergeHandlerResult(l,c,_,M,R){if(!_)return;o.e(l,_);const j={handlerName:M,originalEvent:_.originalEvent||R};_.zoomDelta!==void 0&&(c.zoom=j),_.panDelta!==void 0&&(c.drag=j),_.rollDelta!==void 0&&(c.roll=j),_.pitchDelta!==void 0&&(c.pitch=j),_.bearingDelta!==void 0&&(c.rotate=j)}_applyChanges(){const l={},c={},_={};for(const[M,R,j]of this._changes)M.panDelta&&(l.panDelta=(l.panDelta||new o.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),o.e(c,R),o.e(_,j);this._updateMapTransform(l,c,_),this._changes=[]}_updateMapTransform(l,c,_){const M=this._map,R=M._getTransformForUpdate(),j=M.terrain;if(!(gr(l)||j&&this._terrainMovement))return this._fireEvents(c,_,!0);M._stop(!0);let{panDelta:$,zoomDelta:te,bearingDelta:se,pitchDelta:we,rollDelta:Ie,around:Re,pinchAround:$e}=l;$e!==void 0&&(Re=$e),Re=Re||M.transform.centerPoint,j&&!R.isPointOnMapSurface(Re)&&(Re=R.centerPoint);const Ze={panDelta:$,zoomDelta:te,rollDelta:Ie,pitchDelta:we,bearingDelta:se,around:Re};this._map.cameraHelper.useGlobeControls&&!R.isPointOnMapSurface(Re)&&(Re=R.centerPoint);const ft=Re.distSqr(R.centerPoint)<.01?R.center:R.screenPointToLocation($?Re.sub($):Re);j?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Ze,R),this._terrainMovement||!c.drag&&!c.zoom?c.drag&&this._terrainMovement?R.setCenter(R.screenPointToLocation(R.centerPoint.sub($))):this._map.cameraHelper.handleMapControlsPan(Ze,R,ft):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(Ze,R,ft))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(Ze,R),this._map.cameraHelper.handleMapControlsPan(Ze,R,ft)),M._applyUpdatedTransform(R),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(c,_,!0)}_fireEvents(l,c,_){const M=gs(this._eventsInProgress),R=gs(l),j={};for(const Ie in l){const{originalEvent:Re}=l[Ie];this._eventsInProgress[Ie]||(j[`${Ie}start`]=Re),this._eventsInProgress[Ie]=l[Ie]}!M&&R&&this._fireEvent("movestart",R.originalEvent);for(const Ie in j)this._fireEvent(Ie,j[Ie]);R&&this._fireEvent("move",R.originalEvent);for(const Ie in l){const{originalEvent:Re}=l[Ie];this._fireEvent(Ie,Re)}const $={};let te;for(const Ie in this._eventsInProgress){const{handlerName:Re,originalEvent:$e}=this._eventsInProgress[Ie];this._handlersById[Re].isActive()||(delete this._eventsInProgress[Ie],te=c[Re]||$e,$[`${Ie}end`]=te)}for(const Ie in $)this._fireEvent(Ie,$[Ie]);const se=gs(this._eventsInProgress),we=(M||R)&&!se;if(we&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ie=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ie.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ie)}if(_&&we){this._updatingCamera=!0;const Ie=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Re=$e=>$e!==0&&-this._bearingSnap<$e&&$e<this._bearingSnap;!Ie||!Ie.essential&&S.prefersReducedMotion?(this._map.fire(new o.k("moveend",{originalEvent:te})),Re(this._map.getBearing())&&this._map.resetNorth()):(Re(Ie.bearing||this._map.getBearing())&&(Ie.bearing=0),Ie.freezeElevation=!0,this._map.easeTo(Ie,{originalEvent:te})),this._updatingCamera=!1}}_fireEvent(l,c){this._map.fire(new o.k(l,c?{originalEvent:c}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(l=>{delete this._frameId,this.handleEvent(new da("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Qu extends o.E{constructor(l,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=_.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 o.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,_){return l=o.P.convert(l).mult(-1),this.panTo(this.transform.center,o.e({offset:l},c),_)}panTo(l,c,_){return this.easeTo(o.e({center:l},c),_)}getZoom(){return this.transform.zoom}setZoom(l,c){return this.jumpTo({zoom:l},c),this}zoomTo(l,c,_){return this.easeTo(o.e({zoom:l},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 o.k("movestart",c)).fire(new o.k("move",c)).fire(new o.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,_){return this.easeTo(o.e({bearing:l},c),_)}resetNorth(l,c){return this.rotateTo(0,o.e({duration:1e3},l),c),this}resetNorthPitch(l,c){return this.easeTo(o.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=Ut.convert(l).adjustAntiMeridian();const _=c&&c.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),_,c)}_cameraForBoxAndBearing(l,c,_,M){const R={top:0,bottom:0,right:0,left:0};if(typeof(M=o.e({padding:R,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 j=o.e(R,M.padding);M.padding=j;const $=this.transform,te=new Ut(l,c);return this.cameraHelper.cameraForBoxAndBearing(M,j,te,_,$)}fitBounds(l,c,_){return this._fitInternal(this.cameraForBounds(l,c),c,_)}fitScreenCoordinates(l,c,_,M,R){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(l)),this.transform.screenPointToLocation(o.P.convert(c)),_,M),M,R)}_fitInternal(l,c,_){return l?(delete(c=o.e(l,c)).padding,c.linear?this.easeTo(c,_):this.flyTo(c,_)):this}jumpTo(l,c){this.stop();const _=this._getTransformForUpdate();let M=!1,R=!1,j=!1;const $=_.zoom;this.cameraHelper.handleJumpToCenterZoom(_,l);const te=_.zoom!==$;return"elevation"in l&&_.elevation!==+l.elevation&&_.setElevation(+l.elevation),"bearing"in l&&_.bearing!==+l.bearing&&(M=!0,_.setBearing(+l.bearing)),"pitch"in l&&_.pitch!==+l.pitch&&(R=!0,_.setPitch(+l.pitch)),"roll"in l&&_.roll!==+l.roll&&(j=!0,_.setRoll(+l.roll)),l.padding==null||_.isPaddingEqual(l.padding)||_.setPadding(l.padding),this._applyUpdatedTransform(_),this.fire(new o.k("movestart",c)).fire(new o.k("move",c)),te&&this.fire(new o.k("zoomstart",c)).fire(new o.k("zoom",c)).fire(new o.k("zoomend",c)),M&&this.fire(new o.k("rotatestart",c)).fire(new o.k("rotate",c)).fire(new o.k("rotateend",c)),R&&this.fire(new o.k("pitchstart",c)).fire(new o.k("pitch",c)).fire(new o.k("pitchend",c)),j&&this.fire(new o.k("rollstart",c)).fire(new o.k("roll",c)).fire(new o.k("rollend",c)),this.fire(new o.k("moveend",c))}calculateCameraOptionsFromTo(l,c,_,M=0){const R=o.Y.fromLngLat(l,c),j=o.Y.fromLngLat(_,M),$=j.x-R.x,te=j.y-R.y,se=j.z-R.z,we=Math.hypot($,te,se);if(we===0)throw new Error("Can't calculate camera options with same From and To");const Ie=Math.hypot($,te),Re=o.a8(this.transform.cameraToCenterDistance/we/this.transform.tileSize),$e=180*Math.atan2($,-te)/Math.PI;let Ze=180*Math.acos(Ie/we)/Math.PI;return Ze=se<0?90-Ze:90+Ze,{center:j.toLngLat(),elevation:M,zoom:Re,pitch:Ze,bearing:$e}}calculateCameraOptionsFromCameraLngLatAltRotation(l,c,_,M,R){const j=this.transform.calculateCenterFromCameraLngLatAlt(l,c,_,M);return{center:j.center,elevation:j.elevation,zoom:j.zoom,bearing:_,pitch:M,roll:R}}easeTo(l,c){this._stop(!1,l.easeId),((l=o.e({offset:[0,0],duration:500,easing:o.c8},l)).animate===!1||!l.essential&&S.prefersReducedMotion)&&(l.duration=0);const _=this._getTransformForUpdate(),M=this.getBearing(),R=_.pitch,j=_.roll,$="bearing"in l?this._normalizeBearing(l.bearing,M):M,te="pitch"in l?+l.pitch:R,se="roll"in l?this._normalizeBearing(l.roll,j):j,we="padding"in l?l.padding:_.padding,Ie=o.P.convert(l.offset);let Re,$e;l.around&&(Re=o.N.convert(l.around),$e=_.locationToScreenPoint(Re));const Ze={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},ft=this.cameraHelper.handleEaseTo(_,{bearing:$,pitch:te,roll:se,padding:we,around:Re,aroundPoint:$e,offsetAsPoint:Ie,offset:l.offset,zoom:l.zoom,center:l.center});return this._rotating=this._rotating||M!==$,this._pitching=this._pitching||te!==R,this._rolling=this._rolling||se!==j,this._padding=!_.isPaddingEqual(we),this._zooming=this._zooming||ft.isZooming,this._easeId=l.easeId,this._prepareEase(c,l.noMoveStart,Ze),this.terrain&&this._prepareElevation(ft.elevationCenter),this._ease(lt=>{ft.easeFunc(lt),this.terrain&&!l.freezeElevation&&this._updateElevation(lt),this._applyUpdatedTransform(_),this._fireMoveEvents(c)},lt=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(c,lt)},l),this}_prepareEase(l,c,_={}){this._moving=!0,c||_.moving||this.fire(new o.k("movestart",l)),this._zooming&&!_.zooming&&this.fire(new o.k("zoomstart",l)),this._rotating&&!_.rotating&&this.fire(new o.k("rotatestart",l)),this._pitching&&!_.pitching&&this.fire(new o.k("pitchstart",l)),this._rolling&&!_.rolling&&this.fire(new o.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 _=this._elevationTarget-this._elevationStart;this._elevationStart+=l*(_-(c-(_*l+this._elevationStart))/(1-l)),this._elevationTarget=c}this.transform.setElevation(o.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(),_=l.getCameraAltitude(),M=this.terrain?this.terrain.getElevationForLngLatZoom(c,l.zoom):0;if(_<M){const R=this.calculateCameraOptionsFromTo(c,M,l.center,l.elevation);return{pitch:R.pitch,zoom:R.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 _=l.clone();for(const M of c){const R=_.clone(),{center:j,zoom:$,roll:te,pitch:se,bearing:we,elevation:Ie}=M(R);j&&R.setCenter(j),Ie!==void 0&&R.setElevation(Ie),$!==void 0&&R.setZoom($),te!==void 0&&R.setRoll(te),se!==void 0&&R.setPitch(se),we!==void 0&&R.setBearing(we),_.apply(R)}this.transform.apply(_)}_fireMoveEvents(l){this.fire(new o.k("move",l)),this._zooming&&this.fire(new o.k("zoom",l)),this._rotating&&this.fire(new o.k("rotate",l)),this._pitching&&this.fire(new o.k("pitch",l)),this._rolling&&this.fire(new o.k("roll",l))}_afterEase(l,c){if(this._easeId&&c&&this._easeId===c)return;delete this._easeId;const _=this._zooming,M=this._rotating,R=this._pitching,j=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,_&&this.fire(new o.k("zoomend",l)),M&&this.fire(new o.k("rotateend",l)),R&&this.fire(new o.k("pitchend",l)),j&&this.fire(new o.k("rollend",l)),this.fire(new o.k("moveend",l))}flyTo(l,c){if(!l.essential&&S.prefersReducedMotion){const vn=o.M(l,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(vn,c)}this.stop(),l=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.c8},l);const _=this._getTransformForUpdate(),M=_.bearing,R=_.pitch,j=_.roll,$=_.padding,te="bearing"in l?this._normalizeBearing(l.bearing,M):M,se="pitch"in l?+l.pitch:R,we="roll"in l?this._normalizeBearing(l.roll,j):j,Ie="padding"in l?l.padding:_.padding,Re=o.P.convert(l.offset);let $e=_.centerPoint.add(Re);const Ze=_.screenPointToLocation($e),ft=this.cameraHelper.handleFlyTo(_,{bearing:te,pitch:se,roll:we,padding:Ie,locationAtOffset:Ze,offsetAsPoint:Re,center:l.center,minZoom:l.minZoom,zoom:l.zoom});let lt=l.curve;const pt=Math.max(_.width,_.height),vt=pt/ft.scaleOfZoom,Bt=ft.pixelPathLength;typeof ft.scaleOfMinZoom=="number"&&(lt=Math.sqrt(pt/ft.scaleOfMinZoom/Bt*2));const kt=lt*lt;function Rt(vn){const In=(vt*vt-pt*pt+(vn?-1:1)*kt*kt*Bt*Bt)/(2*(vn?vt:pt)*kt*Bt);return Math.log(Math.sqrt(In*In+1)-In)}function zt(vn){return(Math.exp(vn)-Math.exp(-vn))/2}function Tt(vn){return(Math.exp(vn)+Math.exp(-vn))/2}const tn=Rt(!1);let Zt=function(vn){return Tt(tn)/Tt(tn+lt*vn)},_n=function(vn){return pt*((Tt(tn)*(zt(In=tn+lt*vn)/Tt(In))-zt(tn))/kt)/Bt;var In},bn=(Rt(!0)-tn)/lt;if(Math.abs(Bt)<2e-6||!isFinite(bn)){if(Math.abs(pt-vt)<1e-6)return this.easeTo(l,c);const vn=vt<pt?-1:1;bn=Math.abs(Math.log(vt/pt))/lt,_n=()=>0,Zt=In=>Math.exp(vn*lt*In)}return l.duration="duration"in l?+l.duration:1e3*bn/("screenSpeed"in l?+l.screenSpeed/lt:+l.speed),l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=M!==te,this._pitching=se!==R,this._rolling=we!==j,this._padding=!_.isPaddingEqual(Ie),this._prepareEase(c,!1),this.terrain&&this._prepareElevation(ft.targetCenter),this._ease(vn=>{const In=vn*bn,Wn=1/Zt(In),Sn=_n(In);this._rotating&&_.setBearing(o.y.number(M,te,vn)),this._pitching&&_.setPitch(o.y.number(R,se,vn)),this._rolling&&_.setRoll(o.y.number(j,we,vn)),this._padding&&(_.interpolatePadding($,Ie,vn),$e=_.centerPoint.add(Re)),ft.easeFunc(vn,Wn,Sn,$e),this.terrain&&!l.freezeElevation&&this._updateElevation(vn),this._applyUpdatedTransform(_),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 _;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||(_=this.handlers)===null||_===void 0||_.stop(!1),this}_ease(l,c,_){_.animate===!1||_.duration===0?(l(1),c()):(this._easeStart=S.now(),this._easeOptions=_,this._onEaseFrame=l,this._onEaseEnd=c,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(l,c){l=o.aI(l,-180,180);const _=Math.abs(l-c);return Math.abs(l-360-c)<_&&(l-=360),Math.abs(l+360-c)<_&&(l+=360),l}queryTerrainElevation(l){return this.terrain?this.terrain.getElevationForLngLatZoom(o.N.convert(l),this.transform.tileZoom):null}}const rc={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class bu{constructor(l=rc){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=O.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=O.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=O.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(){O.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 _=this._map._getUIString(`AttributionControl.${c}`);l.title=_,l.setAttribute("aria-label",_)}_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 R=c[M];if(R.used||R.usedForTerrain){const j=R.getSource();j.attribution&&l.indexOf(j.attribution)<0&&l.push(j.attribution)}}l=l.filter(M=>String(M).trim()),l.sort((M,R)=>M.length-R.length),l=l.filter((M,R)=>{for(let j=R+1;j<l.length;j++)if(l[j].indexOf(M)>=0)return!1;return!0});const _=l.join(" | ");_!==this._sanitizedAttributionHTML&&(this._sanitizedAttributionHTML=O.sanitize(_),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 bs{constructor(l={}){this._updateCompact=()=>{const c=this._container.children;if(c.length){const _=c[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&_.classList.add("maplibregl-compact"):_.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=O.create("div","maplibregl-ctrl");const c=O.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(){O.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Kf{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?this._queue.concat(c):this._queue;for(const M of _)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 _ of c)if(!_.cancelled&&(_.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var su=o.aA([{name:"a_pos3d",type:"Int16",components:3}]);class Ff extends o.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 _={};for(const M of Be(l,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:c,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))_[M.key]=!0,this._renderableTilesKeys.push(M.key),this._tiles[M.key]||(M.terrainRttPosMatrix32f=new Float64Array(16),o.bL(M.terrainRttPosMatrix32f,0,o.X,o.X,0,0,1),this._tiles[M.key]=new pe(M,this.tileSize),this._lastTilesetChange=S.now());for(const M in this._tiles)_[M]||delete this._tiles[M]}freeRtt(l){for(const c in this._tiles){const _=this._tiles[c];(!l||_.tileID.equals(l)||_.tileID.isChildOf(l)||l.isChildOf(_.tileID))&&(_.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(l=>this.getTileByID(l))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l){const c={};for(const _ of this._renderableTilesKeys){const M=this._tiles[_].tileID,R=l.clone(),j=o.a$();if(M.canonical.equals(l.canonical))o.bL(j,0,o.X,o.X,0,0,1);else if(M.canonical.isChildOf(l.canonical)){const $=M.canonical.z-l.canonical.z,te=M.canonical.x-(M.canonical.x>>$<<$),se=M.canonical.y-(M.canonical.y>>$<<$),we=o.X>>$;o.bL(j,0,we,we,0,0,1),o.J(j,j,[-te*we,-se*we,0])}else{if(!l.canonical.isChildOf(M.canonical))continue;{const $=l.canonical.z-M.canonical.z,te=l.canonical.x-(l.canonical.x>>$<<$),se=l.canonical.y-(l.canonical.y>>$<<$),we=o.X>>$;o.bL(j,0,o.X,o.X,0,0,1),o.J(j,j,[te*we,se*we,0]),o.K(j,j,[1/2**$,1/2**$,0])}}R.terrainRttPosMatrix32f=new Float32Array(j),c[_]=R}return c}getSourceTile(l,c){const _=this.sourceCache._source;let M=l.overscaledZ-this.deltaZoom;if(M>_.maxzoom&&(M=_.maxzoom),M<_.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(M).key);let R=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!R||!R.dem)&&c)for(;M>=_.minzoom&&(!R||!R.dem);)R=this.sourceCache.getTileByID(l.scaledTo(M--).key);return R}anyTilesAfterTime(l=Date.now()){return this._lastTilesetChange>=l}}class xu{constructor(l,c,_){this._meshCache={},this.painter=l,this.sourceCache=new Ff(c),this.options=_,this.exaggeration=typeof _.exaggeration=="number"?_.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(l,c,_,M=o.X){var R;if(!(c>=0&&c<M&&_>=0&&_<M))return 0;const j=this.getTerrainData(l),$=(R=j.tile)===null||R===void 0?void 0:R.dem;if(!$)return 0;const te=o.c9([],[c/M*o.X,_/M*o.X],j.u_terrain_matrix),se=[te[0]*$.dim,te[1]*$.dim],we=Math.floor(se[0]),Ie=Math.floor(se[1]),Re=se[0]-we,$e=se[1]-Ie;return $.get(we,Ie)*(1-Re)*(1-$e)+$.get(we+1,Ie)*Re*(1-$e)+$.get(we,Ie+1)*(1-Re)*$e+$.get(we+1,Ie+1)*Re*$e}getElevationForLngLatZoom(l,c){if(!o.ca(c,l.wrap()))return 0;const{tileID:_,mercatorX:M,mercatorY:R}=this._getOverscaledTileIDFromLngLatZoom(l,c);return this.getElevation(_,M%o.X,R%o.X,o.X)}getElevation(l,c,_,M=o.X){return this.getDEMElevation(l,c,_,M)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const M=this.painter.context,R=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new ie(M,R,M.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new ie(M,new o.R({width:1,height:1}),M.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(M.gl.NEAREST,M.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.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 ie(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.tileID.key+l.key;if(_&&!this._demMatrixCache[_]){const M=this.sourceCache.sourceCache._source.maxzoom;let R=l.canonical.z-c.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=M?R=l.canonical.z-M:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const j=l.canonical.x-(l.canonical.x>>R<<R),$=l.canonical.y-(l.canonical.y>>R<<R),te=o.cb(new Float64Array(16),[1/(o.X<<R),1/(o.X<<R),0]);o.J(te,te,[j*o.X,$*o.X,0]),this._demMatrixCache[l.key]={matrix:te,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:c&&c.dem&&c.dem.dim||1,u_terrain_matrix:_?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.width/devicePixelRatio,M=c.height/devicePixelRatio;return!this._fbo||this._fbo.width===_&&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 ie(c.context,{width:_,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 ie(c.context,{width:_,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(_,M,!0,!1),this._fbo.depthAttachment.set(c.context.createRenderbuffer(c.context.gl.DEPTH_COMPONENT16,_,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 R=0,j=0;R<this._coordsTextureSize;R++)for(let $=0;$<this._coordsTextureSize;$++,j+=4)c[j+0]=255&$,c[j+1]=255&R,c[j+2]=$>>8<<4|R>>8,c[j+3]=0;const _=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(c.buffer)),M=new ie(l,_,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),_=this.painter.context,M=_.gl,R=Math.round(l.x*this.painter.pixelRatio/devicePixelRatio),j=Math.round(l.y*this.painter.pixelRatio/devicePixelRatio),$=Math.round(this.painter.height/devicePixelRatio);_.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),M.readPixels(R,$-j-1,1,1,M.RGBA,M.UNSIGNED_BYTE,c),_.bindFramebuffer.set(null);const te=c[0]+(c[2]>>4<<8),se=c[1]+((15&c[2])<<8),we=this.coordsIndex[255-c[3]],Ie=we&&this.sourceCache.getTileByID(we);if(!Ie)return null;const Re=this._coordsTextureSize,$e=(1<<Ie.tileID.canonical.z)*Re;return new o.Y((Ie.tileID.canonical.x*Re+te)/$e+Ie.tileID.wrap,(Ie.tileID.canonical.y*Re+se)/$e,this.getElevation(Ie.tileID,te,se,Re))}depthAtPoint(l){const c=new Uint8Array(4),_=this.painter.context,M=_.gl;return _.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),_.bindFramebuffer.set(null),(c[0]/16777216+c[1]/65536+c[2]/256+c[3])/256}getTerrainMesh(l){var c;const _=((c=this.painter.style.projection)===null||c===void 0?void 0:c.transitionState)>0,M=_&&l.canonical.y===0,R=_&&l.canonical.y===(1<<l.canonical.z)-1,j=`m_${M?"n":""}_${R?"s":""}`;if(this._meshCache[j])return this._meshCache[j];const $=this.painter.context,te=new o.cc,se=new o.aE,we=this.meshSize,Ie=o.X/we,Re=we*we;for(let Tt=0;Tt<=we;Tt++)for(let tn=0;tn<=we;tn++)te.emplaceBack(tn*Ie,Tt*Ie,0);for(let Tt=0;Tt<Re;Tt+=we+1)for(let tn=0;tn<we;tn++)se.emplaceBack(tn+Tt,we+tn+Tt+1,we+tn+Tt+2),se.emplaceBack(tn+Tt,we+tn+Tt+2,tn+Tt+1);const $e=te.length,Ze=$e+(we+1),ft=(we+1)*we,lt=M?o.b6:0,pt=M?0:1,vt=R?o.b7:o.X,Bt=R?0:1;for(let Tt=0;Tt<=we;Tt++)te.emplaceBack(Tt*Ie,lt,pt);for(let Tt=0;Tt<=we;Tt++)te.emplaceBack(Tt*Ie,vt,Bt);for(let Tt=0;Tt<we;Tt++)se.emplaceBack(ft+Tt,Ze+Tt,Ze+Tt+1),se.emplaceBack(ft+Tt,Ze+Tt+1,ft+Tt+1),se.emplaceBack(0+Tt,$e+Tt+1,$e+Tt),se.emplaceBack(0+Tt,0+Tt+1,$e+Tt+1);const kt=te.length,Rt=kt+2*(we+1);for(const Tt of[0,1])for(let tn=0;tn<=we;tn++)for(const Zt of[0,1])te.emplaceBack(Tt*o.X,tn*Ie,Zt);for(let Tt=0;Tt<2*we;Tt+=2)se.emplaceBack(kt+Tt,kt+Tt+1,kt+Tt+3),se.emplaceBack(kt+Tt,kt+Tt+3,kt+Tt+2),se.emplaceBack(Rt+Tt,Rt+Tt+3,Rt+Tt+1),se.emplaceBack(Rt+Tt,Rt+Tt+2,Rt+Tt+3);const zt=new Xa($.createVertexBuffer(te,su.members),$.createIndexBuffer(se),o.aD.simpleSegment(0,0,te.length,se.length));return this._meshCache[j]=zt,zt}getMeshFrameDelta(l){return 2*Math.PI*o.bo/Math.pow(2,Math.max(l,0))/5}getMinTileElevationForLngLatZoom(l,c){var _;const{tileID:M}=this._getOverscaledTileIDFromLngLatZoom(l,c);return(_=this.getMinMaxElevation(M).minElevation)!==null&&_!==void 0?_:0}getMinMaxElevation(l){const c=this.getTerrainData(l).tile,_={minElevation:null,maxElevation:null};return c&&c.dem&&(_.minElevation=c.dem.min*this.exaggeration,_.maxElevation=c.dem.max*this.exaggeration),_}_getOverscaledTileIDFromLngLatZoom(l,c){const _=o.Y.fromLngLat(l.wrap()),M=(1<<c)*o.X,R=_.x*M,j=_.y*M,$=Math.floor(R/o.X),te=Math.floor(j/o.X);return{tileID:new o.S(c,0,c,$,te),mercatorX:R,mercatorY:j}}}class Po{constructor(l,c,_){this._context=l,this._size=c,this._tileSize=_,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),_=new ie(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return _.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),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(_.texture),{id:l,fbo:c,texture:_,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 Is={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class rh{constructor(l,c){this.painter=l,this.terrain=c,this.pool=new Po(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(_=>!l._layers[_].isHidden(c)),this._coordsAscending={};for(const _ in l.sourceCaches){this._coordsAscending[_]={};const M=l.sourceCaches[_].getVisibleCoordinates();for(const R of M){const j=this.terrain.sourceCache.getTerrainCoords(R);for(const $ in j)this._coordsAscending[_][$]||(this._coordsAscending[_][$]=[]),this._coordsAscending[_][$].push(j[$])}}this._coordsAscendingStr={};for(const _ of l._order){const M=l._layers[_],R=M.source;if(Is[M.type]&&!this._coordsAscendingStr[R]){this._coordsAscendingStr[R]={};for(const j in this._coordsAscending[R])this._coordsAscendingStr[R][j]=this._coordsAscending[R][j].map($=>$.key).sort().join()}}for(const _ of this._renderableTiles)for(const M in this._coordsAscendingStr){const R=this._coordsAscendingStr[M][_.tileID.key];R&&R!==_.rttCoords[M]&&(_.rtt=[])}}renderLayer(l,c){if(l.isHidden(this.painter.transform.zoom))return!1;const _=Object.assign(Object.assign({},c),{isRenderingToTexture:!0}),M=l.type,R=this.painter,j=this._renderableLayerIds[this._renderableLayerIds.length-1]===l.id;if(Is[M]&&(this._prevType&&Is[this._prevType]||this._stacks.push([]),this._prevType=M,this._stacks[this._stacks.length-1].push(l.id),!j))return!0;if(Is[this._prevType]||Is[M]&&j){this._prevType=M;const $=this._stacks.length-1,te=this._stacks[$]||[];for(const se of this._renderableTiles){if(this.pool.isFull()&&(zu(this.painter,this.terrain,this._rttTiles,_),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(se),se.rtt[$]){const Ie=this.pool.getObjectForId(se.rtt[$].id);if(Ie.stamp===se.rtt[$].stamp){this.pool.useObject(Ie);continue}}const we=this.pool.getOrCreateFreeObject();this.pool.useObject(we),this.pool.stampObject(we),se.rtt[$]={id:we.id,stamp:we.stamp},R.context.bindFramebuffer.set(we.fbo.framebuffer),R.context.clear({color:o.b4.transparent,stencil:0}),R.currentStencilSource=void 0;for(let Ie=0;Ie<te.length;Ie++){const Re=R.style._layers[te[Ie]],$e=Re.source?this._coordsAscending[Re.source][se.tileID.key]:[se.tileID];R.context.viewport.set([0,0,we.fbo.width,we.fbo.height]),R._renderTileClippingMasks(Re,$e,!0),R.renderLayer(R,R.style.sourceCaches[Re.source],Re,$e,_),Re.source&&(se.rttCoords[Re.source]=this._coordsAscendingStr[Re.source][se.tileID.key])}}return zu(this.painter,this.terrain,this._rttTiles,_),this._rttTiles=[],this.pool.freeAllObjects(),Is[M]}return!1}}const EA={"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"},ih=d,BA={hash:!1,interactive:!0,bearingSnap:7,attributionControl:rc,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:o.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},Qs={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class wc{constructor(l,c,_=!1){this.mousedown=R=>{this.startMove(R,O.mousePos(this.element,R)),O.addEventListener(window,"mousemove",this.mousemove),O.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=R=>{this.move(R,O.mousePos(this.element,R))},this.mouseup=R=>{this._rotatePitchHanlder.dragEnd(R),this.offTemp()},this.touchstart=R=>{R.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=O.touchPos(this.element,R.targetTouches)[0],this.startMove(R,this._startPos),O.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.addEventListener(window,"touchend",this.touchend))},this.touchmove=R=>{R.targetTouches.length!==1?this.reset():(this._lastPos=O.touchPos(this.element,R.targetTouches)[0],this.move(R,this._lastPos))},this.touchend=R=>{R.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=c;const M=new vd;this._rotatePitchHanlder=new va({clickTolerance:3,move:(R,j)=>{const $=c.getBoundingClientRect(),te=new o.P(($.bottom-$.top)/2,($.right-$.left)/2);return{bearingDelta:o.c7(new o.P(R.x,j.y),j,te),pitchDelta:_?-.5*(j.y-R.y):void 0}},moveStateManager:M,enable:!0,assignEvents:()=>{}}),this.map=l,O.addEventListener(c,"mousedown",this.mousedown),O.addEventListener(c,"touchstart",this.touchstart,{passive:!1}),O.addEventListener(c,"touchcancel",this.reset)}startMove(l,c){this._rotatePitchHanlder.dragStart(l,c),O.disableDrag()}move(l,c){const _=this.map,{bearingDelta:M,pitchDelta:R}=this._rotatePitchHanlder.dragMove(l,c)||{};M&&_.setBearing(_.getBearing()+M),R&&_.setPitch(_.getPitch()+R)}off(){const l=this.element;O.removeEventListener(l,"mousedown",this.mousedown),O.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),O.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.removeEventListener(window,"touchend",this.touchend),O.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){O.enableDrag(),O.removeEventListener(window,"mousemove",this.mousemove),O.removeEventListener(window,"mouseup",this.mouseup),O.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),O.removeEventListener(window,"touchend",this.touchend)}}let Gl;function hl(T,l,c){const _=new o.N(T.lng,T.lat);if(T=new o.N(T.lng,T.lat),l){const M=new o.N(T.lng-360,T.lat),R=new o.N(T.lng+360,T.lat),j=c.locationToScreenPoint(T).distSqr(l);c.locationToScreenPoint(M).distSqr(l)<j?T=M:c.locationToScreenPoint(R).distSqr(l)<j&&(T=R)}for(;Math.abs(T.lng-c.center.lng)>180;){const M=c.locationToScreenPoint(T);if(M.x>=0&&M.y>=0&&M.x<=c.width&&M.y<=c.height)break;T.lng>c.center.lng?T.lng-=360:T.lng+=360}return T.lng!==_.lng&&c.isPointOnMapSurface(c.locationToScreenPoint(T))?T:_}const qu={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 Mc(T,l,c){const _=T.classList;for(const M in qu)_.remove(`maplibregl-${c}-anchor-${M}`);_.add(`maplibregl-${c}-anchor-${l}`)}class wu extends o.E{constructor(l){if(super(),this._onKeyPress=c=>{const _=c.code,M=c.charCode||c.keyCode;_!=="Space"&&_!=="Enter"&&M!==32&&M!==13||this.togglePopup()},this._onMapClick=c=>{const _=c.originalEvent.target,M=this._element;this._popup&&(_===M||M.contains(_))&&this.togglePopup()},this._update=c=>{var _;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?hl(this._lngLat,this._flatPos,this._map.transform):(_=this._lngLat)===null||_===void 0?void 0:_.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let R="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?R=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(R=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let j="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?j="rotateX(0deg)":this._pitchAlignment==="map"&&(j=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||c&&c.type!=="moveend"||(this._pos=this._pos.round()),O.setTransform(this._element,`${qu[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${j} ${R}`),S.frameAsync(new AbortController).then(()=>{this._updateOpacity(c&&c.type==="moveend")}).catch(()=>{})},this._onMove=c=>{if(!this._isDragging){const _=this._clickTolerance||this._map._clickTolerance;this._isDragging=c.point.dist(this._pointerdownPos)>=_}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 o.k("dragstart"))),this.fire(new o.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 o.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=o.P.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=O.create("div");const c=O.createNS("http://www.w3.org/2000/svg","svg"),_=41,M=27;c.setAttributeNS(null,"display","block"),c.setAttributeNS(null,"height",`${_}px`),c.setAttributeNS(null,"width",`${M}px`),c.setAttributeNS(null,"viewBox",`0 0 ${M} ${_}`);const R=O.createNS("http://www.w3.org/2000/svg","g");R.setAttributeNS(null,"stroke","none"),R.setAttributeNS(null,"stroke-width","1"),R.setAttributeNS(null,"fill","none"),R.setAttributeNS(null,"fill-rule","evenodd");const j=O.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"fill-rule","nonzero");const $=O.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"transform","translate(3.0, 29.0)"),$.setAttributeNS(null,"fill","#000000");const te=[{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 pt of te){const vt=O.createNS("http://www.w3.org/2000/svg","ellipse");vt.setAttributeNS(null,"opacity","0.04"),vt.setAttributeNS(null,"cx","10.5"),vt.setAttributeNS(null,"cy","5.80029008"),vt.setAttributeNS(null,"rx",pt.rx),vt.setAttributeNS(null,"ry",pt.ry),$.appendChild(vt)}const se=O.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill",this._color);const we=O.createNS("http://www.w3.org/2000/svg","path");we.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(we);const Ie=O.createNS("http://www.w3.org/2000/svg","g");Ie.setAttributeNS(null,"opacity","0.25"),Ie.setAttributeNS(null,"fill","#000000");const Re=O.createNS("http://www.w3.org/2000/svg","path");Re.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"),Ie.appendChild(Re);const $e=O.createNS("http://www.w3.org/2000/svg","g");$e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),$e.setAttributeNS(null,"fill","#FFFFFF");const Ze=O.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ft=O.createNS("http://www.w3.org/2000/svg","circle");ft.setAttributeNS(null,"fill","#000000"),ft.setAttributeNS(null,"opacity","0.25"),ft.setAttributeNS(null,"cx","5.5"),ft.setAttributeNS(null,"cy","5.5"),ft.setAttributeNS(null,"r","5.4999962");const lt=O.createNS("http://www.w3.org/2000/svg","circle");lt.setAttributeNS(null,"fill","#FFFFFF"),lt.setAttributeNS(null,"cx","5.5"),lt.setAttributeNS(null,"cy","5.5"),lt.setAttributeNS(null,"r","5.4999962"),Ze.appendChild(ft),Ze.appendChild(lt),j.appendChild($),j.appendChild(se),j.appendChild(Ie),j.appendChild($e),j.appendChild(Ze),c.appendChild(j),c.setAttributeNS(null,"height",_*this._scale+"px"),c.setAttributeNS(null,"width",M*this._scale+"px"),this._element.appendChild(c),this._offset=o.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()}),Mc(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),O.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=o.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,_;if(!(!((c=this._map)===null||c===void 0)&&c.terrain)){const Ie=this._map.transform.isLocationOccluded(this._lngLat)?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Ie&&(this._element.style.opacity=Ie))}if(l)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const M=this._map,R=M.terrain.depthAtPoint(this._pos),j=M.terrain.getElevationForLngLatZoom(this._lngLat,M.transform.tileZoom);if(M.transform.lngLatToCameraDepth(this._lngLat,j)-R<.006)return void(this._element.style.opacity=this._opacity);const $=-this._offset.y/M.transform.pixelsPerMeter,te=Math.sin(M.getPitch()*Math.PI/180)*$,se=M.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),we=M.transform.lngLatToCameraDepth(this._lngLat,j+te)-se>.006;!((_=this._popup)===null||_===void 0)&&_.isOpen()&&we&&this._popup.remove(),this._element.style.opacity=we?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(l){return this._offset=o.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 Ca={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xs=0,au=!1;const lu={maxWidth:100,unit:"metric"};function cA(T,l,c){const _=c&&c.maxWidth||100,M=T._container.clientHeight/2,R=T._container.clientWidth/2,j=T.unproject([R-_/2,M]),$=T.unproject([R+_/2,M]),te=Math.round(T.project($).x-T.project(j).x),se=Math.min(_,te,T._container.clientWidth),we=j.distanceTo($);if(c&&c.unit==="imperial"){const Ie=3.2808*we;Ie>5280?Mu(l,se,Ie/5280,T._getUIString("ScaleControl.Miles")):Mu(l,se,Ie,T._getUIString("ScaleControl.Feet"))}else c&&c.unit==="nautical"?Mu(l,se,we/1852,T._getUIString("ScaleControl.NauticalMiles")):we>=1e3?Mu(l,se,we/1e3,T._getUIString("ScaleControl.Kilometers")):Mu(l,se,we,T._getUIString("ScaleControl.Meters"))}function Mu(T,l,c,_){const M=function(R){const j=Math.pow(10,`${Math.floor(R)}`.length-1);let $=R/j;return $=$>=10?10:$>=5?5:$>=3?3:$>=2?2:$>=1?1:function(te){const se=Math.pow(10,Math.ceil(-Math.log(te)/Math.LN10));return Math.round(te*se)/se}($),j*$}(c);T.style.width=l*(M/c)+"px",T.innerHTML=`${M} ${_}`}const Sc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Yu=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ql(T){if(T){if(typeof T=="number"){const l=Math.round(Math.abs(T)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,T),"top-left":new o.P(l,l),"top-right":new o.P(-l,l),bottom:new o.P(0,-T),"bottom-left":new o.P(l,-l),"bottom-right":new o.P(-l,-l),left:new o.P(T,0),right:new o.P(-T,0)}}if(T instanceof o.P||Array.isArray(T)){const l=o.P.convert(T);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:o.P.convert(T.center||[0,0]),top:o.P.convert(T.top||[0,0]),"top-left":o.P.convert(T["top-left"]||[0,0]),"top-right":o.P.convert(T["top-right"]||[0,0]),bottom:o.P.convert(T.bottom||[0,0]),"bottom-left":o.P.convert(T["bottom-left"]||[0,0]),"bottom-right":o.P.convert(T["bottom-right"]||[0,0]),left:o.P.convert(T.left||[0,0]),right:o.P.convert(T.right||[0,0])}}return Ql(new o.P(0,0))}const wd=d;a.AJAXError=o.cg,a.Event=o.k,a.Evented=o.E,a.LngLat=o.N,a.MercatorCoordinate=o.Y,a.Point=o.P,a.addProtocol=o.ch,a.config=o.a,a.removeProtocol=o.ci,a.AttributionControl=bu,a.BoxZoomHandler=Gs,a.CanvasSource=fn,a.CooperativeGesturesHandler=xc,a.DoubleClickZoomHandler=Zo,a.DragPanHandler=bc,a.DragRotateHandler=nh,a.EdgeInsets=Ws,a.FullscreenControl=class extends o.E{constructor(T={}){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,T&&T.container&&(T.container instanceof HTMLElement?this._container=T.container:o.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(T){return this._map=T,this._container||(this._container=this._map.getContainer()),this._controlContainer=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){O.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const T=this._fullscreenButton=O.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);O.create("span","maplibregl-ctrl-icon",T).setAttribute("aria-hidden","true"),T.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const T=this._getTitle();this._fullscreenButton.setAttribute("aria-label",T),this._fullscreenButton.title=T}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new o.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=nn,a.GeolocateControl=class extends o.E{constructor(T){super(),this._onSuccess=l=>{if(this._map){if(this._isOutOfMapMaxBounds(l))return this._setErrorState(),this.fire(new o.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 o.k("geolocate",l)),this._finish()}},this._updateCamera=l=>{const c=new o.N(l.coords.longitude,l.coords.latitude),_=l.coords.accuracy,M=this._map.getBearing(),R=o.e({bearing:M},this.options.fitBoundsOptions),j=Ut.fromLngLat(c,_);this._map.fitBounds(j,R,{geolocateSource:!0})},this._updateMarker=l=>{if(l){const c=new o.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&&au)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.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=O.create("button","maplibregl-ctrl-geolocate",this._container),O.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){o.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=O.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new wu({element:this._dotElement}),this._circleElement=O.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new wu({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 o.k("trackuserlocationend")),this.fire(new o.k("userlocationlostfocus")))})}},this.options=o.e({},Ca,T)}onAdd(T){return this._map=T,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return o._(this,arguments,void 0,function*(l=!1){if(Gl!==void 0&&!l)return Gl;if(window.navigator.permissions===void 0)return Gl=!!window.navigator.geolocation,Gl;try{Gl=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Gl=!!window.navigator.geolocation}return Gl})}().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(),O.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xs=0,au=!1}_isOutOfMapMaxBounds(T){const l=this._map.getMaxBounds(),c=T.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 T=this._map.getBounds(),l=T.getSouthEast(),c=T.getNorthEast(),_=l.distanceTo(c),M=Math.ceil(this._accuracy/(_/this._map._container.clientHeight)*2);this._circleElement.style.width=`${M}px`,this._circleElement.style.height=`${M}px`}trigger(){if(!this._setup)return o.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 o.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xs--,au=!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 o.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 o.k("trackuserlocationstart")),this.fire(new o.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let T;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xs++,Xs>1?(T={maximumAge:6e5,timeout:0},au=!0):(T=this.options.positionOptions,au=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,T)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},a.GlobeControl=class{constructor(){this._toggleProjection=()=>{var T;const l=(T=this._map.getProjection())===null||T===void 0?void 0:T.type;this._map.setProjection(l!=="mercator"&&l?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var T;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((T=this._map.getProjection())===null||T===void 0?void 0:T.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(T){return this._map=T,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=O.create("button","maplibregl-ctrl-globe",this._container),O.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(){O.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},a.Hash=ec,a.ImageSource=ir,a.KeyboardHandler=bo,a.LngLatBounds=Ut,a.LogoControl=bs,a.Map=class extends Qu{constructor(T){var l,c;o.cd.mark(o.ce.create);const _=Object.assign(Object.assign(Object.assign({},BA),T),{canvasContextAttributes:Object.assign(Object.assign({},BA.canvasContextAttributes),T.canvasContextAttributes)});if(_.minZoom!=null&&_.maxZoom!=null&&_.minZoom>_.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(_.minPitch!=null&&_.maxPitch!=null&&_.minPitch>_.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(_.minPitch!=null&&_.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(_.maxPitch!=null&&_.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const M=new Ms,R=new oA;if(_.minZoom!==void 0&&M.setMinZoom(_.minZoom),_.maxZoom!==void 0&&M.setMaxZoom(_.maxZoom),_.minPitch!==void 0&&M.setMinPitch(_.minPitch),_.maxPitch!==void 0&&M.setMaxPitch(_.maxPitch),_.renderWorldCopies!==void 0&&M.setRenderWorldCopies(_.renderWorldCopies),super(M,R,{bearingSnap:_.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Kf,this._controls=[],this._mapId=o.a1(),this._contextLost=$=>{$.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.k("webglcontextlost",{originalEvent:$}))},this._contextRestored=$=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.k("webglcontextrestored",{originalEvent:$}))},this._onMapScroll=$=>{if($.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=_.interactive,this._maxTileCacheSize=_.maxTileCacheSize,this._maxTileCacheZoomLevels=_.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},_.canvasContextAttributes),this._trackResize=_.trackResize===!0,this._bearingSnap=_.bearingSnap,this._centerClampedToGround=_.centerClampedToGround,this._refreshExpiredTiles=_.refreshExpiredTiles===!0,this._fadeDuration=_.fadeDuration,this._crossSourceCollisions=_.crossSourceCollisions===!0,this._collectResourceTiming=_.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},EA),_.locale),this._clickTolerance=_.clickTolerance,this._overridePixelRatio=_.pixelRatio,this._maxCanvasSize=_.maxCanvasSize,this.transformCameraUpdate=_.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=_.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=X.addThrottleControl(()=>this.isMoving()),this._requestManager=new Y(_.transformRequest),typeof _.container=="string"){if(this._container=document.getElementById(_.container),!this._container)throw new Error(`Container '${_.container}' not found.`)}else{if(!(_.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=_.container}if(_.maxBounds&&this.setMaxBounds(_.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 $=!1;const te=eh(se=>{this._trackResize&&!this._removed&&(this.resize(se),this.redraw())},50);this._resizeObserver=new ResizeObserver(se=>{$?te(se):$=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Hr(this,_),this._hash=_.hash&&new ec(typeof _.hash=="string"&&_.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:_.center,elevation:_.elevation,zoom:_.zoom,bearing:_.bearing,pitch:_.pitch,roll:_.roll}),_.bounds&&(this.resize(),this.fitBounds(_.bounds,o.e({},_.fitBoundsOptions,{duration:0}))));const j=typeof _.style=="string"||((c=(l=_.style)===null||l===void 0?void 0:l.projection)===null||c===void 0?void 0:c.type)!=="globe";this.resize(null,j),this._localIdeographFontFamily=_.localIdeographFontFamily,this._validateStyle=_.validateStyle,_.style&&this.setStyle(_.style,{localIdeographFontFamily:_.localIdeographFontFamily}),_.attributionControl&&this.addControl(new bu(typeof _.attributionControl=="boolean"?void 0:_.attributionControl)),_.maplibreLogo&&this.addControl(new bs,_.logoPosition),this.on("style.load",()=>{if(j||this._resizeTransform(),this.transform.unmodified){const $=o.M(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo($)}}),this.on("data",$=>{this._update($.dataType==="style"),this.fire(new o.k(`${$.dataType}data`,$))}),this.on("dataloading",$=>{this.fire(new o.k(`${$.dataType}dataloading`,$))}),this.on("dataabort",$=>{this.fire(new o.k("sourcedataabort",$))})}_getMapId(){return this._mapId}addControl(T,l){if(l===void 0&&(l=T.getDefaultPosition?T.getDefaultPosition():"top-right"),!T||!T.onAdd)return this.fire(new o.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const c=T.onAdd(this);this._controls.push(T);const _=this._controlPositions[l];return l.indexOf("bottom")!==-1?_.insertBefore(c,_.firstChild):_.appendChild(c),this}removeControl(T){if(!T||!T.onRemove)return this.fire(new o.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(T);return l>-1&&this._controls.splice(l,1),T.onRemove(this),this}hasControl(T){return this._controls.indexOf(T)>-1}calculateCameraOptionsFromTo(T,l,c,_){return _==null&&this.terrain&&(_=this.terrain.getElevationForLngLatZoom(c,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(T,l,c,_)}resize(T,l=!0){const[c,_]=this._containerDimensions(),M=this._getClampedPixelRatio(c,_);if(this._resizeCanvas(c,_,M),this.painter.resize(c,_,M),this.painter.overLimit()){const j=this.painter.context.gl;this._maxCanvasSize=[j.drawingBufferWidth,j.drawingBufferHeight];const $=this._getClampedPixelRatio(c,_);this._resizeCanvas(c,_,$),this.painter.resize(c,_,$)}this._resizeTransform(l);const R=!this._moving;return R&&(this.stop(),this.fire(new o.k("movestart",T)).fire(new o.k("move",T))),this.fire(new o.k("resize",T)),R&&this.fire(new o.k("moveend",T)),this}_resizeTransform(T=!0){var l;const[c,_]=this._containerDimensions();this.transform.resize(c,_,T),(l=this._requestedCameraState)===null||l===void 0||l.resize(c,_,T)}_getClampedPixelRatio(T,l){const{0:c,1:_}=this._maxCanvasSize,M=this.getPixelRatio(),R=T*M,j=l*M;return Math.min(R>c?c/R:1,j>_?_/j:1)*M}getPixelRatio(){var T;return(T=this._overridePixelRatio)!==null&&T!==void 0?T:devicePixelRatio}setPixelRatio(T){this._overridePixelRatio=T,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(T){return this.transform.setMaxBounds(Ut.convert(T)),this._update()}setMinZoom(T){if((T=T??-2)>=-2&&T<=this.transform.maxZoom)return this.transform.setMinZoom(T),this._update(),this.getZoom()<T&&this.setZoom(T),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(T){if((T=T??22)>=this.transform.minZoom)return this.transform.setMaxZoom(T),this._update(),this.getZoom()>T&&this.setZoom(T),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(T){if((T=T??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(T>=0&&T<=this.transform.maxPitch)return this.transform.setMinPitch(T),this._update(),this.getPitch()<T&&this.setPitch(T),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(T){if((T=T??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(T>=this.transform.minPitch)return this.transform.setMaxPitch(T),this._update(),this.getPitch()>T&&this.setPitch(T),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(T){return this.transform.setRenderWorldCopies(T),this._update()}project(T){return this.transform.locationToScreenPoint(o.N.convert(T),this.style&&this.terrain)}unproject(T){return this.transform.screenPointToLocation(o.P.convert(T),this.terrain)}isMoving(){var T;return this._moving||((T=this.handlers)===null||T===void 0?void 0:T.isMoving())}isZooming(){var T;return this._zooming||((T=this.handlers)===null||T===void 0?void 0:T.isZooming())}isRotating(){var T;return this._rotating||((T=this.handlers)===null||T===void 0?void 0:T.isRotating())}_createDelegatedListener(T,l,c){if(T==="mouseenter"||T==="mouseover"){let _=!1;return{layers:l,listener:c,delegates:{mousemove:R=>{const j=l.filter(te=>this.getLayer(te)),$=j.length!==0?this.queryRenderedFeatures(R.point,{layers:j}):[];$.length?_||(_=!0,c.call(this,new Di(T,this,R.originalEvent,{features:$}))):_=!1},mouseout:()=>{_=!1}}}}if(T==="mouseleave"||T==="mouseout"){let _=!1;return{layers:l,listener:c,delegates:{mousemove:j=>{const $=l.filter(te=>this.getLayer(te));($.length!==0?this.queryRenderedFeatures(j.point,{layers:$}):[]).length?_=!0:_&&(_=!1,c.call(this,new Di(T,this,j.originalEvent)))},mouseout:j=>{_&&(_=!1,c.call(this,new Di(T,this,j.originalEvent)))}}}}{const _=M=>{const R=l.filter($=>this.getLayer($)),j=R.length!==0?this.queryRenderedFeatures(M.point,{layers:R}):[];j.length&&(M.features=j,c.call(this,M),delete M.features)};return{layers:l,listener:c,delegates:{[T]:_}}}}_saveDelegatedListener(T,l){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[T]=this._delegatedListeners[T]||[],this._delegatedListeners[T].push(l)}_removeDelegatedListener(T,l,c){if(!this._delegatedListeners||!this._delegatedListeners[T])return;const _=this._delegatedListeners[T];for(let M=0;M<_.length;M++){const R=_[M];if(R.listener===c&&R.layers.length===l.length&&R.layers.every(j=>l.includes(j))){for(const j in R.delegates)this.off(j,R.delegates[j]);return void _.splice(M,1)}}}on(T,l,c){if(c===void 0)return super.on(T,l);const _=typeof l=="string"?[l]:l,M=this._createDelegatedListener(T,_,c);this._saveDelegatedListener(T,M);for(const R in M.delegates)this.on(R,M.delegates[R]);return{unsubscribe:()=>{this._removeDelegatedListener(T,_,c)}}}once(T,l,c){if(c===void 0)return super.once(T,l);const _=typeof l=="string"?[l]:l,M=this._createDelegatedListener(T,_,c);for(const R in M.delegates){const j=M.delegates[R];M.delegates[R]=(...$)=>{this._removeDelegatedListener(T,_,c),j(...$)}}this._saveDelegatedListener(T,M);for(const R in M.delegates)this.once(R,M.delegates[R]);return this}off(T,l,c){return c===void 0?super.off(T,l):(this._removeDelegatedListener(T,typeof l=="string"?[l]:l,c),this)}queryRenderedFeatures(T,l){if(!this.style)return[];let c;const _=T instanceof o.P||Array.isArray(T),M=_?T:[[0,0],[this.transform.width,this.transform.height]];if(l=l||(_?{}:T)||{},M instanceof o.P||typeof M[0]=="number")c=[o.P.convert(M)];else{const R=o.P.convert(M[0]),j=o.P.convert(M[1]);c=[R,new o.P(j.x,R.y),j,new o.P(R.x,j.y),R]}return this.style.queryRenderedFeatures(c,l,this.transform)}querySourceFeatures(T,l){return this.style.querySourceFeatures(T,l)}setStyle(T,l){return(l=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&T?(this._diffStyle(T,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(T,l))}setTransformRequest(T){return this._requestManager.setTransformRequest(T),this}_getUIString(T){const l=this._locale[T];if(l==null)throw new Error(`Missing UI string '${T}'`);return l}_updateStyle(T,l){var c,_;if(l.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(T,l));const M=this.style&&l.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!T)),T?(this.style=new bh(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof T=="string"?this.style.loadURL(T,l,M):this.style.loadJSON(T,l,M),this):((_=(c=this.style)===null||c===void 0?void 0:c.projection)===null||_===void 0||_.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new bh(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(T,l){if(typeof T=="string"){const c=this._requestManager.transformRequest(T,"Style");o.h(c,new AbortController).then(_=>{this._updateDiff(_.data,l)}).catch(_=>{_&&this.fire(new o.j(_))})}else typeof T=="object"&&this._updateDiff(T,l)}_updateDiff(T,l){try{this.style.setState(T,l)&&this._update(!0)}catch(c){o.w(`Unable to perform style diff: ${c.message||c.error||c}. Rebuilding the style from scratch.`),this._updateStyle(T,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(T,l){return this._lazyInitEmptyStyle(),this.style.addSource(T,l),this._update(!0)}isSourceLoaded(T){const l=this.style&&this.style.sourceCaches[T];if(l!==void 0)return l.loaded();this.fire(new o.j(new Error(`There is no source with ID '${T}'`)))}setTerrain(T){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),T){const l=this.style.sourceCaches[T.source];if(!l)throw new Error(`cannot load terrain, because there exists no source with ID: ${T.source}`);this.terrain===null&&l.reload();for(const c in this.style._layers){const _=this.style._layers[c];_.type==="hillshade"&&_.source===T.source&&o.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 xu(this.painter,l,T),this.painter.renderToTexture=new rh(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!==T.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 o.k("terrain",{terrain:T})),this}getTerrain(){var T,l;return(l=(T=this.terrain)===null||T===void 0?void 0:T.options)!==null&&l!==void 0?l:null}areTilesLoaded(){const T=this.style&&this.style.sourceCaches;for(const l in T){const c=T[l]._tiles;for(const _ in c){const M=c[_];if(M.state!=="loaded"&&M.state!=="errored")return!1}}return!0}removeSource(T){return this.style.removeSource(T),this._update(!0)}getSource(T){return this.style.getSource(T)}addImage(T,l,c={}){const{pixelRatio:_=1,sdf:M=!1,stretchX:R,stretchY:j,content:$,textFitWidth:te,textFitHeight:se}=c;if(this._lazyInitEmptyStyle(),!(l instanceof HTMLImageElement||o.b(l))){if(l.width===void 0||l.height===void 0)return this.fire(new o.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:we,height:Ie,data:Re}=l,$e=l;return this.style.addImage(T,{data:new o.R({width:we,height:Ie},new Uint8Array(Re)),pixelRatio:_,stretchX:R,stretchY:j,content:$,textFitWidth:te,textFitHeight:se,sdf:M,version:0,userImage:$e}),$e.onAdd&&$e.onAdd(this,T),this}}{const{width:we,height:Ie,data:Re}=S.getImageData(l);this.style.addImage(T,{data:new o.R({width:we,height:Ie},Re),pixelRatio:_,stretchX:R,stretchY:j,content:$,textFitWidth:te,textFitHeight:se,sdf:M,version:0})}}updateImage(T,l){const c=this.style.getImage(T);if(!c)return this.fire(new o.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _=l instanceof HTMLImageElement||o.b(l)?S.getImageData(l):l,{width:M,height:R,data:j}=_;if(M===void 0||R===void 0)return this.fire(new o.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||R!==c.data.height)return this.fire(new o.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const $=!(l instanceof HTMLImageElement||o.b(l));return c.data.replace(j,$),this.style.updateImage(T,c),this}getImage(T){return this.style.getImage(T)}hasImage(T){return T?!!this.style.getImage(T):(this.fire(new o.j(new Error("Missing required image id"))),!1)}removeImage(T){this.style.removeImage(T)}loadImage(T){return X.getImage(this._requestManager.transformRequest(T,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(T,l){return this._lazyInitEmptyStyle(),this.style.addLayer(T,l),this._update(!0)}moveLayer(T,l){return this.style.moveLayer(T,l),this._update(!0)}removeLayer(T){return this.style.removeLayer(T),this._update(!0)}getLayer(T){return this.style.getLayer(T)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(T,l,c){return this.style.setLayerZoomRange(T,l,c),this._update(!0)}setFilter(T,l,c={}){return this.style.setFilter(T,l,c),this._update(!0)}getFilter(T){return this.style.getFilter(T)}setPaintProperty(T,l,c,_={}){return this.style.setPaintProperty(T,l,c,_),this._update(!0)}getPaintProperty(T,l){return this.style.getPaintProperty(T,l)}setLayoutProperty(T,l,c,_={}){return this.style.setLayoutProperty(T,l,c,_),this._update(!0)}getLayoutProperty(T,l){return this.style.getLayoutProperty(T,l)}setGlyphs(T,l={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(T,l),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(T,l,c={}){return this._lazyInitEmptyStyle(),this.style.addSprite(T,l,c,_=>{_||this._update(!0)}),this}removeSprite(T){return this._lazyInitEmptyStyle(),this.style.removeSprite(T),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(T,l={}){return this._lazyInitEmptyStyle(),this.style.setSprite(T,l,c=>{c||this._update(!0)}),this}setLight(T,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(T,l),this._update(!0)}getLight(){return this.style.getLight()}setSky(T,l={}){return this._lazyInitEmptyStyle(),this.style.setSky(T,l),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(T,l){return this.style.setFeatureState(T,l),this._update()}removeFeatureState(T,l){return this.style.removeFeatureState(T,l),this._update()}getFeatureState(T){return this.style.getFeatureState(T)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let T=0,l=0;return this._container&&(T=this._container.clientWidth||400,l=this._container.clientHeight||300),[T,l]}_setupContainer(){const T=this._container;T.classList.add("maplibregl-map");const l=this._canvasContainer=O.create("div","maplibregl-canvas-container",T);this._interactive&&l.classList.add("maplibregl-interactive"),this._canvas=O.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(),_=this._getClampedPixelRatio(c[0],c[1]);this._resizeCanvas(c[0],c[1],_);const M=this._controlContainer=O.create("div","maplibregl-control-container",T),R=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(j=>{R[j]=O.create("div",`maplibregl-ctrl-${j} `,M)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(T,l,c){this._canvas.width=Math.floor(c*T),this._canvas.height=Math.floor(c*l),this._canvas.style.width=`${T}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const T=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let l=null;this._canvas.addEventListener("webglcontextcreationerror",_=>{l={requestedAttributes:T},_&&(l.statusMessage=_.statusMessage,l.type=_.type)},{once:!0});let c=null;if(c=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,T):this._canvas.getContext("webgl2",T)||this._canvas.getContext("webgl",T),!c){const _="Failed to initialize WebGL";throw l?(l.message=_,new Error(JSON.stringify(l))):new Error(_)}this.painter=new ju(c,this.transform),k.testSupport(c)}migrateProjection(T,l){super.migrateProjection(T,l),this.painter.transform=T,this.fire(new o.k("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(T){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||T,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(T){return this._update(),this._renderTaskQueue.add(T)}_cancelRenderFrame(T){this._renderTaskQueue.remove(T)}_render(T){var l,c,_,M,R;const j=this._idleTriggered?this._fadeDuration:0,$=((l=this.style.projection)===null||l===void 0?void 0:l.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(T),this._removed)return;let te=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Ie=this.transform.zoom,Re=S.now();this.style.zoomHistory.update(Ie,Re);const $e=new o.z(Ie,{now:Re,fadeDuration:j,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=$e.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(te=!0,this._crossFadingFactor=Ze),this.style.update($e)}const se=((c=this.style.projection)===null||c===void 0?void 0:c.transitionState)>0!==$;(_=this.style.projection)===null||_===void 0||_.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((M=this.style.projection)===null||M===void 0?void 0:M.transitionState,(R=this.style.projection)===null||R===void 0?void 0:R.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,j,this._crossSourceCollisions,se),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:j,showPadding:this.showPadding}),this.fire(new o.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cd.mark(o.ce.load),this.fire(new o.k("load"))),this.style&&(this.style.hasTransitions()||te)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.k("idle")),!this._loaded||this._fullyLoaded||we||(this._fullyLoaded=!0,o.cd.mark(o.ce.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var T;this._hash&&this._hash.remove();for(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),X.removeThrottleControl(this._imageQueueHandle),(T=this._resizeObserver)===null||T===void 0||T.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),O.remove(this._canvasContainer),O.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cd.clearMetrics(),this._removed=!0,this.fire(new o.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,S.frameAsync(this._frameRequest).then(T=>{o.cd.frame(T),this._frameRequest=null,this._render(T)}).catch(T=>{if(!o.cf(T)&&!function(l){return l.message===jl}(T))throw T}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(T){this._showTileBoundaries!==T&&(this._showTileBoundaries=T,this._update())}get showPadding(){return!!this._showPadding}set showPadding(T){this._showPadding!==T&&(this._showPadding=T,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(T){this._showCollisionBoxes!==T&&(this._showCollisionBoxes=T,T?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(T){this._showOverdrawInspector!==T&&(this._showOverdrawInspector=T,this._update())}get repaint(){return!!this._repaint}set repaint(T){this._repaint!==T&&(this._repaint=T,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(T){this._vertices=T,this._update()}get version(){return ih}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(T){return this._lazyInitEmptyStyle(),this.style.setProjection(T),this._update(!0)}},a.MapMouseEvent=Di,a.MapTouchEvent=$r,a.MapWheelEvent=Es,a.Marker=wu,a.NavigationControl=class{constructor(T){this._updateZoomButtons=()=>{const l=this._map.getZoom(),c=l===this._map.getMaxZoom(),_=l===this._map.getMinZoom();this._zoomInButton.disabled=c,this._zoomOutButton.disabled=_,this._zoomInButton.setAttribute("aria-disabled",c.toString()),this._zoomOutButton.setAttribute("aria-disabled",_.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 _=this._map._getUIString(`NavigationControl.${c}`);l.title=_,l.setAttribute("aria-label",_)},this.options=o.e({},Qs,T),this._container=O.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})),O.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})),O.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=O.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(T){return this._map=T,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new wc(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){O.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(T,l){const c=O.create("button",T,this._container);return c.type="button",c.addEventListener("click",l),c}},a.Popup=class extends o.E{constructor(T){super(),this.remove=()=>(this._content&&O.remove(this._content),this._container&&(O.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 o.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=O.create("div","maplibregl-popup",this._map.getContainer()),this._tip=O.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const $ of this.options.className.split(" "))this._container.classList.add($);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?hl(this._lngLat,this._flatPos,this._map.transform):(c=this._lngLat)===null||c===void 0?void 0:c.wrap(),this._trackPointer&&!l)return;const _=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 R=Ql(this.options.offset);if(!M){const $=this._container.offsetWidth,te=this._container.offsetHeight;let se;se=_.y+R.bottom.y<te?["top"]:_.y>this._map.transform.height-te?["bottom"]:[],_.x<$/2?se.push("left"):_.x>this._map.transform.width-$/2&&se.push("right"),M=se.length===0?"bottom":se.join("-")}let j=_.add(R[M]);this.options.subpixelPositioning||(j=j.round()),O.setTransform(this._container,`${qu[M]} translate(${j.x}px,${j.y}px)`),Mc(this._container,M,"popup")},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(Sc),T)}addTo(T){return this._map&&this.remove(),this._map=T,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new o.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(T){return this._lngLat=o.N.convert(T),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(T){return this.setDOMContent(document.createTextNode(T))}setHTML(T){const l=document.createDocumentFragment(),c=document.createElement("body");let _;for(c.innerHTML=T;_=c.firstChild,_;)l.appendChild(_);return this.setDOMContent(l)}getMaxWidth(){var T;return(T=this._container)===null||T===void 0?void 0:T.style.maxWidth}setMaxWidth(T){return this.options.maxWidth=T,this._update(),this}setDOMContent(T){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=O.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(T),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(T){return this._container&&this._container.classList.add(T),this}removeClassName(T){return this._container&&this._container.classList.remove(T),this}setOffset(T){return this.options.offset=T,this._update(),this}toggleClassName(T){if(this._container)return this._container.classList.toggle(T)}setSubpixelPositioning(T){this.options.subpixelPositioning=T}_createCloseButton(){this.options.closeButton&&(this._closeButton=O.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 T=this._container.querySelector(Yu);T&&T.focus()}},a.RasterDEMTileSource=jn,a.RasterTileSource=mn,a.ScaleControl=class{constructor(T){this._onMove=()=>{cA(this._map,this._container,this.options)},this.setUnit=l=>{this.options.unit=l,cA(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},lu),T)}getDefaultPosition(){return"bottom-left"}onAdd(T){return this._map=T,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-scale",T.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){O.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},a.ScrollZoomHandler=Ks,a.Style=bh,a.TerrainControl=class{constructor(T){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=T}onAdd(T){return this._map=T,this._container=O.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=O.create("button","maplibregl-ctrl-terrain",this._container),O.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(){O.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},a.TwoFingersTouchPitchHandler=_c,a.TwoFingersTouchRotateHandler=nc,a.TwoFingersTouchZoomHandler=xd,a.TwoFingersTouchZoomRotateHandler=SA,a.VectorTileSource=Ft,a.VideoSource=Dn,a.addSourceType=(T,l)=>o._(void 0,void 0,void 0,function*(){if(wr(T))throw new Error(`A source type called "${T}" already exists.`);((c,_)=>{Hn[c]=_})(T,l)}),a.clearPrewarmedResources=function(){const T=bt;T&&(T.isPreloaded()&&T.numActive()===1?(T.release(Te),bt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.createTileMesh=ot,a.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return Ae().getRTLTextPluginStatus()},a.getVersion=function(){return wd},a.getWorkerCount=function(){return rt.workerCount},a.getWorkerUrl=function(){return o.a.WORKER_URL},a.importScriptInWorkers=function(T){return Le().broadcast("IS",T)},a.prewarm=function(){Dt().acquire(Te)},a.setMaxParallelImageRequests=function(T){o.a.MAX_PARALLEL_IMAGE_REQUESTS=T},a.setRTLTextPlugin=function(T,l){return Ae().setRTLTextPlugin(T,l)},a.setWorkerCount=function(T){rt.workerCount=T},a.setWorkerUrl=function(T){o.a.WORKER_URL=T}});var s=t;return s})}(xb)),xb.exports}var PV=TV();const Cv=Ha(PV);var F_=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function uU(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _v={exports:{}};_v.exports;var g7;function RV(){return g7||(g7=1,function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,o="[object Arguments]",d="[object Array]",g="[object AsyncFunction]",b="[object Boolean]",E="[object Date]",S="[object Error]",O="[object Function]",k="[object GeneratorFunction]",U="[object Map]",z="[object Number]",q="[object Null]",Q="[object Object]",re="[object Promise]",X="[object Proxy]",Y="[object RegExp]",ee="[object Set]",N="[object String]",ie="[object Symbol]",he="[object Undefined]",de="[object WeakMap]",Me="[object ArrayBuffer]",fe="[object DataView]",xe="[object Float32Array]",De="[object Float64Array]",me="[object Int8Array]",at="[object Int16Array]",Qe="[object Int32Array]",He="[object Uint8Array]",We="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Te="[object Uint32Array]",rt=/[\\^$.*+?()[\]{}|]/g,yt=/^\[object .+?Constructor\]$/,bt=/^(?:0|[1-9]\d*)$/,gt={};gt[xe]=gt[De]=gt[me]=gt[at]=gt[Qe]=gt[He]=gt[We]=gt[Ce]=gt[Te]=!0,gt[o]=gt[d]=gt[Me]=gt[b]=gt[fe]=gt[E]=gt[S]=gt[O]=gt[U]=gt[z]=gt[Q]=gt[Y]=gt[ee]=gt[N]=gt[de]=!1;var Dt=typeof F_=="object"&&F_&&F_.Object===Object&&F_,Pt=typeof self=="object"&&self&&self.Object===Object&&self,Le=Dt||Pt||Function("return this")(),Pe=e&&!e.nodeType&&e,Ee=Pe&&!0&&n&&!n.nodeType&&n,nt=Ee&&Ee.exports===Pe,_t=nt&&Dt.process,ht=function(){try{return _t&&_t.binding&&_t.binding("util")}catch{}}(),Ut=ht&&ht.isTypedArray;function en(J,Oe){for(var ot=-1,Vt=J==null?0:J.length,Ir=0,Yn=[];++ot<Vt;){var si=J[ot];Oe(si,ot,J)&&(Yn[Ir++]=si)}return Yn}function Ft(J,Oe){for(var ot=-1,Vt=Oe.length,Ir=J.length;++ot<Vt;)J[Ir+ot]=Oe[ot];return J}function mn(J,Oe){for(var ot=-1,Vt=J==null?0:J.length;++ot<Vt;)if(Oe(J[ot],ot,J))return!0;return!1}function jn(J,Oe){for(var ot=-1,Vt=Array(J);++ot<J;)Vt[ot]=Oe(ot);return Vt}function nn(J){return function(Oe){return J(Oe)}}function ir(J,Oe){return J.has(Oe)}function Dn(J,Oe){return J==null?void 0:J[Oe]}function fn(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt,Ir){ot[++Oe]=[Ir,Vt]}),ot}function Hn(J,Oe){return function(ot){return J(Oe(ot))}}function wr(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt){ot[++Oe]=Vt}),ot}var Qn=Array.prototype,Xn=Function.prototype,Ge=Object.prototype,Ae=Le["__core-js_shared__"],pe=Xn.toString,et=Ge.hasOwnProperty,St=function(){var J=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),Yt=Ge.toString,rn=RegExp("^"+pe.call(et).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),er=nt?Le.Buffer:void 0,Be=Le.Symbol,oe=Le.Uint8Array,ve=Ge.propertyIsEnumerable,p=Qn.splice,je=Be?Be.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,tt=er?er.isBuffer:void 0,ct=Hn(Object.keys,Object),At=Ei(Le,"DataView"),Gt=Ei(Le,"Map"),$t=Ei(Le,"Promise"),jt=Ei(Le,"Set"),xt=Ei(Le,"WeakMap"),Rn=Ei(Object,"create"),Bn=fo(At),fr=fo(Gt),Sr=fo($t),on=fo(jt),Nn=fo(xt),Fn=Be?Be.prototype:void 0,Or=Fn?Fn.valueOf:void 0;function Er(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Dr(){this.__data__=Rn?Rn(null):{},this.size=0}function ur(J){var Oe=this.has(J)&&delete this.__data__[J];return this.size-=Oe?1:0,Oe}function co(J){var Oe=this.__data__;if(Rn){var ot=Oe[J];return ot===r?void 0:ot}return et.call(Oe,J)?Oe[J]:void 0}function Sa(J){var Oe=this.__data__;return Rn?Oe[J]!==void 0:et.call(Oe,J)}function qi(J,Oe){var ot=this.__data__;return this.size+=this.has(J)?0:1,ot[J]=Rn&&Oe===void 0?r:Oe,this}Er.prototype.clear=Dr,Er.prototype.delete=ur,Er.prototype.get=co,Er.prototype.has=Sa,Er.prototype.set=qi;function yi(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function oo(){this.__data__=[],this.size=0}function Mo(J){var Oe=this.__data__,ot=sr(Oe,J);if(ot<0)return!1;var Vt=Oe.length-1;return ot==Vt?Oe.pop():p.call(Oe,ot,1),--this.size,!0}function Ti(J){var Oe=this.__data__,ot=sr(Oe,J);return ot<0?void 0:Oe[ot][1]}function La(J){return sr(this.__data__,J)>-1}function Ea(J,Oe){var ot=this.__data__,Vt=sr(ot,J);return Vt<0?(++this.size,ot.push([J,Oe])):ot[Vt][1]=Oe,this}yi.prototype.clear=oo,yi.prototype.delete=Mo,yi.prototype.get=Ti,yi.prototype.has=La,yi.prototype.set=Ea;function ns(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Aa(){this.size=0,this.__data__={hash:new Er,map:new(Gt||yi),string:new Er}}function Al(J){var Oe=Fr(this,J).delete(J);return this.size-=Oe?1:0,Oe}function ao(J){return Fr(this,J).get(J)}function Pu(J){return Fr(this,J).has(J)}function tu(J,Oe){var ot=Fr(this,J),Vt=ot.size;return ot.set(J,Oe),this.size+=ot.size==Vt?0:1,this}ns.prototype.clear=Aa,ns.prototype.delete=Al,ns.prototype.get=ao,ns.prototype.has=Pu,ns.prototype.set=tu;function so(J){var Oe=-1,ot=J==null?0:J.length;for(this.__data__=new ns;++Oe<ot;)this.add(J[Oe])}function Kr(J){return this.__data__.set(J,r),this}function Za(J){return this.__data__.has(J)}so.prototype.add=so.prototype.push=Kr,so.prototype.has=Za;function Ps(J){var Oe=this.__data__=new yi(J);this.size=Oe.size}function ia(){this.__data__=new yi,this.size=0}function qe(J){var Oe=this.__data__,ot=Oe.delete(J);return this.size=Oe.size,ot}function wt(J){return this.__data__.get(J)}function gn(J){return this.__data__.has(J)}function qn(J,Oe){var ot=this.__data__;if(ot instanceof yi){var Vt=ot.__data__;if(!Gt||Vt.length<t-1)return Vt.push([J,Oe]),this.size=++ot.size,this;ot=this.__data__=new ns(Vt)}return ot.set(J,Oe),this.size=ot.size,this}Ps.prototype.clear=ia,Ps.prototype.delete=qe,Ps.prototype.get=wt,Ps.prototype.has=gn,Ps.prototype.set=qn;function An(J,Oe){var ot=el(J),Vt=!ot&&Ms(J),Ir=!ot&&!Vt&&El(J),Yn=!ot&&!Vt&&!Ir&&ru(J),si=ot||Vt||Ir||Yn,ci=si?jn(J.length,String):[],vr=ci.length;for(var kr in J)et.call(J,kr)&&!(si&&(kr=="length"||Ir&&(kr=="offset"||kr=="parent")||Yn&&(kr=="buffer"||kr=="byteLength"||kr=="byteOffset")||Ws(kr,vr)))&&ci.push(kr);return ci}function sr(J,Oe){for(var ot=J.length;ot--;)if(ms(J[ot][0],Oe))return ot;return-1}function Pi(J,Oe,ot){var Vt=Oe(J);return el(J)?Vt:Ft(Vt,ot(J))}function ho(J){return J==null?J===void 0?he:q:je&&je in Object(J)?Ja(J):Vs(J)}function Cs(J){return Jr(J)&&ho(J)==o}function Ns(J,Oe,ot,Vt,Ir){return J===Oe?!0:J==null||Oe==null||!Jr(J)&&!Jr(Oe)?J!==J&&Oe!==Oe:vA(J,Oe,ot,Vt,Ns,Ir)}function vA(J,Oe,ot,Vt,Ir,Yn){var si=el(J),ci=el(Oe),vr=si?d:So(J),kr=ci?d:So(Oe);vr=vr==o?Q:vr,kr=kr==o?Q:kr;var vi=vr==Q,Eo=kr==Q,ki=vr==kr;if(ki&&El(J)){if(!El(Oe))return!1;si=!0,vi=!1}if(ki&&!vi)return Yn||(Yn=new Ps),si||ru(J)?Ai(J,Oe,ot,Vt,Ir,Yn):ca(J,Oe,vr,ot,Vt,Ir,Yn);if(!(ot&i)){var qr=vi&&et.call(J,"__wrapped__"),Hi=Eo&&et.call(Oe,"__wrapped__");if(qr||Hi){var Zi=qr?J.value():J,us=Hi?Oe.value():Oe;return Yn||(Yn=new Ps),Ir(Zi,us,ot,Vt,Yn)}}return ki?(Yn||(Yn=new Ps),iA(J,Oe,ot,Vt,Ir,Yn)):!1}function ri(J){if(!Ui(J)||zl(J))return!1;var Oe=Vi(J)?rn:yt;return Oe.test(fo(J))}function wi(J){return Jr(J)&&nu(J.length)&&!!gt[ho(J)]}function Xa(J){if(!rs(J))return ct(J);var Oe=[];for(var ot in Object(J))et.call(J,ot)&&ot!="constructor"&&Oe.push(ot);return Oe}function Ai(J,Oe,ot,Vt,Ir,Yn){var si=ot&i,ci=J.length,vr=Oe.length;if(ci!=vr&&!(si&&vr>ci))return!1;var kr=Yn.get(J);if(kr&&Yn.get(Oe))return kr==Oe;var vi=-1,Eo=!0,ki=ot&s?new so:void 0;for(Yn.set(J,Oe),Yn.set(Oe,J);++vi<ci;){var qr=J[vi],Hi=Oe[vi];if(Vt)var Zi=si?Vt(Hi,qr,vi,Oe,J,Yn):Vt(qr,Hi,vi,J,Oe,Yn);if(Zi!==void 0){if(Zi)continue;Eo=!1;break}if(ki){if(!mn(Oe,function(us,ya){if(!ir(ki,ya)&&(qr===us||Ir(qr,us,ot,Vt,Yn)))return ki.push(ya)})){Eo=!1;break}}else if(!(qr===Hi||Ir(qr,Hi,ot,Vt,Yn))){Eo=!1;break}}return Yn.delete(J),Yn.delete(Oe),Eo}function ca(J,Oe,ot,Vt,Ir,Yn,si){switch(ot){case fe:if(J.byteLength!=Oe.byteLength||J.byteOffset!=Oe.byteOffset)return!1;J=J.buffer,Oe=Oe.buffer;case Me:return!(J.byteLength!=Oe.byteLength||!Yn(new oe(J),new oe(Oe)));case b:case E:case z:return ms(+J,+Oe);case S:return J.name==Oe.name&&J.message==Oe.message;case Y:case N:return J==Oe+"";case U:var ci=fn;case ee:var vr=Vt&i;if(ci||(ci=wr),J.size!=Oe.size&&!vr)return!1;var kr=si.get(J);if(kr)return kr==Oe;Vt|=s,si.set(J,Oe);var vi=Ai(ci(J),ci(Oe),Vt,Ir,Yn,si);return si.delete(J),vi;case ie:if(Or)return Or.call(J)==Or.call(Oe)}return!1}function iA(J,Oe,ot,Vt,Ir,Yn){var si=ot&i,ci=ls(J),vr=ci.length,kr=ls(Oe),vi=kr.length;if(vr!=vi&&!si)return!1;for(var Eo=vr;Eo--;){var ki=ci[Eo];if(!(si?ki in Oe:et.call(Oe,ki)))return!1}var qr=Yn.get(J);if(qr&&Yn.get(Oe))return qr==Oe;var Hi=!0;Yn.set(J,Oe),Yn.set(Oe,J);for(var Zi=si;++Eo<vr;){ki=ci[Eo];var us=J[ki],ya=Oe[ki];if(Vt)var Ua=si?Vt(ya,us,ki,Oe,J,Yn):Vt(us,ya,ki,J,Oe,Yn);if(!(Ua===void 0?us===ya||Ir(us,ya,ot,Vt,Yn):Ua)){Hi=!1;break}Zi||(Zi=ki=="constructor")}if(Hi&&!Zi){var fu=J.constructor,Hs=Oe.constructor;fu!=Hs&&"constructor"in J&&"constructor"in Oe&&!(typeof fu=="function"&&fu instanceof fu&&typeof Hs=="function"&&Hs instanceof Hs)&&(Hi=!1)}return Yn.delete(J),Yn.delete(Oe),Hi}function ls(J){return Pi(J,Ni,Rs)}function Fr(J,Oe){var ot=J.__data__;return hu(Oe)?ot[typeof Oe=="string"?"string":"hash"]:ot.map}function Ei(J,Oe){var ot=Dn(J,Oe);return ri(ot)?ot:void 0}function Ja(J){var Oe=et.call(J,je),ot=J[je];try{J[je]=void 0;var Vt=!0}catch{}var Ir=Yt.call(J);return Vt&&(Oe?J[je]=ot:delete J[je]),Ir}var Rs=Ye?function(J){return J==null?[]:(J=Object(J),en(Ye(J),function(Oe){return ve.call(J,Oe)}))}:lo,So=ho;(At&&So(new At(new ArrayBuffer(1)))!=fe||Gt&&So(new Gt)!=U||$t&&So($t.resolve())!=re||jt&&So(new jt)!=ee||xt&&So(new xt)!=de)&&(So=function(J){var Oe=ho(J),ot=Oe==Q?J.constructor:void 0,Vt=ot?fo(ot):"";if(Vt)switch(Vt){case Bn:return fe;case fr:return U;case Sr:return re;case on:return ee;case Nn:return de}return Oe});function Ws(J,Oe){return Oe=Oe??a,!!Oe&&(typeof J=="number"||bt.test(J))&&J>-1&&J%1==0&&J<Oe}function hu(J){var Oe=typeof J;return Oe=="string"||Oe=="number"||Oe=="symbol"||Oe=="boolean"?J!=="__proto__":J===null}function zl(J){return!!St&&St in J}function rs(J){var Oe=J&&J.constructor,ot=typeof Oe=="function"&&Oe.prototype||Ge;return J===ot}function Vs(J){return Yt.call(J)}function fo(J){if(J!=null){try{return pe.call(J)}catch{}try{return J+""}catch{}}return""}function ms(J,Oe){return J===Oe||J!==J&&Oe!==Oe}var Ms=Cs(function(){return arguments}())?Cs:function(J){return Jr(J)&&et.call(J,"callee")&&!ve.call(J,"callee")},el=Array.isArray;function Ds(J){return J!=null&&nu(J.length)&&!Vi(J)}var El=tt||Ri;function oA(J,Oe){return Ns(J,Oe)}function Vi(J){if(!Ui(J))return!1;var Oe=ho(J);return Oe==O||Oe==k||Oe==g||Oe==X}function nu(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=a}function Ui(J){var Oe=typeof J;return J!=null&&(Oe=="object"||Oe=="function")}function Jr(J){return J!=null&&typeof J=="object"}var ru=Ut?nn(Ut):wi;function Ni(J){return Ds(J)?An(J):Xa(J)}function lo(){return[]}function Ri(){return!1}n.exports=oA}(_v,_v.exports)),_v.exports}var DV=RV(),KV=uU(DV);function g6(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function y6(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function v6(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function FV(n,e){const t=[],r=[],i=[];function s(a){return{circle:e(a,.8),line:e(a,.6),polygon:e(a,.3),polygonOutline:e(a,.6),default:e(a,1)}}return Object.keys(n).forEach(a=>{const o=n[a];if(!o||o.length===0){const d=s(a);r.push(g6(d.circle,a)),i.push(v6(d.line,a)),t.push(y6(d.polygon,d.polygonOutline,a))}else o.forEach(d=>{const g=s(d);r.push(g6(g.circle,a,d)),i.push(v6(g.line,a,d)),t.push(y6(g.polygon,g.polygonOutline,a,d))})}),t.concat(i).concat(r)}function LV(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(s=>{const a=n.sources[s];(a.type==="vector"||a.type==="geojson")&&(i[s]=a)}),Object.assign(n,{layers:[r].concat(e),sources:i})}var y7={polygonLayer:y6,lineLayer:v6,circleLayer:g6,generateInspectStyle:LV,generateColoredLayers:FV};class UV{constructor(e){e=Object.assign({show:!0,onToggle(){}},e),this._btn=this.createButton(),this._btn.onclick=e.onToggle,this.elem=this.createContainer(this._btn,e.show)}createButton(){const e=document.createElement("button");return e.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect",e.type="button",e.title="Toggle Inspect",e.setAttribute("aria-label","Toggle Inspect"),e}createContainer(e,t){const r=document.createElement("div");return r.className="maplibregl-ctrl maplibregl-ctrl-group",r.appendChild(e),t||(r.style.display="none"),r}setInspectIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-inspect"}setMapIcon(){this._btn.className="maplibregl-ctrl-icon maplibregl-ctrl-map"}}function zV(n){return typeof n>"u"||n===null?n:n instanceof Date?n.toLocaleString():typeof n=="object"||typeof n=="number"||typeof n=="string"?n.toString():n}function e4(n,e){return`<div class="maplibregl-inspect_property"><div class="maplibregl-inspect_property-name">${n}</div><div class="maplibregl-inspect_property-value">${zV(e)}</div></div>`}function jV(n){return`<div class="maplibregl-inspect_layer">${n}</div>`}function NV(n){const e=jV(n.layer["source-layer"]||n.layer.source),t=e4("$id",n.id),r=e4("$type",n.geometry.type),i=Object.keys(n.properties).map(s=>e4(s,n.properties[s]));return[e,t,r].concat(i).join("")}function WV(n){return n.map(e=>`<div class="maplibregl-inspect_feature">${NV(e)}</div>`).join("")}function GV(n){return`<div class="maplibregl-inspect_popup">${WV(n)}</div>`}var bv={exports:{}},QV=bv.exports,v7;function qV(){return v7||(v7=1,function(n,e){(function(t,r){{var i=r();n.exports&&(e=n.exports=i),e.randomColor=i}})(QV,function(){var t=null,r={};q();var i=[],s=function(N){if(N=N||{},N.seed!==void 0&&N.seed!==null&&N.seed===parseInt(N.seed,10))t=N.seed;else if(typeof N.seed=="string")t=Y(N.seed);else{if(N.seed!==void 0&&N.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var ie,he,de;if(N.count!==null&&N.count!==void 0){for(var Me=N.count,fe=[],xe=0;xe<N.count;xe++)i.push(!1);for(N.count=null;Me>fe.length;){var De=s(N);t!==null&&(N.seed=t),fe.push(De)}return N.count=Me,fe}return ie=a(N),he=o(ie,N),de=d(ie,he,N),g([ie,he,de],N)};function a(N){if(i.length>0){var ie=ee(N.hue),he=k(ie),de=(ie[1]-ie[0])/i.length,Me=parseInt((he-ie[0])/de);i[Me]===!0?Me=(Me+2)%i.length:i[Me]=!0;var fe=(ie[0]+Me*de)%359,xe=(ie[0]+(Me+1)*de)%359;return ie=[fe,xe],he=k(ie),he<0&&(he=360+he),he}else{var ie=E(N.hue);return he=k(ie),he<0&&(he=360+he),he}}function o(N,ie){if(ie.hue==="monochrome")return 0;if(ie.luminosity==="random")return k([0,100]);var he=S(N),de=he[0],Me=he[1];switch(ie.luminosity){case"bright":de=55;break;case"dark":de=Me-10;break;case"light":Me=55;break}return k([de,Me])}function d(N,ie,he){var de=b(N,ie),Me=100;switch(he.luminosity){case"dark":Me=de+20;break;case"light":de=(Me+de)/2;break;case"random":de=0,Me=100;break}return k([de,Me])}function g(N,ie){switch(ie.format){case"hsvArray":return N;case"hslArray":return X(N);case"hsl":var he=X(N);return"hsl("+he[0]+", "+he[1]+"%, "+he[2]+"%)";case"hsla":var de=X(N),xe=ie.alpha||Math.random();return"hsla("+de[0]+", "+de[1]+"%, "+de[2]+"%, "+xe+")";case"rgbArray":return Q(N);case"rgb":var Me=Q(N);return"rgb("+Me.join(", ")+")";case"rgba":var fe=Q(N),xe=ie.alpha||Math.random();return"rgba("+fe.join(", ")+", "+xe+")";default:return U(N)}}function b(N,ie){for(var he=O(N).lowerBounds,de=0;de<he.length-1;de++){var Me=he[de][0],fe=he[de][1],xe=he[de+1][0],De=he[de+1][1];if(ie>=Me&&ie<=xe){var me=(De-fe)/(xe-Me),at=fe-me*Me;return me*ie+at}}return 0}function E(N){if(typeof parseInt(N)=="number"){var ie=parseInt(N);if(ie<360&&ie>0)return[ie,ie]}if(typeof N=="string"){if(r[N]){var he=r[N];if(he.hueRange)return he.hueRange}else if(N.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var de=re(N)[0];return[de,de]}}return[0,360]}function S(N){return O(N).saturationRange}function O(N){N>=334&&N<=360&&(N-=360);for(var ie in r){var he=r[ie];if(he.hueRange&&N>=he.hueRange[0]&&N<=he.hueRange[1])return r[ie]}return"Color not found"}function k(N){if(t===null){var ie=.618033988749895,he=Math.random();return he+=ie,he%=1,Math.floor(N[0]+he*(N[1]+1-N[0]))}else{var de=N[1]||1,Me=N[0]||0;t=(t*9301+49297)%233280;var fe=t/233280;return Math.floor(Me+fe*(de-Me))}}function U(N){var ie=Q(N);function he(Me){var fe=Me.toString(16);return fe.length==1?"0"+fe:fe}var de="#"+he(ie[0])+he(ie[1])+he(ie[2]);return de}function z(N,ie,he){var de=he[0][0],Me=he[he.length-1][0],fe=he[he.length-1][1],xe=he[0][1];r[N]={hueRange:ie,lowerBounds:he,saturationRange:[de,Me],brightnessRange:[fe,xe]}}function q(){z("monochrome",null,[[0,0],[100,0]]),z("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),z("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),z("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),z("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),z("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),z("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),z("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function Q(N){var ie=N[0];ie===0&&(ie=1),ie===360&&(ie=359),ie=ie/360;var he=N[1]/100,de=N[2]/100,Me=Math.floor(ie*6),fe=ie*6-Me,xe=de*(1-he),De=de*(1-fe*he),me=de*(1-(1-fe)*he),at=256,Qe=256,He=256;switch(Me){case 0:at=de,Qe=me,He=xe;break;case 1:at=De,Qe=de,He=xe;break;case 2:at=xe,Qe=de,He=me;break;case 3:at=xe,Qe=De,He=de;break;case 4:at=me,Qe=xe,He=de;break;case 5:at=de,Qe=xe,He=De;break}var We=[Math.floor(at*255),Math.floor(Qe*255),Math.floor(He*255)];return We}function re(N){N=N.replace(/^#/,""),N=N.length===3?N.replace(/(.)/g,"$1$1"):N;var ie=parseInt(N.substr(0,2),16)/255,he=parseInt(N.substr(2,2),16)/255,de=parseInt(N.substr(4,2),16)/255,Me=Math.max(ie,he,de),fe=Me-Math.min(ie,he,de),xe=Me?fe/Me:0;switch(Me){case ie:return[60*((he-de)/fe%6)||0,xe,Me];case he:return[60*((de-ie)/fe+2)||0,xe,Me];case de:return[60*((ie-he)/fe+4)||0,xe,Me]}}function X(N){var ie=N[0],he=N[1]/100,de=N[2]/100,Me=(2-he)*de;return[ie,Math.round(he*de/(Me<1?Me:2-Me)*1e4)/100,Me/2*100]}function Y(N){for(var ie=0,he=0;he!==N.length&&!(ie>=Number.MAX_SAFE_INTEGER);he++)ie+=N.charCodeAt(he);return ie}function ee(N){if(isNaN(N)){if(typeof N=="string"){if(r[N]){var he=r[N];if(he.hueRange)return he.hueRange}else if(N.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var de=re(N)[0];return O(de).hueRange}}}else{var ie=parseInt(N);if(ie<360&&ie>0)return O(N).hueRange}return[0,360]}return s})}(bv,bv.exports)),bv.exports}var YV=qV(),$V=uU(YV);function VV(n,e){let t="bright",r;return/water|ocean|lake|sea|river/.test(n)&&(r="blue"),/state|country|place/.test(n)&&(r="pink"),/road|highway|transport|streets/.test(n)&&(r="orange"),/contour|building|earth/.test(n)&&(r="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(r="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(r="green"),`rgba(${$V({luminosity:t,hue:r,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}var HV={brightColor:VV};function ZV(n){return n.metadata&&n.metadata["maplibregl-inspect:inspect"]}function XV(n){return Object.assign(n,{metadata:Object.assign({},n.metadata,{"maplibregl-inspect:inspect":!0})})}class jB{constructor(e){if(this._onSourceChange=r=>{if(r.sourceDataType==="visibility"||!r.isSourceLoaded)return;const i=Object.assign({},this.sources);this._setSourcesFromMap(),!KV(i,this.sources)&&Object.keys(this.sources).length>0&&setTimeout(()=>this.render(),1e3)},this._onStyleChange=()=>{const r=this._map.getStyle();ZV(r)||(this._originalStyle=r)},this._onRightClick=()=>{!this.options.showMapPopupOnHover&&!this.options.showInspectMapPopupOnHover&&!this.options.blockHoverPopupOnClick&&this._popup&&this._popup.remove()},this._onMousemove=r=>{if(this._showInspectMap){if(!this.options.showInspectMapPopup||r.type==="mousemove"&&!this.options.showInspectMapPopupOnHover)return;r.type==="click"&&this.options.showInspectMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}else{if(!this.options.showMapPopup||r.type==="mousemove"&&!this.options.showMapPopupOnHover)return;r.type==="click"&&this.options.showMapPopupOnHover&&this.options.blockHoverPopupOnClick&&(this._popupBlocked=!this._popupBlocked)}if(!this._popupBlocked&&this._popup){let i;this.options.selectThreshold===0?i=r.point:i=[[r.point.x-this.options.selectThreshold,r.point.y+this.options.selectThreshold],[r.point.x+this.options.selectThreshold,r.point.y-this.options.selectThreshold]];const s=this._map.queryRenderedFeatures(i,this.options.queryParameters)||[];if(this._map.getCanvas().style.cursor=s.length?"pointer":"",!s.length)this._popup.remove();else{this._popup.setLngLat(r.lngLat);const a=this.options.renderPopup(s);typeof a=="string"?this._popup.setHTML(a):this._popup.setDOMContent(a),this._popup.addTo(this._map)}}},!(this instanceof jB))throw new Error("MaplibreInspect needs to be called with the new keyword");let t=null;window.maplibregl?t=new window.maplibregl.Popup({closeButton:!1,closeOnClick:!1}):e.popup||console.error("Maplibre GL JS can not be found. Make sure to include it or pass an initialized MaplibreGL Popup to MaplibreInspect if you are using moduleis."),this.options=Object.assign({showInspectMap:!1,showInspectButton:!0,showInspectMapPopup:!0,showMapPopup:!1,showMapPopupOnHover:!0,showInspectMapPopupOnHover:!0,blockHoverPopupOnClick:!1,backgroundColor:"#fff",assignLayerColor:HV.brightColor,buildInspectStyle:y7.generateInspectStyle,renderPopup:GV,popup:t,selectThreshold:5,useInspectStyle:!0,queryParameters:{},sources:{},toggleCallback(){},manageStyleOutside:!1},e),this.sources=this.options.sources,this.assignLayerColor=this.options.assignLayerColor,this._popup=this.options.popup,this._popupBlocked=!1,this._showInspectMap=this.options.showInspectMap,this._toggle=new UV({show:this.options.showInspectButton,onToggle:()=>this.toggleInspector()})}toggleInspector(){this._showInspectMap=!this._showInspectMap,this._popupBlocked=!1,this.options.toggleCallback(this._showInspectMap),this.render()}_inspectStyle(){const e=y7.generateColoredLayers(this.sources,this.assignLayerColor);return this.options.buildInspectStyle(this._map.getStyle(),e,{backgroundColor:this.options.backgroundColor})}render(){this._showInspectMap?(this.options.useInspectStyle&&this._map.setStyle(XV(this._inspectStyle())),this._toggle.setMapIcon()):this._originalStyle&&(this._popup&&this._popup.remove(),this.options.useInspectStyle&&this._map.setStyle(this._originalStyle),this._toggle.setInspectIcon())}_setSourcesFromMap(){const e=Object.keys(this._map.getStyle().sources);Object.keys(this._map.style.sourceCaches).forEach(t=>{const r=this._map.style.sourceCaches[t]||{_source:{}},i=r._source.vectorLayerIds;i?this.sources[t]=i:r._source.type==="geojson"&&(this.sources[t]=[])}),Object.keys(this.sources).forEach(t=>{e.indexOf(t)===-1&&delete this.sources[t]})}setOriginalStyle(e){this._originalStyle=e,this._setSourcesFromMap()}onAdd(e){return this._map=e,Object.keys(this.sources).length===0&&(e.on("tiledata",this._onSourceChange),e.on("sourcedata",this._onSourceChange)),e.on("styledata",this._onStyleChange),e.on("load",this._onStyleChange),e.on("mousemove",this._onMousemove),e.on("click",this._onMousemove),e.on("contextmenu",this._onRightClick),this._toggle.elem}onRemove(){this._map.off("styledata",this._onStyleChange),this._map.off("load",this._onStyleChange),this._map.off("tiledata",this._onSourceChange),this._map.off("sourcedata",this._onSourceChange),this._map.off("mousemove",this._onMousemove),this._map.off("click",this._onMousemove),this._map.off("contextmenu",this._onRightClick);const e=this._toggle.elem;e.parentNode.removeChild(e),this._map=void 0}}var xv={exports:{}},JV=xv.exports,C7;function eH(){return C7||(C7=1,function(n,e){(function(t,r){{var i=r();n.exports&&(e=n.exports=i),e.randomColor=i}})(JV,function(){var t=null,r={};q();var i=[],s=function(N){if(N=N||{},N.seed!==void 0&&N.seed!==null&&N.seed===parseInt(N.seed,10))t=N.seed;else if(typeof N.seed=="string")t=Y(N.seed);else{if(N.seed!==void 0&&N.seed!==null)throw new TypeError("The seed value must be an integer or string");t=null}var ie,he,de;if(N.count!==null&&N.count!==void 0){for(var Me=N.count,fe=[],xe=0;xe<N.count;xe++)i.push(!1);for(N.count=null;Me>fe.length;){var De=s(N);t!==null&&(N.seed=t),fe.push(De)}return N.count=Me,fe}return ie=a(N),he=o(ie,N),de=d(ie,he,N),g([ie,he,de],N)};function a(N){if(i.length>0){var ie=ee(N.hue),he=k(ie),de=(ie[1]-ie[0])/i.length,Me=parseInt((he-ie[0])/de);i[Me]===!0?Me=(Me+2)%i.length:i[Me]=!0;var fe=(ie[0]+Me*de)%359,xe=(ie[0]+(Me+1)*de)%359;return ie=[fe,xe],he=k(ie),he<0&&(he=360+he),he}else{var ie=E(N.hue);return he=k(ie),he<0&&(he=360+he),he}}function o(N,ie){if(ie.hue==="monochrome")return 0;if(ie.luminosity==="random")return k([0,100]);var he=S(N),de=he[0],Me=he[1];switch(ie.luminosity){case"bright":de=55;break;case"dark":de=Me-10;break;case"light":Me=55;break}return k([de,Me])}function d(N,ie,he){var de=b(N,ie),Me=100;switch(he.luminosity){case"dark":Me=de+20;break;case"light":de=(Me+de)/2;break;case"random":de=0,Me=100;break}return k([de,Me])}function g(N,ie){switch(ie.format){case"hsvArray":return N;case"hslArray":return X(N);case"hsl":var he=X(N);return"hsl("+he[0]+", "+he[1]+"%, "+he[2]+"%)";case"hsla":var de=X(N),xe=ie.alpha||Math.random();return"hsla("+de[0]+", "+de[1]+"%, "+de[2]+"%, "+xe+")";case"rgbArray":return Q(N);case"rgb":var Me=Q(N);return"rgb("+Me.join(", ")+")";case"rgba":var fe=Q(N),xe=ie.alpha||Math.random();return"rgba("+fe.join(", ")+", "+xe+")";default:return U(N)}}function b(N,ie){for(var he=O(N).lowerBounds,de=0;de<he.length-1;de++){var Me=he[de][0],fe=he[de][1],xe=he[de+1][0],De=he[de+1][1];if(ie>=Me&&ie<=xe){var me=(De-fe)/(xe-Me),at=fe-me*Me;return me*ie+at}}return 0}function E(N){if(typeof parseInt(N)=="number"){var ie=parseInt(N);if(ie<360&&ie>0)return[ie,ie]}if(typeof N=="string"){if(r[N]){var he=r[N];if(he.hueRange)return he.hueRange}else if(N.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var de=re(N)[0];return[de,de]}}return[0,360]}function S(N){return O(N).saturationRange}function O(N){N>=334&&N<=360&&(N-=360);for(var ie in r){var he=r[ie];if(he.hueRange&&N>=he.hueRange[0]&&N<=he.hueRange[1])return r[ie]}return"Color not found"}function k(N){if(t===null){var ie=.618033988749895,he=Math.random();return he+=ie,he%=1,Math.floor(N[0]+he*(N[1]+1-N[0]))}else{var de=N[1]||1,Me=N[0]||0;t=(t*9301+49297)%233280;var fe=t/233280;return Math.floor(Me+fe*(de-Me))}}function U(N){var ie=Q(N);function he(Me){var fe=Me.toString(16);return fe.length==1?"0"+fe:fe}var de="#"+he(ie[0])+he(ie[1])+he(ie[2]);return de}function z(N,ie,he){var de=he[0][0],Me=he[he.length-1][0],fe=he[he.length-1][1],xe=he[0][1];r[N]={hueRange:ie,lowerBounds:he,saturationRange:[de,Me],brightnessRange:[fe,xe]}}function q(){z("monochrome",null,[[0,0],[100,0]]),z("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),z("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),z("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),z("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),z("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),z("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),z("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]])}function Q(N){var ie=N[0];ie===0&&(ie=1),ie===360&&(ie=359),ie=ie/360;var he=N[1]/100,de=N[2]/100,Me=Math.floor(ie*6),fe=ie*6-Me,xe=de*(1-he),De=de*(1-fe*he),me=de*(1-(1-fe)*he),at=256,Qe=256,He=256;switch(Me){case 0:at=de,Qe=me,He=xe;break;case 1:at=De,Qe=de,He=xe;break;case 2:at=xe,Qe=de,He=me;break;case 3:at=xe,Qe=De,He=de;break;case 4:at=me,Qe=xe,He=de;break;case 5:at=de,Qe=xe,He=De;break}var We=[Math.floor(at*255),Math.floor(Qe*255),Math.floor(He*255)];return We}function re(N){N=N.replace(/^#/,""),N=N.length===3?N.replace(/(.)/g,"$1$1"):N;var ie=parseInt(N.substr(0,2),16)/255,he=parseInt(N.substr(2,2),16)/255,de=parseInt(N.substr(4,2),16)/255,Me=Math.max(ie,he,de),fe=Me-Math.min(ie,he,de),xe=Me?fe/Me:0;switch(Me){case ie:return[60*((he-de)/fe%6)||0,xe,Me];case he:return[60*((de-ie)/fe+2)||0,xe,Me];case de:return[60*((ie-he)/fe+4)||0,xe,Me]}}function X(N){var ie=N[0],he=N[1]/100,de=N[2]/100,Me=(2-he)*de;return[ie,Math.round(he*de/(Me<1?Me:2-Me)*1e4)/100,Me/2*100]}function Y(N){for(var ie=0,he=0;he!==N.length&&!(ie>=Number.MAX_SAFE_INTEGER);he++)ie+=N.charCodeAt(he);return ie}function ee(N){if(isNaN(N)){if(typeof N=="string"){if(r[N]){var he=r[N];if(he.hueRange)return he.hueRange}else if(N.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i)){var de=re(N)[0];return O(de).hueRange}}}else{var ie=parseInt(N);if(ie<360&&ie>0)return O(N).hueRange}return[0,360]}return s})}(xv,xv.exports)),xv.exports}var tH=eH();const nH=Ha(tH);function rH(n,e){let t="bright",r;return/water|ocean|lake|sea|river/.test(n)&&(r="blue"),/state|country|place/.test(n)&&(r="pink"),/road|highway|transport|streets/.test(n)&&(r="orange"),/contour|building|earth/.test(n)&&(r="monochrome"),/building/.test(n)&&(t="dark"),/earth/.test(n)&&(t="light"),/contour|landuse/.test(n)&&(r="yellow"),/wood|forest|park|landcover|land|natural/.test(n)&&(r="green"),`rgba(${nH({luminosity:t,hue:r,seed:n,format:"rgbArray"}).join(", ")}, ${e||"1"})`}const AU={brightColor:rH};var t4={exports:{}},n4,_7;function iH(){if(_7)return n4;_7=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return n4=n,n4}var r4,b7;function oH(){if(b7)return r4;b7=1;var n=iH();function e(){}function t(){}return t.resetWarningCache=e,r4=function(){function r(a,o,d,g,b,E){if(E!==n){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}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:t,resetWarningCache:e};return s.PropTypes=s,s},r4}var x7;function dp(){return x7||(x7=1,t4.exports=oH()()),t4.exports}var sH=dp();const fi=Ha(sH);var w7=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n};function aH(n,e){var t={};for(var r in n)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}var k0=function(e,t){var r=e.children,i=e.color,s=e.size,a=e.style,o=e.width,d=e.height,g=aH(e,["children","color","size","style","width","height"]),b=t.reactIconBase,E=b===void 0?{}:b,S=s||E.size||"1em";return rr.createElement("svg",w7({children:r,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:d||S,width:o||S},E,g,{style:w7({verticalAlign:"middle",color:i||E.color},E.style||{},a)}))};k0.propTypes={color:fi.string,size:fi.oneOfType([fi.string,fi.number]),width:fi.oneOfType([fi.string,fi.number]),height:fi.oneOfType([fi.string,fi.number]),style:fi.object};k0.contextTypes={reactIconBase:fi.shape(k0.propTypes)};function Yb(){var n="/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx",e="ace6118dd0ae83e2ceb20b70664ae2267741d924",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:478}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconLine.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,iBAAiB,MAAM,UAAU;AAAA,EACpD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,iUAAgU,WAAU,kBAAiB,GACrW;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ace6118dd0ae83e2ceb20b70664ae2267741d924"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Yb=function(){return a},a}Yb();class lH extends rr.Component{render(){return Yb().f[0]++,Yb().s[0]++,le.jsx(k0,{viewBox:"0 0 20 20",...this.props,children:le.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 $b(){var n="/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx",e="8b9fc49e8fc93b42e35f3a9b2accdbccf6dcdb84",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:562}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconFill.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,iBAAiB,MAAM,UAAU;AAAA,EACpD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,kbAAib,GAC3b;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8b9fc49e8fc93b42e35f3a9b2accdbccf6dcdb84"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return $b=function(){return a},a}$b();class L_ extends rr.Component{render(){return $b().f[0]++,$b().s[0]++,le.jsx(k0,{viewBox:"0 0 20 20",...this.props,children:le.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 Vb(){var n="/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx",e="6ac2e596376f8b8c2e117c4345e33d1afb8f583b",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:535}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconSymbol.tsx"],names:[],mappings:"AASU;AATV,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,mBAAmB,MAAM,UAAU;AAAA,EACtD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,OAAE,WAAU,wDACX,8BAAC,UAAK,GAAE,4SAA2S,GACrT,GACF;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ac2e596376f8b8c2e117c4345e33d1afb8f583b"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Vb=function(){return a},a}Vb();class uH extends rr.Component{render(){return Vb().f[0]++,Vb().s[0]++,le.jsx(k0,{viewBox:"0 0 20 20",...this.props,children:le.jsx("g",{transform:"matrix(1.2718518,0,0,1.2601269,16.559526,-7.4065264)",children:le.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 Hb(){var n="/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx",e="f8813cd7d4a9138ff3fc7253bc195b86370ed6cf",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:464}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconBackground.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,uBAAuB,MAAM,UAAU;AAAA,EAC1D,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,GAAE,gVAA+U,GACzV;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f8813cd7d4a9138ff3fc7253bc195b86370ed6cf"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Hb=function(){return a},a}Hb();class M7 extends rr.Component{render(){return Hb().f[0]++,Hb().s[0]++,le.jsx(k0,{viewBox:"0 0 20 20",...this.props,children:le.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 Zb(){var n="/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx",e="35a8c3687dcdeffeb7f2fe2d9c05ced9e802b5ca",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:378}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconCircle.tsx"],names:[],mappings:"AAQQ;AARR,OAAO,WAAW;AAClB,OAAO,cAAc;AAGrB,qBAAqB,mBAAmB,MAAM,UAAU;AAAA,EACtD,SAAS;AACP,WACE,oBAAC,YAAS,SAAQ,aAAa,GAAG,KAAK,OACrC,8BAAC,UAAK,WAAU,kBAAiB,GAAE,6NAA4N,GACjQ;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"35a8c3687dcdeffeb7f2fe2d9c05ced9e802b5ca"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Zb=function(){return a},a}Zb();class AH extends rr.Component{render(){return Zb().f[0]++,Zb().s[0]++,le.jsx(k0,{viewBox:"0 0 20 20",...this.props,children:le.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 ky(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(n)}function cH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"},child:[]}]})(n)}function dH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"},child:[]}]})(n)}function hH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function fH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function pH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"},child:[]}]})(n)}function mH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm-7 6-4 4h3v6h2v-6h3l-4-4z"},child:[]}]})(n)}function gH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(n)}function yH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},child:[]}]})(n)}function vH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},child:[]}]})(n)}function cU(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(n)}function CH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(n)}function C6(n){return eu({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:[]}]})(n)}function _H(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},child:[]}]})(n)}function bH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"},child:[]}]})(n)}function xH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"},child:[]}]})(n)}function S7(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"},child:[]}]})(n)}function wH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"},child:[]}]})(n)}function MH(n){return eu({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:[]}]})(n)}function SH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 10 5 5 5-5z"},child:[]}]})(n)}function EH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m7 14 5-5 5 5z"},child:[]}]})(n)}function BH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(n)}function OH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(n)}function IH(n){return eu({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"2"},child:[]},{tag:"path",attr:{d:"M10 3h4v12h-4z"},child:[]}]})(n)}function Xb(){var n="/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx",e="90c8ed80956547e1dbbdff164a42850c33eed62e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconMissing.tsx"],names:[],mappings:"AAOM;AAPN,OAAO,WAAW;AAClB,SAAQ,sBAAqB;AAG7B,qBAAqB,oBAAoB,MAAM,UAAU;AAAA,EACvD,SAAS;AACP,WACE,oBAAC,kBAAgB,GAAG,KAAK,OAAO;AAAA,EAEpC;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"90c8ed80956547e1dbbdff164a42850c33eed62e"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Xb=function(){return a},a}Xb();class kH extends rr.Component{render(){return Xb().f[0]++,Xb().s[0]++,le.jsx(IH,{...this.props})}}function Kl(){var n="/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",e="89bd7eb08374d10a1476c7cf1e0e39f530ce1ff1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx",statementMap:{0:{start:{line:11,column:22},end:{line:11,column:49}},1:{start:{line:12,column:4},end:{line:33,column:5}},2:{start:{line:14,column:8},end:{line:14,column:69}},3:{start:{line:16,column:8},end:{line:16,column:63}},4:{start:{line:18,column:8},end:{line:18,column:63}},5:{start:{line:20,column:8},end:{line:20,column:63}},6:{start:{line:22,column:8},end:{line:22,column:63}},7:{start:{line:24,column:8},end:{line:24,column:69}},8:{start:{line:26,column:8},end:{line:26,column:63}},9:{start:{line:28,column:8},end:{line:28,column:65}},10:{start:{line:30,column:8},end:{line:30,column:65}},11:{start:{line:32,column:8},end:{line:32,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:34,column:3}},line:10}},branchMap:{0:{loc:{start:{line:12,column:4},end:{line:33,column:5}},type:"switch",locations:[{start:{line:13,column:6},end:{line:14,column:69}},{start:{line:15,column:6},end:{line:16,column:63}},{start:{line:17,column:6},end:{line:18,column:63}},{start:{line:19,column:6},end:{line:20,column:63}},{start:{line:21,column:6},end:{line:22,column:63}},{start:{line:23,column:6},end:{line:24,column:69}},{start:{line:25,column:6},end:{line:26,column:63}},{start:{line:27,column:6},end:{line:28,column:65}},{start:{line:29,column:6},end:{line:30,column:65}},{start:{line:31,column:6},end:{line:32,column:66}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0},b:{0:[0,0,0,0,0,0,0,0,0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/IconLayer.tsx"],names:[],mappings:"AAmBkC;AAnBlC,OAAO,WAAW;AAElB,OAAO,cAAc;AACrB,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AAQxB,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY,EAAE,OAAO,KAAK,MAAM,MAAM;AAC5C,YAAO,KAAK,MAAM,MAAM;AAAA,MACxB,KAAK;AAAkB,eAAO,oBAAC,kBAAgB,GAAG,WAAW;AAAA,MAC7D,KAAK;AAAU,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC/C,KAAK;AAAa,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAClD,KAAK;AAAW,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAChD,KAAK;AAAQ,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC7C,KAAK;AAAc,eAAO,oBAAC,kBAAgB,GAAG,WAAW;AAAA,MACzD,KAAK;AAAQ,eAAO,oBAAC,YAAU,GAAG,WAAW;AAAA,MAC7C,KAAK;AAAU,eAAO,oBAAC,cAAY,GAAG,WAAW;AAAA,MACjD,KAAK;AAAU,eAAO,oBAAC,cAAY,GAAG,WAAW;AAAA,MACjD;AAAS,eAAO,oBAAC,eAAa,GAAG,WAAW;AAAA,IAC5C;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"89bd7eb08374d10a1476c7cf1e0e39f530ce1ff1"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Kl=function(){return a},a}Kl();class dU extends rr.Component{render(){Kl().f[0]++;const e=(Kl().s[0]++,{style:this.props.style});switch(Kl().s[1]++,this.props.type){case"fill-extrusion":return Kl().b[0][0]++,Kl().s[2]++,le.jsx(M7,{...e});case"raster":return Kl().b[0][1]++,Kl().s[3]++,le.jsx(L_,{...e});case"hillshade":return Kl().b[0][2]++,Kl().s[4]++,le.jsx(L_,{...e});case"heatmap":return Kl().b[0][3]++,Kl().s[5]++,le.jsx(L_,{...e});case"fill":return Kl().b[0][4]++,Kl().s[6]++,le.jsx(L_,{...e});case"background":return Kl().b[0][5]++,Kl().s[7]++,le.jsx(M7,{...e});case"line":return Kl().b[0][6]++,Kl().s[8]++,le.jsx(lH,{...e});case"symbol":return Kl().b[0][7]++,Kl().s[9]++,le.jsx(uH,{...e});case"circle":return Kl().b[0][8]++,Kl().s[10]++,le.jsx(AH,{...e});default:return Kl().b[0][9]++,Kl().s[11]++,le.jsx(kH,{...e})}}}function ti(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",e="ea1e9940e142b9a2a1c672f6983f6f5748c841e6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:20}},1:{start:{line:6,column:27},end:{line:6,column:29}},2:{start:{line:7,column:2},end:{line:18,column:5}},3:{start:{line:8,column:22},end:{line:8,column:51}},4:{start:{line:9,column:4},end:{line:17,column:5}},5:{start:{line:10,column:6},end:{line:10,column:43}},6:{start:{line:11,column:28},end:{line:11,column:91}},7:{start:{line:11,column:59},end:{line:11,column:90}},8:{start:{line:12,column:6},end:{line:12,column:65}},9:{start:{line:14,column:6},end:{line:14,column:52}},10:{start:{line:15,column:6},end:{line:15,column:39}},11:{start:{line:16,column:6},end:{line:16,column:45}},12:{start:{line:19,column:2},end:{line:19,column:17}},13:{start:{line:23,column:4},end:{line:25,column:5}},14:{start:{line:24,column:6},end:{line:24,column:13}},15:{start:{line:26,column:4},end:{line:44,column:5}},16:{start:{line:27,column:25},end:{line:27,column:44}},17:{start:{line:28,column:6},end:{line:30,column:7}},18:{start:{line:29,column:8},end:{line:29,column:48}},19:{start:{line:31,column:6},end:{line:33,column:7}},20:{start:{line:32,column:8},end:{line:32,column:48}},21:{start:{line:34,column:6},end:{line:36,column:7}},22:{start:{line:35,column:8},end:{line:35,column:48}},23:{start:{line:37,column:6},end:{line:39,column:7}},24:{start:{line:38,column:8},end:{line:38,column:58}},25:{start:{line:40,column:6},end:{line:40,column:21}},26:{start:{line:42,column:6},end:{line:42,column:63}},27:{start:{line:43,column:6},end:{line:43,column:21}},28:{start:{line:47,column:20},end:{line:47,column:67}},29:{start:{line:48,column:18},end:{line:93,column:6}},30:{start:{line:49,column:21},end:{line:88,column:8}},31:{start:{line:50,column:29},end:{line:50,column:76}},32:{start:{line:51,column:8},end:{line:87,column:10}},33:{start:{line:68,column:20},end:{line:68,column:63}},34:{start:{line:89,column:6},end:{line:92,column:26}},35:{start:{line:94,column:4},end:{line:94,column:102}}},fnMap:{0:{name:"groupFeaturesBySourceLayer",decl:{start:{line:4,column:9},end:{line:4,column:35}},loc:{start:{line:4,column:46},end:{line:20,column:1}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:32},end:{line:18,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:11,column:52},end:{line:11,column:53}},loc:{start:{line:11,column:59},end:{line:11,column:90}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:35},end:{line:45,column:3}},line:22},4:{name:"(anonymous_4)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:11},end:{line:95,column:3}},line:46},5:{name:"(anonymous_5)",decl:{start:{line:48,column:43},end:{line:48,column:44}},loc:{start:{line:48,column:62},end:{line:93,column:5}},line:48},6:{name:"(anonymous_6)",decl:{start:{line:49,column:48},end:{line:49,column:49}},loc:{start:{line:49,column:66},end:{line:88,column:7}},line:49},7:{name:"(anonymous_7)",decl:{start:{line:67,column:27},end:{line:67,column:28}},loc:{start:{line:67,column:33},end:{line:69,column:19}},line:67}},branchMap:{0:{loc:{start:{line:9,column:4},end:{line:17,column:5}},type:"if",locations:[{start:{line:9,column:4},end:{line:17,column:5}},{start:{line:13,column:11},end:{line:17,column:5}}],line:9},1:{loc:{start:{line:14,column:27},end:{line:14,column:51}},type:"binary-expr",locations:[{start:{line:14,column:27},end:{line:14,column:45}},{start:{line:14,column:49},end:{line:14,column:51}}],line:14},2:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},3:{loc:{start:{line:28,column:6},end:{line:30,column:7}},type:"if",locations:[{start:{line:28,column:6},end:{line:30,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:28},4:{loc:{start:{line:28,column:10},end:{line:28,column:64}},type:"binary-expr",locations:[{start:{line:28,column:10},end:{line:28,column:36}},{start:{line:28,column:40},end:{line:28,column:64}}],line:28},5:{loc:{start:{line:31,column:6},end:{line:33,column:7}},type:"if",locations:[{start:{line:31,column:6},end:{line:33,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31},6:{loc:{start:{line:31,column:10},end:{line:31,column:64}},type:"binary-expr",locations:[{start:{line:31,column:10},end:{line:31,column:36}},{start:{line:31,column:40},end:{line:31,column:64}}],line:31},7:{loc:{start:{line:34,column:6},end:{line:36,column:7}},type:"if",locations:[{start:{line:34,column:6},end:{line:36,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:34},8:{loc:{start:{line:34,column:10},end:{line:34,column:64}},type:"binary-expr",locations:[{start:{line:34,column:10},end:{line:34,column:36}},{start:{line:34,column:40},end:{line:34,column:64}}],line:34},9:{loc:{start:{line:37,column:6},end:{line:39,column:7}},type:"if",locations:[{start:{line:37,column:6},end:{line:39,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},10:{loc:{start:{line:37,column:10},end:{line:37,column:84}},type:"binary-expr",locations:[{start:{line:37,column:10},end:{line:37,column:46}},{start:{line:37,column:50},end:{line:37,column:84}}],line:37},11:{loc:{start:{line:71,column:20},end:{line:75,column:24}},type:"binary-expr",locations:[{start:{line:71,column:20},end:{line:71,column:38}},{start:{line:71,column:58},end:{line:75,column:24}}],line:71},12:{loc:{start:{line:77,column:20},end:{line:80,column:24}},type:"binary-expr",locations:[{start:{line:77,column:20},end:{line:77,column:35}},{start:{line:77,column:55},end:{line:80,column:24}}],line:77}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlLayerPopup.tsx"],names:[],mappings:"AA8EU,cAkBsB,YAlBtB;AA9EV,OAAO,WAAW;AAClB,OAAO,eAAe;AAGtB,SAAS,2BAA2B,UAA4B;AAC9D,QAAM,UAA6C,CAAC;AAEpD,QAAM,mBAA4C,CAAC;AAEnD,WAAS,QAAQ,aAAW;AAC1B,UAAM,YAAY,QAAQ,MAAM,cAAc;AAC9C,QAAG,OAAO,UAAU,eAAe,KAAK,kBAAkB,QAAQ,MAAM,EAAE,GAAG;AAC3E,uBAAiB,QAAQ,MAAM,EAAE;AAEjC,YAAM,gBAAgB,QAAQ,SAAS,EAAE,KAAK,CAAC,MAAsB,EAAE,MAAM,OAAO,QAAQ,MAAM,EAAE;AAEpG,oBAAe,UAAU,iBAAiB,QAAQ,MAAM,EAAE;AAAA,IAC5D,OAAO;AACL,cAAQ,SAAS,IAAI,QAAQ,SAAS,KAAK,CAAC;AAC5C,cAAQ,SAAS,EAAE,KAAK,OAAO;AAE/B,uBAAiB,QAAQ,MAAM,EAAE,IAAI;AAAA,IACvC;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAQA,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,iBAAiB,SAAyB,OAAgB;AAExD,QAAI,CAAC,QAAQ,MAAM,OAAO;AACxB;AAAA,IACF;AAEA,QAAI;AACF,YAAM,aAAa,QAAQ,MAAM;AAEjC,UAAG,gBAAgB,cAAc,WAAW,YAAY,GAAG;AACzD,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,gBAAgB,cAAc,WAAW,YAAY,GAAG;AAC1D,eAAO,OAAO,WAAW,YAAY,CAAC;AAAA,MACxC;AACA,UAAI,0BAA0B,cAAc,WAAW,sBAAsB,GAAG;AAC9E,eAAO,OAAO,WAAW,sBAAsB,CAAC;AAAA,MAClD;AAEA,aAAO;AAAA,IACT,SAGO,KAAK;AACV,cAAQ,KAAK,uCAAuC,GAAG;AACvD,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,UAAU,2BAA2B,KAAK,MAAM,QAAQ;AAE9D,UAAM,QAAQ,OAAO,KAAK,OAAO,EAAE,IAAI,mBAAiB;AACtD,YAAM,SAAS,QAAQ,aAAa,EAAE,IAAI,CAAC,SAAyB,QAAgB;AAClF,cAAM,eAAe,KAAK,iBAAiB,SAAS,KAAK,MAAM,IAAI;AAEnE,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,WAAU;AAAA,YAEV;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,OAAO,EAAC,YAAY,aAAY;AAAA;AAAA,cACjC;AAAA,cACD;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM;AACb,yBAAK,MAAM,cAAc,QAAQ,MAAM,EAAE;AAAA,kBAC3C;AAAA,kBAEC;AAAA,4BAAQ,MAAM,QACb,oBAAC,aAAU,MAAM,QAAQ,MAAM,MAAM,OAAO;AAAA,sBAC1C,OAAO;AAAA,sBACP,QAAQ;AAAA,sBACR,cAAc;AAAA,oBAChB,GAAE;AAAA,oBAEH,QAAQ,MAAM;AAAA,oBACd,QAAQ,WAAW,qBAAC,UAAK;AAAA;AAAA,sBAAI,QAAQ;AAAA,uBAAQ;AAAA;AAAA;AAAA,cAChD;AAAA;AAAA;AAAA,UAtBK;AAAA,QAuBP;AAAA,MACF,CAAC;AACD,aAAO,qBAAC,SACN;AAAA,4BAAC,SAAI,WAAU,2BAA2B,yBAAc;AAAA,QACvD;AAAA,WAFc,aAGjB;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,gCACnB,iBACH;AAAA,EACF;AACF;AAGA,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ea1e9940e142b9a2a1c672f6983f6f5748c841e6"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ti=function(){return a},a}ti();function TH(n){ti().f[0]++;const e=(ti().s[0]++,{}),t=(ti().s[1]++,{});return ti().s[2]++,n.forEach(r=>{ti().f[1]++;const i=(ti().s[3]++,r.layer["source-layer"]);if(ti().s[4]++,Object.prototype.hasOwnProperty.call(t,r.layer.id)){ti().b[0][0]++,ti().s[5]++,t[r.layer.id]++;const s=(ti().s[6]++,e[i].find(a=>(ti().f[2]++,ti().s[7]++,a.layer.id===r.layer.id)));ti().s[8]++,s.counter=t[r.layer.id]}else ti().b[0][1]++,ti().s[9]++,e[i]=(ti().b[1][0]++,e[i]||(ti().b[1][1]++,[])),ti().s[10]++,e[i].push(r),ti().s[11]++,t[r.layer.id]=1}),ti().s[12]++,e}class hU extends rr.Component{_getFeatureColor(e,t){if(ti().f[3]++,ti().s[13]++,e.layer.paint)ti().b[2][1]++;else{ti().b[2][0]++,ti().s[14]++;return}ti().s[15]++;try{const r=(ti().s[16]++,e.layer.paint);return ti().s[17]++,ti().b[4][0]++,"text-color"in r&&(ti().b[4][1]++,r["text-color"])?(ti().b[3][0]++,ti().s[18]++,String(r["text-color"])):(ti().b[3][1]++,ti().s[19]++,ti().b[6][0]++,"fill-color"in r&&(ti().b[6][1]++,r["fill-color"])?(ti().b[5][0]++,ti().s[20]++,String(r["fill-color"])):(ti().b[5][1]++,ti().s[21]++,ti().b[8][0]++,"line-color"in r&&(ti().b[8][1]++,r["line-color"])?(ti().b[7][0]++,ti().s[22]++,String(r["line-color"])):(ti().b[7][1]++,ti().s[23]++,ti().b[10][0]++,"fill-extrusion-color"in r&&(ti().b[10][1]++,r["fill-extrusion-color"])?(ti().b[9][0]++,ti().s[24]++,String(r["fill-extrusion-color"])):(ti().b[9][1]++,ti().s[25]++,"black"))))}catch(r){return ti().s[26]++,console.warn("Unable to get feature color, error:",r),ti().s[27]++,"black"}}render(){ti().f[4]++;const e=(ti().s[28]++,TH(this.props.features)),t=(ti().s[29]++,Object.keys(e).map(r=>{ti().f[5]++;const i=(ti().s[30]++,e[r].map((s,a)=>{ti().f[6]++;const o=(ti().s[31]++,this._getFeatureColor(s,this.props.zoom));return ti().s[32]++,le.jsxs("div",{className:"maputnik-popup-layer",children:[le.jsx("div",{className:"maputnik-popup-layer__swatch",style:{background:o}}),le.jsxs("label",{className:"maputnik-popup-layer__label",onClick:()=>{ti().f[7]++,ti().s[33]++,this.props.onLayerSelect(s.layer.id)},children:[(ti().b[11][0]++,s.layer.type&&(ti().b[11][1]++,le.jsx(dU,{type:s.layer.type,style:{width:14,height:14,paddingRight:3}}))),s.layer.id,(ti().b[12][0]++,s.counter&&(ti().b[12][1]++,le.jsxs("span",{children:[" × ",s.counter]})))]})]},a)}));return ti().s[34]++,le.jsxs("div",{children:[le.jsx("div",{className:"maputnik-popup-layer-id",children:r}),i]},r)}));return ti().s[35]++,le.jsx("div",{className:"maputnik-feature-layer-popup",children:t})}}function Yi(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGlFeaturePropertyPopup.tsx",e="72aafaa905031d9408c36c83b71947160ac6dbad",t=globalThis,r="__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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Yi=function(){return a},a}Yi();function E7(n){return Yi().f[0]++,Yi().s[0]++,Yi().b[1][0]++,typeof n>"u"||(Yi().b[1][1]++,n===null)?(Yi().b[0][0]++,Yi().s[1]++,n):(Yi().b[0][1]++,Yi().s[2]++,n instanceof Date?(Yi().b[2][0]++,Yi().s[3]++,n.toLocaleString()):(Yi().b[2][1]++,Yi().s[4]++,Yi().b[4][0]++,typeof n=="object"||(Yi().b[4][1]++,typeof n=="number")||(Yi().b[4][2]++,typeof n=="string")?(Yi().b[3][0]++,Yi().s[5]++,n.toString()):(Yi().b[3][1]++,Yi().s[6]++,n)))}function i4(n,e){return Yi().f[1]++,Yi().s[7]++,le.jsxs("tr",{children:[le.jsx("td",{className:"maputnik-popup-table-cell",children:n}),le.jsx("td",{className:"maputnik-popup-table-cell",children:e})]},n)}function PH(n,e){return Yi().f[2]++,Yi().s[8]++,le.jsxs(rr.Fragment,{children:[le.jsx("tr",{children:le.jsxs("td",{colSpan:2,className:"maputnik-popup-layer-id",children:[n.layer.source,": ",n.layer["source-layer"],(Yi().b[5][0]++,n.inspectModeCounter&&(Yi().b[5][1]++,le.jsxs("span",{children:[" × ",n.inspectModeCounter]})))]})}),i4("$type",n.geometry.type),i4("$id",E7(n.id)),Object.keys(n.properties).map(t=>{Yi().f[3]++;const r=(Yi().s[9]++,n.properties[t]);return Yi().s[10]++,i4(t,E7(r))})]},e)}function RH(n){Yi().f[4]++;const e=(Yi().s[11]++,[]);return Yi().s[12]++,n.forEach(t=>{Yi().f[5]++;const r=(Yi().s[13]++,e.findIndex(i=>(Yi().f[6]++,Yi().s[14]++,Yi().b[6][0]++,t.layer["source-layer"]===i.layer["source-layer"]&&(Yi().b[6][1]++,JSON.stringify(t.properties)===JSON.stringify(i.properties)))));Yi().s[15]++,r===-1?(Yi().b[7][0]++,Yi().s[16]++,e.push(t)):(Yi().b[7][1]++,Yi().s[17]++,"inspectModeCounter"in e[r]?(Yi().b[8][0]++,Yi().s[18]++,e[r].inspectModeCounter++):(Yi().b[8][1]++,Yi().s[19]++,e[r].inspectModeCounter=2))}),Yi().s[20]++,e}class DH extends rr.Component{render(){Yi().f[7]++;const e=(Yi().s[21]++,RH(this.props.features));return Yi().s[22]++,le.jsx("div",{className:"maputnik-feature-property-popup",children:le.jsx("table",{className:"maputnik-popup-table",children:le.jsx("tbody",{children:e.map(PH)})})})}}var o4={exports:{}},s4,B7;function fU(){return B7||(B7=1,s4={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]}),s4}var a4={exports:{}},l4,O7;function KH(){return O7||(O7=1,l4=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),l4}var I7;function FH(){if(I7)return a4.exports;I7=1;var n=KH(),e=Array.prototype.concat,t=Array.prototype.slice,r=a4.exports=function(s){for(var a=[],o=0,d=s.length;o<d;o++){var g=s[o];n(g)?a=e.call(a,t.call(g)):a.push(g)}return a};return r.wrap=function(i){return function(){return i(r(arguments))}},a4.exports}var k7;function LH(){if(k7)return o4.exports;k7=1;var n=fU(),e=FH(),t=Object.hasOwnProperty,r=Object.create(null);for(var i in n)t.call(n,i)&&(r[n[i]]=i);var s=o4.exports={to:{},get:{}};s.get=function(d){var g=d.substring(0,3).toLowerCase(),b,E;switch(g){case"hsl":b=s.get.hsl(d),E="hsl";break;case"hwb":b=s.get.hwb(d),E="hwb";break;default:b=s.get.rgb(d),E="rgb";break}return b?{model:E,value:b}:null},s.get.rgb=function(d){if(!d)return null;var g=/^#([a-f0-9]{3,4})$/i,b=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,E=/^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*)?\)$/,O=/^(\w+)$/,k=[0,0,0,1],U,z,q;if(U=d.match(b)){for(q=U[2],U=U[1],z=0;z<3;z++){var Q=z*2;k[z]=parseInt(U.slice(Q,Q+2),16)}q&&(k[3]=parseInt(q,16)/255)}else if(U=d.match(g)){for(U=U[1],q=U[3],z=0;z<3;z++)k[z]=parseInt(U[z]+U[z],16);q&&(k[3]=parseInt(q+q,16)/255)}else if(U=d.match(E)){for(z=0;z<3;z++)k[z]=parseInt(U[z+1],0);U[4]&&(U[5]?k[3]=parseFloat(U[4])*.01:k[3]=parseFloat(U[4]))}else if(U=d.match(S)){for(z=0;z<3;z++)k[z]=Math.round(parseFloat(U[z+1])*2.55);U[4]&&(U[5]?k[3]=parseFloat(U[4])*.01:k[3]=parseFloat(U[4]))}else return(U=d.match(O))?U[1]==="transparent"?[0,0,0,0]:t.call(n,U[1])?(k=n[U[1]],k[3]=1,k):null:null;for(z=0;z<3;z++)k[z]=a(k[z],0,255);return k[3]=a(k[3],0,1),k},s.get.hsl=function(d){if(!d)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=d.match(g);if(b){var E=parseFloat(b[4]),S=(parseFloat(b[1])%360+360)%360,O=a(parseFloat(b[2]),0,100),k=a(parseFloat(b[3]),0,100),U=a(isNaN(E)?1:E,0,1);return[S,O,k,U]}return null},s.get.hwb=function(d){if(!d)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=d.match(g);if(b){var E=parseFloat(b[4]),S=(parseFloat(b[1])%360+360)%360,O=a(parseFloat(b[2]),0,100),k=a(parseFloat(b[3]),0,100),U=a(isNaN(E)?1:E,0,1);return[S,O,k,U]}return null},s.to.hex=function(){var d=e(arguments);return"#"+o(d[0])+o(d[1])+o(d[2])+(d[3]<1?o(Math.round(d[3]*255)):"")},s.to.rgb=function(){var d=e(arguments);return d.length<4||d[3]===1?"rgb("+Math.round(d[0])+", "+Math.round(d[1])+", "+Math.round(d[2])+")":"rgba("+Math.round(d[0])+", "+Math.round(d[1])+", "+Math.round(d[2])+", "+d[3]+")"},s.to.rgb.percent=function(){var d=e(arguments),g=Math.round(d[0]/255*100),b=Math.round(d[1]/255*100),E=Math.round(d[2]/255*100);return d.length<4||d[3]===1?"rgb("+g+"%, "+b+"%, "+E+"%)":"rgba("+g+"%, "+b+"%, "+E+"%, "+d[3]+")"},s.to.hsl=function(){var d=e(arguments);return d.length<4||d[3]===1?"hsl("+d[0]+", "+d[1]+"%, "+d[2]+"%)":"hsla("+d[0]+", "+d[1]+"%, "+d[2]+"%, "+d[3]+")"},s.to.hwb=function(){var d=e(arguments),g="";return d.length>=4&&d[3]!==1&&(g=", "+d[3]),"hwb("+d[0]+", "+d[1]+"%, "+d[2]+"%"+g+")"},s.to.keyword=function(d){return r[d.slice(0,3)]};function a(d,g,b){return Math.min(Math.max(g,d),b)}function o(d){var g=Math.round(d).toString(16).toUpperCase();return g.length<2?"0"+g:g}return o4.exports}var u4,T7;function pU(){if(T7)return u4;T7=1;const n=fU(),e={};for(const i of Object.keys(n))e[n[i]]=i;const t={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"]}};u4=t;for(const i of Object.keys(t)){if(!("channels"in t[i]))throw new Error("missing channels property: "+i);if(!("labels"in t[i]))throw new Error("missing channel labels property: "+i);if(t[i].labels.length!==t[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:s,labels:a}=t[i];delete t[i].channels,delete t[i].labels,Object.defineProperty(t[i],"channels",{value:s}),Object.defineProperty(t[i],"labels",{value:a})}t.rgb.hsl=function(i){const s=i[0]/255,a=i[1]/255,o=i[2]/255,d=Math.min(s,a,o),g=Math.max(s,a,o),b=g-d;let E,S;g===d?E=0:s===g?E=(a-o)/b:a===g?E=2+(o-s)/b:o===g&&(E=4+(s-a)/b),E=Math.min(E*60,360),E<0&&(E+=360);const O=(d+g)/2;return g===d?S=0:O<=.5?S=b/(g+d):S=b/(2-g-d),[E,S*100,O*100]},t.rgb.hsv=function(i){let s,a,o,d,g;const b=i[0]/255,E=i[1]/255,S=i[2]/255,O=Math.max(b,E,S),k=O-Math.min(b,E,S),U=function(z){return(O-z)/6/k+1/2};return k===0?(d=0,g=0):(g=k/O,s=U(b),a=U(E),o=U(S),b===O?d=o-a:E===O?d=1/3+s-o:S===O&&(d=2/3+a-s),d<0?d+=1:d>1&&(d-=1)),[d*360,g*100,O*100]},t.rgb.hwb=function(i){const s=i[0],a=i[1];let o=i[2];const d=t.rgb.hsl(i)[0],g=1/255*Math.min(s,Math.min(a,o));return o=1-1/255*Math.max(s,Math.max(a,o)),[d,g*100,o*100]},t.rgb.cmyk=function(i){const s=i[0]/255,a=i[1]/255,o=i[2]/255,d=Math.min(1-s,1-a,1-o),g=(1-s-d)/(1-d)||0,b=(1-a-d)/(1-d)||0,E=(1-o-d)/(1-d)||0;return[g*100,b*100,E*100,d*100]};function r(i,s){return(i[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2}return t.rgb.keyword=function(i){const s=e[i];if(s)return s;let a=1/0,o;for(const d of Object.keys(n)){const g=n[d],b=r(i,g);b<a&&(a=b,o=d)}return o},t.keyword.rgb=function(i){return n[i]},t.rgb.xyz=function(i){let s=i[0]/255,a=i[1]/255,o=i[2]/255;s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;const d=s*.4124+a*.3576+o*.1805,g=s*.2126+a*.7152+o*.0722,b=s*.0193+a*.1192+o*.9505;return[d*100,g*100,b*100]},t.rgb.lab=function(i){const s=t.rgb.xyz(i);let a=s[0],o=s[1],d=s[2];a/=95.047,o/=100,d/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,d=d>.008856?d**(1/3):7.787*d+16/116;const g=116*o-16,b=500*(a-o),E=200*(o-d);return[g,b,E]},t.hsl.rgb=function(i){const s=i[0]/360,a=i[1]/100,o=i[2]/100;let d,g,b;if(a===0)return b=o*255,[b,b,b];o<.5?d=o*(1+a):d=o+a-o*a;const E=2*o-d,S=[0,0,0];for(let O=0;O<3;O++)g=s+1/3*-(O-1),g<0&&g++,g>1&&g--,6*g<1?b=E+(d-E)*6*g:2*g<1?b=d:3*g<2?b=E+(d-E)*(2/3-g)*6:b=E,S[O]=b*255;return S},t.hsl.hsv=function(i){const s=i[0];let a=i[1]/100,o=i[2]/100,d=a;const g=Math.max(o,.01);o*=2,a*=o<=1?o:2-o,d*=g<=1?g:2-g;const b=(o+a)/2,E=o===0?2*d/(g+d):2*a/(o+a);return[s,E*100,b*100]},t.hsv.rgb=function(i){const s=i[0]/60,a=i[1]/100;let o=i[2]/100;const d=Math.floor(s)%6,g=s-Math.floor(s),b=255*o*(1-a),E=255*o*(1-a*g),S=255*o*(1-a*(1-g));switch(o*=255,d){case 0:return[o,S,b];case 1:return[E,o,b];case 2:return[b,o,S];case 3:return[b,E,o];case 4:return[S,b,o];case 5:return[o,b,E]}},t.hsv.hsl=function(i){const s=i[0],a=i[1]/100,o=i[2]/100,d=Math.max(o,.01);let g,b;b=(2-a)*o;const E=(2-a)*d;return g=a*d,g/=E<=1?E:2-E,g=g||0,b/=2,[s,g*100,b*100]},t.hwb.rgb=function(i){const s=i[0]/360;let a=i[1]/100,o=i[2]/100;const d=a+o;let g;d>1&&(a/=d,o/=d);const b=Math.floor(6*s),E=1-o;g=6*s-b,b&1&&(g=1-g);const S=a+g*(E-a);let O,k,U;switch(b){default:case 6:case 0:O=E,k=S,U=a;break;case 1:O=S,k=E,U=a;break;case 2:O=a,k=E,U=S;break;case 3:O=a,k=S,U=E;break;case 4:O=S,k=a,U=E;break;case 5:O=E,k=a,U=S;break}return[O*255,k*255,U*255]},t.cmyk.rgb=function(i){const s=i[0]/100,a=i[1]/100,o=i[2]/100,d=i[3]/100,g=1-Math.min(1,s*(1-d)+d),b=1-Math.min(1,a*(1-d)+d),E=1-Math.min(1,o*(1-d)+d);return[g*255,b*255,E*255]},t.xyz.rgb=function(i){const s=i[0]/100,a=i[1]/100,o=i[2]/100;let d,g,b;return d=s*3.2406+a*-1.5372+o*-.4986,g=s*-.9689+a*1.8758+o*.0415,b=s*.0557+a*-.204+o*1.057,d=d>.0031308?1.055*d**(1/2.4)-.055:d*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,d=Math.min(Math.max(0,d),1),g=Math.min(Math.max(0,g),1),b=Math.min(Math.max(0,b),1),[d*255,g*255,b*255]},t.xyz.lab=function(i){let s=i[0],a=i[1],o=i[2];s/=95.047,a/=100,o/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const d=116*a-16,g=500*(s-a),b=200*(a-o);return[d,g,b]},t.lab.xyz=function(i){const s=i[0],a=i[1],o=i[2];let d,g,b;g=(s+16)/116,d=a/500+g,b=g-o/200;const E=g**3,S=d**3,O=b**3;return g=E>.008856?E:(g-16/116)/7.787,d=S>.008856?S:(d-16/116)/7.787,b=O>.008856?O:(b-16/116)/7.787,d*=95.047,g*=100,b*=108.883,[d,g,b]},t.lab.lch=function(i){const s=i[0],a=i[1],o=i[2];let d;d=Math.atan2(o,a)*360/2/Math.PI,d<0&&(d+=360);const b=Math.sqrt(a*a+o*o);return[s,b,d]},t.lch.lab=function(i){const s=i[0],a=i[1],d=i[2]/360*2*Math.PI,g=a*Math.cos(d),b=a*Math.sin(d);return[s,g,b]},t.rgb.ansi16=function(i,s=null){const[a,o,d]=i;let g=s===null?t.rgb.hsv(i)[2]:s;if(g=Math.round(g/50),g===0)return 30;let b=30+(Math.round(d/255)<<2|Math.round(o/255)<<1|Math.round(a/255));return g===2&&(b+=60),b},t.hsv.ansi16=function(i){return t.rgb.ansi16(t.hsv.rgb(i),i[2])},t.rgb.ansi256=function(i){const s=i[0],a=i[1],o=i[2];return s===a&&a===o?s<8?16:s>248?231:Math.round((s-8)/247*24)+232:16+36*Math.round(s/255*5)+6*Math.round(a/255*5)+Math.round(o/255*5)},t.ansi16.rgb=function(i){let s=i%10;if(s===0||s===7)return i>50&&(s+=3.5),s=s/10.5*255,[s,s,s];const a=(~~(i>50)+1)*.5,o=(s&1)*a*255,d=(s>>1&1)*a*255,g=(s>>2&1)*a*255;return[o,d,g]},t.ansi256.rgb=function(i){if(i>=232){const g=(i-232)*10+8;return[g,g,g]}i-=16;let s;const a=Math.floor(i/36)/5*255,o=Math.floor((s=i%36)/6)/5*255,d=s%6/5*255;return[a,o,d]},t.rgb.hex=function(i){const a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},t.hex.rgb=function(i){const s=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];let a=s[0];s[0].length===3&&(a=a.split("").map(E=>E+E).join(""));const o=parseInt(a,16),d=o>>16&255,g=o>>8&255,b=o&255;return[d,g,b]},t.rgb.hcg=function(i){const s=i[0]/255,a=i[1]/255,o=i[2]/255,d=Math.max(Math.max(s,a),o),g=Math.min(Math.min(s,a),o),b=d-g;let E,S;return b<1?E=g/(1-b):E=0,b<=0?S=0:d===s?S=(a-o)/b%6:d===a?S=2+(o-s)/b:S=4+(s-a)/b,S/=6,S%=1,[S*360,b*100,E*100]},t.hsl.hcg=function(i){const s=i[1]/100,a=i[2]/100,o=a<.5?2*s*a:2*s*(1-a);let d=0;return o<1&&(d=(a-.5*o)/(1-o)),[i[0],o*100,d*100]},t.hsv.hcg=function(i){const s=i[1]/100,a=i[2]/100,o=s*a;let d=0;return o<1&&(d=(a-o)/(1-o)),[i[0],o*100,d*100]},t.hcg.rgb=function(i){const s=i[0]/360,a=i[1]/100,o=i[2]/100;if(a===0)return[o*255,o*255,o*255];const d=[0,0,0],g=s%1*6,b=g%1,E=1-b;let S=0;switch(Math.floor(g)){case 0:d[0]=1,d[1]=b,d[2]=0;break;case 1:d[0]=E,d[1]=1,d[2]=0;break;case 2:d[0]=0,d[1]=1,d[2]=b;break;case 3:d[0]=0,d[1]=E,d[2]=1;break;case 4:d[0]=b,d[1]=0,d[2]=1;break;default:d[0]=1,d[1]=0,d[2]=E}return S=(1-a)*o,[(a*d[0]+S)*255,(a*d[1]+S)*255,(a*d[2]+S)*255]},t.hcg.hsv=function(i){const s=i[1]/100,a=i[2]/100,o=s+a*(1-s);let d=0;return o>0&&(d=s/o),[i[0],d*100,o*100]},t.hcg.hsl=function(i){const s=i[1]/100,o=i[2]/100*(1-s)+.5*s;let d=0;return o>0&&o<.5?d=s/(2*o):o>=.5&&o<1&&(d=s/(2*(1-o))),[i[0],d*100,o*100]},t.hcg.hwb=function(i){const s=i[1]/100,a=i[2]/100,o=s+a*(1-s);return[i[0],(o-s)*100,(1-o)*100]},t.hwb.hcg=function(i){const s=i[1]/100,o=1-i[2]/100,d=o-s;let g=0;return d<1&&(g=(o-d)/(1-d)),[i[0],d*100,g*100]},t.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},t.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},t.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},t.gray.hsl=function(i){return[0,0,i[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(i){return[0,100,i[0]]},t.gray.cmyk=function(i){return[0,0,0,i[0]]},t.gray.lab=function(i){return[i[0],0,0]},t.gray.hex=function(i){const s=Math.round(i[0]/100*255)&255,o=((s<<16)+(s<<8)+s).toString(16).toUpperCase();return"000000".substring(o.length)+o},t.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},u4}var A4,P7;function UH(){if(P7)return A4;P7=1;const n=pU();function e(){const s={},a=Object.keys(n);for(let o=a.length,d=0;d<o;d++)s[a[d]]={distance:-1,parent:null};return s}function t(s){const a=e(),o=[s];for(a[s].distance=0;o.length;){const d=o.pop(),g=Object.keys(n[d]);for(let b=g.length,E=0;E<b;E++){const S=g[E],O=a[S];O.distance===-1&&(O.distance=a[d].distance+1,O.parent=d,o.unshift(S))}}return a}function r(s,a){return function(o){return a(s(o))}}function i(s,a){const o=[a[s].parent,s];let d=n[a[s].parent][s],g=a[s].parent;for(;a[g].parent;)o.unshift(a[g].parent),d=r(n[a[g].parent][g],d),g=a[g].parent;return d.conversion=o,d}return A4=function(s){const a=t(s),o={},d=Object.keys(a);for(let g=d.length,b=0;b<g;b++){const E=d[b];a[E].parent!==null&&(o[E]=i(E,a))}return o},A4}var c4,R7;function zH(){if(R7)return c4;R7=1;const n=pU(),e=UH(),t={},r=Object.keys(n);function i(a){const o=function(...d){const g=d[0];return g==null?g:(g.length>1&&(d=g),a(d))};return"conversion"in a&&(o.conversion=a.conversion),o}function s(a){const o=function(...d){const g=d[0];if(g==null)return g;g.length>1&&(d=g);const b=a(d);if(typeof b=="object")for(let E=b.length,S=0;S<E;S++)b[S]=Math.round(b[S]);return b};return"conversion"in a&&(o.conversion=a.conversion),o}return r.forEach(a=>{t[a]={},Object.defineProperty(t[a],"channels",{value:n[a].channels}),Object.defineProperty(t[a],"labels",{value:n[a].labels});const o=e(a);Object.keys(o).forEach(g=>{const b=o[g];t[a][g]=s(b),t[a][g].raw=i(b)})}),c4=t,c4}var d4,D7;function jH(){if(D7)return d4;D7=1;const n=LH(),e=zH(),t=["keyword","gray","hex"],r={};for(const S of Object.keys(e))r[[...e[S].labels].sort().join("")]=S;const i={};function s(S,O){if(!(this instanceof s))return new s(S,O);if(O&&O in t&&(O=null),O&&!(O in e))throw new Error("Unknown model: "+O);let k,U;if(S==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(S instanceof s)this.model=S.model,this.color=[...S.color],this.valpha=S.valpha;else if(typeof S=="string"){const z=n.get(S);if(z===null)throw new Error("Unable to parse color from string: "+S);this.model=z.model,U=e[this.model].channels,this.color=z.value.slice(0,U),this.valpha=typeof z.value[U]=="number"?z.value[U]:1}else if(S.length>0){this.model=O||"rgb",U=e[this.model].channels;const z=Array.prototype.slice.call(S,0,U);this.color=E(z,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 z=Object.keys(S);"alpha"in S&&(z.splice(z.indexOf("alpha"),1),this.valpha=typeof S.alpha=="number"?S.alpha:0);const q=z.sort().join("");if(!(q in r))throw new Error("Unable to parse color from object: "+JSON.stringify(S));this.model=r[q];const{labels:Q}=e[this.model],re=[];for(k=0;k<Q.length;k++)re.push(S[Q[k]]);this.color=E(re)}if(i[this.model])for(U=e[this.model].channels,k=0;k<U;k++){const z=i[this.model][k];z&&(this.color[k]=z(this.color[k]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}s.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(S){let O=this.model in n.to?this:this.rgb();O=O.round(typeof S=="number"?S:1);const k=O.valpha===1?O.color:[...O.color,this.valpha];return n.to[O.model](k)},percentString(S){const O=this.rgb().round(typeof S=="number"?S:1),k=O.valpha===1?O.color:[...O.color,this.valpha];return n.to.rgb.percent(k)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const S={},{channels:O}=e[this.model],{labels:k}=e[this.model];for(let U=0;U<O;U++)S[k[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 s([...this.color.map(o(S)),this.valpha],this.model)},alpha(S){return S!==void 0?new s([...this.color,Math.max(0,Math.min(1,S))],this.model):this.valpha},red:d("rgb",0,g(255)),green:d("rgb",1,g(255)),blue:d("rgb",2,g(255)),hue:d(["hsl","hsv","hsl","hwb","hcg"],0,S=>(S%360+360)%360),saturationl:d("hsl",1,g(100)),lightness:d("hsl",2,g(100)),saturationv:d("hsv",1,g(100)),value:d("hsv",2,g(100)),chroma:d("hcg",1,g(100)),gray:d("hcg",2,g(100)),white:d("hwb",1,g(100)),wblack:d("hwb",2,g(100)),cyan:d("cmyk",0,g(100)),magenta:d("cmyk",1,g(100)),yellow:d("cmyk",2,g(100)),black:d("cmyk",3,g(100)),x:d("xyz",0,g(95.047)),y:d("xyz",1,g(100)),z:d("xyz",2,g(108.833)),l:d("lab",0,g(100)),a:d("lab",1),b:d("lab",2),keyword(S){return S!==void 0?new s(S):e[this.model].keyword(this.color)},hex(S){return S!==void 0?new s(S):n.to.hex(this.rgb().round().color)},hexa(S){if(S!==void 0)return new s(S);const O=this.rgb().round().color;let k=Math.round(this.valpha*255).toString(16).toUpperCase();return k.length===1&&(k="0"+k),n.to.hex(O)+k},rgbNumber(){const S=this.rgb().color;return(S[0]&255)<<16|(S[1]&255)<<8|S[2]&255},luminosity(){const S=this.rgb().color,O=[];for(const[k,U]of S.entries()){const z=U/255;O[k]=z<=.04045?z/12.92:((z+.055)/1.055)**2.4}return .2126*O[0]+.7152*O[1]+.0722*O[2]},contrast(S){const O=this.luminosity(),k=S.luminosity();return O>k?(O+.05)/(k+.05):(k+.05)/(O+.05)},level(S){const O=this.contrast(S);return O>=7?"AAA":O>=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 O=0;O<3;O++)S.color[O]=255-S.color[O];return S},lighten(S){const O=this.hsl();return O.color[2]+=O.color[2]*S,O},darken(S){const O=this.hsl();return O.color[2]-=O.color[2]*S,O},saturate(S){const O=this.hsl();return O.color[1]+=O.color[1]*S,O},desaturate(S){const O=this.hsl();return O.color[1]-=O.color[1]*S,O},whiten(S){const O=this.hwb();return O.color[1]+=O.color[1]*S,O},blacken(S){const O=this.hwb();return O.color[2]+=O.color[2]*S,O},grayscale(){const S=this.rgb().color,O=S[0]*.3+S[1]*.59+S[2]*.11;return s.rgb(O,O,O)},fade(S){return this.alpha(this.valpha-this.valpha*S)},opaquer(S){return this.alpha(this.valpha+this.valpha*S)},rotate(S){const O=this.hsl();let k=O.color[0];return k=(k+S)%360,k=k<0?360+k:k,O.color[0]=k,O},mix(S,O){if(!S||!S.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof S);const k=S.rgb(),U=this.rgb(),z=O===void 0?.5:O,q=2*z-1,Q=k.alpha()-U.alpha(),re=((q*Q===-1?q:(q+Q)/(1+q*Q))+1)/2,X=1-re;return s.rgb(re*k.red()+X*U.red(),re*k.green()+X*U.green(),re*k.blue()+X*U.blue(),k.alpha()*z+U.alpha()*(1-z))}};for(const S of Object.keys(e)){if(t.includes(S))continue;const{channels:O}=e[S];s.prototype[S]=function(...k){return this.model===S?new s(this):k.length>0?new s(k,S):new s([...b(e[this.model][S].raw(this.color)),this.valpha],S)},s[S]=function(...k){let U=k[0];return typeof U=="number"&&(U=E(k,O)),new s(U,S)}}function a(S,O){return Number(S.toFixed(O))}function o(S){return function(O){return a(O,S)}}function d(S,O,k){S=Array.isArray(S)?S:[S];for(const U of S)(i[U]||(i[U]=[]))[O]=k;return S=S[0],function(U){let z;return U!==void 0?(k&&(U=k(U)),z=this[S](),z.color[O]=U,z):(z=this[S]().color[O],k&&(z=k(z)),z)}}function g(S){return function(O){return Math.max(0,Math.min(S,O))}}function b(S){return Array.isArray(S)?S:[S]}function E(S,O){for(let k=0;k<O;k++)typeof S[k]!="number"&&(S[k]=0);return S}return d4=s,d4}var NH=jH();const _6=Ha(NH);function ea(){var n="/home/runner/work/maputnik/maputnik/src/libs/zoomcontrol.ts",e="9dd3eea5f46b0cc48ff3173a7af02bc32aa63f10",t=globalThis,r="__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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ea=function(){return a},a}ea();class WH{constructor(){kn(this,"_map",(ea().s[0]++,void 0));kn(this,"_container",(ea().s[1]++,void 0));kn(this,"_textEl",(ea().s[2]++,null));ea().f[0]++}onAdd(e){return ea().f[1]++,ea().s[3]++,this._map=e,ea().s[4]++,this._container=document.createElement("div"),ea().s[5]++,this._container.className="maplibregl-ctrl maplibregl-ctrl-group maplibregl-ctrl-zoom",ea().s[6]++,this._container.setAttribute("data-wd-key","maplibre:ctrl-zoom"),ea().s[7]++,this.setLabel("Zoom:"),ea().s[8]++,this.addEventListeners(),ea().s[9]++,this._container}updateZoomLevel(){ea().f[2]++,ea().s[10]++,this._textEl.innerHTML=this._map.getZoom().toFixed(2)}setLabel(e){ea().f[3]++,ea().s[11]++,this._container.innerHTML=`
|
||
${e} <span></span>
|
||
`,ea().s[12]++,this._textEl=this._container.querySelector("span"),ea().s[13]++,this.updateZoomLevel()}addEventListeners(){ea().f[4]++,ea().s[14]++,this._map.on("render",()=>(ea().f[5]++,ea().s[15]++,this.updateZoomLevel())),ea().s[16]++,this._map.on("zoomIn",()=>(ea().f[6]++,ea().s[17]++,this.updateZoomLevel())),ea().s[18]++,this._map.on("zoomOut",()=>(ea().f[7]++,ea().s[19]++,this.updateZoomLevel()))}onRemove(){ea().f[8]++,ea().s[20]++,this._container.parentNode.removeChild(this._container),ea().s[21]++,this._map=void 0}}function b6(n,e,t){const r={id:[e,t,"circle"].join("_"),source:e,type:"circle",paint:{"circle-color":n,"circle-radius":2},filter:["==","$type","Point"]};return t&&(r["source-layer"]=t),r}function x6(n,e,t,r){const i={id:[t,r,"polygon"].join("_"),source:t,type:"fill",paint:{"fill-color":n,"fill-antialias":!0,"fill-outline-color":n},filter:["==","$type","Polygon"]};return r&&(i["source-layer"]=r),i}function w6(n,e,t){const r={id:[e,t,"line"].join("_"),source:e,layout:{"line-join":"round","line-cap":"round"},type:"line",paint:{"line-color":n},filter:["==","$type","LineString"]};return t&&(r["source-layer"]=t),r}function GH(n,e){const t=[],r=[],i=[];function s(a){return{circle:e(a,.8),line:e(a,.6),polygon:e(a,.3),polygonOutline:e(a,.6),default:e(a,1)}}return Object.keys(n).forEach(a=>{const o=n[a];if(!o||o.length===0){const d=s(a);r.push(b6(d.circle,a)),i.push(w6(d.line,a)),t.push(x6(d.polygon,d.polygonOutline,a))}else o.forEach(d=>{const g=s(d);r.push(b6(g.circle,a,d)),i.push(w6(g.line,a,d)),t.push(x6(g.polygon,g.polygonOutline,a,d))})}),t.concat(i).concat(r)}function QH(n,e,t){t=Object.assign({backgroundColor:"#fff"},t);const r={id:"background",type:"background",paint:{"background-color":t.backgroundColor}},i={};return Object.keys(n.sources).forEach(s=>{const a=n.sources[s];(a.type==="vector"||a.type==="geojson")&&(i[s]=a)}),Object.assign(n,{layers:[r].concat(e),sources:i})}const h4={polygonLayer:x6,lineLayer:w6,circleLayer:b6,generateInspectStyle:QH,generateColoredLayers:GH};function mo(){var n="/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",e="aec0f701e803624fae461cc89b5fc887ff556587",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/highlight.ts",statementMap:{0:{start:{line:4,column:2},end:{line:8,column:3}},1:{start:{line:5,column:4},end:{line:5,column:33}},2:{start:{line:6,column:9},end:{line:8,column:3}},3:{start:{line:7,column:4},end:{line:7,column:30}},4:{start:{line:9,column:2},end:{line:13,column:3}},5:{start:{line:10,column:4},end:{line:10,column:28}},6:{start:{line:12,column:4},end:{line:12,column:23}},7:{start:{line:14,column:2},end:{line:14,column:29}},8:{start:{line:15,column:2},end:{line:15,column:11}},9:{start:{line:18,column:2},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return mo=function(){return a},a}mo();function f4(n,e){return mo().f[0]++,mo().s[0]++,n.type==="circle"?(mo().b[0][0]++,mo().s[1]++,n.paint["circle-radius"]=3):(mo().b[0][1]++,mo().s[2]++,n.type==="line"?(mo().b[1][0]++,mo().s[3]++,n.paint["line-width"]=2):mo().b[1][1]++),mo().s[4]++,"filter"in e?(mo().b[2][0]++,mo().s[5]++,n.filter=e.filter):(mo().b[2][1]++,mo().s[6]++,delete n.filter),mo().s[7]++,n.id=n.id+"_highlight",mo().s[8]++,n}function qH(n){if(mo().f[1]++,mo().s[9]++,mo().b[4][0]++,!n||(mo().b[4][1]++,n.type==="background")||(mo().b[4][2]++,n.type==="raster"))return mo().b[3][0]++,mo().s[10]++,null;mo().b[3][1]++;const e=(mo().s[11]++,mo().b[5][0]++,n["source-layer"]||(mo().b[5][1]++,"")),t=(mo().s[12]++,AU.brightColor(e,1));return mo().s[13]++,mo().b[7][0]++,n.type==="fill"||(mo().b[7][1]++,n.type==="fill-extrusion")?(mo().b[6][0]++,mo().s[14]++,f4(h4.polygonLayer(t,t,n.source,n["source-layer"]),n)):(mo().b[6][1]++,mo().s[15]++,mo().b[9][0]++,n.type==="symbol"||(mo().b[9][1]++,n.type==="circle")?(mo().b[8][0]++,mo().s[16]++,f4(h4.circleLayer(t,n.source,n["source-layer"]),n)):(mo().b[8][1]++,mo().s[17]++,n.type==="line"?(mo().b[10][0]++,mo().s[18]++,f4(h4.lineLayer(t,n.source,n["source-layer"]),n)):(mo().b[10][1]++,mo().s[19]++,null)))}function NB(){var n="/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",e="a9dc98f82c73787713de0672aff7a601bfeb069d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts",statementMap:{0:{start:{line:2,column:0},end:{line:2,column:115}}},fnMap:{},branchMap:{},s:{0:0},f:{},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/maplibre-rtl.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,WAAW,iBAAiB,gFAAgF,KAAK;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a9dc98f82c73787713de0672aff7a601bfeb069d"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return NB=function(){return a},a}NB();NB().s[0]++;Cv.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 p4(n,e,t,r){return new(t||(t=Promise))(function(i,s){function a(g){try{d(r.next(g))}catch(b){s(b)}}function o(g){try{d(r.throw(g))}catch(b){s(b)}}function d(g){g.done?i(g.value):new t(function(b){b(g.value)}).then(a,o)}d((r=r.apply(n,e||[])).next())})}var U_=typeof globalThis<"u"?globalThis:typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function ux(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var m4,K7;function mU(){if(K7)return m4;K7=1,m4=e;var n=Object.prototype.hasOwnProperty;function e(){for(var t={},r=0;r<arguments.length;r++){var i=arguments[r];for(var s in i)n.call(i,s)&&(t[s]=i[s])}return t}return m4}var g4={exports:{}},F7;function YH(){return F7||(F7=1,function(n,e){(function(){var t={};n.exports=t,t.simpleFilter=function(r,i){return i.filter(function(s){return t.test(r,s)})},t.test=function(r,i){return t.match(r,i)!==null},t.match=function(r,i,s){s=s||{};var a=0,o=[],d=i.length,g=0,b=0,E=s.pre||"",S=s.post||"",O=s.caseSensitive&&i||i.toLowerCase(),k;r=s.caseSensitive&&r||r.toLowerCase();for(var U=0;U<d;U++)k=i[U],O[U]===r[a]?(k=E+k+S,a+=1,b+=1+b):b=0,g+=b,o[o.length]=k;return a===r.length?(g=O===r?1/0:g,{rendered:o.join(""),score:g}):null},t.filter=function(r,i,s){return!i||i.length===0?[]:typeof r!="string"?i:(s=s||{},i.reduce(function(a,o,d,g){var b=o;s.extract&&(b=s.extract(o));var E=t.match(r,b,s);return E!=null&&(a[a.length]={string:E.rendered,score:E.score,index:d,original:o}),a},[]).sort(function(a,o){var d=o.score-a.score;return d||a.index-o.index}))}})()}(g4)),g4.exports}var y4,L7;function $H(){if(L7)return y4;L7=1;var n=function(e){return this.component=e,this.items=[],this.active=e.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,e.el.parentNode.insertBefore(this.wrapper,e.el.nextSibling),this};return n.prototype.show=function(){this.element.style.display="block"},n.prototype.hide=function(){this.element.style.display="none"},n.prototype.add=function(e){this.items.push(e)},n.prototype.clear=function(){this.items=[],this.active=this.component.options.noInitialSelection?-1:0},n.prototype.isEmpty=function(){return!this.items.length},n.prototype.isVisible=function(){return this.element.style.display==="block"},n.prototype.draw=function(){if(this.element.innerHTML="",this.items.length===0){this.hide();return}for(var e=0;e<this.items.length;e++)this.drawItem(this.items[e],this.active===e);this.show()},n.prototype.drawItem=function(e,t){var r=document.createElement("li"),i=document.createElement("a");t&&(r.className+=" active"),i.innerHTML=e.string,r.appendChild(i),this.element.appendChild(r),r.addEventListener("mousedown",(function(){this.selectingListItem=!0}).bind(this)),r.addEventListener("mouseup",(function(){this.handleMouseUp.call(this,e)}).bind(this))},n.prototype.handleMouseUp=function(e){this.selectingListItem=!1,this.component.value(e.original),this.clear(),this.draw()},n.prototype.move=function(e){this.active=e,this.draw()},n.prototype.previous=function(){this.move(this.active<=0?this.items.length-1:this.active-1)},n.prototype.next=function(){this.move(this.active>=this.items.length-1?0:this.active+1)},n.prototype.drawError=function(e){var t=document.createElement("li");t.innerHTML=e,this.element.appendChild(t),this.show()},y4=n,y4}var v4,U7;function VH(){if(U7)return v4;U7=1;var n=mU(),e=YH(),t=$H(),r=function(i,s,a){return a=a||{},this.options=n({minLength:2,limit:5,filter:!0,hideOnBlur:!0,noInitialSelection:!0},a),this.el=i,this.data=s||[],this.list=new t(this),this.query="",this.selected=null,this.list.draw(),this.el.addEventListener("keyup",(function(o){this.handleKeyUp(o.keyCode,o)}).bind(this),!1),this.el.addEventListener("keydown",(function(o){this.handleKeyDown(o)}).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(o){this.handlePaste(o)}).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 r.prototype.handleKeyUp=function(i,s){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]),s.stopPropagation());return}this.handleInputChange(this.el.value)}},r.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}},r.prototype.handleBlur=function(){!this.list.selectingListItem&&this.options.hideOnBlur&&this.list.hide()},r.prototype.handlePaste=function(i){if(i.clipboardData)this.handleInputChange(i.clipboardData.getData("Text"));else{var s=this;setTimeout(function(){s.handleInputChange(i.target.value)},100)}},r.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(s){for(var a=0;a<s.length&&(this.list.add(s[a]),a!==this.options.limit-1);a++);this.list.draw()}).bind(this))},r.prototype.handleFocus=function(){this.list.isEmpty()||this.list.show(),this.list.selectingListItem=!1},r.prototype.update=function(i){this.data=i,this.handleKeyUp()},r.prototype.clear=function(){this.data=[],this.list.clear()},r.prototype.normalize=function(i){return i=i.toLowerCase(),i},r.prototype.match=function(i,s){return i.indexOf(s)>-1},r.prototype.value=function(i){if(this.selected=i,this.el.value=this.getItemValue(i||{place_name:this.query}),document.createEvent){var s=document.createEvent("HTMLEvents");s.initEvent("change",!0,!1),this.el.dispatchEvent(s)}else this.el.fireEvent("onchange")},r.prototype.getCandidates=function(i){var s={pre:"<strong>",post:"</strong>",extract:(function(o){return this.getItemValue(o)}).bind(this)},a;this.options.filter?(a=e.filter(this.query,this.data,s),a=a.map((function(o){return{original:o.original,string:this.render(o.original,o.string)}}).bind(this))):a=this.data.map((function(o){var d=this.render(o);return{original:o,string:d}}).bind(this)),i(a)},r.prototype.getItemValue=function(i){return i},r.prototype.render=function(i,s){if(s)return s;for(var a=i.original?this.getItemValue(i.original):this.getItemValue(i),o=this.normalize(a),d=o.lastIndexOf(this.query);d>-1;){var g=d+this.query.length;a=a.slice(0,d)+"<strong>"+a.slice(d,g)+"</strong>"+a.slice(g),d=o.slice(0,d).lastIndexOf(this.query)}return a},r.prototype.renderError=function(i){this.list.drawError(i)},v4=r,v4}var C4,z7;function HH(){if(z7)return C4;z7=1;var n=VH();return C4=n,typeof window<"u"&&(window.Suggestions=n),C4}var ZH=HH(),XH=ux(ZH),wb={exports:{}},JH=wb.exports,j7;function eZ(){return j7||(j7=1,function(n){(function(e,t,r){n.exports?n.exports=r():e[t]=r()})(JH,"subtag",function(){var e="",t=/^([a-zA-Z]{2,3})(?:[_-]+([a-zA-Z]{3})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{4})(?=$|[_-]+))?(?:[_-]+([a-zA-Z]{2}|[0-9]{3})(?=$|[_-]+))?/;function r(d){return d.match(t)||[]}function i(d){return r(d).filter(function(g,b){return g&&b})}function s(d){return d=r(d),{language:d[1]||e,extlang:d[2]||e,script:d[3]||e,region:d[4]||e}}function a(d,g,b){Object.defineProperty(d,g,{value:b,enumerable:!0})}function o(d,g,b){function E(S){return r(S)[d]||e}a(E,"pattern",g),a(s,b,E)}return o(1,/^[a-zA-Z]{2,3}$/,"language"),o(2,/^[a-zA-Z]{3}$/,"extlang"),o(3,/^[a-zA-Z]{4}$/,"script"),o(4,/^[a-zA-Z]{2}$|^[0-9]{3}$/,"region"),a(s,"split",i),s})}(wb)),wb.exports}var tZ=eZ(),nZ=ux(tZ),_4,N7;function rZ(){if(N7)return _4;N7=1;var n="Expected a function",e=NaN,t="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,d=typeof U_=="object"&&U_&&U_.Object===Object&&U_,g=typeof self=="object"&&self&&self.Object===Object&&self,b=d||g||Function("return this")(),E=Object.prototype,S=E.toString,O=Math.max,k=Math.min,U=function(){return b.Date.now()};function z(Y,ee,N){var ie,he,de,Me,fe,xe,De=0,me=!1,at=!1,Qe=!0;if(typeof Y!="function")throw new TypeError(n);ee=X(ee)||0,q(N)&&(me=!!N.leading,at="maxWait"in N,de=at?O(X(N.maxWait)||0,ee):de,Qe="trailing"in N?!!N.trailing:Qe);function He(Pt){var Le=ie,Pe=he;return ie=he=void 0,De=Pt,Me=Y.apply(Pe,Le),Me}function We(Pt){return De=Pt,fe=setTimeout(rt,ee),me?He(Pt):Me}function Ce(Pt){var Le=Pt-xe,Pe=Pt-De,Ee=ee-Le;return at?k(Ee,de-Pe):Ee}function Te(Pt){var Le=Pt-xe,Pe=Pt-De;return xe===void 0||Le>=ee||Le<0||at&&Pe>=de}function rt(){var Pt=U();if(Te(Pt))return yt(Pt);fe=setTimeout(rt,Ce(Pt))}function yt(Pt){return fe=void 0,Qe&&ie?He(Pt):(ie=he=void 0,Me)}function bt(){fe!==void 0&&clearTimeout(fe),De=0,ie=xe=he=fe=void 0}function gt(){return fe===void 0?Me:yt(U())}function Dt(){var Pt=U(),Le=Te(Pt);if(ie=arguments,he=this,xe=Pt,Le){if(fe===void 0)return We(xe);if(at)return fe=setTimeout(rt,ee),He(xe)}return fe===void 0&&(fe=setTimeout(rt,ee)),Me}return Dt.cancel=bt,Dt.flush=gt,Dt}function q(Y){var ee=typeof Y;return!!Y&&(ee=="object"||ee=="function")}function Q(Y){return!!Y&&typeof Y=="object"}function re(Y){return typeof Y=="symbol"||Q(Y)&&S.call(Y)==t}function X(Y){if(typeof Y=="number")return Y;if(re(Y))return e;if(q(Y)){var ee=typeof Y.valueOf=="function"?Y.valueOf():Y;Y=q(ee)?ee+"":ee}if(typeof Y!="string")return Y===0?Y:+Y;Y=Y.replace(r,"");var N=s.test(Y);return N||a.test(Y)?o(Y.slice(2),N?2:8):i.test(Y)?e:+Y}return _4=z,_4}var iZ=rZ(),oZ=ux(iZ),sZ=mU(),Xf=ux(sZ),z_={exports:{}},W7;function aZ(){if(W7)return z_.exports;W7=1;var n=typeof Reflect=="object"?Reflect:null,e=n&&typeof n.apply=="function"?n.apply:function(Y,ee,N){return Function.prototype.apply.call(Y,ee,N)},t;n&&typeof n.ownKeys=="function"?t=n.ownKeys:Object.getOwnPropertySymbols?t=function(Y){return Object.getOwnPropertyNames(Y).concat(Object.getOwnPropertySymbols(Y))}:t=function(Y){return Object.getOwnPropertyNames(Y)};function r(X){console&&console.warn&&console.warn(X)}var i=Number.isNaN||function(Y){return Y!==Y};function s(){s.init.call(this)}z_.exports=s,z_.exports.once=q,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var a=10;function o(X){if(typeof X!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof X)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(X){if(typeof X!="number"||X<0||i(X))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+X+".");a=X}}),s.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},s.prototype.setMaxListeners=function(Y){if(typeof Y!="number"||Y<0||i(Y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+Y+".");return this._maxListeners=Y,this};function d(X){return X._maxListeners===void 0?s.defaultMaxListeners:X._maxListeners}s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(Y){for(var ee=[],N=1;N<arguments.length;N++)ee.push(arguments[N]);var ie=Y==="error",he=this._events;if(he!==void 0)ie=ie&&he.error===void 0;else if(!ie)return!1;if(ie){var de;if(ee.length>0&&(de=ee[0]),de instanceof Error)throw de;var Me=new Error("Unhandled error."+(de?" ("+de.message+")":""));throw Me.context=de,Me}var fe=he[Y];if(fe===void 0)return!1;if(typeof fe=="function")e(fe,this,ee);else for(var xe=fe.length,De=k(fe,xe),N=0;N<xe;++N)e(De[N],this,ee);return!0};function g(X,Y,ee,N){var ie,he,de;if(o(ee),he=X._events,he===void 0?(he=X._events=Object.create(null),X._eventsCount=0):(he.newListener!==void 0&&(X.emit("newListener",Y,ee.listener?ee.listener:ee),he=X._events),de=he[Y]),de===void 0)de=he[Y]=ee,++X._eventsCount;else if(typeof de=="function"?de=he[Y]=N?[ee,de]:[de,ee]:N?de.unshift(ee):de.push(ee),ie=d(X),ie>0&&de.length>ie&&!de.warned){de.warned=!0;var Me=new Error("Possible EventEmitter memory leak detected. "+de.length+" "+String(Y)+" listeners added. Use emitter.setMaxListeners() to increase limit");Me.name="MaxListenersExceededWarning",Me.emitter=X,Me.type=Y,Me.count=de.length,r(Me)}return X}s.prototype.addListener=function(Y,ee){return g(this,Y,ee,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(Y,ee){return g(this,Y,ee,!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 E(X,Y,ee){var N={fired:!1,wrapFn:void 0,target:X,type:Y,listener:ee},ie=b.bind(N);return ie.listener=ee,N.wrapFn=ie,ie}s.prototype.once=function(Y,ee){return o(ee),this.on(Y,E(this,Y,ee)),this},s.prototype.prependOnceListener=function(Y,ee){return o(ee),this.prependListener(Y,E(this,Y,ee)),this},s.prototype.removeListener=function(Y,ee){var N,ie,he,de,Me;if(o(ee),ie=this._events,ie===void 0)return this;if(N=ie[Y],N===void 0)return this;if(N===ee||N.listener===ee)--this._eventsCount===0?this._events=Object.create(null):(delete ie[Y],ie.removeListener&&this.emit("removeListener",Y,N.listener||ee));else if(typeof N!="function"){for(he=-1,de=N.length-1;de>=0;de--)if(N[de]===ee||N[de].listener===ee){Me=N[de].listener,he=de;break}if(he<0)return this;he===0?N.shift():U(N,he),N.length===1&&(ie[Y]=N[0]),ie.removeListener!==void 0&&this.emit("removeListener",Y,Me||ee)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(Y){var ee,N,ie;if(N=this._events,N===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[Y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete N[Y]),this;if(arguments.length===0){var he=Object.keys(N),de;for(ie=0;ie<he.length;++ie)de=he[ie],de!=="removeListener"&&this.removeAllListeners(de);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(ee=N[Y],typeof ee=="function")this.removeListener(Y,ee);else if(ee!==void 0)for(ie=ee.length-1;ie>=0;ie--)this.removeListener(Y,ee[ie]);return this};function S(X,Y,ee){var N=X._events;if(N===void 0)return[];var ie=N[Y];return ie===void 0?[]:typeof ie=="function"?ee?[ie.listener||ie]:[ie]:ee?z(ie):k(ie,ie.length)}s.prototype.listeners=function(Y){return S(this,Y,!0)},s.prototype.rawListeners=function(Y){return S(this,Y,!1)},s.listenerCount=function(X,Y){return typeof X.listenerCount=="function"?X.listenerCount(Y):O.call(X,Y)},s.prototype.listenerCount=O;function O(X){var Y=this._events;if(Y!==void 0){var ee=Y[X];if(typeof ee=="function")return 1;if(ee!==void 0)return ee.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function k(X,Y){for(var ee=new Array(Y),N=0;N<Y;++N)ee[N]=X[N];return ee}function U(X,Y){for(;Y+1<X.length;Y++)X[Y]=X[Y+1];X.pop()}function z(X){for(var Y=new Array(X.length),ee=0;ee<Y.length;++ee)Y[ee]=X[ee].listener||X[ee];return Y}function q(X,Y){return new Promise(function(ee,N){function ie(de){X.removeListener(Y,he),N(de)}function he(){typeof X.removeListener=="function"&&X.removeListener("error",ie),ee([].slice.call(arguments))}re(X,Y,he,{once:!0}),Y!=="error"&&Q(X,ie,{once:!0})})}function Q(X,Y,ee){typeof X.on=="function"&&re(X,"error",Y,ee)}function re(X,Y,ee,N){if(typeof X.on=="function")N.once?X.once(Y,ee):X.on(Y,ee);else if(typeof X.addEventListener=="function")X.addEventListener(Y,function ie(he){N.once&&X.removeEventListener(Y,ie),ee(he)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof X)}return z_.exports}var lZ=aZ();const G7={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]]}},uZ={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:"Поиск"},AZ=/(-?\d+\.?\d*)[, ]+(-?\d+\.?\d*)[ ]*$/;class cZ{constructor(e,t){this.options={zoom:16,flyTo:!0,trackProximity:!0,showResultsWhileTyping:!1,minLength:2,reverseGeocode:!1,limit:5,enableEventLogging:!0,marker:!0,popup:!1,maplibregl:void 0,collapsed:!1,clearAndBlurOnEsc:!1,clearOnBlur:!1,proximityMinZoom:9,getItemValue:r=>r.text!==void 0?r.text:r.place_name,render:function(r){if(!r.geometry){const s=r.text,a=s.toLowerCase().indexOf(this.query.toLowerCase()),o=this.query.length,d=s.substring(0,a),g=s.substring(a,a+o),b=s.substring(a+o);return'<div class="maplibregl-ctrl-geocoder--suggestion"><svg class="maplibregl-ctrl-geocoder--suggestion-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22.8702 20.1258H21.4248L20.9125 19.6318C22.7055 17.546 23.785 14.8382 23.785 11.8925C23.785 5.32419 18.4608 0 11.8925 0C5.32419 0 0 5.32419 0 11.8925C0 18.4608 5.32419 23.785 11.8925 23.785C14.8382 23.785 17.546 22.7055 19.6318 20.9125L20.1258 21.4248V22.8702L29.2739 32L32 29.2739L22.8702 20.1258ZM11.8925 20.1258C7.33676 20.1258 3.65923 16.4483 3.65923 11.8925C3.65923 7.33676 7.33676 3.65923 11.8925 3.65923C16.4483 3.65923 20.1258 7.33676 20.1258 11.8925C20.1258 16.4483 16.4483 20.1258 11.8925 20.1258Z" fill="#687078"/></svg><div class="maplibregl-ctrl-geocoder--suggestion-info"><div class="maplibregl-ctrl-geocoder--suggestion-title">'+d+'<span class="maplibregl-ctrl-geocoder--suggestion-match">'+g+"</span>"+b+"</div></div></div>"}const i=r.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--result"><svg class="maplibregl-ctrl-geocoder--result-icon" viewBox="0 0 24 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.36571 0 0 5.38676 0 12.0471C0 21.0824 12 32 12 32C12 32 24 21.0824 24 12.0471C24 5.38676 18.6343 0 12 0ZM12 16.3496C9.63428 16.3496 7.71429 14.4221 7.71429 12.0471C7.71429 9.67207 9.63428 7.74454 12 7.74454C14.3657 7.74454 16.2857 9.67207 16.2857 12.0471C16.2857 14.4221 14.3657 16.3496 12 16.3496Z" fill="#687078"/></svg><div><div class="maplibregl-ctrl-geocoder--result-title">'+i[0]+'</div><div class="maplibregl-ctrl-geocoder--result-address">'+i.splice(1,i.length).join(",")+"</div></div></div>"},popupRender:r=>{const i=r.place_name.split(",");return'<div class="maplibregl-ctrl-geocoder--suggestion popup-suggestion"><div class="maplibregl-ctrl-geocoder--suggestion-title popup-suggestion-title">'+i[0]+'</div><div class="maplibregl-ctrl-geocoder--suggestion-address popup-suggestion-address">'+i.splice(1,i.length).join(",")+"</div></div>"},showResultMarkers:!0,debounceSearch:200},this._eventEmitter=new lZ.EventEmitter,this.options=Xf({},this.options,t),this.fresh=!0,this.lastSelected=null,this.geocoderApi=e}addTo(e){function t(r,i){if(!document.body.contains(i))throw new Error("Element provided to #addTo() exists, but is not in the DOM");const s=r.onAdd();i.appendChild(s)}if(e instanceof HTMLElement)t(this,e);else if(typeof e=="string"){const r=document.querySelectorAll(e);if(r.length===0)throw new Error("Element "+e+"not found.");if(r.length>1)throw new Error("Geocoder can only be added to a single html element");t(this,r[0])}else if("addControl"in e)e.addControl(this);else throw new Error("Error: addTo must be a maplibre-gl-js map, an html element, or a CSS selector query for a single html element")}onAdd(e){if(e&&typeof e!="string"&&(this._map=e),this.setLanguage(),this.options.localGeocoderOnly&&!this.options.localGeocoder)throw new Error("A localGeocoder function must be specified to use localGeocoderOnly mode");this._onChange=this._onChange.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPaste=this._onPaste.bind(this),this._onBlur=this._onBlur.bind(this),this._showButton=this._showButton.bind(this),this._hideButton=this._hideButton.bind(this),this._onQueryResult=this._onQueryResult.bind(this),this.clear=this.clear.bind(this),this._updateProximity=this._updateProximity.bind(this),this._collapse=this._collapse.bind(this),this._unCollapse=this._unCollapse.bind(this),this._clear=this._clear.bind(this),this._clearOnBlur=this._clearOnBlur.bind(this);const t=this.container=document.createElement("div");t.className="maplibregl-ctrl-geocoder maplibregl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";const r=this.createIcon("search",'<path d="M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"/>');this._inputEl=document.createElement("input"),this._inputEl.type="text",this._inputEl.className="maplibregl-ctrl-geocoder--input",this.setPlaceholder(),this.options.collapsed&&(this._collapse(),this.container.addEventListener("mouseenter",this._unCollapse),this.container.addEventListener("mouseleave",this._collapse),this._inputEl.addEventListener("focus",this._unCollapse)),(this.options.collapsed||this.options.clearOnBlur)&&this._inputEl.addEventListener("blur",this._onBlur),this._inputEl.addEventListener("keydown",oZ(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 s=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(s),this._loadingEl=this.createIcon("loading",'<path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"/><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"/>'),i.appendChild(this._clearEl),i.appendChild(this._loadingEl),t.appendChild(r),t.appendChild(this._inputEl),t.appendChild(i),this._typeahead=new XH(this._inputEl,[],{filter:!1,minLength:this.options.minLength,limit:this.options.limit,noInitialSelection:!0}),this.setRenderFunction(this.options.render),this._typeahead.getItemValue=this.options.getItemValue,this.mapMarker=null,this.resultMarkers=[],this._handleMarker=this._handleMarker.bind(this),this._handleResultMarkers=this._handleResultMarkers.bind(this),this._map&&(this.options.trackProximity&&(this._updateProximity(),this._map.on("moveend",this._updateProximity)),this._maplibregl=this.options.maplibregl,!this._maplibregl&&this.options.marker&&(console.error("No maplibregl detected in options. Map markers are disabled. Please set options.maplibregl."),this.options.marker=!1)),t}createIcon(e,t){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");if(r.setAttribute("class","maplibregl-ctrl-geocoder--icon maplibregl-ctrl-geocoder--icon-"+e),r.setAttribute("viewBox","0 0 18 18"),r.setAttribute("xml:space","preserve"),r.setAttribute("width","18"),r.setAttribute("height","18"),"innerHTML"in r)r.innerHTML=t;else{const i=document.createElement("div");i.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";const s=i.firstChild,a=s.firstChild;r.appendChild(a)}return r}onRemove(){return this.container.remove(),this.options.trackProximity&&this._map&&this._map.off("moveend",this._updateProximity),this._removeMarker(),this._map=null,this}_onPaste(e){const t=(e.clipboardData||window.clipboardData).getData("text");t.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(t)}_onKeyDown(e){if(e.keyCode===27&&this.options.clearAndBlurOnEsc)return this._clear(e),this._inputEl.blur();const s=e.target&&e.target.shadowRoot?e.target.shadowRoot.activeElement:e.target;if(!(s?s.value:""))return this.fresh=!0,e.keyCode!==9&&this.clear(e),this._clearEl.style.display="none";if(!(e.metaKey||[9,27,37,39,38,40].indexOf(e.keyCode)!==-1)){if(e.keyCode===13)if(!this.options.showResultsWhileTyping)this._typeahead.selected||this._geocode(s.value);else{this._typeahead.selected==null&&this.geocoderApi.getSuggestions?this._geocode(s.value,!0):this._typeahead.selected==null&&this.options.showResultMarkers&&this._fitBoundsForMarkers();return}s.value.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(s.value)}}_showButton(){this._inputEl.value.length>0&&(this._clearEl.style.display="block")}_hideButton(){this._typeahead.selected&&(this._clearEl.style.display="none")}_onBlur(e){this.options.clearOnBlur&&this._clearOnBlur(e),this.options.collapsed&&this._collapse()}_onChange(){const e=this._typeahead.selected;if(e&&!e.geometry)e.placeId?this._geocode(e.placeId,!0,!0):this._geocode(e.text,!0);else if(e&&JSON.stringify(e)!==this.lastSelected){if(this._clearEl.style.display="none",this.options.flyTo){let t;if(this._removeResultMarkers(),e.properties&&G7[e.properties.short_code])t=Xf({},this.options.flyTo),this._map&&this._map.fitBounds(G7[e.properties.short_code].bbox,t);else if(e.bbox){const r=e.bbox;t=Xf({},this.options.flyTo),this._map&&this._map.fitBounds([[r[0],r[1]],[r[2],r[3]]],t)}else{const r={zoom:this.options.zoom};t=Xf({},r,this.options.flyTo),e.center?t.center=e.center:e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(t.center=e.geometry.coordinates),this._map&&this._map.flyTo(t)}}this.options.marker&&this._maplibregl&&this._handleMarker(e),this._inputEl.focus(),this._inputEl.scrollLeft=0,this._inputEl.setSelectionRange(0,0),this.lastSelected=JSON.stringify(e),this._typeahead.selected=null,this._eventEmitter.emit("result",{result:e})}}_getConfigForRequest(){return["bbox","limit","proximity","countries","types","language","reverseMode"].reduce((r,i)=>(this.options[i]&&(["countries","types","language"].indexOf(i)>-1?r[i]=this.options[i].split(/[\s,]+/):r[i]=this.options[i],i==="proximity"&&this.options[i]&&typeof this.options[i].longitude=="number"&&typeof this.options[i].latitude=="number"&&(r[i]=[this.options[i].longitude,this.options[i].latitude])),r),{})}_geocode(e){return p4(this,arguments,void 0,function*(t,r=!1,i=!1){this._loadingEl.style.display="block",this._eventEmitter.emit("loading",{query:t});const s=this._getConfigForRequest(),a=this._createGeocodeRequest(s,t,r,i),o=this.options.localGeocoder?this.options.localGeocoder(t)||[]:[];try{const d=yield a;yield this._handleGeocodeResponse(d,s,t,r,o)}catch(d){this._handleGeocodeErrorResponse(d,o)}return a})}_createGeocodeRequest(e,t,r,i){return this.options.localGeocoderOnly?Promise.resolve({}):this.options.reverseGeocode&&AZ.test(t)?this._createReverseGeocodeRequest(t,e):(e.query=t,this.geocoderApi.getSuggestions?r?this.geocoderApi.searchByPlaceId&&i?this.geocoderApi.searchByPlaceId(e):this.geocoderApi.forwardGeocode(e):this.geocoderApi.getSuggestions(e):this.geocoderApi.forwardGeocode(e))}_createReverseGeocodeRequest(e,t){const r=e.split(/[\s(,)?]+/).map(i=>parseFloat(i)).reverse();return t.query=r,t.limit=1,"proximity"in t&&delete t.proximity,this.geocoderApi.reverseGeocode(t)}_handleGeocodeResponse(e,t,r,i,s){return p4(this,void 0,void 0,function*(){this._loadingEl.style.display="none";let a={};e?a=e:a={type:"FeatureCollection",features:[]},a.config=t,this.fresh&&(this.fresh=!1),a.features=a.features?s.concat(a.features):s;const o=this.options.externalGeocoder?this.options.externalGeocoder(r,a.features,t)||Promise.resolve([]):Promise.resolve([]);try{const g=yield o;a.features=a.features?g.concat(a.features):g}catch{}this.options.filter&&a.features.length&&(a.features=a.features.filter(this.options.filter));let d=[];"suggestions"in a?d=a.suggestions:"place"in a?d=[a.place]:d=a.features,d.length?(this._clearEl.style.display="block",this._typeahead.update(d),(!this.options.showResultsWhileTyping||i)&&this.options.showResultMarkers&&(a.features.length>0||"place"in a)&&this._fitBoundsForMarkers(),this._eventEmitter.emit("results",a)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderNoResults(),this._eventEmitter.emit("results",a))})}_handleGeocodeErrorResponse(e,t){this._loadingEl.style.display="none",t.length&&this.options.localGeocoder?(this._clearEl.style.display="block",this._typeahead.update(t)):(this._clearEl.style.display="none",this._typeahead.selected=null,this._renderError()),this._eventEmitter.emit("results",{features:t}),this._eventEmitter.emit("error",{error:e})}_clear(e){e&&e.preventDefault(),this._inputEl.value="",this._typeahead.selected=null,this._typeahead.clear(),this._onChange(),this._clearEl.style.display="none",this._removeMarker(),this._removeResultMarkers(),this.lastSelected=null,this._eventEmitter.emit("clear"),this.fresh=!0}clear(e){this._clear(e),this._inputEl.focus()}_clearOnBlur(e){e.relatedTarget&&this._clear(e)}_onQueryResult(e){if(!("features"in e)||!e.features.length)return;const t=e.features[0];this._typeahead.selected=t,this._inputEl.value=t.place_name,this._onChange()}_updateProximity(){if(this._map)if(this._map.getZoom()>this.options.proximityMinZoom){const e=this._map.getCenter().wrap();this.setProximity({longitude:e.lng,latitude:e.lat})}else this.setProximity(null)}_collapse(){!this._inputEl.value&&this._inputEl!==document.activeElement&&this.container.classList.add("maplibregl-ctrl-geocoder--collapsed")}_unCollapse(){this.container.classList.remove("maplibregl-ctrl-geocoder--collapsed")}query(e){return p4(this,void 0,void 0,function*(){const t=yield this._geocode(e);this._onQueryResult(t)})}_renderError(){this._renderMessage("<div class='maplibre-gl-geocoder--error'>There was an error reaching the server</div>")}_renderNoResults(){this._renderMessage("<div class='maplibre-gl-geocoder--error maplibre-gl-geocoder--no-results'>No results found</div>")}_renderMessage(e){this._typeahead.update([]),this._typeahead.selected=null,this._typeahead.clear(),this._typeahead.renderError(e)}_getPlaceholderText(){if(this.options.placeholder)return this.options.placeholder;if(this.options.language){const e=this.options.language.split(",")[0],t=nZ.language(e),r=uZ[t];if(r)return r}return"Search"}_fitBoundsForMarkers(){if(this._typeahead.data.length<1)return;const e=this._typeahead.data.filter(t=>typeof t!="string").slice(0,this.options.limit);if(this._clearEl.style.display="none",this.options.flyTo&&this._maplibregl&&this._map){const r=Xf({},{padding:100},this.options.flyTo),i=new this._maplibregl.LngLatBounds;for(const s of e)i.extend(s.geometry.coordinates);this._map.fitBounds(i,r)}return e.length>0&&this._maplibregl&&this._handleResultMarkers(e),this}setInput(e){return this._inputEl.value=e,this._typeahead.selected=null,this._typeahead.clear(),e.length>=this.options.minLength&&this.options.showResultsWhileTyping&&this._geocode(e),this}setProximity(e){return this.options.proximity=e,this}getProximity(){return this.options.proximity}setRenderFunction(e){return e&&typeof e=="function"&&(this._typeahead.render=e),this}getRenderFunction(){return this._typeahead.render}setLanguage(e){return this.options.language=e||this.options.language||navigator.language,this}getLanguage(){return this.options.language}getZoom(){return this.options.zoom}setZoom(e){return this.options.zoom=e,this}getFlyTo(){return this.options.flyTo}setFlyTo(e){return this.options.flyTo=e,this}getPlaceholder(){return this.options.placeholder}setPlaceholder(e){return this.placeholder=e||this._getPlaceholderText(),this._inputEl.placeholder=this.placeholder,this._inputEl.setAttribute("aria-label",this.placeholder),this}getBbox(){return this.options.bbox}setBbox(e){return this.options.bbox=e,this}getCountries(){return this.options.countries}setCountries(e){return this.options.countries=e,this}getTypes(){return this.options.types}setTypes(e){return this.options.types=e,this}getMinLength(){return this.options.minLength}setMinLength(e){return this.options.minLength=e,this._typeahead&&(this._typeahead.options.minLength=e),this}getLimit(){return this.options.limit}setLimit(e){return this.options.limit=e,this._typeahead&&(this._typeahead.options.limit=e),this}getFilter(){return this.options.filter}setFilter(e){return this.options.filter=e,this}setGeocoderApi(e){return this.geocoderApi=e,this}getGeocoderApi(){return this.geocoderApi}_handleMarker(e){if(!this._map)return;this._removeMarker();const r=Xf({},{color:"#4668F2"},this.options.marker);this.mapMarker=new this._maplibregl.Marker(r);let i;if(this.options.popup){const a=Xf({},{},this.options.popup);i=new this._maplibregl.Popup(a).setHTML(this.options.popupRender(e))}return e.center?(this.mapMarker.setLngLat(e.center).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)):e.geometry&&e.geometry.type&&e.geometry.type==="Point"&&e.geometry.coordinates&&(this.mapMarker.setLngLat(e.geometry.coordinates).addTo(this._map),this.options.popup&&this.mapMarker.setPopup(i)),this}_removeMarker(){this.mapMarker&&(this.mapMarker.remove(),this.mapMarker=null)}_handleResultMarkers(e){if(!this._map)return;this._removeResultMarkers();let r=Xf({},{color:"#4668F2"},this.options.showResultMarkers);for(const i of e){let s;if(this.options.showResultMarkers){this.options.showResultMarkers&&this.options.showResultMarkers.element&&(s=this.options.showResultMarkers.element.cloneNode(!0),r=Xf(r,{element:s}));const a=new this._maplibregl.Marker(Xf({},r,{element:s}));let o;if(this.options.popup){const g=Xf({},{},this.options.popup);o=new this._maplibregl.Popup(g).setHTML(this.options.popupRender(i))}i.center?(a.setLngLat(i.center).addTo(this._map),this.options.popup&&a.setPopup(o)):i.geometry&&i.geometry.type&&i.geometry.type==="Point"&&i.geometry.coordinates&&(a.setLngLat(i.geometry.coordinates).addTo(this._map),this.options.popup&&a.setPopup(o)),this.resultMarkers.push(a)}}return this}_removeResultMarkers(){this.resultMarkers&&this.resultMarkers.length>0&&(this.resultMarkers.forEach(function(e){e.remove()}),this.resultMarkers=[])}on(e,t){return this._eventEmitter.on(e,t),this}once(e){return new Promise(t=>{this._eventEmitter.once(e,t)})}off(e,t){return this._eventEmitter.removeListener(e,t),this}}function En(){var n="/home/runner/work/maputnik/maputnik/src/components/MapMaplibreGl.tsx",e="9788ddbf00855c38ec05989dada588b591b09e6b",t=globalThis,r="__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:21},end:{line:122,column:43}},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,IAAI;AAAA,IAEZ;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,UAAM,WAAW,KAAK,aAAa,GAAG;AAEtC,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:"9788ddbf00855c38ec05989dada588b591b09e6b"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return En=function(){return a},a}En();function Q7(n,e){return En().f[0]++,En().s[0]++,IV.render(n,e),En().s[1]++,e}function dZ(n,e,t){En().f[1]++;const r=(En().s[2]++,{id:"background",type:"background",paint:{"background-color":"#1c1f24"}}),i=(En().s[3]++,qH(t));En().s[4]++,i?(En().b[0][0]++,En().s[5]++,e.push(i)):En().b[0][1]++;const s=(En().s[6]++,{});En().s[7]++,Object.keys(n.sources).forEach(o=>{En().f[2]++;const d=(En().s[8]++,n.sources[o]);En().s[9]++,En().b[2][0]++,d.type!=="raster"&&(En().b[2][1]++,d.type!=="raster-dem")?(En().b[1][0]++,En().s[10]++,s[o]=d):En().b[1][1]++});const a=(En().s[11]++,{...n,sources:s,layers:[r].concat(e)});return En().s[12]++,a}class gU extends rr.Component{constructor(t){En().f[7]++,En().s[15]++;super(t);kn(this,"container",(En().s[14]++,null));kn(this,"onLayerSelectById",(En().s[71]++,t=>{En().f[21]++;const r=(En().s[72]++,this.props.mapStyle.layers.findIndex(i=>(En().f[22]++,En().s[73]++,i.id===t)));En().s[74]++,this.props.onLayerSelect(r)}));En().s[16]++,this.state={map:null,inspect:null,geocoder:null,zoomControl:null},En().s[17]++,Kc.on("languageChanged",()=>{En().f[8]++,En().s[18]++,this.forceUpdate()})}shouldComponentUpdate(t,r){En().f[9]++;let i=(En().s[19]++,!1);En().s[20]++;try{En().s[21]++,i=(En().b[3][0]++,JSON.stringify(this.props)!==JSON.stringify(t)||(En().b[3][1]++,JSON.stringify(this.state)!==JSON.stringify(r)))}catch{}return En().s[22]++,i}componentDidUpdate(){var i,s,a;En().f[10]++;const t=(En().s[23]++,this.state.map),r=(En().s[24]++,this.props.replaceAccessTokens(this.props.mapStyle));En().s[25]++,t?(En().b[4][0]++,En().s[26]++,t.setStyle(r,{diff:!0}),En().s[27]++,t.showTileBoundaries=(i=this.props.options)==null?void 0:i.showTileBoundaries,En().s[28]++,t.showCollisionBoxes=(s=this.props.options)==null?void 0:s.showCollisionBoxes,En().s[29]++,t.showOverdrawInspector=(a=this.props.options)==null?void 0:a.showOverdrawInspector):En().b[4][1]++,En().s[30]++,En().b[6][0]++,this.state.inspect&&(En().b[6][1]++,this.props.inspectModeEnabled!==this.state.inspect._showInspectMap)?(En().b[5][0]++,En().s[31]++,this.state.inspect.toggleInspector()):En().b[5][1]++,En().s[32]++,En().b[8][0]++,this.state.inspect&&(En().b[8][1]++,this.props.inspectModeEnabled)?(En().b[7][0]++,En().s[33]++,this.state.inspect.setOriginalStyle(r),En().s[34]++,setTimeout(()=>{En().f[11]++,En().s[35]++,this.state.inspect.render()},500)):En().b[7][1]++}componentDidMount(){En().f[12]++;const t=(En().s[36]++,{...this.props.options,container:this.container,style:this.props.mapStyle,hash:!0,maxZoom:24,localIdeographFontFamily:!1}),r=(En().s[37]++,new Cv.Map(t));En().s[38]++;const i=()=>{En().f[13]++;const b=(En().s[39]++,r.getCenter()),E=(En().s[40]++,r.getZoom());En().s[41]++,this.props.onChange({center:b,zoom:E})};En().s[42]++,i(),En().s[43]++,r.showTileBoundaries=t.showTileBoundaries,En().s[44]++,r.showCollisionBoxes=t.showCollisionBoxes,En().s[45]++,r.showOverdrawInspector=t.showOverdrawInspector;const s=(En().s[46]++,this.initGeocoder(r)),a=(En().s[47]++,new WH);En().s[48]++,r.addControl(a,"top-right");const o=(En().s[49]++,new Cv.NavigationControl({visualizePitch:!0}));En().s[50]++,r.addControl(o,"top-right");const d=(En().s[51]++,document.createElement("div")),g=(En().s[52]++,new jB({popup:new Cv.Popup({closeOnClick:!1}),showMapPopup:!0,showMapPopupOnHover:!1,showInspectMapPopupOnHover:!0,showInspectButton:!1,blockHoverPopupOnClick:!0,assignLayerColor:(b,E)=>(En().f[14]++,En().s[53]++,_6(AU.brightColor(b,E)).desaturate(.5).string()),buildInspectStyle:(b,E)=>(En().f[15]++,En().s[54]++,dZ(b,E,this.props.highlightedLayer)),renderPopup:b=>(En().f[16]++,En().s[55]++,this.props.inspectModeEnabled?(En().b[9][0]++,En().s[56]++,Q7(le.jsx(DH,{features:b}),d)):(En().b[9][1]++,En().s[57]++,Q7(le.jsx(hU,{features:b,onLayerSelect:this.onLayerSelectById,zoom:this.state.zoom}),d)))}));En().s[58]++,r.addControl(g),En().s[59]++,r.on("style.load",()=>{En().f[17]++,En().s[60]++,this.setState({map:r,inspect:g,geocoder:s,zoomControl:a,zoom:r.getZoom()})}),En().s[61]++,r.on("data",b=>{if(En().f[18]++,En().s[62]++,b.dataType!=="tile"){En().b[10][0]++,En().s[63]++;return}else En().b[10][1]++;En().s[64]++,this.props.onDataChange({map:this.state.map})}),En().s[65]++,r.on("error",b=>{En().f[19]++,En().s[66]++,console.log("ERROR",b)}),En().s[67]++,r.on("zoom",b=>{En().f[20]++,En().s[68]++,this.setState({zoom:r.getZoom()})}),En().s[69]++,r.on("dragend",i),En().s[70]++,r.on("zoomend",i)}initGeocoder(t){En().f[23]++;const r=(En().s[75]++,{forwardGeocode:async s=>{En().f[24]++;const a=(En().s[76]++,[]);En().s[77]++;try{const o=(En().s[78]++,`https://nominatim.openstreetmap.org/search?q=${s.query}&format=geojson&polygon_geojson=1&addressdetails=1`),d=(En().s[79]++,await fetch(o)),g=(En().s[80]++,await d.json());En().s[81]++;for(const b of g.features){const E=(En().s[82]++,[b.bbox[0]+(b.bbox[2]-b.bbox[0])/2,b.bbox[1]+(b.bbox[3]-b.bbox[1])/2]),S=(En().s[83]++,{type:"Feature",geometry:{type:"Point",coordinates:E},place_name:b.properties.display_name,properties:b.properties,text:b.properties.display_name,place_type:["place"],center:E});En().s[84]++,a.push(S)}}catch(o){En().s[85]++,console.error(`Failed to forwardGeocode with error: ${o}`)}return En().s[86]++,{features:a}}}),i=(En().s[87]++,new cZ(r,{placeholder:this.props.t("Search"),maplibregl:Cv}));return En().s[88]++,t.addControl(i,"top-left"),En().s[89]++,i}render(){var r,i;En().f[25]++;const t=(En().s[90]++,this.props.t);return En().s[91]++,(r=this.state.geocoder)==null||r.setPlaceholder(t("Search")),En().s[92]++,(i=this.state.zoomControl)==null||i.setLabel(t("Zoom:")),En().s[93]++,le.jsx("div",{className:"maputnik-map__map",role:"region","aria-label":t("Map view"),ref:s=>(En().f[26]++,En().s[94]++,this.container=s),"data-wd-key":"maplibre:map"})}}kn(gU,"defaultProps",(En().s[13]++,{onMapLoaded:()=>{En().f[3]++},onDataChange:()=>{En().f[4]++},onLayerSelect:()=>{En().f[5]++},onChange:()=>{En().f[6]++},options:{}}));const hZ=(En().s[95]++,$s()(gU));class FC{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}class hp{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function fZ(n,e,t){let r,i;t=t||Lm;let s=0,a=n.length,o=!1;for(;s<a;)r=s+(a-s>>1),i=+t(n[r],e),i<0?s=r+1:(a=r,o=!i);return o?s:~s}function Lm(n,e){return n>e?1:n<e?-1:0}function pZ(n,e){return n<e?1:n>e?-1:0}function Ax(n,e,t){if(n[0]<=e)return 0;const r=n.length;if(e<=n[r-1])return r-1;if(typeof t=="function"){for(let i=1;i<r;++i){const s=n[i];if(s===e)return i;if(s<e)return t(e,n[i-1],s)>0?i-1:i}return r-1}if(t>0){for(let i=1;i<r;++i)if(n[i]<e)return i-1;return r-1}if(t<0){for(let i=1;i<r;++i)if(n[i]<=e)return i;return r-1}for(let i=1;i<r;++i){if(n[i]==e)return i;if(n[i]<e)return n[i-1]-e<e-n[i]?i-1:i}return r-1}function mZ(n,e,t){for(;e<t;){const r=n[e];n[e]=n[t],n[t]=r,++e,--t}}function Zp(n,e){const t=Array.isArray(e)?e:[e],r=t.length;for(let i=0;i<r;i++)n[n.length]=t[i]}function D0(n,e){const t=n.length;if(t!==e.length)return!1;for(let r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}function gZ(n,e,t){const r=e;return n.every(function(i,s){if(s===0)return!0;const a=r(n[s-1],i);return!(a>0||a===0)})}function oC(){return!0}function cx(){return!1}function gy(){}function yU(n){let e,t,r;return function(){const i=Array.prototype.slice.call(arguments);return(!t||this!==r||!D0(i,t))&&(r=this,t=i,e=n.apply(this,arguments)),e}}function yy(n){function e(){let t;try{t=n()}catch(r){return Promise.reject(r)}return t instanceof Promise?t:Promise.resolve(t)}return e()}function LC(n){for(const e in n)delete n[e]}function T0(n){let e;for(e in n)return!1;return!e}class UC extends FC{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;const r=this.listeners_||(this.listeners_={}),i=r[e]||(r[e]=[]);i.includes(t)||i.push(t)}dispatchEvent(e){const t=typeof e=="string",r=t?e:e.type,i=this.listeners_&&this.listeners_[r];if(!i)return;const s=t?new hp(e):e;s.target||(s.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});r in a||(a[r]=0,o[r]=0),++a[r];let d;for(let g=0,b=i.length;g<b;++g)if("handleEvent"in i[g]?d=i[g].handleEvent(s):d=i[g].call(this,s),d===!1||s.propagationStopped){d=!1;break}if(--a[r]===0){let g=o[r];for(delete o[r];g--;)this.removeEventListener(r,gy);delete a[r]}return d}disposeInternal(){this.listeners_&&LC(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;const r=this.listeners_[e];if(!r)return;const i=r.indexOf(t);i!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(r[i]=gy,++this.pendingRemovals_[e]):(r.splice(i,1),r.length===0&&delete this.listeners_[e]))}}const io={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"},hi={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},sC={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Pc={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Pc.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Pc.max=Pc.whitepoint[2].D65;Pc.rgb=function(n,e){e=e||Pc.whitepoint[2].E;var t=n[0]/e[0],r=n[1]/e[1],i=n[2]/e[2],s,a,o;return s=t*3.240969941904521+r*-1.537383177570093+i*-.498610760293,a=t*-.96924363628087+r*1.87596750150772+i*.041555057407175,o=t*.055630079696993+r*-.20397695888897+i*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[s*255,a*255,o*255]};sC.xyz=function(n,e){var t=n[0]/255,r=n[1]/255,i=n[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var s=t*.41239079926595+r*.35758433938387+i*.18048078840183,a=t*.21263900587151+r*.71516867876775+i*.072192315360733,o=t*.019330818715591+r*.11919477979462+i*.95053215224966;return e=e||Pc.whitepoint[2].E,[s*e[0],a*e[1],o*e[2]]};const WB={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(n,e,t){var r,i,s,a,o,d,g,b,E,S,O,k,U;if(s=n[0],a=n[1],o=n[2],s===0)return[0,0,0];var z=.0011070564598794539;return e=e||"D65",t=t||2,E=Pc.whitepoint[t][e][0],S=Pc.whitepoint[t][e][1],O=Pc.whitepoint[t][e][2],k=4*E/(E+15*S+3*O),U=9*S/(E+15*S+3*O),r=a/(13*s)+k||0,i=o/(13*s)+U||0,g=s>8?S*Math.pow((s+16)/116,3):S*s*z,d=g*9*r/(4*i)||0,b=g*(12-3*r-20*i)/(4*i)||0,[d,g,b]}};Pc.luv=function(n,e,t){var r,i,s,a,o,d,g,b,E,S,O,k,U,z=.008856451679035631,q=903.2962962962961;e=e||"D65",t=t||2,E=Pc.whitepoint[t][e][0],S=Pc.whitepoint[t][e][1],O=Pc.whitepoint[t][e][2],k=4*E/(E+15*S+3*O),U=9*S/(E+15*S+3*O),d=n[0],g=n[1],b=n[2],r=4*d/(d+15*g+3*b)||0,i=9*g/(d+15*g+3*b)||0;var Q=g/S;return s=Q<=z?q*Q:116*Math.pow(Q,1/3)-16,a=13*s*(r-k),o=13*s*(i-U),[s,a,o]};var vU={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(n){var e=n[0],t=n[1],r=n[2],i,s,a;return a=r/360*2*Math.PI,i=t*Math.cos(a),s=t*Math.sin(a),[e,i,s]},xyz:function(n){return WB.xyz(vU.luv(n))}};WB.lchuv=function(n){var e=n[0],t=n[1],r=n[2],i=Math.sqrt(t*t+r*r),s=Math.atan2(r,t),a=s*360/2/Math.PI;return a<0&&(a+=360),[e,i,a]};Pc.lchuv=function(n){return WB.lchuv(Pc.luv(n))};const q7={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Y7={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function yZ(n){var b,E;var e,t=[],r=1,i;if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(n=String(n).toLowerCase(),q7[n])t=q7[n].slice(),i="rgb";else if(n==="transparent")r=0,i="rgb",t=[0,0,0];else if(n[0]==="#"){var s=n.slice(1),a=s.length,o=a<=4;r=1,o?(t=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],a===4&&(r=parseInt(s[3]+s[3],16)/255)):(t=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],a===8&&(r=parseInt(s[6]+s[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)){var d=e[1];i=d.replace(/a$/,"");var g=i==="cmyk"?4:i==="gray"?1:3;t=e[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=t.shift()),t=t.map(function(S,O){if(S[S.length-1]==="%")return S=parseFloat(S)/100,O===3?S:i==="rgb"?S*255:i[0]==="h"||i[0]==="l"&&!O?S*100:i==="lab"?S*125:i==="lch"?O<2?S*150:S*360:i[0]==="o"&&!O?S:i==="oklab"?S*.4:i==="oklch"?O<2?S*.4:S*360:S;if(i[O]==="h"||O===2&&i[i.length-1]==="h"){if(Y7[S]!==void 0)return Y7[S];if(S.endsWith("deg"))return parseFloat(S);if(S.endsWith("turn"))return parseFloat(S)*360;if(S.endsWith("grad"))return parseFloat(S)*360/400;if(S.endsWith("rad"))return parseFloat(S)*180/Math.PI}return S==="none"?0:parseFloat(S)}),r=t.length>g?t.pop():1}else/[0-9](?:\s|\/|,)/.test(n)&&(t=n.match(/([0-9]+)/g).map(function(S){return parseFloat(S)}),i=((E=(b=n.match(/([a-z])/ig))==null?void 0:b.join(""))==null?void 0:E.toLowerCase())||"rgb");return{space:i,values:t,alpha:r}}const b4={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(n){var e=n[0]/360,t=n[1]/100,r=n[2]/100,i,s,a,o,d,g=0;if(t===0)return d=r*255,[d,d,d];for(s=r<.5?r*(1+t):r+t-r*t,i=2*r-s,o=[0,0,0];g<3;)a=e+1/3*-(g-1),a<0?a++:a>1&&a--,d=6*a<1?i+(s-i)*6*a:2*a<1?s:3*a<2?i+(s-i)*(2/3-a)*6:i,o[g++]=d*255;return o}};sC.hsl=function(n){var e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.min(e,t,r),s=Math.max(e,t,r),a=s-i,o,d,g;return s===i?o=0:e===s?o=(t-r)/a:t===s?o=2+(r-e)/a:r===s&&(o=4+(e-t)/a),o=Math.min(o*60,360),o<0&&(o+=360),g=(i+s)/2,s===i?d=0:g<=.5?d=a/(s+i):d=a/(2-s-i),[o,d*100,g*100]};function vZ(n){Array.isArray(n)&&n.raw&&(n=String.raw(...arguments)),n instanceof Number&&(n=+n);var e,t=yZ(n);if(!t.space)return[];const r=t.space[0]==="h"?b4.min:sC.min,i=t.space[0]==="h"?b4.max:sC.max;return e=Array(3),e[0]=Math.min(Math.max(t.values[0],r[0]),i[0]),e[1]=Math.min(Math.max(t.values[1],r[1]),i[1]),e[2]=Math.min(Math.max(t.values[2],r[2]),i[2]),t.space[0]==="h"&&(e=b4.rgb(e)),e.push(Math.min(Math.max(t.alpha,0),1)),e}function Tu(n,e,t){return Math.min(Math.max(n,e),t)}function CZ(n,e,t,r,i,s){const a=i-t,o=s-r;if(a!==0||o!==0){const d=((n-t)*a+(e-r)*o)/(a*a+o*o);d>1?(t=i,r=s):d>0&&(t+=a*d,r+=o*d)}return xg(n,e,t,r)}function xg(n,e,t,r){const i=t-n,s=r-e;return i*i+s*s}function _Z(n){const e=n.length;for(let r=0;r<e;r++){let i=r,s=Math.abs(n[r][r]);for(let o=r+1;o<e;o++){const d=Math.abs(n[o][r]);d>s&&(s=d,i=o)}if(s===0)return null;const a=n[i];n[i]=n[r],n[r]=a;for(let o=r+1;o<e;o++){const d=-n[o][r]/n[r][r];for(let g=r;g<e+1;g++)r==g?n[o][g]=0:n[o][g]+=d*n[r][g]}}const t=new Array(e);for(let r=e-1;r>=0;r--){t[r]=n[r][e]/n[r][r];for(let i=r-1;i>=0;i--)n[i][e]-=n[i][r]*t[r]}return t}function $7(n){return n*180/Math.PI}function E0(n){return n*Math.PI/180}function wg(n,e){const t=n%e;return t*e<0?t+e:t}function Gh(n,e,t){return n+t*(e-n)}function GB(n,e){const t=Math.pow(10,e);return Math.round(n*t)/t}function j_(n,e){return Math.floor(GB(n,e))}function C0(n,e){return Math.ceil(GB(n,e))}function M6(n,e,t){if(n>=e&&n<t)return n;const r=t-e;return((n-e)%r+r)%r+e}const QB=[NaN,NaN,NaN,0];function bZ(n){return typeof n=="string"?n:YB(n)}const xZ=1024,av={};let x4=0;function wZ(n){if(n.length===4)return n;const e=n.slice();return e[3]=1,e}function V7(n){const e=Pc.lchuv(sC.xyz(n));return e[3]=n[3],e}function MZ(n){const e=Pc.rgb(vU.xyz(n));return e[3]=n[3],e}function qB(n){if(n==="none")return QB;if(av.hasOwnProperty(n))return av[n];if(x4>=xZ){let t=0;for(const r in av)t++&3||(delete av[r],--x4)}const e=vZ(n);if(e.length!==4)throw new Error('failed to parse "'+n+'" as color');for(const t of e)if(isNaN(t))throw new Error('failed to parse "'+n+'" as color');return CU(e),av[n]=e,++x4,e}function vy(n){return Array.isArray(n)?n:qB(n)}function CU(n){return n[0]=Tu(n[0]+.5|0,0,255),n[1]=Tu(n[1]+.5|0,0,255),n[2]=Tu(n[2]+.5|0,0,255),n[3]=Tu(n[3],0,1),n}function YB(n){let e=n[0];e!=(e|0)&&(e=e+.5|0);let t=n[1];t!=(t|0)&&(t=t+.5|0);let r=n[2];r!=(r|0)&&(r=r+.5|0);const i=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+e+","+t+","+r+","+i+")"}const P0=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",SZ=P0.includes("firefox"),EZ=P0.includes("safari")&&!P0.includes("chrom");EZ&&(P0.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(P0));const BZ=P0.includes("webkit")&&!P0.includes("edge"),_U=P0.includes("macintosh"),bU=typeof devicePixelRatio<"u"?devicePixelRatio:1,$B=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,xU=typeof Image<"u"&&Image.prototype.decode,wU=function(){let n=!1;try{const e=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return n}();function Jl(n,e,t,r){let i;return t&&t.length?i=t.shift():$B?i=new OffscreenCanvas(n||300,e||300):i=document.createElement("canvas"),n&&(i.width=n),e&&(i.height=e),i.getContext("2d",r)}let w4;function Jb(){return w4||(w4=Jl(1,1)),w4}function zC(n){const e=n.canvas;e.width=1,e.height=1,n.clearRect(0,0,1,1)}function OZ(n){let e=n.offsetWidth;const t=getComputedStyle(n);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function IZ(n){let e=n.offsetHeight;const t=getComputedStyle(n);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function H7(n,e){const t=e.parentNode;t&&t.replaceChild(n,e)}function MU(n){for(;n.lastChild;)n.lastChild.remove()}function kZ(n,e){const t=n.childNodes;for(let r=0;;++r){const i=t[r],s=e[r];if(!i&&!s)break;if(i!==s){if(!i){n.appendChild(s);continue}if(!s){n.removeChild(i),--r;continue}n.insertBefore(s,i)}}}function Ts(n,e,t,r,i){if(i){const a=t;t=function(){n.removeEventListener(e,t),a.apply(r??this,arguments)}}else r&&r!==n&&(t=t.bind(r));const s={target:n,type:e,listener:t};return n.addEventListener(e,t),s}function e2(n,e,t,r){return Ts(n,e,t,r,!0)}function Ka(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),LC(n))}class VB extends UC{constructor(e,t,r,i){super(),this.extent=e,this.pixelRatio_=r,this.resolution=t,this.state=typeof i=="function"?hi.IDLE:i,this.image_=null,this.loader=typeof i=="function"?i:null}changed(){this.dispatchEvent(io.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==hi.IDLE&&this.loader){this.state=hi.LOADING,this.changed();const e=this.getResolution(),t=Array.isArray(e)?e[0]:e;yy(()=>this.loader(this.getExtent(),t,this.getPixelRatio())).then(r=>{"image"in r&&(this.image_=r.image),"extent"in r&&(this.extent=r.extent),"resolution"in r&&(this.resolution=r.resolution),"pixelRatio"in r&&(this.pixelRatio_=r.pixelRatio),(r instanceof HTMLImageElement||r instanceof ImageBitmap||r instanceof HTMLCanvasElement||r instanceof HTMLVideoElement)&&(this.image_=r),this.state=hi.LOADED}).catch(r=>{this.state=hi.ERROR,console.error(r)}).finally(()=>this.changed())}}setImage(e){this.image_=e}setResolution(e){this.resolution=e}}function TZ(n,e,t){const r=n;let i=!0,s=!1,a=!1;const o=[e2(r,io.LOAD,function(){a=!0,s||e()})];return r.src&&xU?(s=!0,r.decode().then(function(){i&&e()}).catch(function(d){i&&(a?e():t())})):o.push(e2(r,io.ERROR,t)),function(){i=!1,o.forEach(Ka)}}function PZ(n,e){return new Promise((t,r)=>{function i(){a(),t(n)}function s(){a(),r(new Error("Image load error"))}function a(){n.removeEventListener("load",i),n.removeEventListener("error",s)}n.addEventListener("load",i),n.addEventListener("error",s)})}function RZ(n,e){return e&&(n.src=e),n.src&&xU?new Promise((t,r)=>n.decode().then(()=>t(n)).catch(i=>n.complete&&n.width?t(n):r(i))):PZ(n)}class DZ{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const t in this.cache_){const r=this.cache_[t];!(e++&3)&&!r.hasListener()&&(delete this.cache_[t],delete this.patternCache_[t],--this.cacheSize_)}}}get(e,t,r){const i=M4(e,t,r);return i in this.cache_?this.cache_[i]:null}getPattern(e,t,r){const i=M4(e,t,r);return i in this.patternCache_?this.patternCache_[i]:null}set(e,t,r,i,s){const a=M4(e,t,r),o=a in this.cache_;this.cache_[a]=i,s&&(i.getImageState()===hi.IDLE&&i.load(),i.getImageState()===hi.LOADING?i.ready().then(()=>{this.patternCache_[a]=Jb().createPattern(i.getImage(1),"repeat")}):this.patternCache_[a]=Jb().createPattern(i.getImage(1),"repeat")),o||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function M4(n,e,t){const r=t?vy(t):"null";return e+":"+n+":"+r}const Mf=new DZ;let lv=null;class SU extends UC{constructor(e,t,r,i,s){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.imageState_=i===void 0?hi.IDLE:i,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=t,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===hi.LOADED){lv||(lv=Jl(1,1,void 0,{willReadFrequently:!0})),lv.drawImage(this.image_,0,0);try{lv.getImageData(0,0,1,1),this.tainted_=!1}catch{lv=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(io.CHANGE)}handleImageError_(){this.imageState_=hi.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=hi.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],t=this.size_[1],r=Jl(e,t);r.fillRect(0,0,e,t),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===hi.IDLE){this.image_||this.initializeImage_(),this.imageState_=hi.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&RZ(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==hi.LOADED)return;const t=this.image_,r=Jl(Math.ceil(t.width*e),Math.ceil(t.height*e)),i=r.canvas;r.scale(e,e),r.drawImage(t,0,0),r.globalCompositeOperation="multiply",r.fillStyle=bZ(this.color_),r.fillRect(0,0,i.width/e,i.height/e),r.globalCompositeOperation="destination-in",r.drawImage(t,0,0),this.canvas_[e]=i}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===hi.LOADED||this.imageState_===hi.ERROR)e();else{const t=()=>{(this.imageState_===hi.LOADED||this.imageState_===hi.ERROR)&&(this.removeEventListener(io.CHANGE,t),e())};this.addEventListener(io.CHANGE,t)}})),this.ready_}}function HB(n,e,t,r,i,s){let a=e===void 0?void 0:Mf.get(e,t,i);return a||(a=new SU(n,n&&"src"in n?n.src||void 0:e,t,r,i),Mf.set(e,t,i,a,s)),s&&a&&!Mf.getPattern(e,t,i)&&Mf.set(e,t,i,a,s),a}function go(){throw new Error("Unimplemented abstract method.")}let KZ=0;function Lo(n){return n.ol_uid||(n.ol_uid=String(++KZ))}function Z7(n){return n[0]>0&&n[1]>0}function FZ(n,e,t){return t===void 0&&(t=[0,0]),t[0]=n[0]*e+.5|0,t[1]=n[1]*e+.5|0,t}function ad(n,e){return Array.isArray(n)?n:(e===void 0?e=[n,n]:(e[0]=n,e[1]=n),e)}class dx{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=ad(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new dx({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return go()}getImage(e){return go()}getHitDetectionImage(){return go()}getPixelRatio(e){return 1}getImageState(){return go()}getImageSize(){return go()}getOrigin(){return go()}getSize(){return go()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=ad(e)}listenImageChange(e){go()}load(){go()}unlistenImageChange(e){go()}ready(){return Promise.resolve()}}function qp(n){return n?Array.isArray(n)?YB(n):typeof n=="object"&&"src"in n?LZ(n):n:null}function LZ(n){if(!n.offset||!n.size)return Mf.getPattern(n.src,"anonymous",n.color);const e=n.src+":"+n.offset,t=Mf.getPattern(e,void 0,n.color);if(t)return t;const r=Mf.get(n.src,"anonymous",null);if(r.getImageState()!==hi.LOADED)return null;const i=Jl(n.size[0],n.size[1]);return i.drawImage(r.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),HB(i.canvas,e,void 0,hi.LOADED,n.color,!0),Mf.getPattern(e,void 0,n.color)}const Cy={PROPERTYCHANGE:"propertychange"};class jC extends UC{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(io.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){const r=e.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=Ts(this,e[s],t);return i}return Ts(this,e,t)}onceInternal(e,t){let r;if(Array.isArray(e)){const i=e.length;r=new Array(i);for(let s=0;s<i;++s)r[s]=e2(this,e[s],t)}else r=e2(this,e,t);return t.ol_key=r,r}unInternal(e,t){const r=t.ol_key;if(r)UZ(r);else if(Array.isArray(e))for(let i=0,s=e.length;i<s;++i)this.removeEventListener(e[i],t);else this.removeEventListener(e,t)}}jC.prototype.on;jC.prototype.once;jC.prototype.un;function UZ(n){if(Array.isArray(n))for(let e=0,t=n.length;e<t;++e)Ka(n[e]);else Ka(n)}class X7 extends hp{constructor(e,t,r){super(e),this.key=t,this.oldValue=r}}class fp extends jC{constructor(e){super(),this.on,this.once,this.un,Lo(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,t){let r;r=`change:${e}`,this.hasListener(r)&&this.dispatchEvent(new X7(r,e,t)),r=Cy.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new X7(r,e,t))}addChangeListener(e,t){this.addEventListener(`change:${e}`,t)}removeChangeListener(e,t){this.removeEventListener(`change:${e}`,t)}set(e,t,r){const i=this.values_||(this.values_={});if(r)i[e]=t;else{const s=i[e];i[e]=t,s!==t&&this.notify(e,s)}}setProperties(e,t){for(const r in e)this.set(r,e[r],t)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,t){if(this.values_&&e in this.values_){const r=this.values_[e];delete this.values_[e],T0(this.values_)&&(this.values_=null),t||this.notify(e,r)}}}const N_="ol-hidden",zZ="ol-selectable",hx="ol-unselectable",ZB="ol-control",J7="ol-collapsed",jZ=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"),ek=["style","variant","weight","size","lineHeight","family"],EU=function(n){const e=n.match(jZ);if(!e)return null;const t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let r=0,i=ek.length;r<i;++r){const s=e[r+1];s!==void 0&&(t[ek[r]]=s)}return t.families=t.family.split(/,\s?/),t},BU="10px sans-serif",mh="#000",_y="round",Um=[],zm=0,by="round",aC=10,lC="#000",uC="center",t2="middle",pg=[0,0,0,0],AC=1,Kp=new fp;let F1=null,S6;const E6={},OU=function(){const e="32px ",t=["monospace","serif"],r=t.length,i="wmytzilWMYTZIL@#/&?$%10";let s,a;function o(g,b,E){let S=!0;for(let O=0;O<r;++O){const k=t[O];if(a=n2(g+" "+b+" "+e+k,i),E!=k){const U=n2(g+" "+b+" "+e+E+","+k,i);S=S&&U!=a}}return!!S}function d(){let g=!0;const b=Kp.getKeys();for(let E=0,S=b.length;E<S;++E){const O=b[E];if(Kp.get(O)<100){const[k,U,z]=O.split(`
|
||
`);o(k,U,z)?(LC(E6),F1=null,S6=void 0,Kp.set(O,100)):(Kp.set(O,Kp.get(O)+1,!0),g=!1)}}g&&(clearInterval(s),s=void 0)}return function(g){const b=EU(g);if(!b)return;const E=b.families;for(let S=0,O=E.length;S<O;++S){const k=E[S],U=b.style+`
|
||
`+b.weight+`
|
||
`+k;Kp.get(U)===void 0&&(Kp.set(U,100,!0),o(b.style,b.weight,k)||(Kp.set(U,0,!0),s===void 0&&(s=setInterval(d,32))))}}}(),NZ=function(){let n;return function(e){let t=E6[e];if(t==null){if($B){const r=EU(e),i=IU(e,"Žg");t=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=e,document.body.appendChild(n),t=n.offsetHeight,document.body.removeChild(n);E6[e]=t}return t}}();function IU(n,e){return F1||(F1=Jl(1,1)),n!=S6&&(F1.font=n,S6=F1.font),F1.measureText(e)}function n2(n,e){return IU(n,e).width}function tk(n,e,t){if(e in t)return t[e];const r=e.split(`
|
||
`).reduce((i,s)=>Math.max(i,n2(n,s)),0);return t[e]=r,r}function WZ(n,e){const t=[],r=[],i=[];let s=0,a=0,o=0,d=0;for(let g=0,b=e.length;g<=b;g+=2){const E=e[g];if(E===`
|
||
`||g===b){s=Math.max(s,a),i.push(a),a=0,o+=d,d=0;continue}const S=e[g+1]||n.font,O=n2(S,E);t.push(O),a+=O;const k=NZ(S);r.push(k),d=Math.max(d,k)}return{width:s,height:o,widths:t,heights:r,lineWidths:i}}function GZ(n,e,t,r,i,s,a,o,d,g,b){n.save(),t!==1&&(n.globalAlpha===void 0?n.globalAlpha=E=>E.globalAlpha*=t:n.globalAlpha*=t),e&&n.transform.apply(n,e),r.contextInstructions?(n.translate(d,g),n.scale(b[0],b[1]),QZ(r,n)):b[0]<0||b[1]<0?(n.translate(d,g),n.scale(b[0],b[1]),n.drawImage(r,i,s,a,o,0,0,a,o)):n.drawImage(r,i,s,a,o,d,g,a*b[0],o*b[1]),n.restore()}function QZ(n,e){const t=n.contextInstructions;for(let r=0,i=t.length;r<i;r+=2)Array.isArray(t[r+1])?e[t[r]].apply(e,t[r+1]):e[t[r]]=t[r+1]}class fx extends dx{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,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.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?hi.LOADING:hi.LOADED,this.imageState_===hi.LOADING&&this.ready().then(()=>this.imageState_=hi.LOADED),this.render()}clone(){const e=this.getScale(),t=new fx({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 t.setOpacity(this.getOpacity()),t}getAnchor(){const e=this.size_,t=this.getDisplacement(),r=this.getScaleArray();return[e[0]/2-t[0]/r[0],e[1]/2+t[1]/r[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){var s,a;const t=(s=this.fill_)==null?void 0:s.getKey(),r=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}`+Object.values(this.renderOptions_).join(",");let i=(a=Mf.get(r,null,null))==null?void 0:a.getImage(1);if(!i){const o=this.renderOptions_,d=Math.ceil(o.size*e),g=Jl(d,d);this.draw_(o,g,e),i=g.canvas,Mf.set(r,null,null,new SU(i,void 0,null,hi.LOADED,null))}return i}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,t,r){if(t===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return t;let i=this.radius,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const ee=i;i=s,s=ee}const a=this.radius2_===void 0?this.points_:this.points_*2,o=2*Math.PI/a,d=s*Math.sin(o),g=Math.sqrt(s*s-d*d),b=i-g,E=Math.sqrt(d*d+b*b),S=E/d;if(e==="miter"&&S<=r)return S*t;const O=t/2/S,k=t/2*(b/E),z=Math.sqrt((i+O)*(i+O)+k*k)-i;if(this.radius2_===void 0||e==="bevel")return z*2;const q=i*Math.sin(o),Q=Math.sqrt(i*i-q*q),re=s-Q,Y=Math.sqrt(q*q+re*re)/q;if(Y<=r){const ee=Y*t/2-s-i;return 2*Math.max(z,ee)}return z*2}createRenderOptions(){let e=_y,t=by,r=0,i=null,s=0,a,o=0;this.stroke_&&(a=qp(this.stroke_.getColor()??lC),o=this.stroke_.getWidth()??AC,i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset()??0,t=this.stroke_.getLineJoin()??by,e=this.stroke_.getLineCap()??_y,r=this.stroke_.getMiterLimit()??aC);const d=this.calculateLineJoinSize_(t,o,r),g=Math.max(this.radius,this.radius2_||0),b=Math.ceil(2*g+d);return{strokeStyle:a,strokeWidth:o,size:b,lineCap:e,lineDash:i,lineDashOffset:s,lineJoin:t,miterLimit:r}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,t,r){if(t.scale(r,r),t.translate(e.size/2,e.size/2),this.createPath_(t),this.fill_){let i=this.fill_.getColor();i===null&&(i=mh),t.fillStyle=qp(i),t.fill()}e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}createHitDetectionCanvas_(e){let t;if(this.fill_){let r=this.fill_.getColor(),i=0;typeof r=="string"&&(r=vy(r)),r===null?i=1:Array.isArray(r)&&(i=r.length===4?r[3]:1),i===0&&(t=Jl(e.size,e.size),this.drawHitDetectionCanvas_(e,t))}return t?t.canvas:this.getImage(1)}createPath_(e){let t=this.points_;const r=this.radius;if(t===1/0)e.arc(0,0,r,0,2*Math.PI);else{const i=this.radius2_===void 0?r:this.radius2_;this.radius2_!==void 0&&(t*=2);const s=this.angle_-Math.PI/2,a=2*Math.PI/t;for(let o=0;o<t;o++){const d=s+o*a,g=o%2===0?r:i;e.lineTo(g*Math.cos(d),g*Math.sin(d))}e.closePath()}}drawHitDetectionCanvas_(e,t){t.translate(e.size/2,e.size/2),this.createPath_(t),t.fillStyle=mh,t.fill(),e.strokeStyle&&(t.strokeStyle=e.strokeStyle,t.lineWidth=e.strokeWidth,e.lineDash&&(t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset),t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit,t.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class NC extends fx{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),t=new NC({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 t.setOpacity(this.getOpacity()),t}setRadius(e){this.radius=e,this.render()}}class Km{constructor(e){e=e||{},this.patternImage_=null,this.color_=null,e.color!==void 0&&this.setColor(e.color)}clone(){const e=this.getColor();return new Km({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){if(e!==null&&typeof e=="object"&&"src"in e){const t=HB(null,e.src,"anonymous",void 0,e.offset?null:e.color?e.color:null,!(e.offset&&e.size));t.ready().then(()=>{this.patternImage_=null}),t.getImageState()===hi.IDLE&&t.load(),t.getImageState()===hi.LOADING&&(this.patternImage_=t)}this.color_=e}getKey(){const e=this.getColor();return e?e instanceof CanvasPattern||e instanceof CanvasGradient?Lo(e):typeof e=="object"&&"src"in e?e.src+":"+e.offset:vy(e).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function ra(n,e){if(!n)throw new Error(e)}function nk(n,e,t,r){return t!==void 0&&r!==void 0?[t/n,r/e]:t!==void 0?t/n:r!==void 0?r/e:1}let r2=class kU extends dx{constructor(e){e=e||{};const t=e.opacity!==void 0?e.opacity:1,r=e.rotation!==void 0?e.rotation:0,i=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:t,rotation:r,scale:i,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const a=e.img!==void 0?e.img:null;let o=e.src;ra(!(o!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(o===void 0||o.length===0)&&a&&(o=a.src||Lo(a)),ra(o!==void 0&&o.length>0,"A defined and non-empty `src` or `image` must be provided"),ra(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let d;if(e.src!==void 0?d=hi.IDLE:a!==void 0&&("complete"in a?a.complete?d=a.src?hi.LOADED:hi.IDLE:d=hi.LOADING:d=hi.LOADED),this.color_=e.color!==void 0?vy(e.color):null,this.iconImage_=HB(a,o,this.crossOrigin_,d,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let g,b;if(e.size)[g,b]=e.size;else{const E=this.getImage(1);if(E.width&&E.height)g=E.width,b=E.height;else if(E instanceof HTMLImageElement){this.initialOptions_=e;const S=()=>{if(this.unlistenImageChange(S),!this.initialOptions_)return;const O=this.iconImage_.getSize();this.setScale(nk(O[0],O[1],e.width,e.height))};this.listenImageChange(S);return}}g!==void 0&&this.setScale(nk(g,b,e.width,e.height))}}clone(){let e,t,r;return this.initialOptions_?(t=this.initialOptions_.width,r=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new kU({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_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:t,height:r,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const i=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!i)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=i[0]),this.anchorYUnits_=="fraction"&&(e[1]*=i[1])}if(this.anchorOrigin_!="top-left"){if(!i)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+i[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+i[1])}this.normalizedAnchor_=e}const t=this.getDisplacement(),r=this.getScaleArray();return[e[0]-t[0]/r[0],e[1]+t[1]/r[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const t=this.getSize(),r=this.iconImage_.getSize();if(!t||!r)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=r[0]-t[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=r[1]-t[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==hi.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==hi.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(io.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(io.CHANGE,e)}ready(){return this.iconImage_.ready()}};class px extends fp{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const t=e;this.setGeometry(t)}else{const t=e;this.setProperties(t)}}clone(){const e=new px(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const t=this.getGeometry();t&&e.setGeometry(t.clone());const r=this.getStyle();return r&&e.setStyle(r),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Ka(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=Ts(e,io.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?qZ(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function qZ(n){if(typeof n=="function")return n;let e;return Array.isArray(n)?e=n:(ra(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[n]),function(){return e}}const TU=new Array(6);function Ch(){return[1,0,0,1,0,0]}function rk(n){return JB(n,1,0,0,1,0,0)}function XB(n,e){const t=n[0],r=n[1],i=n[2],s=n[3],a=n[4],o=n[5],d=e[0],g=e[1],b=e[2],E=e[3],S=e[4],O=e[5];return n[0]=t*d+i*g,n[1]=r*d+s*g,n[2]=t*b+i*E,n[3]=r*b+s*E,n[4]=t*S+i*O+a,n[5]=r*S+s*O+o,n}function JB(n,e,t,r,i,s,a){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n[4]=s,n[5]=a,n}function YZ(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function yA(n,e){const t=e[0],r=e[1];return e[0]=n[0]*t+n[2]*r+n[4],e[1]=n[1]*t+n[3]*r+n[5],e}function S4(n,e,t){return XB(n,JB(TU,e,0,0,t,0,0))}function $Z(n,e,t){return XB(n,JB(TU,1,0,0,1,e,t))}function em(n,e,t,r,i,s,a,o){const d=Math.sin(s),g=Math.cos(s);return n[0]=r*g,n[1]=i*d,n[2]=-r*d,n[3]=i*g,n[4]=a*r*g-o*r*d+e,n[5]=a*i*d+o*i*g+t,n}function PU(n,e){const t=VZ(e);ra(t!==0,"Transformation matrix cannot be inverted");const r=e[0],i=e[1],s=e[2],a=e[3],o=e[4],d=e[5];return n[0]=a/t,n[1]=-i/t,n[2]=-s/t,n[3]=r/t,n[4]=(s*d-a*o)/t,n[5]=-(r*d-i*o)/t,n}function VZ(n){return n[0]*n[3]-n[1]*n[2]}const ik=[1e6,1e6,1e6,1e6,2,2];function HZ(n){return"matrix("+n.map((t,r)=>Math.round(t*ik[r])/ik[r]).join(", ")+")"}const Ac={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function B6(n){const e=Hh();for(let t=0,r=n.length;t<r;++t)Wv(e,n[t]);return e}function ZZ(n,e,t){const r=Math.min.apply(null,n),i=Math.min.apply(null,e),s=Math.max.apply(null,n),a=Math.max.apply(null,e);return Wm(r,i,s,a,t)}function B0(n,e,t){return t?(t[0]=n[0]-e,t[1]=n[1]-e,t[2]=n[2]+e,t[3]=n[3]+e,t):[n[0]-e,n[1]-e,n[2]+e,n[3]+e]}function RU(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n.slice()}function Fg(n,e,t){let r,i;return e<n[0]?r=n[0]-e:n[2]<e?r=e-n[2]:r=0,t<n[1]?i=n[1]-t:n[3]<t?i=t-n[3]:i=0,r*r+i*i}function Ig(n,e){return eO(n,e[0],e[1])}function lp(n,e){return n[0]<=e[0]&&e[2]<=n[2]&&n[1]<=e[1]&&e[3]<=n[3]}function eO(n,e,t){return n[0]<=e&&e<=n[2]&&n[1]<=t&&t<=n[3]}function O6(n,e){const t=n[0],r=n[1],i=n[2],s=n[3],a=e[0],o=e[1];let d=Ac.UNKNOWN;return a<t?d=d|Ac.LEFT:a>i&&(d=d|Ac.RIGHT),o<r?d=d|Ac.BELOW:o>s&&(d=d|Ac.ABOVE),d===Ac.UNKNOWN&&(d=Ac.INTERSECTING),d}function Hh(){return[1/0,1/0,-1/0,-1/0]}function Wm(n,e,t,r,i){return i?(i[0]=n,i[1]=e,i[2]=t,i[3]=r,i):[n,e,t,r]}function Ty(n){return Wm(1/0,1/0,-1/0,-1/0,n)}function DU(n,e){const t=n[0],r=n[1];return Wm(t,r,t,r,e)}function tO(n,e,t,r,i){const s=Ty(i);return KU(s,n,e,t,r)}function Gm(n,e){return n[0]==e[0]&&n[2]==e[2]&&n[1]==e[1]&&n[3]==e[3]}function nO(n,e){return e[0]<n[0]&&(n[0]=e[0]),e[2]>n[2]&&(n[2]=e[2]),e[1]<n[1]&&(n[1]=e[1]),e[3]>n[3]&&(n[3]=e[3]),n}function Wv(n,e){e[0]<n[0]&&(n[0]=e[0]),e[0]>n[2]&&(n[2]=e[0]),e[1]<n[1]&&(n[1]=e[1]),e[1]>n[3]&&(n[3]=e[1])}function KU(n,e,t,r,i){for(;t<r;t+=i)XZ(n,e[t],e[t+1]);return n}function XZ(n,e,t){n[0]=Math.min(n[0],e),n[1]=Math.min(n[1],t),n[2]=Math.max(n[2],e),n[3]=Math.max(n[3],t)}function FU(n,e){let t;return t=e(mx(n)),t||(t=e(gx(n)),t)||(t=e(yx(n)),t)||(t=e(Ap(n)),t)?t:!1}function cC(n){let e=0;return Lg(n)||(e=ps(n)*Hl(n)),e}function mx(n){return[n[0],n[1]]}function gx(n){return[n[2],n[1]]}function Of(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function JZ(n,e){let t;if(e==="bottom-left")t=mx(n);else if(e==="bottom-right")t=gx(n);else if(e==="top-left")t=Ap(n);else if(e==="top-right")t=yx(n);else throw new Error("Invalid corner");return t}function i2(n,e,t,r,i){const[s,a,o,d,g,b,E,S]=eX(n,e,t,r);return Wm(Math.min(s,o,g,E),Math.min(a,d,b,S),Math.max(s,o,g,E),Math.max(a,d,b,S),i)}function eX(n,e,t,r){const i=e*r[0]/2,s=e*r[1]/2,a=Math.cos(t),o=Math.sin(t),d=i*a,g=i*o,b=s*a,E=s*o,S=n[0],O=n[1];return[S-d+E,O-g-b,S-d-E,O-g+b,S+d-E,O+g+b,S+d+E,O+g-b,S-d+E,O-g-b]}function Hl(n){return n[3]-n[1]}function Qd(n,e,t){const r=t||Hh();return ku(n,e)?(n[0]>e[0]?r[0]=n[0]:r[0]=e[0],n[1]>e[1]?r[1]=n[1]:r[1]=e[1],n[2]<e[2]?r[2]=n[2]:r[2]=e[2],n[3]<e[3]?r[3]=n[3]:r[3]=e[3]):Ty(r),r}function Ap(n){return[n[0],n[3]]}function yx(n){return[n[2],n[3]]}function ps(n){return n[2]-n[0]}function ku(n,e){return n[0]<=e[2]&&n[2]>=e[0]&&n[1]<=e[3]&&n[3]>=e[1]}function Lg(n){return n[2]<n[0]||n[3]<n[1]}function tX(n,e){return e?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e):n}function nX(n,e,t){let r=!1;const i=O6(n,e),s=O6(n,t);if(i===Ac.INTERSECTING||s===Ac.INTERSECTING)r=!0;else{const a=n[0],o=n[1],d=n[2],g=n[3],b=e[0],E=e[1],S=t[0],O=t[1],k=(O-E)/(S-b);let U,z;s&Ac.ABOVE&&!(i&Ac.ABOVE)&&(U=S-(O-g)/k,r=U>=a&&U<=d),!r&&s&Ac.RIGHT&&!(i&Ac.RIGHT)&&(z=O-(S-d)*k,r=z>=o&&z<=g),!r&&s&Ac.BELOW&&!(i&Ac.BELOW)&&(U=S-(O-o)/k,r=U>=a&&U<=d),!r&&s&Ac.LEFT&&!(i&Ac.LEFT)&&(z=O-(S-a)*k,r=z>=o&&z<=g)}return r}function rX(n,e,t,r){if(Lg(n))return Ty(t);let i=[];i=[n[0],n[1],n[2],n[1],n[2],n[3],n[0],n[3]],e(i,i,2);const s=[],a=[];for(let o=0,d=i.length;o<d;o+=2)s.push(i[o]),a.push(i[o+1]);return ZZ(s,a,t)}function LU(n,e){const t=e.getExtent(),r=Of(n);if(e.canWrapX()&&(r[0]<t[0]||r[0]>=t[2])){const i=ps(t),a=Math.floor((r[0]-t[0])/i)*i;n[0]-=a,n[2]-=a}return n}function rO(n,e,t){if(e.canWrapX()){const r=e.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[r[0],n[1],r[2],n[3]]];LU(n,e);const i=ps(r);if(ps(n)>i&&!t)return[[r[0],n[1],r[2],n[3]]];if(n[0]<r[0])return[[n[0]+i,n[1],r[2],n[3]],[r[0],n[1],n[2],n[3]]];if(n[2]>r[2])return[[n[0],n[1],r[2],n[3]],[r[0],n[1],n[2]-i,n[3]]]}return[n]}const R0={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class vx{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||R0[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const WC=6378137,G1=Math.PI*WC,iX=[-G1,-G1,G1,G1],oX=[-180,-85,180,85],W_=WC*Math.log(Math.tan(Math.PI/2));class s1 extends vx{constructor(e){super({code:e,units:"m",extent:iX,global:!0,worldExtent:oX,getPointResolution:function(t,r){return t/Math.cosh(r[1]/WC)}})}}const ok=[new s1("EPSG:3857"),new s1("EPSG:102100"),new s1("EPSG:102113"),new s1("EPSG:900913"),new s1("http://www.opengis.net/def/crs/EPSG/0/3857"),new s1("http://www.opengis.net/gml/srs/epsg.xml#3857")];function sX(n,e,t,r){const i=n.length;t=t>1?t:2,r=r??t,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let s=0;s<i;s+=r){e[s]=G1*n[s]/180;let a=WC*Math.log(Math.tan(Math.PI*(+n[s+1]+90)/360));a>W_?a=W_:a<-W_&&(a=-W_),e[s+1]=a}return e}function aX(n,e,t,r){const i=n.length;t=t>1?t:2,r=r??t,e===void 0&&(t>2?e=n.slice():e=new Array(i));for(let s=0;s<i;s+=r)e[s]=180*n[s]/G1,e[s+1]=360*Math.atan(Math.exp(n[s+1]/WC))/Math.PI-90;return e}const lX=6378137,sk=[-180,-90,180,90],uX=Math.PI*lX/180;class J0 extends vx{constructor(e,t){super({code:e,units:"degrees",extent:sk,axisOrientation:t,global:!0,metersPerUnit:uX,worldExtent:sk})}}const ak=[new J0("CRS:84"),new J0("EPSG:4326","neu"),new J0("urn:ogc:def:crs:OGC:1.3:CRS84"),new J0("urn:ogc:def:crs:OGC:2:84"),new J0("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new J0("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new J0("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let I6={};function AX(n){return I6[n]||I6[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function cX(n,e){I6[n]=e}let ny={};function dC(n,e,t){const r=n.getCode(),i=e.getCode();r in ny||(ny[r]={}),ny[r][i]=t}function E4(n,e){return n in ny&&e in ny[n]?ny[n][e]:null}function dX(n,e){return n[0]+=+e[0],n[1]+=+e[1],n}function o2(n,e){let t=!0;for(let r=n.length-1;r>=0;--r)if(n[r]!=e[r]){t=!1;break}return t}function iO(n,e){const t=Math.cos(e),r=Math.sin(e),i=n[0]*t-n[1]*r,s=n[1]*t+n[0]*r;return n[0]=i,n[1]=s,n}function hX(n,e){return n[0]*=e,n[1]*=e,n}function oO(n,e){if(e.canWrapX()){const t=ps(e.getExtent()),r=fX(n,e,t);r&&(n[0]-=r*t)}return n}function fX(n,e,t){const r=e.getExtent();let i=0;return e.canWrapX()&&(n[0]<r[0]||n[0]>r[2])&&(t=t||ps(r),i=Math.floor((n[0]-r[0])/t)),i}const pX=63710088e-1;function lk(n,e,t){t=t||pX;const r=E0(n[1]),i=E0(e[1]),s=(i-r)/2,a=E0(e[0]-n[0])/2,o=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(i);return 2*t*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}const s2=.9996,Bf=.00669438,Cx=Bf*Bf,_x=Cx*Bf,mg=Bf/(1-Bf),uk=Math.sqrt(1-Bf),xy=(1-uk)/(1+uk),UU=xy*xy,sO=UU*xy,aO=sO*xy,zU=aO*xy,jU=1-Bf/4-3*Cx/64-5*_x/256,mX=3*Bf/8+3*Cx/32+45*_x/1024,gX=15*Cx/256+45*_x/1024,yX=35*_x/3072,vX=3/2*xy-27/32*sO+269/512*zU,CX=21/16*UU-55/32*aO,_X=151/96*sO-417/128*zU,bX=1097/512*aO,a2=6378137;function xX(n,e,t){const r=n-5e5,a=(t.north?e:e-1e7)/s2/(a2*jU),o=a+vX*Math.sin(2*a)+CX*Math.sin(4*a)+_X*Math.sin(6*a)+bX*Math.sin(8*a),d=Math.sin(o),g=d*d,b=Math.cos(o),E=d/b,S=E*E,O=S*S,k=1-Bf*g,U=Math.sqrt(1-Bf*g),z=a2/U,q=(1-Bf)/k,Q=mg*b**2,re=Q*Q,X=r/(z*s2),Y=X*X,ee=Y*X,N=ee*X,ie=N*X,he=ie*X,de=o-E/q*(Y/2-N/24*(5+3*S+10*Q-4*re-9*mg))+he/720*(61+90*S+298*Q+45*O-252*mg-3*re);let Me=(X-ee/6*(1+2*S+Q)+ie/120*(5-2*Q+28*S-3*re+8*mg+24*O))/b;return Me=M6(Me+E0(NU(t.number)),-Math.PI,Math.PI),[$7(Me),$7(de)]}const Ak=-80,ck=84,wX=-180,MX=180;function SX(n,e,t){n=M6(n,wX,MX),e<Ak?e=Ak:e>ck&&(e=ck);const r=E0(e),i=Math.sin(r),s=Math.cos(r),a=i/s,o=a*a,d=o*o,g=E0(n),b=NU(t.number),E=E0(b),S=a2/Math.sqrt(1-Bf*i**2),O=mg*s**2,k=s*M6(g-E,-Math.PI,Math.PI),U=k*k,z=U*k,q=z*k,Q=q*k,re=Q*k,X=a2*(jU*r-mX*Math.sin(2*r)+gX*Math.sin(4*r)-yX*Math.sin(6*r)),Y=s2*S*(k+z/6*(1-o+O)+Q/120*(5-18*o+d+72*O-58*mg))+5e5;let ee=s2*(X+S*a*(U/2+q/24*(5-o+9*O+4*O**2)+re/720*(61-58*o+d+600*O-330*mg)));return t.north||(ee+=1e7),[Y,ee]}function NU(n){return(n-1)*6-180+3}const EX=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function WU(n){let e=0;for(const i of EX){const s=n.match(i);if(s){e=parseInt(s[1]);break}}if(!e)return null;let t=0,r=!1;return e>32700&&e<32761?t=e-32700:e>32600&&e<32661&&(r=!0,t=e-32600),t?{number:t,north:r}:null}function dk(n,e){return function(t,r,i,s){const a=t.length;i=i>1?i:2,s=s??i,r||(i>2?r=t.slice():r=new Array(a));for(let o=0;o<a;o+=s){const d=t[o],g=t[o+1],b=n(d,g,e);r[o]=b[0],r[o+1]=b[1]}return r}}function BX(n){return WU(n)?new vx({code:n,units:"m"}):null}function OX(n){const e=WU(n.getCode());return e?{forward:dk(SX,e),inverse:dk(xX,e)}:null}function GU(...n){console.warn(...n)}const IX=[OX],kX=[BX];let k6=!0;function QU(n){k6=!1}function lO(n,e){if(e!==void 0){for(let t=0,r=n.length;t<r;++t)e[t]=n[t];e=e}else e=n.slice();return e}function T6(n){cX(n.getCode(),n),dC(n,n,lO)}function TX(n){n.forEach(T6)}function Ma(n){if(typeof n!="string")return n;const e=AX(n);if(e)return e;for(const t of kX){const r=t(n);if(r)return r}return null}function P6(n,e,t,r){n=Ma(n);let i;const s=n.getPointResolutionFunc();if(s){if(i=s(e,t),r&&r!==n.getUnits()){const a=n.getMetersPerUnit();a&&(i=i*a/R0[r])}}else{const a=n.getUnits();if(a=="degrees"&&!r||r=="degrees")i=e;else{const o=GC(n,Ma("EPSG:4326"));if(!o&&a!=="degrees")i=e*n.getMetersPerUnit();else{let g=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];g=o(g,g,2);const b=lk(g.slice(0,2),g.slice(2,4)),E=lk(g.slice(4,6),g.slice(6,8));i=(b+E)/2}const d=r?R0[r]:n.getMetersPerUnit();d!==void 0&&(i/=d)}}return i}function hk(n){TX(n),n.forEach(function(e){n.forEach(function(t){e!==t&&dC(e,t,lO)})})}function PX(n,e,t,r){n.forEach(function(i){e.forEach(function(s){dC(i,s,t),dC(s,i,r)})})}function uO(n,e){return n?typeof n=="string"?Ma(n):n:Ma(e)}function RX(n){return function(e,t,r,i){const s=e.length;r=r!==void 0?r:2,i=i??r,t=t!==void 0?t:new Array(s);for(let a=0;a<s;a+=i){const o=n(e.slice(a,a+r)),d=o.length;for(let g=0,b=i;g<b;++g)t[a+g]=g>=d?e[a+g]:o[g]}return t}}function R6(n,e){return QU(),bx(n,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function B4(n,e){const t=bx(n,"EPSG:3857","EPSG:4326"),r=t[0];return(r<-180||r>180)&&(t[0]=wg(r+180,360)-180),t}function Mg(n,e){if(n===e)return!0;const t=n.getUnits()===e.getUnits();return(n.getCode()===e.getCode()||GC(n,e)===lO)&&t}function GC(n,e){const t=n.getCode(),r=e.getCode();let i=E4(t,r);if(i)return i;let s=null,a=null;for(const d of IX)s||(s=d(n)),a||(a=d(e));if(!s&&!a)return null;const o="EPSG:4326";if(a)if(s)i=O4(s.inverse,a.forward);else{const d=E4(t,o);d&&(i=O4(d,a.forward))}else{const d=E4(o,r);d&&(i=O4(s.inverse,d))}return i&&(T6(n),T6(e),dC(n,e,i)),i}function O4(n,e){return function(t,r,i,s){return r=n(t,r,i,s),e(r,r,i,s)}}function hC(n,e){const t=Ma(n),r=Ma(e);return GC(t,r)}function bx(n,e,t){const r=hC(e,t);if(!r){const i=Ma(e).getCode(),s=Ma(t).getCode();throw new Error(`No transform available between ${i} and ${s}`)}return r(n,void 0,n.length)}let DX=null;function KX(){return DX}function D6(n,e){return n}function km(n,e){return k6&&!o2(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(k6=!1,GU("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function AO(n,e){return n}function Yp(n,e){return n}function FX(){hk(ok),hk(ak),PX(ak,ok,sX,aX)}FX();function O0(n,e,t,r,i,s,a){s=s||[],a=a||2;let o=0;for(let d=e;d<t;d+=r){const g=n[d],b=n[d+1];s[o++]=i[0]*g+i[2]*b+i[4],s[o++]=i[1]*g+i[3]*b+i[5];for(let E=2;E<a;E++)s[o++]=n[d+E]}return s&&s.length!=o&&(s.length=o),s}function qU(n,e,t,r,i,s,a){a=a||[];const o=Math.cos(i),d=Math.sin(i),g=s[0],b=s[1];let E=0;for(let S=e;S<t;S+=r){const O=n[S]-g,k=n[S+1]-b;a[E++]=g+O*o-k*d,a[E++]=b+O*d+k*o;for(let U=S+2;U<S+r;++U)a[E++]=n[U]}return a&&a.length!=E&&(a.length=E),a}function LX(n,e,t,r,i,s,a,o){o=o||[];const d=a[0],g=a[1];let b=0;for(let E=e;E<t;E+=r){const S=n[E]-d,O=n[E+1]-g;o[b++]=d+i*S,o[b++]=g+s*O;for(let k=E+2;k<E+r;++k)o[b++]=n[k]}return o&&o.length!=b&&(o.length=b),o}function UX(n,e,t,r,i,s,a){a=a||[];let o=0;for(let d=e;d<t;d+=r){a[o++]=n[d]+i,a[o++]=n[d+1]+s;for(let g=d+2;g<d+r;++g)a[o++]=n[g]}return a&&a.length!=o&&(a.length=o),a}const fk=Ch();class YU extends fp{constructor(){super(),this.extent_=Hh(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=yU((e,t,r)=>{if(!r)return this.getSimplifiedGeometry(t);const i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(t)})}simplifyTransformed(e,t){return this.simplifyTransformedInternal(this.getRevision(),e,t)}clone(){return go()}closestPointXY(e,t,r,i){return go()}containsXY(e,t){const r=this.getClosestPoint([e,t]);return r[0]===e&&r[1]===t}getClosestPoint(e,t){return t=t||[NaN,NaN],this.closestPointXY(e[0],e[1],t,1/0),t}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return go()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Ty(t),this.extentRevision_=this.getRevision()}return tX(this.extent_,e)}rotate(e,t){go()}scale(e,t,r){go()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return go()}getType(){return go()}applyTransform(e){go()}intersectsExtent(e){return go()}translate(e,t){go()}transform(e,t){const r=Ma(e),i=r.getUnits()=="tile-pixels"?function(s,a,o){const d=r.getExtent(),g=r.getWorldExtent(),b=Hl(g)/Hl(d);em(fk,g[0],g[3],b,-b,0,0,0);const E=O0(s,0,s.length,o,fk,a),S=hC(r,t);return S?S(E,E,o):E}:hC(r,t);return this.applyTransform(i),this}}class Ug extends YU{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return tO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return go()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=this.getSimplifiedGeometryInternal(e);return t.getFlatCoordinates().length<this.flatCoordinates.length?t:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,t){this.stride=pk(e),this.layout=e,this.flatCoordinates=t}setCoordinates(e,t){go()}setLayout(e,t,r){let i;if(e)i=pk(e);else{for(let s=0;s<r;++s){if(t.length===0){this.layout="XY",this.stride=2;return}t=t[0]}i=t.length,e=zg(i)}this.layout=e,this.stride=i}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,t){const r=this.getFlatCoordinates();if(r){const i=this.getStride();qU(r,0,r.length,i,e,t,r),this.changed()}}scale(e,t,r){t===void 0&&(t=e),r||(r=Of(this.getExtent()));const i=this.getFlatCoordinates();if(i){const s=this.getStride();LX(i,0,i.length,s,e,t,r,i),this.changed()}}translate(e,t){const r=this.getFlatCoordinates();if(r){const i=this.getStride();UX(r,0,r.length,i,e,t,r),this.changed()}}}function zg(n){let e;return n==2?e="XY":n==3?e="XYZ":n==4&&(e="XYZM"),e}function pk(n){let e;return n=="XY"?e=2:n=="XYZ"||n=="XYM"?e=3:n=="XYZM"&&(e=4),e}function zX(n,e,t){const r=n.getFlatCoordinates();if(!r)return null;const i=n.getStride();return O0(r,0,r.length,i,e,t)}function jX(n,e,t,r){for(let i=0,s=t.length;i<s;++i)n[e++]=t[i];return e}function xx(n,e,t,r){for(let i=0,s=t.length;i<s;++i){const a=t[i];for(let o=0;o<r;++o)n[e++]=a[o]}return e}function QC(n,e,t,r,i){i=i||[];let s=0;for(let a=0,o=t.length;a<o;++a){const d=xx(n,e,t[a],r);i[s++]=d,e=d}return i.length=s,i}function $U(n,e,t,r,i){i=i||[];let s=0;for(let a=0,o=t.length;a<o;++a){const d=QC(n,e,t[a],r,i[s]);d.length===0&&(d[0]=e),i[s++]=d,e=d[d.length-1]}return i.length=s,i}class l2 extends YU{constructor(e){super(),this.geometries_=e,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Ka),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const e=this.geometries_;for(let t=0,r=e.length;t<r;++t)this.changeEventsKeys_.push(Ts(e[t],io.CHANGE,this.changed,this))}clone(){const e=new l2(I4(this.geometries_));return e.applyProperties(this),e}closestPointXY(e,t,r,i){if(i<Fg(this.getExtent(),e,t))return i;const s=this.geometries_;for(let a=0,o=s.length;a<o;++a)i=s[a].closestPointXY(e,t,r,i);return i}containsXY(e,t){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)if(r[i].containsXY(e,t))return!0;return!1}computeExtent(e){Ty(e);const t=this.geometries_;for(let r=0,i=t.length;r<i;++r)nO(e,t[r].getExtent());return e}getGeometries(){return I4(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const t=this.geometries_;for(let r=0,i=t.length;r<i;++r)t[r].getType()===this.getType()?e=e.concat(t[r].getGeometriesArrayRecursive()):e.push(t[r]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const t=[],r=this.geometries_;let i=!1;for(let s=0,a=r.length;s<a;++s){const o=r[s],d=o.getSimplifiedGeometry(e);t.push(d),d!==o&&(i=!0)}return i?new l2(t):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getType(){return"GeometryCollection"}intersectsExtent(e){const t=this.geometries_;for(let r=0,i=t.length;r<i;++r)if(t[r].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,t){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)r[i].rotate(e,t);this.changed()}scale(e,t,r){r||(r=Of(this.getExtent()));const i=this.geometries_;for(let s=0,a=i.length;s<a;++s)i[s].scale(e,t,r);this.changed()}setGeometries(e){this.setGeometriesArray(I4(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const t=this.geometries_;for(let r=0,i=t.length;r<i;++r)t[r].applyTransform(e);this.changed()}translate(e,t){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)r[i].translate(e,t);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function I4(n){return n.map(e=>e.clone())}function mk(n,e,t,r,i,s,a){const o=n[e],d=n[e+1],g=n[t]-o,b=n[t+1]-d;let E;if(g===0&&b===0)E=e;else{const S=((i-o)*g+(s-d)*b)/(g*g+b*b);if(S>1)E=t;else if(S>0){for(let O=0;O<r;++O)a[O]=Gh(n[e+O],n[t+O],S);a.length=r;return}else E=e}for(let S=0;S<r;++S)a[S]=n[E+S];a.length=r}function cO(n,e,t,r,i){let s=n[e],a=n[e+1];for(e+=r;e<t;e+=r){const o=n[e],d=n[e+1],g=xg(s,a,o,d);g>i&&(i=g),s=o,a=d}return i}function dO(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s){const o=t[s];i=cO(n,e,o,r,i),e=o}return i}function NX(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s){const o=t[s];i=dO(n,e,o,r,i),e=o[o.length-1]}return i}function hO(n,e,t,r,i,s,a,o,d,g,b){if(e==t)return g;let E,S;if(i===0){if(S=xg(a,o,n[e],n[e+1]),S<g){for(E=0;E<r;++E)d[E]=n[e+E];return d.length=r,S}return g}b=b||[NaN,NaN];let O=e+r;for(;O<t;)if(mk(n,O-r,O,r,a,o,b),S=xg(a,o,b[0],b[1]),S<g){for(g=S,E=0;E<r;++E)d[E]=b[E];d.length=r,O+=r}else O+=r*Math.max((Math.sqrt(S)-Math.sqrt(g))/i|0,1);if(s&&(mk(n,t-r,e,r,a,o,b),S=xg(a,o,b[0],b[1]),S<g)){for(g=S,E=0;E<r;++E)d[E]=b[E];d.length=r}return g}function fO(n,e,t,r,i,s,a,o,d,g,b){b=b||[NaN,NaN];for(let E=0,S=t.length;E<S;++E){const O=t[E];g=hO(n,e,O,r,i,s,a,o,d,g,b),e=O}return g}function WX(n,e,t,r,i,s,a,o,d,g,b){b=b||[NaN,NaN];for(let E=0,S=t.length;E<S;++E){const O=t[E];g=fO(n,e,O,r,i,s,a,o,d,g,b),e=O[O.length-1]}return g}function wx(n,e,t,r,i,s,a){const o=(t-e)/r;if(o<3){for(;e<t;e+=r)s[a++]=n[e],s[a++]=n[e+1];return a}const d=new Array(o);d[0]=1,d[o-1]=1;const g=[e,t-r];let b=0;for(;g.length>0;){const E=g.pop(),S=g.pop();let O=0;const k=n[S],U=n[S+1],z=n[E],q=n[E+1];for(let Q=S+r;Q<E;Q+=r){const re=n[Q],X=n[Q+1],Y=CZ(re,X,k,U,z,q);Y>O&&(b=Q,O=Y)}O>i&&(d[(b-e)/r]=1,S+r<b&&g.push(S,b),b+r<E&&g.push(b,E))}for(let E=0;E<o;++E)d[E]&&(s[a++]=n[e+E*r],s[a++]=n[e+E*r+1]);return a}function VU(n,e,t,r,i,s,a,o){for(let d=0,g=t.length;d<g;++d){const b=t[d];a=wx(n,e,b,r,i,s,a),o.push(a),e=b}return a}function lg(n,e){return e*Math.round(n/e)}function GX(n,e,t,r,i,s,a){if(e==t)return a;let o=lg(n[e],i),d=lg(n[e+1],i);e+=r,s[a++]=o,s[a++]=d;let g,b;do if(g=lg(n[e],i),b=lg(n[e+1],i),e+=r,e==t)return s[a++]=g,s[a++]=b,a;while(g==o&&b==d);for(;e<t;){const E=lg(n[e],i),S=lg(n[e+1],i);if(e+=r,E==g&&S==b)continue;const O=g-o,k=b-d,U=E-o,z=S-d;if(O*z==k*U&&(O<0&&U<O||O==U||O>0&&U>O)&&(k<0&&z<k||k==z||k>0&&z>k)){g=E,b=S;continue}s[a++]=g,s[a++]=b,o=g,d=b,g=E,b=S}return s[a++]=g,s[a++]=b,a}function pO(n,e,t,r,i,s,a,o){for(let d=0,g=t.length;d<g;++d){const b=t[d];a=GX(n,e,b,r,i,s,a),o.push(a),e=b}return a}function QX(n,e,t,r,i,s,a,o){for(let d=0,g=t.length;d<g;++d){const b=t[d],E=[];a=pO(n,e,b,r,i,s,a,E),o.push(E),e=b[b.length-1]}return a}function _0(n,e,t,r,i){i=i!==void 0?i:[];let s=0;for(let a=e;a<t;a+=r)i[s++]=n.slice(a,a+r);return i.length=s,i}function fC(n,e,t,r,i){i=i!==void 0?i:[];let s=0;for(let a=0,o=t.length;a<o;++a){const d=t[a];i[s++]=_0(n,e,d,r,i[s]),e=d}return i.length=s,i}function K6(n,e,t,r,i){i=i!==void 0?i:[];let s=0;for(let a=0,o=t.length;a<o;++a){const d=t[a];i[s++]=d.length===1&&d[0]===e?[]:fC(n,e,d,r,i[s]),e=d[d.length-1]}return i.length=s,i}function HU(n,e,t,r){let i=0;const s=n[t-r],a=n[t-r+1];let o=0,d=0;for(;e<t;e+=r){const g=n[e]-s,b=n[e+1]-a;i+=d*g-o*b,o=g,d=b}return i/2}function ZU(n,e,t,r){let i=0;for(let s=0,a=t.length;s<a;++s){const o=t[s];i+=HU(n,e,o,r),e=o}return i}function qX(n,e,t,r){let i=0;for(let s=0,a=t.length;s<a;++s){const o=t[s];i+=ZU(n,e,o,r),e=o[o.length-1]}return i}class pC extends Ug{constructor(e,t){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}clone(){return new pC(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,t,r,i){return i<Fg(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(cO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,t,r,i))}getArea(){return HU(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return _0(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const t=[];return t.length=wx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new pC(t,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,e,this.stride),this.changed()}}function XU(n,e,t,r,i){let s;for(e+=r;e<t;e+=r)if(s=i(n.slice(e-r,e),n.slice(e,e+r)),s)return s;return!1}function u2(n,e,t,r,i,s,a){let o,d;const g=(t-e)/r;if(g===1)o=e;else if(g===2)o=e,d=i;else if(g!==0){let b=n[e],E=n[e+1],S=0;const O=[0];for(let z=e+r;z<t;z+=r){const q=n[z],Q=n[z+1];S+=Math.sqrt((q-b)*(q-b)+(Q-E)*(Q-E)),O.push(S),b=q,E=Q}const k=i*S,U=fZ(O,k);U<0?(d=(k-O[-U-2])/(O[-U-1]-O[-U-2]),o=e+(-U-2)*r):o=e+U*r}a=a>1?a:2,s=s||new Array(a);for(let b=0;b<a;++b)s[b]=o===void 0?NaN:d===void 0?n[o+b]:Gh(n[o+b],n[o+r+b],d);return s}function F6(n,e,t,r,i,s){if(t==e)return null;let a;if(i<n[e+r-1])return s?(a=n.slice(e,e+r),a[r-1]=i,a):null;if(n[t-1]<i)return s?(a=n.slice(t-r,t),a[r-1]=i,a):null;if(i==n[e+r-1])return n.slice(e,e+r);let o=e/r,d=t/r;for(;o<d;){const S=o+d>>1;i<n[(S+1)*r-1]?d=S:o=S+1}const g=n[o*r-1];if(i==g)return n.slice((o-1)*r,(o-1)*r+r);const b=n[(o+1)*r-1],E=(i-g)/(b-g);a=[];for(let S=0;S<r-1;++S)a.push(Gh(n[(o-1)*r+S],n[o*r+S],E));return a.push(i),a}function YX(n,e,t,r,i,s,a){if(a)return F6(n,e,t[t.length-1],r,i,s);let o;if(i<n[r-1])return s?(o=n.slice(0,r),o[r-1]=i,o):null;if(n[n.length-1]<i)return s?(o=n.slice(n.length-r),o[r-1]=i,o):null;for(let d=0,g=t.length;d<g;++d){const b=t[d];if(e!=b){if(i<n[e+r-1])return null;if(i<=n[b-1])return F6(n,e,b,r,i,!1);e=b}}return null}function $X(n,e,t,r,i){return!FU(i,function(a){return!gg(n,e,t,r,a[0],a[1])})}function gg(n,e,t,r,i,s){let a=0,o=n[t-r],d=n[t-r+1];for(;e<t;e+=r){const g=n[e],b=n[e+1];d<=s?b>s&&(g-o)*(s-d)-(i-o)*(b-d)>0&&a++:b<=s&&(g-o)*(s-d)-(i-o)*(b-d)<0&&a--,o=g,d=b}return a!==0}function mO(n,e,t,r,i,s){if(t.length===0||!gg(n,e,t[0],r,i,s))return!1;for(let a=1,o=t.length;a<o;++a)if(gg(n,t[a-1],t[a],r,i,s))return!1;return!0}function VX(n,e,t,r,i,s){if(t.length===0)return!1;for(let a=0,o=t.length;a<o;++a){const d=t[a];if(mO(n,e,d,r,i,s))return!0;e=d[d.length-1]}return!1}function Mx(n,e,t,r,i){const s=KU(Hh(),n,e,t,r);return ku(i,s)?lp(i,s)||s[0]>=i[0]&&s[2]<=i[2]||s[1]>=i[1]&&s[3]<=i[3]?!0:XU(n,e,t,r,function(a,o){return nX(i,a,o)}):!1}function HX(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s){if(Mx(n,e,t[s],r,i))return!0;e=t[s]}return!1}function JU(n,e,t,r,i){return!!(Mx(n,e,t,r,i)||gg(n,e,t,r,i[0],i[1])||gg(n,e,t,r,i[0],i[3])||gg(n,e,t,r,i[2],i[1])||gg(n,e,t,r,i[2],i[3]))}function ez(n,e,t,r,i){if(!JU(n,e,t[0],r,i))return!1;if(t.length===1)return!0;for(let s=1,a=t.length;s<a;++s)if($X(n,t[s-1],t[s],r,i)&&!Mx(n,t[s-1],t[s],r,i))return!1;return!0}function ZX(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s){const o=t[s];if(ez(n,e,o,r,i))return!0;e=o[o.length-1]}return!1}function tz(n,e,t,r){let i=n[e],s=n[e+1],a=0;for(let o=e+r;o<t;o+=r){const d=n[o],g=n[o+1];a+=Math.sqrt((d-i)*(d-i)+(g-s)*(g-s)),i=d,s=g}return a}class kg extends Ug{constructor(e,t){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,t!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendCoordinate(e){Zp(this.flatCoordinates,e),this.changed()}clone(){const e=new kg(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,r,i){return i<Fg(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(cO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),hO(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,t,r,i))}forEachSegment(e){return XU(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,t){return this.layout!="XYM"&&this.layout!="XYZM"?null:(t=t!==void 0?t:!1,F6(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t))}getCoordinates(){return _0(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,t){return u2(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,this.stride)}getLength(){return tz(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const t=[];return t.length=wx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,t,0),new kg(t,"XY")}getType(){return"LineString"}intersectsExtent(e){return Mx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,e,this.stride),this.changed()}}class mC extends Ug{constructor(e,t,r){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,t);else if(t!==void 0&&r)this.setFlatCoordinates(t,e),this.ends_=r;else{const i=e,s=[],a=[];for(let d=0,g=i.length;d<g;++d){const b=i[d];Zp(s,b.getFlatCoordinates()),a.push(s.length)}const o=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(o,s),this.ends_=a}}appendLineString(e){Zp(this.flatCoordinates,e.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new mC(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,r,i){return i<Fg(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(dO(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),fO(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,t,r,i))}getCoordinateAtM(e,t,r){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(t=t!==void 0?t:!1,r=r!==void 0?r:!1,YX(this.flatCoordinates,0,this.ends_,this.stride,e,t,r))}getCoordinates(){return fC(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new kg(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,t=this.ends_,r=this.layout,i=[];let s=0;for(let a=0,o=t.length;a<o;++a){const d=t[a],g=new kg(e.slice(s,d),r);i.push(g),s=d}return i}getFlatMidpoints(){const e=[],t=this.flatCoordinates;let r=0;const i=this.ends_,s=this.stride;for(let a=0,o=i.length;a<o;++a){const d=i[a],g=u2(t,r,d,s,.5);Zp(e,g),r=d}return e}getSimplifiedGeometryInternal(e){const t=[],r=[];return t.length=VU(this.flatCoordinates,0,this.ends_,this.stride,e,t,0,r),new mC(t,"XY",r)}getType(){return"MultiLineString"}intersectsExtent(e){return HX(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=QC(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}class Tg extends Ug{constructor(e,t){super(),this.setCoordinates(e,t)}clone(){const e=new Tg(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,r,i){const s=this.flatCoordinates,a=xg(e,t,s[0],s[1]);if(a<i){const o=this.stride;for(let d=0;d<o;++d)r[d]=s[d];return r.length=o,a}return i}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return DU(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return eO(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,t){this.setLayout(t,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=jX(this.flatCoordinates,0,e,this.stride),this.changed()}}class qC extends Ug{constructor(e,t){super(),t&&!Array.isArray(e[0])?this.setFlatCoordinates(t,e):this.setCoordinates(e,t)}appendPoint(e){Zp(this.flatCoordinates,e.getFlatCoordinates()),this.changed()}clone(){const e=new qC(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,t,r,i){if(i<Fg(this.getExtent(),e,t))return i;const s=this.flatCoordinates,a=this.stride;for(let o=0,d=s.length;o<d;o+=a){const g=xg(e,t,s[o],s[o+1]);if(g<i){i=g;for(let b=0;b<a;++b)r[b]=s[o+b];r.length=a}}return i}getCoordinates(){return _0(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const t=this.flatCoordinates.length/this.stride;return e<0||t<=e?null:new Tg(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,t=this.layout,r=this.stride,i=[];for(let s=0,a=e.length;s<a;s+=r){const o=new Tg(e.slice(s,s+r),t);i.push(o)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const t=this.flatCoordinates,r=this.stride;for(let i=0,s=t.length;i<s;i+=r){const a=t[i],o=t[i+1];if(eO(e,a,o))return!0}return!1}setCoordinates(e,t){this.setLayout(t,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=xx(this.flatCoordinates,0,e,this.stride),this.changed()}}function gO(n,e,t,r,i,s,a){let o,d,g,b,E,S,O;const k=i[s+1],U=[];for(let Q=0,re=t.length;Q<re;++Q){const X=t[Q];for(b=n[X-r],S=n[X-r+1],o=e;o<X;o+=r)E=n[o],O=n[o+1],(k<=S&&O<=k||S<=k&&k<=O)&&(g=(k-S)/(O-S)*(E-b)+b,U.push(g)),b=E,S=O}let z=NaN,q=-1/0;for(U.sort(Lm),b=U[0],o=1,d=U.length;o<d;++o){E=U[o];const Q=Math.abs(E-b);Q>q&&(g=(b+E)/2,mO(n,e,t,r,g,k)&&(z=g,q=Q)),b=E}return isNaN(z)&&(z=i[s]),a?(a.push(z,k,q),a):[z,k,q]}function nz(n,e,t,r,i){let s=[];for(let a=0,o=t.length;a<o;++a){const d=t[a];s=gO(n,e,d,r,i,2*a,s),e=d[d.length-1]}return s}function XX(n,e,t,r){for(;e<t-r;){for(let i=0;i<r;++i){const s=n[e+i];n[e+i]=n[t-r+i],n[t-r+i]=s}e+=r,t-=r}}function yO(n,e,t,r){let i=0,s=n[t-r],a=n[t-r+1];for(;e<t;e+=r){const o=n[e],d=n[e+1];i+=(o-s)*(d+a),s=o,a=d}return i===0?void 0:i>0}function vO(n,e,t,r,i){i=i!==void 0?i:!1;for(let s=0,a=t.length;s<a;++s){const o=t[s],d=yO(n,e,o,r);if(s===0){if(i&&d||!i&&!d)return!1}else if(i&&!d||!i&&d)return!1;e=o}return!0}function rz(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s){const o=t[s];if(!vO(n,e,o,r,i))return!1;o.length&&(e=o[o.length-1])}return!0}function A2(n,e,t,r,i){i=i!==void 0?i:!1;for(let s=0,a=t.length;s<a;++s){const o=t[s],d=yO(n,e,o,r);(s===0?i&&d||!i&&!d:i&&!d||!i&&d)&&XX(n,e,o,r),e=o}return e}function L6(n,e,t,r,i){for(let s=0,a=t.length;s<a;++s)e=A2(n,e,t[s],r,i);return e}function iz(n,e){const t=[];let r=0,i=0,s;for(let a=0,o=e.length;a<o;++a){const d=e[a],g=yO(n,r,d,2);if(s===void 0&&(s=g),g===s)t.push(e.slice(i,a+1));else{if(t.length===0)continue;t[t.length-1].push(e[i])}i=a+1,r=d}return t}class Qm extends Ug{constructor(e,t,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,t!==void 0&&r?(this.setFlatCoordinates(t,e),this.ends_=r):this.setCoordinates(e,t)}appendLinearRing(e){this.flatCoordinates?Zp(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new Qm(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,t,r,i){return i<Fg(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(dO(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),fO(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,t,r,i))}containsXY(e,t){return mO(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,t)}getArea(){return ZU(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),A2(t,0,this.ends_,this.stride,e)):t=this.flatCoordinates,fC(t,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=Of(this.getExtent());this.flatInteriorPoint_=gO(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Tg(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new pC(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,t=this.flatCoordinates,r=this.ends_,i=[];let s=0;for(let a=0,o=r.length;a<o;++a){const d=r[a],g=new pC(t.slice(s,d),e);i.push(g),s=d}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;vO(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=A2(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],r=[];return t.length=pO(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),t,0,r),new Qm(t,"XY",r)}getType(){return"Polygon"}intersectsExtent(e){return ez(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=QC(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}function gk(n){if(Lg(n))throw new Error("Cannot create polygon from empty extent");const e=n[0],t=n[1],r=n[2],i=n[3],s=[e,t,e,i,r,i,r,t,e,t];return new Qm(s,"XY",[s.length])}function oz(n,e,t,r){const i=[];let s=Hh();for(let a=0,o=t.length;a<o;++a){const d=t[a];s=tO(n,e,d[0],r),i.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=d[d.length-1]}return i}class gC extends Ug{constructor(e,t,r){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){const i=e,s=[],a=[];for(let o=0,d=i.length;o<d;++o){const g=i[o],b=s.length,E=g.getEnds();for(let S=0,O=E.length;S<O;++S)E[S]+=b;Zp(s,g.getFlatCoordinates()),a.push(E)}t=i.length===0?this.getLayout():i[0].getLayout(),e=s,r=a}t!==void 0&&r?(this.setFlatCoordinates(t,e),this.endss_=r):this.setCoordinates(e,t)}appendPolygon(e){let t;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),t=e.getEnds().slice(),this.endss_.push();else{const r=this.flatCoordinates.length;Zp(this.flatCoordinates,e.getFlatCoordinates()),t=e.getEnds().slice();for(let i=0,s=t.length;i<s;++i)t[i]+=r}this.endss_.push(t),this.changed()}clone(){const e=this.endss_.length,t=new Array(e);for(let i=0;i<e;++i)t[i]=this.endss_[i].slice();const r=new gC(this.flatCoordinates.slice(),this.layout,t);return r.applyProperties(this),r}closestPointXY(e,t,r,i){return i<Fg(this.getExtent(),e,t)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(NX(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),WX(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,t,r,i))}containsXY(e,t){return VX(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,t)}getArea(){return qX(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let t;return e!==void 0?(t=this.getOrientedFlatCoordinates().slice(),L6(t,0,this.endss_,this.stride,e)):t=this.flatCoordinates,K6(t,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=oz(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=nz(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new qC(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;rz(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=L6(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const t=[],r=[];return t.length=QX(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),t,0,r),new gC(t,"XY",r)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let t;if(e===0)t=0;else{const s=this.endss_[e-1];t=s[s.length-1]}const r=this.endss_[e].slice(),i=r[r.length-1];if(t!==0)for(let s=0,a=r.length;s<a;++s)r[s]-=t;return new Qm(this.flatCoordinates.slice(t,i),this.layout,r)}getPolygons(){const e=this.layout,t=this.flatCoordinates,r=this.endss_,i=[];let s=0;for(let a=0,o=r.length;a<o;++a){const d=r[a].slice(),g=d[d.length-1];if(s!==0)for(let E=0,S=d.length;E<S;++E)d[E]-=s;const b=new Qm(t.slice(s,g),e,d);i.push(b),s=g}return i}getType(){return"MultiPolygon"}intersectsExtent(e){return ZX(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,t){this.setLayout(t,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const r=$U(this.flatCoordinates,0,e,this.stride,this.endss_);if(r.length===0)this.flatCoordinates.length=0;else{const i=r[r.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}const yk=Ch();class sd{constructor(e,t,r,i,s,a){this.styleFunction,this.extent_,this.id_=a,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r||null,this.properties_=s,this.squaredTolerance_,this.stride_=i,this.simplifiedGeometry_}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?DU(this.flatCoordinates_):tO(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=Of(this.getExtent());this.flatInteriorPoints_=gO(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=iz(this.flatCoordinates_,this.ends_),t=oz(this.flatCoordinates_,0,e,2);this.flatInteriorPoints_=nz(this.flatCoordinates_,0,e,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=u2(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let t=0;const r=this.ends_;for(let i=0,s=r.length;i<s;++i){const a=r[i],o=u2(e,t,a,2,.5);Zp(this.flatMidpoints_,o),t=a}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,t){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){e=Ma(e);const t=e.getExtent(),r=e.getWorldExtent();if(t&&r){const i=Hl(r)/Hl(t);em(yk,r[0],r[3],i,-i,0,0,0),O0(this.flatCoordinates_,0,this.flatCoordinates_.length,2,yk,this.flatCoordinates_)}}applyTransform(e){e(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){var e;return new sd(this.type_,this.flatCoordinates_.slice(),(e=this.ends_)==null?void 0:e.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=yU((e,t)=>{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),t&&this.simplifiedGeometry_.applyTransform(t);const r=this.simplifiedGeometry_.getFlatCoordinates();let i;switch(this.type_){case"LineString":r.length=wx(r,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,r,0),i=[r.length];break;case"MultiLineString":i=[],r.length=VU(r,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,r,0,i);break;case"Polygon":i=[],r.length=pO(r,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),r,0,i);break}return i&&(this.simplifiedGeometry_=new sd(this.type_,r,i,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}sd.prototype.getFlatCoordinates=sd.prototype.getOrientedFlatCoordinates;class b0{constructor(e){e=e||{},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}clone(){const e=this.getColor();return new b0({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}class Qh{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=vk,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}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new Qh({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=vk,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function JX(n){let e;if(typeof n=="function")e=n;else{let t;Array.isArray(n)?t=n:(ra(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),t=[n]),e=function(){return t}}return e}let k4=null;function sz(n,e){if(!k4){const t=new Km({color:"rgba(255,255,255,0.4)"}),r=new b0({color:"#3399CC",width:1.25});k4=[new Qh({image:new NC({fill:t,stroke:r,radius:5}),fill:t,stroke:r})]}return k4}function vk(n){return n.getGeometry()}const eJ="#333";class Sx{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.keepUpright_=e.keepUpright,this.scale_=e.scale,this.scaleArray_=ad(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Km({color:eJ}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"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,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Sx({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setKeepUpright(e){this.keepUpright_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=ad(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}const xr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},gh={ADD:"add",REMOVE:"remove"},Ck={LENGTH:"length"};class G_ extends hp{constructor(e,t,r){super(e),this.element=t,this.index=r}}class $p extends fp{constructor(e,t){if(super(),this.on,this.once,this.un,t=t||{},this.unique_=!!t.unique,this.array_=e||[],this.unique_)for(let r=0,i=this.array_.length;r<i;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let t=0,r=e.length;t<r;++t)this.push(e[t]);return this}forEach(e){const t=this.array_;for(let r=0,i=t.length;r<i;++r)e(t[r],r,t)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(Ck.LENGTH)}insertAt(e,t){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t),this.array_.splice(e,0,t),this.updateLength_(),this.dispatchEvent(new G_(gh.ADD,t,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const t=this.getLength();return this.insertAt(t,e),this.getLength()}remove(e){const t=this.array_;for(let r=0,i=t.length;r<i;++r)if(t[r]===e)return this.removeAt(r)}removeAt(e){if(e<0||e>=this.getLength())return;const t=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new G_(gh.REMOVE,t,e)),t}setAt(e,t){const r=this.getLength();if(e>=r){this.insertAt(e,t);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(t,e);const i=this.array_[e];this.array_[e]=t,this.dispatchEvent(new G_(gh.REMOVE,i,e)),this.dispatchEvent(new G_(gh.ADD,t,e))}updateLength_(){this.set(Ck.LENGTH,this.array_.length)}assertUnique_(e,t){for(let r=0,i=this.array_.length;r<i;++r)if(this.array_[r]===e&&r!==t)throw new Error("Duplicate item added to a unique collection")}}const Sf={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Ra={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"};class az extends fp{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const t=Object.assign({},e);typeof e.properties=="object"&&(delete t.properties,Object.assign(t,e.properties)),t[Ra.OPACITY]=e.opacity!==void 0?e.opacity:1,ra(typeof t[Ra.OPACITY]=="number","Layer opacity must be a number"),t[Ra.VISIBLE]=e.visible!==void 0?e.visible:!0,t[Ra.Z_INDEX]=e.zIndex,t[Ra.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,t[Ra.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,t[Ra.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,t[Ra.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=t.className!==void 0?t.className:"ol-layer",delete t.className,this.setProperties(t),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const t=this.state_||{layer:this,managed:e===void 0?!0:e},r=this.getZIndex();return t.opacity=Tu(Math.round(this.getOpacity()*100)/100,0,1),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=r===void 0&&!t.managed?1/0:r,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),t.minZoom=this.getMinZoom(),t.maxZoom=this.getMaxZoom(),this.state_=t,t}getLayersArray(e){return go()}getLayerStatesArray(e){return go()}getExtent(){return this.get(Ra.EXTENT)}getMaxResolution(){return this.get(Ra.MAX_RESOLUTION)}getMinResolution(){return this.get(Ra.MIN_RESOLUTION)}getMinZoom(){return this.get(Ra.MIN_ZOOM)}getMaxZoom(){return this.get(Ra.MAX_ZOOM)}getOpacity(){return this.get(Ra.OPACITY)}getSourceState(){return go()}getVisible(){return this.get(Ra.VISIBLE)}getZIndex(){return this.get(Ra.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Ra.EXTENT,e)}setMaxResolution(e){this.set(Ra.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Ra.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Ra.MAX_ZOOM,e)}setMinZoom(e){this.set(Ra.MIN_ZOOM,e)}setOpacity(e){ra(typeof e=="number","Layer opacity must be a number"),this.set(Ra.OPACITY,e)}setVisible(e){this.set(Ra.VISIBLE,e)}setZIndex(e){this.set(Ra.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Vl={ANIMATING:0,INTERACTING:1},Jf={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},lz=42,CO=256;function _k(n,e,t){return function(r,i,s,a,o){if(!r)return;if(!i&&!e)return r;const d=e?0:s[0]*i,g=e?0:s[1]*i,b=o?o[0]:0,E=o?o[1]:0;let S=n[0]+d/2+b,O=n[2]-d/2+b,k=n[1]+g/2+E,U=n[3]-g/2+E;S>O&&(S=(O+S)/2,O=S),k>U&&(k=(U+k)/2,U=k);let z=Tu(r[0],S,O),q=Tu(r[1],k,U);if(a&&t&&i){const Q=30*i;z+=-Q*Math.log(1+Math.max(0,S-r[0])/Q)+Q*Math.log(1+Math.max(0,r[0]-O)/Q),q+=-Q*Math.log(1+Math.max(0,k-r[1])/Q)+Q*Math.log(1+Math.max(0,r[1]-U)/Q)}return[z,q]}}function tJ(n){return n}function _O(n,e,t,r){const i=ps(e)/t[0],s=Hl(e)/t[1];return r?Math.min(n,Math.max(i,s)):Math.min(n,Math.min(i,s))}function bO(n,e,t){let r=Math.min(n,e);const i=50;return r*=Math.log(1+i*Math.max(0,n/e-1))/i+1,t&&(r=Math.max(r,t),r/=Math.log(1+i*Math.max(0,t/n-1))/i+1),Tu(r,t/2,e*2)}function nJ(n,e,t,r){return e=e!==void 0?e:!0,function(i,s,a,o){if(i!==void 0){const d=n[0],g=n[n.length-1],b=t?_O(d,t,a,r):d;if(o)return e?bO(i,b,g):Tu(i,g,b);const E=Math.min(b,i),S=Math.floor(Ax(n,E,s));return n[S]>b&&S<n.length-1?n[S+1]:n[S]}}}function rJ(n,e,t,r,i,s){return r=r!==void 0?r:!0,t=t!==void 0?t:0,function(a,o,d,g){if(a!==void 0){const b=i?_O(e,i,d,s):e;if(g)return r?bO(a,b,t):Tu(a,t,b);const E=1e-9,S=Math.ceil(Math.log(e/b)/Math.log(n)-E),O=-o*(.5-E)+.5,k=Math.min(b,a),U=Math.floor(Math.log(e/k)/Math.log(n)+O),z=Math.max(S,U),q=e/Math.pow(n,z);return Tu(q,t,b)}}}function bk(n,e,t,r,i){return t=t!==void 0?t:!0,function(s,a,o,d){if(s!==void 0){const g=r?_O(n,r,o,i):n;return!t||!d?Tu(s,e,g):bO(s,g,e)}}}function xO(n){if(n!==void 0)return 0}function xk(n){if(n!==void 0)return n}function iJ(n){const e=2*Math.PI/n;return function(t,r){if(r)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function oJ(n){const e=E0(5);return function(t,r){return r||t===void 0?t:Math.abs(t)<=e?0:t}}function uz(n){return Math.pow(n,3)}function Py(n){return 1-uz(1-n)}function sJ(n){return 3*n*n-2*n*n*n}function aJ(n){return n}const T4=0;class op extends fp{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=uO(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&QU(),e.center&&(e.center=km(e.center,this.projection_)),e.extent&&(e.extent=Yp(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const t=Object.assign({},e);for(const o in Jf)delete t[o];this.setProperties(t,!0);const r=uJ(e);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=r.minZoom;const i=lJ(e),s=r.constraint,a=AJ(e);this.constraints_={center:i,resolution:s,rotation:a},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)}get padding(){return this.padding_}set padding(e){let t=this.padding_;this.padding_=e;const r=this.getCenterInternal();if(r){const i=e||[0,0,0,0];t=t||[0,0,0,0];const s=this.getResolution(),a=s/2*(i[3]-t[3]+t[1]-i[1]),o=s/2*(i[0]-t[0]+t[2]-i[2]);this.setCenterInternal([r[0]+a,r[1]-o])}}getUpdatedOptions_(e){const t=this.getProperties();return t.resolution!==void 0?t.resolution=this.getResolution():t.zoom=this.getZoom(),t.center=this.getCenterInternal(),t.rotation=this.getRotation(),Object.assign({},t,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const t=new Array(arguments.length);for(let r=0;r<t.length;++r){let i=arguments[r];i.center&&(i=Object.assign({},i),i.center=km(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=km(i.anchor,this.getProjection())),t[r]=i}this.animateInternal.apply(this,t)}animateInternal(e){let t=arguments.length,r;t>1&&typeof arguments[t-1]=="function"&&(r=arguments[t-1],--t);let i=0;for(;i<t&&!this.isDef();++i){const b=arguments[i];b.center&&this.setCenterInternal(b.center),b.zoom!==void 0?this.setZoom(b.zoom):b.resolution&&this.setResolution(b.resolution),b.rotation!==void 0&&this.setRotation(b.rotation)}if(i===t){r&&Q_(r,!0);return}let s=Date.now(),a=this.targetCenter_.slice(),o=this.targetResolution_,d=this.targetRotation_;const g=[];for(;i<t;++i){const b=arguments[i],E={start:s,complete:!1,anchor:b.anchor,duration:b.duration!==void 0?b.duration:1e3,easing:b.easing||sJ,callback:r};if(b.center&&(E.sourceCenter=a,E.targetCenter=b.center.slice(),a=E.targetCenter),b.zoom!==void 0?(E.sourceResolution=o,E.targetResolution=this.getResolutionForZoom(b.zoom),o=E.targetResolution):b.resolution&&(E.sourceResolution=o,E.targetResolution=b.resolution,o=E.targetResolution),b.rotation!==void 0){E.sourceRotation=d;const S=wg(b.rotation-d+Math.PI,2*Math.PI)-Math.PI;E.targetRotation=d+S,d=E.targetRotation}cJ(E)?E.complete=!0:s+=E.duration,g.push(E)}this.animations_.push(g),this.setHint(Vl.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Vl.ANIMATING]>0}getInteracting(){return this.hints_[Vl.INTERACTING]>0}cancelAnimations(){this.setHint(Vl.ANIMATING,-this.hints_[Vl.ANIMATING]);let e;for(let t=0,r=this.animations_.length;t<r;++t){const i=this.animations_[t];if(i[0].callback&&Q_(i[0].callback,!1),!e)for(let s=0,a=i.length;s<a;++s){const o=i[s];if(!o.complete){e=o.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const e=Date.now();let t=!1;for(let r=this.animations_.length-1;r>=0;--r){const i=this.animations_[r];let s=!0;for(let a=0,o=i.length;a<o;++a){const d=i[a];if(d.complete)continue;const g=e-d.start;let b=d.duration>0?g/d.duration:1;b>=1?(d.complete=!0,b=1):s=!1;const E=d.easing(b);if(d.sourceCenter){const S=d.sourceCenter[0],O=d.sourceCenter[1],k=d.targetCenter[0],U=d.targetCenter[1];this.nextCenter_=d.targetCenter;const z=S+E*(k-S),q=O+E*(U-O);this.targetCenter_=[z,q]}if(d.sourceResolution&&d.targetResolution){const S=E===1?d.targetResolution:d.sourceResolution+E*(d.targetResolution-d.sourceResolution);if(d.anchor){const O=this.getViewportSize_(this.getRotation()),k=this.constraints_.resolution(S,0,O,!0);this.targetCenter_=this.calculateCenterZoom(k,d.anchor)}this.nextResolution_=d.targetResolution,this.targetResolution_=S,this.applyTargetState_(!0)}if(d.sourceRotation!==void 0&&d.targetRotation!==void 0){const S=E===1?wg(d.targetRotation+Math.PI,2*Math.PI)-Math.PI:d.sourceRotation+E*(d.targetRotation-d.sourceRotation);if(d.anchor){const O=this.constraints_.rotation(S,!0);this.targetCenter_=this.calculateCenterRotate(O,d.anchor)}this.nextRotation_=d.targetRotation,this.targetRotation_=S}if(this.applyTargetState_(!0),t=!0,!d.complete)break}if(s){this.animations_[r]=null,this.setHint(Vl.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=i[0].callback;a&&Q_(a,!0)}}this.animations_=this.animations_.filter(Boolean),t&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,t){let r;const i=this.getCenterInternal();return i!==void 0&&(r=[i[0]-t[0],i[1]-t[1]],iO(r,e-this.getRotation()),dX(r,t)),r}calculateCenterZoom(e,t){let r;const i=this.getCenterInternal(),s=this.getResolution();if(i!==void 0&&s!==void 0){const a=t[0]-e*(t[0]-i[0])/s,o=t[1]-e*(t[1]-i[1])/s;r=[a,o]}return r}getViewportSize_(e){const t=this.viewportSize_;if(e){const r=t[0],i=t[1];return[Math.abs(r*Math.cos(e))+Math.abs(i*Math.sin(e)),Math.abs(r*Math.sin(e))+Math.abs(i*Math.cos(e))]}return t}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&D6(e,this.getProjection())}getCenterInternal(){return this.get(Jf.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const t=this.calculateExtentInternal(e);return AO(t,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const t=this.getCenterInternal();ra(t,"The view center is not defined");const r=this.getResolution();ra(r!==void 0,"The view resolution is not defined");const i=this.getRotation();return ra(i!==void 0,"The view rotation is not defined"),i2(t,r,i,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Jf.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,t){return this.getResolutionForExtentInternal(Yp(e,this.getProjection()),t)}getResolutionForExtentInternal(e,t){t=t||this.getViewportSizeMinusPadding_();const r=ps(e)/t[0],i=Hl(e)/t[1];return Math.max(r,i)}getResolutionForValueFunction(e){e=e||2;const t=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(t/r)/Math.log(e);return function(s){return t/Math.pow(e,s*i)}}getRotation(){return this.get(Jf.ROTATION)}getValueForResolutionFunction(e){const t=Math.log(e||2),r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(r/i)/t;return function(a){return Math.log(r/a)/t/s}}getViewportSizeMinusPadding_(e){let t=this.getViewportSize_(e);const r=this.padding_;return r&&(t=[t[0]-r[1]-r[3],t[1]-r[0]-r[2]]),t}getState(){const e=this.getProjection(),t=this.getResolution(),r=this.getRotation();let i=this.getCenterInternal();const s=this.padding_;if(s){const a=this.getViewportSizeMinusPadding_();i=P4(i,this.getViewportSize_(),[a[0]/2+s[3],a[1]/2+s[0]],t,r)}return{center:i.slice(0),projection:e!==void 0?e:null,resolution:t,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:r,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const t=this.getResolution();return t!==void 0&&(e=this.getZoomForResolution(t)),e}getZoomForResolution(e){let t=this.minZoom_||0,r,i;if(this.resolutions_){const s=Ax(this.resolutions_,e,1);t=s,r=this.resolutions_[s],s==this.resolutions_.length-1?i=2:i=r/this.resolutions_[s+1]}else r=this.maxResolution_,i=this.zoomFactor_;return t+Math.log(r/e)/Math.log(i)}getResolutionForZoom(e){var t;if((t=this.resolutions_)!=null&&t.length){if(this.resolutions_.length===1)return this.resolutions_[0];const r=Tu(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[r]/this.resolutions_[r+1];return this.resolutions_[r]/Math.pow(i,Tu(e-r,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,t){let r;if(ra(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){ra(!Lg(e),"Cannot fit empty extent provided as `geometry`");const i=Yp(e,this.getProjection());r=gk(i)}else if(e.getType()==="Circle"){const i=Yp(e.getExtent(),this.getProjection());r=gk(i),r.rotate(this.getRotation(),Of(i))}else r=e;this.fitInternal(r,t)}rotatedExtentForGeometry(e){const t=this.getRotation(),r=Math.cos(t),i=Math.sin(-t),s=e.getFlatCoordinates(),a=e.getStride();let o=1/0,d=1/0,g=-1/0,b=-1/0;for(let E=0,S=s.length;E<S;E+=a){const O=s[E]*r-s[E+1]*i,k=s[E]*i+s[E+1]*r;o=Math.min(o,O),d=Math.min(d,k),g=Math.max(g,O),b=Math.max(b,k)}return[o,d,g,b]}fitInternal(e,t){t=t||{};let r=t.size;r||(r=this.getViewportSizeMinusPadding_());const i=t.padding!==void 0?t.padding:[0,0,0,0],s=t.nearest!==void 0?t.nearest:!1;let a;t.minResolution!==void 0?a=t.minResolution:t.maxZoom!==void 0?a=this.getResolutionForZoom(t.maxZoom):a=0;const o=this.rotatedExtentForGeometry(e);let d=this.getResolutionForExtentInternal(o,[r[0]-i[1]-i[3],r[1]-i[0]-i[2]]);d=isNaN(d)?a:Math.max(d,a),d=this.getConstrainedResolution(d,s?0:1);const g=this.getRotation(),b=Math.sin(g),E=Math.cos(g),S=Of(o);S[0]+=(i[1]-i[3])/2*d,S[1]+=(i[0]-i[2])/2*d;const O=S[0]*E-S[1]*b,k=S[1]*E+S[0]*b,U=this.getConstrainedCenter([O,k],d),z=t.callback?t.callback:gy;t.duration!==void 0?this.animateInternal({resolution:d,center:U,duration:t.duration,easing:t.easing},z):(this.targetResolution_=d,this.targetCenter_=U,this.applyTargetState_(!1,!0),Q_(z,!0))}centerOn(e,t,r){this.centerOnInternal(km(e,this.getProjection()),t,r)}centerOnInternal(e,t,r){this.setCenterInternal(P4(e,t,r,this.getResolution(),this.getRotation()))}calculateCenterShift(e,t,r,i){let s;const a=this.padding_;if(a&&e){const o=this.getViewportSizeMinusPadding_(-r),d=P4(e,i,[o[0]/2+a[3],o[1]/2+a[0]],t,r);s=[e[0]-d[0],e[1]-d[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){const t=D6(this.targetCenter_,this.getProjection());this.setCenter([t[0]+e[0],t[1]+e[1]])}adjustCenterInternal(e){const t=this.targetCenter_;this.setCenterInternal([t[0]+e[0],t[1]+e[1]])}adjustResolution(e,t){t=t&&km(t,this.getProjection()),this.adjustResolutionInternal(e,t)}adjustResolutionInternal(e,t){const r=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*e,0,i,r);t&&(this.targetCenter_=this.calculateCenterZoom(s,t)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,t){this.adjustResolution(Math.pow(this.zoomFactor_,-e),t)}adjustRotation(e,t){t&&(t=km(t,this.getProjection())),this.adjustRotationInternal(e,t)}adjustRotationInternal(e,t){const r=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+e,r);t&&(this.targetCenter_=this.calculateCenterRotate(i,t)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&km(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,t){return this.hints_[e]+=t,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,t){const r=this.getAnimating()||this.getInteracting()||t,i=this.constraints_.rotation(this.targetRotation_,r),s=this.getViewportSize_(i),a=this.constraints_.resolution(this.targetResolution_,0,s,r),o=this.constraints_.center(this.targetCenter_,a,s,r,this.calculateCenterShift(this.targetCenter_,a,i,s));this.get(Jf.ROTATION)!==i&&this.set(Jf.ROTATION,i),this.get(Jf.RESOLUTION)!==a&&(this.set(Jf.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!o||!this.get(Jf.CENTER)||!o2(this.get(Jf.CENTER),o))&&this.set(Jf.CENTER,o),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,t,r){e=e!==void 0?e:200;const i=t||0,s=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,i,a),d=this.constraints_.center(this.targetCenter_,o,a,!1,this.calculateCenterShift(this.targetCenter_,o,s,a));if(e===0&&!this.cancelAnchor_){this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=d,this.applyTargetState_();return}r=r||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==o||this.getRotation()!==s||!this.getCenterInternal()||!o2(this.getCenterInternal(),d))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:d,resolution:o,duration:e,easing:Py,anchor:r}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Vl.INTERACTING,1)}endInteraction(e,t,r){r=r&&km(r,this.getProjection()),this.endInteractionInternal(e,t,r)}endInteractionInternal(e,t,r){this.getInteracting()&&(this.setHint(Vl.INTERACTING,-1),this.resolveConstraints(e,t,r))}getConstrainedCenter(e,t){const r=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,t||this.getResolution(),r)}getConstrainedZoom(e,t){const r=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(r,t))}getConstrainedResolution(e,t){t=t||0;const r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,t,r)}}function Q_(n,e){setTimeout(function(){n(e)},0)}function lJ(n){if(n.extent!==void 0){const t=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return _k(n.extent,n.constrainOnlyCenter,t)}const e=uO(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,_k(t,!1,!1)}return tJ}function uJ(n){let e,t,r,a=n.minZoom!==void 0?n.minZoom:T4,o=n.maxZoom!==void 0?n.maxZoom:28;const d=n.zoomFactor!==void 0?n.zoomFactor:2,g=n.multiWorld!==void 0?n.multiWorld:!1,b=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,E=n.showFullExtent!==void 0?n.showFullExtent:!1,S=uO(n.projection,"EPSG:3857"),O=S.getExtent();let k=n.constrainOnlyCenter,U=n.extent;if(!g&&!U&&S.isGlobal()&&(k=!1,U=O),n.resolutions!==void 0){const z=n.resolutions;t=z[a],r=z[o]!==void 0?z[o]:z[z.length-1],n.constrainResolution?e=nJ(z,b,!k&&U,E):e=bk(t,r,b,!k&&U,E)}else{const q=(O?Math.max(ps(O),Hl(O)):360*R0.degrees/S.getMetersPerUnit())/CO/Math.pow(2,T4),Q=q/Math.pow(2,28-T4);t=n.maxResolution,t!==void 0?a=0:t=q/Math.pow(d,a),r=n.minResolution,r===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?r=t/Math.pow(d,o):r=q/Math.pow(d,o):r=Q),o=a+Math.floor(Math.log(t/r)/Math.log(d)),r=t/Math.pow(d,o-a),n.constrainResolution?e=rJ(d,t,r,b,!k&&U,E):e=bk(t,r,b,!k&&U,E)}return{constraint:e,maxResolution:t,minResolution:r,minZoom:a,zoomFactor:d}}function AJ(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const t=n.constrainRotation;return t===void 0||t===!0?oJ():t===!1?xk:typeof t=="number"?iJ(t):xk}return xO}function cJ(n){return!(n.sourceCenter&&n.targetCenter&&!o2(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function P4(n,e,t,r,i){const s=Math.cos(-i);let a=Math.sin(-i),o=n[0]*s-n[1]*a,d=n[1]*s+n[0]*a;o+=(e[0]/2-t[0])*r,d+=(t[1]-e[1]/2)*r,a=-a;const g=o*s-d*a,b=d*s+o*a;return[g,b]}class Ry extends az{constructor(e){const t=Object.assign({},e);delete t.source,super(t),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(Ra.SOURCE,this.handleSourcePropertyChange_);const r=e.source?e.source:null;this.setSource(r)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(Ra.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Ka(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=Ts(e,io.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let t;const r=this.getMapInternal();!e&&r&&(e=r.getView()),e instanceof op?t={viewState:e.getState(),extent:e.calculateExtent()}:t=e,!t.layerStatesArray&&r&&(t.layerStatesArray=r.getLayerGroup().getLayerStatesArray());let i;if(t.layerStatesArray){if(i=t.layerStatesArray.find(a=>a.layer===this),!i)return!1}else i=this.getLayerState();const s=this.getExtent();return wO(i,t.viewState)&&(!s||ku(s,t.extent))}getAttributions(e){var s;if(!this.isVisible(e))return[];const t=(s=this.getSource())==null?void 0:s.getAttributions();if(!t)return[];const r=e instanceof op?e.getViewStateAndExtent():e;let i=t(r);return Array.isArray(i)||(i=[i]),i}render(e,t){const r=this.getRenderer();return r.prepareFrame(e)?(this.rendered=!0,r.renderFrame(e,t)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,t){}renderDeferred(e){const t=this.getRenderer();t&&t.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(Ra.MAP,e)}getMapInternal(){return this.get(Ra.MAP)}setMap(e){this.mapPrecomposeKey_&&(Ka(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Ka(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=Ts(e,Sf.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=Ts(this,io.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const t=e.frameState.layerStatesArray,r=this.getLayerState(!1);ra(!t.some(i=>i.layer===r.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),t.push(r)}setSource(e){this.set(Ra.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function wO(n,e){if(!n.visible)return!1;const t=e.resolution;if(t<n.minResolution||t>=n.maxResolution)return!1;const r=e.zoom;return r>n.minZoom&&r<=n.maxZoom}function Az(n,e,t=0,r=n.length-1,i=dJ){for(;r>t;){if(r-t>600){const d=r-t+1,g=e-t+1,b=Math.log(d),E=.5*Math.exp(2*b/3),S=.5*Math.sqrt(b*E*(d-E)/d)*(g-d/2<0?-1:1),O=Math.max(t,Math.floor(e-g*E/d+S)),k=Math.min(r,Math.floor(e+(d-g)*E/d+S));Az(n,e,O,k,i)}const s=n[e];let a=t,o=r;for(uv(n,t,e),i(n[r],s)>0&&uv(n,t,r);a<o;){for(uv(n,a,o),a++,o--;i(n[a],s)<0;)a++;for(;i(n[o],s)>0;)o--}i(n[t],s)===0?uv(n,t,o):(o++,uv(n,o,r)),o<=e&&(t=o+1),e<=o&&(r=o-1)}}function uv(n,e,t){const r=n[e];n[e]=n[t],n[t]=r}function dJ(n,e){return n<e?-1:n>e?1:0}let cz=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const r=[];if(!Y_(e,t))return r;const i=this.toBBox,s=[];for(;t;){for(let a=0;a<t.children.length;a++){const o=t.children[a],d=t.leaf?i(o):o;Y_(e,d)&&(t.leaf?r.push(o):D4(e,d)?this._all(o,r):s.push(o))}t=s.pop()}return r}collides(e){let t=this.data;if(!Y_(e,t))return!1;const r=[];for(;t;){for(let i=0;i<t.children.length;i++){const s=t.children[i],a=t.leaf?this.toBBox(s):s;if(Y_(e,a)){if(t.leaf||D4(e,a))return!0;r.push(s)}}t=r.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let r=0;r<e.length;r++)this.insert(e[r]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const r=this.data;this.data=t,t=r}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=L1([]),this}remove(e,t){if(!e)return this;let r=this.data;const i=this.toBBox(e),s=[],a=[];let o,d,g;for(;r||s.length;){if(r||(r=s.pop(),d=s[s.length-1],o=a.pop(),g=!0),r.leaf){const b=hJ(e,r.children,t);if(b!==-1)return r.children.splice(b,1),s.push(r),this._condense(s),this}!g&&!r.leaf&&D4(r,i)?(s.push(r),a.push(o),o=0,d=r,r=r.children[0]):d?(o++,r=d.children[o],g=!1):r=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const r=[];for(;e;)e.leaf?t.push(...e.children):r.push(...e.children),e=r.pop();return t}_build(e,t,r,i){const s=r-t+1;let a=this._maxEntries,o;if(s<=a)return o=L1(e.slice(t,r+1)),a1(o,this.toBBox),o;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),o=L1([]),o.leaf=!1,o.height=i;const d=Math.ceil(s/a),g=d*Math.ceil(Math.sqrt(a));wk(e,t,r,g,this.compareMinX);for(let b=t;b<=r;b+=g){const E=Math.min(b+g-1,r);wk(e,b,E,d,this.compareMinY);for(let S=b;S<=E;S+=d){const O=Math.min(S+d-1,E);o.children.push(this._build(e,S,O,i-1))}}return a1(o,this.toBBox),o}_chooseSubtree(e,t,r,i){for(;i.push(t),!(t.leaf||i.length-1===r);){let s=1/0,a=1/0,o;for(let d=0;d<t.children.length;d++){const g=t.children[d],b=R4(g),E=mJ(e,g)-b;E<a?(a=E,s=b<s?b:s,o=g):E===a&&b<s&&(s=b,o=g)}t=o||t.children[0]}return t}_insert(e,t,r){const i=r?e:this.toBBox(e),s=[],a=this._chooseSubtree(i,this.data,t,s);for(a.children.push(e),Mv(a,i);t>=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(i,s,t)}_split(e,t){const r=e[t],i=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,i);const a=this._chooseSplitIndex(r,s,i),o=L1(r.children.splice(a,r.children.length-a));o.height=r.height,o.leaf=r.leaf,a1(r,this.toBBox),a1(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)}_splitRoot(e,t){this.data=L1([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a1(this.data,this.toBBox)}_chooseSplitIndex(e,t,r){let i,s=1/0,a=1/0;for(let o=t;o<=r-t;o++){const d=wv(e,0,o,this.toBBox),g=wv(e,o,r,this.toBBox),b=gJ(d,g),E=R4(d)+R4(g);b<s?(s=b,i=o,a=E<a?E:a):b===s&&E<a&&(a=E,i=o)}return i||r-t}_chooseSplitAxis(e,t,r){const i=e.leaf?this.compareMinX:fJ,s=e.leaf?this.compareMinY:pJ,a=this._allDistMargin(e,t,r,i),o=this._allDistMargin(e,t,r,s);a<o&&e.children.sort(i)}_allDistMargin(e,t,r,i){e.children.sort(i);const s=this.toBBox,a=wv(e,0,t,s),o=wv(e,r-t,r,s);let d=q_(a)+q_(o);for(let g=t;g<r-t;g++){const b=e.children[g];Mv(a,e.leaf?s(b):b),d+=q_(a)}for(let g=r-t-1;g>=t;g--){const b=e.children[g];Mv(o,e.leaf?s(b):b),d+=q_(o)}return d}_adjustParentBBoxes(e,t,r){for(let i=r;i>=0;i--)Mv(t[i],e)}_condense(e){for(let t=e.length-1,r;t>=0;t--)e[t].children.length===0?t>0?(r=e[t-1].children,r.splice(r.indexOf(e[t]),1)):this.clear():a1(e[t],this.toBBox)}};function hJ(n,e,t){if(!t)return e.indexOf(n);for(let r=0;r<e.length;r++)if(t(n,e[r]))return r;return-1}function a1(n,e){wv(n,0,n.children.length,e,n)}function wv(n,e,t,r,i){i||(i=L1(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s=e;s<t;s++){const a=n.children[s];Mv(i,n.leaf?r(a):a)}return i}function Mv(n,e){return n.minX=Math.min(n.minX,e.minX),n.minY=Math.min(n.minY,e.minY),n.maxX=Math.max(n.maxX,e.maxX),n.maxY=Math.max(n.maxY,e.maxY),n}function fJ(n,e){return n.minX-e.minX}function pJ(n,e){return n.minY-e.minY}function R4(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function q_(n){return n.maxX-n.minX+(n.maxY-n.minY)}function mJ(n,e){return(Math.max(e.maxX,n.maxX)-Math.min(e.minX,n.minX))*(Math.max(e.maxY,n.maxY)-Math.min(e.minY,n.minY))}function gJ(n,e){const t=Math.max(n.minX,e.minX),r=Math.max(n.minY,e.minY),i=Math.min(n.maxX,e.maxX),s=Math.min(n.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,s-r)}function D4(n,e){return n.minX<=e.minX&&n.minY<=e.minY&&e.maxX<=n.maxX&&e.maxY<=n.maxY}function Y_(n,e){return e.minX<=n.maxX&&e.minY<=n.maxY&&e.maxX>=n.minX&&e.maxY>=n.minY}function L1(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function wk(n,e,t,r,i){const s=[e,t];for(;s.length;){if(t=s.pop(),e=s.pop(),t-e<=r)continue;const a=e+Math.ceil((t-e)/r/2)*r;Az(n,a,e,t,i),s.push(e,a,a,t)}}let jg=0;const Nd=1<<jg++,zs=1<<jg++,yh=1<<jg++,sp=1<<jg++,Pg=1<<jg++,Sv=1<<jg++,$_=Math.pow(2,jg)-1,MO={[Nd]:"boolean",[zs]:"number",[yh]:"string",[sp]:"color",[Pg]:"number[]",[Sv]:"size"},yJ=Object.keys(MO).map(Number).sort(Lm);function vJ(n){return n in MO}function Ev(n){const e=[];for(const t of yJ)Bv(n,t)&&e.push(MO[t]);return e.length===0?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function Bv(n,e){return(n&e)===e}function u0(n,e){return n===e}class zA{constructor(e,t){if(!vJ(e))throw new Error(`literal expressions must have a specific type, got ${Ev(e)}`);this.type=e,this.value=t}}class CJ{constructor(e,t,...r){this.type=e,this.operator=t,this.args=r}}function dz(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1}}function Rc(n,e,t){switch(typeof n){case"boolean":{if(u0(e,yh))return new zA(yh,n?"true":"false");if(!Bv(e,Nd))throw new Error(`got a boolean, but expected ${Ev(e)}`);return new zA(Nd,n)}case"number":{if(u0(e,Sv))return new zA(Sv,ad(n));if(u0(e,Nd))return new zA(Nd,!!n);if(u0(e,yh))return new zA(yh,n.toString());if(!Bv(e,zs))throw new Error(`got a number, but expected ${Ev(e)}`);return new zA(zs,n)}case"string":{if(u0(e,sp))return new zA(sp,qB(n));if(u0(e,Nd))return new zA(Nd,!!n);if(!Bv(e,yh))throw new Error(`got a string, but expected ${Ev(e)}`);return new zA(yh,n)}}if(!Array.isArray(n))throw new Error("expression must be an array or a primitive value");if(n.length===0)throw new Error("empty expression");if(typeof n[0]=="string")return kJ(n,e,t);for(const r of n)if(typeof r!="number")throw new Error("expected an array of numbers");if(u0(e,Sv)){if(n.length!==2)throw new Error(`expected an array of two values for a size, got ${n.length}`);return new zA(Sv,n)}if(u0(e,sp)){if(n.length===3)return new zA(sp,[...n,1]);if(n.length===4)return new zA(sp,n);throw new Error(`expected an array of 3 or 4 values for a color, got ${n.length}`)}if(!Bv(e,Pg))throw new Error(`got an array of numbers, but expected ${Ev(e)}`);return new zA(Pg,n)}const Gn={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},_J={[Gn.Get]:po(es(1,1/0),Mk),[Gn.Var]:po(es(1,1),bJ),[Gn.Has]:po(es(1,1/0),Mk),[Gn.Id]:po(xJ,l1),[Gn.Concat]:po(es(2,1/0),pa(yh)),[Gn.GeometryType]:po(wJ,l1),[Gn.LineMetric]:po(l1),[Gn.Resolution]:po(l1),[Gn.Zoom]:po(l1),[Gn.Time]:po(l1),[Gn.Any]:po(es(2,1/0),pa(Nd)),[Gn.All]:po(es(2,1/0),pa(Nd)),[Gn.Not]:po(es(1,1),pa(Nd)),[Gn.Equal]:po(es(2,2),pa($_)),[Gn.NotEqual]:po(es(2,2),pa($_)),[Gn.GreaterThan]:po(es(2,2),pa(zs)),[Gn.GreaterThanOrEqualTo]:po(es(2,2),pa(zs)),[Gn.LessThan]:po(es(2,2),pa(zs)),[Gn.LessThanOrEqualTo]:po(es(2,2),pa(zs)),[Gn.Multiply]:po(es(2,1/0),Sk),[Gn.Coalesce]:po(es(2,1/0),Sk),[Gn.Divide]:po(es(2,2),pa(zs)),[Gn.Add]:po(es(2,1/0),pa(zs)),[Gn.Subtract]:po(es(2,2),pa(zs)),[Gn.Clamp]:po(es(3,3),pa(zs)),[Gn.Mod]:po(es(2,2),pa(zs)),[Gn.Pow]:po(es(2,2),pa(zs)),[Gn.Abs]:po(es(1,1),pa(zs)),[Gn.Floor]:po(es(1,1),pa(zs)),[Gn.Ceil]:po(es(1,1),pa(zs)),[Gn.Round]:po(es(1,1),pa(zs)),[Gn.Sin]:po(es(1,1),pa(zs)),[Gn.Cos]:po(es(1,1),pa(zs)),[Gn.Atan]:po(es(1,2),pa(zs)),[Gn.Sqrt]:po(es(1,1),pa(zs)),[Gn.Match]:po(es(4,1/0),Ek,SJ),[Gn.Between]:po(es(3,3),pa(zs)),[Gn.Interpolate]:po(es(6,1/0),Ek,EJ),[Gn.Case]:po(es(3,1/0),MJ,BJ),[Gn.In]:po(es(2,2),OJ),[Gn.Number]:po(es(1,1/0),pa($_)),[Gn.String]:po(es(1,1/0),pa($_)),[Gn.Array]:po(es(1,1/0),pa(zs)),[Gn.Color]:po(es(1,4),pa(zs)),[Gn.Band]:po(es(1,3),pa(zs)),[Gn.Palette]:po(es(2,2),IJ),[Gn.ToString]:po(es(1,1),pa(Nd|zs|yh|sp))};function Mk(n,e,t){const r=n.length-1,i=new Array(r);for(let s=0;s<r;++s){const a=n[s+1];switch(typeof a){case"number":{i[s]=new zA(zs,a);break}case"string":{i[s]=new zA(yh,a);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${a}`)}s===0&&t.properties.add(String(a))}return i}function bJ(n,e,t){const r=n[1];if(typeof r!="string")throw new Error("expected a string argument for var operation");return t.variables.add(r),[new zA(yh,r)]}function xJ(n,e,t){t.featureId=!0}function wJ(n,e,t){t.geometryType=!0}function l1(n,e,t){const r=n[0];if(n.length!==1)throw new Error(`expected no arguments for ${r} operation`);return[]}function es(n,e){return function(t,r,i){const s=t[0],a=t.length-1;if(n===e){if(a!==n){const o=n===1?"":"s";throw new Error(`expected ${n} argument${o} for ${s}, got ${a}`)}}else if(a<n||a>e){const o=e===1/0?`${n} or more`:`${n} to ${e}`;throw new Error(`expected ${o} arguments for ${s}, got ${a}`)}}}function Sk(n,e,t){const r=n.length-1,i=new Array(r);for(let s=0;s<r;++s){const a=Rc(n[s+1],e,t);i[s]=a}return i}function pa(n){return function(e,t,r){const i=e.length-1,s=new Array(i);for(let a=0;a<i;++a){const o=Rc(e[a+1],n,r);s[a]=o}return s}}function MJ(n,e,t){const r=n[0],i=n.length-1;if(i%2===0)throw new Error(`expected an odd number of arguments for ${r}, got ${i} instead`)}function Ek(n,e,t){const r=n[0],i=n.length-1;if(i%2===1)throw new Error(`expected an even number of arguments for operation ${r}, got ${i} instead`)}function SJ(n,e,t){const r=n.length-1,i=yh|zs|Nd,s=Rc(n[1],i,t),a=Rc(n[n.length-1],e,t),o=new Array(r-2);for(let d=0;d<r-2;d+=2){try{const g=Rc(n[d+2],s.type,t);o[d]=g}catch(g){throw new Error(`failed to parse argument ${d+1} of match expression: ${g.message}`)}try{const g=Rc(n[d+3],a.type,t);o[d+1]=g}catch(g){throw new Error(`failed to parse argument ${d+2} of match expression: ${g.message}`)}}return[s,...o,a]}function EJ(n,e,t){const r=n[1];let i;switch(r[0]){case"linear":i=1;break;case"exponential":const d=r[1];if(typeof d!="number"||d<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(d)} instead`);i=d;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(r)}`)}const s=new zA(zs,i);let a;try{a=Rc(n[2],zs,t)}catch(d){throw new Error(`failed to parse argument 1 in interpolate expression: ${d.message}`)}const o=new Array(n.length-3);for(let d=0;d<o.length;d+=2){try{const g=Rc(n[d+3],zs,t);o[d]=g}catch(g){throw new Error(`failed to parse argument ${d+2} for interpolate expression: ${g.message}`)}try{const g=Rc(n[d+4],e,t);o[d+1]=g}catch(g){throw new Error(`failed to parse argument ${d+3} for interpolate expression: ${g.message}`)}}return[s,a,...o]}function BJ(n,e,t){const r=Rc(n[n.length-1],e,t),i=new Array(n.length-1);for(let s=0;s<i.length-1;s+=2){try{const a=Rc(n[s+1],Nd,t);i[s]=a}catch(a){throw new Error(`failed to parse argument ${s} of case expression: ${a.message}`)}try{const a=Rc(n[s+2],r.type,t);i[s+1]=a}catch(a){throw new Error(`failed to parse argument ${s+1} of case expression: ${a.message}`)}}return i[i.length-1]=r,i}function OJ(n,e,t){let r=n[2];if(!Array.isArray(r))throw new Error('the second argument for the "in" operator must be an array');let i;if(typeof r[0]=="string"){if(r[0]!=="literal")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(r[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');r=r[1],i=yh}else i=zs;const s=new Array(r.length);for(let o=0;o<s.length;o++)try{const d=Rc(r[o],i,t);s[o]=d}catch(d){throw new Error(`failed to parse haystack item ${o} for "in" expression: ${d.message}`)}return[Rc(n[1],i,t),...s]}function IJ(n,e,t){let r;try{r=Rc(n[1],zs,t)}catch(a){throw new Error(`failed to parse first argument in palette expression: ${a.message}`)}const i=n[2];if(!Array.isArray(i))throw new Error("the second argument of palette must be an array");const s=new Array(i.length);for(let a=0;a<s.length;a++){let o;try{o=Rc(i[a],sp,t)}catch(d){throw new Error(`failed to parse color at index ${a} in palette expression: ${d.message}`)}if(!(o instanceof zA))throw new Error(`the palette color at index ${a} must be a literal value`);s[a]=o}return[r,...s]}function po(...n){return function(e,t,r){const i=e[0];let s;for(let a=0;a<n.length;a++){const o=n[a](e,t,r);if(a==n.length-1){if(!o)throw new Error("expected last argument validator to return the parsed args");s=o}}return new CJ(t,i,...s)}}function kJ(n,e,t){const r=n[0],i=_J[r];if(!i)throw new Error(`unknown operator: ${r}`);return i(n,e,t)}function hz(n){if(!n)return"";const e=n.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return hz(n.getGeometries()[0]);default:return""}}function fz(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function qm(n,e,t){const r=Rc(n,e,t);return cp(r)}function cp(n,e){if(n instanceof zA){if(n.type===sp&&typeof n.value=="string"){const r=qB(n.value);return function(){return r}}return function(){return n.value}}const t=n.operator;switch(t){case Gn.Number:case Gn.String:case Gn.Coalesce:return TJ(n);case Gn.Get:case Gn.Var:case Gn.Has:return PJ(n);case Gn.Id:return r=>r.featureId;case Gn.GeometryType:return r=>r.geometryType;case Gn.Concat:{const r=n.args.map(i=>cp(i));return i=>"".concat(...r.map(s=>s(i).toString()))}case Gn.Resolution:return r=>r.resolution;case Gn.Any:case Gn.All:case Gn.Between:case Gn.In:case Gn.Not:return DJ(n);case Gn.Equal:case Gn.NotEqual:case Gn.LessThan:case Gn.LessThanOrEqualTo:case Gn.GreaterThan:case Gn.GreaterThanOrEqualTo:return RJ(n);case Gn.Multiply:case Gn.Divide:case Gn.Add:case Gn.Subtract:case Gn.Clamp:case Gn.Mod:case Gn.Pow:case Gn.Abs:case Gn.Floor:case Gn.Ceil:case Gn.Round:case Gn.Sin:case Gn.Cos:case Gn.Atan:case Gn.Sqrt:return KJ(n);case Gn.Case:return FJ(n);case Gn.Match:return LJ(n);case Gn.Interpolate:return UJ(n);case Gn.ToString:return zJ(n);default:throw new Error(`Unsupported operator ${t}`)}}function TJ(n,e){const t=n.operator,r=n.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=cp(n.args[s]);switch(t){case Gn.Coalesce:return s=>{for(let a=0;a<r;++a){const o=i[a](s);if(typeof o<"u"&&o!==null)return o}throw new Error("Expected one of the values to be non-null")};case Gn.Number:case Gn.String:return s=>{for(let a=0;a<r;++a){const o=i[a](s);if(typeof o===t)return o}throw new Error(`Expected one of the values to be a ${t}`)};default:throw new Error(`Unsupported assertion operator ${t}`)}}function PJ(n,e){const r=n.args[0].value;switch(n.operator){case Gn.Get:return i=>{const s=n.args;let a=i.properties[r];for(let o=1,d=s.length;o<d;++o){const b=s[o].value;a=a[b]}return a};case Gn.Var:return i=>i.variables[r];case Gn.Has:return i=>{const s=n.args;if(!(r in i.properties))return!1;let a=i.properties[r];for(let o=1,d=s.length;o<d;++o){const b=s[o].value;if(!a||!Object.hasOwn(a,b))return!1;a=a[b]}return!0};default:throw new Error(`Unsupported accessor operator ${n.operator}`)}}function RJ(n,e){const t=n.operator,r=cp(n.args[0]),i=cp(n.args[1]);switch(t){case Gn.Equal:return s=>r(s)===i(s);case Gn.NotEqual:return s=>r(s)!==i(s);case Gn.LessThan:return s=>r(s)<i(s);case Gn.LessThanOrEqualTo:return s=>r(s)<=i(s);case Gn.GreaterThan:return s=>r(s)>i(s);case Gn.GreaterThanOrEqualTo:return s=>r(s)>=i(s);default:throw new Error(`Unsupported comparison operator ${t}`)}}function DJ(n,e){const t=n.operator,r=n.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=cp(n.args[s]);switch(t){case Gn.Any:return s=>{for(let a=0;a<r;++a)if(i[a](s))return!0;return!1};case Gn.All:return s=>{for(let a=0;a<r;++a)if(!i[a](s))return!1;return!0};case Gn.Between:return s=>{const a=i[0](s),o=i[1](s),d=i[2](s);return a>=o&&a<=d};case Gn.In:return s=>{const a=i[0](s);for(let o=1;o<r;++o)if(a===i[o](s))return!0;return!1};case Gn.Not:return s=>!i[0](s);default:throw new Error(`Unsupported logical operator ${t}`)}}function KJ(n,e){const t=n.operator,r=n.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=cp(n.args[s]);switch(t){case Gn.Multiply:return s=>{let a=1;for(let o=0;o<r;++o)a*=i[o](s);return a};case Gn.Divide:return s=>i[0](s)/i[1](s);case Gn.Add:return s=>{let a=0;for(let o=0;o<r;++o)a+=i[o](s);return a};case Gn.Subtract:return s=>i[0](s)-i[1](s);case Gn.Clamp:return s=>{const a=i[0](s),o=i[1](s);if(a<o)return o;const d=i[2](s);return a>d?d:a};case Gn.Mod:return s=>i[0](s)%i[1](s);case Gn.Pow:return s=>Math.pow(i[0](s),i[1](s));case Gn.Abs:return s=>Math.abs(i[0](s));case Gn.Floor:return s=>Math.floor(i[0](s));case Gn.Ceil:return s=>Math.ceil(i[0](s));case Gn.Round:return s=>Math.round(i[0](s));case Gn.Sin:return s=>Math.sin(i[0](s));case Gn.Cos:return s=>Math.cos(i[0](s));case Gn.Atan:return r===2?s=>Math.atan2(i[0](s),i[1](s)):s=>Math.atan(i[0](s));case Gn.Sqrt:return s=>Math.sqrt(i[0](s));default:throw new Error(`Unsupported numeric operator ${t}`)}}function FJ(n,e){const t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=cp(n.args[i]);return i=>{for(let s=0;s<t-1;s+=2)if(r[s](i))return r[s+1](i);return r[t-1](i)}}function LJ(n,e){const t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=cp(n.args[i]);return i=>{const s=r[0](i);for(let a=1;a<t;a+=2)if(s===r[a](i))return r[a+1](i);return r[t-1](i)}}function UJ(n,e){const t=n.args.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=cp(n.args[i]);return i=>{const s=r[0](i),a=r[1](i);let o,d;for(let g=2;g<t;g+=2){const b=r[g](i);let E=r[g+1](i);const S=Array.isArray(E);if(S&&(E=wZ(E)),b>=a)return g===2?E:S?jJ(s,a,o,d,b,E):Ov(s,a,o,d,b,E);o=b,d=E}return d}}function zJ(n,e){const t=n.operator,r=n.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=cp(n.args[s]);switch(t){case Gn.ToString:return s=>{const a=i[0](s);return n.args[0].type===sp?YB(a):a.toString()};default:throw new Error(`Unsupported convert operator ${t}`)}}function Ov(n,e,t,r,i,s){const a=i-t;if(a===0)return r;const o=e-t,d=n===1?o/a:(Math.pow(n,o)-1)/(Math.pow(n,a)-1);return r+d*(s-r)}function jJ(n,e,t,r,i,s){if(i-t===0)return r;const o=V7(r),d=V7(s);let g=d[2]-o[2];g>180?g-=360:g<-180&&(g+=360);const b=[Ov(n,e,t,o[0],i,d[0]),Ov(n,e,t,o[1],i,d[1]),o[2]+Ov(n,e,t,0,i,g),Ov(n,e,t,r[3],i,s[3])];return CU(MZ(b))}function NJ(n){return!0}function WJ(n){const e=dz(),t=GJ(n,e),r=fz();return function(i,s){if(r.properties=i.getPropertiesInternal(),r.resolution=s,e.featureId){const a=i.getId();a!==void 0?r.featureId=a:r.featureId=null}return e.geometryType&&(r.geometryType=hz(i.getGeometry())),t(r)}}function Bk(n){const e=dz(),t=n.length,r=new Array(t);for(let a=0;a<t;++a)r[a]=U6(n[a],e);const i=fz(),s=new Array(t);return function(a,o){if(i.properties=a.getPropertiesInternal(),i.resolution=o,e.featureId){const g=a.getId();g!==void 0?i.featureId=g:i.featureId=null}let d=0;for(let g=0;g<t;++g){const b=r[g](i);b&&(s[d]=b,d+=1)}return s.length=d,s}}function GJ(n,e){const t=n.length,r=new Array(t);for(let i=0;i<t;++i){const s=n[i],a="filter"in s?qm(s.filter,Nd,e):NJ;let o;if(Array.isArray(s.style)){const d=s.style.length;o=new Array(d);for(let g=0;g<d;++g)o[g]=U6(s.style[g],e)}else o=[U6(s.style,e)];r[i]={filter:a,styles:o}}return function(i){const s=[];let a=!1;for(let o=0;o<t;++o){const d=r[o].filter;if(d(i)&&!(n[o].else&&a)){a=!0;for(const g of r[o].styles){const b=g(i);b&&s.push(b)}}}return s}}function U6(n,e){const t=yC(n,"",e),r=vC(n,"",e),i=QJ(n,e),s=qJ(n,e),a=vh(n,"z-index",e);if(!t&&!r&&!i&&!s&&!T0(n))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(n));const o=new Qh;return function(d){let g=!0;if(t){const b=t(d);b&&(g=!1),o.setFill(b)}if(r){const b=r(d);b&&(g=!1),o.setStroke(b)}if(i){const b=i(d);b&&(g=!1),o.setText(b)}if(s){const b=s(d);b&&(g=!1),o.setImage(b)}return a&&o.setZIndex(a(d)),g?null:o}}function yC(n,e,t){let r;if(e+"fill-pattern-src"in n)r=HJ(n,e+"fill-",t);else{if(n[e+"fill-color"]==="none")return s=>null;r=SO(n,e+"fill-color",t)}if(!r)return null;const i=new Km;return function(s){const a=r(s);return a===QB?null:(i.setColor(a),i)}}function vC(n,e,t){const r=vh(n,e+"stroke-width",t),i=SO(n,e+"stroke-color",t);if(!r&&!i)return null;const s=Pm(n,e+"stroke-line-cap",t),a=Pm(n,e+"stroke-line-join",t),o=pz(n,e+"stroke-line-dash",t),d=vh(n,e+"stroke-line-dash-offset",t),g=vh(n,e+"stroke-miter-limit",t),b=new b0;return function(E){if(i){const S=i(E);if(S===QB)return null;b.setColor(S)}if(r&&b.setWidth(r(E)),s){const S=s(E);if(S!=="butt"&&S!=="round"&&S!=="square")throw new Error("Expected butt, round, or square line cap");b.setLineCap(S)}if(a){const S=a(E);if(S!=="bevel"&&S!=="round"&&S!=="miter")throw new Error("Expected bevel, round, or miter line join");b.setLineJoin(S)}return o&&b.setLineDash(o(E)),d&&b.setLineDashOffset(d(E)),g&&b.setMiterLimit(g(E)),b}}function QJ(n,e){const t="text-",r=Pm(n,t+"value",e);if(!r)return null;const i=yC(n,t,e),s=yC(n,t+"background-",e),a=vC(n,t,e),o=vC(n,t+"background-",e),d=Pm(n,t+"font",e),g=vh(n,t+"max-angle",e),b=vh(n,t+"offset-x",e),E=vh(n,t+"offset-y",e),S=ry(n,t+"overflow",e),O=Pm(n,t+"placement",e),k=vh(n,t+"repeat",e),U=Ex(n,t+"scale",e),z=ry(n,t+"rotate-with-view",e),q=vh(n,t+"rotation",e),Q=Pm(n,t+"align",e),re=Pm(n,t+"justify",e),X=Pm(n,t+"baseline",e),Y=ry(n,t+"keep-upright",e),ee=pz(n,t+"padding",e),N=Bx(n,t+"declutter-mode"),ie=new Sx({declutterMode:N});return function(he){if(ie.setText(r(he)),i&&ie.setFill(i(he)),s&&ie.setBackgroundFill(s(he)),a&&ie.setStroke(a(he)),o&&ie.setBackgroundStroke(o(he)),d&&ie.setFont(d(he)),g&&ie.setMaxAngle(g(he)),b&&ie.setOffsetX(b(he)),E&&ie.setOffsetY(E(he)),S&&ie.setOverflow(S(he)),O){const de=O(he);if(de!=="point"&&de!=="line")throw new Error("Expected point or line for text-placement");ie.setPlacement(de)}if(k&&ie.setRepeat(k(he)),U&&ie.setScale(U(he)),z&&ie.setRotateWithView(z(he)),q&&ie.setRotation(q(he)),Q){const de=Q(he);if(de!=="left"&&de!=="center"&&de!=="right"&&de!=="end"&&de!=="start")throw new Error("Expected left, right, center, start, or end for text-align");ie.setTextAlign(de)}if(re){const de=re(he);if(de!=="left"&&de!=="right"&&de!=="center")throw new Error("Expected left, right, or center for text-justify");ie.setJustify(de)}if(X){const de=X(he);if(de!=="bottom"&&de!=="top"&&de!=="middle"&&de!=="alphabetic"&&de!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");ie.setTextBaseline(de)}return ee&&ie.setPadding(ee(he)),Y&&ie.setKeepUpright(Y(he)),ie}}function qJ(n,e){return"icon-src"in n?YJ(n,e):"shape-points"in n?$J(n,e):"circle-radius"in n?VJ(n,e):null}function YJ(n,e){const t="icon-",r=t+"src",i=mz(n[r],r),s=c2(n,t+"anchor",e),a=Ex(n,t+"scale",e),o=vh(n,t+"opacity",e),d=c2(n,t+"displacement",e),g=vh(n,t+"rotation",e),b=ry(n,t+"rotate-with-view",e),E=Ik(n,t+"anchor-origin"),S=kk(n,t+"anchor-x-units"),O=kk(n,t+"anchor-y-units"),k=eee(n,t+"color"),U=XJ(n,t+"cross-origin"),z=JJ(n,t+"offset"),q=Ik(n,t+"offset-origin"),Q=d2(n,t+"width"),re=d2(n,t+"height"),X=ZJ(n,t+"size"),Y=Bx(n,t+"declutter-mode"),ee=new r2({src:i,anchorOrigin:E,anchorXUnits:S,anchorYUnits:O,color:k,crossOrigin:U,offset:z,offsetOrigin:q,height:re,width:Q,size:X,declutterMode:Y});return function(N){return o&&ee.setOpacity(o(N)),d&&ee.setDisplacement(d(N)),g&&ee.setRotation(g(N)),b&&ee.setRotateWithView(b(N)),a&&ee.setScale(a(N)),s&&ee.setAnchor(s(N)),ee}}function $J(n,e){const t="shape-",r=t+"points",i=t+"radius",s=z6(n[r],r),a=z6(n[i],i),o=yC(n,t,e),d=vC(n,t,e),g=Ex(n,t+"scale",e),b=c2(n,t+"displacement",e),E=vh(n,t+"rotation",e),S=ry(n,t+"rotate-with-view",e),O=d2(n,t+"radius2"),k=d2(n,t+"angle"),U=Bx(n,t+"declutter-mode"),z=new fx({points:s,radius:a,radius2:O,angle:k,declutterMode:U});return function(q){return o&&z.setFill(o(q)),d&&z.setStroke(d(q)),b&&z.setDisplacement(b(q)),E&&z.setRotation(E(q)),S&&z.setRotateWithView(S(q)),g&&z.setScale(g(q)),z}}function VJ(n,e){const t="circle-",r=yC(n,t,e),i=vC(n,t,e),s=vh(n,t+"radius",e),a=Ex(n,t+"scale",e),o=c2(n,t+"displacement",e),d=vh(n,t+"rotation",e),g=ry(n,t+"rotate-with-view",e),b=Bx(n,t+"declutter-mode"),E=new NC({radius:5,declutterMode:b});return function(S){return s&&E.setRadius(s(S)),r&&E.setFill(r(S)),i&&E.setStroke(i(S)),o&&E.setDisplacement(o(S)),d&&E.setRotation(d(S)),g&&E.setRotateWithView(g(S)),a&&E.setScale(a(S)),E}}function vh(n,e,t){if(!(e in n))return;const r=qm(n[e],zs,t);return function(i){return z6(r(i),e)}}function Pm(n,e,t){if(!(e in n))return null;const r=qm(n[e],yh,t);return function(i){return mz(r(i),e)}}function HJ(n,e,t){const r=Pm(n,e+"pattern-src",t),i=Ok(n,e+"pattern-offset",t),s=Ok(n,e+"pattern-size",t),a=SO(n,e+"color",t);return function(o){return{src:r(o),offset:i&&i(o),size:s&&s(o),color:a&&a(o)}}}function ry(n,e,t){if(!(e in n))return null;const r=qm(n[e],Nd,t);return function(i){const s=r(i);if(typeof s!="boolean")throw new Error(`Expected a boolean for ${e}`);return s}}function SO(n,e,t){if(!(e in n))return null;const r=qm(n[e],sp,t);return function(i){return gz(r(i),e)}}function pz(n,e,t){if(!(e in n))return null;const r=qm(n[e],Pg,t);return function(i){return YC(r(i),e)}}function c2(n,e,t){if(!(e in n))return null;const r=qm(n[e],Pg,t);return function(i){const s=YC(r(i),e);if(s.length!==2)throw new Error(`Expected two numbers for ${e}`);return s}}function Ok(n,e,t){if(!(e in n))return null;const r=qm(n[e],Pg,t);return function(i){return yz(r(i),e)}}function Ex(n,e,t){if(!(e in n))return null;const r=qm(n[e],Pg|zs,t);return function(i){return tee(r(i),e)}}function d2(n,e){const t=n[e];if(t!==void 0){if(typeof t!="number")throw new Error(`Expected a number for ${e}`);return t}}function ZJ(n,e){const t=n[e];if(t!==void 0){if(typeof t=="number")return ad(t);if(!Array.isArray(t))throw new Error(`Expected a number or size array for ${e}`);if(t.length!==2||typeof t[0]!="number"||typeof t[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return t}}function XJ(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);return t}}function Ik(n,e){const t=n[e];if(t!==void 0){if(t!=="bottom-left"&&t!=="bottom-right"&&t!=="top-left"&&t!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return t}}function kk(n,e){const t=n[e];if(t!==void 0){if(t!=="pixels"&&t!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return t}}function JJ(n,e){const t=n[e];if(t!==void 0)return YC(t,e)}function Bx(n,e){const t=n[e];if(t!==void 0){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);if(t!=="declutter"&&t!=="obstacle"&&t!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return t}}function eee(n,e){const t=n[e];if(t!==void 0)return gz(t,e)}function YC(n,e){if(!Array.isArray(n))throw new Error(`Expected an array for ${e}`);const t=n.length;for(let r=0;r<t;++r)if(typeof n[r]!="number")throw new Error(`Expected an array of numbers for ${e}`);return n}function mz(n,e){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}function z6(n,e){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}function gz(n,e){if(typeof n=="string")return n;const t=YC(n,e),r=t.length;if(r<3||r>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return t}function yz(n,e){const t=YC(n,e);if(t.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return t}function tee(n,e){return typeof n=="number"?n:yz(n,e)}const Tk={RENDER_ORDER:"renderOrder"};class EO extends Ry{constructor(e){e=e||{};const t=Object.assign({},e);delete t.style,delete t.renderBuffer,delete t.updateWhileAnimating,delete t.updateWhileInteracting,super(t),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Tk.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,t){const r=this.getDeclutter();r in e.declutter||(e.declutter[r]=new cz(9)),this.getRenderer().renderDeclutter(e,t)}setRenderOrder(e){this.set(Tk.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?sz:e;const t=nee(e);this.styleFunction_=e===null?void 0:JX(t),this.changed()}setDeclutter(e){this.declutter_=e?String(e):void 0,this.changed()}}function nee(n){if(n===void 0)return sz;if(!n)return null;if(typeof n=="function"||n instanceof Qh)return n;if(!Array.isArray(n))return Bk([n]);if(n.length===0)return[];const e=n.length,t=n[0];if(t instanceof Qh){const i=new Array(e);for(let s=0;s<e;++s){const a=n[s];if(!(a instanceof Qh))throw new Error("Expected a list of style instances");i[s]=a}return i}if("style"in t){const i=new Array(e);for(let s=0;s<e;++s){const a=n[s];if(!("style"in a))throw new Error("Expected a list of rules with a style property");i[s]=a}return WJ(i)}return Bk(n)}const Qi={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},V_=[Qi.FILL],x0=[Qi.STROKE],yg=[Qi.BEGIN_PATH],Pk=[Qi.CLOSE_PATH];class vz{drawCustom(e,t,r,i,s){}drawGeometry(e){}setStyle(e){}drawCircle(e,t,r){}drawFeature(e,t,r){}drawGeometryCollection(e,t,r){}drawLineString(e,t,r){}drawMultiLineString(e,t,r){}drawMultiPoint(e,t,r){}drawMultiPolygon(e,t,r){}drawPoint(e,t,r){}drawPolygon(e,t,r){}drawText(e,t,r){}setFillStrokeStyle(e,t){}setImageStyle(e,t){}setTextStyle(e,t){}}class $C extends vz{constructor(e,t,r,i){super(),this.tolerance=e,this.maxExtent=t,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=r,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const t=this.pixelRatio;return t==1?e:e.map(function(r){return r*t})}appendFlatPointCoordinates(e,t){const r=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,s=this.coordinates;let a=s.length;for(let o=0,d=e.length;o<d;o+=t)i[0]=e[o],i[1]=e[o+1],Ig(r,i)&&(s[a++]=i[0],s[a++]=i[1]);return a}appendFlatLineCoordinates(e,t,r,i,s,a){const o=this.coordinates;let d=o.length;const g=this.getBufferedMaxExtent();a&&(t+=i);let b=e[t],E=e[t+1];const S=this.tmpCoordinate_;let O=!0,k,U,z;for(k=t+i;k<r;k+=i)S[0]=e[k],S[1]=e[k+1],z=O6(g,S),z!==U?(O&&(o[d++]=b,o[d++]=E,O=!1),o[d++]=S[0],o[d++]=S[1]):z===Ac.INTERSECTING?(o[d++]=S[0],o[d++]=S[1],O=!1):O=!0,b=S[0],E=S[1],U=z;return(s&&O||k===t+i)&&(o[d++]=b,o[d++]=E),d}drawCustomCoordinates_(e,t,r,i,s){for(let a=0,o=r.length;a<o;++a){const d=r[a],g=this.appendFlatLineCoordinates(e,t,d,i,!1,!1);s.push(g),t=d}return t}drawCustom(e,t,r,i,s){this.beginGeometry(e,t,s);const a=e.getType(),o=e.getStride(),d=this.coordinates.length;let g,b,E,S,O;switch(a){case"MultiPolygon":g=e.getOrientedFlatCoordinates(),S=[];const k=e.getEndss();O=0;for(let U=0,z=k.length;U<z;++U){const q=[];O=this.drawCustomCoordinates_(g,O,k[U],o,q),S.push(q)}this.instructions.push([Qi.CUSTOM,d,S,e,r,K6,s]),this.hitDetectionInstructions.push([Qi.CUSTOM,d,S,e,i||r,K6,s]);break;case"Polygon":case"MultiLineString":E=[],g=a=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),O=this.drawCustomCoordinates_(g,0,e.getEnds(),o,E),this.instructions.push([Qi.CUSTOM,d,E,e,r,fC,s]),this.hitDetectionInstructions.push([Qi.CUSTOM,d,E,e,i||r,fC,s]);break;case"LineString":case"Circle":g=e.getFlatCoordinates(),b=this.appendFlatLineCoordinates(g,0,g.length,o,!1,!1),this.instructions.push([Qi.CUSTOM,d,b,e,r,_0,s]),this.hitDetectionInstructions.push([Qi.CUSTOM,d,b,e,i||r,_0,s]);break;case"MultiPoint":g=e.getFlatCoordinates(),b=this.appendFlatPointCoordinates(g,o),b>d&&(this.instructions.push([Qi.CUSTOM,d,b,e,r,_0,s]),this.hitDetectionInstructions.push([Qi.CUSTOM,d,b,e,i||r,_0,s]));break;case"Point":g=e.getFlatCoordinates(),this.coordinates.push(g[0],g[1]),b=this.coordinates.length,this.instructions.push([Qi.CUSTOM,d,b,e,r,void 0,s]),this.hitDetectionInstructions.push([Qi.CUSTOM,d,b,e,i||r,void 0,s]);break}this.endGeometry(t)}beginGeometry(e,t,r){this.beginGeometryInstruction1_=[Qi.BEGIN_GEOMETRY,t,0,e,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Qi.BEGIN_GEOMETRY,t,0,e,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let t;const r=e.length;let i,s,a=-1;for(t=0;t<r;++t)i=e[t],s=i[0],s==Qi.END_GEOMETRY?a=t:s==Qi.BEGIN_GEOMETRY&&(i[2]=t,mZ(this.hitDetectionInstructions,a,t),a=-1)}setFillStrokeStyle(e,t){const r=this.state;if(e){const i=e.getColor();r.fillPatternScale=i&&typeof i=="object"&&"src"in i?this.pixelRatio:1,r.fillStyle=qp(i||mh)}else r.fillStyle=void 0;if(t){const i=t.getColor();r.strokeStyle=qp(i||lC);const s=t.getLineCap();r.lineCap=s!==void 0?s:_y;const a=t.getLineDash();r.lineDash=a?a.slice():Um;const o=t.getLineDashOffset();r.lineDashOffset=o||zm;const d=t.getLineJoin();r.lineJoin=d!==void 0?d:by;const g=t.getWidth();r.lineWidth=g!==void 0?g:AC;const b=t.getMiterLimit();r.miterLimit=b!==void 0?b:aC,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0}createFill(e){const t=e.fillStyle,r=[Qi.SET_FILL_STYLE,t];return typeof t!="string"&&r.push(e.fillPatternScale),r}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Qi.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,t){const r=e.fillStyle;(typeof r!="string"||e.currentFillStyle!=r)&&(r!==void 0&&this.instructions.push(t.call(this,e)),e.currentFillStyle=r)}updateStrokeStyle(e,t){const r=e.strokeStyle,i=e.lineCap,s=e.lineDash,a=e.lineDashOffset,o=e.lineJoin,d=e.lineWidth,g=e.miterLimit;(e.currentStrokeStyle!=r||e.currentLineCap!=i||s!=e.currentLineDash&&!D0(e.currentLineDash,s)||e.currentLineDashOffset!=a||e.currentLineJoin!=o||e.currentLineWidth!=d||e.currentMiterLimit!=g)&&(r!==void 0&&t.call(this,e),e.currentStrokeStyle=r,e.currentLineCap=i,e.currentLineDash=s,e.currentLineDashOffset=a,e.currentLineJoin=o,e.currentLineWidth=d,e.currentMiterLimit=g)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const t=[Qi.END_GEOMETRY,e];this.instructions.push(t),this.hitDetectionInstructions.push(t)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=RU(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;B0(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class ree extends $C{constructor(e,t,r,i){super(e,t,r,i),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,t,r){if(!this.image_||this.maxExtent&&!Ig(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,t,r);const i=e.getFlatCoordinates(),s=e.getStride(),a=this.coordinates.length,o=this.appendFlatPointCoordinates(i,s);this.instructions.push([Qi.DRAW_IMAGE,a,o,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([Qi.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}drawMultiPoint(e,t,r){if(!this.image_)return;this.beginGeometry(e,t,r);const i=e.getFlatCoordinates(),s=[];for(let d=0,g=i.length;d<g;d+=e.getStride())(!this.maxExtent||Ig(this.maxExtent,i.slice(d,d+2)))&&s.push(i[d],i[d+1]);const a=this.coordinates.length,o=this.appendFlatPointCoordinates(s,2);this.instructions.push([Qi.DRAW_IMAGE,a,o,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([Qi.DRAW_IMAGE,a,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(t)}finish(){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,super.finish()}setImageStyle(e,t){const r=e.getAnchor(),i=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=i[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_=i[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}class iee extends $C{constructor(e,t,r,i){super(e,t,r,i)}drawFlatCoordinates_(e,t,r,i){const s=this.coordinates.length,a=this.appendFlatLineCoordinates(e,t,r,i,!1,!1),o=[Qi.MOVE_TO_LINE_TO,s,a];return this.instructions.push(o),this.hitDetectionInstructions.push(o),r}drawLineString(e,t,r){const i=this.state,s=i.strokeStyle,a=i.lineWidth;if(s===void 0||a===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t,r),this.hitDetectionInstructions.push([Qi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Um,zm],yg);const o=e.getFlatCoordinates(),d=e.getStride();this.drawFlatCoordinates_(o,0,o.length,d),this.hitDetectionInstructions.push(x0),this.endGeometry(t)}drawMultiLineString(e,t,r){const i=this.state,s=i.strokeStyle,a=i.lineWidth;if(s===void 0||a===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,t,r),this.hitDetectionInstructions.push([Qi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Um,zm],yg);const o=e.getEnds(),d=e.getFlatCoordinates(),g=e.getStride();let b=0;for(let E=0,S=o.length;E<S;++E)b=this.drawFlatCoordinates_(d,b,o[E],g);this.hitDetectionInstructions.push(x0),this.endGeometry(t)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(x0),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(x0),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(yg)}}class Rk extends $C{constructor(e,t,r,i){super(e,t,r,i)}drawFlatCoordinatess_(e,t,r,i){const s=this.state,a=s.fillStyle!==void 0,o=s.strokeStyle!==void 0,d=r.length;this.instructions.push(yg),this.hitDetectionInstructions.push(yg);for(let g=0;g<d;++g){const b=r[g],E=this.coordinates.length,S=this.appendFlatLineCoordinates(e,t,b,i,!0,!o),O=[Qi.MOVE_TO_LINE_TO,E,S];this.instructions.push(O),this.hitDetectionInstructions.push(O),o&&(this.instructions.push(Pk),this.hitDetectionInstructions.push(Pk)),t=b}return a&&(this.instructions.push(V_),this.hitDetectionInstructions.push(V_)),o&&(this.instructions.push(x0),this.hitDetectionInstructions.push(x0)),t}drawCircle(e,t,r){const i=this.state,s=i.fillStyle,a=i.strokeStyle;if(s===void 0&&a===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_FILL_STYLE,mh]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Um,zm]);const o=e.getFlatCoordinates(),d=e.getStride(),g=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,d,!1,!1);const b=[Qi.CIRCLE,g];this.instructions.push(yg,b),this.hitDetectionInstructions.push(yg,b),i.fillStyle!==void 0&&(this.instructions.push(V_),this.hitDetectionInstructions.push(V_)),i.strokeStyle!==void 0&&(this.instructions.push(x0),this.hitDetectionInstructions.push(x0)),this.endGeometry(t)}drawPolygon(e,t,r){const i=this.state,s=i.fillStyle,a=i.strokeStyle;if(s===void 0&&a===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_FILL_STYLE,mh]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Um,zm]);const o=e.getEnds(),d=e.getOrientedFlatCoordinates(),g=e.getStride();this.drawFlatCoordinatess_(d,0,o,g),this.endGeometry(t)}drawMultiPolygon(e,t,r){const i=this.state,s=i.fillStyle,a=i.strokeStyle;if(s===void 0&&a===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,t,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_FILL_STYLE,mh]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qi.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Um,zm]);const o=e.getEndss(),d=e.getOrientedFlatCoordinates(),g=e.getStride();let b=0;for(let E=0,S=o.length;E<S;++E)b=this.drawFlatCoordinatess_(d,b,o[E],g);this.endGeometry(t)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const t=this.coordinates;for(let r=0,i=t.length;r<i;++r)t[r]=lg(t[r],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;e.fillStyle!==void 0&&this.updateFillStyle(e,this.createFill),e.strokeStyle!==void 0&&this.updateStrokeStyle(e,this.applyStroke)}}function oee(n,e,t,r,i){const s=[];let a=t,o=0,d=e.slice(t,2);for(;o<n&&a+i<r;){const[g,b]=d.slice(-2),E=e[a+i],S=e[a+i+1],O=Math.sqrt((E-g)*(E-g)+(S-b)*(S-b));if(o+=O,o>=n){const k=(n-o+O)/O,U=Gh(g,E,k),z=Gh(b,S,k);d.push(U,z),s.push(d),d=[U,z],o==n&&(a+=i),o=0}else if(o<n)d.push(e[a+i],e[a+i+1]),a+=i;else{const k=O-o,U=Gh(g,E,k/O),z=Gh(b,S,k/O);d.push(U,z),s.push(d),d=[U,z],o=0,a+=i}}return o>0&&s.push(d),s}function see(n,e,t,r,i){let s=t,a=t,o=0,d=0,g=t,b,E,S,O,k,U,z,q,Q,re;for(E=t;E<r;E+=i){const X=e[E],Y=e[E+1];k!==void 0&&(Q=X-k,re=Y-U,O=Math.sqrt(Q*Q+re*re),z!==void 0&&(d+=S,b=Math.acos((z*Q+q*re)/(S*O)),b>n&&(d>o&&(o=d,s=g,a=E),d=0,g=E-i)),S=O,z=Q,q=re),k=X,U=Y}return d+=O,d>o?[g,E]:[s,a]}const h2={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class aee extends $C{constructor(e,t,r,i){super(e,t,r,i),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[mh]={fillStyle:mh},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,t,r){const i=this.textFillState_,s=this.textStrokeState_,a=this.textState_;if(this.text_===""||!a||!i&&!s)return;const o=this.coordinates;let d=o.length;const g=e.getType();let b=null,E=e.getStride();if(a.placement==="line"&&(g=="LineString"||g=="MultiLineString"||g=="Polygon"||g=="MultiPolygon")){if(!ku(this.maxExtent,e.getExtent()))return;let S;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"){const z=e.getEndss();S=[];for(let q=0,Q=z.length;q<Q;++q)S.push(z[q][0])}this.beginGeometry(e,t,r);const O=a.repeat,k=O?void 0:a.textAlign;let U=0;for(let z=0,q=S.length;z<q;++z){let Q;O?Q=oee(O*this.resolution,b,U,S[z],E):Q=[b.slice(U,S[z])];for(let re=0,X=Q.length;re<X;++re){const Y=Q[re];let ee=0,N=Y.length;if(k==null){const he=see(a.maxAngle,Y,0,Y.length,2);ee=he[0],N=he[1]}for(let he=ee;he<N;he+=E)o.push(Y[he],Y[he+1]);const ie=o.length;U=S[z],this.drawChars_(d,ie),d=ie}}this.endGeometry(t)}else{let S=a.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(),E=2;break;case"Polygon":b=e.getFlatInteriorPoint(),a.overflow||S.push(b[2]/this.resolution),E=3;break;case"MultiPolygon":const Q=e.getFlatInteriorPoints();b=[];for(let re=0,X=Q.length;re<X;re+=3)a.overflow||S.push(Q[re+2]/this.resolution),b.push(Q[re],Q[re+1]);if(b.length===0)return;E=2;break}const O=this.appendFlatPointCoordinates(b,E);if(O===d)return;if(S&&(O-d)/2!==b.length/E){let Q=d/2;S=S.filter((re,X)=>{const Y=o[(Q+X)*2]===b[X*E]&&o[(Q+X)*2+1]===b[X*E+1];return Y||--Q,Y})}this.saveTextStates_(),(a.backgroundFill||a.backgroundStroke)&&(this.setFillStrokeStyle(a.backgroundFill,a.backgroundStroke),a.backgroundFill&&this.updateFillStyle(this.state,this.createFill),a.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,t,r);let k=a.padding;if(k!=pg&&(a.scale[0]<0||a.scale[1]<0)){let Q=a.padding[0],re=a.padding[1],X=a.padding[2],Y=a.padding[3];a.scale[0]<0&&(re=-re,Y=-Y),a.scale[1]<0&&(Q=-Q,X=-X),k=[Q,re,X,Y]}const U=this.pixelRatio;this.instructions.push([Qi.DRAW_IMAGE,d,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,k==pg?pg:k.map(function(Q){return Q*U}),!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,S]);const z=1/U,q=this.state.fillStyle;a.backgroundFill&&(this.state.fillStyle=mh,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Qi.DRAW_IMAGE,d,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[z,z],NaN,this.declutterMode_,this.declutterImageWithText_,k,!!a.backgroundFill,!!a.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?mh:this.fillKey_,this.textOffsetX_,this.textOffsetY_,S]),a.backgroundFill&&(this.state.fillStyle=q,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(t)}}saveTextStates_(){const e=this.textStrokeState_,t=this.textState_,r=this.textFillState_,i=this.strokeKey_;e&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:t.font,textAlign:t.textAlign||uC,justify:t.justify,textBaseline:t.textBaseline||t2,scale:t.scale});const a=this.fillKey_;r&&(a in this.fillStates||(this.fillStates[a]={fillStyle:r.fillStyle}))}drawChars_(e,t){const r=this.textStrokeState_,i=this.textState_,s=this.strokeKey_,a=this.textKey_,o=this.fillKey_;this.saveTextStates_();const d=this.pixelRatio,g=h2[i.textBaseline],b=this.textOffsetY_*d,E=this.text_,S=r?r.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Qi.DRAW_CHARS,e,t,g,i.overflow,o,i.maxAngle,d,b,s,S*d,E,a,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([Qi.DRAW_CHARS,e,t,g,i.overflow,o&&mh,i.maxAngle,d,b,s,S*d,E,a,1/d,this.declutterMode_,this.textKeepUpright_])}setTextStyle(e,t){let r,i,s;if(!e)this.text_="";else{const a=e.getFill();a?(i=this.textFillState_,i||(i={},this.textFillState_=i),i.fillStyle=qp(a.getColor()||mh)):(i=null,this.textFillState_=i);const o=e.getStroke();if(!o)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const U=o.getLineDash(),z=o.getLineDashOffset(),q=o.getWidth(),Q=o.getMiterLimit();s.lineCap=o.getLineCap()||_y,s.lineDash=U?U.slice():Um,s.lineDashOffset=z===void 0?zm:z,s.lineJoin=o.getLineJoin()||by,s.lineWidth=q===void 0?AC:q,s.miterLimit=Q===void 0?aC:Q,s.strokeStyle=qp(o.getColor()||lC)}r=this.textState_;const d=e.getFont()||BU;OU(d);const g=e.getScaleArray();r.overflow=e.getOverflow(),r.font=d,r.maxAngle=e.getMaxAngle(),r.placement=e.getPlacement(),r.textAlign=e.getTextAlign(),r.repeat=e.getRepeat(),r.justify=e.getJustify(),r.textBaseline=e.getTextBaseline()||t2,r.backgroundFill=e.getBackgroundFill(),r.backgroundStroke=e.getBackgroundStroke(),r.padding=e.getPadding()||pg,r.scale=g===void 0?[1,1]:g;const b=e.getOffsetX(),E=e.getOffsetY(),S=e.getRotateWithView(),O=e.getKeepUpright(),k=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=b===void 0?0:b,this.textOffsetY_=E===void 0?0:E,this.textRotateWithView_=S===void 0?!1:S,this.textKeepUpright_=O===void 0?!0:O,this.textRotation_=k===void 0?0:k,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_=r.font+r.scale+(r.textAlign||"?")+(r.repeat||"?")+(r.justify||"?")+(r.textBaseline||"?"),this.fillKey_=i&&i.fillStyle?typeof i.fillStyle=="string"?i.fillStyle:"|"+Lo(i.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=t}}const lee={Circle:Rk,Default:$C,Image:ree,LineString:iee,Polygon:Rk,Text:aee};class Cz{constructor(e,t,r,i){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=i,this.resolution_=r,this.buildersByZIndex_={}}finish(){const e={};for(const t in this.buildersByZIndex_){e[t]=e[t]||{};const r=this.buildersByZIndex_[t];for(const i in r){const s=r[i].finish();e[t][i]=s}}return e}getBuilder(e,t){const r=e!==void 0?e.toString():"0";let i=this.buildersByZIndex_[r];i===void 0&&(i={},this.buildersByZIndex_[r]=i);let s=i[t];if(s===void 0){const a=lee[t];s=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=s}return s}}const uee=5;class Aee extends jC{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=uee}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return go()}getData(e){return null}prepareFrame(e){return go()}renderFrame(e,t){return go()}forEachFeatureAtCoordinate(e,t,r,i,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const t=e.target;(t.getState()===hi.LOADED||t.getState()===hi.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let t=e.getState();return t!=hi.LOADED&&t!=hi.ERROR&&e.addEventListener(io.CHANGE,this.boundHandleImageChange_),t==hi.IDLE&&(e.load(),t=e.getState()),t==hi.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class _z extends hp{constructor(e,t,r,i){super(e),this.inversePixelTransform=t,this.frameState=r,this.context=i}}class BO{constructor(){kn(this,"pushMethodArgs_",(...e)=>(this.instructions_[this.zIndex+this.offset_].push(e),this));this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Jb(),{get:(e,t)=>{if(typeof Jb()[t]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(t),this.pushMethodArgs_},set:(e,t,r)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(t,r),!0)})}pushFunction(e){this.instructions_[this.zIndex+this.offset_].push(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(t=>{for(let r=0,i=t.length;r<i;++r){const s=t[r];if(typeof s=="function"){s(e);continue}const a=t[++r];if(typeof e[s]=="function")e[s](...a);else{if(typeof a=="function"){e[s]=a(e);continue}e[s]=a}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const Dk=[];let U1=null;function cee(){U1=Jl(1,1,void 0,{willReadFrequently:!0})}class OO extends Aee{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=Ch(),this.pixelTransform=Ch(),this.inversePixelTransform=Ch(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(e,t,r){U1||cee(),U1.clearRect(0,0,1,1);let i;try{U1.drawImage(e,t,r,1,1,0,0,1,1),i=U1.getImageData(0,0,1,1).data}catch{return U1=null,null}return i}getBackground(e){let r=this.getLayer().getBackground();return typeof r=="function"&&(r=r(e.viewState.resolution)),r||void 0}useContainer(e,t,r){const i=this.getLayer().getClassName();let s,a;if(e&&e.className===i&&(!r||e&&e.style.backgroundColor&&D0(vy(e.style.backgroundColor),vy(r)))){const o=e.firstElementChild;o instanceof HTMLCanvasElement&&(a=o.getContext("2d"))}if(a&&a.canvas.style.transform===t?(this.container=e,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=i;let o=s.style;o.position="absolute",o.width="100%",o.height="100%",a=Jl();const d=a.canvas;s.appendChild(d),o=d.style,o.position="absolute",o.left="0",o.transformOrigin="top left",this.container=s,this.context=a}!this.containerReused&&r&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=r)}clipUnrotated(e,t,r){const i=Ap(r),s=yx(r),a=gx(r),o=mx(r);yA(t.coordinateToPixelTransform,i),yA(t.coordinateToPixelTransform,s),yA(t.coordinateToPixelTransform,a),yA(t.coordinateToPixelTransform,o);const d=this.inversePixelTransform;yA(d,i),yA(d,s),yA(d,a),yA(d,o),e.save(),e.beginPath(),e.moveTo(Math.round(i[0]),Math.round(i[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(o[0]),Math.round(o[1])),e.clip()}prepareContainer(e,t){const r=e.extent,i=e.viewState.resolution,s=e.viewState.rotation,a=e.pixelRatio,o=Math.round(ps(r)/i*a),d=Math.round(Hl(r)/i*a);em(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/a,1/a,s,-o/2,-d/2),PU(this.inversePixelTransform,this.pixelTransform);const g=HZ(this.pixelTransform);if(this.useContainer(t,g,this.getBackground(e)),!this.containerReused){const b=this.context.canvas;b.width!=o||b.height!=d?(b.width=o,b.height=d):this.context.clearRect(0,0,o,d),g!==b.style.transform&&(b.style.transform=g)}}dispatchRenderEvent_(e,t,r){const i=this.getLayer();if(i.hasListener(e)){const s=new _z(e,this.inversePixelTransform,r,t);i.dispatchEvent(s)}}preRender(e,t){this.frameState=t,!t.declutter&&this.dispatchRenderEvent_(Sf.PRERENDER,e,t)}postRender(e,t){t.declutter||this.dispatchRenderEvent_(Sf.POSTRENDER,e,t)}renderDeferredInternal(e){}getRenderContext(e){return e.declutter&&!this.deferredContext_&&(this.deferredContext_=new BO),e.declutter?this.deferredContext_.getContext():this.context}renderDeferred(e){e.declutter&&(this.dispatchRenderEvent_(Sf.PRERENDER,this.context,e),e.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(e),this.dispatchRenderEvent_(Sf.POSTRENDER,this.context,e))}getRenderTransform(e,t,r,i,s,a,o){const d=s/2,g=a/2,b=i/t,E=-b,S=-e[0]+o,O=-e[1];return em(this.tempTransform,d,g,b,E,-r,S,O)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function dee(n,e,t,r,i,s,a,o,d,g,b,E,S=!0){let O=n[e],k=n[e+1],U=0,z=0,q=0,Q=0;function re(){U=O,z=k,e+=r,O=n[e],k=n[e+1],Q+=q,q=Math.sqrt((O-U)*(O-U)+(k-z)*(k-z))}do re();while(e<t-r&&Q+q<s);let X=q===0?0:(s-Q)/q;const Y=Gh(U,O,X),ee=Gh(z,k,X),N=e-r,ie=Q,he=s+o*d(g,i,b);for(;e<t-r&&Q+q<he;)re();X=q===0?0:(he-Q)/q;const de=Gh(U,O,X),Me=Gh(z,k,X);let fe=!1;if(S)if(E){const Qe=[Y,ee,de,Me];qU(Qe,0,4,2,E,Qe,Qe),fe=Qe[0]>Qe[2]}else fe=Y>de;const xe=Math.PI,De=[],me=N+r===e;e=N,q=0,Q=ie,O=n[e],k=n[e+1];let at;if(me){re(),at=Math.atan2(k-z,O-U),fe&&(at+=at>0?-xe:xe);const Qe=(de+Y)/2,He=(Me+ee)/2;return De[0]=[Qe,He,(he-s)/2,at,i],De}i=i.replace(/\n/g," ");for(let Qe=0,He=i.length;Qe<He;){re();let We=Math.atan2(k-z,O-U);if(fe&&(We+=We>0?-xe:xe),at!==void 0){let gt=We-at;if(gt+=gt>xe?-2*xe:gt<-xe?2*xe:0,Math.abs(gt)>a)return null}at=We;const Ce=Qe;let Te=0;for(;Qe<He;++Qe){const gt=fe?He-Qe-1:Qe,Dt=o*d(g,i[gt],b);if(e+r<t&&Q+q<s+Te+Dt/2)break;Te+=Dt}if(Qe===Ce)continue;const rt=fe?i.substring(He-Ce,He-Qe):i.substring(Ce,Qe);X=q===0?0:(s+Te/2-Q)/q;const yt=Gh(U,O,X),bt=Gh(z,k,X);De.push([yt,bt,Te/2,We,rt]),s+=Te}return De}const u1=Hh(),A0=[],Bm=[],Om=[],c0=[];function Kk(n){return n[3].declutterBox}const Fk=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function K4(n,e){return e==="start"?e=Fk.test(n)?"right":"left":e==="end"&&(e=Fk.test(n)?"left":"right"),h2[e]}function hee(n,e,t){return t>0&&n.push(`
|
||
`,""),n.push(e,""),n}class fee{constructor(e,t,r,i,s){this.overlaps=r,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=Ch(),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_={},this.zIndexContext_=s?new BO:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,r,i){const s=e+t+r+i;if(this.labels_[s])return this.labels_[s];const a=i?this.strokeStates[i]:null,o=r?this.fillStates[r]:null,d=this.textStates[t],g=this.pixelRatio,b=[d.scale[0]*g,d.scale[1]*g],E=d.justify?h2[d.justify]:K4(Array.isArray(e)?e[0]:e,d.textAlign||uC),S=i&&a.lineWidth?a.lineWidth:0,O=Array.isArray(e)?e:String(e).split(`
|
||
`).reduce(hee,[]),{width:k,height:U,widths:z,heights:q,lineWidths:Q}=WZ(d,O),re=k+S,X=[],Y=(re+2)*b[0],ee=(U+S)*b[1],N={width:Y<0?Math.floor(Y):Math.ceil(Y),height:ee<0?Math.floor(ee):Math.ceil(ee),contextInstructions:X};(b[0]!=1||b[1]!=1)&&X.push("scale",b),i&&(X.push("strokeStyle",a.strokeStyle),X.push("lineWidth",S),X.push("lineCap",a.lineCap),X.push("lineJoin",a.lineJoin),X.push("miterLimit",a.miterLimit),X.push("setLineDash",[a.lineDash]),X.push("lineDashOffset",a.lineDashOffset)),r&&X.push("fillStyle",o.fillStyle),X.push("textBaseline","middle"),X.push("textAlign","center");const ie=.5-E;let he=E*re+ie*S;const de=[],Me=[];let fe=0,xe=0,De=0,me=0,at;for(let Qe=0,He=O.length;Qe<He;Qe+=2){const We=O[Qe];if(We===`
|
||
`){xe+=fe,fe=0,he=E*re+ie*S,++me;continue}const Ce=O[Qe+1]||d.font;Ce!==at&&(i&&de.push("font",Ce),r&&Me.push("font",Ce),at=Ce),fe=Math.max(fe,q[De]);const Te=[We,he+ie*z[De]+E*(z[De]-Q[me]),.5*(S+fe)+xe];he+=z[De],i&&de.push("strokeText",Te),r&&Me.push("fillText",Te),++De}return Array.prototype.push.apply(X,de),Array.prototype.push.apply(X,Me),this.labels_[s]=N,N}replayTextBackground_(e,t,r,i,s,a,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,t),a&&(this.alignAndScaleFill_=a[2],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}calculateImageOrLabelDimensions_(e,t,r,i,s,a,o,d,g,b,E,S,O,k,U,z){o*=S[0],d*=S[1];let q=r-o,Q=i-d;const re=s+g>e?e-g:s,X=a+b>t?t-b:a,Y=k[3]+re*S[0]+k[1],ee=k[0]+X*S[1]+k[2],N=q-k[3],ie=Q-k[0];(U||E!==0)&&(A0[0]=N,c0[0]=N,A0[1]=ie,Bm[1]=ie,Bm[0]=N+Y,Om[0]=Bm[0],Om[1]=ie+ee,c0[1]=Om[1]);let he;return E!==0?(he=em(Ch(),r,i,1,1,E,-r,-i),yA(he,A0),yA(he,Bm),yA(he,Om),yA(he,c0),Wm(Math.min(A0[0],Bm[0],Om[0],c0[0]),Math.min(A0[1],Bm[1],Om[1],c0[1]),Math.max(A0[0],Bm[0],Om[0],c0[0]),Math.max(A0[1],Bm[1],Om[1],c0[1]),u1)):Wm(Math.min(N,N+Y),Math.min(ie,ie+ee),Math.max(N,N+Y),Math.max(ie,ie+ee),u1),O&&(q=Math.round(q),Q=Math.round(Q)),{drawImageX:q,drawImageY:Q,drawImageW:re,drawImageH:X,originX:g,originY:b,declutterBox:{minX:u1[0],minY:u1[1],maxX:u1[2],maxY:u1[3],value:z},canvasTransform:he,scale:S}}replayImageOrLabel_(e,t,r,i,s,a,o){const d=!!(a||o),g=i.declutterBox,b=o?o[2]*i.scale[0]/2:0;return g.minX-b<=t[0]&&g.maxX+b>=0&&g.minY-b<=t[1]&&g.maxY+b>=0&&(d&&this.replayTextBackground_(e,A0,Bm,Om,c0,a,o),GZ(e,i.canvasTransform,s,r,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(e){const t=this.alignAndScaleFill_;if(t){const r=yA(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(r[0]%i,r[1]%i),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6])}drawLabelWithPointPlacement_(e,t,r,i){const s=this.textStates[t],a=this.createLabel(e,t,i,r),o=this.strokeStates[r],d=this.pixelRatio,g=K4(Array.isArray(e)?e[0]:e,s.textAlign||uC),b=h2[s.textBaseline||t2],E=o&&o.lineWidth?o.lineWidth:0,S=a.width/d-2*s.scale[0],O=g*S+2*(.5-g)*E,k=b*a.height/d+2*(.5-b)*E;return{label:a,anchorX:O,anchorY:k}}execute_(e,t,r,i,s,a,o,d){const g=this.zIndexContext_;let b;this.pixelCoordinates_&&D0(r,this.renderedTransform_)?b=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),b=O0(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),YZ(this.renderedTransform_,r));let E=0;const S=i.length;let O=0,k,U,z,q,Q,re,X,Y,ee,N,ie,he,de,Me=0,fe=0,xe=null,De=null;const me=this.coordinateCache_,at=this.viewRotation_,Qe=Math.round(Math.atan2(-r[1],r[0])*1e12)/1e12,He={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:at},We=this.instructions!=i||this.overlaps?0:200;let Ce,Te,rt,yt;for(;E<S;){const bt=i[E];switch(bt[0]){case Qi.BEGIN_GEOMETRY:Ce=bt[1],yt=bt[3],Ce.getGeometry()?o!==void 0&&!ku(o,yt.getExtent())?E=bt[2]+1:++E:E=bt[2],g&&(g.zIndex=bt[4]);break;case Qi.BEGIN_PATH:Me>We&&(this.fill_(e),Me=0),fe>We&&(e.stroke(),fe=0),!Me&&!fe&&(e.beginPath(),Q=NaN,re=NaN),++E;break;case Qi.CIRCLE:O=bt[1];const Dt=b[O],Pt=b[O+1],Le=b[O+2],Pe=b[O+3],Ee=Le-Dt,nt=Pe-Pt,_t=Math.sqrt(Ee*Ee+nt*nt);e.moveTo(Dt+_t,Pt),e.arc(Dt,Pt,_t,0,2*Math.PI,!0),++E;break;case Qi.CLOSE_PATH:e.closePath(),++E;break;case Qi.CUSTOM:O=bt[1],k=bt[2];const ht=bt[3],Ut=bt[4],en=bt[5];He.geometry=ht,He.feature=Ce,E in me||(me[E]=[]);const Ft=me[E];en?en(b,O,k,2,Ft):(Ft[0]=b[O],Ft[1]=b[O+1],Ft.length=2),g&&(g.zIndex=bt[6]),Ut(Ft,He),++E;break;case Qi.DRAW_IMAGE:O=bt[1],k=bt[2],ee=bt[3],U=bt[4],z=bt[5];let mn=bt[6];const jn=bt[7],nn=bt[8],ir=bt[9],Dn=bt[10];let fn=bt[11];const Hn=bt[12];let wr=bt[13];q=bt[14]||"declutter";const Qn=bt[15];if(!ee&&bt.length>=20){N=bt[19],ie=bt[20],he=bt[21],de=bt[22];const xt=this.drawLabelWithPointPlacement_(N,ie,he,de);ee=xt.label,bt[3]=ee;const Rn=bt[23];U=(xt.anchorX-Rn)*this.pixelRatio,bt[4]=U;const Bn=bt[24];z=(xt.anchorY-Bn)*this.pixelRatio,bt[5]=z,mn=ee.height,bt[6]=mn,wr=ee.width,bt[13]=wr}let Xn;bt.length>25&&(Xn=bt[25]);let Ge,Ae,pe;bt.length>17?(Ge=bt[16],Ae=bt[17],pe=bt[18]):(Ge=pg,Ae=!1,pe=!1),Dn&&Qe?fn+=at:!Dn&&!Qe&&(fn-=at);let et=0;for(;O<k;O+=2){if(Xn&&Xn[et++]<wr/this.pixelRatio)continue;const xt=this.calculateImageOrLabelDimensions_(ee.width,ee.height,b[O],b[O+1],wr,mn,U,z,nn,ir,fn,Hn,s,Ge,Ae||pe,Ce),Rn=[e,t,ee,xt,jn,Ae?xe:null,pe?De:null];if(d){let Bn,fr,Sr;if(Qn){const Fn=k-O;if(!Qn[Fn]){Qn[Fn]={args:Rn,declutterMode:q};continue}const Or=Qn[Fn];Bn=Or.args,fr=Or.declutterMode,delete Qn[Fn],Sr=Kk(Bn)}let on,Nn;if(Bn&&(fr!=="declutter"||!d.collides(Sr))&&(on=!0),(q!=="declutter"||!d.collides(xt.declutterBox))&&(Nn=!0),fr==="declutter"&&q==="declutter"){const Fn=on&&Nn;on=Fn,Nn=Fn}on&&(fr!=="none"&&d.insert(Sr),this.replayImageOrLabel_.apply(this,Bn)),Nn&&(q!=="none"&&d.insert(xt.declutterBox),this.replayImageOrLabel_.apply(this,Rn))}else this.replayImageOrLabel_.apply(this,Rn)}++E;break;case Qi.DRAW_CHARS:const St=bt[1],Yt=bt[2],rn=bt[3],er=bt[4];de=bt[5];const Be=bt[6],oe=bt[7],ve=bt[8];he=bt[9];const p=bt[10];N=bt[11],ie=bt[12];const je=[bt[13],bt[13]];q=bt[14]||"declutter";const Ye=bt[15],tt=this.textStates[ie],ct=tt.font,At=[tt.scale[0]*oe,tt.scale[1]*oe];let Gt;ct in this.widths_?Gt=this.widths_[ct]:(Gt={},this.widths_[ct]=Gt);const $t=tz(b,St,Yt,2),jt=Math.abs(At[0])*tk(ct,N,Gt);if(er||jt<=$t){const xt=this.textStates[ie].textAlign,Rn=($t-jt)*K4(N,xt),Bn=dee(b,St,Yt,2,N,Rn,Be,Math.abs(At[0]),tk,ct,Gt,Qe?0:this.viewRotation_,Ye);e:if(Bn){const fr=[];let Sr,on,Nn,Fn,Or;if(he)for(Sr=0,on=Bn.length;Sr<on;++Sr){Or=Bn[Sr],Nn=Or[4],Fn=this.createLabel(Nn,ie,"",he),U=Or[2]+(At[0]<0?-p:p),z=rn*Fn.height+(.5-rn)*2*p*At[1]/At[0]-ve;const Er=this.calculateImageOrLabelDimensions_(Fn.width,Fn.height,Or[0],Or[1],Fn.width,Fn.height,U,z,0,0,Or[3],je,!1,pg,!1,Ce);if(d&&q==="declutter"&&d.collides(Er.declutterBox))break e;fr.push([e,t,Fn,Er,1,null,null])}if(de)for(Sr=0,on=Bn.length;Sr<on;++Sr){Or=Bn[Sr],Nn=Or[4],Fn=this.createLabel(Nn,ie,de,""),U=Or[2],z=rn*Fn.height-ve;const Er=this.calculateImageOrLabelDimensions_(Fn.width,Fn.height,Or[0],Or[1],Fn.width,Fn.height,U,z,0,0,Or[3],je,!1,pg,!1,Ce);if(d&&q==="declutter"&&d.collides(Er.declutterBox))break e;fr.push([e,t,Fn,Er,1,null,null])}d&&q!=="none"&&d.load(fr.map(Kk));for(let Er=0,Dr=fr.length;Er<Dr;++Er)this.replayImageOrLabel_.apply(this,fr[Er])}}++E;break;case Qi.END_GEOMETRY:if(a!==void 0){Ce=bt[1];const xt=a(Ce,yt,q);if(xt)return xt}++E;break;case Qi.FILL:We?Me++:this.fill_(e),++E;break;case Qi.MOVE_TO_LINE_TO:for(O=bt[1],k=bt[2],Te=b[O],rt=b[O+1],e.moveTo(Te,rt),Q=Te+.5|0,re=rt+.5|0,O+=2;O<k;O+=2)Te=b[O],rt=b[O+1],X=Te+.5|0,Y=rt+.5|0,(O==k-2||X!==Q||Y!==re)&&(e.lineTo(Te,rt),Q=X,re=Y);++E;break;case Qi.SET_FILL_STYLE:xe=bt,this.alignAndScaleFill_=bt[2],Me&&(this.fill_(e),Me=0,fe&&(e.stroke(),fe=0)),e.fillStyle=bt[1],++E;break;case Qi.SET_STROKE_STYLE:De=bt,fe&&(e.stroke(),fe=0),this.setStrokeStyle_(e,bt),++E;break;case Qi.STROKE:We?fe++:e.stroke(),++E;break;default:++E;break}}Me&&this.fill_(e),fe&&e.stroke()}execute(e,t,r,i,s,a){this.viewRotation_=i,this.execute_(e,t,r,this.instructions,s,void 0,void 0,a)}executeHitDetection(e,t,r,i,s){return this.viewRotation_=r,this.execute_(e,[e.canvas.width,e.canvas.height],t,this.hitDetectionInstructions,!0,i,s)}}const Q1=["Polygon","Circle","LineString","Image","Text","Default"],f2=["Image","Text"],pee=Q1.filter(n=>!f2.includes(n));class bz{constructor(e,t,r,i,s,a,o){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=t,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ch(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,o)}clip(e,t){const r=this.getClipCoords(t);e.beginPath(),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3]),e.lineTo(r[4],r[5]),e.lineTo(r[6],r[7]),e.clip()}createExecutors_(e,t){for(const r in e){let i=this.executorsByZIndex_[r];i===void 0&&(i={},this.executorsByZIndex_[r]=i);const s=e[r];for(const a in s){const o=s[a];i[a]=new fee(this.resolution_,this.pixelRatio_,this.overlaps_,o,t)}}}hasExecutors(e){for(const t in this.executorsByZIndex_){const r=this.executorsByZIndex_[t];for(let i=0,s=e.length;i<s;++i)if(e[i]in r)return!0}return!1}forEachFeatureAtCoordinate(e,t,r,i,s,a){i=Math.round(i);const o=i*2+1,d=em(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-r,-e[0],-e[1]),g=!this.hitDetectionContext_;g&&(this.hitDetectionContext_=Jl(o,o,void 0,{willReadFrequently:!0}));const b=this.hitDetectionContext_;b.canvas.width!==o||b.canvas.height!==o?(b.canvas.width=o,b.canvas.height=o):g||b.clearRect(0,0,o,o);let E;this.renderBuffer_!==void 0&&(E=Hh(),Wv(E,e),B0(E,t*(this.renderBuffer_+i),E));const S=mee(i);let O;function k(Y,ee,N){const ie=b.getImageData(0,0,o,o).data;for(let he=0,de=S.length;he<de;he++)if(ie[S[he]]>0){if(!a||N==="none"||O!=="Image"&&O!=="Text"||a.includes(Y)){const Me=(S[he]-3)/4,fe=i-Me%o,xe=i-(Me/o|0),De=s(Y,ee,fe*fe+xe*xe);if(De)return De}b.clearRect(0,0,o,o);break}}const U=Object.keys(this.executorsByZIndex_).map(Number);U.sort(Lm);let z,q,Q,re,X;for(z=U.length-1;z>=0;--z){const Y=U[z].toString();for(Q=this.executorsByZIndex_[Y],q=Q1.length-1;q>=0;--q)if(O=Q1[q],re=Q[O],re!==void 0&&(X=re.executeHitDetection(b,d,r,k,E),X))return X}}getClipCoords(e){const t=this.maxExtent_;if(!t)return null;const r=t[0],i=t[1],s=t[2],a=t[3],o=[r,i,r,a,s,a,s,i];return O0(o,0,8,2,e,o),o}isEmpty(){return T0(this.executorsByZIndex_)}execute(e,t,r,i,s,a,o){const d=Object.keys(this.executorsByZIndex_).map(Number);d.sort(o?pZ:Lm),a=a||Q1;const g=Q1.length;for(let b=0,E=d.length;b<E;++b){const S=d[b].toString(),O=this.executorsByZIndex_[S];for(let k=0,U=a.length;k<U;++k){const z=a[k],q=O[z];if(q!==void 0){const Q=o===null?void 0:q.getZIndexContext(),re=Q?Q.getContext():e,X=this.maxExtent_&&z!=="Image"&&z!=="Text";if(X&&(re.save(),this.clip(re,r)),!Q||z==="Text"||z==="Image"?q.execute(re,t,r,i,s,o):Q.pushFunction(Y=>q.execute(Y,t,r,i,s,o)),X&&re.restore(),Q){Q.offset();const Y=d[b]*g+k;this.deferredZIndexContexts_[Y]||(this.deferredZIndexContexts_[Y]=[]),this.deferredZIndexContexts_[Y].push(Q)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,t=Object.keys(e).map(Number).sort(Lm);for(let r=0,i=t.length;r<i;++r)e[t[r]].forEach(s=>{s.draw(this.renderedContext_),s.clear()}),e[t[r]].length=0}}const F4={};function mee(n){if(F4[n]!==void 0)return F4[n];const e=n*2+1,t=n*n,r=new Array(t+1);for(let s=0;s<=n;++s)for(let a=0;a<=n;++a){const o=s*s+a*a;if(o>t)break;let d=r[o];d||(d=[],r[o]=d),d.push(((n+s)*e+(n+a))*4+3),s>0&&d.push(((n-s)*e+(n+a))*4+3),a>0&&(d.push(((n+s)*e+(n-a))*4+3),s>0&&d.push(((n-s)*e+(n-a))*4+3))}const i=[];for(let s=0,a=r.length;s<a;++s)r[s]&&i.push(...r[s]);return F4[n]=i,i}class gee extends vz{constructor(e,t,r,i,s,a,o){super(),this.context_=e,this.pixelRatio_=t,this.extent_=r,this.transform_=i,this.transformRotation_=i?GB(Math.atan2(i[1],i[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=a,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Ch()}drawImages_(e,t,r,i){if(!this.image_)return;const s=O0(e,t,r,i,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.tmpLocalTransform_,d=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=d*this.imageOpacity_);let g=this.imageRotation_;this.transformRotation_===0&&(g-=this.viewRotation_),this.imageRotateWithView_&&(g+=this.viewRotation_);for(let b=0,E=s.length;b<E;b+=2){const S=s[b]-this.imageAnchorX_,O=s[b+1]-this.imageAnchorY_;if(g!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const k=S+this.imageAnchorX_,U=O+this.imageAnchorY_;em(o,k,U,1,1,g,-k,-U),a.save(),a.transform.apply(a,o),a.translate(k,U),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.restore()}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,S,O,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=d)}drawText_(e,t,r,i){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=O0(e,t,r,i,this.transform_,this.pixelCoordinates_),a=this.context_;let o=this.textRotation_;for(this.transformRotation_===0&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);t<r;t+=i){const d=s[t]+this.textOffsetX_,g=s[t+1]+this.textOffsetY_;o!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(a.save(),a.translate(d-this.textOffsetX_,g-this.textOffsetY_),a.rotate(o),a.translate(this.textOffsetX_,this.textOffsetY_),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.restore()):(this.textStrokeState_&&a.strokeText(this.text_,d,g),this.textFillState_&&a.fillText(this.text_,d,g))}}moveToLineTo_(e,t,r,i,s){const a=this.context_,o=O0(e,t,r,i,this.transform_,this.pixelCoordinates_);a.moveTo(o[0],o[1]);let d=o.length;s&&(d-=2);for(let g=2;g<d;g+=2)a.lineTo(o[g],o[g+1]);return s&&a.closePath(),r}drawRings_(e,t,r,i){for(let s=0,a=r.length;s<a;++s)t=this.moveToLineTo_(e,t,r[s],i,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ku(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=zX(e,this.transform_,this.pixelCoordinates_),r=t[2]-t[0],i=t[3]-t[1],s=Math.sqrt(r*r+i*i),a=this.context_;a.beginPath(),a.arc(t[0],t[1],s,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){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}}drawFeature(e,t){const r=t.getGeometryFunction()(e);r&&(this.setStyle(t),this.drawGeometry(r))}drawGeometryCollection(e){const t=e.getGeometriesArray();for(let r=0,i=t.length;r<i;++r)this.drawGeometry(t[r])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),r=e.getStride();this.image_&&this.drawImages_(t,0,t.length,r),this.text_!==""&&this.drawText_(t,0,t.length,r)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getFlatCoordinates(),r=e.getStride();this.image_&&this.drawImages_(t,0,t.length,r),this.text_!==""&&this.drawText_(t,0,t.length,r)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ku(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const t=this.context_,r=e.getFlatCoordinates();t.beginPath(),this.moveToLineTo_(r,0,r.length,e.getStride(),!1),t.stroke()}if(this.text_!==""){const t=e.getFlatMidpoint();this.drawText_(t,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const t=e.getExtent();if(ku(this.extent_,t)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const r=this.context_,i=e.getFlatCoordinates();let s=0;const a=e.getEnds(),o=e.getStride();r.beginPath();for(let d=0,g=a.length;d<g;++d)s=this.moveToLineTo_(i,s,a[d],o,!1);r.stroke()}if(this.text_!==""){const r=e.getFlatMidpoints();this.drawText_(r,0,r.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ku(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_;t.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoint();this.drawText_(t,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ku(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const t=this.context_,r=e.getOrientedFlatCoordinates();let i=0;const s=e.getEndss(),a=e.getStride();t.beginPath();for(let o=0,d=s.length;o<d;++o){const g=s[o];i=this.drawRings_(r,i,g,a)}this.fillState_&&t.fill(),this.strokeState_&&t.stroke()}if(this.text_!==""){const t=e.getFlatInteriorPoints();this.drawText_(t,0,t.length,2)}}}setContextFillState_(e){const t=this.context_,r=this.contextFillState_;r?r.fillStyle!=e.fillStyle&&(r.fillStyle=e.fillStyle,t.fillStyle=e.fillStyle):(t.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const t=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=e.lineCap&&(r.lineCap=e.lineCap,t.lineCap=e.lineCap),D0(r.lineDash,e.lineDash)||t.setLineDash(r.lineDash=e.lineDash),r.lineDashOffset!=e.lineDashOffset&&(r.lineDashOffset=e.lineDashOffset,t.lineDashOffset=e.lineDashOffset),r.lineJoin!=e.lineJoin&&(r.lineJoin=e.lineJoin,t.lineJoin=e.lineJoin),r.lineWidth!=e.lineWidth&&(r.lineWidth=e.lineWidth,t.lineWidth=e.lineWidth),r.miterLimit!=e.miterLimit&&(r.miterLimit=e.miterLimit,t.miterLimit=e.miterLimit),r.strokeStyle!=e.strokeStyle&&(r.strokeStyle=e.strokeStyle,t.strokeStyle=e.strokeStyle)):(t.lineCap=e.lineCap,t.setLineDash(e.lineDash),t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.miterLimit=e.miterLimit,t.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})}setContextTextState_(e){const t=this.context_,r=this.contextTextState_,i=e.textAlign?e.textAlign:uC;r?(r.font!=e.font&&(r.font=e.font,t.font=e.font),r.textAlign!=i&&(r.textAlign=i,t.textAlign=i),r.textBaseline!=e.textBaseline&&(r.textBaseline=e.textBaseline,t.textBaseline=e.textBaseline)):(t.font=e.font,t.textAlign=i,t.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:i,textBaseline:e.textBaseline})}setFillStrokeStyle(e,t){if(!e)this.fillState_=null;else{const r=e.getColor();this.fillState_={fillStyle:qp(r||mh)}}if(!t)this.strokeState_=null;else{const r=t.getColor(),i=t.getLineCap(),s=t.getLineDash(),a=t.getLineDashOffset(),o=t.getLineJoin(),d=t.getWidth(),g=t.getMiterLimit(),b=s||Um;this.strokeState_={lineCap:i!==void 0?i:_y,lineDash:this.pixelRatio_===1?b:b.map(E=>E*this.pixelRatio_),lineDashOffset:(a||zm)*this.pixelRatio_,lineJoin:o!==void 0?o:by,lineWidth:(d!==void 0?d:AC)*this.pixelRatio_,miterLimit:g!==void 0?g:aC,strokeStyle:qp(r||lC)}}}setImageStyle(e){let t;if(!e||!(t=e.getSize())){this.image_=null;return}const r=e.getPixelRatio(this.pixelRatio_),i=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*r,this.imageAnchorY_=i[1]*r,this.imageHeight_=t[1]*r,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const a=e.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/r,a[1]*this.pixelRatio_/r],this.imageWidth_=t[0]*r}setTextStyle(e){if(!e)this.text_="";else{const t=e.getFill();if(!t)this.textFillState_=null;else{const O=t.getColor();this.textFillState_={fillStyle:qp(O||mh)}}const r=e.getStroke();if(!r)this.textStrokeState_=null;else{const O=r.getColor(),k=r.getLineCap(),U=r.getLineDash(),z=r.getLineDashOffset(),q=r.getLineJoin(),Q=r.getWidth(),re=r.getMiterLimit();this.textStrokeState_={lineCap:k!==void 0?k:_y,lineDash:U||Um,lineDashOffset:z||zm,lineJoin:q!==void 0?q:by,lineWidth:Q!==void 0?Q:AC,miterLimit:re!==void 0?re:aC,strokeStyle:qp(O||lC)}}const i=e.getFont(),s=e.getOffsetX(),a=e.getOffsetY(),o=e.getRotateWithView(),d=e.getRotation(),g=e.getScaleArray(),b=e.getText(),E=e.getTextAlign(),S=e.getTextBaseline();this.textState_={font:i!==void 0?i:BU,textAlign:E!==void 0?E:uC,textBaseline:S!==void 0?S:t2},this.text_=b!==void 0?Array.isArray(b)?b.reduce((O,k,U)=>O+=U%2?" ":k,""):b:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=o!==void 0?o:!1,this.textRotation_=d!==void 0?d:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}}}const Yh=.5;function xz(n,e,t,r,i,s,a,o,d){const g=d?AO(i):i,b=n[0]*Yh,E=n[1]*Yh,S=Jl(b,E);S.imageSmoothingEnabled=!1;const O=S.canvas,k=new gee(S,Yh,i,null,a,o,d?GC(KX(),d):null),U=t.length,z=Math.floor((256*256*256-1)/U),q={};for(let re=1;re<=U;++re){const X=t[re-1],Y=X.getStyleFunction()||r;if(!Y)continue;let ee=Y(X,s);if(!ee)continue;Array.isArray(ee)||(ee=[ee]);const ie=(re*z).toString(16).padStart(7,"#00000");for(let he=0,de=ee.length;he<de;++he){const Me=ee[he],fe=Me.getGeometryFunction()(X);if(!fe||!ku(g,fe.getExtent()))continue;const xe=Me.clone(),De=xe.getFill();De&&De.setColor(ie);const me=xe.getStroke();me&&(me.setColor(ie),me.setLineDash(null)),xe.setText(void 0);const at=Me.getImage();if(at){const Ce=at.getImageSize();if(!Ce)continue;const Te=Jl(Ce[0],Ce[1],void 0,{alpha:!1}),rt=Te.canvas;Te.fillStyle=ie,Te.fillRect(0,0,rt.width,rt.height),xe.setImage(new r2({img:rt,anchor:at.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:at.getOrigin(),opacity:1,size:at.getSize(),scale:at.getScale(),rotation:at.getRotation(),rotateWithView:at.getRotateWithView()}))}const Qe=xe.getZIndex()||0;let He=q[Qe];He||(He={},q[Qe]=He,He.Polygon=[],He.Circle=[],He.LineString=[],He.Point=[]);const We=fe.getType();if(We==="GeometryCollection"){const Ce=fe.getGeometriesArrayRecursive();for(let Te=0,rt=Ce.length;Te<rt;++Te){const yt=Ce[Te];He[yt.getType().replace("Multi","")].push(yt,xe)}}else He[We.replace("Multi","")].push(fe,xe)}}const Q=Object.keys(q).map(Number).sort(Lm);for(let re=0,X=Q.length;re<X;++re){const Y=q[Q[re]];for(const ee in Y){const N=Y[ee];for(let ie=0,he=N.length;ie<he;ie+=2){k.setStyle(N[ie+1]);for(let de=0,Me=e.length;de<Me;++de)k.setTransform(e[de]),k.drawGeometry(N[ie])}}}return S.getImageData(0,0,O.width,O.height)}function wz(n,e,t){const r=[];if(t){const i=Math.floor(Math.round(n[0])*Yh),s=Math.floor(Math.round(n[1])*Yh),a=(Tu(i,0,t.width-1)+Tu(s,0,t.height-1)*t.width)*4,o=t.data[a],d=t.data[a+1],b=t.data[a+2]+256*(d+256*o),E=Math.floor((256*256*256-1)/e.length);b&&b%E===0&&r.push(e[b/E-1])}return r}const yee=.5,Mz={Point:See,LineString:xee,Polygon:Bee,MultiPoint:Eee,MultiLineString:wee,MultiPolygon:Mee,GeometryCollection:bee,Circle:Cee};function vee(n,e){return parseInt(Lo(n),10)-parseInt(Lo(e),10)}function j6(n,e){const t=Sz(n,e);return t*t}function Sz(n,e){return yee*n/e}function Cee(n,e,t,r,i){const s=t.getFill(),a=t.getStroke();if(s||a){const d=n.getBuilder(t.getZIndex(),"Circle");d.setFillStrokeStyle(s,a),d.drawCircle(e,r,i)}const o=t.getText();if(o&&o.getText()){const d=n.getBuilder(t.getZIndex(),"Text");d.setTextStyle(o),d.drawText(e,r)}}function p2(n,e,t,r,i,s,a,o){const d=[],g=t.getImage();if(g){let S=!0;const O=g.getImageState();O==hi.LOADED||O==hi.ERROR?S=!1:O==hi.IDLE&&g.load(),S&&d.push(g.ready())}const b=t.getFill();b&&b.loading()&&d.push(b.ready());const E=d.length>0;return E&&Promise.all(d).then(()=>i(null)),_ee(n,e,t,r,s,a,o),E}function _ee(n,e,t,r,i,s,a){const o=t.getGeometryFunction()(e);if(!o)return;const d=o.simplifyTransformed(r,i);if(t.getRenderer())Ez(n,d,t,e,a);else{const b=Mz[d.getType()];b(n,d,t,e,a,s)}}function Ez(n,e,t,r,i){if(e.getType()=="GeometryCollection"){const a=e.getGeometries();for(let o=0,d=a.length;o<d;++o)Ez(n,a[o],t,r,i);return}n.getBuilder(t.getZIndex(),"Default").drawCustom(e,r,t.getRenderer(),t.getHitDetectionRenderer(),i)}function bee(n,e,t,r,i,s){const a=e.getGeometriesArray();let o,d;for(o=0,d=a.length;o<d;++o){const g=Mz[a[o].getType()];g(n,a[o],t,r,i,s)}}function xee(n,e,t,r,i){const s=t.getStroke();if(s){const o=n.getBuilder(t.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawLineString(e,r,i)}const a=t.getText();if(a&&a.getText()){const o=n.getBuilder(t.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,r,i)}}function wee(n,e,t,r,i){const s=t.getStroke();if(s){const o=n.getBuilder(t.getZIndex(),"LineString");o.setFillStrokeStyle(null,s),o.drawMultiLineString(e,r,i)}const a=t.getText();if(a&&a.getText()){const o=n.getBuilder(t.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,r,i)}}function Mee(n,e,t,r,i){const s=t.getFill(),a=t.getStroke();if(a||s){const d=n.getBuilder(t.getZIndex(),"Polygon");d.setFillStrokeStyle(s,a),d.drawMultiPolygon(e,r,i)}const o=t.getText();if(o&&o.getText()){const d=n.getBuilder(t.getZIndex(),"Text");d.setTextStyle(o),d.drawText(e,r,i)}}function See(n,e,t,r,i,s){const a=t.getImage(),o=t.getText(),d=o&&o.getText(),g=s&&a&&d?{}:void 0;if(a){if(a.getImageState()!=hi.LOADED)return;const b=n.getBuilder(t.getZIndex(),"Image");b.setImageStyle(a,g),b.drawPoint(e,r,i)}if(d){const b=n.getBuilder(t.getZIndex(),"Text");b.setTextStyle(o,g),b.drawText(e,r,i)}}function Eee(n,e,t,r,i,s){const a=t.getImage(),o=a&&a.getOpacity()!==0,d=t.getText(),g=d&&d.getText(),b=s&&o&&g?{}:void 0;if(o){if(a.getImageState()!=hi.LOADED)return;const E=n.getBuilder(t.getZIndex(),"Image");E.setImageStyle(a,b),E.drawMultiPoint(e,r,i)}if(g){const E=n.getBuilder(t.getZIndex(),"Text");E.setTextStyle(d,b),E.drawText(e,r,i)}}function Bee(n,e,t,r,i){const s=t.getFill(),a=t.getStroke();if(s||a){const d=n.getBuilder(t.getZIndex(),"Polygon");d.setFillStrokeStyle(s,a),d.drawPolygon(e,r,i)}const o=t.getText();if(o&&o.getText()){const d=n.getBuilder(t.getZIndex(),"Text");d.setTextStyle(o),d.drawText(e,r,i)}}class Oee extends OO{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=Hh(),this.wrappedRenderedExtent_=Hh(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(e,t,r){const i=t.extent,s=t.viewState,a=s.center,o=s.resolution,d=s.projection,g=s.rotation,b=d.getExtent(),E=this.getLayer().getSource(),S=this.getLayer().getDeclutter(),O=t.pixelRatio,k=t.viewHints,U=!(k[Vl.ANIMATING]||k[Vl.INTERACTING]),z=this.context,q=Math.round(ps(i)/o*O),Q=Math.round(Hl(i)/o*O),re=E.getWrapX()&&d.canWrapX(),X=re?ps(b):null,Y=re?Math.ceil((i[2]-b[2])/X)+1:1;let ee=re?Math.floor((i[0]-b[0])/X):0;do{let N=this.getRenderTransform(a,o,0,O,q,Q,ee*X);t.declutter&&(N=N.slice(0)),e.execute(z,[z.canvas.width,z.canvas.height],N,g,U,r===void 0?Q1:r?f2:pee,r?S&&t.declutter[S]:void 0)}while(++ee<Y)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=Jl(this.context.canvas.width,this.context.canvas.height,Dk))}resetDrawContext_(){if(this.opacity_!==1){const e=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=e,zC(this.context),Dk.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(e){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,e,!0)}renderDeferredInternal(e){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(e,t){const r=e.layerStatesArray[e.layerIndex];this.opacity_=r.opacity;const i=e.viewState;this.prepareContainer(e,t);const s=this.context,a=this.replayGroup_;let o=a&&!a.isEmpty();if(!o&&!(this.getLayer().hasListener(Sf.PRERENDER)||this.getLayer().hasListener(Sf.POSTRENDER)))return null;if(this.setDrawContext_(),this.preRender(s,e),i.projection,this.clipped_=!1,o&&r.extent&&this.clipping){const d=Yp(r.extent);o=ku(d,e.extent),this.clipped_=o&&!lp(d,e.extent),this.clipped_&&this.clipUnrotated(s,e,d)}return o&&this.renderWorlds(a,e,this.getLayer().getDeclutter()?!1:void 0),!e.declutter&&this.clipped_&&s.restore(),this.postRender(s,e),this.renderedRotation_!==i.rotation&&(this.renderedRotation_=i.rotation,this.hitDetectionImageData_=null),e.declutter||this.resetDrawContext_(),this.container}getFeatures(e){return new Promise(t=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const r=this.frameState.size.slice(),i=this.renderedCenter_,s=this.renderedResolution_,a=this.renderedRotation_,o=this.renderedProjection_,d=this.wrappedRenderedExtent_,g=this.getLayer(),b=[],E=r[0]*Yh,S=r[1]*Yh;b.push(this.getRenderTransform(i,s,a,Yh,E,S,0).slice());const O=g.getSource(),k=o.getExtent();if(O.getWrapX()&&o.canWrapX()&&!lp(k,d)){let U=d[0];const z=ps(k);let q=0,Q;for(;U<k[0];)--q,Q=z*q,b.push(this.getRenderTransform(i,s,a,Yh,E,S,Q).slice()),U+=z;for(q=0,U=d[2];U>k[2];)++q,Q=z*q,b.push(this.getRenderTransform(i,s,a,Yh,E,S,Q).slice()),U-=z}this.hitDetectionImageData_=xz(r,b,this.renderedFeatures_,g.getStyleFunction(),d,s,a,j6(s,this.renderedPixelRatio_),null)}t(wz(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,t,r,i,s){if(!this.replayGroup_)return;const a=t.viewState.resolution,o=t.viewState.rotation,d=this.getLayer(),g={},b=function(S,O,k){const U=Lo(S),z=g[U];if(z){if(z!==!0&&k<z.distanceSq){if(k===0)return g[U]=!0,s.splice(s.lastIndexOf(z),1),i(S,d,O);z.geometry=O,z.distanceSq=k}}else{if(k===0)return g[U]=!0,i(S,d,O);s.push(g[U]={feature:S,layer:d,geometry:O,distanceSq:k,callback:i})}},E=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(e,a,o,r,b,E?t.declutter[E].all().map(S=>S.value):null)}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const t=this.getLayer(),r=t.getSource();if(!r)return!1;const i=e.viewHints[Vl.ANIMATING],s=e.viewHints[Vl.INTERACTING],a=t.getUpdateWhileAnimating(),o=t.getUpdateWhileInteracting();if(this.ready&&!a&&i||!o&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const d=e.extent,g=e.viewState,b=g.projection,E=g.resolution,S=e.pixelRatio,O=t.getRevision(),k=t.getRenderBuffer();let U=t.getRenderOrder();U===void 0&&(U=vee);const z=g.center.slice(),q=B0(d,k*E),Q=q.slice(),re=[q.slice()],X=b.getExtent();if(r.getWrapX()&&b.canWrapX()&&!lp(X,e.extent)){const De=ps(X),me=Math.max(ps(q)/2,De);q[0]=X[0]-me,q[2]=X[2]+me,oO(z,b);const at=LU(re[0],b);at[0]<X[0]&&at[2]<X[2]?re.push([at[0]+De,at[1],at[2]+De,at[3]]):at[0]>X[0]&&at[2]>X[2]&&re.push([at[0]-De,at[1],at[2]-De,at[3]])}if(this.ready&&this.renderedResolution_==E&&this.renderedRevision_==O&&this.renderedRenderOrder_==U&&this.renderedFrameDeclutter_===!!e.declutter&&lp(this.wrappedRenderedExtent_,q))return D0(this.renderedExtent_,Q)||(this.hitDetectionImageData_=null,this.renderedExtent_=Q),this.renderedCenter_=z,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const Y=new Cz(Sz(E,S),q,E,S);let ee;for(let De=0,me=re.length;De<me;++De)r.loadFeatures(re[De],E,b);const N=j6(E,S);let ie=!0;const he=(De,me)=>{let at;const Qe=De.getStyleFunction()||t.getStyleFunction();if(Qe&&(at=Qe(De,E)),at){const He=this.renderFeature(De,N,at,Y,ee,this.getLayer().getDeclutter(),me);ie=ie&&!He}},de=AO(q),Me=r.getFeaturesInExtent(de);U&&Me.sort(U);for(let De=0,me=Me.length;De<me;++De)he(Me[De],De);this.renderedFeatures_=Me,this.ready=ie;const fe=Y.finish(),xe=new bz(q,E,S,r.getOverlaps(),fe,t.getRenderBuffer(),!!e.declutter);return this.renderedResolution_=E,this.renderedRevision_=O,this.renderedRenderOrder_=U,this.renderedFrameDeclutter_=!!e.declutter,this.renderedExtent_=Q,this.wrappedRenderedExtent_=q,this.renderedCenter_=z,this.renderedProjection_=b,this.renderedPixelRatio_=S,this.replayGroup_=xe,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,t,r,i,s,a,o){if(!r)return!1;let d=!1;if(Array.isArray(r))for(let g=0,b=r.length;g<b;++g)d=p2(i,e,r[g],t,this.boundHandleStyleImageChange_,s,a,o)||d;else d=p2(i,e,r,t,this.boundHandleStyleImageChange_,s,a,o);return d}}class IO extends EO{constructor(e){super(e)}createRenderer(){return new Oee(this)}}class Lk{constructor(e){this.rbush_=new cz(e),this.items_={}}insert(e,t){const r={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(r),this.items_[Lo(t)]=r}load(e,t){const r=new Array(t.length);for(let i=0,s=t.length;i<s;i++){const a=e[i],o=t[i],d={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:o};r[i]=d,this.items_[Lo(o)]=d}this.rbush_.load(r)}remove(e){const t=Lo(e),r=this.items_[t];return delete this.items_[t],this.rbush_.remove(r)!==null}update(e,t){const r=this.items_[Lo(t)],i=[r.minX,r.minY,r.maxX,r.maxY];Gm(i,e)||(this.remove(t),this.insert(e,t))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(e){const t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(t).map(function(i){return i.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,t){return this.forEach_(this.getInExtent(e),t)}forEach_(e,t){let r;for(let i=0,s=e.length;i<s;i++)if(r=t(e[i]),r)return r;return r}isEmpty(){return T0(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const t=this.rbush_.toJSON();return Wm(t.minX,t.minY,t.maxX,t.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const t in e.items_)this.items_[t]=e.items_[t]}}class Dy extends fp{constructor(e){super(),this.projection=Ma(e.projection),this.attributions_=Uk(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const t=this;this.viewPromise_=new Promise(function(r,i){t.viewResolver=r,t.viewRejector=i})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=Uk(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Uk(n){return n?typeof n=="function"?n:(Array.isArray(n)||(n=[n]),e=>n):null}const yf={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Iee(n,e){return[[-1/0,-1/0,1/0,1/0]]}function kee(n,e){return[n]}let Tee=!1;function Bz(n,e,t,r,i,s,a){const o=new XMLHttpRequest;o.open("GET",typeof n=="function"?n(t,r,i):n,!0),e.getType()=="arraybuffer"&&(o.responseType="arraybuffer"),o.withCredentials=Tee,o.onload=function(d){if(!o.status||o.status>=200&&o.status<300){const g=e.getType();try{let b;g=="text"||g=="json"?b=o.responseText:g=="xml"?b=o.responseXML||o.responseText:g=="arraybuffer"&&(b=o.response),b?s(e.readFeatures(b,{extent:t,featureProjection:i}),e.readProjection(b)):a()}catch{a()}}else a()},o.onerror=a,o.send()}function zk(n,e){return function(t,r,i,s,a){const o=this;Bz(n,e,t,r,i,function(d,g){o.addFeatures(d),s!==void 0&&s(d)},a||gy)}}class d0 extends hp{constructor(e,t,r){super(e),this.feature=t,this.features=r}}class Mb extends Dy{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=gy,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(ra(this.format_,"`format` must be set when `url` is set"),this.loader_=zk(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Iee;const t=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=t?new Lk:null,this.loadedExtentsRtree_=new Lk,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let r,i;Array.isArray(e.features)?i=e.features:e.features&&(r=e.features,i=r.getArray()),!t&&r===void 0&&(r=new $p(i)),i!==void 0&&this.addFeaturesInternal(i),r!==void 0&&this.bindFeaturesCollection_(r)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const t=Lo(e);if(!this.addToIndex_(t,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(t,e);const r=e.getGeometry();if(r){const i=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,e)}else this.nullGeometryFeatures_[t]=e;this.dispatchEvent(new d0(yf.ADDFEATURE,e))}setupChangeEvents_(e,t){t instanceof sd||(this.featureChangeKeys_[e]=[Ts(t,io.CHANGE,this.handleFeatureChange_,this),Ts(t,Cy.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,t){let r=!0;if(t.getId()!==void 0){const i=String(t.getId());if(!(i in this.idIndex_))this.idIndex_[i]=t;else if(t instanceof sd){const s=this.idIndex_[i];s instanceof sd?Array.isArray(s)?s.push(t):this.idIndex_[i]=[s,t]:r=!1}else r=!1}return r&&(ra(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=t),r}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const t=[],r=[],i=[];for(let s=0,a=e.length;s<a;s++){const o=e[s],d=Lo(o);this.addToIndex_(d,o)&&r.push(o)}for(let s=0,a=r.length;s<a;s++){const o=r[s],d=Lo(o);this.setupChangeEvents_(d,o);const g=o.getGeometry();if(g){const b=g.getExtent();t.push(b),i.push(o)}else this.nullGeometryFeatures_[d]=o}if(this.featuresRtree_&&this.featuresRtree_.load(t,i),this.hasListener(yf.ADDFEATURE))for(let s=0,a=r.length;s<a;s++)this.dispatchEvent(new d0(yf.ADDFEATURE,r[s]))}bindFeaturesCollection_(e){let t=!1;this.addEventListener(yf.ADDFEATURE,function(r){t||(t=!0,e.push(r.feature),t=!1)}),this.addEventListener(yf.REMOVEFEATURE,function(r){t||(t=!0,e.remove(r.feature),t=!1)}),e.addEventListener(gh.ADD,r=>{t||(t=!0,this.addFeature(r.element),t=!1)}),e.addEventListener(gh.REMOVE,r=>{t||(t=!0,this.removeFeature(r.element),t=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const r in this.featureChangeKeys_)this.featureChangeKeys_[r].forEach(Ka);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(r=>{this.removeFeatureInternal(r)});for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const t=new d0(yf.CLEAR);this.dispatchEvent(t),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,t){const r=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(r,function(i){const s=i.getGeometry();if(s instanceof sd||s.intersectsCoordinate(e))return t(i)})}forEachFeatureInExtent(e,t){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureIntersectingExtent(e,t){return this.forEachFeatureInExtent(e,function(r){const i=r.getGeometry();if(i instanceof sd||i.intersectsExtent(e)){const s=t(r);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),T0(this.nullGeometryFeatures_)||Zp(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const t=[];return this.forEachFeatureAtCoordinateDirect(e,function(r){t.push(r)}),t}getFeaturesInExtent(e,t){if(this.featuresRtree_){if(!(t&&t.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const i=rO(e,t);return[].concat(...i.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,t){const r=e[0],i=e[1];let s=null;const a=[NaN,NaN];let o=1/0;const d=[-1/0,-1/0,1/0,1/0];return t=t||oC,this.featuresRtree_.forEachInExtent(d,function(g){if(t(g)){const b=g.getGeometry(),E=o;if(o=b instanceof sd?0:b.closestPointXY(r,i,a,o),o<E){s=g;const S=Math.sqrt(o);d[0]=r-S,d[1]=i-S,d[2]=r+S,d[3]=i+S}}}),s}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const t=this.idIndex_[e.toString()];return t!==void 0?t:null}getFeatureByUid(e){const t=this.uidIndex_[e];return t!==void 0?t:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const t=e.target,r=Lo(t),i=t.getGeometry();if(!i)r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(t),this.nullGeometryFeatures_[r]=t);else{const a=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(a,t)):this.featuresRtree_&&this.featuresRtree_.update(a,t)}const s=t.getId();if(s!==void 0){const a=s.toString();this.idIndex_[a]!==t&&(this.removeFromIdIndex_(t),this.idIndex_[a]=t)}else this.removeFromIdIndex_(t),this.uidIndex_[r]=t;this.changed(),this.dispatchEvent(new d0(yf.CHANGEFEATURE,t))}hasFeature(e){const t=e.getId();return t!==void 0?t in this.idIndex_:Lo(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&T0(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,t,r){const i=this.loadedExtentsRtree_,s=this.strategy_(e,t,r);for(let a=0,o=s.length;a<o;++a){const d=s[a];i.forEachInExtent(d,function(b){return lp(b.extent,d)})||(++this.loadingExtentsCount_,this.dispatchEvent(new d0(yf.FEATURESLOADSTART)),this.loader_.call(this,d,t,r,b=>{--this.loadingExtentsCount_,this.dispatchEvent(new d0(yf.FEATURESLOADEND,void 0,b))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new d0(yf.FEATURESLOADERROR))}),i.insert(d,{extent:d.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const t=this.loadedExtentsRtree_,r=t.forEachInExtent(e,function(i){if(Gm(i.extent,e))return i});r&&t.remove(r)}removeFeatures(e){let t=!1;for(let r=0,i=e.length;r<i;++r)t=this.removeFeatureInternal(e[r])||t;t&&this.changed()}removeFeature(e){if(!e)return;this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const t=Lo(e);if(!(t in this.uidIndex_))return!1;t in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[t]:this.featuresRtree_&&this.featuresRtree_.remove(e);const r=this.featureChangeKeys_[t];r==null||r.forEach(Ka),delete this.featureChangeKeys_[t];const i=e.getId();if(i!==void 0){const s=i.toString(),a=this.idIndex_[s];a===e?delete this.idIndex_[s]:Array.isArray(a)&&(a.splice(a.indexOf(e),1),a.length===1&&(this.idIndex_[s]=a[0]))}return delete this.uidIndex_[t],this.hasListener(yf.REMOVEFEATURE)&&this.dispatchEvent(new d0(yf.REMOVEFEATURE,e)),!0}removeFromIdIndex_(e){for(const t in this.idIndex_)if(this.idIndex_[t]===e){delete this.idIndex_[t];break}}setLoader(e){this.loader_=e}setUrl(e){ra(this.format_,"`format` must be set when `url` is set"),this.url_=e,this.setLoader(zk(e,this.format_))}setOverlaps(e){this.overlaps_=e,this.changed()}}class Pee extends VB{constructor(e,t,r,i,s){const a=s!==void 0?hi.IDLE:hi.LOADED;super(e,t,r,a),this.loader_=s!==void 0?s:null,this.canvas_=i,this.error_=null}getError(){return this.error_}handleLoad_(e){e?(this.error_=e,this.state=hi.ERROR):this.state=hi.LOADED,this.changed()}load(){this.state==hi.IDLE&&(this.state=hi.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}}class VC extends UC{constructor(e,t,r){super(),r=r||{},this.tileCoord=e,this.state=t,this.key="",this.transition_=r.transition===void 0?250:r.transition,this.transitionStarts_={},this.interpolate=!!r.interpolate}changed(){this.dispatchEvent(io.CHANGE)}release(){this.state===xr.ERROR&&this.setState(xr.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==xr.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){go()}getAlpha(e,t){if(!this.transition_)return 1;let r=this.transitionStarts_[e];if(!r)r=t,this.transitionStarts_[e]=r;else if(r===-1)return 1;const i=t-r+1e3/60;return i>=this.transition_?1:uz(i/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class Oz extends VC{constructor(e,t,r,i,s,a){super(e,t,a),this.crossOrigin_=i,this.src_=r,this.key=r,this.image_=new Image,i!==null&&(this.image_.crossOrigin=i),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=xr.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=xr.ERROR,this.unlistenImage_(),this.image_=Ree(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=xr.LOADED:this.state=xr.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==xr.ERROR&&(this.state=xr.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==xr.IDLE&&(this.state=xr.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=TZ(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function Ree(){const n=Jl(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}class Dee{constructor(e,t,r){this.decay_=e,this.minVelocity_=t,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,t){this.points_.push(e,t,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<e)return!1;let r=t-3;for(;r>0&&this.points_[r+2]>e;)r-=3;const i=this.points_[t+2]-this.points_[r+2];if(i<1e3/60)return!1;const s=this.points_[t]-this.points_[r],a=this.points_[t+1]-this.points_[r+1];return this.angle_=Math.atan2(a,s),this.initialVelocity_=Math.sqrt(s*s+a*a)/i,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class Kee extends FC{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,t){go()}calculateMatrices2D(e){const t=e.viewState,r=e.coordinateToPixelTransform,i=e.pixelToCoordinateTransform;em(r,e.size[0]/2,e.size[1]/2,1/t.resolution,-1/t.resolution,-t.rotation,-t.center[0],-t.center[1]),PU(i,r)}forEachFeatureAtCoordinate(e,t,r,i,s,a,o,d){let g;const b=t.viewState;function E(X,Y,ee,N){return s.call(a,Y,X?ee:null,N)}const S=b.projection,O=oO(e.slice(),S),k=[[0,0]];if(S.canWrapX()&&i){const X=S.getExtent(),Y=ps(X);k.push([-Y,0],[Y,0])}const U=t.layerStatesArray,z=U.length,q=[],Q=[];for(let X=0;X<k.length;X++)for(let Y=z-1;Y>=0;--Y){const ee=U[Y],N=ee.layer;if(N.hasRenderer()&&wO(ee,b)&&o.call(d,N)){const ie=N.getRenderer(),he=N.getSource();if(ie&&he){const de=he.getWrapX()?O:e,Me=E.bind(null,ee.managed);Q[0]=de[0]+k[X][0],Q[1]=de[1]+k[X][1],g=ie.forEachFeatureAtCoordinate(Q,t,r,Me,q)}if(g)return g}}if(q.length===0)return;const re=1/q.length;return q.forEach((X,Y)=>X.distanceSq+=Y*re),q.sort((X,Y)=>X.distanceSq-Y.distanceSq),q.some(X=>g=X.callback(X.feature,X.layer,X.geometry)),g}hasFeatureAtCoordinate(e,t,r,i,s,a){return this.forEachFeatureAtCoordinate(e,t,r,i,oC,this,s,a)!==void 0}getMap(){return this.map_}renderFrame(e){go()}scheduleExpireIconCache(e){Mf.canExpireCache()&&e.postRenderFunctions.push(Fee)}}function Fee(n,e){Mf.expire()}class Lee extends Kee{constructor(e){super(e),this.fontChangeListenerKey_=Ts(Kp,Cy.PROPERTYCHANGE,e.redrawText,e),this.element_=document.createElement("div");const t=this.element_.style;t.position="absolute",t.width="100%",t.height="100%",t.zIndex="0",this.element_.className=hx+" ol-layers";const r=e.getViewport();r.insertBefore(this.element_,r.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,t){const r=this.getMap();if(r.hasListener(e)){const i=new _z(e,void 0,t);r.dispatchEvent(i)}}disposeInternal(){Ka(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(Sf.PRECOMPOSE,e);const t=e.layerStatesArray.sort((o,d)=>o.zIndex-d.zIndex);t.some(o=>o.layer instanceof EO&&o.layer.getDeclutter())&&(e.declutter={});const i=e.viewState;this.children_.length=0;const s=[];let a=null;for(let o=0,d=t.length;o<d;++o){const g=t[o];e.layerIndex=o;const b=g.layer,E=b.getSourceState();if(!wO(g,i)||E!="ready"&&E!="undefined"){b.unrender();continue}const S=b.render(e,a);S&&(S!==a&&(this.children_.push(S),a=S),s.push(g))}this.declutter(e,s),kZ(this.element_,this.children_),this.dispatchRenderEvent(Sf.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}declutter(e,t){if(e.declutter){for(let r=t.length-1;r>=0;--r){const i=t[r],s=i.layer;s.getDeclutter()&&s.renderDeclutter(e,i)}t.forEach(r=>r.layer.renderDeferred(e))}}}class g0 extends hp{constructor(e,t){super(e),this.layer=t}}const L4={LAYERS:"layers"};class Ky extends az{constructor(e){e=e||{};const t=Object.assign({},e);delete t.layers;let r=e.layers;super(t),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(L4.LAYERS,this.handleLayersChanged_),r?Array.isArray(r)?r=new $p(r.slice(),{unique:!0}):ra(typeof r.getArray=="function","Expected `layers` to be an array or a `Collection`"):r=new $p(void 0,{unique:!0}),this.setLayers(r)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Ka),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(Ts(e,gh.ADD,this.handleLayersAdd_,this),Ts(e,gh.REMOVE,this.handleLayersRemove_,this));for(const r in this.listenerKeys_)this.listenerKeys_[r].forEach(Ka);LC(this.listenerKeys_);const t=e.getArray();for(let r=0,i=t.length;r<i;r++){const s=t[r];this.registerLayerListeners_(s),this.dispatchEvent(new g0("addlayer",s))}this.changed()}registerLayerListeners_(e){const t=[Ts(e,Cy.PROPERTYCHANGE,this.handleLayerChange_,this),Ts(e,io.CHANGE,this.handleLayerChange_,this)];e instanceof Ky&&t.push(Ts(e,"addlayer",this.handleLayerGroupAdd_,this),Ts(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Lo(e)]=t}handleLayerGroupAdd_(e){this.dispatchEvent(new g0("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new g0("removelayer",e.layer))}handleLayersAdd_(e){const t=e.element;this.registerLayerListeners_(t),this.dispatchEvent(new g0("addlayer",t)),this.changed()}handleLayersRemove_(e){const t=e.element,r=Lo(t);this.listenerKeys_[r].forEach(Ka),delete this.listenerKeys_[r],this.dispatchEvent(new g0("removelayer",t)),this.changed()}getLayers(){return this.get(L4.LAYERS)}setLayers(e){const t=this.getLayers();if(t){const r=t.getArray();for(let i=0,s=r.length;i<s;++i)this.dispatchEvent(new g0("removelayer",r[i]))}this.set(L4.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(t){t.getLayersArray(e)}),e}getLayerStatesArray(e){const t=e!==void 0?e:[],r=t.length;this.getLayers().forEach(function(a){a.getLayerStatesArray(t)});const i=this.getLayerState();let s=i.zIndex;!e&&i.zIndex===void 0&&(s=0);for(let a=r,o=t.length;a<o;a++){const d=t[a];d.opacity*=i.opacity,d.visible=d.visible&&i.visible,d.maxResolution=Math.min(d.maxResolution,i.maxResolution),d.minResolution=Math.max(d.minResolution,i.minResolution),d.minZoom=Math.max(d.minZoom,i.minZoom),d.maxZoom=Math.min(d.maxZoom,i.maxZoom),i.extent!==void 0&&(d.extent!==void 0?d.extent=Qd(d.extent,i.extent):d.extent=i.extent),d.zIndex===void 0&&(d.zIndex=s)}return t}getSourceState(){return"ready"}}class z1 extends hp{constructor(e,t,r){super(e),this.map=t,this.frameState=r!==void 0?r:null}}class p0 extends z1{constructor(e,t,r,i,s,a){super(e,t,s),this.originalEvent=r,this.pixel_=null,this.coordinate_=null,this.dragging=i!==void 0?i:!1,this.activePointers=a}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const Ou={SINGLECLICK:"singleclick",CLICK:io.CLICK,DBLCLICK:io.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},N6={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class Uee extends UC{constructor(e,t){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=t===void 0?1:t,this.down_=null;const r=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=r,this.pointerdownListenerKey_=Ts(r,N6.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=Ts(r,N6.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(io.TOUCHMOVE,this.boundHandleTouchMove_,wU?{passive:!1}:!1)}emulateClick_(e){let t=new p0(Ou.CLICK,this.map_,e);this.dispatchEvent(t),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,t=new p0(Ou.DBLCLICK,this.map_,e),this.dispatchEvent(t)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const r=new p0(Ou.SINGLECLICK,this.map_,e);this.dispatchEvent(r)},250)}updateActivePointers_(e){const t=e,r=t.pointerId;if(t.type==Ou.POINTERUP||t.type==Ou.POINTERCANCEL){delete this.trackedTouches_[r];for(const i in this.trackedTouches_)if(this.trackedTouches_[i].target!==t.target){delete this.trackedTouches_[i];break}}else(t.type==Ou.POINTERDOWN||t.type==Ou.POINTERMOVE)&&(this.trackedTouches_[r]=t);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const t=new p0(Ou.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(t),this.emulateClicks_&&!t.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Ka),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const t=new p0(Ou.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(t),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Ts(r,Ou.POINTERMOVE,this.handlePointerMove_,this),Ts(r,Ou.POINTERUP,this.handlePointerUp_,this),Ts(this.element_,Ou.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(Ts(this.element_.getRootNode(),Ou.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const t=new p0(Ou.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(t)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const t=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new p0(Ou.POINTERMOVE,this.map_,e,t))}handleTouchMove_(e){const t=this.originalPointerMoveEvent_;(!t||t.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Ka(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(io.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Ka(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Ka),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Tm={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},id={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},m2=1/0;class zee{constructor(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,LC(this.queuedElements_)}dequeue(){const e=this.elements_,t=this.priorities_,r=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));const i=this.keyFunction_(r);return delete this.queuedElements_[i],r}enqueue(e){ra(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const t=this.priorityFunction_(e);return t!=m2?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const t=this.elements_,r=this.priorities_,i=t.length,s=t[e],a=r[e],o=e;for(;e<i>>1;){const d=this.getLeftChildIndex_(e),g=this.getRightChildIndex_(e),b=g<i&&r[g]<r[d]?g:d;t[e]=t[b],r[e]=r[b],e=b}t[e]=s,r[e]=a,this.siftDown_(o,e)}siftDown_(e,t){const r=this.elements_,i=this.priorities_,s=r[t],a=i[t];for(;t>e;){const o=this.getParentIndex_(t);if(i[o]>a)r[t]=r[o],i[t]=i[o],t=o;else break}r[t]=s,i[t]=a}reprioritize(){const e=this.priorityFunction_,t=this.elements_,r=this.priorities_;let i=0;const s=t.length;let a,o,d;for(o=0;o<s;++o)a=t[o],d=e(a),d==m2?delete this.queuedElements_[this.keyFunction_(a)]:(r[i]=d,t[i++]=a);t.length=i,r.length=i,this.heapify_()}}class Iz extends zee{constructor(e,t){super(function(r){return e.apply(null,r)},function(r){return r[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=t,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const t=super.enqueue(e);return t&&e[0].addEventListener(io.CHANGE,this.boundHandleTileChange_),t}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const t=e.target,r=t.getState();if(r===xr.LOADED||r===xr.ERROR||r===xr.EMPTY){r!==xr.ERROR&&t.removeEventListener(io.CHANGE,this.boundHandleTileChange_);const i=t.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,t){let r=0;for(;this.tilesLoading_<e&&r<t&&this.getCount()>0;){const i=this.dequeue()[0],s=i.getKey();i.getState()===xr.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,i.load())}}}function jee(n,e,t,r,i){if(!n||!(t in n.wantedTiles)||!n.wantedTiles[t][e.getKey()])return m2;const s=n.viewState.center,a=r[0]-s[0],o=r[1]-s[1];return 65536*Math.log(i)+Math.sqrt(a*a+o*o)/i}class kO extends fp{constructor(e){super();const t=e.element;t&&!e.target&&!t.style.pointerEvents&&(t.style.pointerEvents="auto"),this.element=t||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){var e;(e=this.element)==null||e.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){var t;this.map_&&((t=this.element)==null||t.remove());for(let r=0,i=this.listenerKeys.length;r<i;++r)Ka(this.listenerKeys[r]);if(this.listenerKeys.length=0,this.map_=e,e){const r=this.target_??e.getOverlayContainerStopEvent();this.element&&r.appendChild(this.element),this.render!==gy&&this.listenerKeys.push(Ts(e,Tm.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}class Nee extends kO{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=e.attributions;const t=e.className!==void 0?e.className:"ol-attribution",r=e.tipLabel!==void 0?e.tipLabel:"Attributions",i=e.expandClassName!==void 0?e.expandClassName:t+"-expand",s=e.collapseLabel!==void 0?e.collapseLabel:"›",a=e.collapseClassName!==void 0?e.collapseClassName:t+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=a):this.collapseLabel_=s;const o=e.label!==void 0?e.label:"i";typeof o=="string"?(this.label_=document.createElement("span"),this.label_.textContent=o,this.label_.className=i):this.label_=o;const d=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=r,this.toggleButton_.appendChild(d),this.toggleButton_.addEventListener(io.CLICK,this.handleClick_.bind(this),!1);const g=t+" "+hx+" "+ZB+(this.collapsed_&&this.collapsible_?" "+J7:"")+(this.collapsible_?"":" ol-uncollapsible"),b=this.element;b.className=g,b.appendChild(this.toggleButton_),b.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const t=this.getMap().getAllLayers(),r=new Set(t.flatMap(i=>i.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(i=>r.add(i)):r.add(this.attributions_)),!this.overrideCollapsible_){const i=!t.some(s=>{var a;return((a=s.getSource())==null?void 0:a.getAttributionsCollapsible())===!1});this.setCollapsible(i)}return Array.from(r)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const t=await Promise.all(this.collectSourceAttributions_(e).map(i=>yy(()=>i))),r=t.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!D0(t,this.renderedAttributions_)){MU(this.ulElement_);for(let i=0,s=t.length;i<s;++i){const a=document.createElement("li");a.innerHTML=t[i],this.ulElement_.appendChild(a)}this.renderedAttributions_=t}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(J7),this.collapsed_?H7(this.collapseLabel_,this.label_):H7(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}}class Wee extends kO{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const t=e.className!==void 0?e.className:"ol-rotate",r=e.label!==void 0?e.label:"⇧",i=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof r=="string"?(this.label_=document.createElement("span"),this.label_.className=i,this.label_.textContent=r):(this.label_=r,this.label_.classList.add(i));const s=e.tipLabel?e.tipLabel:"Reset rotation",a=document.createElement("button");a.className=t+"-reset",a.setAttribute("type","button"),a.title=s,a.appendChild(this.label_),a.addEventListener(io.CLICK,this.handleClick_.bind(this),!1);const o=t+" "+hx+" "+ZB,d=this.element;d.className=o,d.appendChild(a),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(N_)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const r=t.getRotation();r!==void 0&&(this.duration_>0&&r%(2*Math.PI)!==0?t.animate({rotation:0,duration:this.duration_,easing:Py}):t.setRotation(0))}render(e){const t=e.frameState;if(!t)return;const r=t.viewState.rotation;if(r!=this.rotation_){const i="rotate("+r+"rad)";if(this.autoHide_){const s=this.element.classList.contains(N_);!s&&r===0?this.element.classList.add(N_):s&&r!==0&&this.element.classList.remove(N_)}this.label_.style.transform=i}this.rotation_=r}}class Gee extends kO{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const t=e.className!==void 0?e.className:"ol-zoom",r=e.delta!==void 0?e.delta:1,i=e.zoomInClassName!==void 0?e.zoomInClassName:t+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:t+"-out",a=e.zoomInLabel!==void 0?e.zoomInLabel:"+",o=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",d=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",g=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",b=document.createElement("button");b.className=i,b.setAttribute("type","button"),b.title=d,b.appendChild(typeof a=="string"?document.createTextNode(a):a),b.addEventListener(io.CLICK,this.handleClick_.bind(this,r),!1);const E=document.createElement("button");E.className=s,E.setAttribute("type","button"),E.title=g,E.appendChild(typeof o=="string"?document.createTextNode(o):o),E.addEventListener(io.CLICK,this.handleClick_.bind(this,-r),!1);const S=t+" "+hx+" "+ZB,O=this.element;O.className=S,O.appendChild(b),O.appendChild(E),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,t){t.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const r=this.getMap().getView();if(!r)return;const i=r.getZoom();if(i!==void 0){const s=r.getConstrainedZoom(i+e);this.duration_>0?(r.getAnimating()&&r.cancelAnimations(),r.animate({zoom:s,duration:this.duration_,easing:Py})):r.setZoom(s)}}}function Qee(n){n=n||{};const e=new $p;return(n.zoom!==void 0?n.zoom:!0)&&e.push(new Gee(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&e.push(new Wee(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&e.push(new Nee(n.attributionOptions)),e}const jk={ACTIVE:"active"};class HC extends fp{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(jk.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(jk.ACTIVE,e)}setMap(e){this.map_=e}}function qee(n,e,t){const r=n.getCenterInternal();if(r){const i=[r[0]+e[0],r[1]+e[1]];n.animateInternal({duration:t!==void 0?t:250,easing:aJ,center:n.getConstrainedCenter(i)})}}function TO(n,e,t,r){const i=n.getZoom();if(i===void 0)return;const s=n.getConstrainedZoom(i+e),a=n.getResolutionForZoom(s);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:a,anchor:t,duration:r!==void 0?r:250,easing:Py})}class Yee extends HC{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let t=!1;if(e.type==Ou.DBLCLICK){const r=e.originalEvent,i=e.map,s=e.coordinate,a=r.shiftKey?-this.delta_:this.delta_,o=i.getView();TO(o,a,s,this.duration_),r.preventDefault(),t=!0}return!t}}class ZC extends HC{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let t=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==Ou.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Ou.POINTERUP){const r=this.handleUpEvent(e);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(e.type==Ou.POINTERDOWN){const r=this.handleDownEvent(e);this.handlingDownUpSequence=r,t=this.stopDown(r)}else e.type==Ou.POINTERMOVE&&this.handleMoveEvent(e);return!t}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function PO(n){const e=n.length;let t=0,r=0;for(let i=0;i<e;i++)t+=n[i].clientX,r+=n[i].clientY;return{clientX:t/e,clientY:r/e}}function W6(n){const e=arguments;return function(t){let r=!0;for(let i=0,s=e.length;i<s&&(r=r&&e[i](t),!!r);++i);return r}}const $ee=function(n){const e=n.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Vee=function(n){const e=n.map.getTargetElement(),t=e.getRootNode(),r=n.map.getOwnerDocument().activeElement;return t instanceof ShadowRoot?t.host.contains(r):e.contains(r)},kz=function(n){const e=n.map.getTargetElement(),t=e.getRootNode();return(t instanceof ShadowRoot?t.host:e).hasAttribute("tabindex")?Vee(n):!0},Hee=oC,Tz=function(n){const e=n.originalEvent;return e.button==0&&!(BZ&&_U&&e.ctrlKey)},Pz=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Zee=function(n){const e=n.originalEvent;return _U?e.metaKey:e.ctrlKey},Xee=function(n){const e=n.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Rz=function(n){const e=n.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"&&!e.target.isContentEditable},U4=function(n){const e=n.originalEvent;return ra(e!==void 0,"mapBrowserEvent must originate from a pointer event"),e.pointerType=="mouse"},Jee=function(n){const e=n.originalEvent;return ra(e!==void 0,"mapBrowserEvent must originate from a pointer event"),e.isPrimary&&e.button===0};class ete extends ZC{constructor(e){super({stopDown:cx}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const t=e.condition?e.condition:W6(Pz,Jee);this.condition_=e.onFocusOnly?W6(kz,t):t,this.noKinetic_=!1}handleDragEvent(e){const t=e.map;this.panning_||(this.panning_=!0,t.getView().beginInteraction());const r=this.targetPointers,i=t.getEventPixel(PO(r));if(r.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){const s=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],o=e.map.getView();hX(s,o.getResolution()),iO(s,o.getRotation()),o.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=r.length,e.originalEvent.preventDefault()}handleUpEvent(e){const t=e.map,r=t.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const i=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),a=r.getCenterInternal(),o=t.getPixelFromCoordinateInternal(a),d=t.getCoordinateFromPixelInternal([o[0]-i*Math.cos(s),o[1]-i*Math.sin(s)]);r.animateInternal({center:r.getConstrainedCenter(d),duration:500,easing:Py})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const r=e.map.getView();return this.lastCentroid=null,r.getAnimating()&&r.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class tte extends ZC{constructor(e){e=e||{},super({stopDown:cx}),this.condition_=e.condition?e.condition:$ee,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!U4(e))return;const t=e.map,r=t.getView();if(r.getConstraints().rotation===xO)return;const i=t.getSize(),s=e.pixel,a=Math.atan2(i[1]/2-s[1],s[0]-i[0]/2);if(this.lastAngle_!==void 0){const o=a-this.lastAngle_;r.adjustRotationInternal(-o)}this.lastAngle_=a}handleUpEvent(e){return U4(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return U4(e)&&Tz(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class nte extends FC{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,t=this.endPixel_,r="px",i=this.element_.style;i.left=Math.min(e[0],t[0])+r,i.top=Math.min(e[1],t[1])+r,i.width=Math.abs(t[0]-e[0])+r,i.height=Math.abs(t[1]-e[1])+r}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,t){this.startPixel_=e,this.endPixel_=t,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,t=this.endPixel_,i=[e,[e[0],t[1]],t,[t[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Qm([i])}getGeometry(){return this.geometry_}}const A1={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Av extends hp{constructor(e,t,r){super(e),this.coordinate=t,this.mapBrowserEvent=r}}class rte extends ZC{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new nte(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??Tz,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,t,r){const i=r[0]-t[0],s=r[1]-t[1];return i*i+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new Av(A1.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const t=this.boxEndCondition_(e,this.startPixel_,e.pixel);return t&&this.onBoxEnd(e),this.dispatchEvent(new Av(t?A1.BOXEND:A1.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Av(A1.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Av(A1.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Av(A1.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class ite extends rte{constructor(e){e=e||{};const t=e.condition?e.condition:Xee;super({condition:t,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const r=this.getMap().getView();let i=this.getGeometry();if(this.out_){const s=r.rotatedExtentForGeometry(i),a=r.getResolutionForExtentInternal(s),o=r.getResolution()/a;i=i.clone(),i.scale(o*o)}r.fitInternal(i,{duration:this.duration_,easing:Py})}}const eg={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class ote extends HC{constructor(e){super(),e=e||{},this.defaultCondition_=function(t){return Pz(t)&&Rz(t)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let t=!1;if(e.type==io.KEYDOWN){const r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==eg.DOWN||i==eg.LEFT||i==eg.RIGHT||i==eg.UP)){const a=e.map.getView(),o=a.getResolution()*this.pixelDelta_;let d=0,g=0;i==eg.DOWN?g=-o:i==eg.LEFT?d=-o:i==eg.RIGHT?d=o:g=o;const b=[d,g];iO(b,a.getRotation()),qee(a,b,this.duration_),r.preventDefault(),t=!0}}return!t}}class ste extends HC{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(t){return!Zee(t)&&Rz(t)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let t=!1;if(e.type==io.KEYDOWN||e.type==io.KEYPRESS){const r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==="+"||i==="-")){const s=e.map,a=i==="+"?this.delta_:-this.delta_,o=s.getView();TO(o,a,void 0,this.duration_),r.preventDefault(),t=!0}}return!t}}class ate extends HC{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const t=e.condition?e.condition:Hee;this.condition_=e.onFocusOnly?W6(kz,t):t,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==io.WHEEL)return!0;const r=e.map,i=e.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let s;if(e.type==io.WHEEL&&(s=i.deltaY,SZ&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=bU),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const o=r.getView();if(this.mode_==="trackpad"&&!(o.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_?r.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=a,!1;this.totalDelta_+=s;const d=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),d),!1}handleWheelZoom_(e){const t=e.getView();t.getAnimating()&&t.cancelAnimations();let r=-Tu(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(t.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),TO(t,r,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class lte extends ZC{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=cx),super(t),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let t=0;const r=this.targetPointers[0],i=this.targetPointers[1],s=Math.atan2(i.clientY-r.clientY,i.clientX-r.clientX);if(this.lastAngle_!==void 0){const d=s-this.lastAngle_;this.rotationDelta_+=d,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),t=d}this.lastAngle_=s;const a=e.map,o=a.getView();o.getConstraints().rotation!==xO&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(PO(this.targetPointers))),this.rotating_&&(a.render(),o.adjustRotationInternal(t,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}class ute extends ZC{constructor(e){e=e||{};const t=e;t.stopDown||(t.stopDown=cx),super(t),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let t=1;const r=this.targetPointers[0],i=this.targetPointers[1],s=r.clientX-i.clientX,a=r.clientY-i.clientY,o=Math.sqrt(s*s+a*a);this.lastDistance_!==void 0&&(t=this.lastDistance_/o),this.lastDistance_=o;const d=e.map,g=d.getView();t!=1&&(this.lastScaleDelta_=t),this.anchor_=d.getCoordinateFromPixelInternal(d.getEventPixel(PO(this.targetPointers))),d.render(),g.adjustResolutionInternal(t,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const r=e.map.getView(),i=this.lastScaleDelta_>1?1:-1;return r.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const t=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||t.getView().beginInteraction(),!0}return!1}}function Ate(n){n=n||{};const e=new $p,t=new Dee(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&e.push(new tte),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&e.push(new Yee({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&e.push(new ete({onFocusOnly:n.onFocusOnly,kinetic:t})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&e.push(new lte),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&e.push(new ute({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(e.push(new ote),e.push(new ste({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&e.push(new ate({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&e.push(new ite({duration:n.zoomDuration})),e}function Dz(n){if(n instanceof Ry){n.setMapInternal(null);return}n instanceof Ky&&n.getLayers().forEach(Dz)}function Kz(n,e){if(n instanceof Ry){n.setMapInternal(e);return}if(n instanceof Ky){const t=n.getLayers().getArray();for(let r=0,i=t.length;r<i;++r)Kz(t[r],e)}}let RO=class extends fp{constructor(e){super(),e=e||{},this.on,this.once,this.un;const t=cte(e);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:bU,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ch(),this.pixelToCoordinateTransform_=Ch(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=t.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=t.controls||Qee(),this.interactions=t.interactions||Ate({onFocusOnly:!0}),this.overlays_=t.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Iz(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(id.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(id.VIEW,this.handleViewChanged_),this.addChangeListener(id.SIZE,this.handleSizeChanged_),this.addChangeListener(id.TARGET,this.handleTargetChanged_),this.setProperties(t.values);const r=this;e.view&&!(e.view instanceof op)&&e.view.then(function(i){r.setView(new op(i))}),this.controls.addEventListener(gh.ADD,i=>{i.element.setMap(this)}),this.controls.addEventListener(gh.REMOVE,i=>{i.element.setMap(null)}),this.interactions.addEventListener(gh.ADD,i=>{i.element.setMap(this)}),this.interactions.addEventListener(gh.REMOVE,i=>{i.element.setMap(null)}),this.overlays_.addEventListener(gh.ADD,i=>{this.addOverlayInternal_(i.element)}),this.overlays_.addEventListener(gh.REMOVE,i=>{const s=i.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],i.element.setMap(null)}),this.controls.forEach(i=>{i.setMap(this)}),this.interactions.forEach(i=>{i.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){Kz(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const t=e.getId();t!==void 0&&(this.overlayIdIndex_[t.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,t,r){if(!this.frameState_||!this.renderer_)return;const i=this.getCoordinateFromPixelInternal(e);r=r!==void 0?r:{};const s=r.hitTolerance!==void 0?r.hitTolerance:0,a=r.layerFilter!==void 0?r.layerFilter:oC,o=r.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,s,o,t,null,a,null)}getFeaturesAtPixel(e,t){const r=[];return this.forEachFeatureAtPixel(e,function(i){r.push(i)},t),r}getAllLayers(){const e=[];function t(r){r.forEach(function(i){i instanceof Ky?t(i.getLayers()):e.push(i)})}return t(this.getLayers()),e}hasFeatureAtPixel(e,t){if(!this.frameState_||!this.renderer_)return!1;const r=this.getCoordinateFromPixelInternal(e);t=t!==void 0?t:{};const i=t.layerFilter!==void 0?t.layerFilter:oC,s=t.hitTolerance!==void 0?t.hitTolerance:0,a=t.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,s,a,i,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const r=this.viewport_.getBoundingClientRect(),i=this.getSize(),s=r.width/i[0],a=r.height/i[1],o="changedTouches"in e?e.changedTouches[0]:e;return[(o.clientX-r.left)/s,(o.clientY-r.top)/a]}getTarget(){return this.get(id.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return D6(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const t=this.frameState_;return t?yA(t.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const t=this.overlayIdIndex_[e.toString()];return t!==void 0?t:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(id.LAYERGROUP)}setLayers(e){const t=this.getLayerGroup();if(e instanceof $p){t.setLayers(e);return}const r=t.getLayers();r.clear(),r.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,r=e.length;t<r;++t){const i=e[t];if(!i.visible)continue;const s=i.layer.getRenderer();if(s&&!s.ready)return!0;const a=i.layer.getSource();if(a&&a.loading)return!0}return!1}getPixelFromCoordinate(e){const t=km(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(t)}getPixelFromCoordinateInternal(e){const t=this.frameState_;return t?yA(t.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(id.SIZE)}getView(){return this.get(id.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,t,r,i){return jee(this.frameState_,e,t,r,i)}handleBrowserEvent(e,t){t=t||e.type;const r=new p0(t,this,e);this.handleMapBrowserEvent(r)}handleMapBrowserEvent(e){if(!this.frameState_)return;const t=e.originalEvent,r=t.type;if(r===N6.POINTERDOWN||r===io.WHEEL||r===io.KEYDOWN){const i=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a=t.target,o=s instanceof ShadowRoot?s.host===a?s.host.ownerDocument:s:s===i?i.documentElement:s;if(this.overlayContainerStopEvent_.contains(a)||!o.contains(a))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){const i=this.getInteractions().getArray().slice();for(let s=i.length-1;s>=0;s--){const a=i[s];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,t=this.tileQueue_;if(!t.isEmpty()){let i=this.maxTilesLoading_,s=i;if(e){const a=e.viewHints;if(a[Vl.ANIMATING]||a[Vl.INTERACTING]){const o=Date.now()-e.time>8;i=o?0:8,s=o?0:2}}t.getTilesLoading()<i&&(t.reprioritize(),t.loadMoreTiles(i,s))}e&&this.renderer_&&!e.animate&&(this.renderComplete_?(this.hasListener(Sf.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Sf.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new z1(Tm.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new z1(Tm.LOADSTART,this,e))));const r=this.postRenderFunctions_;if(e)for(let i=0,s=r.length;i<s;++i)r[i](this,e);r.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let r=0,i=this.targetChangeHandlerKeys_.length;r<i;++r)Ka(this.targetChangeHandlerKeys_[r]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(io.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(io.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const r=this.targetElement_.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.unobserve(r.host),this.setSize(void 0)}const e=this.getTarget(),t=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=t,!t)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{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Lee(this)),this.mapBrowserEventHandler_=new Uee(this,this.moveTolerance_);for(const s in Ou)this.mapBrowserEventHandler_.addEventListener(Ou[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(io.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(io.WHEEL,this.boundHandleBrowserEvent_,wU?{passive:!1}:!1);let r;if(this.keyboardEventTarget_)r=this.keyboardEventTarget_;else{const s=t.getRootNode();r=s instanceof ShadowRoot?s.host:t}this.targetChangeHandlerKeys_=[Ts(r,io.KEYDOWN,this.handleBrowserEvent,this),Ts(r,io.KEYPRESS,this.handleBrowserEvent,this)];const i=t.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(t)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Ka(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Ka(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=Ts(e,Cy.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Ts(e,io.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Ka),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new g0("addlayer",e)),this.layerGroupPropertyListenerKeys_=[Ts(e,Cy.PROPERTYCHANGE,this.render,this),Ts(e,io.CHANGE,this.render,this),Ts(e,"addlayer",this.handleLayerAdd_,this),Ts(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const e=this.getLayerGroup().getLayerStatesArray();for(let t=0,r=e.length;t<r;++t){const i=e[t].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){Dz(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const t=this.getSize(),r=this.getView(),i=this.frameState_;let s=null;if(t!==void 0&&Z7(t)&&r&&r.isDef()){const a=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),o=r.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:i2(o.center,o.resolution,o.rotation,t),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:t,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:o,viewHints:a,wantedTiles:{},mapId:Lo(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const d=isNaN(o.nextRotation)?o.rotation:o.nextRotation;s.nextExtent=i2(o.nextCenter,o.nextResolution,d,t)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),i&&(!this.previousExtent_||!Lg(this.previousExtent_)&&!Gm(s.extent,this.previousExtent_))&&(this.dispatchEvent(new z1(Tm.MOVESTART,this,i)),this.previousExtent_=Ty(this.previousExtent_)),this.previousExtent_&&!s.viewHints[Vl.ANIMATING]&&!s.viewHints[Vl.INTERACTING]&&!Gm(s.extent,this.previousExtent_)&&(this.dispatchEvent(new z1(Tm.MOVEEND,this,s)),RU(s.extent,this.previousExtent_))),this.dispatchEvent(new z1(Tm.POSTRENDER,this,s)),this.renderComplete_=(this.hasListener(Tm.LOADSTART)||this.hasListener(Tm.LOADEND)||this.hasListener(Sf.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const t=this.getLayerGroup();t&&this.handleLayerRemove_(new g0("removelayer",t)),this.set(id.LAYERGROUP,e)}setSize(e){this.set(id.SIZE,e)}setTarget(e){this.set(id.TARGET,e)}setView(e){if(!e||e instanceof op){this.set(id.VIEW,e);return}this.set(id.VIEW,new op);const t=this;e.then(function(r){t.setView(new op(r))})}updateSize(){const e=this.getTargetElement();let t;if(e){const i=getComputedStyle(e),s=e.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),a=e.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(s)&&!isNaN(a)&&(t=[Math.max(0,s),Math.max(0,a)],!Z7(t)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&GU("No map visible because the map container's width or height are 0."))}const r=this.getSize();t&&(!r||!D0(t,r))&&(this.setSize(t),this.updateViewportSize_(t))}updateViewportSize_(e){const t=this.getView();t&&t.setViewportSize(e)}};function cte(n){let e=null;n.keyboardEventTarget!==void 0&&(e=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const t={},r=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Ky({layers:n.layers});t[id.LAYERGROUP]=r,t[id.TARGET]=n.target,t[id.VIEW]=n.view instanceof op?n.view:new op;let i;n.controls!==void 0&&(Array.isArray(n.controls)?i=new $p(n.controls.slice()):(ra(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),i=n.controls));let s;n.interactions!==void 0&&(Array.isArray(n.interactions)?s=new $p(n.interactions.slice()):(ra(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=n.interactions));let a;return n.overlays!==void 0?Array.isArray(n.overlays)?a=new $p(n.overlays.slice()):(ra(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=n.overlays):a=new $p,{controls:i,interactions:s,keyboardEventTarget:e,overlays:a,values:t}}const rd={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class dte extends fp{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+zZ,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(rd.ELEMENT,this.handleElementChanged),this.addChangeListener(rd.MAP,this.handleMapChanged),this.addChangeListener(rd.OFFSET,this.handleOffsetChanged),this.addChangeListener(rd.POSITION,this.handlePositionChanged),this.addChangeListener(rd.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(rd.ELEMENT)}getId(){return this.id}getMap(){return this.get(rd.MAP)||null}getOffset(){return this.get(rd.OFFSET)}getPosition(){return this.get(rd.POSITION)}getPositioning(){return this.get(rd.POSITIONING)}handleElementChanged(){MU(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){var t;this.mapPostrenderListenerKey&&((t=this.element)==null||t.remove(),Ka(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=Ts(e,Tm.POSTRENDER,this.render,this),this.updatePixelPosition();const r=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?r.insertBefore(this.element,r.childNodes[0]||null):r.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(rd.ELEMENT,e)}setMap(e){this.set(rd.MAP,e)}setOffset(e){this.set(rd.OFFSET,e)}setPosition(e){this.set(rd.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const t=this.getMap();if(!t||!t.getTargetElement()||!this.get(rd.POSITION))return;const r=this.getRect(t.getTargetElement(),t.getSize()),i=this.getElement(),s=this.getRect(i,[OZ(i),IZ(i)]);e=e||{};const a=e.margin===void 0?20:e.margin;if(!lp(r,s)){const o=s[0]-r[0],d=r[2]-s[2],g=s[1]-r[1],b=r[3]-s[3],E=[0,0];if(o<0?E[0]=o-a:d<0&&(E[0]=Math.abs(d)+a),g<0?E[1]=g-a:b<0&&(E[1]=Math.abs(b)+a),E[0]!==0||E[1]!==0){const S=t.getView().getCenterInternal(),O=t.getPixelFromCoordinateInternal(S);if(!O)return;const k=[O[0]+E[0],O[1]+E[1]],U=e.animation||{};t.getView().animateInternal({center:t.getCoordinateFromPixelInternal(k),duration:U.duration,easing:U.easing})}}}getRect(e,t){const r=e.getBoundingClientRect(),i=r.left+window.pageXOffset,s=r.top+window.pageYOffset;return[i,s,i+t[0],s+t[1]]}setPositioning(e){this.set(rd.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),t=this.getPosition();if(!e||!e.isRendered()||!t){this.setVisible(!1);return}const r=e.getPixelFromCoordinate(t),i=e.getSize();this.updateRenderedPosition(r,i)}updateRenderedPosition(e,t){const r=this.element.style,i=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const a=Math.round(e[0]+i[0])+"px",o=Math.round(e[1]+i[1])+"px";let d="0%",g="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?d="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(d="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?g="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(g="-50%");const b=`translate(${d}, ${g}) translate(${a}, ${o})`;this.rendered.transform_!=b&&(this.rendered.transform_=b,r.transform=b)}getOptions(){return this.options}}class hte{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const e=this.pop();e instanceof FC&&e.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let t=this.oldest_;for(;t;)e(t.value_,t.key_,this),t=t.newer}get(e,t){const r=this.entries_[e];return ra(r!==void 0,"Tried to get a value for a key that does not exist in the cache"),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_}remove(e){const t=this.entries_[e];return ra(t!==void 0,"Tried to get a value for a key that does not exist in the cache"),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let t=0,r;for(r=this.newest_;r;r=r.older)e[t++]=r.key_;return e}getValues(){const e=new Array(this.count_);let t=0,r;for(r=this.newest_;r;r=r.older)e[t++]=r.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){var t;return(t=this.entries_[e])==null?void 0:t.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,t){this.get(e),this.entries_[e].value_=t}set(e,t){ra(!(e in this.entries_),"Tried to set a value for a key that is used already");const r={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[e]=r,++this.count_}setSize(e){this.highWaterMark=e}}function g2(n,e,t,r){return r!==void 0?(r[0]=n,r[1]=e,r[2]=t,r):[n,e,t]}function fte(n,e,t){return n+"/"+e+"/"+t}function pte(n){return mte(n[0],n[1],n[2])}function mte(n,e,t){return(e<<n)+t}function gte(n,e){const t=n[0],r=n[1],i=n[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;const s=e.getFullTileRange(t);return s?s.containsXY(r,i):!0}class DO{constructor(e,t,r,i){this.minX=e,this.maxX=t,this.minY=r,this.maxY=i}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function c1(n,e,t,r,i){return i!==void 0?(i.minX=n,i.maxX=e,i.minY=t,i.maxY=r,i):new DO(n,e,t,r)}const Nk=[];class yte extends VC{constructor(e,t,r,i,s){super(e,t,{transition:0}),this.context_=null,this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=i.bind(void 0,this),this.removeSourceTiles_=s,this.wrappedTileCoord=r}getContext(){return this.context_||(this.context_=Jl(1,1,Nk)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(e){const t=Lo(e);return t in this.replayState_||(this.replayState_[t]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[t]}load(){this.getSourceTiles()}release(){this.context_&&(zC(this.context_),Nk.push(this.context_.canvas),this.context_=null),this.removeSourceTiles_(this),this.sourceTiles.length=0,super.release()}}let Fz=class extends VC{constructor(e,t,r,i,s,a){super(e,t,a),this.extent=null,this.format_=i,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=r,this.key=r}getTileUrl(){return this.url_}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==xr.IDLE&&(this.setState(xr.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(e,t){this.setFeatures(e)}onError(){this.setState(xr.ERROR)}setFeatures(e){this.features_=e,this.setState(xr.LOADED)}setLoader(e){this.loader_=e}};class Lz{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=px,this.supportedMediaTypes=null}getReadOptions(e,t){if(t){let r=t.dataProjection?Ma(t.dataProjection):this.readProjection(e);t.extent&&r&&r.getUnits()==="tile-pixels"&&(r=Ma(r),r.setWorldExtent(t.extent)),t={dataProjection:r,featureProjection:t.featureProjection}}return this.adaptOptions(t)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return go()}readFeature(e,t){return go()}readFeatures(e,t){return go()}readGeometry(e,t){return go()}readProjection(e){return go()}writeFeature(e,t){return go()}writeFeatures(e,t){return go()}writeGeometry(e,t){return go()}}function Ox(n,e,t){const r=t?Ma(t.featureProjection):null,i=t?Ma(t.dataProjection):null;let s=n;if(r&&i&&!Mg(r,i)){e&&(s=n.clone());const a=e?r:i,o=e?i:r;a.getUnits()==="tile-pixels"?s.transform(a,o):s.applyTransform(hC(a,o))}if(e&&t&&t.decimals!==void 0){const a=Math.pow(10,t.decimals),o=function(d){for(let g=0,b=d.length;g<b;++g)d[g]=Math.round(d[g]*a)/a;return d};s===n&&(s=n.clone()),s.applyTransform(o)}return s}const vte={Point:Tg,LineString:kg,Polygon:Qm,MultiPoint:qC,MultiLineString:mC,MultiPolygon:gC};function Cte(n,e,t){return Array.isArray(e[0])?(rz(n,0,e,t)||(n=n.slice(),L6(n,0,e,t)),n):(vO(n,0,e,t)||(n=n.slice(),A2(n,0,e,t)),n)}function Uz(n,e){var s;const t=n.geometry;if(!t)return[];if(Array.isArray(t))return t.map(a=>Uz({...n,geometry:a})).flat();const r=t.type==="MultiPolygon"?"Polygon":t.type;if(r==="GeometryCollection"||r==="Circle")throw new Error("Unsupported geometry type: "+r);const i=t.layout.length;return Ox(new sd(r,r==="Polygon"?Cte(t.flatCoordinates,t.ends,i):t.flatCoordinates,(s=t.ends)==null?void 0:s.flat(),i,n.properties||{},n.id).enableSimplifyTransformed(),!1,e)}function KO(n,e){if(!n)return null;if(Array.isArray(n)){const r=n.map(i=>KO(i,e));return new l2(r)}const t=vte[n.type];return Ox(new t(n.flatCoordinates,n.layout,n.ends),!1,e)}class _te extends Lz{constructor(){super()}getType(){return"json"}readFeature(e,t){return this.readFeatureFromObject(H_(e),this.getReadOptions(e,t))}readFeatures(e,t){return this.readFeaturesFromObject(H_(e),this.getReadOptions(e,t))}readFeatureFromObject(e,t){return go()}readFeaturesFromObject(e,t){return go()}readGeometry(e,t){return this.readGeometryFromObject(H_(e),this.getReadOptions(e,t))}readGeometryFromObject(e,t){return go()}readProjection(e){return this.readProjectionFromObject(H_(e))}readProjectionFromObject(e){return go()}writeFeature(e,t){return JSON.stringify(this.writeFeatureObject(e,t))}writeFeatureObject(e,t){return go()}writeFeatures(e,t){return JSON.stringify(this.writeFeaturesObject(e,t))}writeFeaturesObject(e,t){return go()}writeGeometry(e,t){return JSON.stringify(this.writeGeometryObject(e,t))}writeGeometryObject(e,t){return go()}}function H_(n){if(typeof n=="string"){const e=JSON.parse(n);return e||null}return n!==null?n:null}class Wk extends _te{constructor(e){e=e||{},super(),this.dataProjection=Ma(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=Ma(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,t){let r=null;e.type==="Feature"?r=e:r={type:"Feature",geometry:e,properties:null};const i=FO(r.geometry);if(this.featureClass===sd)return Uz({geometry:i,id:r.id,properties:r.properties},t);const s=new px;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&r.geometry_name&&s.setGeometryName(r.geometry_name),s.setGeometry(KO(i,t)),"id"in r&&s.setId(r.id),r.properties&&s.setProperties(r.properties,!0),s}readFeaturesFromObject(e,t){const r=e;let i=null;if(r.type==="FeatureCollection"){const s=e;i=[];const a=s.features;for(let o=0,d=a.length;o<d;++o){const g=this.readFeatureFromObject(a[o],t);g&&i.push(g)}}else i=[this.readFeatureFromObject(e,t)];return i.flat()}readGeometryFromObject(e,t){return bte(e,t)}readProjectionFromObject(e){const t=e.crs;let r;if(t)if(t.type=="name")r=Ma(t.properties.name);else if(t.type==="EPSG")r=Ma("EPSG:"+t.properties.code);else throw new Error("Unknown SRS type");else r=this.dataProjection;return r}writeFeatureObject(e,t){t=this.adaptOptions(t);const r={type:"Feature",geometry:null,properties:null},i=e.getId();if(i!==void 0&&(r.id=i),!e.hasProperties())return r;const s=e.getProperties(),a=e.getGeometry();return a&&(r.geometry=G6(a,t),delete s[e.getGeometryName()]),T0(s)||(r.properties=s),r}writeFeaturesObject(e,t){t=this.adaptOptions(t);const r=[];for(let i=0,s=e.length;i<s;++i)r.push(this.writeFeatureObject(e[i],t));return{type:"FeatureCollection",features:r}}writeGeometryObject(e,t){return G6(e,this.adaptOptions(t))}}function FO(n,e){if(!n)return null;let t;switch(n.type){case"Point":{t=wte(n);break}case"LineString":{t=Mte(n);break}case"Polygon":{t=Ote(n);break}case"MultiPoint":{t=Ete(n);break}case"MultiLineString":{t=Ste(n);break}case"MultiPolygon":{t=Bte(n);break}case"GeometryCollection":{t=xte(n);break}default:throw new Error("Unsupported GeoJSON type: "+n.type)}return t}function bte(n,e){const t=FO(n);return KO(t,e)}function xte(n,e){return n.geometries.map(function(r){return FO(r)})}function wte(n){const e=n.coordinates;return{type:"Point",flatCoordinates:e,layout:zg(e.length)}}function Mte(n){var r;const e=n.coordinates,t=e.flat();return{type:"LineString",flatCoordinates:t,ends:[t.length],layout:zg(((r=e[0])==null?void 0:r.length)||2)}}function Ste(n){var s,a;const e=n.coordinates,t=((a=(s=e[0])==null?void 0:s[0])==null?void 0:a.length)||2,r=[],i=QC(r,0,e,t);return{type:"MultiLineString",flatCoordinates:r,ends:i,layout:zg(t)}}function Ete(n){var t;const e=n.coordinates;return{type:"MultiPoint",flatCoordinates:e.flat(),layout:zg(((t=e[0])==null?void 0:t.length)||2)}}function Bte(n){var s,a;const e=n.coordinates,t=[],r=((a=(s=e[0])==null?void 0:s[0])==null?void 0:a[0].length)||2,i=$U(t,0,e,r);return{type:"MultiPolygon",flatCoordinates:t,ends:i,layout:zg(r)}}function Ote(n){var s,a;const e=n.coordinates,t=[],r=(a=(s=e[0])==null?void 0:s[0])==null?void 0:a.length,i=QC(t,0,e,r);return{type:"Polygon",flatCoordinates:t,ends:i,layout:zg(r)}}function G6(n,e){n=Ox(n,!0,e);const t=n.getType();let r;switch(t){case"Point":{r=Dte(n);break}case"LineString":{r=kte(n);break}case"Polygon":{r=Kte(n,e);break}case"MultiPoint":{r=Pte(n);break}case"MultiLineString":{r=Tte(n);break}case"MultiPolygon":{r=Rte(n,e);break}case"GeometryCollection":{r=Ite(n,e);break}case"Circle":{r={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return r}function Ite(n,e){return e=Object.assign({},e),delete e.featureProjection,{type:"GeometryCollection",geometries:n.getGeometriesArray().map(function(r){return G6(r,e)})}}function kte(n,e){return{type:"LineString",coordinates:n.getCoordinates()}}function Tte(n,e){return{type:"MultiLineString",coordinates:n.getCoordinates()}}function Pte(n,e){return{type:"MultiPoint",coordinates:n.getCoordinates()}}function Rte(n,e){let t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:n.getCoordinates(t)}}function Dte(n,e){return{type:"Point",coordinates:n.getCoordinates()}}function Kte(n,e){let t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:n.getCoordinates(t)}}class Fte extends Ry{constructor(e){e=e||{},super(e)}}class Lte extends OO{constructor(e){super(e),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(e){const t=e.layerStatesArray[e.layerIndex],r=e.pixelRatio,i=e.viewState,s=i.resolution,a=this.getLayer().getSource(),o=e.viewHints;let d=e.extent;if(t.extent!==void 0&&(d=Qd(d,Yp(t.extent,i.projection))),!o[Vl.ANIMATING]&&!o[Vl.INTERACTING]&&!Lg(d))if(a){const g=i.projection,b=a.getImage(d,s,r,g);b&&(this.loadImage(b)?this.image=b:b.getState()===hi.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(e){const t=this.frameState;if(!t)return null;const r=this.getLayer(),i=yA(t.pixelToCoordinateTransform,e.slice()),s=r.getExtent();if(s&&!Ig(s,i))return null;const a=this.image.getExtent(),o=this.image.getImage(),d=ps(a),g=Math.floor(o.width*((i[0]-a[0])/d));if(g<0||g>=o.width)return null;const b=Hl(a),E=Math.floor(o.height*((a[3]-i[1])/b));return E<0||E>=o.height?null:this.getImageData(o,g,E)}renderFrame(e,t){const r=this.image,i=r.getExtent(),s=r.getResolution(),[a,o]=Array.isArray(s)?s:[s,s],d=r.getPixelRatio(),g=e.layerStatesArray[e.layerIndex],b=e.pixelRatio,E=e.viewState,S=E.center,O=E.resolution,k=b*a/(O*d),U=b*o/(O*d);this.prepareContainer(e,t);const z=this.context.canvas.width,q=this.context.canvas.height,Q=this.getRenderContext(e);let re=!1,X=!0;if(g.extent){const he=Yp(g.extent,E.projection);X=ku(he,e.extent),re=X&&!lp(he,e.extent),re&&this.clipUnrotated(Q,e,he)}const Y=r.getImage(),ee=em(this.tempTransform,z/2,q/2,k,U,0,d*(i[0]-S[0])/a,d*(S[1]-i[3])/o);this.renderedResolution=o*b/d;const N=Y.width*ee[0],ie=Y.height*ee[3];if(this.getLayer().getSource().getInterpolate()||(Q.imageSmoothingEnabled=!1),this.preRender(Q,e),X&&N>=.5&&ie>=.5){const he=ee[4],de=ee[5],Me=g.opacity;Me!==1&&(Q.save(),Q.globalAlpha=Me),Q.drawImage(Y,0,0,+Y.width,+Y.height,he,de,N,ie),Me!==1&&Q.restore()}return this.postRender(this.context,e),re&&Q.restore(),Q.imageSmoothingEnabled=!0,this.container}}class zz extends Fte{constructor(e){super(e)}createRenderer(){return new Lte(this)}getData(e){return super.getData(e)}}const Q6=65536*65536,Gk=1/Q6,Ute=12,Qk=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),z4=0,Z_=1,cv=2,X_=5;class zte{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,r=this.length){for(;this.pos<r;){const i=this.readVarint(),s=i>>3,a=this.pos;this.type=i&7,e(s,t,this),this.pos===a&&this.skip(i)}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){const e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){const e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){const e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Q6;return this.pos+=8,e}readSFixed64(){const e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Q6;return this.pos+=8,e}readFloat(){const e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){const e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){const t=this.buf;let r,i;return i=t[this.pos++],r=i&127,i<128||(i=t[this.pos++],r|=(i&127)<<7,i<128)||(i=t[this.pos++],r|=(i&127)<<14,i<128)||(i=t[this.pos++],r|=(i&127)<<21,i<128)?r:(i=t[this.pos],r|=(i&15)<<28,jte(r,e,this))}readVarint64(){return this.readVarint(!0)}readSVarint(){const e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){const e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Ute&&Qk?Qk.decode(this.buf.subarray(t,e)):ene(this.buf,t,e)}readBytes(){const e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){const r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){const t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===cv?this.readVarint()+this.pos:this.pos+1}skip(e){const t=e&7;if(t===z4)for(;this.buf[this.pos++]>127;);else if(t===cv)this.pos=this.readVarint()+this.pos;else if(t===X_)this.pos+=4;else if(t===Z_)this.pos+=8;else throw new Error(`Unimplemented type: ${t}`)}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){const r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.dataView=new DataView(r.buffer),this.length=t}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*Gk),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*Gk),!0),this.pos+=8}writeVarint(e){if(e=+e||0,e>268435455||e<0){Nte(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;const t=this.pos;this.pos=tne(this.buf,e,this.pos);const r=this.pos-t;r>=128&&qk(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){const t=e.length;this.writeVarint(t),this.realloc(t);for(let r=0;r<t;r++)this.buf[this.pos++]=e[r]}writeRawMessage(e,t){this.pos++;const r=this.pos;e(t,this);const i=this.pos-r;i>=128&&qk(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(e,t,r){this.writeTag(e,cv),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,Qte,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,qte,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,Vte,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,Yte,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,$te,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,Hte,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,Zte,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,Xte,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,Jte,t)}writeBytesField(e,t){this.writeTag(e,cv),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,X_),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,X_),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,Z_),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,Z_),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,z4),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,z4),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,cv),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,X_),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,Z_),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function jte(n,e,t){const r=t.buf;let i,s;if(s=r[t.pos++],i=(s&112)>>4,s<128||(s=r[t.pos++],i|=(s&127)<<3,s<128)||(s=r[t.pos++],i|=(s&127)<<10,s<128)||(s=r[t.pos++],i|=(s&127)<<17,s<128)||(s=r[t.pos++],i|=(s&127)<<24,s<128)||(s=r[t.pos++],i|=(s&1)<<31,s<128))return d1(n,i,e);throw new Error("Expected varint not more than 10 bytes")}function d1(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function Nte(n,e){let t,r;if(n>=0?(t=n%4294967296|0,r=n/4294967296|0):(t=~(-n%4294967296),r=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,r=r+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Wte(t,r,e),Gte(r,e)}function Wte(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127}function Gte(n,e){const t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))))}function qk(n,e,t){const r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(r);for(let i=t.pos-1;i>=n;i--)t.buf[i+r]=t.buf[i]}function Qte(n,e){for(let t=0;t<n.length;t++)e.writeVarint(n[t])}function qte(n,e){for(let t=0;t<n.length;t++)e.writeSVarint(n[t])}function Yte(n,e){for(let t=0;t<n.length;t++)e.writeFloat(n[t])}function $te(n,e){for(let t=0;t<n.length;t++)e.writeDouble(n[t])}function Vte(n,e){for(let t=0;t<n.length;t++)e.writeBoolean(n[t])}function Hte(n,e){for(let t=0;t<n.length;t++)e.writeFixed32(n[t])}function Zte(n,e){for(let t=0;t<n.length;t++)e.writeSFixed32(n[t])}function Xte(n,e){for(let t=0;t<n.length;t++)e.writeFixed64(n[t])}function Jte(n,e){for(let t=0;t<n.length;t++)e.writeSFixed64(n[t])}function ene(n,e,t){let r="",i=e;for(;i<t;){const s=n[i];let a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o>t)break;let d,g,b;o===1?s<128&&(a=s):o===2?(d=n[i+1],(d&192)===128&&(a=(s&31)<<6|d&63,a<=127&&(a=null))):o===3?(d=n[i+1],g=n[i+2],(d&192)===128&&(g&192)===128&&(a=(s&15)<<12|(d&63)<<6|g&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):o===4&&(d=n[i+1],g=n[i+2],b=n[i+3],(d&192)===128&&(g&192)===128&&(b&192)===128&&(a=(s&15)<<18|(d&63)<<12|(g&63)<<6|b&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,o=1):a>65535&&(a-=65536,r+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),r+=String.fromCharCode(a),i+=o}return r}function tne(n,e,t){for(let r=0,i,s;r<e.length;r++){if(i=e.charCodeAt(r),i>55295&&i<57344)if(s)if(i<56320){n[t++]=239,n[t++]=191,n[t++]=189,s=i;continue}else i=s-55296<<10|i-56320|65536,s=null;else{i>56319||r+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):s=i;continue}else s&&(n[t++]=239,n[t++]=191,n[t++]=189,s=null);i<128?n[t++]=i:(i<2048?n[t++]=i>>6|192:(i<65536?n[t++]=i>>12|224:(n[t++]=i>>18|240,n[t++]=i>>12&63|128),n[t++]=i>>6&63|128),n[t++]=i&63|128)}return t}class nne extends Lz{constructor(e){super(),e=e||{},this.dataProjection=new vx({code:"",units:"tile-pixels"}),this.featureClass=e.featureClass?e.featureClass:sd,this.geometryName_=e.geometryName,this.layerName_=e.layerName?e.layerName:"layer",this.layers_=e.layers?e.layers:null,this.idProperty_=e.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(e,t,r,i){e.pos=t.geometry;const s=e.readVarint()+e.pos;let a=1,o=0,d=0,g=0,b=0,E=0;for(;e.pos<s;){if(!o){const S=e.readVarint();a=S&7,o=S>>3}if(o--,a===1||a===2)d+=e.readSVarint(),g+=e.readSVarint(),a===1&&b>E&&(i.push(b),E=b),r.push(d,g),b+=2;else if(a===7)b>E&&(r.push(r[E],r[E+1]),b+=2);else throw new Error("Invalid command found in the PBF")}b>E&&(i.push(b),E=b)}createFeature_(e,t,r){const i=t.type;if(i===0)return null;let s;const a=t.properties;let o;this.idProperty_?(o=a[this.idProperty_],delete a[this.idProperty_]):o=t.id,a[this.layerName_]=t.layer.name;const d=[],g=[];this.readRawGeometry_(e,t,d,g);const b=ane(i,g.length);if(this.featureClass===sd)s=new this.featureClass(b,d,g,2,a,o),s.transform(r.dataProjection);else{let E;if(b=="Polygon"){const k=iz(d,g);E=k.length>1?new gC(d,"XY",k):new Qm(d,"XY",g)}else E=b==="Point"?new Tg(d,"XY"):b==="LineString"?new kg(d,"XY"):b==="MultiPoint"?new qC(d,"XY"):b==="MultiLineString"?new mC(d,"XY",g):null;const S=this.featureClass;s=new S,this.geometryName_&&s.setGeometryName(this.geometryName_);const O=Ox(E,!1,r);s.setGeometry(O),o!==void 0&&s.setId(o),s.setProperties(a,!0)}return s}getType(){return"arraybuffer"}readFeatures(e,t){const r=this.layers_;t=this.adaptOptions(t);const i=Ma(t.dataProjection);i.setWorldExtent(t.extent),t.dataProjection=i;const s=new zte(e),a=s.readFields(rne,{}),o=[];for(const d in a){if(r&&!r.includes(d))continue;const g=a[d],b=g?[0,0,g.extent,g.extent]:null;i.setExtent(b);for(let E=0,S=g.length;E<S;++E){const O=sne(s,g,E),k=this.createFeature_(s,O,t);k!==null&&o.push(k)}}return o}readProjection(e){return this.dataProjection}setLayers(e){this.layers_=e}}function rne(n,e,t){if(n===3){const r={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(ine,r,i),r.length=r.features.length,r.length&&(e[r.name]=r)}}function ine(n,e,t){if(n===15)e.version=t.readVarint();else if(n===1)e.name=t.readString();else if(n===5)e.extent=t.readVarint();else if(n===2)e.features.push(t.pos);else if(n===3)e.keys.push(t.readString());else if(n===4){let r=null;const i=t.readVarint()+t.pos;for(;t.pos<i;)n=t.readVarint()>>3,r=n===1?t.readString():n===2?t.readFloat():n===3?t.readDouble():n===4?t.readVarint64():n===5?t.readVarint():n===6?t.readSVarint():n===7?t.readBoolean():null;e.values.push(r)}}function one(n,e,t){if(n==1)e.id=t.readVarint();else if(n==2){const r=t.readVarint()+t.pos;for(;t.pos<r;){const i=e.layer.keys[t.readVarint()],s=e.layer.values[t.readVarint()];e.properties[i]=s}}else n==3?e.type=t.readVarint():n==4&&(e.geometry=t.pos)}function sne(n,e,t){n.pos=e.features[t];const r=n.readVarint()+n.pos,i={layer:e,type:0,properties:{}};return n.readFields(one,i,r),i}function ane(n,e){let t;return n===1?t=e===1?"Point":"MultiPoint":n===2?t=e===1?"LineString":"MultiLineString":n===3&&(t="Polygon"),t}const LO=.5,lne=10,Yk=.25;class UO{constructor(e,t,r,i,s,a,o){this.sourceProj_=e,this.targetProj_=t;let d={};const g=o?RX(re=>yA(o,bx(re,this.targetProj_,this.sourceProj_))):hC(this.targetProj_,this.sourceProj_);this.transformInv_=function(re){const X=re[0]+"/"+re[1];return d[X]||(d[X]=g(re)),d[X]},this.maxSourceExtent_=i,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&ps(i)>=ps(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ps(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ps(this.targetProj_.getExtent()):null;const b=Ap(r),E=yx(r),S=gx(r),O=mx(r),k=this.transformInv_(b),U=this.transformInv_(E),z=this.transformInv_(S),q=this.transformInv_(O),Q=lne+(a?Math.max(0,Math.ceil(Math.log2(cC(r)/(a*a*256*256)))):0);if(this.addQuad_(b,E,S,O,k,U,z,q,Q),this.wrapsXInSource_){let re=1/0;this.triangles_.forEach(function(X,Y,ee){re=Math.min(re,X.source[0][0],X.source[1][0],X.source[2][0])}),this.triangles_.forEach(X=>{if(Math.max(X.source[0][0],X.source[1][0],X.source[2][0])-re>this.sourceWorldWidth_/2){const Y=[[X.source[0][0],X.source[0][1]],[X.source[1][0],X.source[1][1]],[X.source[2][0],X.source[2][1]]];Y[0][0]-re>this.sourceWorldWidth_/2&&(Y[0][0]-=this.sourceWorldWidth_),Y[1][0]-re>this.sourceWorldWidth_/2&&(Y[1][0]-=this.sourceWorldWidth_),Y[2][0]-re>this.sourceWorldWidth_/2&&(Y[2][0]-=this.sourceWorldWidth_);const ee=Math.min(Y[0][0],Y[1][0],Y[2][0]);Math.max(Y[0][0],Y[1][0],Y[2][0])-ee<this.sourceWorldWidth_/2&&(X.source=Y)}})}d={}}addTriangle_(e,t,r,i,s,a){this.triangles_.push({source:[i,s,a],target:[e,t,r]})}addQuad_(e,t,r,i,s,a,o,d,g){const b=B6([s,a,o,d]),E=this.sourceWorldWidth_?ps(b)/this.sourceWorldWidth_:null,S=this.sourceWorldWidth_,O=this.sourceProj_.canWrapX()&&E>.5&&E<1;let k=!1;if(g>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const z=B6([e,t,r,i]);k=ps(z)/this.targetWorldWidth_>Yk||k}!O&&this.sourceProj_.isGlobal()&&E&&(k=E>Yk||k)}if(!k&&this.maxSourceExtent_&&isFinite(b[0])&&isFinite(b[1])&&isFinite(b[2])&&isFinite(b[3])&&!ku(b,this.maxSourceExtent_))return;let U=0;if(!k&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(d[0])||!isFinite(d[1]))){if(g>0)k=!0;else if(U=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(o[0])||!isFinite(o[1])?2:0)+(!isFinite(d[0])||!isFinite(d[1])?1:0),U!=1&&U!=2&&U!=4&&U!=8)return}if(g>0){if(!k){const z=[(e[0]+r[0])/2,(e[1]+r[1])/2],q=this.transformInv_(z);let Q;O?Q=(wg(s[0],S)+wg(o[0],S))/2-wg(q[0],S):Q=(s[0]+o[0])/2-q[0];const re=(s[1]+o[1])/2-q[1];k=Q*Q+re*re>this.errorThresholdSquared_}if(k){if(Math.abs(e[0]-r[0])<=Math.abs(e[1]-r[1])){const z=[(t[0]+r[0])/2,(t[1]+r[1])/2],q=this.transformInv_(z),Q=[(i[0]+e[0])/2,(i[1]+e[1])/2],re=this.transformInv_(Q);this.addQuad_(e,t,z,Q,s,a,q,re,g-1),this.addQuad_(Q,z,r,i,re,q,o,d,g-1)}else{const z=[(e[0]+t[0])/2,(e[1]+t[1])/2],q=this.transformInv_(z),Q=[(r[0]+i[0])/2,(r[1]+i[1])/2],re=this.transformInv_(Q);this.addQuad_(e,z,Q,i,s,q,re,d,g-1),this.addQuad_(z,t,r,Q,q,a,o,re,g-1)}return}}if(O){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}U&11||this.addTriangle_(e,r,i,s,o,d),U&14||this.addTriangle_(e,r,t,s,o,a),U&&(U&13||this.addTriangle_(t,i,e,a,d,s),U&7||this.addTriangle_(t,i,r,a,d,o))}calculateSourceExtent(){const e=Hh();return this.triangles_.forEach(function(t,r,i){const s=t.source;Wv(e,s[0]),Wv(e,s[1]),Wv(e,s[2])}),e}getTriangles(){return this.triangles_}}let j4;const iy=[];function $k(n,e,t,r,i){n.beginPath(),n.moveTo(0,0),n.lineTo(e,t),n.lineTo(r,i),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(e,r)+1,Math.max(t,i)),n.restore()}function N4(n,e){return Math.abs(n[e*4]-210)>2||Math.abs(n[e*4+3]-.75*255)>2}function une(){if(j4===void 0){const n=Jl(6,6,iy);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",$k(n,4,5,4,0),$k(n,4,5,0,5);const e=n.getImageData(0,0,3,3).data;j4=N4(e,0)||N4(e,4)||N4(e,8),zC(n),iy.push(n.canvas)}return j4}function q6(n,e,t,r){const i=bx(t,e,n);let s=P6(e,r,t);const a=e.getMetersPerUnit();a!==void 0&&(s*=a);const o=n.getMetersPerUnit();o!==void 0&&(s/=o);const d=n.getExtent();if(!d||Ig(d,i)){const g=P6(n,s,i)/s;isFinite(g)&&g>0&&(s/=g)}return s}function jz(n,e,t,r){const i=Of(t);let s=q6(n,e,i,r);return(!isFinite(s)||s<=0)&&FU(t,function(a){return s=q6(n,e,a,r),isFinite(s)&&s>0}),s}function Nz(n,e,t,r,i,s,a,o,d,g,b,E,S,O){const k=Jl(Math.round(t*n),Math.round(t*e),iy);if(E||(k.imageSmoothingEnabled=!1),d.length===0)return k.canvas;k.scale(t,t);function U(Y){return Math.round(Y*t)/t}k.globalCompositeOperation="lighter";const z=Hh();d.forEach(function(Y,ee,N){nO(z,Y.extent)});let q;const Q=t/r,re=(E?1:1+Math.pow(2,-24))/Q;if(!S||d.length!==1||g!==0){if(q=Jl(Math.round(ps(z)*Q),Math.round(Hl(z)*Q),iy),E||(q.imageSmoothingEnabled=!1),i&&O){const Y=(i[0]-z[0])*Q,ee=-(i[3]-z[3])*Q,N=ps(i)*Q,ie=Hl(i)*Q;q.rect(Y,ee,N,ie),q.clip()}d.forEach(function(Y,ee,N){if(Y.image.width>0&&Y.image.height>0){if(Y.clipExtent){q.save();const fe=(Y.clipExtent[0]-z[0])*Q,xe=-(Y.clipExtent[3]-z[3])*Q,De=ps(Y.clipExtent)*Q,me=Hl(Y.clipExtent)*Q;q.rect(E?fe:Math.round(fe),E?xe:Math.round(xe),E?De:Math.round(fe+De)-Math.round(fe),E?me:Math.round(xe+me)-Math.round(xe)),q.clip()}const ie=(Y.extent[0]-z[0])*Q,he=-(Y.extent[3]-z[3])*Q,de=ps(Y.extent)*Q,Me=Hl(Y.extent)*Q;q.drawImage(Y.image,g,g,Y.image.width-2*g,Y.image.height-2*g,E?ie:Math.round(ie),E?he:Math.round(he),E?de:Math.round(ie+de)-Math.round(ie),E?Me:Math.round(he+Me)-Math.round(he)),Y.clipExtent&&q.restore()}})}const X=Ap(a);return o.getTriangles().forEach(function(Y,ee,N){const ie=Y.source,he=Y.target;let de=ie[0][0],Me=ie[0][1],fe=ie[1][0],xe=ie[1][1],De=ie[2][0],me=ie[2][1];const at=U((he[0][0]-X[0])/s),Qe=U(-(he[0][1]-X[1])/s),He=U((he[1][0]-X[0])/s),We=U(-(he[1][1]-X[1])/s),Ce=U((he[2][0]-X[0])/s),Te=U(-(he[2][1]-X[1])/s),rt=de,yt=Me;de=0,Me=0,fe-=rt,xe-=yt,De-=rt,me-=yt;const bt=[[fe,xe,0,0,He-at],[De,me,0,0,Ce-at],[0,0,fe,xe,We-Qe],[0,0,De,me,Te-Qe]],gt=_Z(bt);if(!gt)return;if(k.save(),k.beginPath(),une()||!E){k.moveTo(He,We);const Pt=4,Le=at-He,Pe=Qe-We;for(let Ee=0;Ee<Pt;Ee++)k.lineTo(He+U((Ee+1)*Le/Pt),We+U(Ee*Pe/(Pt-1))),Ee!=Pt-1&&k.lineTo(He+U((Ee+1)*Le/Pt),We+U((Ee+1)*Pe/(Pt-1)));k.lineTo(Ce,Te)}else k.moveTo(He,We),k.lineTo(at,Qe),k.lineTo(Ce,Te);k.clip(),k.transform(gt[0],gt[2],gt[1],gt[3],at,Qe),k.translate(z[0]-rt,z[3]-yt);let Dt;if(q)Dt=q.canvas,k.scale(re,-re);else{const Pt=d[0],Le=Pt.extent;Dt=Pt.image,k.scale(ps(Le)/Dt.width,-Hl(Le)/Dt.height)}k.drawImage(Dt,0,0),k.restore()}),q&&(zC(q),iy.push(q.canvas)),b&&(k.save(),k.globalCompositeOperation="source-over",k.strokeStyle="black",k.lineWidth=1,o.getTriangles().forEach(function(Y,ee,N){const ie=Y.target,he=(ie[0][0]-X[0])/s,de=-(ie[0][1]-X[1])/s,Me=(ie[1][0]-X[0])/s,fe=-(ie[1][1]-X[1])/s,xe=(ie[2][0]-X[0])/s,De=-(ie[2][1]-X[1])/s;k.beginPath(),k.moveTo(Me,fe),k.lineTo(he,de),k.lineTo(xe,De),k.closePath(),k.stroke()}),k.restore()),k.canvas}function Y6(n){return Array.isArray(n)?Math.min(...n):n}class Ane extends VB{constructor(e,t,r,i,s,a,o){let d=e.getExtent();d&&e.canWrapX()&&(d=d.slice(),d[0]=-1/0,d[2]=1/0);let g=t.getExtent();g&&t.canWrapX()&&(g=g.slice(),g[0]=-1/0,g[2]=1/0);const b=g?Qd(r,g):r,E=Of(b),S=q6(e,t,E,i),O=LO,k=new UO(e,t,b,d,S*O,i),U=k.calculateSourceExtent(),z=Lg(U)?null:a(U,S,s),q=z?hi.IDLE:hi.EMPTY,Q=z?z.getPixelRatio():1;super(r,i,Q,q),this.targetProj_=t,this.maxSourceExtent_=d,this.triangulation_=k,this.targetResolution_=i,this.targetExtent_=r,this.sourceImage_=z,this.sourcePixelRatio_=Q,this.interpolate_=o,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==hi.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const e=this.sourceImage_.getState();if(e==hi.LOADED){const t=ps(this.targetExtent_)/this.targetResolution_,r=Hl(this.targetExtent_)/this.targetResolution_;this.canvas_=Nz(t,r,this.sourcePixelRatio_,Y6(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=e,this.changed()}load(){if(this.state==hi.IDLE){this.state=hi.LOADING,this.changed();const e=this.sourceImage_.getState();e==hi.LOADED||e==hi.ERROR?this.reproject_():(this.sourceListenerKey_=Ts(this.sourceImage_,io.CHANGE,t=>{const r=this.sourceImage_.getState();(r==hi.LOADED||r==hi.ERROR)&&(this.unlistenSource_(),this.reproject_())}),this.sourceImage_.load())}}unlistenSource_(){Ka(this.sourceListenerKey_),this.sourceListenerKey_=null}}const J_=4,W4={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class cne extends hp{constructor(e,t){super(e),this.image=t}}class Wz extends Dy{constructor(e){super({attributions:e.attributions,projection:e.projection,state:e.state,interpolate:e.interpolate!==void 0?e.interpolate:!0}),this.on,this.once,this.un,this.loader=e.loader||null,this.resolutions_=e.resolutions!==void 0?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=e.loader?e.loader.length===0:!1,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(e){this.resolutions_=e}findNearestResolution(e){const t=this.getResolutions();if(t){const r=Ax(t,e,0);e=t[r]}return e}getImage(e,t,r,i){const s=this.getProjection();if(!s||!i||Mg(s,i))return s&&(i=s),this.getImageInternal(e,t,r,i);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Mg(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==t&&Gm(this.reprojectedImage_.getExtent(),e))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Ane(s,i,e,t,r,(a,o,d)=>this.getImageInternal(a,o,d,s),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(e,t,r,i){if(this.loader){const s=dne(e,t,r,1),a=this.findNearestResolution(t);if(this.image&&(this.static_||this.wantedProjection_===i&&(this.wantedExtent_&&lp(this.wantedExtent_,s)||lp(this.image.getExtent(),s))&&(this.wantedResolution_&&Y6(this.wantedResolution_)===a||Y6(this.image.getResolution())===a)))return this.image;this.wantedProjection_=i,this.wantedExtent_=s,this.wantedResolution_=a,this.image=new VB(s,a,r,this.loader),this.image.addEventListener(io.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(e){const t=e.target;let r;switch(t.getState()){case hi.LOADING:this.loading=!0,r=W4.IMAGELOADSTART;break;case hi.LOADED:this.loading=!1,r=W4.IMAGELOADEND;break;case hi.ERROR:this.loading=!1,r=W4.IMAGELOADERROR;break;default:return}this.hasListener(r)&&this.dispatchEvent(new cne(r,t))}}function dne(n,e,t,r){const i=e/t,s=Of(n),a=C0(ps(n)/i,J_),o=C0(Hl(n)/i,J_),d=C0((r-1)*a/2,J_),g=a+2*d,b=C0((r-1)*o/2,J_),E=o+2*b;return i2(s,i,0,[g,E])}const w0={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class hne extends Ry{constructor(e){e=e||{};const t=Object.assign({},e),r=e.cacheSize;delete e.cacheSize,delete t.preload,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.cacheSize_=r,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(w0.PRELOAD)}setPreload(e){this.set(w0.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(w0.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(w0.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}function y2(n){return n instanceof Image||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof ImageBitmap?n:null}function fne(n){return n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Float32Array||n instanceof DataView?n:null}const pne=new Error("disposed");let h1=null;function mne(n){h1||(h1=Jl(n.width,n.height,void 0,{willReadFrequently:!0}));const e=h1.canvas,t=n.width;e.width!==t&&(e.width=t);const r=n.height;return e.height!==r&&(e.height=r),h1.clearRect(0,0,t,r),h1.drawImage(n,0,0),h1.getImageData(0,0,t,r).data}const gne=[256,256];class $6 extends VC{constructor(e){const t=xr.IDLE;super(e.tileCoord,t,{transition:e.transition,interpolate:e.interpolate}),this.loader_=e.loader,this.data_=null,this.error_=null,this.size_=e.size||null,this.controller_=e.controller||null}getSize(){if(this.size_)return this.size_;const e=y2(this.data_);return e?[e.width,e.height]:gne}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==xr.IDLE&&this.state!==xr.ERROR)return;this.state=xr.LOADING,this.changed();const e=this;this.loader_().then(function(t){e.data_=t,e.state=xr.LOADED,e.changed()}).catch(function(t){e.error_=t,e.state=xr.ERROR,e.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(pne),this.controller_=null),super.disposeInternal()}}function Ix(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function V6(n,e,t,r,i,s,a){a=a??Ix();const o=1/(n-e),d=1/(t-r),g=1/(i-s);return a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*g,a[11]=0,a[12]=(n+e)*o,a[13]=(r+t)*d,a[14]=(s+i)*g,a[15]=1,a}function Vk(n,e,t,r,i){return i=i??Ix(),i[0]=n[0]*e,i[1]=n[1]*e,i[2]=n[2]*e,i[3]=n[3]*e,i[4]=n[4]*t,i[5]=n[5]*t,i[6]=n[6]*t,i[7]=n[7]*t,i[8]=n[8]*r,i[9]=n[9]*r,i[10]=n[10]*r,i[11]=n[11]*r,i[12]=n[12],i[13]=n[13],i[14]=n[14],i[15]=n[15],i}function yne(n,e,t,r,i){i=i??Ix();let s,a,o,d,g,b,E,S,O,k,U,z;return n===i?(i[12]=n[0]*e+n[4]*t+n[8]*r+n[12],i[13]=n[1]*e+n[5]*t+n[9]*r+n[13],i[14]=n[2]*e+n[6]*t+n[10]*r+n[14],i[15]=n[3]*e+n[7]*t+n[11]*r+n[15]):(s=n[0],a=n[1],o=n[2],d=n[3],g=n[4],b=n[5],E=n[6],S=n[7],O=n[8],k=n[9],U=n[10],z=n[11],i[0]=s,i[1]=a,i[2]=o,i[3]=d,i[4]=g,i[5]=b,i[6]=E,i[7]=S,i[8]=O,i[9]=k,i[10]=U,i[11]=z,i[12]=s*e+g*t+O*r+n[12],i[13]=a*e+b*t+k*r+n[13],i[14]=o*e+E*t+U*r+n[14],i[15]=d*e+S*t+z*r+n[15]),i}function vne(n,e,t,r){return r=r??Ix(),r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=n,r[13]=e,r[14]=t,r[15]=1,r}const Cne=`
|
||
attribute vec4 a_position;
|
||
attribute vec4 a_texcoord;
|
||
|
||
uniform mat4 u_matrix;
|
||
uniform mat4 u_textureMatrix;
|
||
|
||
varying vec2 v_texcoord;
|
||
|
||
void main() {
|
||
gl_Position = u_matrix * a_position;
|
||
vec2 texcoord = (u_textureMatrix * a_texcoord).xy;
|
||
v_texcoord = texcoord;
|
||
}
|
||
`,_ne=`
|
||
precision mediump float;
|
||
|
||
varying vec2 v_texcoord;
|
||
|
||
uniform sampler2D u_texture;
|
||
|
||
void main() {
|
||
if (
|
||
v_texcoord.x < 0.0 ||
|
||
v_texcoord.y < 0.0 ||
|
||
v_texcoord.x > 1.0 ||
|
||
v_texcoord.y > 1.0
|
||
) {
|
||
discard;
|
||
}
|
||
gl_FragColor = texture2D(u_texture, v_texcoord);
|
||
}
|
||
`;class bne{constructor(e){this.gl_=e,this.program_=H6(e,_ne,Cne),this.positionLocation=e.getAttribLocation(this.program_,"a_position"),this.texcoordLocation=e.getAttribLocation(this.program_,"a_texcoord"),this.matrixLocation=e.getUniformLocation(this.program_,"u_matrix"),this.textureMatrixLocation=e.getUniformLocation(this.program_,"u_textureMatrix"),this.textureLocation=e.getUniformLocation(this.program_,"u_texture"),this.positionBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.positionBuffer),this.positions=[0,0,0,1,1,0,1,0,0,1,1,1],e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.positions),e.STATIC_DRAW),this.texcoordBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.texcoordBuffer),this.texcoords=[0,0,0,1,1,0,1,0,0,1,1,1],e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.texcoords),e.STATIC_DRAW)}drawImage(e,t,r,i,s,a,o,d,g,b,E,S,O){const k=this.gl_;d===void 0&&(d=i),g===void 0&&(g=s),a===void 0&&(a=t),o===void 0&&(o=r),b===void 0&&(b=a),E===void 0&&(E=o),S===void 0&&(S=k.canvas.width),O===void 0&&(O=k.canvas.height),k.bindTexture(k.TEXTURE_2D,e),k.useProgram(this.program_),k.bindBuffer(k.ARRAY_BUFFER,this.positionBuffer),k.enableVertexAttribArray(this.positionLocation),k.vertexAttribPointer(this.positionLocation,2,k.FLOAT,!1,0,0),k.bindBuffer(k.ARRAY_BUFFER,this.texcoordBuffer),k.enableVertexAttribArray(this.texcoordLocation),k.vertexAttribPointer(this.texcoordLocation,2,k.FLOAT,!1,0,0);let U=V6(0,S,0,O,-1,1);U=yne(U,d,g,0),U=Vk(U,b,E,1),k.uniformMatrix4fv(this.matrixLocation,!1,U);let z=vne(i/t,s/r,0);z=Vk(z,a/t,o/r,1),k.uniformMatrix4fv(this.textureMatrixLocation,!1,z),k.uniform1i(this.textureLocation,0),k.drawArrays(k.TRIANGLES,0,this.positions.length/2)}}function Hk(n,e,t){const r=n.createShader(e);if(r===null)throw new Error("Shader compilation failed");if(n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS)){const i=n.getShaderInfoLog(r);throw i===null?new Error("Shader info log creation failed"):new Error(i)}return r}function H6(n,e,t){const r=n.createProgram(),i=Hk(n,n.VERTEX_SHADER,t),s=Hk(n,n.FRAGMENT_SHADER,e);if(r===null)throw new Error("Program creation failed");if(n.attachShader(r,i),n.attachShader(r,s),n.linkProgram(r),!n.getProgramParameter(r,n.LINK_STATUS))throw n.getProgramInfoLog(r)===null?new Error("Program info log creation failed"):new Error;return r}const xne=`
|
||
attribute vec4 a_position;
|
||
|
||
uniform mat4 u_matrix;
|
||
|
||
void main() {
|
||
gl_Position = u_matrix * a_position;
|
||
}
|
||
`,wne=`
|
||
precision mediump float;
|
||
|
||
uniform vec4 u_val;
|
||
void main() {
|
||
gl_FragColor = u_val;
|
||
}
|
||
`,Mne=`
|
||
attribute vec4 a_position;
|
||
attribute vec2 a_texcoord;
|
||
|
||
varying vec2 v_texcoord;
|
||
|
||
uniform mat4 u_matrix;
|
||
|
||
void main() {
|
||
gl_Position = u_matrix * a_position;
|
||
v_texcoord = a_texcoord;
|
||
}
|
||
`,Sne=`
|
||
precision mediump float;
|
||
|
||
varying vec2 v_texcoord;
|
||
|
||
uniform sampler2D u_texture;
|
||
|
||
void main() {
|
||
if (v_texcoord.x < 0.0 || v_texcoord.x > 1.0 || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) {
|
||
discard;
|
||
}
|
||
gl_FragColor = texture2D(u_texture, v_texcoord);
|
||
}
|
||
`;function Ene(n,e,t,r){let i;return t.length?i=t.shift():$B?i=new OffscreenCanvas(n||300,e||300):i=document.createElement("canvas"),n&&(i.width=n),e&&(i.height=e),i.getContext("webgl",r)}function Bne(n){const e=n.canvas;e.width=1,e.height=1,n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT|n.STENCIL_BUFFER_BIT)}const Zk=[];function One(n,e,t,r,i,s,a,o,d,g,b,E,S,O){const k=Math.round(r*e),U=Math.round(r*t);n.canvas.width=k,n.canvas.height=U;let z,q;if(q=n.createTexture(),n.bindTexture(n.TEXTURE_2D,q),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),S?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST)),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,k,U,0,n.RGBA,b,null),z=n.createFramebuffer(),n.bindFramebuffer(n.FRAMEBUFFER,z),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,q,0),z===null)throw new Error("Could not create framebuffer");if(q===null)throw new Error("Could not create texture");if(d.length===0)return{width:k,height:U,framebuffer:z,texture:q};const Q=Hh();d.forEach(function(de,Me,fe){nO(Q,de.extent)});let re,X,Y;const ee=1/i;{if(re=n.createTexture(),q===null)throw new Error("Could not create texture");X=Math.round(ps(Q)*ee),Y=Math.round(Hl(Q)*ee);const de=n.getParameter(n.MAX_TEXTURE_SIZE),Me=Math.max(X,Y),fe=Me>de?de/Me:1,xe=Math.round(X*fe),De=Math.round(Y*fe);n.bindTexture(n.TEXTURE_2D,re),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),S?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST)),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,xe,De,0,n.RGBA,b,null);const me=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,me),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,re,0);const at=new bne(n);d.forEach(function(Qe,He,We){const Ce=(Qe.extent[0]-Q[0])*ee*fe,Te=-(Qe.extent[3]-Q[3])*ee*fe,rt=ps(Qe.extent)*ee*fe,yt=Hl(Qe.extent)*ee*fe;if(n.bindFramebuffer(n.FRAMEBUFFER,me),n.viewport(0,0,xe,De),Qe.clipExtent){const bt=(Qe.clipExtent[0]-Q[0])*ee*fe,gt=-(Qe.clipExtent[3]-Q[3])*ee*fe,Dt=ps(Qe.clipExtent)*ee*fe,Pt=Hl(Qe.clipExtent)*ee*fe;n.enable(n.SCISSOR_TEST),n.scissor(S?bt:Math.round(bt),S?gt:Math.round(gt),S?Dt:Math.round(bt+Dt)-Math.round(bt),S?Pt:Math.round(gt+Pt)-Math.round(gt))}at.drawImage(Qe.texture,Qe.width,Qe.height,g,g,Qe.width-2*g,Qe.height-2*g,S?Ce:Math.round(Ce),S?Te:Math.round(Te),S?rt:Math.round(Ce+rt)-Math.round(Ce),S?yt:Math.round(Te+yt)-Math.round(Te),xe,De),n.disable(n.SCISSOR_TEST)}),n.deleteFramebuffer(me)}const N=Ap(a),ie=Ap(Q),he=de=>{const Me=(de[0][0]-N[0])/s*r,fe=-(de[0][1]-N[1])/s*r,xe=(de[1][0]-N[0])/s*r,De=-(de[1][1]-N[1])/s*r,me=(de[2][0]-N[0])/s*r,at=-(de[2][1]-N[1])/s*r;return{u1:xe,v1:De,u0:Me,v0:fe,u2:me,v2:at}};n.bindFramebuffer(n.FRAMEBUFFER,z),n.viewport(0,0,k,U);{const de=[],Me=[],fe=H6(n,Sne,Mne);n.useProgram(fe);const xe=n.getUniformLocation(fe,"u_texture");n.bindTexture(n.TEXTURE_2D,re),n.uniform1i(xe,0),o.getTriangles().forEach(function(Ce,Te,rt){const yt=Ce.source,bt=Ce.target,{u1:gt,v1:Dt,u0:Pt,v0:Le,u2:Pe,v2:Ee}=he(bt),nt=(yt[0][0]-ie[0])/i/X,_t=-(yt[0][1]-ie[1])/i/Y,ht=(yt[1][0]-ie[0])/i/X,Ut=-(yt[1][1]-ie[1])/i/Y,en=(yt[2][0]-ie[0])/i/X,Ft=-(yt[2][1]-ie[1])/i/Y;de.push(gt,Dt,Pt,Le,Pe,Ee),Me.push(ht,Ut,nt,_t,en,Ft)});const De=V6(0,k,U,0,-1,1),me=n.getUniformLocation(fe,"u_matrix");n.uniformMatrix4fv(me,!1,De);const at=n.getAttribLocation(fe,"a_position"),Qe=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,Qe),n.bufferData(n.ARRAY_BUFFER,new Float32Array(de),n.STATIC_DRAW),n.vertexAttribPointer(at,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(at);const He=n.getAttribLocation(fe,"a_texcoord"),We=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,We),n.bufferData(n.ARRAY_BUFFER,new Float32Array(Me),n.STATIC_DRAW),n.vertexAttribPointer(He,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(He),n.drawArrays(n.TRIANGLES,0,de.length/2)}if(E){const de=H6(n,wne,xne);n.useProgram(de);const Me=V6(0,k,U,0,-1,1),fe=n.getUniformLocation(de,"u_matrix");n.uniformMatrix4fv(fe,!1,Me);const xe=Array.isArray(E)?E:[0,0,0,255],De=n.getUniformLocation(de,"u_val");n.uniform4fv(De,xe);const me=n.getAttribLocation(de,"a_position"),at=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,at),n.vertexAttribPointer(me,2,n.FLOAT,!1,0,0),n.enableVertexAttribArray(me);const Qe=o.getTriangles().reduce(function(He,We){const Ce=We.target,{u1:Te,v1:rt,u0:yt,v0:bt,u2:gt,v2:Dt}=he(Ce);return He.concat([Te,rt,yt,bt,yt,bt,gt,Dt,gt,Dt,Te,rt])},[]);n.bufferData(n.ARRAY_BUFFER,new Float32Array(Qe),n.STATIC_DRAW),n.drawArrays(n.LINES,0,Qe.length/2)}return{width:k,height:U,framebuffer:z,texture:q}}class Ine extends $6{constructor(e){super({tileCoord:e.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:e.interpolate,transition:e.transition}),this.renderEdges_=e.renderEdges!==void 0?e.renderEdges:!1,this.pixelRatio_=e.pixelRatio,this.gutter_=e.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=e.sourceTileGrid,this.targetTileGrid_=e.targetTileGrid,this.wrappedTileCoord_=e.wrappedTileCoord||e.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const t=e.sourceProj,r=t.getExtent(),i=e.sourceTileGrid.getExtent();this.clipExtent_=t.canWrapX()?i?Qd(r,i):r:i;const s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),a=this.targetTileGrid_.getExtent();let o=this.sourceTileGrid_.getExtent();const d=a?Qd(s,a):s;if(cC(d)===0){this.state=xr.EMPTY;return}r&&(o?o=Qd(o,r):o=r);const g=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),b=e.targetProj,E=jz(t,b,d,g);if(!isFinite(E)||E<=0){this.state=xr.EMPTY;return}const S=e.errorThreshold!==void 0?e.errorThreshold:LO;if(this.triangulation_=new UO(t,b,d,o,E*S,g,e.transformMatrix),this.triangulation_.getTriangles().length===0){this.state=xr.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(E);let O=this.triangulation_.calculateSourceExtent();if(o&&(t.canWrapX()?(O[1]=Tu(O[1],o[1],o[3]),O[3]=Tu(O[3],o[1],o[3])):O=Qd(O,o)),!cC(O))this.state=xr.EMPTY;else{let k=0,U=0;t.canWrapX()&&(k=ps(r),U=Math.floor((O[0]-r[0])/k)),rO(O.slice(),t,!0).forEach(q=>{const Q=this.sourceTileGrid_.getTileRangeForExtentAndZ(q,this.sourceZ_),re=e.getTileFunction;for(let X=Q.minX;X<=Q.maxX;X++)for(let Y=Q.minY;Y<=Q.maxY;Y++){const ee=re(this.sourceZ_,X,Y,this.pixelRatio_);if(ee){const N=U*k;this.sourceTiles_.push({tile:ee,offset:N})}}++U}),this.sourceTiles_.length===0&&(this.state=xr.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const e=[];let t=!1;if(this.sourceTiles_.forEach(X=>{var Te;const Y=X.tile;if(!Y||Y.getState()!==xr.LOADED)return;const ee=Y.getSize(),N=this.gutter_;let ie;const he=fne(Y.getData());he?ie=he:(t=!0,ie=mne(y2(Y.getData())));const de=[ee[0]+2*N,ee[1]+2*N],Me=ie instanceof Float32Array,fe=de[0]*de[1],xe=Me?Float32Array:Uint8ClampedArray,De=new xe(ie.buffer),me=xe.BYTES_PER_ELEMENT,at=me*De.length/fe,Qe=De.byteLength/de[1],He=Math.floor(Qe/me/de[0]),We=this.sourceTileGrid_.getTileCoordExtent(Y.tileCoord);We[0]+=X.offset,We[2]+=X.offset;const Ce=(Te=this.clipExtent_)==null?void 0:Te.slice();Ce&&(Ce[0]+=X.offset,Ce[2]+=X.offset),e.push({extent:We,clipExtent:Ce,data:De,dataType:xe,bytesPerPixel:at,pixelSize:de,bandCount:He})}),this.sourceTiles_.length=0,e.length===0){this.state=xr.ERROR,this.changed();return}const r=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(r),s=typeof i=="number"?i:i[0],a=typeof i=="number"?i:i[1],o=s*this.pixelRatio_,d=a*this.pixelRatio_,g=this.targetTileGrid_.getResolution(r),b=this.sourceTileGrid_.getResolution(this.sourceZ_),E=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),S=e[0].bandCount,O=new e[0].dataType(S*o*d),k=Ene(o,d,Zk,{premultipliedAlpha:!1,antialias:!1});let U;const z=k.RGBA;let q;e[0].dataType==Float32Array?(q=k.FLOAT,k.getExtension("WEBGL_color_buffer_float"),k.getExtension("OES_texture_float"),k.getExtension("EXT_float_blend"),U=k.getExtension("OES_texture_float_linear")!==null&&this.interpolate):(q=k.UNSIGNED_BYTE,U=this.interpolate);const Q=4,re=Math.ceil(S/Q);for(let X=re-1;X>=0;--X){const Y=[];for(let xe=0,De=e.length;xe<De;++xe){const me=e[xe],at=me.pixelSize,Qe=at[0],He=at[1],We=new me.dataType(Q*Qe*He),Ce=me.data;let Te=X*Q;for(let yt=0,bt=We.length;yt<bt;yt+=Q)We[yt]=Ce[Te],We[yt+1]=Ce[Te+1],We[yt+2]=Ce[Te+2],We[yt+3]=Ce[Te+3],Te+=S;const rt=k.createTexture();k.bindTexture(k.TEXTURE_2D,rt),U?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.LINEAR)):(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST)),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE),k.texImage2D(k.TEXTURE_2D,0,z,Qe,He,0,z,q,We),Y.push({extent:me.extent,clipExtent:me.clipExtent,texture:rt,width:Qe,height:He})}const{framebuffer:ee,width:N,height:ie}=One(k,s,a,this.pixelRatio_,b,g,E,this.triangulation_,Y,this.gutter_,q,this.renderEdges_,U),he=N,de=ie*Q,Me=new e[0].dataType(he*de);k.bindFramebuffer(k.FRAMEBUFFER,ee),k.readPixels(0,0,N,ie,k.RGBA,q,Me);let fe=X*Q;for(let xe=0,De=Me.length;xe<De;xe+=Q){const me=(he-1-(xe/de|0))*de+xe%de;O[fe]=Me[me],O[fe+1]=Me[me+1],O[fe+2]=Me[me+2],O[fe+3]=Me[me+3],fe+=S}}if(Bne(k),Zk.push(k.canvas),t){const X=Jl(s,a),Y=new ImageData(O,s);X.putImageData(Y,0,0),this.reprojData_=X.canvas}else this.reprojData_=O;this.reprojSize_=[Math.round(o),Math.round(d)],this.state=xr.LOADED,this.changed()}load(){if(this.state!==xr.IDLE&&this.state!==xr.ERROR)return;this.state=xr.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:t})=>{const r=t.getState();if(r!==xr.IDLE&&r!==xr.LOADING)return;e++;const i=Ts(t,io.CHANGE,()=>{const s=t.getState();(s==xr.LOADED||s==xr.ERROR||s==xr.EMPTY)&&(Ka(i),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t}){t.getState()==xr.IDLE&&t.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ka),this.sourcesListenerKeys_=null}}class Z6 extends VC{constructor(e,t,r,i,s,a,o,d,g,b,E,S){super(s,xr.IDLE,S),this.renderEdges_=E!==void 0?E:!1,this.pixelRatio_=o,this.gutter_=d,this.canvas_=null,this.sourceTileGrid_=t,this.targetTileGrid_=i,this.wrappedTileCoord_=a||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=e.canWrapX()?e.getExtent():void 0;const O=i.getTileCoordExtent(this.wrappedTileCoord_),k=this.targetTileGrid_.getExtent();let U=this.sourceTileGrid_.getExtent();const z=k?Qd(O,k):O;if(cC(z)===0){this.state=xr.EMPTY;return}const q=e.getExtent();q&&(U?U=Qd(U,q):U=q);const Q=i.getResolution(this.wrappedTileCoord_[0]),re=jz(e,r,z,Q);if(!isFinite(re)||re<=0){this.state=xr.EMPTY;return}const X=b!==void 0?b:LO;if(this.triangulation_=new UO(e,r,z,U,re*X,Q),this.triangulation_.getTriangles().length===0){this.state=xr.EMPTY;return}this.sourceZ_=t.getZForResolution(re);let Y=this.triangulation_.calculateSourceExtent();if(U&&(e.canWrapX()?(Y[1]=Tu(Y[1],U[1],U[3]),Y[3]=Tu(Y[3],U[1],U[3])):Y=Qd(Y,U)),!cC(Y))this.state=xr.EMPTY;else{let ee=0,N=0;e.canWrapX()&&(ee=ps(q),N=Math.floor((Y[0]-q[0])/ee)),rO(Y.slice(),e,!0).forEach(he=>{const de=t.getTileRangeForExtentAndZ(he,this.sourceZ_);for(let Me=de.minX;Me<=de.maxX;Me++)for(let fe=de.minY;fe<=de.maxY;fe++){const xe=g(this.sourceZ_,Me,fe,o);if(xe){const De=N*ee;this.sourceTiles_.push({tile:xe,offset:De})}}++N}),this.sourceTiles_.length===0&&(this.state=xr.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(t=>{var i;const r=t.tile;if(r&&r.getState()==xr.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(r.tileCoord);s[0]+=t.offset,s[2]+=t.offset;const a=(i=this.clipExtent_)==null?void 0:i.slice();a&&(a[0]+=t.offset,a[2]+=t.offset),e.push({extent:s,clipExtent:a,image:r.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=xr.ERROR;else{const t=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(t),i=typeof r=="number"?r:r[0],s=typeof r=="number"?r:r[1],a=this.targetTileGrid_.getResolution(t),o=this.sourceTileGrid_.getResolution(this.sourceZ_),d=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Nz(i,s,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),a,d,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=xr.LOADED}this.changed()}load(){if(this.state==xr.IDLE){this.state=xr.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:t})=>{const r=t.getState();if(r==xr.IDLE||r==xr.LOADING){e++;const i=Ts(t,io.CHANGE,s=>{const a=t.getState();(a==xr.LOADED||a==xr.ERROR||a==xr.EMPTY)&&(Ka(i),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t},r,i){t.getState()==xr.IDLE&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Ka),this.sourcesListenerKeys_=null}release(){this.canvas_&&(zC(this.canvas_.getContext("2d")),iy.push(this.canvas_),this.canvas_=null),super.release()}}function G4(n,e,t,r){return`${n},${fte(e,t,r)}`}function Q4(n,e,t){if(!(t in n))return n[t]=new Set([e]),!0;const r=n[t],i=r.has(e);return i||r.add(e),!i}function kne(n,e,t){const r=n[t];return r?r.delete(e):!1}function Xk(n,e){const t=n.layerStatesArray[n.layerIndex];t.extent&&(e=Qd(e,Yp(t.extent,n.viewState.projection)));const r=t.layer.getRenderSource();if(!r.getWrapX()){const i=r.getTileGridForProjection(n.viewState.projection).getExtent();i&&(e=Qd(e,i))}return e}class Gz extends OO{constructor(e,t){super(e),t=t||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Hh(),this.tempTileRange_=new DO(0,0,0,0),this.tempTileCoord_=g2(0,0,0);const r=t.cacheSize!==void 0?t.cacheSize:512;this.tileCache_=new hte(r),this.maxStaleKeys=r*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,t,r,i){const s=this.tileCache_,o=this.getLayer().getSource(),d=G4(o.getKey(),e,t,r);let g;if(s.containsKey(d))g=s.get(d);else{if(g=o.getTile(e,t,r,i.pixelRatio,i.viewState.projection),!g)return null;s.set(d,g)}return g}getTile(e,t,r,i){const s=this.getOrCreateTile(e,t,r,i);return s||null}getData(e){const t=this.frameState;if(!t)return null;const r=this.getLayer(),i=yA(t.pixelToCoordinateTransform,e.slice()),s=r.getExtent();if(s&&!Ig(s,i))return null;const a=t.viewState,o=r.getRenderSource(),d=o.getTileGridForProjection(a.projection),g=o.getTilePixelRatio(t.pixelRatio);for(let b=d.getZForResolution(a.resolution);b>=d.getMinZoom();--b){const E=d.getTileCoordForCoordAndZ(i,b),S=this.getTile(b,E[1],E[2],t);if(!S||S.getState()!==xr.LOADED)continue;const O=d.getOrigin(b),k=ad(d.getTileSize(b)),U=d.getResolution(b);let z;if(S instanceof Oz||S instanceof Z6)z=S.getImage();else if(S instanceof $6){if(z=y2(S.getData()),!z)continue}else continue;const q=Math.floor(g*((i[0]-O[0])/U-E[1]*k[0])),Q=Math.floor(g*((O[1]-i[1])/U-E[2]*k[1])),re=Math.round(g*o.getGutterForProjection(a.projection));return this.getImageData(z,q+re,Q+re)}return null}prepareFrame(e){this.renderedProjection?e.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=e.viewState.projection):this.renderedProjection=e.viewState.projection;const t=this.getLayer().getSource();if(!t)return!1;const r=t.getRevision();return this.renderedRevision_?this.renderedRevision_!==r&&(this.renderedRevision_=r,this.renderedSourceKey_===t.getKey()&&this.tileCache_.clear()):this.renderedRevision_=r,!0}enqueueTiles(e,t,r,i,s){const a=e.viewState,o=this.getLayer(),d=o.getRenderSource(),g=d.getTileGridForProjection(a.projection),b=Lo(d);b in e.wantedTiles||(e.wantedTiles[b]={});const E=e.wantedTiles[b],S=o.getMapInternal(),O=Math.max(r-s,g.getMinZoom(),g.getZForResolution(Math.min(o.getMaxResolution(),S?S.getView().getResolutionForZoom(Math.max(o.getMinZoom(),0)):g.getResolution(0)),d.zDirection));for(let k=r;k>=O;--k){const U=g.getTileRangeForExtentAndZ(t,k,this.tempTileRange_),z=g.getResolution(k);for(let q=U.minX;q<=U.maxX;++q)for(let Q=U.minY;Q<=U.maxY;++Q){const re=this.getTile(k,q,Q,e);if(!re||!Q4(i,re,k))continue;const Y=re.getKey();if(E[Y]=!0,re.getState()===xr.IDLE&&!e.tileQueue.isKeyQueued(Y)){const ee=g2(k,q,Q,this.tempTileCoord_);e.tileQueue.enqueue([re,b,g.getTileCoordCenter(ee),z])}}}}findStaleTile_(e,t){const r=this.tileCache_,i=e[0],s=e[1],a=e[2],o=this.getStaleKeys();for(let d=0;d<o.length;++d){const g=G4(o[d],i,s,a);if(r.containsKey(g)){const b=r.get(g);if(b.getState()===xr.LOADED)return b.endTransition(Lo(this)),Q4(t,b,i),!0}}return!1}findAltTiles_(e,t,r,i){const s=e.getTileRangeForTileCoordAndZ(t,r,this.tempTileRange_);if(!s)return!1;let a=!0;const o=this.tileCache_,g=this.getLayer().getRenderSource().getKey();for(let b=s.minX;b<=s.maxX;++b)for(let E=s.minY;E<=s.maxY;++E){const S=G4(g,r,b,E);let O=!1;if(o.containsKey(S)){const k=o.get(S);k.getState()===xr.LOADED&&(Q4(i,k,r),O=!0)}O||(a=!1)}return a}renderFrame(e,t){let r=!0;this.renderComplete=!0;const i=e.layerStatesArray[e.layerIndex],s=e.viewState,a=s.projection,o=s.resolution,d=s.center,g=e.pixelRatio,b=this.getLayer(),E=b.getSource(),S=E.getRevision(),O=E.getTileGridForProjection(a),k=O.getZForResolution(o,E.zDirection),U=O.getResolution(k),z=E.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==z&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=z):this.renderedSourceKey_=z;let q=e.extent;const Q=E.getTilePixelRatio(g);this.prepareContainer(e,t);const re=this.context.canvas.width,X=this.context.canvas.height,Y=i.extent&&Yp(i.extent);Y&&(q=Qd(q,Yp(i.extent)));const ee=U*re/2/Q,N=U*X/2/Q,ie=[d[0]-ee,d[1]-N,d[0]+ee,d[1]+N],he={};this.renderedTiles.length=0;const de=b.getPreload();if(e.nextExtent){const Ce=O.getZForResolution(s.nextResolution,E.zDirection),Te=Xk(e,e.nextExtent);this.enqueueTiles(e,Te,Ce,he,de)}const Me=Xk(e,q);if(this.enqueueTiles(e,Me,k,he,0),de>0&&setTimeout(()=>{this.enqueueTiles(e,Me,k-1,he,de-1)},0),!(k in he))return this.container;const fe=Lo(this),xe=e.time;for(const Ce of he[k]){const Te=Ce.getState();if((Ce instanceof Z6||Ce instanceof Ine)&&Te===xr.EMPTY)continue;const rt=Ce.tileCoord;if(Te===xr.LOADED&&Ce.getAlpha(fe,xe)===1){Ce.endTransition(fe);continue}if(Te!==xr.IDLE&&(r=!1),Te!==xr.ERROR&&(this.renderComplete=!1),this.findStaleTile_(rt,he)){kne(he,Ce,k),e.animate=!0;continue}if(this.findAltTiles_(O,rt,k+1,he))continue;const gt=O.getMinZoom();for(let Dt=k-1;Dt>=gt&&!this.findAltTiles_(O,rt,Dt,he);--Dt);}const De=U/o*g/Q,me=this.getRenderContext(e);em(this.tempTransform,re/2,X/2,De,De,0,-re/2,-X/2),i.extent&&this.clipUnrotated(me,e,Y),E.getInterpolate()||(me.imageSmoothingEnabled=!1),this.preRender(me,e);const at=Object.keys(he).map(Number);at.sort(Lm);let Qe;const He=[],We=[];for(let Ce=at.length-1;Ce>=0;--Ce){const Te=at[Ce],rt=E.getTilePixelSize(Te,g,a),bt=O.getResolution(Te)/U,gt=rt[0]*bt*De,Dt=rt[1]*bt*De,Pt=O.getTileCoordForCoordAndZ(Ap(ie),Te),Le=O.getTileCoordExtent(Pt),Pe=yA(this.tempTransform,[Q*(Le[0]-ie[0])/U,Q*(ie[3]-Le[3])/U]),Ee=Q*E.getGutterForProjection(a);for(const nt of he[Te]){if(nt.getState()!==xr.LOADED)continue;const _t=nt.tileCoord,ht=Pt[1]-_t[1],Ut=Math.round(Pe[0]-(ht-1)*gt),en=Pt[2]-_t[2],Ft=Math.round(Pe[1]-(en-1)*Dt),mn=Math.round(Pe[0]-ht*gt),jn=Math.round(Pe[1]-en*Dt),nn=Ut-mn,ir=Ft-jn,Dn=at.length===1;let fn=!1;Qe=[mn,jn,mn+nn,jn,mn+nn,jn+ir,mn,jn+ir];for(let Hn=0,wr=He.length;Hn<wr;++Hn)if(!Dn&&Te<We[Hn]){const Qn=He[Hn];ku([mn,jn,mn+nn,jn+ir],[Qn[0],Qn[3],Qn[4],Qn[7]])&&(fn||(me.save(),fn=!0),me.beginPath(),me.moveTo(Qe[0],Qe[1]),me.lineTo(Qe[2],Qe[3]),me.lineTo(Qe[4],Qe[5]),me.lineTo(Qe[6],Qe[7]),me.moveTo(Qn[6],Qn[7]),me.lineTo(Qn[4],Qn[5]),me.lineTo(Qn[2],Qn[3]),me.lineTo(Qn[0],Qn[1]),me.clip())}He.push(Qe),We.push(Te),this.drawTile(nt,e,mn,jn,nn,ir,Ee,Dn),fn&&me.restore(),this.renderedTiles.unshift(nt),this.updateUsedTiles(e.usedTiles,E,nt)}}if(this.renderedRevision=S,this.renderedResolution=U,this.extentChanged=!this.renderedExtent_||!Gm(this.renderedExtent_,ie),this.renderedExtent_=ie,this.renderedPixelRatio=g,this.postRender(this.context,e),i.extent&&me.restore(),me.imageSmoothingEnabled=!0,this.renderComplete){const Ce=(Te,rt)=>{const yt=Lo(E),bt=rt.wantedTiles[yt],gt=bt?Object.keys(bt).length:0;this.updateCacheSize(gt),this.tileCache_.expireCache()};e.postRenderFunctions.push(Ce)}return!this.renderComplete&&!r&&(e.animate=!0),this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,t,r,i,s,a,o,d){let g;if(e instanceof $6){if(g=y2(e.getData()),!g)throw new Error("Rendering array data is not yet supported")}else g=this.getTileImage(e);if(!g)return;const b=this.getRenderContext(t),E=Lo(this),S=t.layerStatesArray[t.layerIndex],O=S.opacity*(d?e.getAlpha(E,t.time):1),k=O!==b.globalAlpha;k&&(b.save(),b.globalAlpha=O),b.drawImage(g,o,o,g.width-2*o,g.height-2*o,r,i,s,a),k&&b.restore(),O!==S.opacity?t.animate=!0:d&&e.endTransition(E)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,t,r){const i=Lo(t);i in e||(e[i]={}),e[i][r.getKey()]=!0}}class Qz extends hne{constructor(e){super(e)}createRenderer(){return new Gz(this,{cacheSize:this.getCacheSize()})}}const f1=[0,0,0],h0=5;class kx{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,ra(gZ(this.resolutions_,(i,s)=>s-i),"`resolutions` must be sorted in descending order");let t;if(!e.origins){for(let i=0,s=this.resolutions_.length-1;i<s;++i)if(!t)t=this.resolutions_[i]/this.resolutions_[i+1];else if(this.resolutions_[i]/this.resolutions_[i+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,ra(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const r=e.extent;r!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ap(r)),ra(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,ra(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:CO,ra(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=r!==void 0?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map((i,s)=>{const a=new DO(Math.min(0,i[0]),Math.max(i[0]-1,-1),Math.min(0,i[1]),Math.max(i[1]-1,-1));if(r){const o=this.getTileRangeForExtentAndZ(r,s);a.minX=Math.max(o.minX,a.minX),a.maxX=Math.min(o.maxX,a.maxX),a.minY=Math.max(o.minY,a.minY),a.maxY=Math.min(o.maxY,a.maxY)}return a}):r&&this.calculateTileRanges_(r)}forEachTileCoord(e,t,r){const i=this.getTileRangeForExtentAndZ(e,t);for(let s=i.minX,a=i.maxX;s<=a;++s)for(let o=i.minY,d=i.maxY;o<=d;++o)r([t,s,o])}forEachTileCoordParentTileRange(e,t,r,i){let s,a,o,d=null,g=e[0]-1;for(this.zoomFactor_===2?(a=e[1],o=e[2]):d=this.getTileCoordExtent(e,i);g>=this.minZoom;){if(a!==void 0&&o!==void 0?(a=Math.floor(a/2),o=Math.floor(o/2),s=c1(a,a,o,o,r)):s=this.getTileRangeForExtentAndZ(d,g,r),t(g,s))return!0;--g}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,t,r){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const s=e[1]*2,a=e[2]*2;return c1(s,s+1,a,a+1,t)}const i=this.getTileCoordExtent(e,r||this.tmpExtent_);return this.getTileRangeForExtentAndZ(i,e[0]+1,t)}return null}getTileRangeForTileCoordAndZ(e,t,r){if(t>this.maxZoom||t<this.minZoom)return null;const i=e[0],s=e[1],a=e[2];if(t===i)return c1(s,a,s,a,r);if(this.zoomFactor_){const d=Math.pow(this.zoomFactor_,t-i),g=Math.floor(s*d),b=Math.floor(a*d);if(t<i)return c1(g,g,b,b,r);const E=Math.floor(d*(s+1))-1,S=Math.floor(d*(a+1))-1;return c1(g,E,b,S,r)}const o=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t,r)}getTileRangeForExtentAndZ(e,t,r){this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,f1);const i=f1[1],s=f1[2];this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,f1);const a=f1[1],o=f1[2];return c1(i,a,s,o,r)}getTileCoordCenter(e){const t=this.getOrigin(e[0]),r=this.getResolution(e[0]),i=ad(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*i[0]*r,t[1]-(e[2]+.5)*i[1]*r]}getTileCoordExtent(e,t){const r=this.getOrigin(e[0]),i=this.getResolution(e[0]),s=ad(this.getTileSize(e[0]),this.tmpSize_),a=r[0]+e[1]*s[0]*i,o=r[1]-(e[2]+1)*s[1]*i,d=a+s[0]*i,g=o+s[1]*i;return Wm(a,o,d,g,t)}getTileCoordForCoordAndResolution(e,t,r){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,r)}getTileCoordForXYAndResolution_(e,t,r,i,s){const a=this.getZForResolution(r),o=r/this.getResolution(a),d=this.getOrigin(a),g=ad(this.getTileSize(a),this.tmpSize_);let b=o*(e-d[0])/r/g[0],E=o*(d[1]-t)/r/g[1];return i?(b=C0(b,h0)-1,E=C0(E,h0)-1):(b=j_(b,h0),E=j_(E,h0)),g2(a,b,E,s)}getTileCoordForXYAndZ_(e,t,r,i,s){const a=this.getOrigin(r),o=this.getResolution(r),d=ad(this.getTileSize(r),this.tmpSize_);let g=(e-a[0])/o/d[0],b=(a[1]-t)/o/d[1];return i?(g=C0(g,h0)-1,b=C0(b,h0)-1):(g=j_(g,h0),b=j_(b,h0)),g2(r,g,b,s)}getTileCoordForCoordAndZ(e,t,r){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,r)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,t){const r=Ax(this.resolutions_,e,t||0);return Tu(r,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,t){return JU(t,0,t.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const t=this.resolutions_.length,r=new Array(t);for(let i=this.minZoom;i<t;++i)r[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=r}}function qz(n){let e=n.getDefaultTileGrid();return e||(e=Rne(n),n.setDefaultTileGrid(e)),e}function Tne(n,e,t){const r=e[0],i=n.getTileCoordCenter(e),s=Tx(t);if(!Ig(s,i)){const a=ps(s),o=Math.ceil((s[0]-i[0])/a);return i[0]+=a*o,n.getTileCoordForCoordAndZ(i,r)}return e}function Pne(n,e,t,r){r=r!==void 0?r:"top-left";const i=Yz(n,e,t);return new kx({extent:n,origin:JZ(n,r),resolutions:i,tileSize:t})}function zO(n){const e=n||{},t=e.extent||Ma("EPSG:3857").getExtent(),r={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Yz(t,e.maxZoom,e.tileSize,e.maxResolution)};return new kx(r)}function Yz(n,e,t,r){e=e!==void 0?e:lz,t=ad(t!==void 0?t:CO);const i=Hl(n),s=ps(n);r=r>0?r:Math.max(s/t[0],i/t[1]);const a=e+1,o=new Array(a);for(let d=0;d<a;++d)o[d]=r/Math.pow(2,d);return o}function Rne(n,e,t,r){const i=Tx(n);return Pne(i,e,t,r)}function Tx(n){n=Ma(n);let e=n.getExtent();if(!e){const t=180*R0.degrees/n.getMetersPerUnit();e=Wm(-t,-t,t,t)}return e}class $z extends Dy{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const t=[256,256];this.tileGrid&&ad(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),t),this.tmpSize=[0,0],this.key_=e.key||Lo(this),this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getResolutions(e){const t=e?this.getTileGridForProjection(e):this.tileGrid;return t?t.getResolutions():null}getTile(e,t,r,i,s){return go()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:qz(e)}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,t,r){const i=this.getTileGridForProjection(r),s=this.getTilePixelRatio(t),a=ad(i.getTileSize(e),this.tmpSize);return s==1?a:FZ(a,s,this.tmpSize)}getTileCoordForTileUrlFunction(e,t){const r=t!==void 0?t:this.getProjection(),i=t!==void 0?this.getTileGridForProjection(r):this.tileGrid||this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(e=Tne(i,e,r)),gte(e,i)?e:null}clear(){}refresh(){this.clear(),super.refresh()}}class Dne extends hp{constructor(e,t){super(e),this.tile=t}}function Vz(n){return function(e){const t=e.buffers,r=e.meta,i=e.imageOps,s=e.width,a=e.height,o=t.length,d=t[0].byteLength;if(i){const S=new Array(o);for(let k=0;k<o;++k)S[k]=new ImageData(new Uint8ClampedArray(t[k]),s,a);return n(S,r).data.buffer}const g=new Uint8ClampedArray(d),b=new Array(o),E=new Array(o);for(let S=0;S<o;++S)b[S]=new Uint8ClampedArray(t[S]),E[S]=[0,0,0,0];for(let S=0;S<d;S+=4){for(let k=0;k<o;++k){const U=b[k];E[k][0]=U[S],E[k][1]=U[S+1],E[k][2]=U[S+2],E[k][3]=U[S+3]}const O=n(E,r);g[S]=O[0],g[S+1]=O[1],g[S+2]=O[2],g[S+3]=O[3]}return g.buffer}}function Kne(n,e){const r=Object.keys(n.lib||{}).map(function(s){return"const "+s+" = "+n.lib[s].toString()+";"}).concat(["const __minion__ = ("+Vz.toString()+")(",n.operation.toString(),");",'self.addEventListener("message", function(event) {'," const buffer = __minion__(event.data);"," self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),i=new Worker(typeof Blob>"u"?"data:text/javascript;base64,"+Buffer.from(r.join(`
|
||
`),"binary").toString("base64"):URL.createObjectURL(new Blob(r,{type:"text/javascript"})));return i.addEventListener("message",e),i}function Fne(n,e){const t=Vz(n.operation);let r=!1;return{postMessage:function(i){setTimeout(function(){r||e({data:{buffer:t(i),meta:i.meta}})},0)},terminate:function(){r=!0}}}class Lne extends FC{constructor(e){super(),this.imageOps_=!!e.imageOps;let t;e.threads===0?t=0:this.imageOps_?t=1:t=e.threads||1;const r=new Array(t);if(t)for(let i=0;i<t;++i)r[i]=Kne(e,this.onWorkerMessage_.bind(this,i));else r[0]=Fne(e,this.onWorkerMessage_.bind(this,0));this.workers_=r,this.queue_=[],this.maxQueueLength_=e.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(e,t,r){this.enqueue_({inputs:e,meta:t,callback:r}),this.dispatch_()}enqueue_(e){for(this.queue_.push(e);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||this.queue_.length===0)return;const e=this.queue_.shift();this.job_=e;const t=e.inputs[0].width,r=e.inputs[0].height,i=e.inputs.map(function(d){return d.data.buffer}),s=this.workers_.length;if(this.running_=s,s===1){this.workers_[0].postMessage({buffers:i,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},i);return}const a=e.inputs[0].data.length,o=4*Math.ceil(a/4/s);for(let d=0;d<s;++d){const g=d*o,b=[];for(let E=0,S=i.length;E<S;++E)b.push(i[E].slice(g,g+o));this.workers_[d].postMessage({buffers:b,meta:e.meta,imageOps:this.imageOps_,width:t,height:r},b)}}onWorkerMessage_(e,t){this.disposed||(this.dataLookup_[e]=t.data,--this.running_,this.running_===0&&this.resolveJob_())}resolveJob_(){const e=this.job_,t=this.workers_.length;let r,i;if(t===1)r=new Uint8ClampedArray(this.dataLookup_[0].buffer),i=this.dataLookup_[0].meta;else{const s=e.inputs[0].data.length;r=new Uint8ClampedArray(s),i=new Array(t);const a=4*Math.ceil(s/4/t);for(let o=0;o<t;++o){const d=this.dataLookup_[o].buffer,g=o*a;r.set(new Uint8ClampedArray(d),g),i[o]=this.dataLookup_[o].meta}}this.job_=null,this.dataLookup_={},e.callback(null,new ImageData(r,e.inputs[0].width,e.inputs[0].height),i),this.dispatch_()}disposeInternal(){for(let e=0;e<this.workers_.length;++e)this.workers_[e].terminate();this.workers_.length=0}}const Jk={BEFOREOPERATIONS:"beforeoperations",AFTEROPERATIONS:"afteroperations"};class e9 extends hp{constructor(e,t,r){super(e),this.extent=t.extent,this.resolution=t.viewState.resolution/t.pixelRatio,this.data=r}}class Hz extends Wz{constructor(e){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=e.operationType!==void 0?e.operationType:"pixel",this.threads_=e.threads!==void 0?e.threads:1,this.layers_=jne(e.sources);const t=this.changed.bind(this);for(let r=0,i=this.layers_.length;r<i;++r)this.layers_[r].addEventListener(io.CHANGE,t);this.useResolutions_=e.resolutions!==null,this.tileQueue_=new Iz(function(){return 1},this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:Ch(),declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:zne(this.layers_),pixelRatio:1,pixelToCoordinateTransform:Ch(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:Lo(this),renderTargets:{}},this.setAttributions(function(r){var s;const i=[];for(let a=0,o=e.sources.length;a<o;++a){const d=e.sources[a],g=d instanceof Dy?d:d.getSource();if(!g)continue;const b=(s=g.getAttributions())==null?void 0:s(r);typeof b=="string"?i.push(b):b!==void 0&&i.push(...b)}return i}),e.operation!==void 0&&this.setOperation(e.operation,e.lib)}setOperation(e,t){this.processor_&&this.processor_.dispose(),this.processor_=new Lne({operation:e,imageOps:this.operationType_==="image",queue:1,lib:t,threads:this.threads_}),this.changed()}updateFrameState_(e,t,r){const i=Object.assign({},this.frameState_);i.viewState=Object.assign({},i.viewState);const s=Of(e);i.size[0]=Math.ceil(ps(e)/t),i.size[1]=Math.ceil(Hl(e)/t),i.extent=[s[0]-i.size[0]*t/2,s[1]-i.size[1]*t/2,s[0]+i.size[0]*t/2,s[1]+i.size[1]*t/2],i.time=Date.now();const a=i.viewState;return a.center=s,a.projection=r,a.resolution=t,i}allSourcesReady_(){let e=!0,t;for(let r=0,i=this.layers_.length;r<i;++r)if(t=this.layers_[r].getSource(),!t||t.getState()!=="ready"){e=!1;break}return e}getImage(e,t,r,i){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),t=this.findNearestResolution(t);const s=this.updateFrameState_(e,t,i);if(this.requestedFrameState_=s,this.renderedImageCanvas_){const a=this.renderedImageCanvas_.getResolution(),o=this.renderedImageCanvas_.getExtent();(t!==a||!Gm(s.extent,o))&&(this.renderedImageCanvas_=null)}return(!this.renderedImageCanvas_||this.getRevision()!==this.renderedRevision_)&&this.processSources_(),s.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const e=this.requestedFrameState_,t=this.layers_.length,r=new Array(t);for(let s=0;s<t;++s){e.layerIndex=s,e.renderTargets={};const a=Une(this.layers_[s],e);if(a)r[s]=a;else return}const i={};this.dispatchEvent(new e9(Jk.BEFOREOPERATIONS,e,i)),this.processor_.process(r,i,this.onWorkerComplete_.bind(this,e))}onWorkerComplete_(e,t,r,i){if(t||!r)return;const s=e.extent,a=e.viewState.resolution;if(a!==this.requestedFrameState_.viewState.resolution||!Gm(s,this.requestedFrameState_.extent))return;let o;if(this.renderedImageCanvas_)o=this.renderedImageCanvas_.getImage().getContext("2d");else{const d=Math.round(ps(s)/a),g=Math.round(Hl(s)/a);o=Jl(d,g),this.renderedImageCanvas_=new Pee(s,a,1,o.canvas)}o.putImageData(r,0,0),e.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new e9(Jk.AFTEROPERATIONS,e,i))}getResolutions(e){if(!this.useResolutions_)return null;let t=super.getResolutions();if(!t)for(let r=0,i=this.layers_.length;r<i&&(t=this.layers_[r].getSource().getResolutions(e),!t);++r);return t}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}Hz.prototype.dispose;let tg=null;function Une(n,e){const t=n.getRenderer();if(!t)throw new Error("Unsupported layer type: "+n);if(!t.prepareFrame(e))return null;const r=e.size[0],i=e.size[1];if(r===0||i===0)return null;const s=t.renderFrame(e,null);let a;if(s instanceof HTMLCanvasElement)a=s;else{if(s&&(a=s.firstElementChild),!(a instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+a);if(a.width===r&&a.height===i)return a.getContext("2d").getImageData(0,0,r,i)}if(!tg)tg=Jl(r,i,void 0,{willReadFrequently:!0});else{const o=tg.canvas;o.width!==r||o.height!==i?tg=Jl(r,i,void 0,{willReadFrequently:!0}):tg.clearRect(0,0,r,i)}return tg.drawImage(a,0,0,r,i),tg.getImageData(0,0,r,i)}function zne(n){return n.map(function(e){return e.getLayerState()})}function jne(n){const e=n.length,t=new Array(e);for(let r=0;r<e;++r)t[r]=Nne(n[r]);return t}function Nne(n){let e;return n instanceof Dy?n instanceof $z?e=new Qz({source:n}):n instanceof Wz&&(e=new zz({source:n})):e=n,e}const q4={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Wne=/\{z\}/g,Gne=/\{x\}/g,Qne=/\{y\}/g,qne=/\{-y\}/g;function Yne(n,e,t,r,i){return n.replace(Wne,e.toString()).replace(Gne,t.toString()).replace(Qne,r.toString()).replace(qne,function(){if(i===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(i-r).toString()})}function $ne(n){const e=[];let t=/\{([a-z])-([a-z])\}/.exec(n);if(t){const r=t[1].charCodeAt(0),i=t[2].charCodeAt(0);let s;for(s=r;s<=i;++s)e.push(n.replace(t[0],String.fromCharCode(s)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(n),t){const r=parseInt(t[2],10);for(let i=parseInt(t[1],10);i<=r;i++)e.push(n.replace(t[0],i.toString()));return e}return e.push(n),e}function Vne(n,e){return function(t,r,i){if(!t)return;let s;const a=t[0];if(e){const o=e.getFullTileRange(a);o&&(s=o.getHeight()-1)}return Yne(n,a,t[1],t[2],s)}}function Zz(n,e){const t=n.length,r=new Array(t);for(let i=0;i<t;++i)r[i]=Vne(n[i],e);return Hne(r)}function Hne(n){return n.length===1?n[0]:function(e,t,r){if(!e)return;const i=pte(e),s=wg(i,n.length);return n[s](e,t,r)}}class Px extends $z{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,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.generateTileUrlFunction_=this.tileUrlFunction===Px.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const t=e.target,r=Lo(t),i=t.getState();let s;i==xr.LOADING?(this.tileLoadingKeys_[r]=!0,s=q4.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],s=i==xr.ERROR?q4.TILELOADERROR:i==xr.LOADED?q4.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new Dne(s,t))}setTileLoadFunction(e){this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,t){this.tileUrlFunction=e,typeof t<"u"?this.setKey(t):this.changed()}setUrl(e){const t=$ne(e);this.urls=t,this.setUrls(t)}setUrls(e){this.urls=e;const t=e.join(`
|
||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Zz(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,r){}}class Zne extends Px{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Xne,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:Oz,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!Mg(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const t=this.getProjection();if(this.tileGrid&&(!t||Mg(t,e)))return this.tileGrid;const r=Lo(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=qz(e)),this.tileGridForProjection[r]}createTile_(e,t,r,i,s,a){const o=[e,t,r],d=this.getTileCoordForTileUrlFunction(o,s),g=d?this.tileUrlFunction(d,i,s):void 0,b=new this.tileClass(o,g!==void 0?xr.IDLE:xr.EMPTY,g!==void 0?g:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return b.key=a,b.addEventListener(io.CHANGE,this.handleTileChange.bind(this)),b}getTile(e,t,r,i,s){const a=this.getProjection();if(!a||!s||Mg(a,s))return this.getTileInternal(e,t,r,i,a||s);const o=[e,t,r],d=this.getKey(),g=this.getTileGridForProjection(a),b=this.getTileGridForProjection(s),E=this.getTileCoordForTileUrlFunction(o,s),S=new Z6(a,g,s,b,o,E,this.getTilePixelRatio(i),this.getGutter(),(O,k,U,z)=>this.getTileInternal(O,k,U,z,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return S.key=d,S}getTileInternal(e,t,r,i,s){const a=this.getKey();return this.createTile_(e,t,r,i,s,a)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){const r=Ma(e);if(r){const i=Lo(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=t)}}}function Xne(n,e){n.getImage().src=e}function Jne(n,e,t,r){const i=document.createElement("script"),s="olc_"+Lo(e);function a(){delete window[s],i.parentNode.removeChild(i)}i.async=!0,i.src=n+(n.includes("?")?"&":"?")+"callback="+s;const o=setTimeout(function(){a(),t&&t()},1e4);window[s]=function(d){clearTimeout(o),a(),e(d)},document.head.appendChild(i)}class Xz extends Zne{constructor(e){if(super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:Ma("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.tileJSON_=null,this.tileSize_=e.tileSize,e.url)if(e.jsonp)Jne(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",e.url),t.send()}else if(e.tileJSON)this.handleTileJSONResponse(e.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(e){const t=e.target;if(!t.status||t.status>=200&&t.status<300){let r;try{r=JSON.parse(t.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(r)}else this.handleTileJSONError()}onXHRError_(e){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(e){const t=Ma("EPSG:4326"),r=this.getProjection();let i;if(e.bounds!==void 0){const g=GC(t,r);i=rX(e.bounds,g)}const s=Tx(r),a=e.minzoom||0,o=e.maxzoom||22,d=zO({extent:s,maxZoom:o,minZoom:a,tileSize:this.tileSize_});if(this.tileGrid=d,this.tileUrlFunction=Zz(e.tiles,d),e.attribution&&!this.getAttributions()){const g=i!==void 0?i:s;this.setAttributions(function(b){return ku(g,b.extent)?[e.attribution]:null})}this.tileJSON_=e,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const ere={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},t9={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class tre extends Gz{constructor(e,t){super(e,t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=Ch(),this.tileClipContexts_=null}drawTile(e,t,r,i,s,a,o,d){this.updateExecutorGroup_(e,t.pixelRatio,t.viewState.projection),this.tileImageNeedsRender_(e)&&this.renderTileImage_(e,t),super.drawTile(e,t,r,i,s,a,o,d)}getTile(e,t,r,i){const s=this.getOrCreateTile(e,t,r,i);if(!s)return null;const o=i.viewState.resolution,d=i.viewHints;return(!(d[Vl.ANIMATING]||d[Vl.INTERACTING])||!s.wantedResolution)&&(s.wantedResolution=o),s}prepareFrame(e){const t=this.getLayer().getRevision();return this.renderedLayerRevision_!==t&&(this.renderedLayerRevision_=t,this.renderedTiles.length=0),super.prepareFrame(e)}updateExecutorGroup_(e,t,r){const i=this.getLayer(),s=i.getRevision(),a=i.getRenderOrder()||null,o=e.wantedResolution,d=e.getReplayState(i);if(!d.dirty&&d.renderedResolution===o&&d.renderedRevision==s&&d.renderedRenderOrder==a)return;const g=i.getSource(),b=!!i.getDeclutter(),E=g.getTileGrid(),O=g.getTileGridForProjection(r).getTileCoordExtent(e.wrappedTileCoord),k=g.getSourceTiles(t,r,e),U=Lo(i);delete e.hitDetectionImageData[U],e.executorGroups[U]=[],d.dirty=!1;for(let z=0,q=k.length;z<q;++z){const Q=k[z];if(Q.getState()!=xr.LOADED)continue;const re=Q.tileCoord,X=E.getTileCoordExtent(re),Y=Qd(O,X),ee=B0(Y,i.getRenderBuffer()*o,this.tempExtent),N=Gm(X,Y)?null:ee,ie=new Cz(0,Y,o,t),he=j6(o,t),de=function(me,at){let Qe;const He=me.getStyleFunction()||i.getStyleFunction();if(He&&(Qe=He(me,o)),Qe){const We=this.renderFeature(me,he,Qe,ie,b,at);d.dirty=d.dirty||We}},Me=Q.getFeatures();a&&a!==d.renderedRenderOrder&&Me.sort(a);for(let me=0,at=Me.length;me<at;++me){const Qe=Me[me];(!N||ku(N,Qe.getGeometry().getExtent()))&&de.call(this,Qe,me)}const fe=ie.finish(),xe=i.getRenderMode()!=="vector"&&b&&k.length===1?null:Y,De=new bz(xe,o,t,g.getOverlaps(),fe,i.getRenderBuffer(),!0);e.executorGroups[U].push(De)}d.renderedRevision=s,d.renderedRenderOrder=a,d.renderedResolution=o}forEachFeatureAtCoordinate(e,t,r,i,s){const a=t.viewState.resolution,o=t.viewState.rotation;r=r??0;const d=this.getLayer(),b=d.getSource().getTileGridForProjection(t.viewState.projection),E=B6([e]);B0(E,a*r,E);const S={},O=function(re,X,Y){let ee=re.getId();ee===void 0&&(ee=Lo(re));const N=S[ee];if(N){if(N!==!0&&Y<N.distanceSq){if(Y===0)return S[ee]=!0,s.splice(s.lastIndexOf(N),1),i(re,d,X);N.geometry=X,N.distanceSq=Y}}else{if(Y===0)return S[ee]=!0,i(re,d,X);s.push(S[ee]={feature:re,layer:d,geometry:X,distanceSq:Y,callback:i})}},k=this.renderedTiles,U=Lo(d),z=d.getDeclutter(),q=z?t.declutter[z].all().map(re=>re.value):null;let Q;e:for(let re=0,X=k.length;re<X;++re){const Y=k[re],ee=b.getTileCoordExtent(Y.wrappedTileCoord);if(!ku(ee,E))continue;const N=Y.executorGroups[U];for(let ie=0,he=N.length;ie<he;++ie)if(Q=N[ie].forEachFeatureAtCoordinate(e,a,o,r,O,q),Q)break e}return Q}getFeatures(e){return this.renderedTiles.length===0?Promise.resolve([]):new Promise((t,r)=>{const i=this.getLayer(),s=i.getSource(),a=this.renderedProjection,o=a.getExtent(),d=this.renderedResolution,g=s.getTileGridForProjection(a),b=yA(this.renderedPixelToCoordinateTransform_,e.slice()),E=g.getTileCoordForCoordAndResolution(b,d).toString(),S=this.renderedTiles.find(re=>re.tileCoord.toString()===E&&re.getState()===xr.LOADED);if(!S||S.loadingSourceTiles>0){t([]);return}s.getWrapX()&&a.canWrapX()&&!lp(o,g.getTileCoordExtent(S.tileCoord))&&oO(b,a);const O=Lo(i),k=g.getTileCoordExtent(S.wrappedTileCoord),U=Ap(k),z=[(b[0]-U[0])/d,(U[1]-b[1])/d],q=S.getSourceTiles().reduce((re,X)=>re.concat(X.getFeatures()),[]);let Q=S.hitDetectionImageData[O];if(!Q){const re=ad(g.getTileSize(g.getZForResolution(d,s.zDirection))),X=this.renderedRotation_,Y=[this.getRenderTransform(g.getTileCoordCenter(S.wrappedTileCoord),d,0,Yh,re[0]*Yh,re[1]*Yh,0)];Q=xz(re,Y,q,i.getStyleFunction(),g.getTileCoordExtent(S.wrappedTileCoord),S.getReplayState(i).renderedResolution,X),S.hitDetectionImageData[O]=Q}t(wz(z,q,Q))})}getFeaturesInExtent(e){const t=[],r=this.getTileCache();if(r.getCount()===0)return t;const s=this.getLayer().getSource().getTileGridForProjection(this.frameState.viewState.projection),a=s.getZForResolution(this.renderedResolution),o={};return r.forEach(d=>{if(d.tileCoord[0]!==a||d.getState()!==xr.LOADED)return;const g=d.getSourceTiles();for(let b=0,E=g.length;b<E;++b){const S=g[b],O=S.getKey();if(O in o)continue;o[O]=!0;const k=S.tileCoord;if(ku(e,s.getTileCoordExtent(k))){const U=S.getFeatures();if(U)for(let z=0,q=U.length;z<q;++z){const Q=U[z],re=Q.getGeometry();ku(e,re.getExtent())&&t.push(Q)}}}}),t}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.renderedLayerRevision_!==void 0&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}renderDeclutter(e,t){const r=this.context,i=r.globalAlpha;r.globalAlpha=t.opacity;const s=e.viewHints,a=!(s[Vl.ANIMATING]||s[Vl.INTERACTING]),o=[this.context.canvas.width,this.context.canvas.height],d=this.getLayer().getDeclutter(),g=d?e.declutter[d]:void 0,b=Lo(this.getLayer()),E=this.renderedTiles;for(let S=0,O=E.length;S<O;++S){const k=E[S],U=k.executorGroups[b];if(U)for(let z=U.length-1;z>=0;--z)U[z].execute(this.context,o,this.getTileRenderTransform(k,e),e.viewState.rotation,a,f2,g)}r.globalAlpha=i}renderDeferredInternal(e){const t=this.renderedTiles,r=Lo(this.getLayer()),i=t.reduce((d,g,b)=>(g.executorGroups[r].forEach(E=>d.push({executorGroup:E,index:b})),d),[]),s=i.map(({executorGroup:d})=>d.getDeferredZIndexContexts()),a={};for(let d=0,g=i.length;d<g;++d){const b=i[d].executorGroup.getDeferredZIndexContexts();for(const E in b)a[E]=!0}Object.keys(a).map(Number).sort(Lm).forEach(d=>{s.forEach((g,b)=>{g[d]&&(g[d].forEach(E=>{const{executorGroup:S,index:O}=i[b],k=S.getRenderedContext(),U=k.globalAlpha;k.globalAlpha=this.renderedOpacity_;const z=this.tileClipContexts_[O];z&&z.draw(k),E.draw(k),z&&k.restore(),k.globalAlpha=U,E.clear()}),g[d].length=0)})})}getTileRenderTransform(e,t){const r=t.pixelRatio,i=t.viewState,s=i.center,a=i.resolution,o=i.rotation,d=t.size,g=Math.round(d[0]*r),b=Math.round(d[1]*r),S=this.getLayer().getSource().getTileGridForProjection(t.viewState.projection),O=e.tileCoord,k=S.getTileCoordExtent(e.wrappedTileCoord),U=S.getTileCoordExtent(O,this.tempExtent)[0]-k[0];return XB(S4(this.inversePixelTransform.slice(),1/r,1/r),this.getRenderTransform(s,a,o,r,g,b,U))}postRender(e,t){var Y;const r=t.viewHints,i=!(r[Vl.ANIMATING]||r[Vl.INTERACTING]);this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation,this.renderedOpacity_=t.layerStatesArray[t.layerIndex].opacity;const s=this.getLayer(),a=s.getRenderMode(),o=e.globalAlpha;e.globalAlpha=this.renderedOpacity_;const d=s.getDeclutter(),g=d?t9[a].filter(ee=>!f2.includes(ee)):t9[a],b=t.viewState,E=b.rotation,S=s.getSource(),k=S.getTileGridForProjection(b.projection).getZForResolution(b.resolution,S.zDirection),U=this.renderedTiles,z=[],q=[],Q=[],re=Lo(s);let X=!0;for(let ee=U.length-1;ee>=0;--ee){const N=U[ee];X=X&&!N.getReplayState(s).dirty;const ie=N.executorGroups[re].filter(me=>me.hasExecutors(g));if(ie.length===0)continue;const he=this.getTileRenderTransform(N,t),de=N.tileCoord[0];let Me=!1;const fe=ie[0].getClipCoords(he);let xe=e,De;if(fe){De=new BO,xe=De.getContext();for(let me=0,at=z.length;me<at;++me)if(k!==de&&de<q[me]){const Qe=z[me];ku([fe[0],fe[3],fe[4],fe[7]],[Qe[0],Qe[3],Qe[4],Qe[7]])&&(Me||(xe.save(),Me=!0),xe.beginPath(),xe.moveTo(fe[0],fe[1]),xe.lineTo(fe[2],fe[3]),xe.lineTo(fe[4],fe[5]),xe.lineTo(fe[6],fe[7]),xe.moveTo(Qe[6],Qe[7]),xe.lineTo(Qe[4],Qe[5]),xe.lineTo(Qe[2],Qe[3]),xe.lineTo(Qe[0],Qe[1]),xe.clip())}z.push(fe),q.push(de)}for(let me=0,at=ie.length;me<at;++me)ie[me].execute(e,[e.canvas.width,e.canvas.height],he,E,i,g,(Y=t.declutter)==null?void 0:Y[d]);Me&&(xe===e?xe.restore():Q[ee]=De)}e.globalAlpha=o,this.ready=X,this.tileClipContexts_=Q,t.declutter||this.renderDeferredInternal(t),super.postRender(e,t)}renderFeature(e,t,r,i,s,a){if(!r)return!1;let o=!1;if(Array.isArray(r))for(let d=0,g=r.length;d<g;++d)o=p2(i,e,r[d],t,this.boundHandleStyleImageChange_,void 0,s,a)||o;else o=p2(i,e,r,t,this.boundHandleStyleImageChange_,void 0,s,a);return o}tileImageNeedsRender_(e){const t=this.getLayer();if(t.getRenderMode()==="vector")return!1;const r=e.getReplayState(t),i=t.getRevision(),s=e.wantedResolution;return r.renderedTileResolution!==s||r.renderedTileRevision!==i}renderTileImage_(e,t){const r=this.getLayer(),i=e.getReplayState(r),s=r.getRevision(),a=e.executorGroups[Lo(r)];i.renderedTileRevision=s;const o=e.wrappedTileCoord,d=o[0],g=r.getSource();let b=t.pixelRatio;const S=t.viewState.projection,O=g.getTileGridForProjection(S),k=O.getResolution(e.tileCoord[0]),U=t.pixelRatio/e.wantedResolution*k,z=O.getResolution(d),q=e.getContext();b=Math.round(Math.max(b,U/b));const Q=g.getTilePixelSize(d,b,S);q.canvas.width=Q[0],q.canvas.height=Q[1];const re=b/U;if(re!==1){const N=rk(this.tmpTransform_);S4(N,re,re),q.setTransform.apply(q,N)}const X=O.getTileCoordExtent(o,this.tempExtent),Y=U/z,ee=rk(this.tmpTransform_);S4(ee,Y,-Y),$Z(ee,-X[0],-X[3]);for(let N=0,ie=a.length;N<ie;++N)a[N].execute(q,[q.canvas.width*re,q.canvas.height*re],ee,0,!0,ere[r.getRenderMode()],null);i.renderedTileResolution=e.wantedResolution}}class Gv extends EO{constructor(e){e=e||{};const t=Object.assign({},e);delete t.preload;const r=e.cacheSize===void 0?0:e.cacheSize;delete e.cacheSize,delete t.useInterimTilesOnError,super(t),this.on,this.once,this.un,this.cacheSize_=r;const i=e.renderMode||"hybrid";ra(i=="hybrid"||i=="vector","`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=i,this.setPreload(e.preload?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0),this.getBackground,this.setBackground}createRenderer(){return new tre(this,{cacheSize:this.cacheSize_})}getFeatures(e){return super.getFeatures(e)}getFeaturesInExtent(e){return this.getRenderer().getFeaturesInExtent(e)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(w0.PRELOAD)}getUseInterimTilesOnError(){return this.get(w0.USE_INTERIM_TILES_ON_ERROR)}setPreload(e){this.set(w0.PRELOAD,e)}setUseInterimTilesOnError(e){this.set(w0.USE_INTERIM_TILES_ON_ERROR,e)}}class Jz extends Px{constructor(e){const t=e.projection||"EPSG:3857",r=e.extent||Tx(t),i=e.tileGrid||zO({extent:r,maxResolution:e.maxResolution,maxZoom:e.maxZoom!==void 0?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,projection:t,state:e.state,tileGrid:i,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:ej,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.format_=e.format?e.format:null,this.tileKeysBySourceTileUrl_={},this.sourceTiles_={},this.overlaps_=e.overlaps==null?!0:e.overlaps,this.tileClass=e.tileClass?e.tileClass:Fz,this.tileGrids_={}}getOverlaps(){return this.overlaps_}getSourceTiles(e,t,r){if(r.getState()===xr.IDLE){r.setState(xr.LOADING);const i=r.wrappedTileCoord,s=this.getTileGridForProjection(t),a=s.getTileCoordExtent(i),o=i[0],d=s.getResolution(o);B0(a,-d,a);const g=this.tileGrid,b=g.getExtent();b&&Qd(a,b,a);const E=g.getZForResolution(d,this.zDirection);g.forEachTileCoord(a,E,S=>{const O=this.tileUrlFunction(S,e,t);this.sourceTiles_[O]||(this.sourceTiles_[O]=new this.tileClass(S,O?xr.IDLE:xr.EMPTY,O,this.format_,this.tileLoadFunction));const k=this.sourceTiles_[O];r.sourceTiles.push(k),this.tileKeysBySourceTileUrl_[O]||(this.tileKeysBySourceTileUrl_[O]=[]),this.tileKeysBySourceTileUrl_[O].push(r.getKey());const U=k.getState();if(U<xr.LOADED){const z=q=>{this.handleTileChange(q);const Q=k.getState();if(Q===xr.LOADED||Q===xr.ERROR){const re=k.getKey();re in r.errorTileKeys?k.getState()===xr.LOADED&&delete r.errorTileKeys[re]:r.loadingSourceTiles--,Q===xr.ERROR?r.errorTileKeys[re]=!0:k.removeEventListener(io.CHANGE,z),r.loadingSourceTiles===0&&r.setState(T0(r.errorTileKeys)?xr.LOADED:xr.ERROR)}};k.addEventListener(io.CHANGE,z),r.loadingSourceTiles++}U===xr.IDLE&&(k.extent=g.getTileCoordExtent(S),k.projection=t,k.resolution=g.getResolution(S[0]),k.load())}),r.loadingSourceTiles||r.setState(r.sourceTiles.some(S=>S.getState()===xr.ERROR)?xr.ERROR:xr.LOADED)}return r.sourceTiles}removeSourceTiles(e){const t=e.sourceTiles;for(let r=0,i=t.length;r<i;++r){const s=t[r].getTileUrl(),a=this.getKey();if(!this.tileKeysBySourceTileUrl_[s])return;const o=this.tileKeysBySourceTileUrl_[s][a];o!==-1&&(this.tileKeysBySourceTileUrl_[s].splice(o,1),this.tileKeysBySourceTileUrl_[s].length===0&&(delete this.tileKeysBySourceTileUrl_[s],delete this.sourceTiles_[s]))}}getTile(e,t,r,i,s){const a=[e,t,r];let o=this.getTileCoordForTileUrlFunction(a,s);const d=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(s);if(o&&d){const S=g.getTileCoordExtent(o);B0(S,-g.getResolution(e),S),ku(d,S)||(o=null)}let b=!0;if(o!==null){const S=this.tileGrid,O=g.getResolution(e),k=S.getZForResolution(O,1),U=g.getTileCoordExtent(o);B0(U,-O,U),S.forEachTileCoord(U,k,z=>{b=b&&!this.tileUrlFunction(z,i,s)})}const E=new yte(a,b?xr.EMPTY:xr.IDLE,o,this.getSourceTiles.bind(this,i,s),this.removeSourceTiles.bind(this));return E.key=this.getKey(),E}getTileGridForProjection(e){const t=e.getCode();let r=this.tileGrids_[t];if(!r){const i=this.tileGrid,s=i.getResolutions().slice(),a=s.map(function(g,b){return i.getOrigin(b)}),o=s.map(function(g,b){return i.getTileSize(b)}),d=lz+1;for(let g=s.length;g<d;++g)s.push(s[g-1]/2),a.push(a[g-1]),o.push(o[g-1]);r=new kx({extent:i.getExtent(),origins:a,resolutions:s,tileSizes:o}),this.tileGrids_[t]=r}return r}getTilePixelRatio(e){return e}getTilePixelSize(e,t,r){const i=this.getTileGridForProjection(r),s=ad(i.getTileSize(e),this.tmpSize);return[Math.round(s[0]*t),Math.round(s[1]*t)]}setOverlaps(e){this.overlaps_=e,this.changed()}}function ej(n,e){n.setLoader(function(t,r,i){Bz(e,n.getFormat(),t,r,i,n.onLoad.bind(n),n.onError.bind(n))})}function tj(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nre={},nj,n9={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 Qv(n){return n=Math.round(n),n<0?0:n>255?255:n}function r9(n){return n<0?0:n>1?1:n}function Y4(n){return n[n.length-1]==="%"?Qv(parseFloat(n)/100*255):Qv(parseInt(n))}function eb(n){return n[n.length-1]==="%"?r9(parseFloat(n)/100):r9(parseFloat(n))}function $4(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function rre(n){var e=n.replace(/ /g,"").toLowerCase();if(e in n9)return n9[e].slice();if(e[0]==="#"){if(e.length===4){var t=parseInt(e.substr(1),16);return t>=0&&t<=4095?[(t&3840)>>4|(t&3840)>>8,t&240|(t&240)>>4,t&15|(t&15)<<4,1]:null}else if(e.length===7){var t=parseInt(e.substr(1),16);return t>=0&&t<=16777215?[(t&16711680)>>16,(t&65280)>>8,t&255,1]:null}return null}var r=e.indexOf("("),i=e.indexOf(")");if(r!==-1&&i+1===e.length){var s=e.substr(0,r),a=e.substr(r+1,i-(r+1)).split(","),o=1;switch(s){case"rgba":if(a.length!==4)return null;o=eb(a.pop());case"rgb":return a.length!==3?null:[Y4(a[0]),Y4(a[1]),Y4(a[2]),o];case"hsla":if(a.length!==4)return null;o=eb(a.pop());case"hsl":if(a.length!==3)return null;var d=(parseFloat(a[0])%360+360)%360/360,g=eb(a[1]),b=eb(a[2]),E=b<=.5?b*(g+1):b+g-b*g,S=b*2-E;return[Qv($4(S,E,d+1/3)*255),Qv($4(S,E,d)*255),Qv($4(S,E,d-1/3)*255),o];default:return null}}return null}try{nj=nre.parseCSSColor=rre}catch{}class _h{constructor(e,t,r,i=1){this.r=e,this.g=t,this.b=r,this.a=i}static parse(e){if(!e)return;if(e instanceof _h)return e;if(typeof e!="string")return;const t=nj(e);if(t)return new _h(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}toString(){const[e,t,r,i]=this.toArray();return`rgba(${Math.round(e)},${Math.round(t)},${Math.round(r)},${i})`}toArray(){const{r:e,g:t,b:r,a:i}=this;return i===0?[0,0,0,0]:[e*255/i,t*255/i,r*255/i,i]}toArray01(){const{r:e,g:t,b:r,a:i}=this;return i===0?[0,0,0,0]:[e/i,t/i,r/i,i]}toArray01PremultipliedAlpha(){const{r:e,g:t,b:r,a:i}=this;return[e,t,r,i]}}_h.black=new _h(0,0,0,1);_h.white=new _h(1,1,1,1);_h.transparent=new _h(0,0,0,0);_h.red=new _h(1,0,0,1);_h.blue=new _h(0,0,1,1);var Zh=_h;function CC(n){return typeof n=="object"?["literal",n]:n}function ire(n,e){let t=n.stops;if(!t)return ore(n,e);const r=t&&typeof t[0][0]=="object",i=r||n.property!==void 0,s=r||!i;return t=t.map(a=>!i&&e.tokens&&typeof a[1]=="string"?[a[0],ure(a[1])]:[a[0],CC(a[1])]),r?sre(n,e,t):s?lre(n,e,t):X6(n,e,t)}function ore(n,e){const t=["get",n.property];if(n.default===void 0)return e.type==="string"?["string",t]:t;if(e.type==="enum")return["match",t,Object.keys(e.values),t,n.default];{const r=[e.type==="color"?"to-color":e.type,t,CC(n.default)];return e.type==="array"&&r.splice(1,0,e.value,e.length||null),r}}function jO(n){switch(n.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function sre(n,e,t){const r={},i={},s=[];for(let o=0;o<t.length;o++){const d=t[o],g=d[0].zoom;r[g]===void 0&&(r[g]={zoom:g,type:n.type,property:n.property,default:n.default},i[g]=[],s.push(g)),i[g].push([d[0].value,d[1]])}if(WO({},e)==="exponential"){const o=[jO(n),["linear"],["zoom"]];for(const d of s){const g=X6(r[d],e,i[d]);oy(o,d,g,!1)}return o}else{const o=["step",["zoom"]];for(const d of s){const g=X6(r[d],e,i[d]);oy(o,d,g,!0)}return NO(o),o}}function are(n,e){if(n!==void 0)return n;if(e!==void 0)return e}function i9(n,e){const t=CC(are(n.default,e.default));return t===void 0&&e.type==="resolvedImage"?"":t}function X6(n,e,t){const r=WO(n,e),i=["get",n.property];if(r==="categorical"&&typeof t[0][0]=="boolean"){const s=["case"];for(const a of t)s.push(["==",i,a[0]],a[1]);return s.push(i9(n,e)),s}else if(r==="categorical"){const s=["match",i];for(const a of t)oy(s,a[0],a[1],!1);return s.push(i9(n,e)),s}else if(r==="interval"){const s=["step",["number",i]];for(const a of t)oy(s,a[0],a[1],!0);return NO(s),n.default===void 0?s:["case",["==",["typeof",i],"number"],s,CC(n.default)]}else if(r==="exponential"){const s=n.base!==void 0?n.base:1,a=[jO(n),s===1?["linear"]:["exponential",s],["number",i]];for(const o of t)oy(a,o[0],o[1],!1);return n.default===void 0?a:["case",["==",["typeof",i],"number"],a,CC(n.default)]}else throw new Error(`Unknown property function type ${r}`)}function lre(n,e,t,r=["zoom"]){const i=WO(n,e);let s,a=!1;if(i==="interval")s=["step",r],a=!0;else if(i==="exponential"){const o=n.base!==void 0?n.base:1;s=[jO(n),o===1?["linear"]:["exponential",o],r]}else throw new Error(`Unknown zoom function type "${i}"`);for(const o of t)oy(s,o[0],o[1],a);return NO(s),s}function NO(n){n[0]==="step"&&n.length===3&&(n.push(0),n.push(n[3]))}function oy(n,e,t,r){n.length>3&&e===n[n.length-2]||(r&&n.length===2||n.push(e),n.push(t))}function WO(n,e){return n.type?n.type:e.expression.interpolated?"exponential":"interval"}function ure(n){const e=["concat"],t=/{([^{}]+)}/g;let r=0;for(let i=t.exec(n);i!==null;i=t.exec(n)){const s=n.slice(r,t.lastIndex-i[0].length);r=t.lastIndex,s.length>0&&e.push(s),e.push(["get",i[1]])}if(e.length===1)return n;if(r<n.length)e.push(n.slice(r));else if(e.length===2)return["to-string",e[1]];return e}class Are extends Error{constructor(e,t){super(t),this.message=t,this.key=e}}var Gp=Are;class GO{constructor(e,t=[]){this.parent=e,this.bindings={};for(const[r,i]of t)this.bindings[r]=i}concat(e){return new GO(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return this.bindings[e]?!0:this.parent?this.parent.has(e):!1}}var cre=GO;const Rx={kind:"null"},Pr={kind:"number"},as={kind:"string"},Qo={kind:"boolean"},jm={kind:"color"},sy={kind:"object"},Yo={kind:"value"},dre={kind:"error"},Dx={kind:"collator"},Kx={kind:"formatted"},XC={kind:"resolvedImage"};function xf(n,e){return{kind:"array",itemType:n,N:e}}function Xl(n){if(n.kind==="array"){const e=Xl(n.itemType);return typeof n.N=="number"?`array<${e}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${e}>`}else return n.kind}const hre=[Rx,Pr,as,Qo,jm,Kx,sy,xf(Yo),XC];function _C(n,e){if(e.kind==="error")return null;if(n.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!_C(n.itemType,e.itemType))&&(typeof n.N!="number"||n.N===e.N))return null}else{if(n.kind===e.kind)return null;if(n.kind==="value"){for(const t of hre)if(!_C(t,e))return null}}return`Expected ${Xl(n)} but found ${Xl(e)} instead.`}function QO(n,e){return e.some(t=>t.kind===n.kind)}function bC(n,e){return e.some(t=>t==="null"?n===null:t==="array"?Array.isArray(n):t==="object"?n&&!Array.isArray(n)&&typeof n=="object":t===typeof n)}class qO{constructor(e,t,r){e?this.sensitivity=t?"variant":"case":this.sensitivity=t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class J6{constructor(e,t,r,i,s){this.text=e.normalize?e.normalize():e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=s}}class Xp{constructor(e){this.sections=e}static fromString(e){return new Xp([new J6(e,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof Xp?e:Xp.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const t of this.sections){if(t.image){e.push(["image",t.image.name]);continue}e.push(t.text);const r={};t.fontStack&&(r["text-font"]=["literal",t.fontStack.split(",")]),t.scale&&(r["font-scale"]=t.scale),t.textColor&&(r["text-color"]=["rgba"].concat(t.textColor.toArray())),e.push(r)}return e}}class K0{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(e){return e?new K0({name:e,available:!1}):null}serialize(){return["image",this.name]}}function rj(n,e,t,r){return typeof n=="number"&&n>=0&&n<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof t=="number"&&t>=0&&t<=255?typeof r>"u"||typeof r=="number"&&r>=0&&r<=1?null:`Invalid rgba value [${[n,e,t,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof r=="number"?[n,e,t,r]:[n,e,t]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function v2(n){if(n===null)return!0;if(typeof n=="string")return!0;if(typeof n=="boolean")return!0;if(typeof n=="number")return!0;if(n instanceof Zh)return!0;if(n instanceof qO)return!0;if(n instanceof Xp)return!0;if(n instanceof K0)return!0;if(Array.isArray(n)){for(const e of n)if(!v2(e))return!1;return!0}else if(typeof n=="object"){for(const e in n)if(!v2(n[e]))return!1;return!0}else return!1}function WA(n){if(n===null)return Rx;if(typeof n=="string")return as;if(typeof n=="boolean")return Qo;if(typeof n=="number")return Pr;if(n instanceof Zh)return jm;if(n instanceof qO)return Dx;if(n instanceof Xp)return Kx;if(n instanceof K0)return XC;if(Array.isArray(n)){const e=n.length;let t;for(const r of n){const i=WA(r);if(!t)t=i;else{if(t===i)continue;t=Yo;break}}return xf(t||Yo,e)}else return sy}function qv(n){const e=typeof n;return n===null?"":e==="string"||e==="number"||e==="boolean"?String(n):n instanceof Zh||n instanceof Xp||n instanceof K0?n.toString():JSON.stringify(n)}class YO{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(e.length!==2)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!v2(e[1]))return t.error("invalid value");const r=e[1];let i=WA(r);const s=t.expectedType;return i.kind==="array"&&i.N===0&&s&&s.kind==="array"&&(typeof s.N!="number"||s.N===0)&&(i=s),new YO(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Zh?["rgba"].concat(this.value.toArray()):this.value instanceof Xp?this.value.serialize():this.value}}var C2=YO;class fre{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}var Dc=fre;const V4={string:as,number:Pr,boolean:Qo,object:sy};class $O{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=1,i;const s=e[0];if(s==="array"){let o;if(e.length>2){const g=e[1];if(typeof g!="string"||!(g in V4)||g==="object")return t.error('The item type argument of "array" must be one of string, number, boolean',1);o=V4[g],r++}else o=Yo;let d;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);d=e[2],r++}i=xf(o,d)}else i=V4[s];const a=[];for(;r<e.length;r++){const o=t.parse(e[r],r,Yo);if(!o)return null;a.push(o)}return new $O(i,a)}evaluate(e){for(let t=0;t<this.args.length;t++){const r=this.args[t].evaluate(e);if(_C(this.type,WA(r))){if(t===this.args.length-1)throw new Dc(`Expected value to be of type ${Xl(this.type)}, but found ${Xl(WA(r))} instead.`)}else return r}return null}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=this.type,t=[e.kind];if(e.kind==="array"){const r=e.itemType;if(r.kind==="string"||r.kind==="number"||r.kind==="boolean"){t.push(r.kind);const i=e.N;(typeof i=="number"||this.args.length>1)&&t.push(i)}}return t.concat(this.args.map(r=>r.serialize()))}}var Dm=$O;class Fx{constructor(e){this.type=Kx,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[1];if(!Array.isArray(r)&&typeof r=="object")return t.error("First argument must be an image or text section.");const i=[];let s=!1;for(let a=1;a<=e.length-1;++a){const o=e[a];if(s&&typeof o=="object"&&!Array.isArray(o)){s=!1;let d=null;if(o["font-scale"]&&(d=t.parse(o["font-scale"],1,Pr),!d))return null;let g=null;if(o["text-font"]&&(g=t.parse(o["text-font"],1,xf(as)),!g))return null;let b=null;if(o["text-color"]&&(b=t.parse(o["text-color"],1,jm),!b))return null;const E=i[i.length-1];E.scale=d,E.font=g,E.textColor=b}else{const d=t.parse(e[a],1,Yo);if(!d)return null;const g=d.type.kind;if(g!=="string"&&g!=="value"&&g!=="null"&&g!=="resolvedImage")return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");s=!0,i.push({content:d,scale:null,font:null,textColor:null})}}return new Fx(i)}evaluate(e){const t=r=>{const i=r.content.evaluate(e);return WA(i)===XC?new J6("",i,null,null,null):new J6(qv(i),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)};return new Xp(this.sections.map(t))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}serialize(){const e=["format"];for(const t of this.sections){e.push(t.content.serialize());const r={};t.scale&&(r["font-scale"]=t.scale.serialize()),t.font&&(r["text-font"]=t.font.serialize()),t.textColor&&(r["text-color"]=t.textColor.serialize()),e.push(r)}return e}}class Lx{constructor(e){this.type=XC,this.input=e}static parse(e,t){if(e.length!==2)return t.error("Expected two arguments.");const r=t.parse(e[1],1,as);return r?new Lx(r):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),r=K0.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const pre={"to-boolean":Qo,"to-color":jm,"to-number":Pr,"to-string":as};class VO{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const r=e[0];if((r==="to-boolean"||r==="to-string")&&e.length!==2)return t.error("Expected one argument.");const i=pre[r],s=[];for(let a=1;a<e.length;a++){const o=t.parse(e[a],a,Yo);if(!o)return null;s.push(o)}return new VO(i,s)}evaluate(e){if(this.type.kind==="boolean")return!!this.args[0].evaluate(e);if(this.type.kind==="color"){let t,r;for(const i of this.args){if(t=i.evaluate(e),r=null,t instanceof Zh)return t;if(typeof t=="string"){const s=e.parseColor(t);if(s)return s}else if(Array.isArray(t)&&(t.length<3||t.length>4?r=`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:r=rj(t[0],t[1],t[2],t[3]),!r))return new Zh(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new Dc(r||`Could not parse color from value '${typeof t=="string"?t:String(JSON.stringify(t))}'`)}else if(this.type.kind==="number"){let t=null;for(const r of this.args){if(t=r.evaluate(e),t===null)return 0;const i=Number(t);if(!isNaN(i))return i}throw new Dc(`Could not convert ${JSON.stringify(t)} to number.`)}else return this.type.kind==="formatted"?Xp.fromString(qv(this.args[0].evaluate(e))):this.type.kind==="resolvedImage"?K0.fromString(qv(this.args[0].evaluate(e))):qv(this.args[0].evaluate(e))}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){if(this.type.kind==="formatted")return new Fx([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Lx(this.args[0]).serialize();const e=[`to-${this.type.kind}`];return this.eachChild(t=>{e.push(t.serialize())}),e}}var q1=VO;const mre=["Unknown","Point","LineString","Polygon"];class gre{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"?mre[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const e=this.featureDistanceData.center,t=this.featureDistanceData.scale,{x:r,y:i}=this.featureTileCoord,s=r*t-e[0],a=i*t-e[1],o=this.featureDistanceData.bearing[0],d=this.featureDistanceData.bearing[1];return o*s+d*a}return 0}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Zh.parse(e)),t}}var ij=gre;class Y1{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(e=>e.serialize()))}static parse(e,t){const r=e[0],i=Y1.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const s=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=a.filter(([g])=>!Array.isArray(g)||g.length===e.length-1);let d=null;for(const[g,b]of o){d=new uj(t.registry,t.path,null,t.scope);const E=[];let S=!1;for(let O=1;O<e.length;O++){const k=e[O],U=Array.isArray(g)?g[O-1]:g.type,z=d.parse(k,1+E.length,U);if(!z){S=!0;break}E.push(z)}if(!S){if(Array.isArray(g)&&g.length!==E.length){d.error(`Expected ${g.length} arguments, but found ${E.length} instead.`);continue}for(let O=0;O<E.length;O++){const k=Array.isArray(g)?g[O]:g.type,U=E[O];d.concat(O+1).checkSubtype(k,U.type)}if(d.errors.length===0)return new Y1(r,s,b,E)}}if(o.length===1)t.errors.push(...d.errors);else{const b=(o.length?o:a).map(([S])=>yre(S)).join(" | "),E=[];for(let S=1;S<e.length;S++){const O=t.parse(e[S],1+E.length);if(!O)return null;E.push(Xl(O.type))}t.error(`Expected arguments of type ${b}, but found (${E.join(", ")}) instead.`)}return null}static register(e,t){Y1.definitions=t;for(const r in t)e[r]=Y1}}function yre(n){return Array.isArray(n)?`(${n.map(Xl).join(", ")})`:`(${Xl(n.type)}...)`}var Fy=Y1;class Ux{constructor(e,t,r){this.type=Dx,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(e.length!==2)return t.error("Expected one argument.");const r=e[1];if(typeof r!="object"||Array.isArray(r))return t.error("Collator options argument must be an object.");const i=t.parse(r["case-sensitive"]===void 0?!1:r["case-sensitive"],1,Qo);if(!i)return null;const s=t.parse(r["diacritic-sensitive"]===void 0?!1:r["diacritic-sensitive"],1,Qo);if(!s)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,as),!a)?null:new Ux(i,s,a)}evaluate(e){return new qO(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}serialize(){const e={};return e["case-sensitive"]=this.caseSensitive.serialize(),e["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(e.locale=this.locale.serialize()),["collator",e]}}const I0=8192;function HO(n,e){n[0]=Math.min(n[0],e[0]),n[1]=Math.min(n[1],e[1]),n[2]=Math.max(n[2],e[0]),n[3]=Math.max(n[3],e[1])}function vre(n){return(180+n)/360}function Cre(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function _2(n,e){return!(n[0]<=e[0]||n[2]>=e[2]||n[1]<=e[1]||n[3]>=e[3])}function _re(n,e){const t=vre(n[0]),r=Cre(n[1]),i=Math.pow(2,e.z);return[Math.round(t*i*I0),Math.round(r*i*I0)]}function bre(n,e,t){const r=n[0]-e[0],i=n[1]-e[1],s=n[0]-t[0],a=n[1]-t[1];return r*a-s*i===0&&r*s<=0&&i*a<=0}function xre(n,e,t){return e[1]>n[1]!=t[1]>n[1]&&n[0]<(t[0]-e[0])*(n[1]-e[1])/(t[1]-e[1])+e[0]}function ZO(n,e){let t=!1;for(let r=0,i=e.length;r<i;r++){const s=e[r];for(let a=0,o=s.length;a<o-1;a++){if(bre(n,s[a],s[a+1]))return!1;xre(n,s[a],s[a+1])&&(t=!t)}}return t}function wre(n,e){for(let t=0;t<e.length;t++)if(ZO(n,e[t]))return!0;return!1}function Mre(n,e){return n[0]*e[1]-n[1]*e[0]}function o9(n,e,t,r){const i=n[0]-t[0],s=n[1]-t[1],a=e[0]-t[0],o=e[1]-t[1],d=r[0]-t[0],g=r[1]-t[1],b=i*g-d*s,E=a*g-d*o;return b>0&&E<0||b<0&&E>0}function Sre(n,e,t,r){const i=[e[0]-n[0],e[1]-n[1]],s=[r[0]-t[0],r[1]-t[1]];return Mre(s,i)===0?!1:!!(o9(n,e,t,r)&&o9(t,r,n,e))}function Ere(n,e,t){for(const r of t)for(let i=0;i<r.length-1;++i)if(Sre(n,e,r[i],r[i+1]))return!0;return!1}function oj(n,e){for(let t=0;t<n.length;++t)if(!ZO(n[t],e))return!1;for(let t=0;t<n.length-1;++t)if(Ere(n[t],n[t+1],e))return!1;return!0}function Bre(n,e){for(let t=0;t<e.length;t++)if(oj(n,e[t]))return!0;return!1}function XO(n,e,t){const r=[];for(let i=0;i<n.length;i++){const s=[];for(let a=0;a<n[i].length;a++){const o=_re(n[i][a],t);HO(e,o),s.push(o)}r.push(s)}return r}function sj(n,e,t){const r=[];for(let i=0;i<n.length;i++){const s=XO(n[i],e,t);r.push(s)}return r}function aj(n,e,t,r){if(n[0]<t[0]||n[0]>t[2]){const i=r*.5;let s=n[0]-t[0]>i?-r:t[0]-n[0]>i?r:0;s===0&&(s=n[0]-t[2]>i?-r:t[2]-n[0]>i?r:0),n[0]+=s}HO(e,n)}function Ore(n){n[0]=n[1]=1/0,n[2]=n[3]=-1/0}function s9(n,e,t,r){const i=Math.pow(2,r.z)*I0,s=[r.x*I0,r.y*I0],a=[];if(!n)return a;for(const o of n)for(const d of o){const g=[d.x+s[0],d.y+s[1]];aj(g,e,t,i),a.push(g)}return a}function a9(n,e,t,r){const i=Math.pow(2,r.z)*I0,s=[r.x*I0,r.y*I0],a=[];if(!n)return a;for(const o of n){const d=[];for(const g of o){const b=[g.x+s[0],g.y+s[1]];HO(e,b),d.push(b)}a.push(d)}if(e[2]-e[0]<=i/2){Ore(e);for(const o of a)for(const d of o)aj(d,e,t,i)}return a}function Ire(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const s=XO(e.coordinates,r,i),a=s9(n.geometry(),t,r,i);if(!_2(t,r))return!1;for(const o of a)if(!ZO(o,s))return!1}if(e.type==="MultiPolygon"){const s=sj(e.coordinates,r,i),a=s9(n.geometry(),t,r,i);if(!_2(t,r))return!1;for(const o of a)if(!wre(o,s))return!1}return!0}function kre(n,e){const t=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=n.canonicalID();if(!i)return!1;if(e.type==="Polygon"){const s=XO(e.coordinates,r,i),a=a9(n.geometry(),t,r,i);if(!_2(t,r))return!1;for(const o of a)if(!oj(o,s))return!1}if(e.type==="MultiPolygon"){const s=sj(e.coordinates,r,i),a=a9(n.geometry(),t,r,i);if(!_2(t,r))return!1;for(const o of a)if(!Bre(o,s))return!1}return!0}class Yv{constructor(e,t){this.type=Qo,this.geojson=e,this.geometries=t}static parse(e,t){if(e.length!==2)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(v2(e[1])){const r=e[1];if(r.type==="FeatureCollection")for(let i=0;i<r.features.length;++i){const s=r.features[i].geometry.type;if(s==="Polygon"||s==="MultiPolygon")return new Yv(r,r.features[i].geometry)}else if(r.type==="Feature"){const i=r.geometry.type;if(i==="Polygon"||i==="MultiPolygon")return new Yv(r,r.geometry)}else if(r.type==="Polygon"||r.type==="MultiPolygon")return new Yv(r,r)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(e.geometry()!=null&&e.canonicalID()!=null){if(e.geometryType()==="Point")return Ire(e,this.geometries);if(e.geometryType()==="LineString")return kre(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var JO=Yv;function zx(n){if(n instanceof Fy){if(n.name==="get"&&n.args.length===1)return!1;if(n.name==="feature-state")return!1;if(n.name==="has"&&n.args.length===1)return!1;if(n.name==="properties"||n.name==="geometry-type"||n.name==="id")return!1;if(/^filter-/.test(n.name))return!1}if(n instanceof JO)return!1;let e=!0;return n.eachChild(t=>{e&&!zx(t)&&(e=!1)}),e}function e8(n){if(n instanceof Fy&&n.name==="feature-state")return!1;let e=!0;return n.eachChild(t=>{e&&!e8(t)&&(e=!1)}),e}function t8(n,e){if(n instanceof Fy&&e.indexOf(n.name)>=0)return!1;let t=!0;return n.eachChild(r=>{t&&!t8(r,e)&&(t=!1)}),t}class n8{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(e,t){if(e.length!==2||typeof e[1]!="string")return t.error("'var' expression requires exactly one string literal argument.");const r=e[1];return t.scope.has(r)?new n8(r,t.scope.get(r)):t.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var lj=n8;class r8{constructor(e,t=[],r,i=new cre,s=[]){this.registry=e,this.path=t,this.key=t.map(a=>`[${a}]`).join(""),this.scope=i,this.errors=s,this.expectedType=r}parse(e,t,r,i,s={}){return t?this.concat(t,r,i)._parse(e,s):this._parse(e,s)}_parse(e,t){(e===null||typeof e=="string"||typeof e=="boolean"||typeof e=="number")&&(e=["literal",e]);function r(i,s,a){return a==="assert"?new Dm(s,[i]):a==="coerce"?new q1(s,[i]):i}if(Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=e[0];if(typeof i!="string")return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const s=this.registry[i];if(s){let a=s.parse(e,this);if(!a)return null;if(this.expectedType){const o=this.expectedType,d=a.type;if((o.kind==="string"||o.kind==="number"||o.kind==="boolean"||o.kind==="object"||o.kind==="array")&&d.kind==="value")a=r(a,o,t.typeAnnotation||"assert");else if((o.kind==="color"||o.kind==="formatted"||o.kind==="resolvedImage")&&(d.kind==="value"||d.kind==="string"))a=r(a,o,t.typeAnnotation||"coerce");else if(this.checkSubtype(o,d))return null}if(!(a instanceof C2)&&a.type.kind!=="resolvedImage"&&eB(a)){const o=new ij;try{a=new C2(a.type,a.evaluate(o))}catch(d){return this.error(d.message),null}}return a}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):typeof e=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){const i=typeof e=="number"?this.path.concat(e):this.path,s=r?this.scope.concat(r):this.scope;return new r8(this.registry,i,t||null,s,this.errors)}error(e,...t){const r=`${this.key}${t.map(i=>`[${i}]`).join("")}`;this.errors.push(new Gp(r,e))}checkSubtype(e,t){const r=_C(e,t);return r&&this.error(r),r}}var uj=r8;function eB(n){if(n instanceof lj)return eB(n.boundExpression);if(n instanceof Fy&&n.name==="error")return!1;if(n instanceof Ux)return!1;if(n instanceof JO)return!1;const e=n instanceof q1||n instanceof Dm;let t=!0;return n.eachChild(r=>{e?t=t&&eB(r):t=t&&r instanceof C2}),t?zx(n)&&t8(n,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]):!1}function Aj(n,e){const t=n.length-1;let r=0,i=t,s=0,a,o;for(;r<=i;)if(s=Math.floor((r+i)/2),a=n[s],o=n[s+1],a<=e){if(s===t||e<o)return s;r=s+1}else if(a>e)i=s-1;else throw new Dc("Input is not a number.");return 0}class i8{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[i,s]of r)this.labels.push(i),this.outputs.push(s)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");const r=t.parse(e[1],1,Pr);if(!r)return null;const i=[];let s=null;t.expectedType&&t.expectedType.kind!=="value"&&(s=t.expectedType);for(let a=1;a<e.length;a+=2){const o=a===1?-1/0:e[a],d=e[a+1],g=a,b=a+1;if(typeof o!="number")return t.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]>=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',g);const E=t.parse(d,b,s);if(!E)return null;s=s||E.type,i.push([o,E])}return new i8(s,r,i)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const s=t.length;if(i>=t[s-1])return r[s-1].evaluate(e);const a=Aj(t,i);return r[a].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){const e=["step",this.input.serialize()];for(let t=0;t<this.labels.length;t++)t>0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}var cj=i8,Tre=Ly;function Ly(n,e,t,r){this.cx=3*n,this.bx=3*(t-n)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(r-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=n,this.p1y=r,this.p2x=t,this.p2y=r}Ly.prototype.sampleCurveX=function(n){return((this.ax*n+this.bx)*n+this.cx)*n};Ly.prototype.sampleCurveY=function(n){return((this.ay*n+this.by)*n+this.cy)*n};Ly.prototype.sampleCurveDerivativeX=function(n){return(3*this.ax*n+2*this.bx)*n+this.cx};Ly.prototype.solveCurveX=function(n,e){typeof e>"u"&&(e=1e-6);var t,r,i,s,a;for(i=n,a=0;a<8;a++){if(s=this.sampleCurveX(i)-n,Math.abs(s)<e)return i;var o=this.sampleCurveDerivativeX(i);if(Math.abs(o)<1e-6)break;i=i-s/o}if(t=0,r=1,i=n,i<t)return t;if(i>r)return r;for(;t<r;){if(s=this.sampleCurveX(i),Math.abs(s-n)<e)return i;n>s?t=i:r=i,i=(r-t)*.5+t}return i};Ly.prototype.solve=function(n,e){return this.sampleCurveY(this.solveCurveX(n,e))};var Pre=tj(Tre);function $h(n,e,t){return n*(1-t)+e*t}function Rre(n,e,t){return new Zh($h(n.r,e.r,t),$h(n.g,e.g,t),$h(n.b,e.b,t),$h(n.a,e.a,t))}function Dre(n,e,t){return n.map((r,i)=>$h(r,e[i],t))}var Kre=Object.freeze({__proto__:null,number:$h,color:Rre,array:Dre});const dj=.95047,hj=1,fj=1.08883,pj=4/29,ay=6/29,mj=3*ay*ay,Fre=ay*ay*ay,Lre=Math.PI/180,Ure=180/Math.PI;function H4(n){return n>Fre?Math.pow(n,1/3):n/mj+pj}function Z4(n){return n>ay?n*n*n:mj*(n-pj)}function X4(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function J4(n){return n/=255,n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function gj(n){const e=J4(n.r),t=J4(n.g),r=J4(n.b),i=H4((.4124564*e+.3575761*t+.1804375*r)/dj),s=H4((.2126729*e+.7151522*t+.072175*r)/hj),a=H4((.0193339*e+.119192*t+.9503041*r)/fj);return{l:116*s-16,a:500*(i-s),b:200*(s-a),alpha:n.a}}function yj(n){let e=(n.l+16)/116,t=isNaN(n.a)?e:e+n.a/500,r=isNaN(n.b)?e:e-n.b/200;return e=hj*Z4(e),t=dj*Z4(t),r=fj*Z4(r),new Zh(X4(3.2404542*t-1.5371385*e-.4985314*r),X4(-.969266*t+1.8760108*e+.041556*r),X4(.0556434*t-.2040259*e+1.0572252*r),n.alpha)}function zre(n,e,t){return{l:$h(n.l,e.l,t),a:$h(n.a,e.a,t),b:$h(n.b,e.b,t),alpha:$h(n.alpha,e.alpha,t)}}function jre(n){const{l:e,a:t,b:r}=gj(n),i=Math.atan2(r,t)*Ure;return{h:i<0?i+360:i,c:Math.sqrt(t*t+r*r),l:e,alpha:n.a}}function Nre(n){const e=n.h*Lre,t=n.c,r=n.l;return yj({l:r,a:Math.cos(e)*t,b:Math.sin(e)*t,alpha:n.alpha})}function Wre(n,e,t){const r=e-n;return n+t*(r>180||r<-180?r-360*Math.round(r/360):r)}function Gre(n,e,t){return{h:Wre(n.h,e.h,t),c:$h(n.c,e.c,t),l:$h(n.l,e.l,t),alpha:$h(n.alpha,e.alpha,t)}}const tb={forward:gj,reverse:yj,interpolate:zre},nb={forward:jre,reverse:Nre,interpolate:Gre};class b2{constructor(e,t,r,i,s){this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(const[a,o]of s)this.labels.push(a),this.outputs.push(o)}static interpolationFactor(e,t,r,i){let s=0;if(e.name==="exponential")s=e5(t,e.base,r,i);else if(e.name==="linear")s=e5(t,1,r,i);else if(e.name==="cubic-bezier"){const a=e.controlPoints;s=new Pre(a[0],a[1],a[2],a[3]).solve(e5(t,1,r,i))}return s}static parse(e,t){let[r,i,s,...a]=e;if(!Array.isArray(i)||i.length===0)return t.error("Expected an interpolation type expression.",1);if(i[0]==="linear")i={name:"linear"};else if(i[0]==="exponential"){const g=i[1];if(typeof g!="number")return t.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 t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:g}}else return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!==0)return t.error("Expected an even number of arguments.");if(s=t.parse(s,2,Pr),!s)return null;const o=[];let d=null;r==="interpolate-hcl"||r==="interpolate-lab"?d=jm:t.expectedType&&t.expectedType.kind!=="value"&&(d=t.expectedType);for(let g=0;g<a.length;g+=2){const b=a[g],E=a[g+1],S=g+3,O=g+4;if(typeof b!="number")return t.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',S);if(o.length&&o[o.length-1][0]>=b)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',S);const k=t.parse(E,O,d);if(!k)return null;d=d||k.type,o.push([b,k])}return d.kind!=="number"&&d.kind!=="color"&&!(d.kind==="array"&&d.itemType.kind==="number"&&typeof d.N=="number")?t.error(`Type ${Xl(d)} is not interpolatable.`):new b2(d,r,i,s,o)}evaluate(e){const t=this.labels,r=this.outputs;if(t.length===1)return r[0].evaluate(e);const i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);const s=t.length;if(i>=t[s-1])return r[s-1].evaluate(e);const a=Aj(t,i),o=t[a],d=t[a+1],g=b2.interpolationFactor(this.interpolation,i,o,d),b=r[a].evaluate(e),E=r[a+1].evaluate(e);return this.operator==="interpolate"?Kre[this.type.kind.toLowerCase()](b,E,g):this.operator==="interpolate-hcl"?nb.reverse(nb.interpolate(nb.forward(b),nb.forward(E),g)):tb.reverse(tb.interpolate(tb.forward(b),tb.forward(E),g))}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}serialize(){let e;this.interpolation.name==="linear"?e=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?e=["linear"]:e=["exponential",this.interpolation.base]:e=["cubic-bezier"].concat(this.interpolation.controlPoints);const t=[this.operator,e,this.input.serialize()];for(let r=0;r<this.labels.length;r++)t.push(this.labels[r],this.outputs[r].serialize());return t}}function e5(n,e,t,r){const i=r-t,s=n-t;return i===0?0:e===1?s/i:(Math.pow(e,s)-1)/(Math.pow(e,i)-1)}var Sg=b2;class x2{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null;const i=t.expectedType;i&&i.kind!=="value"&&(r=i);const s=[];for(const o of e.slice(1)){const d=t.parse(o,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!d)return null;r=r||d.type,s.push(d)}return i&&s.some(o=>_C(i,o.type))?new x2(Yo,s):new x2(r,s)}evaluate(e){let t=null,r=0,i;for(const s of this.args){if(r++,t=s.evaluate(e),t&&t instanceof K0&&!t.available&&(i||(i=t),t=null,r===this.args.length))return i;if(t!==null)break}return t}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}serialize(){const e=["coalesce"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var vj=x2;class o8{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const r=[];for(let s=1;s<e.length-1;s+=2){const a=e[s];if(typeof a!="string")return t.error(`Expected string, but found ${typeof a} instead.`,s);if(/[^a-zA-Z0-9_]/.test(a))return t.error("Variable names must contain only alphanumeric characters or '_'.",s);const o=t.parse(e[s+1],s+1);if(!o)return null;r.push([a,o])}const i=t.parse(e[e.length-1],e.length-1,t.expectedType,r);return i?new o8(r,i):null}outputDefined(){return this.result.outputDefined()}serialize(){const e=["let"];for(const[t,r]of this.bindings)e.push(t,r.serialize());return e.push(this.result.serialize()),e}}var Cj=o8;class s8{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Pr),i=t.parse(e[2],2,xf(t.expectedType||Yo));if(!r||!i)return null;const s=i.type;return new s8(s.itemType,r,i)}evaluate(e){const t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new Dc(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new Dc(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new Dc(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Qre=s8;class a8{constructor(e,t){this.type=Qo,this.needle=e,this.haystack=t}static parse(e,t){if(e.length!==3)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Yo),i=t.parse(e[2],2,Yo);return!r||!i?null:QO(r.type,[Qo,as,Pr,Rx,Yo])?new a8(r,i):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xl(r.type)} instead`)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(r==null)return!1;if(!bC(t,["boolean","string","number","null"]))throw new Dc(`Expected first argument to be of type boolean, string, number or null, but found ${Xl(WA(t))} instead.`);if(!bC(r,["string","array"]))throw new Dc(`Expected second argument to be of type array or string, but found ${Xl(WA(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var qre=a8;class w2{constructor(e,t,r){this.type=Pr,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Yo),i=t.parse(e[2],2,Yo);if(!r||!i)return null;if(!QO(r.type,[Qo,as,Pr,Rx,Yo]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xl(r.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,Pr);return s?new w2(r,i,s):null}else return new w2(r,i)}evaluate(e){const t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!bC(t,["boolean","string","number","null"]))throw new Dc(`Expected first argument to be of type boolean, string, number or null, but found ${Xl(WA(t))} instead.`);if(!bC(r,["string","array"]))throw new Dc(`Expected second argument to be of type array or string, but found ${Xl(WA(r))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(e);return r.indexOf(t,i)}return r.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Yre=w2;class l8{constructor(e,t,r,i,s,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=s,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!==1)return t.error("Expected an even number of arguments.");let r,i;t.expectedType&&t.expectedType.kind!=="value"&&(i=t.expectedType);const s={},a=[];for(let g=2;g<e.length-1;g+=2){let b=e[g];const E=e[g+1];Array.isArray(b)||(b=[b]);const S=t.concat(g);if(b.length===0)return S.error("Expected at least one branch label.");for(const k of b){if(typeof k!="number"&&typeof k!="string")return S.error("Branch labels must be numbers or strings.");if(typeof k=="number"&&Math.abs(k)>Number.MAX_SAFE_INTEGER)return S.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof k=="number"&&Math.floor(k)!==k)return S.error("Numeric branch labels must be integer values.");if(!r)r=WA(k);else if(S.checkSubtype(r,WA(k)))return null;if(typeof s[String(k)]<"u")return S.error("Branch labels must be unique.");s[String(k)]=a.length}const O=t.parse(E,g,i);if(!O)return null;i=i||O.type,a.push(O)}const o=t.parse(e[1],1,Yo);if(!o)return null;const d=t.parse(e[e.length-1],e.length-1,i);return!d||o.type.kind!=="value"&&t.concat(1).checkSubtype(r,o.type)?null:new l8(r,i,o,s,a,d)}evaluate(e){const t=this.input.evaluate(e);return(WA(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["match",this.input.serialize()],t=Object.keys(this.cases).sort(),r=[],i={};for(const a of t){const o=i[this.cases[a]];o===void 0?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[o][1].push(a)}const s=a=>this.inputType.kind==="number"?Number(a):a;for(const[a,o]of r)o.length===1?e.push(s(o[0])):e.push(o.map(s)),e.push(this.outputs[a].serialize());return e.push(this.otherwise.serialize()),e}}var $re=l8;class u8{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!==0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&t.expectedType.kind!=="value"&&(r=t.expectedType);const i=[];for(let a=1;a<e.length-1;a+=2){const o=t.parse(e[a],a,Qo);if(!o)return null;const d=t.parse(e[a+1],a+1,r);if(!d)return null;i.push([o,d]),r=r||d.type}const s=t.parse(e[e.length-1],e.length-1,r);return s?new u8(r,i,s):null}evaluate(e){for(const[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(const[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}serialize(){const e=["case"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var Vre=u8;class M2{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const r=t.parse(e[1],1,Yo),i=t.parse(e[2],2,Pr);if(!r||!i)return null;if(!QO(r.type,[xf(Yo),as,Yo]))return t.error(`Expected first argument to be of type array or string, but found ${Xl(r.type)} instead`);if(e.length===4){const s=t.parse(e[3],3,Pr);return s?new M2(r.type,r,i,s):null}else return new M2(r.type,r,i)}evaluate(e){const t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!bC(t,["string","array"]))throw new Dc(`Expected first argument to be of type array or string, but found ${Xl(WA(t))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(e);return t.slice(r,i)}return t.slice(r)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var Hre=M2;function l9(n,e){return n==="=="||n==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function Zre(n,e,t){return e===t}function Xre(n,e,t){return e!==t}function Jre(n,e,t){return e<t}function eie(n,e,t){return e>t}function tie(n,e,t){return e<=t}function nie(n,e,t){return e>=t}function _j(n,e,t,r){return r.compare(e,t)===0}function rie(n,e,t,r){return!_j(n,e,t,r)}function iie(n,e,t,r){return r.compare(e,t)<0}function oie(n,e,t,r){return r.compare(e,t)>0}function sie(n,e,t,r){return r.compare(e,t)<=0}function aie(n,e,t,r){return r.compare(e,t)>=0}function Uy(n,e,t){const r=n!=="=="&&n!=="!=";return class bj{constructor(s,a,o){this.type=Qo,this.lhs=s,this.rhs=a,this.collator=o,this.hasUntypedArgument=s.type.kind==="value"||a.type.kind==="value"}static parse(s,a){if(s.length!==3&&s.length!==4)return a.error("Expected two or three arguments.");const o=s[0];let d=a.parse(s[1],1,Yo);if(!d)return null;if(!l9(o,d.type))return a.concat(1).error(`"${o}" comparisons are not supported for type '${Xl(d.type)}'.`);let g=a.parse(s[2],2,Yo);if(!g)return null;if(!l9(o,g.type))return a.concat(2).error(`"${o}" comparisons are not supported for type '${Xl(g.type)}'.`);if(d.type.kind!==g.type.kind&&d.type.kind!=="value"&&g.type.kind!=="value")return a.error(`Cannot compare types '${Xl(d.type)}' and '${Xl(g.type)}'.`);r&&(d.type.kind==="value"&&g.type.kind!=="value"?d=new Dm(g.type,[d]):d.type.kind!=="value"&&g.type.kind==="value"&&(g=new Dm(d.type,[g])));let b=null;if(s.length===4){if(d.type.kind!=="string"&&g.type.kind!=="string"&&d.type.kind!=="value"&&g.type.kind!=="value")return a.error("Cannot use collator to compare non-string types.");if(b=a.parse(s[3],3,Dx),!b)return null}return new bj(d,g,b)}evaluate(s){const a=this.lhs.evaluate(s),o=this.rhs.evaluate(s);if(r&&this.hasUntypedArgument){const d=WA(a),g=WA(o);if(d.kind!==g.kind||!(d.kind==="string"||d.kind==="number"))throw new Dc(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${d.kind}, ${g.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const d=WA(a),g=WA(o);if(d.kind!=="string"||g.kind!=="string")return e(s,a,o)}return this.collator?t(s,a,o,this.collator.evaluate(s)):e(s,a,o)}eachChild(s){s(this.lhs),s(this.rhs),this.collator&&s(this.collator)}outputDefined(){return!0}serialize(){const s=[n];return this.eachChild(a=>{s.push(a.serialize())}),s}}}const lie=Uy("==",Zre,_j),uie=Uy("!=",Xre,rie),Aie=Uy("<",Jre,iie),cie=Uy(">",eie,oie),die=Uy("<=",tie,sie),hie=Uy(">=",nie,aie);class A8{constructor(e,t,r,i,s,a){this.type=as,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=s,this.maxFractionDigits=a}static parse(e,t){if(e.length!==3)return t.error("Expected two arguments.");const r=t.parse(e[1],1,Pr);if(!r)return null;const i=e[2];if(typeof i!="object"||Array.isArray(i))return t.error("NumberFormat options argument must be an object.");let s=null;if(i.locale&&(s=t.parse(i.locale,1,as),!s))return null;let a=null;if(i.currency&&(a=t.parse(i.currency,1,as),!a))return null;let o=null;if(i.unit&&(o=t.parse(i.unit,1,as),!o))return null;let d=null;if(i["min-fraction-digits"]&&(d=t.parse(i["min-fraction-digits"],1,Pr),!d))return null;let g=null;return i["max-fraction-digits"]&&(g=t.parse(i["max-fraction-digits"],1,Pr),!g)?null:new A8(r,s,a,o,d,g)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency&&"currency"||this.unit&&"unit"||"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.unit&&(e.unit=this.unit.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}class c8{constructor(e){this.type=Pr,this.input=e}static parse(e,t){if(e.length!==2)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const r=t.parse(e[1],1);return r?r.type.kind!=="array"&&r.type.kind!=="string"&&r.type.kind!=="value"?t.error(`Expected argument of type string or array, but found ${Xl(r.type)} instead.`):new c8(r):null}evaluate(e){const t=this.input.evaluate(e);if(typeof t=="string")return t.length;if(Array.isArray(t))return t.length;throw new Dc(`Expected value to be of type string or array, but found ${Xl(WA(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}serialize(){const e=["length"];return this.eachChild(t=>{e.push(t.serialize())}),e}}var fie=c8;const xj={"==":lie,"!=":uie,">":cie,"<":Aie,">=":hie,"<=":die,array:Dm,at:Qre,boolean:Dm,case:Vre,coalesce:vj,collator:Ux,format:Fx,image:Lx,in:qre,"index-of":Yre,interpolate:Sg,"interpolate-hcl":Sg,"interpolate-lab":Sg,length:fie,let:Cj,literal:C2,match:$re,number:Dm,"number-format":A8,object:Dm,slice:Hre,step:cj,string:Dm,"to-boolean":q1,"to-color":q1,"to-number":q1,"to-string":q1,var:lj,within:JO};function u9(n,[e,t,r,i]){e=e.evaluate(n),t=t.evaluate(n),r=r.evaluate(n);const s=i?i.evaluate(n):1,a=rj(e,t,r,s);if(a)throw new Dc(a);return new Zh(e/255*s,t/255*s,r/255*s,s)}function A9(n,e){return n in e}function t5(n,e){const t=e[n];return typeof t>"u"?null:t}function pie(n,e,t,r){for(;t<=r;){const i=t+r>>1;if(e[i]===n)return!0;e[i]>n?r=i-1:t=i+1}return!1}function ng(n){return{type:n}}Fy.register(xj,{error:[dre,[as],(n,[e])=>{throw new Dc(e.evaluate(n))}],typeof:[as,[Yo],(n,[e])=>Xl(WA(e.evaluate(n)))],"to-rgba":[xf(Pr,4),[jm],(n,[e])=>e.evaluate(n).toArray()],rgb:[jm,[Pr,Pr,Pr],u9],rgba:[jm,[Pr,Pr,Pr,Pr],u9],has:{type:Qo,overloads:[[[as],(n,[e])=>A9(e.evaluate(n),n.properties())],[[as,sy],(n,[e,t])=>A9(e.evaluate(n),t.evaluate(n))]]},get:{type:Yo,overloads:[[[as],(n,[e])=>t5(e.evaluate(n),n.properties())],[[as,sy],(n,[e,t])=>t5(e.evaluate(n),t.evaluate(n))]]},"feature-state":[Yo,[as],(n,[e])=>t5(e.evaluate(n),n.featureState||{})],properties:[sy,[],n=>n.properties()],"geometry-type":[as,[],n=>n.geometryType()],id:[Yo,[],n=>n.id()],zoom:[Pr,[],n=>n.globals.zoom],pitch:[Pr,[],n=>n.globals.pitch||0],"distance-from-center":[Pr,[],n=>n.distanceFromCenter()],"heatmap-density":[Pr,[],n=>n.globals.heatmapDensity||0],"line-progress":[Pr,[],n=>n.globals.lineProgress||0],"sky-radial-progress":[Pr,[],n=>n.globals.skyRadialProgress||0],accumulated:[Yo,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Pr,ng(Pr),(n,e)=>{let t=0;for(const r of e)t+=r.evaluate(n);return t}],"*":[Pr,ng(Pr),(n,e)=>{let t=1;for(const r of e)t*=r.evaluate(n);return t}],"-":{type:Pr,overloads:[[[Pr,Pr],(n,[e,t])=>e.evaluate(n)-t.evaluate(n)],[[Pr],(n,[e])=>-e.evaluate(n)]]},"/":[Pr,[Pr,Pr],(n,[e,t])=>e.evaluate(n)/t.evaluate(n)],"%":[Pr,[Pr,Pr],(n,[e,t])=>e.evaluate(n)%t.evaluate(n)],ln2:[Pr,[],()=>Math.LN2],pi:[Pr,[],()=>Math.PI],e:[Pr,[],()=>Math.E],"^":[Pr,[Pr,Pr],(n,[e,t])=>Math.pow(e.evaluate(n),t.evaluate(n))],sqrt:[Pr,[Pr],(n,[e])=>Math.sqrt(e.evaluate(n))],log10:[Pr,[Pr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN10],ln:[Pr,[Pr],(n,[e])=>Math.log(e.evaluate(n))],log2:[Pr,[Pr],(n,[e])=>Math.log(e.evaluate(n))/Math.LN2],sin:[Pr,[Pr],(n,[e])=>Math.sin(e.evaluate(n))],cos:[Pr,[Pr],(n,[e])=>Math.cos(e.evaluate(n))],tan:[Pr,[Pr],(n,[e])=>Math.tan(e.evaluate(n))],asin:[Pr,[Pr],(n,[e])=>Math.asin(e.evaluate(n))],acos:[Pr,[Pr],(n,[e])=>Math.acos(e.evaluate(n))],atan:[Pr,[Pr],(n,[e])=>Math.atan(e.evaluate(n))],min:[Pr,ng(Pr),(n,e)=>Math.min(...e.map(t=>t.evaluate(n)))],max:[Pr,ng(Pr),(n,e)=>Math.max(...e.map(t=>t.evaluate(n)))],abs:[Pr,[Pr],(n,[e])=>Math.abs(e.evaluate(n))],round:[Pr,[Pr],(n,[e])=>{const t=e.evaluate(n);return t<0?-Math.round(-t):Math.round(t)}],floor:[Pr,[Pr],(n,[e])=>Math.floor(e.evaluate(n))],ceil:[Pr,[Pr],(n,[e])=>Math.ceil(e.evaluate(n))],"filter-==":[Qo,[as,Yo],(n,[e,t])=>n.properties()[e.value]===t.value],"filter-id-==":[Qo,[Yo],(n,[e])=>n.id()===e.value],"filter-type-==":[Qo,[as],(n,[e])=>n.geometryType()===e.value],"filter-<":[Qo,[as,Yo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<i}],"filter-id-<":[Qo,[Yo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<r}],"filter->":[Qo,[as,Yo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>i}],"filter-id->":[Qo,[Yo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>r}],"filter-<=":[Qo,[as,Yo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[Qo,[Yo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t<=r}],"filter->=":[Qo,[as,Yo],(n,[e,t])=>{const r=n.properties()[e.value],i=t.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[Qo,[Yo],(n,[e])=>{const t=n.id(),r=e.value;return typeof t==typeof r&&t>=r}],"filter-has":[Qo,[Yo],(n,[e])=>e.value in n.properties()],"filter-has-id":[Qo,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Qo,[xf(as)],(n,[e])=>e.value.indexOf(n.geometryType())>=0],"filter-id-in":[Qo,[xf(Yo)],(n,[e])=>e.value.indexOf(n.id())>=0],"filter-in-small":[Qo,[as,xf(Yo)],(n,[e,t])=>t.value.indexOf(n.properties()[e.value])>=0],"filter-in-large":[Qo,[as,xf(Yo)],(n,[e,t])=>pie(n.properties()[e.value],t.value,0,t.value.length-1)],all:{type:Qo,overloads:[[[Qo,Qo],(n,[e,t])=>e.evaluate(n)&&t.evaluate(n)],[ng(Qo),(n,e)=>{for(const t of e)if(!t.evaluate(n))return!1;return!0}]]},any:{type:Qo,overloads:[[[Qo,Qo],(n,[e,t])=>e.evaluate(n)||t.evaluate(n)],[ng(Qo),(n,e)=>{for(const t of e)if(t.evaluate(n))return!0;return!1}]]},"!":[Qo,[Qo],(n,[e])=>!e.evaluate(n)],"is-supported-script":[Qo,[as],(n,[e])=>{const t=n.globals&&n.globals.isSupportedScript;return t?t(e.evaluate(n)):!0}],upcase:[as,[as],(n,[e])=>e.evaluate(n).toUpperCase()],downcase:[as,[as],(n,[e])=>e.evaluate(n).toLowerCase()],concat:[as,ng(Yo),(n,e)=>e.map(t=>qv(t.evaluate(n))).join("")],"resolved-locale":[as,[Dx],(n,[e])=>e.evaluate(n).resolvedLocale()]});var wj=xj;function tB(n){return{result:"success",value:n}}function j1(n){return{result:"error",value:n}}function mie(n){return n["property-type"]==="data-driven"}function gie(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function yie(n){return!!n.expression&&n.expression.interpolated}function Mj(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}class vie{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new ij,this._defaultValue=t?xie(t):null,this._enumValues=t&&t.type==="enum"?t.values:null}evaluateWithoutErrorHandling(e,t,r,i,s,a,o,d){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=a,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=d||null,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,s,a,o,d){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=s||null,this._evaluator.formattedSection=a||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=d||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 Dc(`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 Cie(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in wj}function nB(n,e){const t=new uj(wj,[],e?bie(e):void 0),r=t.parse(n,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return r?tB(new vie(r,e)):j1(t.errors)}class c9{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent=e!=="constant"&&!e8(t.expression)}evaluateWithoutErrorHandling(e,t,r,i,s,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,s,a)}evaluate(e,t,r,i,s,a){return this._styleExpression.evaluate(e,t,r,i,s,a)}}class d9{constructor(e,t,r,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent=e!=="camera"&&!e8(t.expression),this.interpolationType=i}evaluateWithoutErrorHandling(e,t,r,i,s,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,s,a)}evaluate(e,t,r,i,s,a){return this._styleExpression.evaluate(e,t,r,i,s,a)}interpolationFactor(e,t,r){return this.interpolationType?Sg.interpolationFactor(this.interpolationType,e,t,r):0}}function _ie(n,e){if(n=nB(n,e),n.result==="error")return n;const t=n.value.expression,r=zx(t);if(!r&&!mie(e))return j1([new Gp("","data expressions not supported")]);const i=t8(t,["zoom","pitch","distance-from-center"]);if(!i&&!gie(e))return j1([new Gp("","zoom expressions not supported")]);const s=Sb(t);if(!s&&!i)return j1([new Gp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof Gp)return j1([s]);if(s instanceof Sg&&!yie(e))return j1([new Gp("",'"interpolate" expressions cannot be used with this property')]);if(!s)return tB(r?new c9("constant",n.value):new c9("source",n.value));const a=s instanceof Sg?s.interpolation:void 0;return tB(r?new d9("camera",n.value,s.labels,a):new d9("composite",n.value,s.labels,a))}function Sb(n){let e=null;if(n instanceof Cj)e=Sb(n.result);else if(n instanceof vj){for(const t of n.args)if(e=Sb(t),e)break}else(n instanceof cj||n instanceof Sg)&&n.input instanceof Fy&&n.input.name==="zoom"&&(e=n);return e instanceof Gp||n.eachChild(t=>{const r=Sb(t);r instanceof Gp?e=r:!e&&r?e=new Gp("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Gp("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function bie(n){const e={color:jm,string:as,number:Pr,enum:as,boolean:Qo,formatted:Kx,resolvedImage:XC};return n.type==="array"?xf(e[n.value]||Yo,n.length):e[n.type]}function xie(n){return n.type==="color"&&(Mj(n.default)||Array.isArray(n.default))?new Zh(0,0,0,0):n.type==="color"?Zh.parse(n.default)||null:n.default===void 0?null:n.default}function wie(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function rB(n){if(Array.isArray(n))return n.map(rB);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const e={};for(const t in n)e[t]=rB(n[t]);return e}return wie(n)}var Sj={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},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_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{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"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],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","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{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"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!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},"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}},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}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"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"},"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},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},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:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},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:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",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,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,"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,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,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-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"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function Ej(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const e of n.slice(1))if(!Ej(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}function Mie(n,e="fill"){if(n==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};Ej(n)||(n=S2(n));const t=n;let r=!0;try{r=Sie(t)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.
|
||
This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md
|
||
and paste the contents of this message in the report.
|
||
Thank you!
|
||
Filter Expression:
|
||
${JSON.stringify(t,null,2)}
|
||
`)}const i=Sj[`filter_${e}`],s=nB(r,i);let a=null;if(s.result==="error")throw new Error(s.value.map(b=>`${b.key}: ${b.message}`).join(", "));a=(b,E,S)=>s.value.evaluate(b,E,{},S);let o=null,d=null;if(r!==t){const b=nB(t,i);if(b.result==="error")throw new Error(b.value.map(E=>`${E.key}: ${E.message}`).join(", "));o=(E,S,O,k,U)=>b.value.evaluate(E,S,{},O,void 0,void 0,k,U),d=!zx(b.value.expression)}a=a;const g=Ij(r);return{filter:a,dynamicFilter:o||void 0,needGeometry:g,needFeature:!!d}}function Sie(n){if(!ly(n))return n;let e=rB(n);return Oj(e),e=Bj(e),e}function Bj(n){if(!Array.isArray(n))return n;const e=Oie(n);return e===!0?e:e.map(t=>Bj(t))}function Oj(n){let e=!1;const t=[];if(n[0]==="case"){for(let r=1;r<n.length-1;r+=2)e=e||ly(n[r]),t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="match"){e=e||ly(n[1]);for(let r=2;r<n.length-1;r+=2)t.push(n[r+1]);t.push(n[n.length-1])}else if(n[0]==="step"){e=e||ly(n[1]);for(let r=1;r<n.length-1;r+=2)t.push(n[r+1])}e&&(n.length=0,n.push("any",...t));for(let r=1;r<n.length;r++)Oj(n[r])}function ly(n){if(!Array.isArray(n))return!1;if(Eie(n[0]))return!0;for(let e=1;e<n.length;e++){const t=n[e];if(ly(t))return!0}return!1}function Eie(n){return n==="pitch"||n==="distance-from-center"}const Bie=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Oie(n){if(Bie.has(n[0]))for(let e=1;e<n.length;e++){const t=n[e];if(ly(t))return!0}return n}function Iie(n,e){return n<e?-1:n>e?1:0}function Ij(n){if(!Array.isArray(n))return!1;if(n[0]==="within")return!0;for(let e=1;e<n.length;e++)if(Ij(n[e]))return!0;return!1}function S2(n){if(!n)return!0;const e=n[0];return n.length<=1?e!=="any":e==="=="?n5(n[1],n[2],"=="):e==="!="?rb(n5(n[1],n[2],"==")):e==="<"||e===">"||e==="<="||e===">="?n5(n[1],n[2],e):e==="any"?kie(n.slice(1)):e==="all"?["all"].concat(n.slice(1).map(S2)):e==="none"?["all"].concat(n.slice(1).map(S2).map(rb)):e==="in"?h9(n[1],n.slice(2)):e==="!in"?rb(h9(n[1],n.slice(2))):e==="has"?f9(n[1]):e==="!has"?rb(f9(n[1])):e==="within"?n:!0}function n5(n,e,t){switch(n){case"$type":return[`filter-type-${t}`,e];case"$id":return[`filter-id-${t}`,e];default:return[`filter-${t}`,n,e]}}function kie(n){return["any"].concat(n.map(S2))}function h9(n,e){if(e.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(t=>typeof t!=typeof e[0])?["filter-in-large",n,["literal",e.sort(Iie)]]:["filter-in-small",n,["literal",e]]}}function f9(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function rb(n){return["!",n]}var Tie=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Pie(n,e){const t={};for(const r in n)r!=="ref"&&(t[r]=n[r]);return Tie.forEach(r=>{r in e&&(t[r]=e[r])}),t}function kj(n){n=n.slice();const e=Object.create(null);for(let t=0;t<n.length;t++)e[n[t].id]=n[t];for(let t=0;t<n.length;t++)"ref"in n[t]&&(n[t]=Pie(n[t],e[n[t].ref]));return n}var p9={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},dv=" ",m9=/(italic|oblique)$/i,g9={},Rie=function(n,e,t){var r=g9[n];if(!r){Array.isArray(n)||(n=[n]);for(var i=400,s="normal",a=[],o,d,g=0,b=n.length;g<b;++g){var E=n[g],S=E.split(" "),O=S[S.length-1].toLowerCase();O=="normal"||O=="italic"||O=="oblique"?(s=d?s:O,d=!0,S.pop(),O=S[S.length-1].toLowerCase()):m9.test(O)&&(O=O.replace(m9,""),s=d?s:S[S.length-1].replace(O,""),d=!0);for(var k in p9){var U=S.length>1?S[S.length-2].toLowerCase():"";if(O==k||O==k.replace("-","")||U+"-"+O==k){i=o?i:p9[k],S.pop(),U&&k.startsWith(U)&&S.pop();break}}!o&&typeof O=="number"&&(i=O,o=!0);var z=S.join(dv).replace("Klokantech Noto Sans","Noto Sans");z.indexOf(dv)!==-1&&(z='"'+z+'"'),a.push(z)}r=g9[n]=[s,i,a]}return r[0]+dv+r[1]+dv+e+"px"+(t?"/"+t:"")+dv+r[2]},iB=tj(Rie);const Tj="https://api.mapbox.com";function d8(n){const e="mapbox://";return n.indexOf(e)!==0?"":n.slice(e.length)}function Die(n,e,t){const r=d8(n);if(!r)return decodeURI(new URL(n,t).href);const i="sprites/";if(r.indexOf(i)!==0)throw new Error(`unexpected sprites url: ${n}`);const s=r.slice(i.length);return`${Tj}/styles/v1/${s}/sprite?access_token=${e}`}function E2(n,e){const t=d8(n);if(!t)return decodeURI(new URL(n,location.href).href);const r="styles/";if(t.indexOf(r)!==0)throw new Error(`unexpected style url: ${n}`);const i=t.slice(r.length);return`${Tj}/styles/v1/${i}?&access_token=${e}`}const Kie=["a","b","c","d"];function Eb(n,e,t,r){const i=new URL(n,r),s=d8(n);if(!s)return e?(i.searchParams.has(t)||i.searchParams.set(t,e),[decodeURI(i.href)]):[decodeURI(i.href)];if(s==="mapbox.satellite"){const a=window.devicePixelRatio>=1.5?"@2x":"";return[`https://api.mapbox.com/v4/${s}/{z}/{x}/{y}${a}.webp?access_token=${e}`]}return Kie.map(a=>`https://${a}.tiles.mapbox.com/v4/${s}/{z}/{x}/{y}.vector.pbf?access_token=${e}`)}const y9={},v9={};let Fie=0;function h8(n){return n.id||(n.id=Fie++),n.id}function Lie(n,e){return h8(n)+"."+Lo(e)}function Pj(n){let e=y9[n.id];return e||(e={},y9[h8(n)]=e),e}function Uie(n){let e=v9[n.id];return e||(e={},v9[h8(n)]=e),e}function r5(n){return n*Math.PI/180}const Jp=function(){const n=[];for(let e=78271.51696402048;n.length<=24;e/=2)n.push(e);return n}();function jx(n,e){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(n,e);const t=document.createElement("canvas");return t.width=n,t.height=e,t}function f8(n,e){let t=0;const r=e.length;for(;t<r;++t)if(e[t]<n&&t+1<r){const s=e[t]/e[t+1];return t+Math.log(e[t]/n)/Math.log(s)}return r-1}function Iv(n,e){const t=Math.floor(n),r=Math.pow(2,n-t);return e[t]/r}const p1={};function wy(n,e,t={},r){if(e in p1)return r&&(r.request=p1[e][0]),p1[e][1];const i=t.transformRequest&&t.transformRequest(e,n)||e,s=yy(()=>i).then(a=>(a instanceof Request||(a=new Request(a)),a.headers.get("Accept")||a.headers.set("Accept","application/json"),r&&(r.request=a),fetch(a).then(function(o){return delete p1[e],o.ok?o.json():Promise.reject(new Error("Error fetching source "+e))}).catch(function(o){return delete p1[e],Promise.reject(new Error("Error fetching source "+e))})));return p1[e]=[i,s],s}function Rj(n,e){if(typeof n=="string")if(n.trim().startsWith("{"))try{const t=JSON.parse(n);return Promise.resolve(t)}catch(t){return Promise.reject(t)}else return n=E2(n,e.accessToken),wy("Style",n,e);else return Promise.resolve(n)}const C9={};function Dj(n,e,t={}){const r=[e,JSON.stringify(n)].toString();let i=C9[r];if(!i||t.transformRequest){let s;t.transformRequest&&(s=(o,d)=>{const g=t.transformRequest&&t.transformRequest(d,"Tiles")||d;if(o instanceof Fz)o.setLoader((b,E,S)=>{yy(()=>g).then(O=>{fetch(O).then(k=>k.arrayBuffer()).then(k=>{const z=o.getFormat().readFeatures(k,{extent:b,featureProjection:S});o.setFeatures(z)}).catch(k=>o.setState(xr.ERROR))})});else{const b=o.getImage();yy(()=>g).then(E=>{E instanceof Request?fetch(E).then(S=>S.blob()).then(S=>{const O=URL.createObjectURL(S);b.addEventListener("load",()=>URL.revokeObjectURL(O)),b.addEventListener("error",()=>URL.revokeObjectURL(O)),b.src=O}).catch(S=>o.setState(xr.ERROR)):b.src=E})}});const a=n.url;if(a&&!n.tiles){const o=Eb(a,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(a.startsWith("mapbox://"))i=Promise.resolve({tileJson:Object.assign({},n,{url:void 0,tiles:o}),tileLoadFunction:s});else{const d={};i=wy("Source",o[0],t,d).then(function(g){return g.tiles=g.tiles.map(function(b){return g.scheme==="tms"&&(b=b.replace("{y}","{-y}")),Eb(b,t.accessToken,t.accessTokenParam||"access_token",d.request.url)[0]}),Promise.resolve({tileJson:g,tileLoadFunction:s})})}}else n=Object.assign({},n,{tiles:n.tiles.map(function(o){return n.scheme==="tms"&&(o=o.replace("{y}","{-y}")),Eb(o,t.accessToken,t.accessTokenParam||"access_token",e||location.href)[0]})}),i=Promise.resolve({tileJson:Object.assign({},n),tileLoadFunction:s});C9[r]=i}return i}function _9(n,e,t,r){const i=[2*t*e.pixelRatio+e.width,2*t*e.pixelRatio+e.height],s=jx(i[0],i[1]),a=s.getContext("2d");a.drawImage(n,e.x,e.y,e.width,e.height,t*e.pixelRatio,t*e.pixelRatio,e.width,e.height);const o=a.getImageData(0,0,i[0],i[1]);a.globalCompositeOperation="destination-over",a.fillStyle=`rgba(${r.r*255},${r.g*255},${r.b*255},${r.a})`;const d=o.data;for(let g=0,b=o.width;g<b;++g)for(let E=0,S=o.height;E<S;++E){const O=(E*b+g)*4;d[O+3]>0&&a.arc(g,E,t*e.pixelRatio,0,2*Math.PI)}return a.fill(),s}function zie(n,e,t){const r=Math.max(0,Math.min(1,(t-n)/(e-n)));return r*r*(3-2*r)}function b9(n,e,t){const r=jx(e.width,e.height),i=r.getContext("2d");i.drawImage(n,e.x,e.y,e.width,e.height,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),a=s.data;for(let o=0,d=s.width;o<d;++o)for(let g=0,b=s.height;g<b;++g){const E=(g*d+o)*4,S=a[E+3]/255,O=.75,k=.1,U=zie(O-k,O+k,S);U>0?(a[E+0]=Math.round(255*t.r*U),a[E+1]=Math.round(255*t.g*U),a[E+2]=Math.round(255*t.b*U),a[E+3]=Math.round(255*U)):a[E+3]=0}return i.putImageData(s,0,0),r}const jie=Array(256).join(" ");function oB(n,e){if(e>=.05){let t="";const r=n.split(`
|
||
`),i=jie.slice(0,Math.round(e/.1));for(let s=0,a=r.length;s<a;++s)s>0&&(t+=`
|
||
`),t+=r[s].split("").join(i);return t}return n}let i5;function Kj(){return i5||(i5=jx(1,1).getContext("2d")),i5}function rg(n,e){return Kj().measureText(n).width+(n.length-1)*e}const x9={};function sB(n,e,t,r){if(n.indexOf(`
|
||
`)!==-1){const a=n.split(`
|
||
`),o=[];for(let d=0,g=a.length;d<g;++d)o.push(sB(a[d],e,t,r));return o.join(`
|
||
`)}const i=t+","+e+","+n+","+r;let s=x9[i];if(!s){const a=n.split(" ");if(a.length>1){const o=Kj();o.font=e;const g=o.measureText("M").width*t;let b="";const E=[];for(let S=0,O=a.length;S<O;++S){const k=a[S],U=b+(b?" ":"")+k;rg(U,r)<=g?b=U:(b&&E.push(b),b=k)}b&&E.push(b);for(let S=0,O=E.length;S<O&&O>1;++S){const k=E[S];if(rg(k,r)<g*.35){const U=S>0?rg(E[S-1],r):1/0,z=S<O-1?rg(E[S+1],r):1/0;E.splice(S,1),O-=1,U<z?(E[S-1]+=" "+k,S-=1):E[S]=k+" "+E[S]}}for(let S=0,O=E.length-1;S<O;++S){const k=E[S],U=E[S+1];if(rg(k,r)>g*.7&&rg(U,r)<g*.6){const z=k.split(" "),q=z.pop();rg(q,r)<g*.2&&(E[S]=z.join(" "),E[S+1]=q+" "+U),O-=1}}s=E.join(`
|
||
`)}else s=n;s=oB(s,r),x9[i]=s}return s}const Nie=/font-family: ?([^;]*);/,Wie=/("|')/g;let ib;function Gie(n){if(!ib){ib={};const e=document.styleSheets;for(let t=0,r=e.length;t<r;++t){const i=e[t];try{const s=i.rules||i.cssRules;if(s)for(let a=0,o=s.length;a<o;++a){const d=s[a];if(d.type==5){const g=d.cssText.match(Nie);ib[g[1].replace(Wie,"")]=!0}}}catch{}}}return n in ib}const o5={};function Qie(n,e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css"){const t=n.toString();if(t in o5)return o5[t];const r=[];for(let i=0,s=n.length;i<s;++i){n[i]=n[i].replace("Arial Unicode MS","Arial");const a=n[i],o=iB(a,1);OU(o);const d=o.split(" ");r.push([d.slice(3).join(" ").replace(/"/g,""),d[1],d[0]])}for(let i=0,s=r.length;i<s;++i){const a=r[i],o=a[0];if(!Gie(o)&&Kp.get(`${a[2]}
|
||
${a[1]}
|
||
${o}`)!==100){const d=e.replace("{font-family}",o.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",o.replace(/ /g,"+")).replace("{fontweight}",a[1]).replace("{-fontstyle}",a[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",a[2]);if(!document.querySelector('link[href="'+d+'"]')){const g=document.createElement("link");g.href=d,g.rel="stylesheet",document.head.appendChild(g)}}}return o5[t]=n,n}const qie={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Yie={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]},$ie=function(n,e){const t=_ie(n,e);if(t.result==="error")throw new Error(t.value.map(r=>`${r.key}: ${r.message}`).join(", "));return t.value},aB={},B2={zoom:0};let ob,s5;function _i(n,e,t,r,i,s,a){const o=n.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[o]||(s[o]={});const d=s[o];if(!d[t]){let g=(n[e]||aB)[t];const b=Sj[`${e}_${n.type}`][t];g===void 0&&(g=b.default);let E=Cie(g);if(!E&&Mj(g)&&(g=ire(g,b),E=!0),E){const S=$ie(g,b);d[t]=S.evaluate.bind(S)}else b.type=="color"&&(g=Zh.parse(g)),d[t]=function(){return g}}return B2.zoom=r,d[t](B2,i,a)}function w9(n,e,t,r,i){return _i(n,"layout",`${r}-allow-overlap`,e,t,i)?_i(n,"layout",`${r}-ignore-placement`,e,t,i)?"none":"obstacle":"declutter"}function Vie(n,e,t,r,i){return i||console.warn("No filterCache provided to evaluateFilter()"),n in i||(i[n]=Mie(e).filter),B2.zoom=r,i[n](B2,t)}function m0(n,e){if(n){if(n.a===0||e===0)return;const t=n.a;return e=e===void 0?1:e,t===0?"transparent":"rgba("+Math.round(n.r*255/t)+","+Math.round(n.g*255/t)+","+Math.round(n.b*255/t)+","+t*e+")"}return n}const Hie=/\{[^{}}]*\}/g;function a5(n,e){return n.replace(Hie,function(t){return e[t.slice(1,-1)]||""})}const Zie={};function Xie(n,e,t,r=Jp,i=void 0,s=void 0,a=void 0,o=void 0){if(typeof e=="string"&&(e=JSON.parse(e)),e.version!=8)throw new Error("glStyle version 8 required.");Zie[Lie(e,n)]=Array.from(arguments);let d,g,b;if(s){if(typeof Image<"u"){const N=new Image;let ie;yy(()=>s).then(he=>{he instanceof Request?fetch(he).then(de=>de.blob()).then(de=>{ie=URL.createObjectURL(de),N.src=ie}).catch(()=>{}):(N.crossOrigin="anonymous",N.src=he,ie&&URL.revokeObjectURL(ie))}),N.onload=function(){d=N,g=[N.width,N.height],n.changed(),N.onload=null}}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const N=self;N.postMessage({action:"loadImage",src:s}),N.addEventListener("message",function(he){he.data.action==="imageLoaded"&&he.data.src===s&&(d=he.data.image,g=[d.width,d.height])})}}const E=kj(e.layers),S={},O=[],k={},U={},z=Pj(e),q=Uie(e);let Q;for(let N=0,ie=E.length;N<ie;++N){const he=E[N],de=he.id;if(typeof t=="string"&&he.source==t||Array.isArray(t)&&t.indexOf(de)!==-1){const Me=he["source-layer"];if(Q){if(he.source!==Q)throw new Error(`Layer "${de}" does not use source "${Q}`)}else{Q=he.source;const xe=e.sources[Q];if(!xe)throw new Error(`Source "${Q}" is not defined`);const De=xe.type;if(De!=="vector"&&De!=="geojson")throw new Error(`Source "${Q}" is not of type "vector" or "geojson", but "${De}"`)}let fe=S[Me];fe||(fe=[],S[Me]=fe),fe.push({layer:he,index:N}),O.push(de)}}const re=new b0,X=new Km,Y=[],ee=function(N,ie,he){const de=N.getProperties(),Me=S[de.layer];if(!Me)return;let fe=r.indexOf(ie);fe==-1&&(fe=f8(ie,r));const xe=qie[N.getGeometry().getType()],De={id:N.getId(),properties:de,type:xe},me=n.get("mapbox-featurestate")[N.getId()];let at=-1;for(let Qe=0,He=Me.length;Qe<He;++Qe){const We=Me[Qe],Ce=We.layer,Te=Ce.id;if(he!==void 0&&he!==Te)continue;const rt=Ce.layout||aB,yt=Ce.paint||aB;if(rt.visibility==="none"||"minzoom"in Ce&&fe<Ce.minzoom||"maxzoom"in Ce&&fe>=Ce.maxzoom)continue;const bt=Ce.filter;if(!bt||Vie(Te,bt,De,fe,q)){let gt,Dt,Pt,Le,Pe,Ee;const nt=We.index;if(xe==3&&(Ce.type=="fill"||Ce.type=="fill-extrusion"))if(Dt=_i(Ce,"paint",Ce.type+"-opacity",fe,De,z,me),Ce.type+"-pattern"in yt){const wr=_i(Ce,"paint",Ce.type+"-pattern",fe,De,z,me);if(wr){const Qn=typeof wr=="string"?a5(wr,de):wr.toString();if(d&&i&&i[Qn]){++at,Ee=Y[at],(!Ee||!Ee.getFill()||Ee.getStroke()||Ee.getText())&&(Ee=new Qh({fill:new Km}),Y[at]=Ee),Pt=Ee.getFill(),Ee.setZIndex(nt);const Xn=Qn+"."+Dt;let Ge=U[Xn];if(!Ge){const Ae=i[Qn],pe=jx(Ae.width,Ae.height),et=pe.getContext("2d");et.globalAlpha=Dt,et.drawImage(d,Ae.x,Ae.y,Ae.width,Ae.height,0,0,Ae.width,Ae.height),Ge=et.createPattern(pe,"repeat"),U[Xn]=Ge}Pt.setColor(Ge)}}}else gt=m0(_i(Ce,"paint",Ce.type+"-color",fe,De,z,me),Dt),Ce.type+"-outline-color"in yt&&(Pe=m0(_i(Ce,"paint",Ce.type+"-outline-color",fe,De,z,me),Dt)),Pe||(Pe=gt),(gt||Pe)&&(++at,Ee=Y[at],(!Ee||gt&&!Ee.getFill()||!gt&&Ee.getFill()||Pe&&!Ee.getStroke()||!Pe&&Ee.getStroke()||Ee.getText())&&(Ee=new Qh({fill:gt?new Km:void 0,stroke:Pe?new b0:void 0}),Y[at]=Ee),gt&&(Pt=Ee.getFill(),Pt.setColor(gt)),Pe&&(Le=Ee.getStroke(),Le.setColor(Pe),Le.setWidth(.5)),Ee.setZIndex(nt));if(xe!=1&&Ce.type=="line"){"line-pattern"in yt?gt=void 0:gt=m0(_i(Ce,"paint","line-color",fe,De,z,me),_i(Ce,"paint","line-opacity",fe,De,z,me));const wr=_i(Ce,"paint","line-width",fe,De,z,me);gt&&wr>0&&(++at,Ee=Y[at],(!Ee||!Ee.getStroke()||Ee.getFill()||Ee.getText())&&(Ee=new Qh({stroke:new b0}),Y[at]=Ee),Le=Ee.getStroke(),Le.setLineCap(_i(Ce,"layout","line-cap",fe,De,z,me)),Le.setLineJoin(_i(Ce,"layout","line-join",fe,De,z,me)),Le.setMiterLimit(_i(Ce,"layout","line-miter-limit",fe,De,z,me)),Le.setColor(gt),Le.setWidth(wr),Le.setLineDash(yt["line-dasharray"]?_i(Ce,"paint","line-dasharray",fe,De,z,me).map(function(Qn){return Qn*wr}):null),Ee.setZIndex(nt))}let _t=!1,ht=null,Ut=0,en,Ft,mn;if((xe==1||xe==2)&&"icon-image"in rt){const wr=_i(Ce,"layout","icon-image",fe,De,z,me);if(wr){en=typeof wr=="string"?a5(wr,de):wr.toString();let Qn;const Xn=o?o(n,en):void 0;if(d&&i&&i[en]||Xn){const Ge=_i(Ce,"layout","icon-rotation-alignment",fe,De,z,me);if(xe==2){const Ae=N.getGeometry();if(Ae.getFlatMidpoint||Ae.getFlatMidpoints){const pe=Ae.getExtent();if(Math.sqrt(Math.max(Math.pow((pe[2]-pe[0])/ie,2),Math.pow((pe[3]-pe[1])/ie,2)))>150){const St=Ae.getType()==="MultiLineString"?Ae.getFlatMidpoints():Ae.getFlatMidpoint();if(s5||(ob=[NaN,NaN],s5=new sd("Point",ob,[],2,{},void 0)),Qn=s5,ob[0]=St[0],ob[1]=St[1],_i(Ce,"layout","symbol-placement",fe,De,z,me)==="line"&&Ge==="map"){const rn=Ae.getStride(),er=Ae.getFlatCoordinates();for(let Be=0,oe=er.length-rn;Be<oe;Be+=rn){const ve=er[Be],p=er[Be+1],je=er[Be+rn],Ye=er[Be+rn+1],tt=Math.min(ve,je),ct=Math.max(ve,je),At=St[0],Gt=St[1],$t=(Ye-p)*(At-ve)-(je-ve)*(Gt-p);if(Math.abs($t)<.001&&At<=ct&&At>=tt){Ut=Math.atan2(p-Ye,je-ve);break}}}}}}if(xe!==2||Qn){const Ae=_i(Ce,"layout","icon-size",fe,De,z,me),pe=yt["icon-color"]!==void 0?_i(Ce,"paint","icon-color",fe,De,z,me):null;if(!pe||pe.a!==0){const et=_i(Ce,"paint","icon-halo-color",fe,De,z,me),St=_i(Ce,"paint","icon-halo-width",fe,De,z,me);let Yt=`${en}.${Ae}.${St}.${et}`;if(pe!==null&&(Yt+=`.${pe}`),Ft=k[Yt],!Ft){const rn=w9(Ce,fe,De,"icon",z);let er;"icon-offset"in rt&&(er=_i(Ce,"layout","icon-offset",fe,De,z,me).slice(0),er[0]*=Ae,er[1]*=-Ae);let Be=pe?[pe.r*255,pe.g*255,pe.b*255,pe.a]:void 0;if(Xn){const oe={color:Be,rotateWithView:Ge==="map",displacement:er,declutterMode:rn,scale:Ae};typeof Xn=="string"?oe.src=Xn:(oe.img=Xn,oe.imgSize=[Xn.width,Xn.height]),Ft=new r2(oe)}else{const oe=i[en];let ve,p,je;St?oe.sdf?(ve=_9(b9(d,oe,pe||[0,0,0,1]),{x:0,y:0,width:oe.width,height:oe.height,pixelRatio:oe.pixelRatio},St,et),Be=void 0):ve=_9(d,oe,St,et):(oe.sdf?(b||(b=b9(d,{x:0,y:0,width:g[0],height:g[1]},{r:1,g:1,b:1,a:1})),ve=b):ve=d,p=[oe.width,oe.height],je=[oe.x,oe.y]),Ft=new r2({color:Be,img:ve,imgSize:g,size:p,offset:je,rotateWithView:Ge==="map",scale:Ae/oe.pixelRatio,displacement:er,declutterMode:rn})}k[Yt]=Ft}}Ft&&(++at,Ee=Y[at],(!Ee||!Ee.getImage()||Ee.getFill()||Ee.getStroke())&&(Ee=new Qh,Y[at]=Ee),Ee.setGeometry(Qn),Ft.setRotation(Ut+r5(_i(Ce,"layout","icon-rotate",fe,De,z,me))),Ft.setOpacity(_i(Ce,"paint","icon-opacity",fe,De,z,me)),Ft.setAnchor(Yie[_i(Ce,"layout","icon-anchor",fe,De,z,me)]),Ee.setImage(Ft),ht=Ee.getText(),Ee.setText(void 0),Ee.setZIndex(nt),_t=!0,mn=!1)}else mn=!0}}}if(xe==1&&Ce.type==="circle"){++at,Ee=Y[at],(!Ee||!Ee.getImage()||Ee.getFill()||Ee.getStroke())&&(Ee=new Qh,Y[at]=Ee);const wr="circle-radius"in yt?_i(Ce,"paint","circle-radius",fe,De,z,me):5,Qn=m0(_i(Ce,"paint","circle-stroke-color",fe,De,z,me),_i(Ce,"paint","circle-stroke-opacity",fe,De,z,me)),Xn=_i(Ce,"paint","circle-translate",fe,De,z,me),Ge=m0(_i(Ce,"paint","circle-color",fe,De,z,me),_i(Ce,"paint","circle-opacity",fe,De,z,me)),Ae=_i(Ce,"paint","circle-stroke-width",fe,De,z,me),pe=wr+"."+Qn+"."+Ge+"."+Ae+"."+Xn[0]+"."+Xn[1];Ft=k[pe],Ft||(Ft=new NC({radius:wr,displacement:[Xn[0],-Xn[1]],stroke:Qn&&Ae>0?new b0({width:Ae,color:Qn}):void 0,fill:Ge?new Km({color:Ge}):void 0,declutterMode:"none"}),k[pe]=Ft),Ee.setImage(Ft),ht=Ee.getText(),Ee.setText(void 0),Ee.setGeometry(void 0),Ee.setZIndex(nt),_t=!0}let jn,nn,ir,Dn,fn,Hn;if("text-field"in rt){Dn=Math.round(_i(Ce,"layout","text-size",fe,De,z,me));const wr=_i(Ce,"layout","text-font",fe,De,z,me);ir=_i(Ce,"layout","text-line-height",fe,De,z,me),nn=iB(a?a(wr,e.metadata?e.metadata["ol:webfonts"]:void 0):wr,Dn,ir),nn.includes("sans-serif")||(nn+=",sans-serif"),fn=_i(Ce,"layout","text-letter-spacing",fe,De,z,me),Hn=_i(Ce,"layout","text-max-width",fe,De,z,me);const Qn=_i(Ce,"layout","text-field",fe,De,z,me);typeof Qn=="object"&&Qn.sections?Qn.sections.length===1?jn=Qn.toString():jn=Qn.sections.reduce((Xn,Ge,Ae)=>{const pe=Ge.fontStack?Ge.fontStack.split(","):wr,et=iB(a?a(pe):pe,Dn*(Ge.scale||1),ir);let St=Ge.text;if(St===`
|
||
`)return Xn.push(`
|
||
`,""),Xn;if(xe==2)return Xn.push(oB(St,fn),et),Xn;St=sB(St,et,Hn,fn).split(`
|
||
`);for(let Yt=0,rn=St.length;Yt<rn;++Yt)Yt>0&&Xn.push(`
|
||
`,""),Xn.push(St[Yt],et);return Xn},[]):jn=a5(Qn,de).trim(),Dt=_i(Ce,"paint","text-opacity",fe,De,z,me)}if(jn&&Dt&&!mn){_t||(++at,Ee=Y[at],(!Ee||!Ee.getText()||Ee.getFill()||Ee.getStroke())&&(Ee=new Qh,Y[at]=Ee),Ee.setImage(void 0),Ee.setGeometry(void 0));const wr=w9(Ce,fe,De,"text",z);Ee.getText()||Ee.setText(ht),ht=Ee.getText(),(!ht||"getDeclutterMode"in ht&&ht.getDeclutterMode()!==wr)&&(ht=new Sx({padding:[2,2,2,2],declutterMode:wr}),Ee.setText(ht));const Qn=_i(Ce,"layout","text-transform",fe,De,z,me);Qn=="uppercase"?jn=Array.isArray(jn)?jn.map((Ye,tt)=>tt%2?Ye:Ye.toUpperCase()):jn.toUpperCase():Qn=="lowercase"&&(jn=Array.isArray(jn)?jn.map((Ye,tt)=>tt%2?Ye:Ye.toLowerCase()):jn.toLowerCase());const Xn=Array.isArray(jn)?jn:xe==2?oB(jn,fn):sB(jn,nn,Hn,fn);if(ht.setText(Xn),ht.setFont(nn),ht.setRotation(r5(_i(Ce,"layout","text-rotate",fe,De,z,me))),typeof ht.setKeepUpright=="function"){const Ye=_i(Ce,"layout","text-keep-upright",fe,De,z,me);ht.setKeepUpright(Ye)}const Ge=_i(Ce,"layout","text-anchor",fe,De,z,me),Ae=_t||xe==1?"point":_i(Ce,"layout","symbol-placement",fe,De,z,me);let pe;if(Ae==="line-center"?(ht.setPlacement("line"),pe="center"):ht.setPlacement(Ae),Ae==="line"&&typeof ht.setRepeat=="function"){const Ye=_i(Ce,"layout","symbol-spacing",fe,De,z,me);ht.setRepeat(Ye*2)}ht.setOverflow(Ae==="point");let et=_i(Ce,"paint","text-halo-width",fe,De,z,me);const St=_i(Ce,"layout","text-offset",fe,De,z,me),Yt=_i(Ce,"paint","text-translate",fe,De,z,me);let rn=0,er=0;if(Ae=="point"){pe="center",Ge.indexOf("left")!==-1?(pe="left",er=et):Ge.indexOf("right")!==-1&&(pe="right",er=-et);const Ye=_i(Ce,"layout","text-rotation-alignment",fe,De,z,me);ht.setRotateWithView(Ye=="map")}else ht.setMaxAngle(r5(_i(Ce,"layout","text-max-angle",fe,De,z,me))*jn.length/Xn.length),ht.setRotateWithView(!1);ht.setTextAlign(pe);let Be="middle";Ge.indexOf("bottom")==0?(Be="bottom",rn=-et-.5*(ir-1)*Dn):Ge.indexOf("top")==0&&(Be="top",rn=et+.5*(ir-1)*Dn),ht.setTextBaseline(Be);const oe=_i(Ce,"layout","text-justify",fe,De,z,me);ht.setJustify(oe==="auto"?void 0:oe),ht.setOffsetX(St[0]*Dn+er+Yt[0]),ht.setOffsetY(St[1]*Dn+rn+Yt[1]),X.setColor(m0(_i(Ce,"paint","text-color",fe,De,z,me),Dt)),ht.setFill(X);const ve=m0(_i(Ce,"paint","text-halo-color",fe,De,z,me),Dt);if(ve&&et>0){re.setColor(ve),et*=2;const Ye=.5*Dn;re.setWidth(et<=Ye?et:Ye),ht.setStroke(re)}else ht.setStroke(void 0);const p=_i(Ce,"layout","text-padding",fe,De,z,me),je=ht.getPadding();p!==je[0]&&(je[0]=p,je[1]=p,je[2]=p,je[3]=p),Ee.setZIndex(nt)}}}if(at>-1)return Y.length=at+1,Y};return n.setStyle(ee),n.set("mapbox-source",Q),n.set("mapbox-layers",O),n.set("mapbox-featurestate",n.get("mapbox-featurestate")||{}),ee}function Jie(n,e){const t=n[0],r=t.width,i=t.height,s=t.data,a=new Uint8ClampedArray(s.length),o=e.resolution*2,d=r-1,g=i-1,b=[0,0,0,0],E=2*Math.PI,S=Math.PI/2,O=Math.PI*e.sunEl/180,k=Math.PI*e.sunAz/180,U=Math.cos(O),z=Math.sin(O),q=e.highlightColor,Q=e.shadowColor,re=e.accentColor,X=e.encoding;let Y,ee,N,ie,he,de,Me,fe,xe,De,me,at,Qe,He,We,Ce,Te,rt,yt,bt,gt,Dt;function Pt(Le,Pe="mapbox"){if(Pe==="mapbox")return(Le[0]*256*256+Le[1]*256+Le[2])*.1-1e4;if(Pe==="terrarium")return Le[0]*256+Le[1]+Le[2]/256-32768}for(ee=0;ee<=g;++ee)for(he=ee===0?0:ee-1,de=ee===g?g:ee+1,Y=0;Y<=d;++Y)N=Y===0?0:Y-1,ie=Y===d?d:Y+1,Me=(ee*r+N)*4,b[0]=s[Me],b[1]=s[Me+1],b[2]=s[Me+2],b[3]=s[Me+3],fe=e.vert*Pt(b,X),Me=(ee*r+ie)*4,b[0]=s[Me],b[1]=s[Me+1],b[2]=s[Me+2],b[3]=s[Me+3],xe=e.vert*Pt(b,X),De=(xe-fe)/o,Me=(he*r+Y)*4,b[0]=s[Me],b[1]=s[Me+1],b[2]=s[Me+2],b[3]=s[Me+3],fe=e.vert*Pt(b,X),Me=(de*r+Y)*4,b[0]=s[Me],b[1]=s[Me+1],b[2]=s[Me+2],b[3]=s[Me+3],xe=e.vert*Pt(b,X),me=(xe-fe)/o,Qe=Math.atan2(me,-De),Qe<0?Qe=S-Qe:Qe>S?Qe=E-Qe+S:Qe=S-Qe,at=Math.atan(Math.sqrt(De*De+me*me)),Dt=z*Math.cos(at)+U*Math.sin(at)*Math.cos(k-Qe),He=Math.cos(at),We=255*Dt,yt=Math.min(Math.max(2*e.sunEl,0),1),bt=1.875-e.opacity*1.75,gt=e.opacity!==.5?S*((Math.pow(bt,at)-1)/(Math.pow(bt,S)-1)):at,Te={r:(1-He)*re.r*yt*255,g:(1-He)*re.g*yt*255,b:(1-He)*re.b*yt*255,a:(1-He)*re.a*yt*255},Ce=Math.abs(((Qe+k)/Math.PI+.5)%2-1),rt={r:(q.r*(1-Ce)+Q.r*Ce)*We,g:(q.g*(1-Ce)+Q.g*Ce)*We,b:(q.b*(1-Ce)+Q.b*Ce)*We,a:(q.a*(1-Ce)+Q.a*Ce)*We},Me=(ee*r+Y)*4,a[Me]=Te.r*(1-Ce)+rt.r,a[Me+1]=Te.g*(1-Ce)+rt.g,a[Me+2]=Te.b*(1-Ce)+rt.b,a[Me+3]=s[Me+3]*e.opacity*yt*Math.sin(gt);return new ImageData(a,r,i)}function eoe(n,e=512){return n.getExtent()?zO({extent:n.getExtent(),tileSize:e,maxZoom:22}).getResolutions():Jp}function Fj(n,e){return e.accessToken||(e=Object.assign({},e),new URL(n).searchParams.forEach((r,i)=>{e.accessToken=r,e.accessTokenParam=i})),e}function toe(n,e,t="",r={},i=void 0){let s,a,o,d,g=!0;return typeof t!="string"&&!Array.isArray(t)?(o=t,d=o.source||o.layers,r=o):d=t,typeof r=="string"?(s=r,o={}):(s=r.styleUrl,o=r),o.updateSource===!1&&(g=!1),i||(i=o.resolutions),!s&&typeof e=="string"&&!e.trim().startsWith("{")&&(s=e),s&&(s=s.startsWith("data:")?location.href:E2(s,o.accessToken),o=Fj(s,o)),new Promise(function(b,E){Rj(e,o).then(function(S){if(S.version!=8)return E(new Error("glStyle version 8 required."));if(!(n instanceof IO||n instanceof Gv))return E(new Error("Can only apply to VectorLayer or VectorTileLayer"));const O=n instanceof Gv?"vector":"geojson";if(d?Array.isArray(d)?a=S.layers.find(function(X){return X.id===d[0]}).source:a=d:(a=Object.keys(S.sources).find(function(X){return S.sources[X].type===O}),d=a),!a)return E(new Error(`No ${O} source found in the glStyle.`));function k(){if(!g)return Promise.resolve();if(n instanceof Gv)return zj(S.sources[a],s,o).then(function(N){const ie=n.getSource();ie?N!==ie&&(ie.setTileUrlFunction(N.getTileUrlFunction()),typeof ie.setUrls=="function"&&typeof N.getUrls=="function"&&ie.setUrls(N.getUrls()),ie.format_||(ie.format_=N.format_),ie.getAttributions()||ie.setAttributions(N.getAttributions()),ie.getTileLoadFunction()===ej&&ie.setTileLoadFunction(N.getTileLoadFunction()),Mg(ie.getProjection(),N.getProjection())&&(ie.tileGrid=N.getTileGrid())):n.setSource(N);const he=n.getSource().getTileGrid();!isFinite(n.getMaxResolution())&&!isFinite(n.getMinZoom())&&he.getMinZoom()>0&&n.setMaxResolution(Iv(Math.max(0,he.getMinZoom()-1e-12),he.getResolutions()))});const X=S.sources[a];let Y=n.getSource();(!Y||Y.get("mapbox-source")!==X)&&(Y=Wj(X,s,o));const ee=n.getSource();return ee?Y!==ee&&(ee.getAttributions()||ee.setAttributions(Y.getAttributions()),ee.format_||(ee.format_=Y.getFormat()),ee.url_=Y.getUrl()):n.setSource(Y),Promise.resolve()}let U,z,q,Q;function re(){if(!Q&&(!S.sprite||z)){if(o.projection&&!i){const Y=Ma(o.projection).getUnits();Y!=="m"&&(i=Jp.map(ee=>ee/R0[Y]))}Q=Xie(n,S,d,i,z,q,(X,Y=o.webfonts)=>Qie(X,Y),o.getImage),n.getStyle()?k().then(b).catch(E):E(new Error(`Nothing to show for source [${a}]`))}else Q?(n.setStyle(Q),k().then(b).catch(E)):E(new Error("Something went wrong trying to apply style."))}if(S.sprite){const X=new URL(Die(S.sprite,o.accessToken,s||location.href));U=window.devicePixelRatio>=1.5?.5:1;const Y=U==.5?"@2x":"";let ee=X.origin+X.pathname+Y+".json"+X.search;new Promise(function(N,ie){wy("Sprite",ee,o).then(N).catch(function(he){ee=X.origin+X.pathname+".json"+X.search,wy("Sprite",ee,o).then(N).catch(ie)})}).then(function(N){if(N===void 0&&E(new Error("No sprites found.")),z=N,q=X.origin+X.pathname+Y+".png"+X.search,o.transformRequest){const ie=o.transformRequest(q,"SpriteImage")||q;(ie instanceof Request||ie instanceof Promise)&&(q=ie)}re()}).catch(function(N){E(new Error(`Sprites cannot be loaded: ${ee}: ${N.message}`))})}else re()}).catch(E)})}const y0={};function Lj(n,e){let t;return n.some(function(r){if(r.id==e)return t=r.source,!0}),t}function noe(n,e){const t=n.bounds;if(t){const r=R6([t[0],t[1]],e),i=R6([t[2],t[3]],e);return[r[0],r[1],i[0],i[1]]}return Ma(e).getExtent()}function Uj(n,e,t){const r=new Xz({tileJSON:e,tileSize:n.tileSize||e.tileSize||512}),i=r.getTileJSON(),s=r.getTileGrid(),a=Ma(t.projection||"EPSG:3857"),o=noe(i,a),d=a.getExtent(),g=i.minzoom||0,b=i.maxzoom||22,E={attributions:r.getAttributions(),projection:a,tileGrid:new kx({origin:d?Ap(d):s.getOrigin(0),extent:o||s.getExtent(),minZoom:g,resolutions:eoe(a,e.tileSize).slice(0,b+1),tileSize:s.getTileSize(0)})};return Array.isArray(i.tiles)?E.urls=i.tiles:E.url=i.tiles,E}function roe(n,e,t,r){const i={id:n.id,type:n.type},s=n.layout||{},a=n.paint||{};i.paint=a;const o=f8(e,t.resolutions||Jp);let d;const g=_i(i,"paint","background-color",o,y0,r);return a["background-opacity"]!==void 0&&(d=_i(i,"paint","background-opacity",o,y0,r)),s.visibility=="none"?void 0:m0(g,d)}function ioe(n,e,t){const r=document.createElement("div");return r.className="ol-mapbox-style-background",r.style.position="absolute",r.style.width="100%",r.style.height="100%",new Ry({source:new Dy({}),render(i){const s=roe(n,i.viewState.resolution,e,t);return r.style.backgroundColor=s,r}})}function zj(n,e,t){return new Promise(function(r,i){Dj(n,e,t).then(function({tileJson:s,tileLoadFunction:a}){const o=Uj(n,s,t);o.tileLoadFunction=a,o.format=new nne,r(new Jz(o))}).catch(i)})}function ooe(n,e,t){const r=new Gv({declutter:!0,visible:!1});return zj(n,e,t).then(function(i){i.set("mapbox-source",n),r.setSource(i)}).catch(function(i){r.setSource(void 0)}),r}function jj(n){return`{bbox-${(n?n.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function soe(n,e,t){return new Promise(function(r,i){Dj(n,e,t).then(function({tileJson:s,tileLoadFunction:a}){const o=new Xz({interpolate:t.interpolate===void 0?!0:t.interpolate,transition:0,crossOrigin:"anonymous",tileJSON:s});o.tileGrid=Uj(n,s,t).tileGrid,t.projection&&(o.projection=Ma(t.projection));const d=o.getTileUrlFunction();a&&o.setTileLoadFunction(a),o.setTileUrlFunction(function(g,b,E){const S=jj(E);let O=d(g,b,E);if(O.indexOf(S)!=-1){const k=o.getTileGrid().getTileCoordExtent(g);O=O.replace(S,k.toString())}return O}),o.set("mapbox-source",n),r(o)}).catch(function(s){i(s)})})}function Nj(n,e,t){const r=new Qz;return soe(n,e,t).then(function(i){r.setSource(i)}).catch(function(){r.setSource(void 0)}),r}function aoe(n,e,t){const r=Nj(n,e,t);return new zz({source:new Hz({operationType:"image",operation:Jie,sources:[r]})})}function Wj(n,e,t){const r=t.projection?new Wk({dataProjection:t.projection}):new Wk,i=n.data,s={};if(typeof i=="string"){const[o]=Eb(i,t.accessToken,t.accessTokenParam||"access_token",e||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(o)){const g=(E,S,O)=>{const k=jj(O);return o.replace(k,`${E.join(",")}`)},b=new Mb({attributions:n.attribution,format:r,loader:(E,S,O,k,U)=>{const z=typeof g=="function"?g(E,S,O):g;wy("GeoJSON",z,t).then(q=>{const Q=b.getFormat().readFeatures(q,{featureProjection:O});b.addFeatures(Q),k(Q)}).catch(q=>{b.removeLoadedExtent(E),U()})},strategy:kee});return b.set("mapbox-source",n),b}const d=new Mb({attributions:n.attribution,format:r,url:o,loader:(g,b,E,S,O)=>{wy("GeoJSON",o,t).then(k=>{const U=d.getFormat().readFeatures(k,{featureProjection:E});d.addFeatures(U),S(U)}).catch(k=>{d.removeLoadedExtent(g),O()})}});return d}s.features=r.readFeatures(i,{featureProjection:"EPSG:3857"});const a=new Mb(Object.assign({attributions:n.attribution,format:r},s));return a.set("mapbox-source",n),a}function loe(n,e,t){return new IO({declutter:!0,source:Wj(n,e,t),visible:!1})}function uoe(n,e,t){let r=null;return function(i){n.paint&&"raster-opacity"in n.paint&&i.frameState.viewState.zoom!==r&&(r=i.frameState.viewState.zoom,delete t[n.id],Aoe(n,e,r,t))}}function Aoe(n,e,t,r){const i=_i(n,"paint","raster-opacity",t,y0,r);e.setOpacity(i)}function coe(n,e){function t(){const r=e.get("mapbox-style");if(!r)return;const i=kj(r.layers),s=n.get("mapbox-layers"),a=i.filter(function(o){return s.includes(o.id)}).some(function(o){return!o.layout||!o.layout.visibility||o.layout.visibility==="visible"});n.get("visible")!==a&&n.setVisible(a)}n.on("change",t),t()}function doe(n,e,t,r){const i=Pj(n),s=n.layers,a=t.type,o=t.source||Lj(s,t.ref),d=n.sources[o];let g;if(a=="background")g=ioe(t,r,i);else if(d.type=="vector")g=ooe(d,e,r);else if(d.type=="raster")g=Nj(d,e,r),g.setVisible(t.layout?t.layout.visibility!=="none":!0),g.on("prerender",uoe(t,g,i));else if(d.type=="geojson")g=loe(d,e,r);else if(d.type=="raster-dem"&&t.type=="hillshade"){const E=aoe(d,e,r);g=E,E.getSource().on("beforeoperations",function(S){const O=S.data;O.resolution=P6(r.projection||"EPSG:3857",S.resolution,Of(S.extent),"m");const k=f8(S.resolution,r.resolutions||Jp);O.encoding=d.encoding,O.vert=5*_i(t,"paint","hillshade-exaggeration",k,y0,i),O.sunAz=_i(t,"paint","hillshade-illumination-direction",k,y0,i),O.sunEl=35,O.opacity=.3,O.highlightColor=_i(t,"paint","hillshade-highlight-color",k,y0,i),O.shadowColor=_i(t,"paint","hillshade-shadow-color",k,y0,i),O.accentColor=_i(t,"paint","hillshade-accent-color",k,y0,i)}),g.setVisible(t.layout?t.layout.visibility!=="none":!0)}const b=o;return g&&g.set("mapbox-source",b),g}function M9(n,e,t,r){const i=[];let s=null;if(e instanceof RO){if(s=e.getView(),!s.isDef()&&!s.getRotation()&&!s.getResolutions()){const E=r.projection?Ma(r.projection):s.getProjection();s=new op(Object.assign(s.getProperties(),{maxResolution:Jp[0]/R0[E.getUnits()],projection:r.projection||s.getProjection()})),e.setView(s)}"center"in n&&!s.getCenter()&&s.setCenter(R6(n.center,s.getProjection())),"zoom"in n&&s.getZoom()===void 0&&s.setResolution(Jp[0]/R0[s.getProjection().getUnits()]/Math.pow(2,n.zoom)),(!s.getCenter()||s.getZoom()===void 0)&&s.fit(s.getProjection().getExtent(),{nearest:!0,size:e.getSize()})}e.set("mapbox-style",n),e.set("mapbox-metadata",{styleUrl:t,options:r});const a=n.layers;let o=[],d,g,b;for(let E=0,S=a.length;E<S;++E){const O=a[E],k=O.type;if(k=="heatmap"){console.debug(`layers[${E}].type "${k}" not supported`);continue}else b=O.source||Lj(a,O.ref),(!b||b!=g)&&(o.length&&(i.push(S9(d,o,n,t,e,r)),o=[]),d=doe(n,t,O,r),d instanceof IO||d instanceof Gv||(o=[]),g=d.get("mapbox-source")),o.push(O.id)}return i.push(S9(d,o,n,t,e,r)),Promise.all(i)}function hoe(n,e,t={}){let r,i;if(typeof n=="string"||n instanceof HTMLElement?i=new RO({target:n}):i=n,typeof e=="string"){const s=e.startsWith("data:")?location.href:E2(e,t.accessToken);t=Fj(s,t),r=new Promise(function(a,o){Rj(e,t).then(function(d){M9(d,i,s,t).then(function(){a(i)}).catch(o)}).catch(function(d){o(new Error(`Could not load ${e}: ${d.message}`))})})}else r=new Promise(function(s,a){M9(e,i,!t.styleUrl||t.styleUrl.startsWith("data:")?location.href:E2(t.styleUrl,t.accessToken),t).then(function(){s(i)}).catch(a)});return r}function S9(n,e,t,r,i,s={}){let a=24,o=0;const d=t.layers;for(let g=0,b=d.length;g<b;++g){const E=d[g];e.indexOf(E.id)!==-1&&(a=Math.min("minzoom"in E?E.minzoom:0,a),o=Math.max("maxzoom"in E?E.maxzoom:24,o))}return new Promise(function(g,b){const E=function(){const O=n.getSource();if(!O||O.getState()==="error"){b(new Error("Error accessing data for source "+n.get("mapbox-source")));return}if("getTileGrid"in O){const k=O.getTileGrid();if(k){const U=k.getMinZoom();(a>0||U>0)&&n.setMaxResolution(Math.min(Iv(Math.max(0,a-1e-12),Jp),Iv(Math.max(0,U-1e-12),k.getResolutions()))),o<24&&n.setMinResolution(Iv(o,Jp))}}else a>0&&n.setMaxResolution(Iv(Math.max(0,a-1e-12),Jp));O instanceof Mb||O instanceof Jz?toe(n,t,e,Object.assign({styleUrl:r},s)).then(function(){coe(n,i),g()}).catch(b):g()};n.set("mapbox-layers",e);const S=i.getLayers();S.getArray().indexOf(n)===-1&&S.push(n),n.getSource()?E():n.once("change:source",E)})}function oi(){var n="/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",e="28a80ffabe289131cb2e371ab6bf55f9bb46f37a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx",statementMap:{0:{start:{line:11,column:2},end:{line:15,column:3}},1:{start:{line:12,column:4},end:{line:12,column:16}},2:{start:{line:14,column:4},end:{line:14,column:149}},3:{start:{line:14,column:103},end:{line:14,column:133}},4:{start:{line:18,column:24},end:{line:25,column:3}},5:{start:{line:28,column:14},end:{line:28,column:18}},6:{start:{line:30,column:19},end:{line:30,column:23}},7:{start:{line:32,column:4},end:{line:32,column:17}},8:{start:{line:33,column:4},end:{line:38,column:6}},9:{start:{line:39,column:4},end:{line:39,column:67}},10:{start:{line:42,column:4},end:{line: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:61,column:7}},17:{start:{line:62,column:16},end:{line:69,column:6}},18:{start:{line:70,column:4},end:{line:78,column:7}},19:{start:{line:71,column:21},end:{line:71,column:45}},20:{start:{line:72,column:6},end:{line:77,column:9}},21:{start:{line:79,column:22},end:{line:89,column:5}},22:{start:{line:80,column:19},end:{line:80,column:42}},23:{start:{line:81,column:21},end:{line:81,column:56}},24:{start:{line:82,column:6},end:{line:88,column:9}},25:{start:{line:90,column:4},end:{line:90,column:16}},26:{start:{line:91,column:4},end:{line:91,column:33}},27:{start:{line:92,column:4},end:{line:102,column:7}},28:{start:{line:93,column:21},end:{line:93,column:56}},29:{start:{line:94,column:6},end:{line:101,column:9}},30:{start:{line:103,column:4},end:{line:103,column:19}},31:{start:{line:104,column:4},end:{line:106,column:6}},32:{start:{line:108,column:17},end:{line:111,column:3}},33:{start:{line:109,column:4},end:{line:109,column:20}},34:{start:{line:110,column:4},end:{line:110,column:37}},35:{start:{line:113,column:14},end:{line:113,column:26}},36:{start:{line:114,column:4},end:{line:181,column:9}},37:{start:{line:118,column:22},end:{line:118,column:45}},38:{start:{line:173,column:22},end:{line:173,column:40}},39:{start:{line:184,column:22},end:{line:184,column:62}}},fnMap:{0:{name:"renderCoords",decl:{start:{line:10,column:9},end:{line:10,column:21}},loc:{start:{line:10,column:30},end:{line:16,column:1}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:14,column:92},end:{line:14,column:93}},loc:{start:{line:14,column:103},end:{line:14,column:133}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:19,column:17},end:{line:19,column:18}},loc:{start:{line:19,column:23},end:{line:20,column:5}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:21,column:18},end:{line:21,column:19}},loc:{start:{line:21,column:24},end:{line:22,column:5}},line:21},4:{name:"(anonymous_4)",decl:{start:{line:23,column:19},end:{line:23,column:20}},loc:{start:{line:23,column:25},end:{line:24,column:5}},line:23},5:{name:"(anonymous_5)",decl:{start:{line:31,column:2},end:{line:31,column:3}},loc:{start:{line:31,column:21},end:{line:40,column:3}},line:31},6:{name:"(anonymous_6)",decl:{start:{line:41,column:2},end:{line:41,column:3}},loc:{start:{line:41,column:28},end:{line: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:107,column:3}},line:53},9:{name:"(anonymous_9)",decl:{start:{line:70,column:26},end:{line:70,column:27}},loc:{start:{line:70,column:35},end:{line:78,column:5}},line:70},10:{name:"(anonymous_10)",decl:{start:{line:79,column:22},end:{line:79,column:23}},loc:{start:{line:79,column:28},end:{line:89,column:5}},line:79},11:{name:"(anonymous_11)",decl:{start:{line:92,column:25},end:{line:92,column:26}},loc:{start:{line:92,column:33},end:{line:102,column:5}},line:92},12:{name:"(anonymous_12)",decl:{start:{line:108,column:17},end:{line:108,column:18}},loc:{start:{line:108,column:24},end:{line:111,column:3}},line:108},13:{name:"(anonymous_13)",decl:{start:{line:112,column:2},end:{line:112,column:3}},loc:{start:{line:112,column:11},end:{line:182,column:3}},line:112},14:{name:"(anonymous_14)",decl:{start:{line:118,column:15},end:{line:118,column:16}},loc:{start:{line:118,column:22},end:{line:118,column:45}},line:118},15:{name:"(anonymous_15)",decl:{start:{line:173,column:15},end:{line:173,column:16}},loc:{start:{line:173,column:22},end:{line:173,column:40}},line:173}},branchMap:{0:{loc:{start:{line:11,column:2},end:{line:15,column:3}},type:"if",locations:[{start:{line:11,column:2},end:{line:15,column:3}},{start:{line:13,column:9},end:{line:15,column:3}}],line:11},1:{loc:{start:{line:11,column:6},end:{line:11,column:34}},type:"binary-expr",locations:[{start:{line:11,column:6},end:{line:11,column:13}},{start:{line:11,column:17},end:{line:11,column:34}}],line:11},2:{loc:{start:{line:42,column:4},end:{line: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:134,column:26},end:{line:134,column:59}},type:"binary-expr",locations:[{start:{line:134,column:26},end:{line:134,column:53}},{start:{line:134,column:57},end:{line:134,column:59}}],line:134},5:{loc:{start:{line:146,column:6},end:{line:168,column:10}},type:"binary-expr",locations:[{start:{line:146,column:6},end:{line:146,column:29}},{start:{line:146,column:49},end:{line:168,column:10}}],line:146}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/MapOpenLayers.tsx"],names:[],mappings:"AAoBW,cAyIL,YAzIK;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,QACP,WAAW;AAAA,UACT,UAAU;AAAA,QACZ;AAAA,MACF;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:"28a80ffabe289131cb2e371ab6bf55f9bb46f37a"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return oi=function(){return a},a}oi();function E9(n){return oi().f[0]++,oi().s[0]++,oi().b[1][0]++,!n||(oi().b[1][1]++,n.length<2)?(oi().b[0][0]++,oi().s[1]++,null):(oi().b[0][1]++,oi().s[2]++,le.jsx("span",{className:"maputnik-coords",children:n.map(e=>(oi().f[1]++,oi().s[3]++,String(e).padStart(7," "))).join(", ")}))}class Gj extends rr.Component{constructor(t){oi().f[5]++,oi().s[7]++;super(t);kn(this,"updateStyle");kn(this,"map");kn(this,"container",(oi().s[5]++,null));kn(this,"overlay");kn(this,"popupContainer",(oi().s[6]++,null));kn(this,"closeOverlay",(oi().s[32]++,t=>{oi().f[12]++,oi().s[33]++,t.target.blur(),oi().s[34]++,this.overlay.setPosition(void 0)}));oi().s[8]++,this.state={zoom:"0",rotation:"0",cursor:[],center:[]},oi().s[9]++,this.updateStyle=V2.throttle(this._updateStyle.bind(this),200)}_updateStyle(t){if(oi().f[6]++,oi().s[10]++,this.map)oi().b[2][1]++;else{oi().b[2][0]++,oi().s[11]++;return}oi().s[12]++,this.map.getLayers().clear(),oi().s[13]++,hoe(this.map,t)}componentDidUpdate(t){oi().f[7]++,oi().s[14]++,this.props.mapStyle!==t.mapStyle?(oi().b[3][0]++,oi().s[15]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))):oi().b[3][1]++}componentDidMount(){oi().f[8]++,oi().s[16]++,this.overlay=new dte({element:this.popupContainer,autoPan:{animation:{duration:250}}});const t=(oi().s[17]++,new RO({target:this.container,overlays:[this.overlay],view:new op({zoom:1,center:[180,-90]})}));oi().s[18]++,t.on("pointermove",i=>{oi().f[9]++;const s=(oi().s[19]++,B4(i.coordinate));oi().s[20]++,this.setState({cursor:[s[0].toFixed(2),s[1].toFixed(2)]})}),oi().s[21]++;const r=()=>{oi().f[10]++;const i=(oi().s[22]++,t.getView().getZoom()),s=(oi().s[23]++,B4(t.getView().getCenter()));oi().s[24]++,this.props.onChange({zoom:i,center:{lng:s[0],lat:s[1]}})};oi().s[25]++,r(),oi().s[26]++,t.on("moveend",r),oi().s[27]++,t.on("postrender",i=>{oi().f[11]++;const s=(oi().s[28]++,B4(t.getView().getCenter()));oi().s[29]++,this.setState({center:[s[0].toFixed(2),s[1].toFixed(2)],rotation:t.getView().getRotation().toFixed(2),zoom:t.getView().getZoom().toFixed(2)})}),oi().s[30]++,this.map=t,oi().s[31]++,this.updateStyle(this.props.replaceAccessTokens(this.props.mapStyle))}render(){oi().f[13]++;const t=(oi().s[35]++,this.props.t);return oi().s[36]++,le.jsxs("div",{className:"maputnik-ol-container",children:[le.jsxs("div",{ref:r=>(oi().f[14]++,oi().s[37]++,this.popupContainer=r),style:{background:"black"},className:"maputnik-popup",children:[le.jsx("button",{className:"maplibregl-popup-close-button",onClick:this.closeOverlay,"aria-label":t("Close popup"),children:"×"}),le.jsx(hU,{features:(oi().b[4][0]++,this.state.selectedFeatures||(oi().b[4][1]++,[])),onLayerSelect:this.props.onLayerSelect})]}),le.jsxs("div",{className:"maputnik-ol-zoom",children:[t("Zoom:")," ",this.state.zoom]}),(oi().b[5][0]++,this.props.debugToolbox&&(oi().b[5][1]++,le.jsxs("div",{className:"maputnik-ol-debug",children:[le.jsxs("div",{children:[le.jsxs("label",{children:[t("cursor:")," "]}),le.jsx("span",{children:E9(this.state.cursor)})]}),le.jsxs("div",{children:[le.jsxs("label",{children:[t("center:")," "]}),le.jsx("span",{children:E9(this.state.center)})]}),le.jsxs("div",{children:[le.jsxs("label",{children:[t("rotation:")," "]}),le.jsx("span",{children:this.state.rotation})]})]}))),le.jsx("div",{className:"maputnik-ol",ref:r=>(oi().f[15]++,oi().s[38]++,this.container=r),role:"region","aria-label":t("Map view"),style:{...this.props.style}})]})}}kn(Gj,"defaultProps",(oi().s[4]++,{onMapLoaded:()=>{oi().f[2]++},onDataChange:()=>{oi().f[3]++},onLayerSelect:()=>{oi().f[4]++}}));const foe=(oi().s[39]++,$s()(Gj));var l5={exports:{}};/*!
|
||
Copyright (c) 2018 Jed Watson.
|
||
Licensed under the MIT License (MIT), see
|
||
http://jedwatson.github.io/classnames
|
||
*/var B9;function poe(){return B9||(B9=1,function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var o in s)e.call(s,o)&&s[o]&&(a=i(a,o));return a}function i(s,a){return a?s?s+" "+a:s+a:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()}(l5)),l5.exports}var moe=poe();const tm=Ha(moe);function cg(){var n="/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",e="e73e8fb606fcd7318a8222b2e50c576ed3ad8702",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx",statementMap:{0:{start:{line:6,column:22},end:{line:10,column:5}},1:{start:{line:11,column:4},end:{line:11,column:154}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:12,column:3}},line:5}},branchMap:{0:{loc:{start:{line:11,column:11},end:{line:11,column:153}},type:"cond-expr",locations:[{start:{line:11,column:52},end:{line:11,column:92}},{start:{line:11,column:111},end:{line:11,column:153}}],line:11}},s:{0:0,1:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Collapser.tsx"],names:[],mappings:"AAeoC;AAfpC,OAAO,WAAW;AAClB,SAAQ,iBAAiB,qBAAoB;AAO7C,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,GAAG,KAAK,MAAM;AAAA,IAChB;AACA,WAAO,KAAK,MAAM,cAAc,oBAAC,iBAAc,OAAO,WAAU,IAAK,oBAAC,mBAAgB,OAAO,WAAW;AAAA,EAC1G;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e73e8fb606fcd7318a8222b2e50c576ed3ad8702"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return cg=function(){return a},a}cg();class goe extends rr.Component{render(){cg().f[0]++;const e=(cg().s[0]++,{width:20,height:20,...this.props.style});return cg().s[1]++,this.props.isCollapsed?(cg().b[0][0]++,le.jsx(EH,{style:e})):(cg().b[0][1]++,le.jsx(SH,{style:e}))}}function $1(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",e="b04bfec534013c327fd210571832bbd2813a944a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:32,column:9}},1:{start:{line:11,column:25},end:{line:11,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:33,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:25},end:{line:11,column:72}},line:11}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListGroup.tsx"],names:[],mappings:"AAcM,SAIE,KAJF;AAdN,OAAO,WAAW;AAClB,OAAO,eAAe;AAUtB,qBAAqB,uBAAuB,MAAM,UAA+B;AAAA,EAC/E,SAAS;AACP,WAAO,oBAAC,QAAG,WAAU,6BACnB;AAAA,MAAC;AAAA;AAAA,QAAI,WAAU;AAAA,QACb,eAAa,sBAAoB,KAAK,MAAM,aAAa;AAAA,QACzD,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,QAE7D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,iBAAe,KAAK,MAAM,eAAe;AAAA,cACzC,iBAAe,KAAK,MAAM;AAAA,cAEzB,eAAK,MAAM;AAAA;AAAA,UACd;AAAA,UACA,oBAAC,UAAK,WAAU,kBAAiB;AAAA,UACjC;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,EAAE,QAAQ,IAAI,OAAO,GAAG;AAAA,cAC/B,aAAa,KAAK,MAAM;AAAA;AAAA,UAC1B;AAAA;AAAA;AAAA,IACF,GACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b04bfec534013c327fd210571832bbd2813a944a"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return $1=function(){return a},a}$1();class yoe extends rr.Component{render(){return $1().f[0]++,$1().s[0]++,le.jsx("li",{className:"maputnik-layer-list-group",children:le.jsxs("div",{className:"maputnik-layer-list-group-header","data-wd-key":"layer-list-group:"+this.props["data-wd-key"],onClick:e=>($1().f[1]++,$1().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:[le.jsx("button",{className:"maputnik-layer-list-group-title","aria-controls":this.props["aria-controls"],"aria-expanded":this.props.isActive,children:this.props.title}),le.jsx("span",{className:"maputnik-space"}),le.jsx(goe,{style:{height:14,width:14},isCollapsed:this.props.isActive})]})})}}function xC(){return xC=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},xC.apply(null,arguments)}function voe(n){if(Array.isArray(n))return n}function Coe(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,s,a,o=[],d=!0,g=!1;try{if(s=(t=t.call(n)).next,e!==0)for(;!(d=(r=s.call(t)).done)&&(o.push(r.value),o.length!==e);d=!0);}catch(b){g=!0,i=b}finally{try{if(!d&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(g)throw i}}return o}}function lB(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Qj(n,e){if(n){if(typeof n=="string")return lB(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lB(n,e):void 0}}function _oe(){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 qj(n,e){return voe(n)||Coe(n,e)||Qj(n,e)||_oe()}function My(n){"@babel/helpers - typeof";return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},My(n)}function boe(n,e){if(My(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(My(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Yj(n){var e=boe(n,"string");return My(e)=="symbol"?e:e+""}function Da(n,e,t){return(e=Yj(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function u5(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(t).filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.forEach(function(i){Da(n,i,t[i])})}return n}function JC(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function xoe(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,Yj(r.key),r)}}function e_(n,e,t){return e&&xoe(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function fs(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function p8(n,e){if(e&&(My(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fs(n)}function wC(n){return wC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wC(n)}function uB(n,e){return uB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},uB(n,e)}function m8(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&uB(n,e)}var A5,O9;function woe(){if(O9)return A5;O9=1;var n=function(e,t,r,i,s,a,o,d){if(!e){var g;if(t===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=[r,i,s,a,o,d],E=0;g=new Error(t.replace(/%s/g,function(){return b[E++]})),g.name="Invariant Violation"}throw g.framesToPop=1,g}};return A5=n,A5}var Moe=woe();const Rg=Ha(Moe);function Soe(n){if(Array.isArray(n))return lB(n)}function Eoe(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Boe(){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 Ooe(n){return Soe(n)||Eoe(n)||Qj(n)||Boe()}var Ioe=function(){function n(){JC(this,n),Da(this,"refs",{})}return e_(n,[{key:"add",value:function(t,r){this.refs[t]||(this.refs[t]=[]),this.refs[t].push(r)}},{key:"remove",value:function(t,r){var i=this.getIndex(t,r);i!==-1&&this.refs[t].splice(i,1)}},{key:"isActive",value:function(){return this.active}},{key:"getActive",value:function(){var t=this;return this.refs[this.active.collection].find(function(r){var i=r.node;return i.sortableInfo.index==t.active.index})}},{key:"getIndex",value:function(t,r){return this.refs[t].indexOf(r)}},{key:"getOrderedRefs",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.active.collection;return this.refs[t].sort(koe)}}]),n}();function koe(n,e){var t=n.node.sortableInfo.index,r=e.node.sortableInfo.index;return t-r}function $j(n,e){return Object.keys(n).reduce(function(t,r){return e.indexOf(r)===-1&&(t[r]=n[r]),t},{})}var m1={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Vj=function(){if(typeof window>"u"||typeof document>"u")return"";var n=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(n).join("").match(/-(moz|webkit|ms)-/)||n.OLink===""&&["","o"])[1];switch(e){case"ms":return"ms";default:return e&&e.length?e[0].toUpperCase()+e.substr(1):""}}();function sb(n,e){Object.keys(e).forEach(function(t){n.style[t]=e[t]})}function ab(n,e){n.style["".concat(Vj,"Transform")]=e==null?"":"translate3d(".concat(e.x,"px,").concat(e.y,"px,0)")}function c5(n,e){n.style["".concat(Vj,"TransitionDuration")]=e==null?"":"".concat(e,"ms")}function kv(n,e){for(;n;){if(e(n))return n;n=n.parentNode}return null}function I9(n,e,t){return Math.max(n,Math.min(t,e))}function V1(n){return n.substr(-2)==="px"?parseFloat(n):0}function Toe(n){var e=window.getComputedStyle(n);return{bottom:V1(e.marginBottom),left:V1(e.marginLeft),right:V1(e.marginRight),top:V1(e.marginTop)}}function g8(n,e){var t=e.displayName||e.name;return t?"".concat(n,"(").concat(t,")"):n}function d5(n,e){var t=n.getBoundingClientRect();return{top:t.top+e.top,left:t.left+e.left}}function hv(n){return n.touches&&n.touches.length?{x:n.touches[0].pageX,y:n.touches[0].pageY}:n.changedTouches&&n.changedTouches.length?{x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY}:{x:n.pageX,y:n.pageY}}function Poe(n){return n.touches&&n.touches.length||n.changedTouches&&n.changedTouches.length}function Bb(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{left:0,top:0};if(n){var r={left:t.left+n.offsetLeft,top:t.top+n.offsetTop};return n.parentNode===e?r:Bb(n.parentNode,e,r)}}function Roe(n,e,t){return n<t&&n>e?n-1:n>t&&n<e?n+1:n}function k9(n){var e=n.lockOffset,t=n.width,r=n.height,i=e,s=e,a="px";if(typeof e=="string"){var o=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(e);Rg(o!==null,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',e),i=parseFloat(e),s=parseFloat(e),a=o[1]}return Rg(isFinite(i)&&isFinite(s),"lockOffset value should be a finite. Given %s",e),a==="%"&&(i=i*t/100,s=s*r/100),{x:i,y:s}}function Doe(n){var e=n.height,t=n.width,r=n.lockOffset,i=Array.isArray(r)?r:[r,r];Rg(i.length===2,"lockOffset prop of SortableContainer should be a single value or an array of exactly two values. Given %s",r);var s=qj(i,2),a=s[0],o=s[1];return[k9({height:e,lockOffset:a,width:t}),k9({height:e,lockOffset:o,width:t})]}function Koe(n){var e=window.getComputedStyle(n),t=/(auto|scroll)/,r=["overflow","overflowX","overflowY"];return r.find(function(i){return t.test(e[i])})}function Hj(n){return n instanceof HTMLElement?Koe(n)?n:Hj(n.parentNode):null}function Foe(n){var e=window.getComputedStyle(n);return e.display==="grid"?{x:V1(e.gridColumnGap),y:V1(e.gridRowGap)}:{x:0,y:0}}var ig={TAB:9,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40},dg={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function Loe(n){var e="input, textarea, select, canvas, [contenteditable]",t=n.querySelectorAll(e),r=n.cloneNode(!0),i=Ooe(r.querySelectorAll(e));return i.forEach(function(s,a){if(s.type!=="file"&&(s.value=t[a].value),s.type==="radio"&&s.name&&(s.name="__sortableClone__".concat(s.name)),s.tagName===dg.Canvas&&t[a].width>0&&t[a].height>0){var o=s.getContext("2d");o.drawImage(t[a],0,0)}}),r}function Uoe(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){m8(s,i);function s(){var a,o;JC(this,s);for(var d=arguments.length,g=new Array(d),b=0;b<d;b++)g[b]=arguments[b];return o=p8(this,(a=wC(s)).call.apply(a,[this].concat(g))),Da(fs(fs(o)),"wrappedInstance",ui.createRef()),o}return e_(s,[{key:"componentDidMount",value:function(){var o=lx.findDOMNode(this);o.sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return Rg(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.wrappedInstance.current}},{key:"render",value:function(){var o=r.withRef?this.wrappedInstance:null;return ui.createElement(n,xC({ref:o},this.props))}}]),s}(ui.Component),Da(e,"displayName",g8("sortableHandle",n)),t}function T9(n){return n.sortableHandle!=null}var zoe=function(){function n(e,t){JC(this,n),this.container=e,this.onScrollCallback=t}return e_(n,[{key:"clear",value:function(){this.interval!=null&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(t){var r=this,i=t.translate,s=t.minTranslate,a=t.maxTranslate,o=t.width,d=t.height,g={x:0,y:0},b={x:1,y:1},E={x:10,y:10},S=this.container,O=S.scrollTop,k=S.scrollLeft,U=S.scrollHeight,z=S.scrollWidth,q=S.clientHeight,Q=S.clientWidth,re=O===0,X=U-O-q===0,Y=k===0,ee=z-k-Q===0;i.y>=a.y-d/2&&!X?(g.y=1,b.y=E.y*Math.abs((a.y-d/2-i.y)/d)):i.x>=a.x-o/2&&!ee?(g.x=1,b.x=E.x*Math.abs((a.x-o/2-i.x)/o)):i.y<=s.y+d/2&&!re?(g.y=-1,b.y=E.y*Math.abs((i.y-d/2-s.y)/d)):i.x<=s.x+o/2&&!Y&&(g.x=-1,b.x=E.x*Math.abs((i.x-o/2-s.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),(g.x!==0||g.y!==0)&&(this.interval=setInterval(function(){r.isAutoScrolling=!0;var N={left:b.x*g.x,top:b.y*g.y};r.container.scrollTop+=N.top,r.container.scrollLeft+=N.left,r.onScrollCallback(N)},5))}}]),n}();function joe(n){var e=n.node;return{height:e.offsetHeight,width:e.offsetWidth}}function Noe(n){var e=[dg.Input,dg.Textarea,dg.Select,dg.Option,dg.Button];return!!(e.indexOf(n.target.tagName)!==-1||kv(n.target,function(t){return t.contentEditable==="true"}))}var Zj={axis:fi.oneOf(["x","y","xy"]),contentWindow:fi.any,disableAutoscroll:fi.bool,distance:fi.number,getContainer:fi.func,getHelperDimensions:fi.func,helperClass:fi.string,helperContainer:fi.oneOfType([fi.func,typeof HTMLElement>"u"?fi.any:fi.instanceOf(HTMLElement)]),hideSortableGhost:fi.bool,keyboardSortingTransitionDuration:fi.number,lockAxis:fi.string,lockOffset:fi.oneOfType([fi.number,fi.string,fi.arrayOf(fi.oneOfType([fi.number,fi.string]))]),lockToContainerEdges:fi.bool,onSortEnd:fi.func,onSortMove:fi.func,onSortOver:fi.func,onSortStart:fi.func,pressDelay:fi.number,pressThreshold:fi.number,keyCodes:fi.shape({lift:fi.arrayOf(fi.number),drop:fi.arrayOf(fi.number),cancel:fi.arrayOf(fi.number),up:fi.arrayOf(fi.number),down:fi.arrayOf(fi.number)}),shouldCancelStart:fi.func,transitionDuration:fi.number,updateBeforeSortStart:fi.func,useDragHandle:fi.bool,useWindowAsScrollContainer:fi.bool},Xj={lift:[ig.SPACE],drop:[ig.SPACE],cancel:[ig.ESC],up:[ig.UP,ig.LEFT],down:[ig.DOWN,ig.RIGHT]},Woe={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:joe,hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:Xj,shouldCancelStart:Noe,transitionDuration:300,useWindowAsScrollContainer:!1},Goe=Object.keys(Zj);function Qoe(n){Rg(!(n.distance&&n.pressDelay),"Attempted to set both `pressDelay` and `distance` on SortableContainer, you may only use one or the other, not both at the same time.")}function qoe(n,e){try{var t=n()}catch(r){return e(!0,r)}return t&&t.then?t.then(e.bind(null,!1),e.bind(null,!0)):e(!1,value)}var Jj=ui.createContext({manager:{}});function Yoe(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){m8(s,i);function s(a){var o;JC(this,s),o=p8(this,wC(s).call(this,a)),Da(fs(fs(o)),"state",{}),Da(fs(fs(o)),"handleStart",function(g){var b=o.props,E=b.distance,S=b.shouldCancelStart;if(!(g.button===2||S(g))){o.touched=!0,o.position=hv(g);var O=kv(g.target,function(re){return re.sortableInfo!=null});if(O&&O.sortableInfo&&o.nodeIsChild(O)&&!o.state.sorting){var k=o.props.useDragHandle,U=O.sortableInfo,z=U.index,q=U.collection,Q=U.disabled;if(Q||k&&!kv(g.target,T9))return;o.manager.active={collection:q,index:z},!Poe(g)&&g.target.tagName===dg.Anchor&&g.preventDefault(),E||(o.props.pressDelay===0?o.handlePress(g):o.pressTimer=setTimeout(function(){return o.handlePress(g)},o.props.pressDelay))}}}),Da(fs(fs(o)),"nodeIsChild",function(g){return g.sortableInfo.manager===o.manager}),Da(fs(fs(o)),"handleMove",function(g){var b=o.props,E=b.distance,S=b.pressThreshold;if(!o.state.sorting&&o.touched&&!o._awaitingUpdateBeforeSortStart){var O=hv(g),k={x:o.position.x-O.x,y:o.position.y-O.y},U=Math.abs(k.x)+Math.abs(k.y);o.delta=k,!E&&(!S||U>=S)?(clearTimeout(o.cancelTimer),o.cancelTimer=setTimeout(o.cancel,0)):E&&U>=E&&o.manager.isActive()&&o.handlePress(g)}}),Da(fs(fs(o)),"handleEnd",function(){o.touched=!1,o.cancel()}),Da(fs(fs(o)),"cancel",function(){var g=o.props.distance,b=o.state.sorting;b||(g||clearTimeout(o.pressTimer),o.manager.active=null)}),Da(fs(fs(o)),"handlePress",function(g){try{var b=o.manager.getActive(),E=function(){if(b){var S=function(){var de=Y.sortableInfo.index,Me=Toe(Y),fe=Foe(o.container),xe=o.scrollContainer.getBoundingClientRect(),De=U({index:de,node:Y,collection:ee});if(o.node=Y,o.margin=Me,o.gridGap=fe,o.width=De.width,o.height=De.height,o.marginOffset={x:o.margin.left+o.margin.right+o.gridGap.x,y:Math.max(o.margin.top,o.margin.bottom,o.gridGap.y)},o.boundingClientRect=Y.getBoundingClientRect(),o.containerBoundingRect=xe,o.index=de,o.newIndex=de,o.axis={x:k.indexOf("x")>=0,y:k.indexOf("y")>=0},o.offsetEdge=Bb(Y,o.container),N?o.initialOffset=hv(u5({},g,{pageX:o.boundingClientRect.left,pageY:o.boundingClientRect.top})):o.initialOffset=hv(g),o.initialScroll={left:o.scrollContainer.scrollLeft,top:o.scrollContainer.scrollTop},o.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},o.helper=o.helperContainer.appendChild(Loe(Y)),sb(o.helper,{boxSizing:"border-box",height:"".concat(o.height,"px"),left:"".concat(o.boundingClientRect.left-Me.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(o.boundingClientRect.top-Me.top,"px"),width:"".concat(o.width,"px")}),N&&o.helper.focus(),q&&(o.sortableGhost=Y,sb(Y,{opacity:0,visibility:"hidden"})),o.minTranslate={},o.maxTranslate={},N){var me=X?{top:0,left:0,width:o.contentWindow.innerWidth,height:o.contentWindow.innerHeight}:o.containerBoundingRect,at=me.top,Qe=me.left,He=me.width,We=me.height,Ce=at+We,Te=Qe+He;o.axis.x&&(o.minTranslate.x=Qe-o.boundingClientRect.left,o.maxTranslate.x=Te-(o.boundingClientRect.left+o.width)),o.axis.y&&(o.minTranslate.y=at-o.boundingClientRect.top,o.maxTranslate.y=Ce-(o.boundingClientRect.top+o.height))}else o.axis.x&&(o.minTranslate.x=(X?0:xe.left)-o.boundingClientRect.left-o.width/2,o.maxTranslate.x=(X?o.contentWindow.innerWidth:xe.left+xe.width)-o.boundingClientRect.left-o.width/2),o.axis.y&&(o.minTranslate.y=(X?0:xe.top)-o.boundingClientRect.top-o.height/2,o.maxTranslate.y=(X?o.contentWindow.innerHeight:xe.top+xe.height)-o.boundingClientRect.top-o.height/2);z&&z.split(" ").forEach(function(rt){return o.helper.classList.add(rt)}),o.listenerNode=g.touches?g.target:o.contentWindow,N?(o.listenerNode.addEventListener("wheel",o.handleKeyEnd,!0),o.listenerNode.addEventListener("mousedown",o.handleKeyEnd,!0),o.listenerNode.addEventListener("keydown",o.handleKeyDown)):(m1.move.forEach(function(rt){return o.listenerNode.addEventListener(rt,o.handleSortMove,!1)}),m1.end.forEach(function(rt){return o.listenerNode.addEventListener(rt,o.handleSortEnd,!1)})),o.setState({sorting:!0,sortingIndex:de}),re&&re({node:Y,index:de,collection:ee,isKeySorting:N,nodes:o.manager.getOrderedRefs(),helper:o.helper},g),N&&o.keyMove(0)},O=o.props,k=O.axis,U=O.getHelperDimensions,z=O.helperClass,q=O.hideSortableGhost,Q=O.updateBeforeSortStart,re=O.onSortStart,X=O.useWindowAsScrollContainer,Y=b.node,ee=b.collection,N=o.manager.isKeySorting,ie=function(){if(typeof Q=="function"){o._awaitingUpdateBeforeSortStart=!0;var he=qoe(function(){var de=Y.sortableInfo.index;return Promise.resolve(Q({collection:ee,index:de,node:Y,isKeySorting:N},g)).then(function(){})},function(de,Me){if(o._awaitingUpdateBeforeSortStart=!1,de)throw Me;return Me});if(he&&he.then)return he.then(function(){})}}();return ie&&ie.then?ie.then(S):S(ie)}}();return Promise.resolve(E&&E.then?E.then(function(){}):void 0)}catch(S){return Promise.reject(S)}}),Da(fs(fs(o)),"handleSortMove",function(g){var b=o.props.onSortMove;typeof g.preventDefault=="function"&&g.cancelable&&g.preventDefault(),o.updateHelperPosition(g),o.animateNodes(),o.autoscroll(),b&&b(g)}),Da(fs(fs(o)),"handleSortEnd",function(g){var b=o.props,E=b.hideSortableGhost,S=b.onSortEnd,O=o.manager,k=O.active.collection,U=O.isKeySorting,z=o.manager.getOrderedRefs();o.listenerNode&&(U?(o.listenerNode.removeEventListener("wheel",o.handleKeyEnd,!0),o.listenerNode.removeEventListener("mousedown",o.handleKeyEnd,!0),o.listenerNode.removeEventListener("keydown",o.handleKeyDown)):(m1.move.forEach(function(Y){return o.listenerNode.removeEventListener(Y,o.handleSortMove)}),m1.end.forEach(function(Y){return o.listenerNode.removeEventListener(Y,o.handleSortEnd)}))),o.helper.parentNode.removeChild(o.helper),E&&o.sortableGhost&&sb(o.sortableGhost,{opacity:"",visibility:""});for(var q=0,Q=z.length;q<Q;q++){var re=z[q],X=re.node;re.edgeOffset=null,re.boundingClientRect=null,ab(X,null),c5(X,null),re.translate=null}o.autoScroller.clear(),o.manager.active=null,o.manager.isKeySorting=!1,o.setState({sorting:!1,sortingIndex:null}),typeof S=="function"&&S({collection:k,newIndex:o.newIndex,oldIndex:o.index,isKeySorting:U,nodes:z},g),o.touched=!1}),Da(fs(fs(o)),"autoscroll",function(){var g=o.props.disableAutoscroll,b=o.manager.isKeySorting;if(g){o.autoScroller.clear();return}if(b){var E=u5({},o.translate),S=0,O=0;o.axis.x&&(E.x=Math.min(o.maxTranslate.x,Math.max(o.minTranslate.x,o.translate.x)),S=o.translate.x-E.x),o.axis.y&&(E.y=Math.min(o.maxTranslate.y,Math.max(o.minTranslate.y,o.translate.y)),O=o.translate.y-E.y),o.translate=E,ab(o.helper,o.translate),o.scrollContainer.scrollLeft+=S,o.scrollContainer.scrollTop+=O;return}o.autoScroller.update({height:o.height,maxTranslate:o.maxTranslate,minTranslate:o.minTranslate,translate:o.translate,width:o.width})}),Da(fs(fs(o)),"onAutoScroll",function(g){o.translate.x+=g.left,o.translate.y+=g.top,o.animateNodes()}),Da(fs(fs(o)),"handleKeyDown",function(g){var b=g.keyCode,E=o.props,S=E.shouldCancelStart,O=E.keyCodes,k=O===void 0?{}:O,U=u5({},Xj,k);o.manager.active&&!o.manager.isKeySorting||!o.manager.active&&(!U.lift.includes(b)||S(g)||!o.isValidSortingTarget(g))||(g.stopPropagation(),g.preventDefault(),U.lift.includes(b)&&!o.manager.active?o.keyLift(g):U.drop.includes(b)&&o.manager.active?o.keyDrop(g):U.cancel.includes(b)?(o.newIndex=o.manager.active.index,o.keyDrop(g)):U.up.includes(b)?o.keyMove(-1):U.down.includes(b)&&o.keyMove(1))}),Da(fs(fs(o)),"keyLift",function(g){var b=g.target,E=kv(b,function(U){return U.sortableInfo!=null}),S=E.sortableInfo,O=S.index,k=S.collection;o.initialFocusedNode=b,o.manager.isKeySorting=!0,o.manager.active={index:O,collection:k},o.handlePress(g)}),Da(fs(fs(o)),"keyMove",function(g){var b=o.manager.getOrderedRefs(),E=b[b.length-1].node.sortableInfo.index,S=o.newIndex+g,O=o.newIndex;if(!(S<0||S>E)){o.prevIndex=O,o.newIndex=S;var k=Roe(o.newIndex,o.prevIndex,o.index),U=b.find(function(N){var ie=N.node;return ie.sortableInfo.index===k}),z=U.node,q=o.containerScrollDelta,Q=U.boundingClientRect||d5(z,q),re=U.translate||{x:0,y:0},X={top:Q.top+re.y-q.top,left:Q.left+re.x-q.left},Y=O<S,ee={x:Y&&o.axis.x?z.offsetWidth-o.width:0,y:Y&&o.axis.y?z.offsetHeight-o.height:0};o.handleSortMove({pageX:X.left+ee.x,pageY:X.top+ee.y,ignoreTransition:g===0})}}),Da(fs(fs(o)),"keyDrop",function(g){o.handleSortEnd(g),o.initialFocusedNode&&o.initialFocusedNode.focus()}),Da(fs(fs(o)),"handleKeyEnd",function(g){o.manager.active&&o.keyDrop(g)}),Da(fs(fs(o)),"isValidSortingTarget",function(g){var b=o.props.useDragHandle,E=g.target,S=kv(E,function(O){return O.sortableInfo!=null});return S&&S.sortableInfo&&!S.sortableInfo.disabled&&(b?T9(E):E.sortableInfo)});var d=new Ioe;return Qoe(a),o.manager=d,o.wrappedInstance=ui.createRef(),o.sortableContextValue={manager:d},o.events={end:o.handleEnd,move:o.handleMove,start:o.handleStart},o}return e_(s,[{key:"componentDidMount",value:function(){var o=this,d=this.props.useWindowAsScrollContainer,g=this.getContainer();Promise.resolve(g).then(function(b){o.container=b,o.document=o.container.ownerDocument||document;var E=o.props.contentWindow||o.document.defaultView||window;o.contentWindow=typeof E=="function"?E():E,o.scrollContainer=d?o.document.scrollingElement||o.document.documentElement:Hj(o.container)||o.container,o.autoScroller=new zoe(o.scrollContainer,o.onAutoScroll),Object.keys(o.events).forEach(function(S){return m1[S].forEach(function(O){return o.container.addEventListener(O,o.events[S],!1)})}),o.container.addEventListener("keydown",o.handleKeyDown)})}},{key:"componentWillUnmount",value:function(){var o=this;this.helper&&this.helper.parentNode&&this.helper.parentNode.removeChild(this.helper),this.container&&(Object.keys(this.events).forEach(function(d){return m1[d].forEach(function(g){return o.container.removeEventListener(g,o.events[d])})}),this.container.removeEventListener("keydown",this.handleKeyDown))}},{key:"updateHelperPosition",value:function(o){var d=this.props,g=d.lockAxis,b=d.lockOffset,E=d.lockToContainerEdges,S=d.transitionDuration,O=d.keyboardSortingTransitionDuration,k=O===void 0?S:O,U=this.manager.isKeySorting,z=o.ignoreTransition,q=hv(o),Q={x:q.x-this.initialOffset.x,y:q.y-this.initialOffset.y};if(Q.y-=window.pageYOffset-this.initialWindowScroll.top,Q.x-=window.pageXOffset-this.initialWindowScroll.left,this.translate=Q,E){var re=Doe({height:this.height,lockOffset:b,width:this.width}),X=qj(re,2),Y=X[0],ee=X[1],N={x:this.width/2-Y.x,y:this.height/2-Y.y},ie={x:this.width/2-ee.x,y:this.height/2-ee.y};Q.x=I9(this.minTranslate.x+N.x,this.maxTranslate.x-ie.x,Q.x),Q.y=I9(this.minTranslate.y+N.y,this.maxTranslate.y-ie.y,Q.y)}g==="x"?Q.y=0:g==="y"&&(Q.x=0),U&&k&&!z&&c5(this.helper,k),ab(this.helper,Q)}},{key:"animateNodes",value:function(){var o=this.props,d=o.transitionDuration,g=o.hideSortableGhost,b=o.onSortOver,E=this.containerScrollDelta,S=this.windowScrollDelta,O=this.manager.getOrderedRefs(),k={left:this.offsetEdge.left+this.translate.x+E.left,top:this.offsetEdge.top+this.translate.y+E.top},U=this.manager.isKeySorting,z=this.newIndex;this.newIndex=null;for(var q=0,Q=O.length;q<Q;q++){var re=O[q].node,X=re.sortableInfo.index,Y=re.offsetWidth,ee=re.offsetHeight,N={height:this.height>ee?ee/2:this.height/2,width:this.width>Y?Y/2:this.width/2},ie=U&&X>this.index&&X<=z,he=U&&X<this.index&&X>=z,de={x:0,y:0},Me=O[q].edgeOffset;Me||(Me=Bb(re,this.container),O[q].edgeOffset=Me,U&&(O[q].boundingClientRect=d5(re,E)));var fe=q<O.length-1&&O[q+1],xe=q>0&&O[q-1];if(fe&&!fe.edgeOffset&&(fe.edgeOffset=Bb(fe.node,this.container),U&&(fe.boundingClientRect=d5(fe.node,E))),X===this.index){g&&(this.sortableGhost=re,sb(re,{opacity:0,visibility:"hidden"}));continue}d&&c5(re,d),this.axis.x?this.axis.y?he||X<this.index&&(k.left+S.left-N.width<=Me.left&&k.top+S.top<=Me.top+N.height||k.top+S.top+N.height<=Me.top)?(de.x=this.width+this.marginOffset.x,Me.left+de.x>this.containerBoundingRect.width-N.width&&fe&&(de.x=fe.edgeOffset.left-Me.left,de.y=fe.edgeOffset.top-Me.top),this.newIndex===null&&(this.newIndex=X)):(ie||X>this.index&&(k.left+S.left+N.width>=Me.left&&k.top+S.top+N.height>=Me.top||k.top+S.top+N.height>=Me.top+ee))&&(de.x=-(this.width+this.marginOffset.x),Me.left+de.x<this.containerBoundingRect.left+N.width&&xe&&(de.x=xe.edgeOffset.left-Me.left,de.y=xe.edgeOffset.top-Me.top),this.newIndex=X):ie||X>this.index&&k.left+S.left+N.width>=Me.left?(de.x=-(this.width+this.marginOffset.x),this.newIndex=X):(he||X<this.index&&k.left+S.left<=Me.left+N.width)&&(de.x=this.width+this.marginOffset.x,this.newIndex==null&&(this.newIndex=X)):this.axis.y&&(ie||X>this.index&&k.top+S.top+N.height>=Me.top?(de.y=-(this.height+this.marginOffset.y),this.newIndex=X):(he||X<this.index&&k.top+S.top<=Me.top+N.height)&&(de.y=this.height+this.marginOffset.y,this.newIndex==null&&(this.newIndex=X))),ab(re,de),O[q].translate=de}this.newIndex==null&&(this.newIndex=this.index),U&&(this.newIndex=z);var De=U?this.prevIndex:z;b&&this.newIndex!==De&&b({collection:this.manager.active.collection,index:this.index,newIndex:this.newIndex,oldIndex:De,isKeySorting:U,nodes:O,helper:this.helper})}},{key:"getWrappedInstance",value:function(){return Rg(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call"),this.wrappedInstance.current}},{key:"getContainer",value:function(){var o=this.props.getContainer;return typeof o!="function"?lx.findDOMNode(this):o(r.withRef?this.getWrappedInstance():void 0)}},{key:"render",value:function(){var o=r.withRef?this.wrappedInstance:null;return ui.createElement(Jj.Provider,{value:this.sortableContextValue},ui.createElement(n,xC({ref:o},$j(this.props,Goe))))}},{key:"helperContainer",get:function(){var o=this.props.helperContainer;return typeof o=="function"?o():this.props.helperContainer||this.document.body}},{key:"containerScrollDelta",get:function(){var o=this.props.useWindowAsScrollContainer;return o?{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}}}]),s}(ui.Component),Da(e,"displayName",g8("sortableList",n)),Da(e,"defaultProps",Woe),Da(e,"propTypes",Zj),t}var eN={index:fi.number.isRequired,collection:fi.oneOfType([fi.number,fi.string]),disabled:fi.bool},$oe=Object.keys(eN);function Voe(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{withRef:!1};return t=e=function(i){m8(s,i);function s(){var a,o;JC(this,s);for(var d=arguments.length,g=new Array(d),b=0;b<d;b++)g[b]=arguments[b];return o=p8(this,(a=wC(s)).call.apply(a,[this].concat(g))),Da(fs(fs(o)),"wrappedInstance",ui.createRef()),o}return e_(s,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(o){this.node&&(o.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),o.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),o.collection!==this.props.collection&&(this.unregister(o.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var o=this.props,d=o.collection,g=o.disabled,b=o.index,E=lx.findDOMNode(this);E.sortableInfo={collection:d,disabled:g,index:b,manager:this.context.manager},this.node=E,this.ref={node:E},this.context.manager.add(d,this.ref)}},{key:"unregister",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.collection;this.context.manager.remove(o,this.ref)}},{key:"getWrappedInstance",value:function(){return Rg(r.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.wrappedInstance.current}},{key:"render",value:function(){var o=r.withRef?this.wrappedInstance:null;return ui.createElement(n,xC({ref:o},$j(this.props,$oe)))}}]),s}(ui.Component),Da(e,"displayName",g8("sortableElement",n)),Da(e,"contextType",Jj),Da(e,"propTypes",eN),Da(e,"defaultProps",{collection:0}),t}function ro(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",e="c4894131c5d7f6ef28da960f43f4c830425a38cb",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx",statementMap:{0:{start:{line:8,column:23},end:{line:19,column:2}},1:{start:{line:9,column:2},end:{line:18,column:7}},2:{start:{line:22,column:4},end:{line:31,column:5}},3:{start:{line:24,column:8},end:{line:24,column:54}},4:{start:{line:26,column:8},end:{line:26,column:53}},5:{start:{line:28,column:8},end:{line:28,column:56}},6:{start:{line:30,column:8},end:{line:30,column:49}},7:{start:{line:34,column:51},end:{line:34,column:61}},8:{start:{line:35,column:25},end:{line:35,column:27}},9:{start:{line:36,column:4},end:{line:41,column:5}},10:{start:{line:37,column:6},end:{line:37,column:76}},11:{start:{line:38,column:6},end:{line:40,column:7}},12:{start:{line:39,column:8},end:{line:39,column:103}},13:{start:{line:42,column:4},end:{line:53,column:6}},14:{start:{line:57,column:24},end:{line:66,column:3}},15:{start:{line:67,column:29},end:{line:69,column:3}},16:{start:{line:71,column:4},end:{line:73,column:6}},17:{start:{line:76,column:29},end:{line:76,column:82}},18:{start:{line:77,column:4},end:{line:122,column:6}},19:{start:{line:81,column:25},end:{line:81,column:72}},20:{start:{line:97,column:31},end:{line:97,column:79}},21:{start:{line:106,column:31},end:{line:106,column:76}},22:{start:{line:116,column:31},end:{line:116,column:88}},23:{start:{line:125,column:30},end:{line:125,column:106}},24:{start:{line:125,column:73},end:{line:125,column:105}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:38},end:{line:8,column:39}},loc:{start:{line:8,column:49},end:{line:19,column:1}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:21,column:2},end:{line:21,column:3}},loc:{start:{line:21,column:15},end:{line:32,column:3}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:33,column:2},end:{line:33,column:3}},loc:{start:{line:33,column:11},end:{line:54,column:3}},line:33},3:{name:"(anonymous_3)",decl:{start:{line:60,column:17},end:{line:60,column:18}},loc:{start:{line:60,column:23},end:{line:61,column:5}},line:60},4:{name:"(anonymous_4)",decl:{start:{line:62,column:20},end:{line:62,column:21}},loc:{start:{line:62,column:26},end:{line:63,column:5}},line:62},5:{name:"(anonymous_5)",decl:{start:{line:64,column:29},end:{line:64,column:30}},loc:{start:{line:64,column:35},end:{line:65,column:5}},line:64},6:{name:"(anonymous_6)",decl:{start:{line:70,column:2},end:{line:70,column:3}},loc:{start:{line:70,column:20},end:{line:74,column:3}},line:70},7:{name:"(anonymous_7)",decl:{start:{line:75,column:2},end:{line:75,column:3}},loc:{start:{line:75,column:11},end:{line:123,column:3}},line:75},8:{name:"(anonymous_8)",decl:{start:{line:81,column:17},end:{line:81,column:18}},loc:{start:{line:81,column:25},end:{line:81,column:72}},line:81},9:{name:"(anonymous_9)",decl:{start:{line:97,column:23},end:{line:97,column:24}},loc:{start:{line:97,column:31},end:{line:97,column:79}},line:97},10:{name:"(anonymous_10)",decl:{start:{line:106,column:23},end:{line:106,column:24}},loc:{start:{line:106,column:31},end:{line:106,column:76}},line:106},11:{name:"(anonymous_11)",decl:{start:{line:116,column:23},end:{line:116,column:24}},loc:{start:{line:116,column:31},end:{line:116,column:88}},line:116},12:{name:"(anonymous_12)",decl:{start:{line:125,column:46},end:{line:125,column:47}},loc:{start:{line:125,column:73},end:{line:125,column:105}},line:125}},branchMap:{0:{loc:{start:{line:22,column:4},end:{line:31,column:5}},type:"switch",locations:[{start:{line:23,column:6},end:{line:24,column:54}},{start:{line:25,column:6},end:{line:26,column:53}},{start:{line:27,column:6},end:{line:28,column:56}},{start:{line:29,column:6},end:{line:30,column:49}}],line:22},1:{loc:{start:{line:36,column:4},end:{line:41,column:5}},type:"if",locations:[{start:{line:36,column:4},end:{line:41,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},2:{loc:{start:{line:38,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:38,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:38},3:{loc:{start:{line:76,column:29},end:{line:76,column:82}},type:"cond-expr",locations:[{start:{line:76,column:67},end:{line:76,column:73}},{start:{line:76,column:76},end:{line:76,column:82}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},b:{0:[0,0,0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerListItem.tsx"],names:[],mappings:"AAgBS,SACL,KADK;AAhBT,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AAEvB,SAAQ,eAAe,cAAc,iBAAiB,gBAAe;AAErE,OAAO,eAAe;AACtB,SAAQ,iBAAiB,sBAAqB;AAQ9C,MAAM,iBAAiB,eAAe,CAAC,UAA+B;AACpE,SAAO,qBAAC,SAAI,WAAU,mCACpB;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAM,MAAM;AAAA;AAAA,IACd;AAAA,IACA,oBAAC,YAAO,WAAU,+BACf,gBAAM,SACT;AAAA,KACF;AACF,CAAC;AAUD,MAAM,mBAAmB,MAAM,UAA2B;AAAA,EACxD,aAAa;AACX,YAAO,KAAK,MAAM,QAAQ;AAAA,MAC1B,KAAK;AAAa,eAAO,oBAAC,iBAAc;AAAA,MACxC,KAAK;AAAQ,eAAO,oBAAC,gBAAa;AAAA,MAClC,KAAK;AAAQ,eAAO,oBAAC,mBAAgB;AAAA,MACrC,KAAK;AAAU,eAAO,oBAAC,YAAS;AAAA,IAChC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,gBAAgB,mBAAkB,IAAI,KAAK;AAElD,QAAI,iBAAiB;AACrB,QAAI,gBAAgB;AAClB,uBAAiB,oCAAoC,cAAc;AAEnE,UAAI,oBAAoB;AACtB,0BAAkB,qCAAqC,cAAc,KAAK,kBAAkB;AAAA,MAC9F;AAAA,IACF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,UAAU;AAAA,QACV,OAAO,KAAK,MAAM;AAAA,QAClB,WAAW,mCAAmC,cAAc;AAAA,QAC5D,eAAa,KAAK,MAAM;AAAA,QACxB,SAAS,KAAK,MAAM;AAAA,QACpB,eAAY;AAAA,QAEX,eAAK,WAAW;AAAA;AAAA,IACnB;AAAA,EACF;AACF;AAgBA,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,OAAO,eAAe;AAAA,IACpB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,aAAa,MAAM;AAAA,IAAC;AAAA,IACpB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,yBAAyB,MAAM;AAAA,IAAC;AAAA,EAClC;AAAA,EAEA,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,kBAAkB;AAChB,WAAO;AAAA,MACL,eAAe,EAAE,MAAM,GAAG;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,mBAAmB,KAAK,MAAM,eAAe,YAAY,SAAS;AAExE,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,IAAI,KAAK,MAAM;AAAA,QAEf,SAAS,QAAM,KAAK,MAAM,cAAc,KAAK,MAAM,UAAU;AAAA,QAC7D,eAAa,qBAAmB,KAAK,MAAM;AAAA,QAC3C,WAAW,WAAW;AAAA,UACpB,4BAA4B;AAAA,UAC5B,qCAAqC,KAAK,MAAM;AAAA,UAChD,CAAC,KAAK,MAAM,SAAU,GAAG;AAAA,QAC3B,CAAC;AAAA,QACD;AAAA,8BAAC,kBAAgB,GAAG,KAAK,OAAO;AAAA,UAChC,oBAAC,UAAK,OAAO,EAAC,UAAU,EAAC,GAAG;AAAA,UAC5B;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,SAAS,QAAM,KAAK,MAAM,eAAgB,KAAK,MAAM,UAAU;AAAA;AAAA,UACjE;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,SAAS,QAAM,KAAK,MAAM,YAAa,KAAK,MAAM,UAAU;AAAA;AAAA,UAC9D;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,qBAAmB,KAAK,MAAM,UAAQ;AAAA,cAC7C,QAAQ;AAAA,cACR,gBAAe;AAAA,cACf,oBAAoB;AAAA,cACpB,SAAS,QAAM,KAAK,MAAM,wBAAyB,KAAK,MAAM,UAAU;AAAA;AAAA,UAC1E;AAAA;AAAA;AAAA,MA5BK,KAAK,MAAM;AAAA,IA6BlB;AAAA,EACF;AACF;AAEA,MAAM,wBAAwB,gBAAoC,CAAC,UAA8B,oBAAC,iBAAe,GAAG,OAAO,CAAE;AAE7H,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c4894131c5d7f6ef28da960f43f4c830425a38cb"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ro=function(){return a},a}ro();const Hoe=(ro().s[0]++,Uoe(n=>(ro().f[0]++,ro().s[1]++,le.jsxs("div",{className:"maputnik-layer-list-item-handle",children:[le.jsx(dU,{className:"layer-handle__icon",type:n.layerType}),le.jsx("button",{className:"maputnik-layer-list-item-id",children:n.layerId})]}))));class h5 extends rr.Component{renderIcon(){switch(ro().f[1]++,ro().s[2]++,this.props.action){case"duplicate":return ro().b[0][0]++,ro().s[3]++,le.jsx(CH,{});case"show":return ro().b[0][1]++,ro().s[4]++,le.jsx(vH,{});case"hide":return ro().b[0][2]++,ro().s[5]++,le.jsx(yH,{});case"delete":return ro().b[0][3]++,ro().s[6]++,le.jsx(ky,{})}}render(){ro().f[2]++;const{classBlockName:e,classBlockModifier:t}=(ro().s[7]++,this.props);let r=(ro().s[8]++,"");return ro().s[9]++,e?(ro().b[1][0]++,ro().s[10]++,r=`maputnik-layer-list-icon-action__${e}`,ro().s[11]++,t?(ro().b[2][0]++,ro().s[12]++,r+=` maputnik-layer-list-icon-action__${e}--${t}`):ro().b[2][1]++):ro().b[1][1]++,ro().s[13]++,le.jsx("button",{tabIndex:-1,title:this.props.action,className:`maputnik-layer-list-icon-action ${r}`,"data-wd-key":this.props.wdKey,onClick:this.props.onClick,"aria-hidden":"true",children:this.renderIcon()})}}class AB extends rr.Component{getChildContext(){return ro().f[6]++,ro().s[16]++,{reactIconBase:{size:14}}}render(){ro().f[7]++;const e=(ro().s[17]++,this.props.visibility==="visible"?(ro().b[3][0]++,"show"):(ro().b[3][1]++,"hide"));return ro().s[18]++,le.jsxs("li",{id:this.props.id,onClick:t=>(ro().f[8]++,ro().s[19]++,this.props.onLayerSelect(this.props.layerIndex)),"data-wd-key":"layer-list-item:"+this.props.layerId,className:tm({"maputnik-layer-list-item":!0,"maputnik-layer-list-item-selected":this.props.isSelected,[this.props.className]:!0}),children:[le.jsx(Hoe,{...this.props}),le.jsx("span",{style:{flexGrow:1}}),le.jsx(h5,{wdKey:"layer-list-item:"+this.props.layerId+":delete",action:"delete",classBlockName:"delete",onClick:t=>(ro().f[9]++,ro().s[20]++,this.props.onLayerDestroy(this.props.layerIndex))}),le.jsx(h5,{wdKey:"layer-list-item:"+this.props.layerId+":copy",action:"duplicate",classBlockName:"duplicate",onClick:t=>(ro().f[10]++,ro().s[21]++,this.props.onLayerCopy(this.props.layerIndex))}),le.jsx(h5,{wdKey:"layer-list-item:"+this.props.layerId+":toggle-visibility",action:e,classBlockName:"visibility",classBlockModifier:e,onClick:t=>(ro().f[11]++,ro().s[22]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))})]},this.props.layerId)}}kn(AB,"defaultProps",(ro().s[14]++,{isSelected:!1,visibility:"visible",onLayerCopy:()=>{ro().f[3]++},onLayerDestroy:()=>{ro().f[4]++},onLayerVisibilityToggle:()=>{ro().f[5]++}})),kn(AB,"childContextTypes",(ro().s[15]++,{reactIconBase:fi.object}));const Zoe=(ro().s[23]++,Voe(n=>(ro().f[12]++,ro().s[24]++,le.jsx(AB,{...n}))));function O2(){var n="/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",e="522bfc6b8aacbfd03b55d947af2897dc69beb570",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:20,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:21,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputButton.tsx"],names:[],mappings:"AAkBW;AAlBX,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAevB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,IAAI,KAAK,MAAM;AAAA,QACf,OAAO,KAAK,MAAM;AAAA,QAClB,MAAM,KAAK,MAAM;AAAA,QACjB,SAAS,KAAK,MAAM;AAAA,QACpB,UAAU,KAAK,MAAM;AAAA,QACrB,cAAY,KAAK,MAAM,YAAY;AAAA,QACnC,WAAW,WAAW,mBAAmB,KAAK,MAAM,SAAS;AAAA,QAC7D,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAEjB,eAAK,MAAM;AAAA;AAAA,IACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"522bfc6b8aacbfd03b55d947af2897dc69beb570"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return O2=function(){return a},a}O2();class Va extends rr.Component{render(){return O2().f[0]++,O2().s[0]++,le.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:tm("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 tN=["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])"],I2=tN.join(","),nN=typeof Element>"u",Dg=nN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,k2=!nN&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},T2=function n(e,t){var r;t===void 0&&(t=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",a=s||t&&e&&n(e.parentNode);return a},Xoe=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},rN=function(e,t,r){if(T2(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(I2));return t&&Dg.call(e,I2)&&i.unshift(e),i=i.filter(r),i},iN=function n(e,t,r){for(var i=[],s=Array.from(e);s.length;){var a=s.shift();if(!T2(a,!1))if(a.tagName==="SLOT"){var o=a.assignedElements(),d=o.length?o:a.children,g=n(d,!0,r);r.flatten?i.push.apply(i,g):i.push({scopeParent:a,candidates:g})}else{var b=Dg.call(a,I2);b&&r.filter(a)&&(t||!e.includes(a))&&i.push(a);var E=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),S=!T2(E,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(E&&S){var O=n(E===!0?a.children:E.children,!0,r);r.flatten?i.push.apply(i,O):i.push({scopeParent:a,candidates:O})}else s.unshift.apply(s,a.children)}}return i},oN=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},v0=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Xoe(e))&&!oN(e)?0:e.tabIndex},Joe=function(e,t){var r=v0(e);return r<0&&t&&!oN(e)?0:r},ese=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},sN=function(e){return e.tagName==="INPUT"},tse=function(e){return sN(e)&&e.type==="hidden"},nse=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},rse=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},ise=function(e){if(!e.name)return!0;var t=e.form||k2(e),r=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var s=rse(i,e.form);return!s||s===e},ose=function(e){return sN(e)&&e.type==="radio"},sse=function(e){return ose(e)&&!ise(e)},ase=function(e){var t,r=e&&k2(e),i=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var a,o,d;for(s=!!((a=i)!==null&&a!==void 0&&(o=a.ownerDocument)!==null&&o!==void 0&&o.contains(i)||e!=null&&(d=e.ownerDocument)!==null&&d!==void 0&&d.contains(e));!s&&i;){var g,b,E;r=k2(i),i=(g=r)===null||g===void 0?void 0:g.host,s=!!((b=i)!==null&&b!==void 0&&(E=b.ownerDocument)!==null&&E!==void 0&&E.contains(i))}}return s},P9=function(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0},lse=function(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=Dg.call(e,"details>summary:first-of-type"),a=s?e.parentElement:e;if(Dg.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var o=e;e;){var d=e.parentElement,g=k2(e);if(d&&!d.shadowRoot&&i(d)===!0)return P9(e);e.assignedSlot?e=e.assignedSlot:!d&&g!==e.ownerDocument?e=g.host:e=d}e=o}if(ase(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return P9(e);return!1},use=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND")return Dg.call(t,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}t=t.parentElement}return!1},P2=function(e,t){return!(t.disabled||T2(t)||tse(t)||lse(t,e)||nse(t)||use(t))},cB=function(e,t){return!(sse(t)||v0(t)<0||!P2(e,t))},Ase=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},cse=function n(e){var t=[],r=[];return e.forEach(function(i,s){var a=!!i.scopeParent,o=a?i.scopeParent:i,d=Joe(o,a),g=a?n(i.candidates):o;d===0?a?t.push.apply(t,g):t.push(o):r.push({documentOrder:s,tabIndex:d,item:i,isScope:a,content:g})}),r.sort(ese).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(t)},aN=function(e,t){t=t||{};var r;return t.getShadowRoot?r=iN([e],t.includeContainer,{filter:cB.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ase}):r=rN(e,t.includeContainer,cB.bind(null,t)),cse(r)},lN=function(e,t){t=t||{};var r;return t.getShadowRoot?r=iN([e],t.includeContainer,{filter:P2.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=rN(e,t.includeContainer,P2.bind(null,t)),r},ug=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Dg.call(e,I2)===!1?!1:cB(t,e)},dse=tN.concat("iframe").join(","),Ob=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Dg.call(e,dse)===!1?!1:P2(t,e)};const hse=Object.freeze(Object.defineProperty({__proto__:null,focusable:lN,getTabIndex:v0,isFocusable:Ob,isTabbable:ug,tabbable:aN},Symbol.toStringTag,{value:"Module"}));/*!
|
||
* focus-trap 7.5.4
|
||
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
||
*/function R9(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function D9(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?R9(Object(t),!0).forEach(function(r){fse(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):R9(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function fse(n,e,t){return e=mse(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function pse(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mse(n){var e=pse(n,"string");return typeof e=="symbol"?e:String(e)}var K9={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var i=e.indexOf(t);i===-1||e.splice(i,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},gse=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},yse=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},$v=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},vse=function(e){return $v(e)&&!e.shiftKey},Cse=function(e){return $v(e)&&e.shiftKey},F9=function(e){return setTimeout(e,0)},L9=function(e,t){var r=-1;return e.every(function(i,s){return t(i)?(r=s,!1):!0}),r},fv=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},lb=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},_se=[],bse=function(e,t){var r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||_se,s=D9({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:vse,isKeyBackward:Cse},t),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,d=function(fe,xe,De){return fe&&fe[xe]!==void 0?fe[xe]:s[De||xe]},g=function(fe,xe){var De=typeof(xe==null?void 0:xe.composedPath)=="function"?xe.composedPath():void 0;return a.containerGroups.findIndex(function(me){var at=me.container,Qe=me.tabbableNodes;return at.contains(fe)||(De==null?void 0:De.includes(at))||Qe.find(function(He){return He===fe})})},b=function(fe){var xe=s[fe];if(typeof xe=="function"){for(var De=arguments.length,me=new Array(De>1?De-1:0),at=1;at<De;at++)me[at-1]=arguments[at];xe=xe.apply(void 0,me)}if(xe===!0&&(xe=void 0),!xe){if(xe===void 0||xe===!1)return xe;throw new Error("`".concat(fe,"` was specified but was not a node, or did not return a node"))}var Qe=xe;if(typeof xe=="string"&&(Qe=r.querySelector(xe),!Qe))throw new Error("`".concat(fe,"` as selector refers to no known node"));return Qe},E=function(){var fe=b("initialFocus");if(fe===!1)return!1;if(fe===void 0||!Ob(fe,s.tabbableOptions))if(g(r.activeElement)>=0)fe=r.activeElement;else{var xe=a.tabbableGroups[0],De=xe&&xe.firstTabbableNode;fe=De||b("fallbackFocus")}if(!fe)throw new Error("Your focus-trap needs to have at least one focusable element");return fe},S=function(){if(a.containerGroups=a.containers.map(function(fe){var xe=aN(fe,s.tabbableOptions),De=lN(fe,s.tabbableOptions),me=xe.length>0?xe[0]:void 0,at=xe.length>0?xe[xe.length-1]:void 0,Qe=De.find(function(Ce){return ug(Ce)}),He=De.slice().reverse().find(function(Ce){return ug(Ce)}),We=!!xe.find(function(Ce){return v0(Ce)>0});return{container:fe,tabbableNodes:xe,focusableNodes:De,posTabIndexesFound:We,firstTabbableNode:me,lastTabbableNode:at,firstDomTabbableNode:Qe,lastDomTabbableNode:He,nextTabbableNode:function(Te){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,yt=xe.indexOf(Te);return yt<0?rt?De.slice(De.indexOf(Te)+1).find(function(bt){return ug(bt)}):De.slice(0,De.indexOf(Te)).reverse().find(function(bt){return ug(bt)}):xe[yt+(rt?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(fe){return fe.tabbableNodes.length>0}),a.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(a.containerGroups.find(function(fe){return fe.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},O=function Me(fe){var xe=fe.activeElement;if(xe)return xe.shadowRoot&&xe.shadowRoot.activeElement!==null?Me(xe.shadowRoot):xe},k=function Me(fe){if(fe!==!1&&fe!==O(document)){if(!fe||!fe.focus){Me(E());return}fe.focus({preventScroll:!!s.preventScroll}),a.mostRecentlyFocusedNode=fe,gse(fe)&&fe.select()}},U=function(fe){var xe=b("setReturnFocus",fe);return xe||(xe===!1?!1:fe)},z=function(fe){var xe=fe.target,De=fe.event,me=fe.isBackward,at=me===void 0?!1:me;xe=xe||lb(De),S();var Qe=null;if(a.tabbableGroups.length>0){var He=g(xe,De),We=He>=0?a.containerGroups[He]:void 0;if(He<0)at?Qe=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:Qe=a.tabbableGroups[0].firstTabbableNode;else if(at){var Ce=L9(a.tabbableGroups,function(Dt){var Pt=Dt.firstTabbableNode;return xe===Pt});if(Ce<0&&(We.container===xe||Ob(xe,s.tabbableOptions)&&!ug(xe,s.tabbableOptions)&&!We.nextTabbableNode(xe,!1))&&(Ce=He),Ce>=0){var Te=Ce===0?a.tabbableGroups.length-1:Ce-1,rt=a.tabbableGroups[Te];Qe=v0(xe)>=0?rt.lastTabbableNode:rt.lastDomTabbableNode}else $v(De)||(Qe=We.nextTabbableNode(xe,!1))}else{var yt=L9(a.tabbableGroups,function(Dt){var Pt=Dt.lastTabbableNode;return xe===Pt});if(yt<0&&(We.container===xe||Ob(xe,s.tabbableOptions)&&!ug(xe,s.tabbableOptions)&&!We.nextTabbableNode(xe))&&(yt=He),yt>=0){var bt=yt===a.tabbableGroups.length-1?0:yt+1,gt=a.tabbableGroups[bt];Qe=v0(xe)>=0?gt.firstTabbableNode:gt.firstDomTabbableNode}else $v(De)||(Qe=We.nextTabbableNode(xe))}}else Qe=b("fallbackFocus");return Qe},q=function(fe){var xe=lb(fe);if(!(g(xe,fe)>=0)){if(fv(s.clickOutsideDeactivates,fe)){o.deactivate({returnFocus:s.returnFocusOnDeactivate});return}fv(s.allowOutsideClick,fe)||fe.preventDefault()}},Q=function(fe){var xe=lb(fe),De=g(xe,fe)>=0;if(De||xe instanceof Document)De&&(a.mostRecentlyFocusedNode=xe);else{fe.stopImmediatePropagation();var me,at=!0;if(a.mostRecentlyFocusedNode)if(v0(a.mostRecentlyFocusedNode)>0){var Qe=g(a.mostRecentlyFocusedNode),He=a.containerGroups[Qe].tabbableNodes;if(He.length>0){var We=He.findIndex(function(Ce){return Ce===a.mostRecentlyFocusedNode});We>=0&&(s.isKeyForward(a.recentNavEvent)?We+1<He.length&&(me=He[We+1],at=!1):We-1>=0&&(me=He[We-1],at=!1))}}else a.containerGroups.some(function(Ce){return Ce.tabbableNodes.some(function(Te){return v0(Te)>0})})||(at=!1);else at=!1;at&&(me=z({target:a.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(a.recentNavEvent)})),k(me||a.mostRecentlyFocusedNode||E())}a.recentNavEvent=void 0},re=function(fe){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=fe;var De=z({event:fe,isBackward:xe});De&&($v(fe)&&fe.preventDefault(),k(De))},X=function(fe){if(yse(fe)&&fv(s.escapeDeactivates,fe)!==!1){fe.preventDefault(),o.deactivate();return}(s.isKeyForward(fe)||s.isKeyBackward(fe))&&re(fe,s.isKeyBackward(fe))},Y=function(fe){var xe=lb(fe);g(xe,fe)>=0||fv(s.clickOutsideDeactivates,fe)||fv(s.allowOutsideClick,fe)||(fe.preventDefault(),fe.stopImmediatePropagation())},ee=function(){if(a.active)return K9.activateTrap(i,o),a.delayInitialFocusTimer=s.delayInitialFocus?F9(function(){k(E())}):k(E()),r.addEventListener("focusin",Q,!0),r.addEventListener("mousedown",q,{capture:!0,passive:!1}),r.addEventListener("touchstart",q,{capture:!0,passive:!1}),r.addEventListener("click",Y,{capture:!0,passive:!1}),r.addEventListener("keydown",X,{capture:!0,passive:!1}),o},N=function(){if(a.active)return r.removeEventListener("focusin",Q,!0),r.removeEventListener("mousedown",q,!0),r.removeEventListener("touchstart",q,!0),r.removeEventListener("click",Y,!0),r.removeEventListener("keydown",X,!0),o},ie=function(fe){var xe=fe.some(function(De){var me=Array.from(De.removedNodes);return me.some(function(at){return at===a.mostRecentlyFocusedNode})});xe&&k(E())},he=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(ie):void 0,de=function(){he&&(he.disconnect(),a.active&&!a.paused&&a.containers.map(function(fe){he.observe(fe,{subtree:!0,childList:!0})}))};return o={get active(){return a.active},get paused(){return a.paused},activate:function(fe){if(a.active)return this;var xe=d(fe,"onActivate"),De=d(fe,"onPostActivate"),me=d(fe,"checkCanFocusTrap");me||S(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,xe==null||xe();var at=function(){me&&S(),ee(),de(),De==null||De()};return me?(me(a.containers.concat()).then(at,at),this):(at(),this)},deactivate:function(fe){if(!a.active)return this;var xe=D9({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},fe);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,N(),a.active=!1,a.paused=!1,de(),K9.deactivateTrap(i,o);var De=d(xe,"onDeactivate"),me=d(xe,"onPostDeactivate"),at=d(xe,"checkCanReturnFocus"),Qe=d(xe,"returnFocus","returnFocusOnDeactivate");De==null||De();var He=function(){F9(function(){Qe&&k(U(a.nodeFocusedBeforeActivation)),me==null||me()})};return Qe&&at?(at(U(a.nodeFocusedBeforeActivation)).then(He,He),this):(He(),this)},pause:function(fe){if(a.paused||!a.active)return this;var xe=d(fe,"onPause"),De=d(fe,"onPostPause");return a.paused=!0,xe==null||xe(),N(),de(),De==null||De(),this},unpause:function(fe){if(!a.paused||!a.active)return this;var xe=d(fe,"onUnpause"),De=d(fe,"onPostUnpause");return a.paused=!1,xe==null||xe(),S(),ee(),de(),De==null||De(),this},updateContainerElements:function(fe){var xe=[].concat(fe).filter(Boolean);return a.containers=xe.map(function(De){return typeof De=="string"?r.querySelector(De):De}),a.active&&S(),de(),this}},o.updateContainerElements(e),o};const xse=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:bse},Symbol.toStringTag,{value:"Module"})),wse=vB(xse),Mse=vB(hse);var f5,U9;function Sse(){if(U9)return f5;U9=1;function n(ee){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},n(ee)}function e(ee,N){if(!(ee instanceof N))throw new TypeError("Cannot call a class as a function")}function t(ee,N){for(var ie=0;ie<N.length;ie++){var he=N[ie];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(ee,S(he.key),he)}}function r(ee,N,ie){return t(ee.prototype,N),Object.defineProperty(ee,"prototype",{writable:!1}),ee}function i(ee,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");ee.prototype=Object.create(N&&N.prototype,{constructor:{value:ee,writable:!0,configurable:!0}}),Object.defineProperty(ee,"prototype",{writable:!1}),N&&s(ee,N)}function s(ee,N){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(he,de){return he.__proto__=de,he},s(ee,N)}function a(ee){var N=g();return function(){var he=b(ee),de;if(N){var Me=b(this).constructor;de=Reflect.construct(he,arguments,Me)}else de=he.apply(this,arguments);return o(this,de)}}function o(ee,N){if(N&&(n(N)==="object"||typeof N=="function"))return N;if(N!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(ee)}function d(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(ie){return ie.__proto__||Object.getPrototypeOf(ie)},b(ee)}function E(ee,N,ie){return N=S(N),N in ee?Object.defineProperty(ee,N,{value:ie,enumerable:!0,configurable:!0,writable:!0}):ee[N]=ie,ee}function S(ee){var N=O(ee,"string");return n(N)==="symbol"?N:String(N)}function O(ee,N){if(n(ee)!=="object"||ee===null)return ee;var ie=ee[Symbol.toPrimitive];if(ie!==void 0){var he=ie.call(ee,N||"default");if(n(he)!=="object")return he;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(ee)}var k=Fa(),U=dp(),z=wse,q=z.createFocusTrap,Q=Mse,re=Q.isFocusable,X=function(ee){i(ie,ee);var N=a(ie);function ie(he){var de;e(this,ie),de=N.call(this,he),E(d(de),"getNodeForOption",function(xe){var De,me=(De=this.internalOptions[xe])!==null&&De!==void 0?De:this.originalOptions[xe];if(typeof me=="function"){for(var at=arguments.length,Qe=new Array(at>1?at-1:0),He=1;He<at;He++)Qe[He-1]=arguments[He];me=me.apply(void 0,Qe)}if(me===!0&&(me=void 0),!me){if(me===void 0||me===!1)return me;throw new Error("`".concat(xe,"` was specified but was not a node, or did not return a node"))}var We=me;if(typeof me=="string"){var Ce;if(We=(Ce=this.getDocument())===null||Ce===void 0?void 0:Ce.querySelector(me),!We)throw new Error("`".concat(xe,"` as selector refers to no known node"))}return We}),de.handleDeactivate=de.handleDeactivate.bind(d(de)),de.handlePostDeactivate=de.handlePostDeactivate.bind(d(de)),de.handleClickOutsideDeactivates=de.handleClickOutsideDeactivates.bind(d(de)),de.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:de.handleDeactivate,onPostDeactivate:de.handlePostDeactivate,clickOutsideDeactivates:de.handleClickOutsideDeactivates},de.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var Me=he.focusTrapOptions;for(var fe in Me)if(Object.prototype.hasOwnProperty.call(Me,fe)){if(fe==="returnFocusOnDeactivate"||fe==="onDeactivate"||fe==="onPostDeactivate"||fe==="checkCanReturnFocus"||fe==="clickOutsideDeactivates"){de.originalOptions[fe]=Me[fe];continue}de.internalOptions[fe]=Me[fe]}return de.outsideClick=null,de.focusTrapElements=he.containerElements||[],de.updatePreviousElement(),de}return r(ie,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var de=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return de||(de===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var de=this.getDocument();de&&(this.previouslyFocusedElement=de.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(de){var Me=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,de):this.originalOptions.clickOutsideDeactivates;return Me&&(this.outsideClick={target:de.target,allowDeactivation:Me}),Me}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var de=this,Me=function(){var xe=de.getReturnFocusNode(),De=!!(de.originalOptions.returnFocusOnDeactivate&&xe!==null&&xe!==void 0&&xe.focus&&(!de.outsideClick||de.outsideClick.allowDeactivation&&!re(de.outsideClick.target,de.internalOptions.tabbableOptions))),me=de.internalOptions.preventScroll,at=me===void 0?!1:me;De&&xe.focus({preventScroll:at}),de.originalOptions.onPostDeactivate&&de.originalOptions.onPostDeactivate.call(null),de.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(Me,Me):Me()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var de=this.focusTrapElements.some(Boolean);de&&(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(de){if(this.focusTrap){de.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var Me=!de.active&&this.props.active,fe=de.active&&!this.props.active,xe=!de.paused&&this.props.paused,De=de.paused&&!this.props.paused;if(Me&&(this.updatePreviousElement(),this.focusTrap.activate()),fe){this.deactivateTrap();return}xe&&this.focusTrap.pause(),De&&this.focusTrap.unpause()}else de.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 de=this,Me=this.props.children?k.Children.only(this.props.children):void 0;if(Me){if(Me.type&&Me.type===k.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var fe=function(me){var at=de.props.containerElements;Me&&(typeof Me.ref=="function"?Me.ref(me):Me.ref&&(Me.ref.current=me)),de.focusTrapElements=at||[me]},xe=k.cloneElement(Me,{ref:fe});return xe}return null}}]),ie}(k.Component),Y=typeof Element>"u"?Function:Element;return X.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(Y),U.string,U.bool,U.func]),fallbackFocus:U.oneOfType([U.instanceOf(Y),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(Y),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(Y)),children:U.oneOfType([U.element,U.instanceOf(Y)])},X.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:q},f5=X,f5}var p5={exports:{}},z9;function Ese(){return z9||(z9=1,function(n){(function(e){var t=!1,r,i;function s(){if(typeof r<"u")return r;var E=document.documentElement,S=document.createElement("div");return S.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),E.appendChild(S),r=S.offsetWidth-S.clientWidth,E.removeChild(S),r}function a(){return document.documentElement.scrollHeight>window.innerHeight}function o(E){if(!(typeof document>"u"||t)){var S=document.documentElement;i=window.pageYOffset,a()?S.style.width="calc(100% - "+s()+"px)":S.style.width="100%",S.style.position="fixed",S.style.top=-i+"px",S.style.overflow="hidden",t=!0}}function d(){if(!(typeof document>"u"||!t)){var E=document.documentElement;E.style.width="",E.style.position="",E.style.top="",E.style.overflow="",window.scroll(0,i),t=!1}}function g(){if(t){d();return}o()}var b={on:o,off:d,toggle:g};n.exports=b})()}(p5)),p5.exports}var m5,j9;function Bse(){if(j9)return m5;j9=1;function n(re){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},n(re)}function e(re,X){if(!(re instanceof X))throw new TypeError("Cannot call a class as a function")}function t(re,X){for(var Y=0;Y<X.length;Y++){var ee=X[Y];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(re,ee.key,ee)}}function r(re,X,Y){return X&&t(re.prototype,X),Object.defineProperty(re,"prototype",{writable:!1}),re}function i(re,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function");re.prototype=Object.create(X&&X.prototype,{constructor:{value:re,writable:!0,configurable:!0}}),Object.defineProperty(re,"prototype",{writable:!1}),X&&s(re,X)}function s(re,X){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ee,N){return ee.__proto__=N,ee},s(re,X)}function a(re){var X=g();return function(){var ee=b(re),N;if(X){var ie=b(this).constructor;N=Reflect.construct(ee,arguments,ie)}else N=ee.apply(this,arguments);return o(this,N)}}function o(re,X){if(X&&(n(X)==="object"||typeof X=="function"))return X;if(X!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(re)}function d(re){if(re===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re}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(re){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Y){return Y.__proto__||Object.getPrototypeOf(Y)},b(re)}function E(re,X,Y){return X in re?Object.defineProperty(re,X,{value:Y,enumerable:!0,configurable:!0,writable:!0}):re[X]=Y,re}var S=Fa(),O=kC(),k=Sse(),U=Ese(),z=function(re){i(Y,re);var X=a(Y);function Y(ee){var N;if(e(this,Y),N=X.call(this,ee),E(d(N),"getApplicationNode",function(){return N.props.getApplicationNode?N.props.getApplicationNode():N.props.applicationNode}),E(d(N),"checkUnderlayClick",function(ie){N.dialogNode&&N.dialogNode.contains(ie.target)||ie.pageX>ie.target.ownerDocument.documentElement.offsetWidth||ie.pageY>ie.target.ownerDocument.documentElement.offsetHeight||N.exit(ie)}),E(d(N),"checkDocumentKeyDown",function(ie){N.props.escapeExits&&(ie.key==="Escape"||ie.key==="Esc"||ie.keyCode===27)&&N.exit(ie)}),E(d(N),"exit",function(ie){N.props.onExit&&N.props.onExit(ie)}),!ee.titleText&&!ee.titleId)throw new Error("react-aria-modal instances should have a `titleText` or `titleId`");return N}return r(Y,[{key:"componentDidMount",value:function(){this.props.onEnter&&this.props.onEnter();var N=this.getApplicationNode();setTimeout(function(){N&&N.setAttribute("aria-hidden","true")},0),this.props.escapeExits&&this.addKeyDownListener(),this.props.scrollDisabled&&U.on()}},{key:"componentDidUpdate",value:function(N){N.scrollDisabled&&!this.props.scrollDisabled?U.off():!N.scrollDisabled&&this.props.scrollDisabled&&U.on(),this.props.escapeExits&&!N.escapeExits?this.addKeyDownListener():!this.props.escapeExits&&N.escapeExits&&this.removeKeyDownListener()}},{key:"componentWillUnmount",value:function(){this.props.scrollDisabled&&U.off();var N=this.getApplicationNode();N&&N.setAttribute("aria-hidden","false"),this.removeKeyDownListener()}},{key:"addKeyDownListener",value:function(){var N=this;setTimeout(function(){document.addEventListener("keydown",N.checkDocumentKeyDown)})}},{key:"removeKeyDownListener",value:function(){var N=this;setTimeout(function(){document.removeEventListener("keydown",N.checkDocumentKeyDown)})}},{key:"render",value:function(){var N=this.props,ie={};if(N.includeDefaultStyles&&(ie={position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1050,overflowX:"hidden",overflowY:"auto",WebkitOverflowScrolling:"touch",textAlign:"center"},N.underlayColor&&(ie.background=N.underlayColor),N.underlayClickExits&&(ie.cursor="pointer")),N.underlayStyle)for(var he in N.underlayStyle)N.underlayStyle.hasOwnProperty(he)&&(ie[he]=N.underlayStyle[he]);var de={className:N.underlayClass,style:ie};N.underlayClickExits&&(de.onMouseDown=this.checkUnderlayClick);for(var Me in this.props.underlayProps)de[Me]=this.props.underlayProps[Me];var fe={};N.includeDefaultStyles&&(fe={display:"inline-block",height:"100%",verticalAlign:"middle"});var xe={key:"a",style:fe},De={};if(N.includeDefaultStyles&&(De={display:"inline-block",textAlign:"left",top:0,maxWidth:"100%",cursor:"auto",outline:N.focusDialog?0:null},N.verticallyCenter&&(De.verticalAlign="middle",De.top=0)),N.dialogStyle)for(var me in N.dialogStyle)N.dialogStyle.hasOwnProperty(me)&&(De[me]=N.dialogStyle[me]);var at={key:"b",ref:(function(Ce){this.dialogNode=Ce}).bind(this),role:N.alert?"alertdialog":"dialog",id:N.dialogId,className:N.dialogClass,style:De};N.titleId?at["aria-labelledby"]=N.titleId:N.titleText&&(at["aria-label"]=N.titleText),N.focusDialog&&(at.tabIndex="-1");for(var Qe in N)/^(data-|aria-)/.test(Qe)&&(at[Qe]=N[Qe]);var He=[S.createElement("div",at,N.children)];N.verticallyCenter&&He.unshift(S.createElement("div",xe));var We=N.focusTrapOptions||{};return(N.focusDialog||N.initialFocus)&&(We.initialFocus=N.focusDialog?"#".concat(this.props.dialogId):N.initialFocus),We.escapeDeactivates=N.escapeExits,S.createElement(k,{focusTrapOptions:We,paused:N.focusTrapPaused},S.createElement("div",de,He))}}]),Y}(S.Component);E(z,"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(re,X){if(!window.document)return function(){return null};X=X||{};var Y=function(ee){i(ie,ee);var N=a(ie);function ie(){var he;e(this,ie);for(var de=arguments.length,Me=new Array(de),fe=0;fe<de;fe++)Me[fe]=arguments[fe];return he=N.call.apply(N,[this].concat(Me)),E(d(he),"container",null),he}return r(ie,[{key:"componentDidMount",value:function(){X.renderTo?this.container=typeof X.renderTo=="string"?document.querySelector(X.renderTo):X.renderTo:(this.container=document.createElement("div"),document.body.appendChild(this.container)),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){X.renderTo||this.container.parentNode.removeChild(this.container)}},{key:"render",value:function(){return this.container===null||!this.props.mounted?null:O.createPortal(S.createElement(re,this.props,this.props.children),this.container)}}]),ie}(S.Component);return E(Y,"defaultProps",{mounted:!0}),Y}var Q=q(z);return Q.renderTo=function(re){return q(z,{renderTo:re})},m5=Q,m5}var Ose=Bse();const Ise=Ha(Ose);function gA(){var n="/home/runner/work/maputnik/maputnik/src/components/Modal.tsx",e="55b511200efca707daa3ccb304d63dc159a8f390",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Modal.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:10,column:3}},1:{start:{line:12,column:12},end:{line:19,column:3}},2:{start:{line:13,column:4},end:{line:15,column:5}},3:{start:{line:14,column:6},end:{line:14,column:36}},4:{start:{line:16,column:4},end:{line:18,column:10}},5:{start:{line:17,column:6},end:{line:17,column:37}},6:{start:{line:21,column:14},end:{line:21,column:26}},7:{start:{line:22,column:4},end:{line:60,column:5}},8:{start:{line:23,column:6},end:{line:57,column:8}},9:{start:{line:59,column:6},end:{line:59,column:19}},10:{start:{line:63,column:14},end:{line:63,column:46}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:12},end:{line:12,column:13}},loc:{start:{line:12,column:18},end:{line:19,column:3}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:15},end:{line:16,column:16}},loc:{start:{line:16,column:21},end:{line:18,column:5}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:61,column:3}},line:20}},branchMap:{0:{loc:{start:{line:13,column:4},end:{line:15,column:5}},type:"if",locations:[{start:{line:13,column:4},end:{line:15,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:13},1:{loc:{start:{line:22,column:4},end:{line:60,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:60,column:5}},{start:{line:58,column:11},end:{line:60,column:5}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Modal.tsx"],names:[],mappings:"AAgDU,SACE,KADF;AAhDV,OAAO,WAAkC;AACzC,SAAQ,eAAc;AACtB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAA0B,uBAAuB;AAajD,MAAM,sBAAsB,MAAM,UAA8B;AAAA,EAC9D,OAAO,eAAe;AAAA,IACpB,oBAAoB;AAAA,EACtB;AAAA;AAAA,EAGA,UAAU,MAAM;AACd,QAAI,SAAS,eAAe;AAC1B,MAAC,SAAS,cAA8B,KAAK;AAAA,IAC/C;AAEA,eAAW,MAAM;AACf,WAAK,MAAM,aAAa,KAAK;AAAA,IAC/B,GAAG,CAAC;AAAA,EACN;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,QAAG,KAAK,MAAM,QAAQ;AACpB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,WAAW,KAAK,MAAM;AAAA,UACtB,oBAAoB,KAAK,MAAM;AAAA,UAE/B,eAAe,KAAK,MAAM;AAAA,UAC1B,eAAa,KAAK,MAAM,aAAa;AAAA,UACrC,kBAAkB;AAAA,UAClB,QAAQ,KAAK;AAAA,UAEb;AAAA,YAAC;AAAA;AAAA,cAAI,WAAW,WAAW,kBAAkB,KAAK,MAAM,SAAS;AAAA,cAC/D,eAAa,KAAK,MAAM,aAAa;AAAA,cAErC;AAAA,qCAAC,YAAO,WAAU,yBAChB;AAAA,sCAAC,QAAG,WAAU,+BAA+B,eAAK,MAAM,OAAM;AAAA,kBAC9D,oBAAC,UAAK,WAAU,+BAA8B;AAAA,kBAC9C;AAAA,oBAAC;AAAA;AAAA,sBAAO,WAAU;AAAA,sBAChB,OAAO,EAAE,aAAa;AAAA,sBACtB,SAAS,KAAK;AAAA,sBACd,eAAa,KAAK,MAAM,aAAa,IAAE;AAAA,sBAEvC,8BAAC,WAAQ;AAAA;AAAA,kBACX;AAAA,mBACF;AAAA,gBACA,oBAAC,SAAI,WAAU,2BACb,8BAAC,SAAI,WAAU,0BAA0B,eAAK,MAAM,UAAS,GAC/D;AAAA;AAAA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,IACF,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAEA,MAAM,QAAQ,gBAAgB,EAAE,aAAa;AAC7C,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"55b511200efca707daa3ccb304d63dc159a8f390"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return gA=function(){return a},a}gA();class uN extends rr.Component{constructor(){super(...arguments);kn(this,"onClose",(gA().s[1]++,()=>{gA().f[0]++,gA().s[2]++,document.activeElement?(gA().b[0][0]++,gA().s[3]++,document.activeElement.blur()):gA().b[0][1]++,gA().s[4]++,setTimeout(()=>{gA().f[1]++,gA().s[5]++,this.props.onOpenToggle(!1)},0)}))}render(){gA().f[2]++;const t=(gA().s[6]++,this.props.t);return gA().s[7]++,this.props.isOpen?(gA().b[1][0]++,gA().s[8]++,le.jsx(Ise,{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:le.jsxs("div",{className:tm("maputnik-modal",this.props.className),"data-wd-key":this.props["data-wd-key"],children:[le.jsxs("header",{className:"maputnik-modal-header",children:[le.jsx("h1",{className:"maputnik-modal-header-title",children:this.props.title}),le.jsx("span",{className:"maputnik-modal-header-space"}),le.jsx("button",{className:"maputnik-modal-header-toggle",title:t("Close modal"),onClick:this.onClose,"data-wd-key":this.props["data-wd-key"]+".close-modal",children:le.jsx(BH,{})})]}),le.jsx("div",{className:"maputnik-modal-scroller",children:le.jsx("div",{className:"maputnik-modal-content",children:this.props.children})})]})})):(gA().b[1][1]++,gA().s[9]++,!1)}}kn(uN,"defaultProps",(gA().s[0]++,{underlayClickExits:!0}));const F0=(gA().s[10]++,$s()(uN)),kse=8,Tse={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"}}]}},Pse={"*":{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."}},Rse=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Dse={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."}},Kse={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."}},Fse={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."}},Lse={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>}`."}},Use={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."}}},zse={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."}}},jse={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."}},Nse=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wse={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"}},Gse={"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"}},Qse={"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"}},qse={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"}},Yse={"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"}},$se=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"}}'),Vse={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"}},Hse={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"}},Zse={type:"array",value:"*",doc:"A filter selects specific features from a layer."},Xse={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."},Jse={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."},eae={type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},tae={type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},nae=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"}}}}}'),rae={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"}}}},iae={"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."}},oae={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"}}}},sae={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"]}}},aae=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],lae={"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"}},uae={"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"}},Aae={"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"}},cae={"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"}},dae={"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"}},hae={"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"}},fae={"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"}},pae={"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"}},mae={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."}},gae={"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}},ts={$version:kse,$root:Tse,sources:Pse,source:Rse,source_vector:Dse,source_raster:Kse,source_raster_dem:Fse,source_geojson:Lse,source_video:Use,source_image:zse,layer:jse,layout:Nse,layout_background:Wse,layout_fill:Gse,layout_circle:Qse,layout_heatmap:qse,"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:Yse,layout_symbol:$se,layout_raster:Vse,layout_hillshade:Hse,filter:Zse,filter_operator:Xse,geometry_type:Jse,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:eae,expression:tae,expression_name:nae,light:rae,sky:iae,terrain:oae,projection:sae,paint:aae,paint_fill:lae,"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:uae,paint_circle:Aae,paint_heatmap:cae,paint_symbol:dae,paint_raster:hae,paint_hillshade:fae,paint_background:pae,transition:mae,"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:gae};function Us(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",e="3158bd93bbefd1bd0e63d26617da070781685c25",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:17}},1:{start:{line:7,column:4},end:{line:9,column:6}},2:{start:{line:11,column:16},end:{line:19,column:3}},3:{start:{line:12,column:4},end:{line:18,column:7}},4:{start:{line:15,column:6},end:{line:17,column:7}},5:{start:{line:16,column:8},end:{line:16,column:48}},6:{start:{line:21,column:33},end:{line:21,column:43}},7:{start:{line:22,column:20},end:{line:22,column:35}},8:{start:{line:23,column:4},end:{line:42,column:5}},9:{start:{line:24,column:6},end:{line:37,column:14}},10:{start:{line:32,column:27},end:{line:32,column:61}},11:{start:{line:38,column:11},end:{line:42,column:5}},12:{start:{line:39,column:6},end:{line:39,column:174}},13:{start:{line:41,column:22},end:{line:41,column:37}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:21},end:{line:10,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:11,column:16},end:{line:11,column:17}},loc:{start:{line:11,column:26},end:{line:19,column:3}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:14,column:7},end:{line:14,column:8}},loc:{start:{line:14,column:13},end:{line:18,column:5}},line:14},3:{name:"(anonymous_3)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:43,column:3}},line:20},4:{name:"(anonymous_4)",decl:{start:{line:32,column:21},end:{line:32,column:22}},loc:{start:{line:32,column:27},end:{line:32,column:61}},line:32}},branchMap:{0:{loc:{start:{line:15,column:6},end:{line:17,column:7}},type:"if",locations:[{start:{line:15,column:6},end:{line:17,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},1:{loc:{start:{line:22,column:20},end:{line:22,column:35}},type:"binary-expr",locations:[{start:{line:22,column:20},end:{line:22,column:29}},{start:{line:22,column:33},end:{line:22,column:35}}],line:22},2:{loc:{start:{line:23,column:4},end:{line:42,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:42,column:5}},{start:{line:38,column:11},end:{line:42,column:5}}],line:23},3:{loc:{start:{line:30,column:26},end:{line:30,column:106}},type:"cond-expr",locations:[{start:{line:30,column:44},end:{line:30,column:74}},{start:{line:30,column:77},end:{line:30,column:106}}],line:30},4:{loc:{start:{line:31,column:67},end:{line:31,column:102}},type:"cond-expr",locations:[{start:{line:31,column:85},end:{line:31,column:91}},{start:{line:31,column:94},end:{line:31,column:102}}],line:31},5:{loc:{start:{line:34,column:22},end:{line:34,column:120}},type:"cond-expr",locations:[{start:{line:34,column:56},end:{line:34,column:79}},{start:{line:34,column:98},end:{line:34,column:120}}],line:34},6:{loc:{start:{line:38,column:11},end:{line:42,column:5}},type:"if",locations:[{start:{line:38,column:11},end:{line:42,column:5}},{start:{line:40,column:11},end:{line:42,column:5}}],line:38}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDocLabel.tsx"],names:[],mappings:"AAuCQ,SASuB,KATvB;AAvCR,OAAO,WAAW;AAClB,SAAQ,eAAe,sBAAqB;AAc5C,qBAAqB,sBAAsB,MAAM,UAAkD;AAAA,EACjG,YAAa,OAA2B;AACtC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,SAAkB;AAC/B,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,GAAG,MAAM;AACP,UAAI,KAAK,MAAM,aAAa;AAC1B,aAAK,MAAM,YAAY,KAAK,MAAM,IAAI;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,UAAM,EAAC,IAAG,IAAI,aAAa,CAAC;AAE5B,QAAI,KAAK;AACP,aAAO,oBAAC,WAAM,WAAU,wBACtB,+BAAC,SAAI,WAAU,uBACZ;AAAA;AAAA,QACA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,cAAY,KAAK,MAAM,OAAO,iCAAiC;AAAA,YAC/D,WAAW,4CAA4C,KAAK,MAAM,OAAO,SAAS,QAAQ;AAAA,YAC1F,SAAS,MAAM,KAAK,YAAY,CAAC,KAAK,MAAM,IAAI;AAAA,YAChD,eAAa,sBAAoB;AAAA,YAEhC,eAAK,MAAM,OAAO,oBAAC,kBAAe,IAAK,oBAAC,iBAAc;AAAA;AAAA,QACzD;AAAA,SACF,GACF;AAAA,IACF,WACS,OAAO;AACd,aAAO,oBAAC,WAAM,WAAU,wBACtB,8BAAC,SAAI,WAAU,uBACZ,iBACH,GACF;AAAA,IACF,OACK;AACH,0BAAC,SAAI;AAAA,IACP;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"3158bd93bbefd1bd0e63d26617da070781685c25"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Us=function(){return a},a}Us();class y8 extends rr.Component{constructor(t){Us().f[0]++,Us().s[0]++;super(t);kn(this,"onToggleDoc",(Us().s[2]++,t=>{Us().f[1]++,Us().s[3]++,this.setState({open:t},()=>{Us().f[2]++,Us().s[4]++,this.props.onToggleDoc?(Us().b[0][0]++,Us().s[5]++,this.props.onToggleDoc(this.state.open)):Us().b[0][1]++})}));Us().s[1]++,this.state={open:!1}}render(){Us().f[3]++;const{label:t,fieldSpec:r}=(Us().s[6]++,this.props),{doc:i}=(Us().s[7]++,Us().b[1][0]++,r||(Us().b[1][1]++,{}));if(Us().s[8]++,i)return Us().b[2][0]++,Us().s[9]++,le.jsx("label",{className:"maputnik-doc-wrapper",children:le.jsxs("div",{className:"maputnik-doc-target",children:[t," ",le.jsx("button",{"aria-label":this.state.open?(Us().b[3][0]++,"close property documentation"):(Us().b[3][1]++,"open property documentation"),className:`maputnik-doc-button maputnik-doc-button--${this.state.open?(Us().b[4][0]++,"open"):(Us().b[4][1]++,"closed")}`,onClick:()=>(Us().f[4]++,Us().s[10]++,this.onToggleDoc(!this.state.open)),"data-wd-key":"field-doc-button-"+t,children:this.state.open?(Us().b[5][0]++,le.jsx(hH,{})):(Us().b[5][1]++,le.jsx(fH,{}))})]})});if(Us().b[2][1]++,Us().s[11]++,t)return Us().b[6][0]++,Us().s[12]++,le.jsx("label",{className:"maputnik-doc-wrapper",children:le.jsx("div",{className:"maputnik-doc-target",children:t})});Us().b[6][1]++,Us().s[13]++}}function ua(){var n="/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",e="52a1547e724051448ae0a009c4c7c40d9bb9067f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Doc.tsx",statementMap:{0:{start:{line:3,column:16},end:{line:8,column:1}},1:{start:{line:11,column:26},end:{line:11,column:36}},2:{start:{line:12,column: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ua=function(){return a},a}ua();const N9=(ua().s[0]++,{js:"JS",android:"Android",ios:"iOS",macos:"macOS"});class v8 extends rr.Component{render(){ua().f[0]++;const{fieldSpec:e}=(ua().s[1]++,this.props),{doc:t,values:r,docUrl:i,docUrlLinkText:s}=(ua().s[2]++,e),a=(ua().s[3]++,e["sdk-support"]),o=(ua().s[4]++,ua().b[0][0]++,!!r&&(ua().b[0][1]++,!Array.isArray(r)));return ua().s[5]++,le.jsxs(le.Fragment,{children:[(ua().b[1][0]++,t&&(ua().b[1][1]++,le.jsxs("div",{className:"SpecDoc",children:[le.jsx("div",{className:"SpecDoc__doc","data-wd-key":"spec-field-doc",children:t}),(ua().b[2][0]++,o&&(ua().b[2][1]++,le.jsx("ul",{className:"SpecDoc__values",children:Object.entries(r).map(([d,g])=>(ua().f[1]++,ua().s[6]++,le.jsxs("li",{children:[le.jsx("code",{children:JSON.stringify(d)}),le.jsx("div",{children:g.doc})]},d)))})))]}))),(ua().b[3][0]++,a&&(ua().b[3][1]++,le.jsx("div",{className:"SpecDoc__sdk-support",children:le.jsxs("table",{className:"SpecDoc__sdk-support__table",children:[le.jsx("thead",{children:le.jsxs("tr",{children:[le.jsx("th",{}),Object.values(N9).map(d=>(ua().f[2]++,ua().s[7]++,le.jsx("th",{children:d},d)))]})}),le.jsx("tbody",{children:Object.entries(a).map(([d,g])=>(ua().f[3]++,ua().s[8]++,le.jsxs("tr",{children:[le.jsx("td",{children:d}),Object.keys(N9).map(b=>(ua().f[4]++,ua().s[9]++,Object.prototype.hasOwnProperty.call(g,b)?(ua().b[4][0]++,ua().s[10]++,le.jsx("td",{children:g[b]},b)):(ua().b[4][1]++,ua().s[11]++,le.jsx("td",{children:"no"},b))))]},d)))})]})}))),(ua().b[5][0]++,i&&(ua().b[5][1]++,s)&&(ua().b[5][2]++,le.jsx("div",{className:"SpecDoc__learn-more",children:le.jsx("a",{href:i,target:"_blank",rel:"noreferrer",children:s})})))]})}}function Fo(){var n="/home/runner/work/maputnik/maputnik/src/components/Block.tsx",e="ca04d739d50d9528a1765863025280bc88ee5e77",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Block.tsx",statementMap:{0:{start:{line:7,column:13},end:{line:7,column:17}},1:{start:{line:9,column:4},end:{line:9,column:17}},2:{start:{line:10,column:4},end:{line:12,column:6}},3:{start:{line:15,column:18},end:{line:15,column:32}},4:{start:{line:16,column:4},end:{line:18,column:5}},5:{start:{line:17,column:6},end:{line:17,column:64}},6:{start:{line:20,column:16},end:{line:24,column:3}},7:{start:{line:21,column:4},end:{line:23,column:7}},8:{start:{line:31,column:17},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Fo=function(){return a},a}Fo();class ga extends rr.Component{constructor(t){Fo().f[0]++,Fo().s[1]++;super(t);kn(this,"_blockEl",(Fo().s[0]++,null));kn(this,"onToggleDoc",(Fo().s[6]++,t=>{Fo().f[2]++,Fo().s[7]++,this.setState({showDoc:t})}));kn(this,"onLabelClick",(Fo().s[8]++,t=>{var s;Fo().f[3]++;const r=(Fo().s[9]++,t.nativeEvent.target),i=(Fo().s[10]++,(s=this._blockEl)==null?void 0:s.contains(r));Fo().s[11]++,Fo().b[3][0]++,t.nativeEvent.target.nodeName!=="INPUT"&&(Fo().b[3][1]++,!i)?(Fo().b[2][0]++,Fo().s[12]++,t.stopPropagation()):Fo().b[2][1]++,Fo().s[13]++,t.nativeEvent.target.nodeName!=="A"?(Fo().b[4][0]++,Fo().s[14]++,t.preventDefault()):Fo().b[4][1]++}));Fo().s[2]++,this.state={showDoc:!1}}onChange(t){Fo().f[1]++;const r=(Fo().s[3]++,t.target.value);if(Fo().s[4]++,this.props.onChange)return Fo().b[0][0]++,Fo().s[5]++,this.props.onChange(r===""?(Fo().b[1][0]++,void 0):(Fo().b[1][1]++,r));Fo().b[0][1]++}render(){return Fo().f[4]++,Fo().s[15]++,le.jsxs("label",{style:this.props.style,"data-wd-key":this.props["data-wd-key"],className:tm({"maputnik-input-block":!0,"maputnik-input-block--wide":this.props.wideMode,"maputnik-action-block":this.props.action}),onClick:this.onLabelClick,children:[(Fo().b[5][0]++,this.props.fieldSpec&&(Fo().b[5][1]++,le.jsx("div",{className:"maputnik-input-block-label",children:le.jsx(y8,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(Fo().b[6][0]++,!this.props.fieldSpec&&(Fo().b[6][1]++,le.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),le.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),le.jsx("div",{className:"maputnik-input-block-content",ref:t=>(Fo().f[5]++,Fo().s[16]++,this._blockEl=t),children:this.props.children}),(Fo().b[7][0]++,this.props.fieldSpec&&(Fo().b[7][1]++,le.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(Fo().b[8][0]++,""):(Fo().b[8][1]++,"none")},children:le.jsx(v8,{fieldSpec:this.props.fieldSpec})})))]})}}function Tc(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",e="1b99a181d4a9dd7b629113889cbb71c3a4bb4d42",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx",statementMap:{0:{start:{line:5,column:18},end:{line:5,column:36}},1:{start:{line:6,column:4},end:{line:8,column:5}},2:{start:{line:7,column:6},end:{line:7,column:43}},3:{start:{line:7,column:35},end:{line:7,column:41}},4:{start:{line:9,column:4},end:{line:21,column:6}},5:{start:{line:17,column:25},end:{line:17,column:60}},6:{start:{line:19,column:64},end:{line:19,column:115}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:22,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:7,column:28},end:{line:7,column:29}},loc:{start:{line:7,column:35},end:{line:7,column:41}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:17,column:18},end:{line:17,column:19}},loc:{start:{line:17,column:25},end:{line:17,column:60}},line:17},3:{name:"(anonymous_3)",decl:{start:{line:19,column:30},end:{line:19,column:31}},loc:{start:{line:19,column:64},end:{line:19,column:115}},line:19}},branchMap:{0:{loc:{start:{line:6,column:4},end:{line:8,column:5}},type:"if",locations:[{start:{line:6,column:4},end:{line:8,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:6},1:{loc:{start:{line:6,column:8},end:{line:6,column:56}},type:"binary-expr",locations:[{start:{line:6,column:8},end:{line:6,column:26}},{start:{line:6,column:30},end:{line:6,column:56}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSelect.tsx"],names:[],mappings:"AA4BsC;AA5BtC,OAAO,WAAW;AAYlB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAAA,IACrC;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,eAAa,KAAK,MAAM,aAAa;AAAA,QACrC,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,OAAO,KAAK,MAAM;AAAA,QAClB,UAAU,OAAK,KAAK,MAAM,SAAS,EAAE,OAAO,KAAK;AAAA,QACjD,cAAY,KAAK,MAAM,YAAY;AAAA,QAEjC,kBAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,oBAAC,YAAiB,OAAO,KAAM,mBAAlB,GAAwB,CAAS;AAAA;AAAA,IAChF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1b99a181d4a9dd7b629113889cbb71c3a4bb4d42"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Tc=function(){return a},a}Tc();class Ng extends rr.Component{render(){Tc().f[0]++;let e=(Tc().s[0]++,this.props.options);return Tc().s[1]++,Tc().b[1][0]++,e.length>0&&(Tc().b[1][1]++,!Array.isArray(e[0]))?(Tc().b[0][0]++,Tc().s[2]++,e=e.map(t=>(Tc().f[1]++,Tc().s[3]++,[t,t]))):Tc().b[0][1]++,Tc().s[4]++,le.jsx("select",{className:"maputnik-select","data-wd-key":this.props["data-wd-key"],style:this.props.style,title:this.props.title,value:this.props.value,onChange:t=>(Tc().f[2]++,Tc().s[5]++,this.props.onChange(t.target.value)),"aria-label":this.props["aria-label"],children:e.map(([t,r])=>(Tc().f[3]++,Tc().s[6]++,le.jsx("option",{value:t,children:r},t)))})}}function Ki(){var n="/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",e="ffe977722e3215b5f6718c464b93680839810a41",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputString.tsx",statementMap:{0:{start:{line:3,column:24},end:{line:6,column:3}},1:{start:{line:8,column:4},end:{line:8,column:17}},2:{start:{line:9,column:4},end:{line:12,column:6}},3:{start:{line:15,column:4},end:{line:19,column:5}},4:{start:{line:16,column:6},end:{line:18,column:8}},5:{start:{line:20,column:4},end:{line:20,column:14}},6:{start:{line:25,column:4},end:{line:36,column:5}},7:{start:{line:26,column:6},end:{line:26,column:23}},8:{start:{line:27,column:6},end:{line:30,column:8}},9:{start:{line:32,column:6},end:{line:32,column:20}},10:{start:{line:33,column:6},end:{line:35,column:8}},11:{start:{line:37,column:4},end:{line:39,column:5}},12:{start:{line:38,column:6},end:{line:38,column:48}},13:{start:{line:40,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Ki=function(){return a},a}Ki();class If extends rr.Component{constructor(e){Ki().f[1]++,Ki().s[1]++,super(e),Ki().s[2]++,this.state={editing:!1,value:(Ki().b[0][0]++,e.value||(Ki().b[0][1]++,""))}}static getDerivedStateFromProps(e,t){if(Ki().f[2]++,Ki().s[3]++,t.editing)Ki().b[1][1]++;else return Ki().b[1][0]++,Ki().s[4]++,{value:e.value};return Ki().s[5]++,{}}render(){Ki().f[3]++;let e,t;return Ki().s[6]++,this.props.multi?(Ki().b[2][0]++,Ki().s[7]++,e="textarea",Ki().s[8]++,t=["maputnik-string","maputnik-string--multi"]):(Ki().b[2][1]++,Ki().s[9]++,e="input",Ki().s[10]++,t=["maputnik-string"]),Ki().s[11]++,this.props.disabled?(Ki().b[3][0]++,Ki().s[12]++,t.push("maputnik-string--disabled")):Ki().b[3][1]++,Ki().s[13]++,rr.createElement(e,{"aria-label":this.props["aria-label"],"data-wd-key":this.props["data-wd-key"],spellCheck:Object.prototype.hasOwnProperty.call(this.props,"spellCheck")?(Ki().b[4][0]++,this.props.spellCheck):(Ki().b[4][1]++,e!=="input"),disabled:this.props.disabled,className:t.join(" "),style:this.props.style,value:this.state.value===void 0?(Ki().b[5][0]++,""):(Ki().b[5][1]++,this.state.value),placeholder:this.props.default,title:this.props.title,onChange:r=>{Ki().f[4]++,Ki().s[14]++,this.setState({editing:!0,value:r.target.value},()=>{Ki().f[5]++,Ki().s[15]++,this.props.onInput?(Ki().b[6][0]++,Ki().s[16]++,this.props.onInput(this.state.value)):Ki().b[6][1]++})},onBlur:()=>{Ki().f[6]++,Ki().s[17]++,this.state.value!==this.props.value?(Ki().b[7][0]++,Ki().s[18]++,this.setState({editing:!1}),Ki().s[19]++,this.props.onChange?(Ki().b[8][0]++,Ki().s[20]++,this.props.onChange(this.state.value)):Ki().b[8][1]++):Ki().b[7][1]++},onKeyDown:r=>{Ki().f[7]++,Ki().s[21]++,Ki().b[10][0]++,r.keyCode===13&&(Ki().b[10][1]++,this.props.onChange)?(Ki().b[9][0]++,Ki().s[22]++,this.props.onChange(this.state.value)):Ki().b[9][1]++},required:this.props.required})}}kn(If,"defaultProps",(Ki().s[0]++,{onInput:()=>{Ki().f[0]++}}));function tp(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",e="7881723dfc9d5af5c18468677e4f429a5a061179",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx",statementMap:{0:{start:{line:9,column:24},end:{line:11,column:3}},1:{start:{line:13,column:14},end:{line:13,column:26}},2:{start:{line:14,column:4},end:{line:50,column:6}},3:{start:{line:53,column:18},end:{line:53,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:2},end:{line:12,column:3}},loc:{start:{line:12,column:11},end:{line:51,column:3}},line:12}},branchMap:{0:{loc:{start:{line:22,column:10},end:{line:28,column:11}},type:"binary-expr",locations:[{start:{line:22,column:10},end:{line:22,column:29}},{start:{line:22,column:49},end:{line:28,column:11}}],line:22},1:{loc:{start:{line:29,column:10},end:{line:47,column:11}},type:"binary-expr",locations:[{start:{line:29,column:10},end:{line:29,column:30}},{start:{line:29,column:50},end:{line:47,column:11}}],line:29}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldType.tsx"],names:[],mappings:"AAuBW,SAKH,KALG;AAvBX,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAUjD,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,OAAO,eAAe;AAAA,IACpB,UAAU;AAAA,EACZ;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,MAAM;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QACtD,eAAa,KAAK,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAEjB;AAAA,eAAK,MAAM,YACV;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,UAAU;AAAA;AAAA,UACZ;AAAA,UAED,CAAC,KAAK,MAAM,YACX;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,gBACP,CAAC,cAAc,YAAY;AAAA,gBAC3B,CAAC,QAAQ,MAAM;AAAA,gBACf,CAAC,QAAQ,MAAM;AAAA,gBACf,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,UAAU,QAAQ;AAAA,gBACnB,CAAC,kBAAkB,gBAAgB;AAAA,gBACnC,CAAC,aAAa,WAAW;AAAA,gBACzB,CAAC,WAAW,SAAS;AAAA,cACvB;AAAA,cACA,UAAU,KAAK,MAAM;AAAA,cACrB,OAAO,KAAK,MAAM;AAAA,cAClB,eAAa,KAAK,MAAM,QAAQ;AAAA;AAAA,UAClC;AAAA;AAAA;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7881723dfc9d5af5c18468677e4f429a5a061179"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return tp=function(){return a},a}tp();class AN extends rr.Component{render(){tp().f[0]++;const e=(tp().s[1]++,this.props.t);return tp().s[2]++,le.jsxs(ga,{label:e("Type"),fieldSpec:ts.layer.type,"data-wd-key":this.props.wdKey,error:this.props.error,children:[(tp().b[0][0]++,this.props.disabled&&(tp().b[0][1]++,le.jsx(If,{value:this.props.value,disabled:!0}))),(tp().b[1][0]++,!this.props.disabled&&(tp().b[1][1]++,le.jsx(Ng,{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(AN,"defaultProps",(tp().s[0]++,{disabled:!1}));const cN=(tp().s[3]++,$s()(AN));function R2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",e="f6ac2bd12dbef0198dd96da668f75e4659321d69",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx",statementMap:{0:{start:{line:8,column:4},end:{line:24,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:25,column:3}},line:7}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldId.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AASxB,qBAAqB,gBAAgB,MAAM,UAAwB;AAAA,EACjE,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAM;AAAA,QAAK,WAAW,OAAO,MAAM;AAAA,QAE/C,eAAa,KAAK,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,KAAK,MAAM;AAAA,YAClB,SAAS,KAAK,MAAM;AAAA,YACpB,eAAa,KAAK,MAAM,QAAQ;AAAA;AAAA,QAClC;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f6ac2bd12dbef0198dd96da668f75e4659321d69"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return R2=function(){return a},a}R2();class dN extends rr.Component{render(){return R2().f[0]++,R2().s[0]++,le.jsx(ga,{label:"ID",fieldSpec:ts.layer.id,"data-wd-key":this.props.wdKey,error:this.props.error,children:le.jsx(If,{value:this.props.value,onInput:this.props.onChange,"data-wd-key":this.props.wdKey+".input"})})}}var g5={exports:{}},W9;function yae(){if(W9)return g5.exports;W9=1;var n=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;function e(Qe){var He,We,Ce,Te=Qe.ownerDocument,rt=Te.body,yt=Te&&Te.documentElement;return He=Qe.getBoundingClientRect(),We=He.left,Ce=He.top,We-=yt.clientLeft||rt.clientLeft||0,Ce-=yt.clientTop||rt.clientTop||0,{left:We,top:Ce}}function t(Qe,He){var We=Qe["page"+(He?"Y":"X")+"Offset"],Ce="scroll"+(He?"Top":"Left");if(typeof We!="number"){var Te=Qe.document;We=Te.documentElement[Ce],typeof We!="number"&&(We=Te.body[Ce])}return We}function r(Qe){return t(Qe)}function i(Qe){return t(Qe,!0)}function s(Qe){var He=e(Qe),We=Qe.ownerDocument,Ce=We.defaultView||We.parentWindow;return He.left+=r(Ce),He.top+=i(Ce),He}function a(Qe,He,We){var Ce="",Te=Qe.ownerDocument;return(We=We||Te.defaultView.getComputedStyle(Qe,null))&&(Ce=We.getPropertyValue(He)||We[He]),Ce}var o=new RegExp("^("+n+")(?!px)[a-z%]+$","i"),d=/^(top|right|bottom|left)$/,g="currentStyle",b="runtimeStyle",E="left",S="px";function O(Qe,He){var We=Qe[g]&&Qe[g][He];if(o.test(We)&&!d.test(He)){var Ce=Qe.style,Te=Ce[E],rt=Qe[b][E];Qe[b][E]=Qe[g][E],Ce[E]=He==="fontSize"?"1em":We||0,We=Ce.pixelLeft+S,Ce[E]=Te,Qe[b][E]=rt}return We===""?"auto":We}var k;typeof window<"u"&&(k=window.getComputedStyle?a:O);function U(Qe,He){De(Qe,"position")==="static"&&(Qe.style.position="relative");var We=s(Qe),Ce={},Te,rt;for(rt in He)Te=parseFloat(De(Qe,rt))||0,Ce[rt]=Te+He[rt]-We[rt];De(Qe,Ce)}function z(Qe,He){for(var We=0;We<Qe.length;We++)He(Qe[We])}function q(Qe){return k(Qe,"boxSizing")==="border-box"}var Q=["margin","border","padding"],re=-1,X=2,Y=1,ee=0;function N(Qe,He,We){var Ce={},Te=Qe.style,rt;for(rt in He)Ce[rt]=Te[rt],Te[rt]=He[rt];We.call(Qe);for(rt in He)Te[rt]=Ce[rt]}function ie(Qe,He,We){var Ce=0,Te,rt,yt;for(rt=0;rt<He.length;rt++)if(Te=He[rt],Te)for(yt=0;yt<We.length;yt++){var bt;Te==="border"?bt=Te+We[yt]+"Width":bt=Te+We[yt],Ce+=parseFloat(k(Qe,bt))||0}return Ce}function he(Qe){return Qe!=null&&Qe==Qe.window}var de={};z(["Width","Height"],function(Qe){de["doc"+Qe]=function(He){var We=He.document;return Math.max(We.documentElement["scroll"+Qe],We.body["scroll"+Qe],de["viewport"+Qe](We))},de["viewport"+Qe]=function(He){var We="client"+Qe,Ce=He.document,Te=Ce.body,rt=Ce.documentElement,yt=rt[We];return Ce.compatMode==="CSS1Compat"&&yt||Te&&Te[We]||yt}});function Me(Qe,He,We){if(he(Qe))return He==="width"?de.viewportWidth(Qe):de.viewportHeight(Qe);if(Qe.nodeType===9)return He==="width"?de.docWidth(Qe):de.docHeight(Qe);var Ce=He==="width"?["Left","Right"]:["Top","Bottom"],Te=He==="width"?Qe.offsetWidth:Qe.offsetHeight;k(Qe);var rt=q(Qe),yt=0;(Te==null||Te<=0)&&(Te=void 0,yt=k(Qe,He),(yt==null||Number(yt)<0)&&(yt=Qe.style[He]||0),yt=parseFloat(yt)||0),We===void 0&&(We=rt?Y:re);var bt=Te!==void 0||rt,gt=Te||yt;return We===re?bt?gt-ie(Qe,["border","padding"],Ce):yt:bt?gt+(We===Y?0:We===X?-ie(Qe,["border"],Ce):ie(Qe,["margin"],Ce)):yt+ie(Qe,Q.slice(We),Ce)}var fe={position:"absolute",visibility:"hidden",display:"block"};function xe(Qe){var He,We=arguments;return Qe.offsetWidth!==0?He=Me.apply(void 0,We):N(Qe,fe,function(){He=Me.apply(void 0,We)}),He}z(["width","height"],function(Qe){var He=Qe.charAt(0).toUpperCase()+Qe.slice(1);de["outer"+He]=function(Ce,Te){return Ce&&xe(Ce,Qe,Te?ee:Y)};var We=Qe==="width"?["Left","Right"]:["Top","Bottom"];de[Qe]=function(Ce,Te){if(Te!==void 0){if(Ce){k(Ce);var rt=q(Ce);return rt&&(Te+=ie(Ce,["padding","border"],We)),De(Ce,Qe,Te)}return}return Ce&&xe(Ce,Qe,re)}});function De(Qe,He,We){if(typeof He=="object"){for(var Ce in He)De(Qe,Ce,He[Ce]);return}if(typeof We<"u")typeof We=="number"&&(We=We+"px"),Qe.style[He]=We;else return k(Qe,He)}function me(Qe,He){for(var We in He)Qe[We]=He[We];return Qe}var at=g5.exports={getWindow:function(Qe){var He=Qe.ownerDocument||Qe;return He.defaultView||He.parentWindow},offset:function(Qe,He){if(typeof He<"u")U(Qe,He);else return s(Qe)},isWindow:he,each:z,css:De,clone:function(Qe){var He={};for(var We in Qe)He[We]=Qe[We];var Ce=Qe.overflow;if(Ce)for(We in Qe)He.overflow[We]=Qe.overflow[We];return He},mix:me,scrollLeft:function(Qe,He){if(he(Qe)){if(He===void 0)return r(Qe);window.scrollTo(He,i(Qe))}else{if(He===void 0)return Qe.scrollLeft;Qe.scrollLeft=He}},scrollTop:function(Qe,He){if(he(Qe)){if(He===void 0)return i(Qe);window.scrollTo(r(Qe),He)}else{if(He===void 0)return Qe.scrollTop;Qe.scrollTop=He}},merge:function(){for(var Qe={},He=0;He<arguments.length;He++)at.mix(Qe,arguments[He]);return Qe},viewportWidth:0,viewportHeight:0};return me(at,de),g5.exports}var y5,G9;function vae(){if(G9)return y5;G9=1;var n=yae();function e(t,r,i){i=i||{},r.nodeType===9&&(r=n.getWindow(r));var s=i.allowHorizontalScroll,a=i.onlyScrollIfNeeded,o=i.alignWithTop,d=i.alignWithLeft;s=s===void 0?!0:s;var g=n.isWindow(r),b=n.offset(t),E=n.outerHeight(t),S=n.outerWidth(t),O,k,U,z,q,Q,re,X,Y,ee;g?(re=r,ee=n.height(re),Y=n.width(re),X={left:n.scrollLeft(re),top:n.scrollTop(re)},q={left:b.left-X.left,top:b.top-X.top},Q={left:b.left+S-(X.left+Y),top:b.top+E-(X.top+ee)},z=X):(O=n.offset(r),k=r.clientHeight,U=r.clientWidth,z={left:r.scrollLeft,top:r.scrollTop},q={left:b.left-(O.left+(parseFloat(n.css(r,"borderLeftWidth"))||0)),top:b.top-(O.top+(parseFloat(n.css(r,"borderTopWidth"))||0))},Q={left:b.left+S-(O.left+U+(parseFloat(n.css(r,"borderRightWidth"))||0)),top:b.top+E-(O.top+k+(parseFloat(n.css(r,"borderBottomWidth"))||0))}),q.top<0||Q.top>0?o===!0?n.scrollTop(r,z.top+q.top):o===!1?n.scrollTop(r,z.top+Q.top):q.top<0?n.scrollTop(r,z.top+q.top):n.scrollTop(r,z.top+Q.top):a||(o=o===void 0?!0:!!o,o?n.scrollTop(r,z.top+q.top):n.scrollTop(r,z.top+Q.top)),s&&(q.left<0||Q.left>0?d===!0?n.scrollLeft(r,z.left+q.left):d===!1?n.scrollLeft(r,z.left+Q.left):q.left<0?n.scrollLeft(r,z.left+q.left):n.scrollLeft(r,z.left+Q.left):a||(d=d===void 0?!0:!!d,d?n.scrollLeft(r,z.left+q.left):n.scrollLeft(r,z.left+Q.left)))}return y5=e,y5}var v5,Q9;function Cae(){return Q9||(Q9=1,v5=vae()),v5}var C5,q9;function _ae(){if(q9)return C5;q9=1;var n=Object.assign||function(O){for(var k=1;k<arguments.length;k++){var U=arguments[k];for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(O[z]=U[z])}return O},e=function(){function O(k,U){for(var z=0;z<U.length;z++){var q=U[z];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(k,q.key,q)}}return function(k,U,z){return U&&O(k.prototype,U),z&&O(k,z),k}}();function t(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function r(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:O}function i(O,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}var s=Fa(),a=dp(),o=kC(),d=o.findDOMNode,g=Cae(),b=["blur","checkValidity","click","focus","select","setCustomValidity","setSelectionRange","setRangeText"];function E(){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(O){i(k,O);function k(U){t(this,k);var z=r(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,U));return z.state={isOpen:!1,highlightedIndex:null},z._debugStates=[],z.ensureHighlightedIndex=z.ensureHighlightedIndex.bind(z),z.exposeAPI=z.exposeAPI.bind(z),z.handleInputFocus=z.handleInputFocus.bind(z),z.handleInputBlur=z.handleInputBlur.bind(z),z.handleChange=z.handleChange.bind(z),z.handleKeyDown=z.handleKeyDown.bind(z),z.handleInputClick=z.handleInputClick.bind(z),z.maybeAutoCompleteText=z.maybeAutoCompleteText.bind(z),z}return e(k,[{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(z){this.state.highlightedIndex!==null&&this.setState(this.ensureHighlightedIndex),z.autoHighlight&&(this.props.value!==z.value||this.state.highlightedIndex===null)&&this.setState(this.maybeAutoCompleteText)}},{key:"componentDidMount",value:function(){this.isOpen()&&this.setMenuPositions()}},{key:"componentDidUpdate",value:function(z,q){(this.state.isOpen&&!q.isOpen||"open"in this.props&&this.props.open&&!z.open)&&this.setMenuPositions(),this.maybeScrollItemIntoView(),q.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen)}},{key:"exposeAPI",value:function(z){var q=this;this.refs.input=z,b.forEach(function(Q){return q[Q]=z&&z[Q]&&z[Q].bind(z)})}},{key:"maybeScrollItemIntoView",value:function(){if(this.isOpen()&&this.state.highlightedIndex!==null){var z=this.refs["item-"+this.state.highlightedIndex],q=this.refs.menu;g(d(z),d(q),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(z){k.keyDownHandlers[z.key]?k.keyDownHandlers[z.key].call(this,z):this.isOpen()||this.setState({isOpen:!0})}},{key:"handleChange",value:function(z){this.props.onChange(z,z.target.value)}},{key:"getFilteredItems",value:function(z){var q=z.items;return z.shouldItemRender&&(q=q.filter(function(Q){return z.shouldItemRender(Q,z.value)})),z.sortItems&&q.sort(function(Q,re){return z.sortItems(Q,re,z.value)}),q}},{key:"maybeAutoCompleteText",value:function(z,q){for(var Q=z.highlightedIndex,re=q.value,X=q.getItemValue,Y=Q===null?0:Q,ee=this.getFilteredItems(q),N=0;N<ee.length&&!q.isItemSelectable(ee[Y]);N++)Y=(Y+1)%ee.length;var ie=ee[Y]&&q.isItemSelectable(ee[Y])?ee[Y]:null;if(re!==""&&ie){var he=X(ie),de=he.toLowerCase().indexOf(re.toLowerCase())===0;if(de)return{highlightedIndex:Y}}return{highlightedIndex:null}}},{key:"ensureHighlightedIndex",value:function(z,q){if(z.highlightedIndex>=this.getFilteredItems(q).length)return{highlightedIndex:null}}},{key:"setMenuPositions",value:function(){var z=this.refs.input,q=z.getBoundingClientRect(),Q=window.window.getComputedStyle(z),re=parseInt(Q.marginBottom,10)||0,X=parseInt(Q.marginLeft,10)||0,Y=parseInt(Q.marginRight,10)||0;this.setState({menuTop:q.bottom+re,menuLeft:q.left+X,menuWidth:q.width+X+Y})}},{key:"highlightItemFromMouse",value:function(z){this.setState({highlightedIndex:z})}},{key:"selectItemFromMouse",value:function(z){var q=this,Q=this.props.getItemValue(z);this.setIgnoreBlur(!1),this.setState({isOpen:!1,highlightedIndex:null},function(){q.props.onSelect(Q,z)})}},{key:"setIgnoreBlur",value:function(z){this._ignoreBlur=z}},{key:"renderMenu",value:function(){var z=this,q=this.getFilteredItems(this.props).map(function(X,Y){var ee=z.props.renderItem(X,z.state.highlightedIndex===Y,{cursor:"default"});return s.cloneElement(ee,{onMouseEnter:z.props.isItemSelectable(X)?function(){return z.highlightItemFromMouse(Y)}:null,onClick:z.props.isItemSelectable(X)?function(){return z.selectItemFromMouse(X)}:null,ref:function(ie){return z.refs["item-"+Y]=ie}})}),Q={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth},re=this.props.renderMenu(q,this.props.value,Q);return s.cloneElement(re,{ref:function(Y){return z.refs.menu=Y},onTouchStart:function(){return z.setIgnoreBlur(!0)},onMouseEnter:function(){return z.setIgnoreBlur(!0)},onMouseLeave:function(){return z.setIgnoreBlur(!1)}})}},{key:"handleInputBlur",value:function(z){var q=this;if(this._ignoreBlur){this._ignoreFocus=!0,this._scrollOffset=E(),this.refs.input.focus();return}var Q=void 0,re=this.state.highlightedIndex;if(this.props.selectOnBlur&&re!==null){var X=this.getFilteredItems(this.props),Y=X[re],ee=this.props.getItemValue(Y);Q=function(){return q.props.onSelect(ee,Y)}}this.setState({isOpen:!1,highlightedIndex:null},Q);var N=this.props.inputProps.onBlur;N&&N(z)}},{key:"handleInputFocus",value:function(z){var q=this;if(this._ignoreFocus){this._ignoreFocus=!1;var Q=this._scrollOffset,re=Q.x,X=Q.y;this._scrollOffset=null,window.scrollTo(re,X),clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout(function(){q._scrollTimer=null,window.scrollTo(re,X)},0);return}this.setState({isOpen:!0});var Y=this.props.inputProps.onFocus;Y&&Y(z)}},{key:"isInputFocused",value:function(){var z=this.refs.input;return z.ownerDocument&&z===z.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!this.isOpen()&&this.setState({isOpen:!0})}},{key:"composeEventHandlers",value:function(z,q){return q?function(Q){z(Q),q(Q)}:z}},{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 z=this.props.inputProps,q=this.isOpen();return s.createElement("div",n({style:n({},this.props.wrapperStyle)},this.props.wrapperProps),this.props.renderInput(n({},z,{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,z.onKeyDown),onClick:this.composeEventHandlers(this.handleInputClick,z.onClick),value:this.props.value})),q&&this.renderMenu(),this.props.debug&&s.createElement("pre",{style:{marginLeft:300}},JSON.stringify(this._debugStates.slice(Math.max(0,this._debugStates.length-5),this._debugStates.length),null,2)))}}]),k}(s.Component);return S.propTypes={items:a.array.isRequired,value:a.any,onChange:a.func,onSelect:a.func,shouldItemRender:a.func,isItemSelectable:a.func,sortItems:a.func,getItemValue:a.func.isRequired,renderItem:a.func.isRequired,renderMenu:a.func,menuStyle:a.object,renderInput:a.func,inputProps:a.object,wrapperProps:a.object,wrapperStyle:a.object,autoHighlight:a.bool,selectOnBlur:a.bool,onMenuVisibilityChange:a.func,open:a.bool,debug:a.bool},S.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},renderInput:function(k){return s.createElement("input",k)},onChange:function(){},onSelect:function(){},isItemSelectable:function(){return!0},renderMenu:function(k,U,z){return s.createElement("div",{style:n({},z,this.menuStyle),children:k})},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(k){k.preventDefault();var U=this.getFilteredItems(this.props);if(U.length){for(var z=this.state.highlightedIndex,q=z===null?-1:z,Q=0;Q<U.length;Q++){var re=(q+Q+1)%U.length;if(this.props.isItemSelectable(U[re])){q=re;break}}q>-1&&q!==z&&this.setState({highlightedIndex:q,isOpen:!0})}},ArrowUp:function(k){k.preventDefault();var U=this.getFilteredItems(this.props);if(U.length){for(var z=this.state.highlightedIndex,q=z===null?U.length:z,Q=0;Q<U.length;Q++){var re=(q-(1+Q)+U.length)%U.length;if(this.props.isItemSelectable(U[re])){q=re;break}}q!==U.length&&this.setState({highlightedIndex:q,isOpen:!0})}},Enter:function(k){var U=this;if(k.keyCode===13)if(this.setIgnoreBlur(!1),this.isOpen())if(this.state.highlightedIndex==null)this.setState({isOpen:!1},function(){U.refs.input.select()});else{k.preventDefault();var z=this.getFilteredItems(this.props)[this.state.highlightedIndex],q=this.props.getItemValue(z);this.setState({isOpen:!1,highlightedIndex:null},function(){U.refs.input.setSelectionRange(q.length,q.length),U.props.onSelect(q,z)})}else return},Escape:function(){this.setIgnoreBlur(!1),this.setState({highlightedIndex:null,isOpen:!1})},Tab:function(){this.setIgnoreBlur(!1)}},C5=S,C5}var bae=_ae();const xae=Ha(bae);function To(){var n="/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",e="6ef9facf9aeabdae687b5aca973710969d826d60",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx",statementMap:{0:{start:{line:5,column:19},end:{line:5,column:22}},1:{start:{line:7,column:10},end:{line:9,column:3}},2:{start:{line:10,column:23},end:{line:10,column:27}},3:{start:{line:11,column:24},end:{line:15,column:3}},4:{start:{line:17,column:4},end:{line:25,column:5}},5:{start:{line:18,column:24},end:{line:18,column:96}},6:{start:{line:19,column:31},end:{line:19,column:62}},7:{start:{line:20,column:6},end:{line:24,column:7}},8:{start:{line:21,column:8},end:{line:23,column:11}},9:{start:{line:28,column:4},end:{line:28,column:25}},10:{start:{line:31,column:4},end:{line:31,column:25}},11:{start:{line:34,column:4},end:{line:34,column:47}},12:{start:{line:37,column:4},end:{line:86,column:6}},13:{start:{line:41,column:10},end:{line:41,column:39}},14:{start:{line:63,column:36},end:{line:63,column:43}},15:{start:{line:64,column:29},end:{line:64,column:45}},16:{start:{line:65,column:33},end:{line:65,column:49}},17:{start:{line:67,column:14},end:{line:69,column:15}},18:{start:{line:68,column:16},end:{line:68,column:79}},19:{start:{line:70,column:14},end:{line:70,column:27}},20:{start:{line:72,column:65},end:{line:82,column:13}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:12,column:14},end:{line:12,column:15}},loc:{start:{line:12,column:20},end:{line:13,column:5}},line:12},1:{name:"(anonymous_1)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:18},end:{line:26,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:22},end:{line:29,column:3}},line:27},3:{name:"(anonymous_3)",decl:{start:{line:30,column:2},end:{line:30,column:3}},loc:{start:{line:30,column:23},end:{line:32,column:3}},line:30},4:{name:"(anonymous_4)",decl:{start:{line:33,column:2},end:{line:33,column:3}},loc:{start:{line:33,column:14},end:{line:35,column:3}},line:33},5:{name:"(anonymous_5)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:11},end:{line:87,column:3}},line:36},6:{name:"(anonymous_6)",decl:{start:{line:40,column:13},end:{line:40,column:14}},loc:{start:{line:40,column:21},end:{line:42,column:9}},line:40},7:{name:"(anonymous_7)",decl:{start:{line:63,column:26},end:{line:63,column:27}},loc:{start:{line:63,column:36},end:{line:63,column:43}},line:63},8:{name:"(anonymous_8)",decl:{start:{line:64,column:22},end:{line:64,column:23}},loc:{start:{line:64,column:29},end:{line:64,column:45}},line:64},9:{name:"(anonymous_9)",decl:{start:{line:65,column:22},end:{line:65,column:23}},loc:{start:{line:65,column:33},end:{line:65,column:49}},line:65},10:{name:"(anonymous_10)",decl:{start:{line:66,column:30},end:{line:66,column:31}},loc:{start:{line:66,column:52},end:{line:71,column:13}},line:66},11:{name:"(anonymous_11)",decl:{start:{line:72,column:24},end:{line:72,column:25}},loc:{start:{line:72,column:65},end:{line:82,column:13}},line:72}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:17,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:20,column:6},end:{line:24,column:7}},type:"if",locations:[{start:{line:20,column:6},end:{line:24,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},2:{loc:{start:{line:34,column:24},end:{line:34,column:45}},type:"cond-expr",locations:[{start:{line:34,column:35},end:{line:34,column:41}},{start:{line:34,column:44},end:{line:34,column:45}}],line:34},3:{loc:{start:{line:66,column:37},end:{line:66,column:47}},type:"default-arg",locations:[{start:{line:66,column:45},end:{line:66,column:47}}],line:66},4:{loc:{start:{line:67,column:14},end:{line:69,column:15}},type:"if",locations:[{start:{line:67,column:14},end:{line:69,column:15}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:67}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputAutocomplete.tsx"],names:[],mappings:"AAsFU;AAtFV,OAAO,WAAW;AAClB,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AAGzB,MAAM,aAAa;AAUnB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,QAAQ;AAAA,IACN,WAAW;AAAA,EACb;AAAA,EAEA,qBAA4C;AAAA,EAE5C,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,SAAS,CAAC;AAAA,EACZ;AAAA,EAEA,gBAAgB;AACd,QAAG,KAAK,MAAM,4BAA4B;AACxC,YAAM,YAAY,OAAO,cAAc,KAAK,mBAAoB,sBAAsB,EAAE;AACxF,YAAM,mBAAmB,KAAK,IAAI,WAAW,UAAU;AAEvD,UAAG,oBAAoB,KAAK,MAAM,WAAW;AAC3C,aAAK,SAAS;AAAA,UACZ,WAAW;AAAA,QACb,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EAEA,oBAAoB;AAClB,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,qBAAqB;AACnB,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,SAAS,GAAW;AAClB,SAAK,MAAM,SAAS,MAAM,KAAK,SAAY,CAAC;AAAA,EAC9C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,KAAK,CAAC,OAAO;AACX,eAAK,qBAAqB;AAAA,QAC5B;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,UAAU;AAAA,cACV,UAAU;AAAA,cACV,WAAW,KAAK,MAAM;AAAA,cACtB,QAAQ;AAAA,YACV;AAAA,YACA,cAAc;AAAA,cACZ,WAAW;AAAA,cACX,OAAO,CAAC;AAAA,YACV;AAAA,YACA,YAAY;AAAA,cACV,cAAc,KAAK,MAAM,YAAY;AAAA,cACrC,WAAW;AAAA,cACX,YAAY;AAAA,YACd;AAAA,YACA,OAAO,KAAK,MAAM;AAAA,YAClB,OAAO,KAAK,MAAM;AAAA,YAClB,cAAc,CAAC,SAAS,KAAK,CAAC;AAAA,YAC9B,UAAU,OAAK,KAAK,SAAS,CAAC;AAAA,YAC9B,UAAU,CAAC,IAAI,MAAM,KAAK,SAAS,CAAC;AAAA,YACpC,kBAAkB,CAAC,MAAM,QAAM,OAAO;AACpC,kBAAI,OAAO,UAAW,UAAU;AAC9B,uBAAO,KAAK,CAAC,EAAE,YAAY,EAAE,QAAQ,MAAM,YAAY,CAAC,IAAI;AAAA,cAC9D;AACA,qBAAO;AAAA,YACT;AAAA,YACA,YAAY,CAAC,MAAM,kBACjB;AAAA,cAAC;AAAA;AAAA,gBAEC,WAAW,WAAW;AAAA,kBACpB,mCAAmC;AAAA,kBACnC,4CAA4C;AAAA,gBAC9C,CAAC;AAAA,gBAEA,eAAK,CAAC;AAAA;AAAA,cANF,KAAK,CAAC;AAAA,YAOb;AAAA;AAAA,QAEJ;AAAA;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ef9facf9aeabdae687b5aca973710969d826d60"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return To=function(){return a},a}To();const Y9=(To().s[0]++,140);class zy extends rr.Component{constructor(){super(...arguments);kn(this,"state",(To().s[1]++,{maxHeight:Y9}));kn(this,"autocompleteMenuEl",(To().s[2]++,null))}calcMaxHeight(){if(To().f[1]++,To().s[4]++,this.props.keepMenuWithinWindowBounds){To().b[0][0]++;const t=(To().s[5]++,window.innerHeight-this.autocompleteMenuEl.getBoundingClientRect().top),r=(To().s[6]++,Math.min(t,Y9));To().s[7]++,r!=this.state.maxHeight?(To().b[1][0]++,To().s[8]++,this.setState({maxHeight:r})):To().b[1][1]++}else To().b[0][1]++}componentDidMount(){To().f[2]++,To().s[9]++,this.calcMaxHeight()}componentDidUpdate(){To().f[3]++,To().s[10]++,this.calcMaxHeight()}onChange(t){To().f[4]++,To().s[11]++,this.props.onChange(t===""?(To().b[2][0]++,void 0):(To().b[2][1]++,t))}render(){return To().f[5]++,To().s[12]++,le.jsx("div",{ref:t=>{To().f[6]++,To().s[13]++,this.autocompleteMenuEl=t},children:le.jsx(xae,{menuStyle:{position:"fixed",overflow:"auto",maxHeight:this.state.maxHeight,zIndex:"998"},wrapperProps:{className:"maputnik-autocomplete",style:{}},inputProps:{"aria-label":this.props["aria-label"],className:"maputnik-string",spellCheck:!1},value:this.props.value,items:this.props.options,getItemValue:t=>(To().f[7]++,To().s[14]++,t[0]),onSelect:t=>(To().f[8]++,To().s[15]++,this.onChange(t)),onChange:(t,r)=>(To().f[9]++,To().s[16]++,this.onChange(r)),shouldItemRender:(t,r=(To().b[3][0]++,""))=>(To().f[10]++,To().s[17]++,typeof r=="string"?(To().b[4][0]++,To().s[18]++,t[0].toLowerCase().indexOf(r.toLowerCase())>-1):(To().b[4][1]++,To().s[19]++,!1)),renderItem:(t,r)=>(To().f[11]++,To().s[20]++,le.jsx("div",{className:tm({"maputnik-autocomplete-menu-item":!0,"maputnik-autocomplete-menu-item-selected":r}),children:t[1]},t[0]))})})}}kn(zy,"defaultProps",(To().s[3]++,{onChange:()=>{To().f[0]++},options:[]}));function zp(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",e="ab049bb75b4ddccd0f9bdd2bba8785d564ca92f6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:12,column:3}},1:{start:{line:14,column:14},end:{line:14,column:26}},2:{start:{line:15,column:4},end:{line:31,column:6}},3:{start:{line:27,column:56},end:{line:27,column:66}},4:{start:{line:34,column:20},end:{line:34,column:58}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:14},end:{line:9,column:15}},loc:{start:{line:9,column:20},end:{line:10,column:5}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:32,column:3}},line:13},2:{name:"(anonymous_2)",decl:{start:{line:27,column:47},end:{line:27,column:48}},loc:{start:{line:27,column:56},end:{line:27,column:66}},line:27}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSource.tsx"],names:[],mappings:"AA6BM;AA7BN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA0B,uBAAuB;AAUjD,MAAM,4BAA4B,MAAM,UAAoC;AAAA,EAC1E,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,WAAW,CAAC;AAAA,EACd;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,QAAQ;AAAA,QACjB,WAAW,OAAO,MAAM;AAAA,QACxB,OAAO,KAAK,MAAM;AAAA,QAClB,eAAa,KAAK,MAAM;AAAA,QAExB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,KAAK,MAAM,WAAW,IAAI,SAAO,CAAC,KAAK,GAAG,CAAC;AAAA;AAAA,QACtD;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ab049bb75b4ddccd0f9bdd2bba8785d564ca92f6"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return zp=function(){return a},a}zp();class hN extends rr.Component{render(){var t;zp().f[1]++;const e=(zp().s[1]++,this.props.t);return zp().s[2]++,le.jsx(ga,{label:e("Source"),fieldSpec:ts.layer.source,error:this.props.error,"data-wd-key":this.props.wdKey,children:le.jsx(zy,{value:this.props.value,onChange:this.props.onChange,options:(t=this.props.sourceIds)==null?void 0:t.map(r=>(zp().f[2]++,zp().s[3]++,[r,r]))})})}}kn(hN,"defaultProps",(zp().s[0]++,{onChange:()=>{zp().f[0]++},sourceIds:[]}));const fN=(zp().s[4]++,$s()(hN));function jp(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",e="d17faa4f03faf23184e12eb0563d322067d1f63d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx",statementMap:{0:{start:{line:8,column:24},end:{line:13,column:3}},1:{start:{line:15,column:14},end:{line:15,column:26}},2:{start:{line:16,column:4},end:{line:33,column:6}},3:{start:{line:29,column:59},end:{line:29,column:65}},4:{start:{line:36,column:25},end:{line:36,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:14},end:{line:9,column:15}},loc:{start:{line:9,column:20},end:{line:10,column:5}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:11},end:{line:34,column:3}},line:14},2:{name:"(anonymous_2)",decl:{start:{line:29,column:52},end:{line:29,column:53}},loc:{start:{line:29,column:59},end:{line:29,column:65}},line:29}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSourceLayer.tsx"],names:[],mappings:"AA8BM;AA9BN,OAAO,WAAW;AAElB,SAAQ,cAAa;AACrB,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAC9B,SAA0B,uBAAuB;AAUjD,MAAM,iCAAiC,MAAM,UAAyC;AAAA,EACpF,OAAO,eAAe;AAAA,IACpB,UAAU,MAAM;AAAA,IAAC;AAAA,IACjB,gBAAgB,CAAC;AAAA,IACjB,SAAS;AAAA,EACX;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,cAAc;AAAA,QACvB,WAAW,OAAO,MAAM,cAAc;AAAA,QACtC,eAAY;AAAA,QACZ,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,4BAA4B,CAAC,CAAC,KAAK,MAAM;AAAA,YACzC,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,KAAK,MAAM,gBAAgB,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,QACrD;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d17faa4f03faf23184e12eb0563d322067d1f63d"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return jp=function(){return a},a}jp();class pN extends rr.Component{render(){var t;jp().f[1]++;const e=(jp().s[1]++,this.props.t);return jp().s[2]++,le.jsx(ga,{label:e("Source Layer"),fieldSpec:Ys.layer["source-layer"],"data-wd-key":"layer-source-layer",error:this.props.error,children:le.jsx(zy,{keepMenuWithinWindowBounds:!!this.props.isFixed,value:this.props.value,onChange:this.props.onChange,options:(t=this.props.sourceLayerIds)==null?void 0:t.map(r=>(jp().f[2]++,jp().s[3]++,[r,r]))})})}}kn(pN,"defaultProps",(jp().s[0]++,{onChange:()=>{jp().f[0]++},sourceLayerIds:[],isFixed:!1}));const mN=(jp().s[4]++,$s()(pN));function Yr(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx",e="7a9f0314912c2a2e8e47cddf3aaf5469476531e0",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx",statementMap:{0:{start:{line:11,column:13},end:{line:26,column:3}},1:{start:{line:12,column:26},end:{line:12,column:52}},2:{start:{line:13,column:18},end:{line:16,column:5}},3:{start:{line:17,column:4},end:{line:22,column:5}},4:{start:{line:18,column:6},end:{line:18,column:39}},5:{start:{line:19,column:6},end:{line:21,column:7}},6:{start:{line:20,column:8},end:{line:20,column:59}},7:{start:{line:23,column:4},end:{line:23,column:30}},8:{start:{line:24,column:4},end:{line:24,column:45}},9:{start:{line:25,column:4},end:{line:25,column:35}},10:{start:{line:28,column:4},end:{line:28,column:17}},11:{start:{line:29,column:18},end:{line:32,column:5}},12:{start:{line:33,column:4},end:{line:36,column:5}},13:{start:{line:34,column:6},end:{line:34,column:56}},14:{start:{line:35,column:6},end:{line:35,column:66}},15:{start:{line:37,column:4},end:{line:37,column:23}},16:{start:{line:40,column:20},end:{line:40,column:34}},17:{start:{line:41,column:20},end:{line:41,column:35}},18:{start:{line:42,column:32},end:{line:42,column:56}},19:{start:{line:43,column:32},end:{line:43,column:56}},20:{start:{line:44,column:4},end:{line:51,column:5}},21:{start:{line:48,column:6},end:{line:50,column:9}},22:{start:{line:54,column:22},end:{line:54,column:54}},23:{start:{line:55,column:4},end:{line:55,column:34}},24:{start:{line:58,column:20},end:{line:58,column:22}},25:{start:{line:59,column:18},end:{line:79,column:5}},26:{start:{line:80,column:4},end:{line:85,column:5}},27:{start:{line:81,column:22},end:{line:81,column:30}},28:{start:{line:82,column:6},end:{line:84,column:7}},29:{start:{line:83,column:8},end:{line:83,column:26}},30:{start:{line:86,column:4},end:{line:86,column:19}},31:{start:{line:89,column:14},end:{line:89,column:26}},32:{start:{line:90,column:20},end:{line:90,column:52}},33:{start:{line:91,column:19},end:{line:91,column:61}},34:{start:{line:92,column:4},end:{line:148,column:6}},35:{start:{line:107,column:16},end:{line:107,column:41}},36:{start:{line:116,column:31},end:{line:116,column:57}},37:{start:{line:125,column:31},end:{line:125,column:59}},38:{start:{line:134,column:31},end:{line:134,column:67}},39:{start:{line:151,column:17},end:{line:151,column:52}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:11,column:13},end:{line:11,column:14}},loc:{start:{line:11,column:19},end:{line:26,column:3}},line:11},1:{name:"(anonymous_1)",decl:{start:{line:27,column:2},end:{line:27,column:3}},loc:{start:{line:27,column:21},end:{line:38,column:3}},line:27},2:{name:"(anonymous_2)",decl:{start:{line:39,column:2},end:{line:39,column:3}},loc:{start:{line:39,column:44},end:{line:52,column:3}},line:39},3:{name:"(anonymous_3)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:29},end:{line:56,column:3}},line:53},4:{name:"(anonymous_4)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:19},end:{line:87,column:3}},line:57},5:{name:"(anonymous_5)",decl:{start:{line:88,column:2},end:{line:88,column:3}},loc:{start:{line:88,column:11},end:{line:149,column:3}},line:88},6:{name:"(anonymous_6)",decl:{start:{line:106,column:24},end:{line:106,column:25}},loc:{start:{line:106,column:31},end:{line:108,column:15}},line:106},7:{name:"(anonymous_7)",decl:{start:{line:116,column:24},end:{line:116,column:25}},loc:{start:{line:116,column:31},end:{line:116,column:57}},line:116},8:{name:"(anonymous_8)",decl:{start:{line:125,column:24},end:{line:125,column:25}},loc:{start:{line:125,column:31},end:{line:125,column:59}},line:125},9:{name:"(anonymous_9)",decl:{start:{line:134,column:24},end:{line:134,column:25}},loc:{start:{line:134,column:31},end:{line:134,column:67}},line:134}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:17,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:19,column:6},end:{line:21,column:7}},type:"if",locations:[{start:{line:19,column:6},end:{line:21,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:19,column:10},end:{line:19,column:68}},type:"binary-expr",locations:[{start:{line:19,column:10},end:{line:19,column:38}},{start:{line:19,column:42},end:{line:19,column:68}}],line:19},3:{loc:{start:{line:33,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:33,column:4},end:{line:36,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:33},4:{loc:{start:{line:44,column:4},end:{line:51,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:51,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44},5:{loc:{start:{line:46,column:6},end:{line:46,column:160}},type:"binary-expr",locations:[{start:{line:46,column:6},end:{line:46,column:25}},{start:{line:46,column:29},end:{line:46,column:52}},{start:{line:46,column:56},end:{line:46,column:106}},{start:{line:46,column:110},end:{line:46,column:160}}],line:46},6:{loc:{start:{line:54,column:22},end:{line:54,column:54}},type:"binary-expr",locations:[{start:{line:54,column:22},end:{line:54,column:48}},{start:{line:54,column:52},end:{line:54,column:54}}],line:54},7:{loc:{start:{line:55,column:11},end:{line:55,column:33}},type:"binary-expr",locations:[{start:{line:55,column:11},end:{line:55,column:27}},{start:{line:55,column:31},end:{line:55,column:33}}],line:55},8:{loc:{start:{line:82,column:6},end:{line:84,column:7}},type:"if",locations:[{start:{line:82,column:6},end:{line:84,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:82},9:{loc:{start:{line:82,column:10},end:{line:82,column:61}},type:"binary-expr",locations:[{start:{line:82,column:10},end:{line:82,column:24}},{start:{line:82,column:28},end:{line:82,column:61}}],line:82},10:{loc:{start:{line:119,column:10},end:{line:127,column:11}},type:"binary-expr",locations:[{start:{line:119,column:10},end:{line:119,column:42}},{start:{line:119,column:62},end:{line:127,column:11}}],line:119},11:{loc:{start:{line:128,column:10},end:{line:136,column:11}},type:"binary-expr",locations:[{start:{line:128,column:10},end:{line:128,column:87}},{start:{line:128,column:107},end:{line:136,column:11}}],line:128}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0,0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalAdd.tsx"],names:[],mappings:"AA2IM,SACE,KADF;AA3IN,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAE7B,SAA0B,uBAAuB;AAkBjD,MAAM,yBAAyB,MAAM,UAAgD;AAAA,EACnF,WAAW,MAAM;AACf,UAAM,gBAAgB,KAAK,MAAM,OAAO,MAAM,CAAC;AAC/C,UAAM,QAAuB;AAAA,MAC3B,IAAI,KAAK,MAAM;AAAA,MACf,MAAM,KAAK,MAAM;AAAA,IACnB;AAEA,QAAG,KAAK,MAAM,SAAS,cAAc;AACnC,YAAM,SAAS,KAAK,MAAM;AAC1B,UAAG,KAAK,MAAM,SAAS,YAAY,KAAK,MAAM,cAAc,GAAG;AAC7D,cAAM,cAAc,IAAI,KAAK,MAAM,cAAc;AAAA,MACnD;AAAA,IACF;AAEA,kBAAc,KAAK,KAA2B;AAE9C,SAAK,MAAM,eAAe,aAAa;AACvC,SAAK,MAAM,aAAa,KAAK;AAAA,EAC/B;AAAA,EAEA,YAAY,OAA8B;AACxC,UAAM,KAAK;AACX,UAAM,QAAuB;AAAA,MAC3B,MAAM;AAAA,MACN,IAAI;AAAA,IACN;AAEA,QAAG,MAAM,QAAQ,SAAS,GAAG;AAC3B,YAAM,SAAS,OAAO,KAAK,KAAK,MAAM,OAAO,EAAE,CAAC;AAChD,YAAM,cAAc,IAAI,KAAK,MAAM,QAAQ,MAAM,MAAgD,EAAE,CAAC;AAAA,IACtG;AACA,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,mBAAmB,YAAmC,WAA0B;AAE9E,UAAM,UAAU,UAAU;AAC1B,UAAM,UAAU,KAAK,MAAM;AAE3B,UAAM,sBAAsB,KAAK,WAAW,OAAO;AACnD,UAAM,sBAAsB,KAAK,WAAW,OAAO;AAEnD;AAAA;AAAA,MAEE,YAAY,WACT,UAAU,WAAW,MAErB,oBAAoB,QAAQ,UAAU,MAAO,IAAI,MAEjD,oBAAoB,QAAQ,KAAK,MAAM,MAAO,IAAI;AAAA,MACrD;AAEA,WAAK,SAAS;AAAA,QACZ,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,QAAgB;AACjC,UAAM,YAAY,KAAK,MAAM,QAAQ,MAAM,KAAK,CAAC;AACjD,WAAO,UAAU,UAAU,CAAC;AAAA,EAC9B;AAAA,EAEA,WAAW,MAAc;AACvB,UAAM,UAAU,CAAC;AAEjB,UAAM,QAAQ;AAAA,MACZ,QAAQ;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,QAAQ;AAAA,QACN;AAAA,MACF;AAAA,MACA,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAEA,eAAU,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,KAAK,MAAM,OAAO,GAAU;AACjE,YAAM,UAAU,IAAI;AACpB,UAAG,MAAM,OAAO,KAAK,MAAM,OAAO,EAAE,QAAQ,IAAI,IAAI,IAAI;AACtD,gBAAQ,KAAK,GAAG;AAAA,MAClB;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA,EAGA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,UAAU,KAAK,WAAW,KAAK,MAAM,IAAI;AAC/C,UAAM,SAAS,KAAK,mBAAmB,KAAK,MAAM,MAAO;AAEzD,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QACpB,eAAY;AAAA,QACZ,WAAU;AAAA,QAEV,+BAAC,SAAI,WAAU,sBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,OAAM;AAAA,cACN,UAAU,CAAC,MAAc;AACvB,qBAAK,SAAS,EAAE,IAAI,EAAE,CAAC;AAAA,cACzB;AAAA;AAAA,UACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM;AAAA,cAClB,OAAM;AAAA,cACN,UAAU,CAAC,MAAkC,KAAK,SAAS,EAAE,MAAM,EAAE,CAAC;AAAA;AAAA,UACxE;AAAA,UACC,KAAK,MAAM,SAAS,gBACvB;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,cACX,OAAM;AAAA,cACN,OAAO,KAAK,MAAM;AAAA,cAClB,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,QAAQ,EAAE,CAAC;AAAA;AAAA,UACtD;AAAA,UAEG,CAAC,cAAc,UAAU,aAAa,SAAS,EAAE,QAAQ,KAAK,MAAM,IAAI,IAAI,KAC/E;AAAA,YAAC;AAAA;AAAA,cACC,SAAS;AAAA,cACT,gBAAgB;AAAA,cAChB,OAAO,KAAK,MAAM,cAAc;AAAA,cAChC,UAAU,CAAC,MAAc,KAAK,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAAA;AAAA,UAC9D;AAAA,UAEE;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK;AAAA,cACd,eAAY;AAAA,cAEX,YAAE,WAAW;AAAA;AAAA,UAChB;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,WAAW,gBAAgB,EAAE,gBAAgB;AACnD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7a9f0314912c2a2e8e47cddf3aaf5469476531e0"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Yr=function(){return a},a}Yr();class wae extends rr.Component{constructor(t){Yr().f[1]++,Yr().s[10]++;super(t);kn(this,"addLayer",(Yr().s[0]++,()=>{Yr().f[0]++;const t=(Yr().s[1]++,this.props.layers.slice(0)),r=(Yr().s[2]++,{id:this.state.id,type:this.state.type});Yr().s[3]++,this.state.type!=="background"?(Yr().b[0][0]++,Yr().s[4]++,r.source=this.state.source,Yr().s[5]++,Yr().b[2][0]++,this.state.type!=="raster"&&(Yr().b[2][1]++,this.state["source-layer"])?(Yr().b[1][0]++,Yr().s[6]++,r["source-layer"]=this.state["source-layer"]):Yr().b[1][1]++):Yr().b[0][1]++,Yr().s[7]++,t.push(r),Yr().s[8]++,this.props.onLayersChange(t),Yr().s[9]++,this.props.onOpenToggle(!1)}));const r=(Yr().s[11]++,{type:"fill",id:""});Yr().s[12]++,t.sources.length>0?(Yr().b[3][0]++,Yr().s[13]++,r.source=Object.keys(this.props.sources)[0],Yr().s[14]++,r["source-layer"]=this.props.sources[r.source][0]):Yr().b[3][1]++,Yr().s[15]++,this.state=r}componentDidUpdate(t,r){Yr().f[2]++;const i=(Yr().s[16]++,r.type),s=(Yr().s[17]++,this.state.type),a=(Yr().s[18]++,this.getSources(i)),o=(Yr().s[19]++,this.getSources(s));Yr().s[20]++,Yr().b[5][0]++,i!==s&&(Yr().b[5][1]++,r.source!=="")&&(Yr().b[5][2]++,a.indexOf(r.source)>-1)&&(Yr().b[5][3]++,o.indexOf(this.state.source)<0)?(Yr().b[4][0]++,Yr().s[21]++,this.setState({source:""})):Yr().b[4][1]++}getLayersForSource(t){Yr().f[3]++;const r=(Yr().s[22]++,Yr().b[6][0]++,this.props.sources[t]||(Yr().b[6][1]++,{}));return Yr().s[23]++,Yr().b[7][0]++,r.layers||(Yr().b[7][1]++,[])}getSources(t){Yr().f[4]++;const r=(Yr().s[24]++,[]),i=(Yr().s[25]++,{vector:["fill","line","symbol","circle","fill-extrusion","heatmap"],raster:["raster"],geojson:["fill","line","symbol","circle","fill-extrusion","heatmap"]});Yr().s[26]++;for(const[s,a]of Object.entries(this.props.sources)){const o=(Yr().s[27]++,a.type);Yr().s[28]++,Yr().b[9][0]++,i[o]&&(Yr().b[9][1]++,i[o].indexOf(t)>-1)?(Yr().b[8][0]++,Yr().s[29]++,r.push(s)):Yr().b[8][1]++}return Yr().s[30]++,r}render(){Yr().f[5]++;const t=(Yr().s[31]++,this.props.t),r=(Yr().s[32]++,this.getSources(this.state.type)),i=(Yr().s[33]++,this.getLayersForSource(this.state.source));return Yr().s[34]++,le.jsx(F0,{isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Add Layer"),"data-wd-key":"modal:add-layer",className:"maputnik-add-modal",children:le.jsxs("div",{className:"maputnik-add-layer",children:[le.jsx(dN,{value:this.state.id,wdKey:"add-layer.layer-id",onChange:s=>{Yr().f[6]++,Yr().s[35]++,this.setState({id:s})}}),le.jsx(cN,{value:this.state.type,wdKey:"add-layer.layer-type",onChange:s=>(Yr().f[7]++,Yr().s[36]++,this.setState({type:s}))}),(Yr().b[10][0]++,this.state.type!=="background"&&(Yr().b[10][1]++,le.jsx(fN,{sourceIds:r,wdKey:"add-layer.layer-source-block",value:this.state.source,onChange:s=>(Yr().f[8]++,Yr().s[37]++,this.setState({source:s}))}))),(Yr().b[11][0]++,["background","raster","hillshade","heatmap"].indexOf(this.state.type)<0&&(Yr().b[11][1]++,le.jsx(mN,{isFixed:!0,sourceLayerIds:i,value:this.state["source-layer"],onChange:s=>(Yr().f[9]++,Yr().s[38]++,this.setState({"source-layer":s}))}))),le.jsx(Va,{className:"maputnik-add-layer-button",onClick:this.addLayer,"data-wd-key":"add-layer",children:t("Add Layer")})]})})}}const Mae=(Yr().s[39]++,$s()(wae));function vg(){var n="/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",e="a991ed6da2a27b46f1adbb88a645aa2ee0df375e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts",statementMap:{0:{start:{line:1,column:10},end:{line:1,column:11}},1:{start:{line:3,column:2},end:{line:3,column:8}},2:{start:{line:4,column:2},end:{line:4,column:22}}},fnMap:{0:{name:"generateUniqueId",decl:{start:{line:2,column:24},end:{line:2,column:40}},loc:{start:{line:2,column:54},end:{line:5,column:1}},line:2}},branchMap:{0:{loc:{start:{line:2,column:41},end:{line:2,column:52}},type:"default-arg",locations:[{start:{line:2,column:50},end:{line:2,column:52}}],line:2}},s:{0:0,1:0,2:0},f:{0:0},b:{0:[0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/document-uid.ts"],names:[],mappings:"AAGA,IAAI,MAAM;AAEV,wBAAwB,iBAAiB,SAAO,IAAI;AAClD;AACA,SAAO,SAAO;AAChB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a991ed6da2a27b46f1adbb88a645aa2ee0df375e"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return vg=function(){return a},a}vg();let $9=(vg().s[0]++,0);function Sy(n=(vg().b[0][0]++,"")){return vg().f[0]++,vg().s[1]++,$9++,vg().s[2]++,n+$9}function ji(){var n="/home/runner/work/maputnik/maputnik/src/libs/layer.ts",e="8d7d71e3a97c0e4b8cc5fd0ca26b8fdf4aa2aa36",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/layer.ts",statementMap:{0:{start:{line:3,column:28},end:{line:3,column:46}},1:{start:{line:4,column:2},end:{line:8,column:5}},2:{start:{line:5,column:4},end:{line:7,column:5}},3:{start:{line:6,column:6},end:{line:6,column:45}},4:{start:{line:9,column:29},end:{line:9,column:48}},5:{start:{line:10,column:2},end:{line:14,column:5}},6:{start:{line:11,column:4},end:{line:13,column:5}},7:{start:{line:12,column:6},end:{line:12,column:46}},8:{start:{line:15,column:2},end:{line:20,column:4}},9:{start:{line:23,column:2},end:{line:59,column:3}},10:{start:{line:24,column:4},end:{line:43,column:5}},11:{start:{line:25,column:23},end:{line:31,column:7}},12:{start:{line:32,column:6},end:{line:32,column:39}},13:{start:{line:33,column:6},end:{line:35,column:7}},14:{start:{line:34,column:8},end:{line:34,column:31}},15:{start:{line:36,column:6},end:{line:36,column:22}},16:{start:{line:38,column:23},end:{line:40,column:7}},17:{start:{line:41,column:6},end:{line:41,column:32}},18:{start:{line:42,column:6},end:{line:42,column:22}},19:{start:{line:45,column:4},end:{line:58,column:5}},20:{start:{line:46,column:6},end:{line:52,column:8}},21:{start:{line:54,column:6},end:{line:57,column:8}},22:{start:{line:62,column:2},end:{line:62,column:64}},23:{start:{line:65,column:29},end:{line:65,column:56}},24:{start:{line:66,column:19},end:{line:66,column:22}},25:{start:{line:67,column:2},end:{line:74,column:3}},26:{start:{line:67,column:15},end:{line:67,column:18}},27:{start:{line:68,column:32},end:{line:68,column:61}},28:{start:{line:69,column:4},end:{line:73,column:5}},29:{start:{line:70,column:6},end:{line:70,column:25}},30:{start:{line:72,column:6},end:{line:72,column:24}},31:{start:{line:75,column:2},end:{line:75,column:20}}},fnMap:{0:{name:"changeType",decl:{start:{line:2,column:16},end:{line:2,column:26}},loc:{start:{line:2,column:43},end:{line:21,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:41},end:{line:4,column:42}},loc:{start:{line:4,column:59},end:{line:8,column:3}},line:4},2:{name:"(anonymous_2)",decl:{start:{line:10,column:42},end:{line:10,column:43}},loc:{start:{line:10,column:60},end:{line:14,column:3}},line:10},3:{name:"changeProperty",decl:{start:{line:22,column:16},end:{line:22,column:30}},loc:{start:{line:22,column:65},end:{line:60,column:1}},line:22},4:{name:"layerPrefix",decl:{start:{line:61,column:16},end:{line:61,column:27}},loc:{start:{line:61,column:34},end:{line:63,column:1}},line:61},5:{name:"findClosestCommonPrefix",decl:{start:{line:64,column:16},end:{line:64,column:39}},loc:{start:{line:64,column:53},end:{line:76,column:1}},line:64}},branchMap:{0:{loc:{start:{line:5,column:4},end:{line:7,column:5}},type:"if",locations:[{start:{line:5,column:4},end:{line:7,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:5},1:{loc:{start:{line:11,column:4},end:{line:13,column:5}},type:"if",locations:[{start:{line:11,column:4},end:{line:13,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:11},2:{loc:{start:{line:23,column:2},end:{line:59,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:59,column:3}},{start:{line:44,column:9},end:{line:59,column:3}}],line:23},3:{loc:{start:{line:24,column:4},end:{line:43,column:5}},type:"if",locations:[{start:{line:24,column:4},end:{line:43,column:5}},{start:{line:37,column:11},end:{line:43,column:5}}],line:24},4:{loc:{start:{line:33,column:6},end:{line:35,column:7}},type:"if",locations:[{start:{line:33,column:6},end:{line:35,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:33},5:{loc:{start:{line:45,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:58,column:5}},{start:{line:53,column:11},end:{line:58,column:5}}],line:45},6:{loc:{start:{line:69,column:4},end:{line:73,column:5}},type:"if",locations:[{start:{line:69,column:4},end:{line:73,column:5}},{start:{line:71,column:11},end:{line:73,column:5}}],line:69}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layer.ts"],names:[],mappings:"AAAA,SAAQ,cAAa;AAGd,gBAAS,WAAW,OAA2B,SAAiB;AACrE,QAAM,oBAAiD,EAAE,GAAG,MAAM,MAAM;AACxE,SAAO,KAAK,iBAAiB,EAAE,QAAQ,kBAAgB;AACrD,QAAG,EAAE,gBAAgB,OAAO,WAAW,OAAO,IAAI;AAChD,aAAO,kBAAkB,YAAiD;AAAA,IAC5E;AAAA,EACF,CAAC;AAED,QAAM,qBAAmD,EAAE,GAAG,MAAM,OAAO;AAC3E,SAAO,KAAK,kBAAkB,EAAE,QAAQ,kBAAgB;AACtD,QAAG,EAAE,gBAAgB,OAAO,YAAY,OAAO,IAAI;AACjD,aAAO,mBAAmB,YAAkD;AAAA,IAC9E;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF;AAKO,gBAAS,eAAe,OAA2B,OAAwC,UAAkB,UAAe;AAEjI,MAAG,aAAa,QAAW;AACzB,QAAG,OAAO;AACR,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA;AAAA,QAEH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,QAChB;AAAA,MACF;AACA,aAAO,SAAS,KAAK,EAAE,QAAQ;AAG/B,UAAG,OAAO,KAAK,SAAS,KAAK,CAAC,EAAE,SAAS,GAAG;AAC1C,eAAO,SAAS,KAAK;AAAA,MACvB;AACA,aAAO;AAAA,IACT,OAAO;AACL,YAAM,WAAgB;AAAA,QACpB,GAAG;AAAA,MACL;AACA,aAAO,SAAS,QAAQ;AACxB,aAAO;AAAA,IACT;AAAA,EACF,OACK;AACH,QAAG,OAAO;AACR,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,KAAK,GAAG;AAAA,UACP,GAAG,MAAM,KAAK;AAAA,UACd,CAAC,QAAQ,GAAG;AAAA,QACd;AAAA,MACF;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,GAAG;AAAA,QACH,CAAC,QAAQ,GAAG;AAAA,MACd;AAAA,IACF;AAAA,EACF;AACF;AAEO,gBAAS,YAAY,MAAc;AACxC,SAAO,KAAK,QAAQ,KAAK,GAAG,EAAE,QAAQ,KAAK,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC;AAC9D;AAEO,gBAAS,wBAAwB,QAA8B,KAAa;AACjF,QAAM,qBAAqB,YAAY,OAAO,GAAG,EAAE,EAAE;AACrD,MAAI,aAAa;AACjB,WAAS,IAAI,KAAK,IAAI,GAAG,KAAK;AAC5B,UAAM,sBAAsB,YAAY,OAAO,IAAE,CAAC,EAAE,EAAE;AACtD,QAAG,wBAAwB,oBAAoB;AAC7C,mBAAa,IAAI;AAAA,IACnB,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8d7d71e3a97c0e4b8cc5fd0ca26b8fdf4aa2aa36"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ji=function(){return a},a}ji();function Sae(n,e){ji().f[0]++;const t=(ji().s[0]++,{...n.paint});ji().s[1]++,Object.keys(t).forEach(i=>{ji().f[1]++,ji().s[2]++,i in Ys["paint_"+e]?ji().b[0][1]++:(ji().b[0][0]++,ji().s[3]++,delete t[i])});const r=(ji().s[4]++,{...n.layout});return ji().s[5]++,Object.keys(r).forEach(i=>{ji().f[2]++,ji().s[6]++,i in Ys["layout_"+e]?ji().b[1][1]++:(ji().b[1][0]++,ji().s[7]++,delete r[i])}),ji().s[8]++,{...n,paint:t,layout:r,type:e}}function Eae(n,e,t,r){if(ji().f[3]++,ji().s[9]++,r===void 0)if(ji().b[2][0]++,ji().s[10]++,e){ji().b[3][0]++;const i=(ji().s[11]++,{...n,[e]:{...n[e]}});return ji().s[12]++,delete i[e][t],ji().s[13]++,Object.keys(i[e]).length<1?(ji().b[4][0]++,ji().s[14]++,delete i[e]):ji().b[4][1]++,ji().s[15]++,i}else{ji().b[3][1]++;const i=(ji().s[16]++,{...n});return ji().s[17]++,delete i[t],ji().s[18]++,i}else return ji().b[2][1]++,ji().s[19]++,e?(ji().b[5][0]++,ji().s[20]++,{...n,[e]:{...n[e],[t]:r}}):(ji().b[5][1]++,ji().s[21]++,{...n,[t]:r})}function H1(n){return ji().f[4]++,ji().s[22]++,n.replace(" ","-").replace("_","-").split("-")[0]}function Bae(n,e){ji().f[5]++;const t=(ji().s[23]++,H1(n[e].id));let r=(ji().s[24]++,e);ji().s[25]++;for(let i=(ji().s[26]++,e);i>0;i--){const s=(ji().s[27]++,H1(n[i-1].id));if(ji().s[28]++,s===t)ji().b[6][0]++,ji().s[29]++,r=i-1;else return ji().b[6][1]++,ji().s[30]++,r}return ji().s[31]++,r}function Cn(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",e="fce844afd94013ad4b9b4e84bd148b8b849d3079",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx",statementMap:{0:{start:{line:13,column:24},end:{line:16,column:3}},1:{start:{line:20,column:4},end:{line:20,column:17}},2:{start:{line:21,column:4},end:{line:21,column:45}},3:{start:{line:22,column:4},end:{line:22,column:48}},4:{start:{line:23,column:4},end:{line:32,column:6}},5:{start:{line:35,column:4},end:{line:44,column:7}},6:{start:{line:46,column:17},end:{line:63,column:3}},7:{start:{line:47,column:14},end:{line:47,column:15}},8:{start:{line:48,column:22},end:{line:48,column:24}},9:{start:{line:49,column:4},end:{line:58,column:7}},10:{start:{line:50,column:26},end:{line:50,column:51}},11:{start:{line:51,column:24},end:{line:51,column:52}},12:{start:{line:52,column:6},end:{line:54,column:7}},13:{start:{line:53,column:8},end:{line:53,column:63}},14:{start:{line:55,column:6},end:{line:57,column:9}},15:{start:{line:56,column:8},end:{line:56,column:17}},16:{start:{line:59,column:4},end:{line:62,column:7}},17:{start:{line:65,column:19},end:{line:65,column:21}},18:{start:{line:66,column:41},end:{line:66,column:50}},19:{start:{line:67,column:4},end:{line:84,column:5}},20:{start:{line:67,column:17},end:{line:67,column:18}},21:{start:{line:68,column:24},end:{line:68,column:44}},22:{start:{line:69,column:28},end:{line:69,column:52}},23:{start:{line:70,column:6},end:{line:73,column:8}},24:{start:{line:74,column:20},end:{line:77,column:7}},25:{start:{line:78,column:6},end:{line:83,column:7}},26:{start:{line:79,column:26},end:{line:79,column:51}},27:{start:{line:80,column:8},end:{line:80,column:30}},28:{start:{line:82,column:8},end:{line:82,column:29}},29:{start:{line:85,column:4},end:{line:85,column:18}},30:{start:{line:88,column:22},end:{line:88,column:50}},31:{start:{line:89,column:22},end:{line:89,column:55}},32:{start:{line:90,column:4},end:{line:94,column:5}},33:{start:{line:91,column:6},end:{line:91,column:68}},34:{start:{line:93,column:6},end:{line:93,column:35}},35:{start:{line:95,column:4},end:{line:97,column:7}},36:{start:{line:100,column:22},end:{line:100,column:78}},37:{start:{line:101,column:4},end:{line:101,column:51}},38:{start:{line:104,column:4},end:{line:106,column:5}},39:{start:{line:105,column:6},end:{line:105,column:18}},40:{start:{line:108,column:18},end:{line:110,column:7}},41:{start:{line:111,column:6},end:{line:115,column:7}},42:{start:{line:112,column:8},end:{line:114,column:10}},43:{start:{line:116,column:6},end:{line:116,column:17}},44:{start:{line:118,column:24},end:{line:121,column:5}},45:{start:{line:123,column:18},end:{line:125,column:7}},46:{start:{line:126,column:6},end:{line:126,column:27}},47:{start:{line:127,column:6},end:{line:127,column:17}},48:{start:{line:129,column:23},end:{line:132,column:5}},49:{start:{line:133,column:25},end:{line:133,column:53}},50:{start:{line:134,column:4},end:{line:134,column:24}},51:{start:{line:137,column:4},end:{line:153,column:5}},52:{start:{line:138,column:31},end:{line:138,column:59}},53:{start:{line:139,column:6},end:{line:152,column:7}},54:{start:{line:140,column:23},end:{line:140,column:44}},55:{start:{line:141,column:24},end:{line:144,column:9}},56:{start:{line:145,column:25},end:{line:150,column:19}},57:{start:{line:146,column:10},end:{line:146,column:37}},58:{start:{line:147,column:10},end:{line:149,column:11}},59:{start:{line:148,column:12},end:{line:148,column:36}},60:{start:{line:151,column:8},end:{line:151,column:33}},61:{start:{line:156,column:22},end:{line:156,column:24}},62:{start:{line:157,column:14},end:{line:157,column:15}},63:{start:{line:158,column:26},end:{line:158,column:46}},64:{start:{line:159,column:4},end:{line:210,column:7}},65:{start:{line:160,column:26},end:{line:160,column:51}},66:{start:{line:161,column:6},end:{line:174,column:7}},67:{start:{line:162,column:36},end:{line:172,column:9}},68:{start:{line:166,column:47},end:{line:166,column:52}},69:{start:{line:173,column:8},end:{line:173,column:28}},70:{start:{line:175,column:6},end:{line:209,column:9}},71:{start:{line:176,column:25},end:{line:176,column:72}},72:{start:{line:177,column:27},end:{line:179,column:10}},73:{start:{line:178,column:10},end:{line:178,column:97}},74:{start:{line:180,column:32},end:{line:180,column:34}},75:{start:{line:181,column:8},end:{line:183,column:9}},76:{start:{line:182,column:10},end:{line:182,column:53}},77:{start:{line:184,column:41},end:{line:206,column:9}},78:{start:{line:207,column:8},end:{line:207,column:33}},79:{start:{line:208,column:8},end:{line:208,column:17}},80:{start:{line:211,column:14},end:{line:211,column:26}},81:{start:{line:212,column:4},end:{line:264,column:6}},82:{start:{line:267,column:27},end:{line:267,column:72}},83:{start:{line:268,column:35},end:{line:268,column:118}},84:{start:{line:268,column:80},end:{line:268,column:117}},85:{start:{line:271,column:4},end:{line:280,column:6}},86:{start:{line:278,column:33},end:{line:278,column:38}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:14,column:19},end:{line:14,column:20}},loc:{start:{line:14,column:25},end:{line:15,column:5}},line:14},1:{name:"(anonymous_1)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:21},end:{line:33,column:3}},line:19},2:{name:"(anonymous_2)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:25},end:{line:45,column:3}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:46,column:17},end:{line:46,column:18}},loc:{start:{line:46,column:23},end:{line:63,column:3}},line:46},4:{name:"(anonymous_4)",decl:{start:{line:49,column:33},end:{line:49,column:34}},loc:{start:{line:49,column:45},end:{line:58,column:5}},line:49},5:{name:"(anonymous_5)",decl:{start:{line:55,column:21},end:{line:55,column:22}},loc:{start:{line:55,column:33},end:{line:57,column:7}},line:55},6:{name:"(anonymous_6)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:18},end:{line:86,column:3}},line:64},7:{name:"(anonymous_7)",decl:{start:{line:87,column:2},end:{line:87,column:3}},loc:{start:{line:87,column:37},end:{line:98,column:3}},line:87},8:{name:"(anonymous_8)",decl:{start:{line:99,column:2},end:{line:99,column:3}},loc:{start:{line:99,column:32},end:{line:102,column:3}},line:99},9:{name:"(anonymous_9)",decl:{start:{line:103,column:2},end:{line:103,column:3}},loc:{start:{line:103,column:46},end:{line:135,column:3}},line:103},10:{name:"getRequiredProps",decl:{start:{line:107,column:13},end:{line:107,column:29}},loc:{start:{line:107,column:37},end:{line:117,column:5}},line:107},11:{name:"withoutLayers",decl:{start:{line:122,column:13},end:{line:122,column:26}},loc:{start:{line:122,column:34},end:{line:128,column:5}},line:122},12:{name:"(anonymous_12)",decl:{start:{line:136,column:2},end:{line:136,column:3}},loc:{start:{line:136,column:32},end:{line:154,column:3}},line:136},13:{name:"(anonymous_13)",decl:{start:{line:145,column:50},end:{line:145,column:51}},loc:{start:{line:145,column:63},end:{line:150,column:9}},line:145},14:{name:"(anonymous_14)",decl:{start:{line:155,column:2},end:{line:155,column:3}},loc:{start:{line:155,column:11},end:{line:265,column:3}},line:155},15:{name:"(anonymous_15)",decl:{start:{line:159,column:26},end:{line:159,column:27}},loc:{start:{line:159,column:38},end:{line:210,column:5}},line:159},16:{name:"(anonymous_16)",decl:{start:{line:166,column:40},end:{line:166,column:41}},loc:{start:{line:166,column:47},end:{line:166,column:52}},line:166},17:{name:"(anonymous_17)",decl:{start:{line:175,column:21},end:{line:175,column:22}},loc:{start:{line:175,column:44},end:{line:209,column:7}},line:175},18:{name:"(anonymous_18)",decl:{start:{line:177,column:50},end:{line:177,column:51}},loc:{start:{line:177,column:61},end:{line:179,column:9}},line:177},19:{name:"(anonymous_19)",decl:{start:{line:268,column:53},end:{line:268,column:54}},loc:{start:{line:268,column:80},end:{line:268,column:117}},line:268},20:{name:"(anonymous_20)",decl:{start:{line:270,column:2},end:{line:270,column:3}},loc:{start:{line:270,column:11},end:{line:281,column:3}},line:270},21:{name:"(anonymous_21)",decl:{start:{line:278,column:27},end:{line:278,column:28}},loc:{start:{line:278,column:33},end:{line:278,column:38}},line:278}},branchMap:{0:{loc:{start:{line:52,column:6},end:{line:54,column:7}},type:"if",locations:[{start:{line:52,column:6},end:{line:54,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:52},1:{loc:{start:{line:72,column:8},end:{line:72,column:79}},type:"cond-expr",locations:[{start:{line:72,column:41},end:{line:72,column:75}},{start:{line:72,column:78},end:{line:72,column:79}}],line:72},2:{loc:{start:{line:78,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:78,column:6},end:{line:83,column:7}},{start:{line:81,column:13},end:{line:83,column:7}}],line:78},3:{loc:{start:{line:78,column:10},end:{line:78,column:81}},type:"binary-expr",locations:[{start:{line:78,column:10},end:{line:78,column:23}},{start:{line:78,column:27},end:{line:78,column:81}}],line:78},4:{loc:{start:{line:90,column:4},end:{line:94,column:5}},type:"if",locations:[{start:{line:90,column:4},end:{line:94,column:5}},{start:{line:92,column:11},end:{line:94,column:5}}],line:90},5:{loc:{start:{line:101,column:11},end:{line:101,column:50}},type:"cond-expr",locations:[{start:{line:101,column:34},end:{line:101,column:38}},{start:{line:101,column:41},end:{line:101,column:50}}],line:101},6:{loc:{start:{line:104,column:4},end:{line:106,column:5}},type:"if",locations:[{start:{line:104,column:4},end:{line:106,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:104},7:{loc:{start:{line:111,column:6},end:{line:115,column:7}},type:"if",locations:[{start:{line:111,column:6},end:{line:115,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:111},8:{loc:{start:{line:133,column:27},end:{line:133,column:52}},type:"binary-expr",locations:[{start:{line:133,column:27},end:{line:133,column:38}},{start:{line:133,column:42},end:{line:133,column:52}}],line:133},9:{loc:{start:{line:137,column:4},end:{line:153,column:5}},type:"if",locations:[{start:{line:137,column:4},end:{line:153,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:137},10:{loc:{start:{line:139,column:6},end:{line:152,column:7}},type:"if",locations:[{start:{line:139,column:6},end:{line:152,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:139},11:{loc:{start:{line:139,column:10},end:{line:139,column:51}},type:"binary-expr",locations:[{start:{line:139,column:10},end:{line:139,column:26}},{start:{line:139,column:30},end:{line:139,column:51}}],line:139},12:{loc:{start:{line:147,column:10},end:{line:149,column:11}},type:"if",locations:[{start:{line:147,column:10},end:{line:149,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:147},13:{loc:{start:{line:147,column:14},end:{line:147,column:68}},type:"binary-expr",locations:[{start:{line:147,column:14},end:{line:147,column:32}},{start:{line:147,column:36},end:{line:147,column:68}}],line:147},14:{loc:{start:{line:161,column:6},end:{line:174,column:7}},type:"if",locations:[{start:{line:161,column:6},end:{line:174,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:161},15:{loc:{start:{line:168,column:22},end:{line:168,column:98}},type:"binary-expr",locations:[{start:{line:168,column:22},end:{line:168,column:57}},{start:{line:168,column:61},end:{line:168,column:98}}],line:168},16:{loc:{start:{line:178,column:17},end:{line:178,column:96}},type:"binary-expr",locations:[{start:{line:178,column:17},end:{line:178,column:29}},{start:{line:178,column:33},end:{line:178,column:62}},{start:{line:178,column:66},end:{line:178,column:96}}],line:178},17:{loc:{start:{line:181,column:8},end:{line:183,column:9}},type:"if",locations:[{start:{line:181,column:8},end:{line:183,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:181},18:{loc:{start:{line:188,column:52},end:{line:188,column:153}},type:"binary-expr",locations:[{start:{line:188,column:52},end:{line:188,column:69}},{start:{line:188,column:73},end:{line:188,column:112}},{start:{line:188,column:116},end:{line:188,column:153}}],line:188},19:{loc:{start:{line:189,column:53},end:{line:189,column:105}},type:"binary-expr",locations:[{start:{line:189,column:53},end:{line:189,column:84}},{start:{line:189,column:88},end:{line:189,column:105}}],line:189},20:{loc:{start:{line:197,column:25},end:{line:197,column:43}},type:"binary-expr",locations:[{start:{line:197,column:25},end:{line:197,column:37}},{start:{line:197,column:41},end:{line:197,column:43}}],line:197},21:{loc:{start:{line:241,column:26},end:{line:241,column:96}},type:"cond-expr",locations:[{start:{line:241,column:69},end:{line:241,column:82}},{start:{line:241,column:85},end:{line:241,column:96}}],line:241}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0,0],17:[0,0],18:[0,0,0],19:[0,0],20:[0,0],21:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerList.tsx"],names:[],mappings:"AAmNoB,cAoEd,YApEc;AAnNpB,OAAO,WAAuB;AAC9B,OAAO,gBAAgB;AACvB,OAAO,YAAY;AAEnB,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,OAAO,cAAc;AAErB,SAAwB,yBAAwB;AAEhD,OAAO,sBAAsB;AAC7B,SAAS,yBAAyB,mBAAmB;AACrD,SAA0B,uBAAuB;AAuBjD,MAAM,mCAAmC,MAAM,UAAoE;AAAA,EACjH,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,kBAAkB,MAAM,UAAU;AACvC,SAAK,qBAAqB,MAAM,UAAU;AAC1C,SAAK,QAAQ;AAAA,MACX,iBAAiB,CAAC;AAAA,MAClB,sBAAsB;AAAA,MACtB,MAAM;AAAA,QACJ,KAAK,CAAC,iBAAiB;AAAA,MACzB;AAAA,MACA,QAAQ;AAAA,QACN,KAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAY,WAAmB;AAC7B,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,QACJ,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,iBAAiB;AAAA,MACjC;AAAA,MACA,QAAQ;AAAA,QACN,GAAG,KAAK,MAAM;AAAA,QACd,CAAC,SAAS,GAAG,CAAC,KAAK,MAAM,OAAO,SAAS;AAAA,MAC3C;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,eAAe,MAAM;AACnB,QAAI,MAAM;AAEV,UAAM,YAAqC,CAAC;AAE5C,SAAK,cAAc,EAAE,QAAQ,YAAU;AACrC,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,YAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAG7C,UAAI,OAAO,SAAS,GAAG;AACrB,kBAAU,SAAS,IAAI,KAAK,MAAM;AAAA,MACpC;AAEA,aAAO,QAAQ,CAAC,WAAW;AACzB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,MACjB,sBAAsB,CAAC,KAAK,MAAM;AAAA,IACpC,CAAC;AAAA,EACH;AAAA,EAEA,gBAA0D;AACxD,UAAM,SAAS,CAAC;AAChB,UAAM,eAAe,oBAAI,IAAI;AAE7B,aAAS,IAAI,GAAG,IAAI,KAAK,MAAM,OAAO,QAAQ,KAAK;AACjD,YAAM,YAAY,KAAK,MAAM,OAAO,CAAC;AACrC,YAAM,gBAAgB,KAAK,MAAM,OAAO,IAAE,CAAC;AAC3C,mBAAa;AAAA,QAAI,UAAU;AAAA,QACzB,aAAa,IAAI,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,IAAI,IAAI;AAAA,MACxE;AACA,YAAM,QAAQ;AAAA,QACZ,GAAG;AAAA,QACH,KAAK,eAAe,UAAU,EAAE,IAAI,aAAa,IAAI,UAAU,EAAE,CAAC;AAAA,MACpE;AACA,UAAG,iBAAiB,YAAY,cAAc,EAAE,KAAK,YAAY,MAAM,EAAE,GAAG;AAC1E,cAAM,YAAY,OAAO,OAAO,SAAS,CAAC;AAC1C,kBAAU,KAAK,KAAK;AAAA,MACtB,OAAO;AACL,eAAO,KAAK,CAAC,KAAK,CAAC;AAAA,MACrB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,iBAAiB,aAAqB,KAAa;AACjD,UAAM,YAAY,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAC7C,UAAM,YAAY,EAAE,GAAG,KAAK,MAAM,gBAAgB;AAClD,QAAG,aAAa,KAAK,MAAM,iBAAiB;AAC1C,gBAAU,SAAS,IAAI,CAAC,KAAK,MAAM,gBAAgB,SAAS;AAAA,IAC9D,OAAO;AACL,gBAAU,SAAS,IAAI;AAAA,IACzB;AACA,SAAK,SAAS;AAAA,MACZ,iBAAiB;AAAA,IACnB,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,aAAqB,KAAa;AAC5C,UAAM,YAAY,KAAK,MAAM,gBAAgB,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG,CAAC;AACzE,WAAO,cAAc,SAAY,OAAO;AAAA,EAC1C;AAAA,EAEA,sBAAuB,WAAoC,WAAoC;AAE7F,QAAI,KAAK,UAAU,WAAW;AAC5B,aAAO;AAAA,IACT;AAIA,aAAS,iBAAiB,OAA2B;AACnD,YAAM,MAAiD;AAAA,QACrD,IAAI,MAAM;AAAA,MACZ;AAEA,UAAI,MAAM,QAAQ;AAChB,YAAI,SAAS;AAAA,UACX,YAAY,MAAM,OAAO;AAAA,QAC3B;AAAA,MACF;AACA,aAAO;AAAA,IACT;AACA,UAAM,cAAc,OAAO;AAAA,MACzB,UAAU,OAAO,IAAI,gBAAgB;AAAA,MACrC,KAAK,MAAM,OAAO,IAAI,gBAAgB;AAAA,IACxC;AAEA,aAAS,cAAc,OAAgC;AACrD,YAAM,MAAM;AAAA,QACV,GAAG;AAAA,MACL;AACA,aAAO,IAAI,QAAQ;AACnB,aAAO;AAAA,IACT;AAIA,UAAM,aAAa,OAAO;AAAA,MACxB,cAAc,KAAK,KAAK;AAAA,MACxB,cAAc,SAAS;AAAA,IACzB;AAEA,UAAM,eAAe,EAAE,eAAe;AACtC,WAAO;AAAA,EACT;AAAA,EAEA,mBAAoB,WAAoC;AACtD,QAAI,UAAU,uBAAuB,KAAK,MAAM,oBAAoB;AAClE,YAAM,mBAAmB,KAAK,gBAAgB;AAC9C,UAAI,oBAAoB,iBAAiB,MAAM;AAC7C,cAAM,SAAS,iBAAiB;AAChC,cAAM,UAAU;AAAA,UACd,MAAM,KAAK,mBAAmB;AAAA,UAC9B,WAAW;AAAA,QACb;AACA,cAAM,WAAW,IAAI,qBAAqB,aAAW;AACnD,mBAAS,UAAU,MAAM;AACzB,cAAI,QAAQ,SAAS,KAAK,QAAQ,CAAC,EAAE,oBAAoB,GAAG;AAC1D,mBAAO,eAAe;AAAA,UACxB;AAAA,QACF,GAAG,OAAO;AAEV,iBAAS,QAAQ,MAAM;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,UAAM,YAA2B,CAAC;AAClC,QAAI,MAAM;AACV,UAAM,gBAAgB,KAAK,cAAc;AACzC,kBAAc,QAAQ,YAAU;AAC9B,YAAM,cAAc,YAAY,OAAO,CAAC,EAAE,EAAE;AAC5C,UAAG,OAAO,SAAS,GAAG;AACpB,cAAM,MAAM;AAAA,UAAC;AAAA;AAAA,YACX,eAAa,CAAC,aAAa,GAAG,EAAE,KAAK,GAAG;AAAA,YACxC,iBAAe,OAAO,IAAI,OAAK,EAAE,GAAG,EAAE,KAAK,GAAG;AAAA,YAE9C,OAAO;AAAA,YACP,UAAU,CAAC,KAAK,YAAY,aAAa,GAAG,KAAK,QAAQ,KAAK,MAAM;AAAA,YACpE,gBAAgB,KAAK,iBAAiB,KAAK,MAAM,aAAa,GAAG;AAAA;AAAA,UAH5D,SAAS,WAAW,IAAI,GAAG;AAAA,QAIlC;AACA,kBAAU,KAAK,GAAG;AAAA,MACpB;AAEA,aAAO,QAAQ,CAAC,OAAO,eAAe;AACpC,cAAM,WAAW,wBAAwB,KAAK,MAAM,QAAQ,GAAG;AAE/D,cAAM,aAAa,KAAK,MAAM,OAAO,KAAK,WAAS;AACjD,iBACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS;AAAA,QAE/B,CAAC;AAED,cAAM,kBAAgD,CAAC;AACvD,YAAI,QAAQ,KAAK,MAAM,oBAAoB;AACzC,0BAAgB,MAAM,KAAK;AAAA,QAC7B;AAEA,cAAM,WAAW;AAAA,UAAC;AAAA;AAAA,YAChB,WAAW,WAAW;AAAA,cACpB,sCAAsC,OAAO,SAAS,KAAK,KAAK,YAAY,aAAa,QAAQ,KAAK,QAAQ,KAAK,MAAM;AAAA,cACzH,uCAAuC,cAAc,OAAO,SAAS,KAAK,OAAO,SAAS;AAAA,cAC1F,mCAAmC,CAAC,CAAC;AAAA,YACvC,CAAC;AAAA,YACD,OAAO;AAAA,YAEP,IAAI,MAAM;AAAA,YACV,SAAS,MAAM;AAAA,YACf,YAAY;AAAA,YACZ,WAAW,MAAM;AAAA,YACjB,aAAa,MAAM,UAAU,CAAC,GAAG;AAAA,YACjC,YAAY,QAAQ,KAAK,MAAM;AAAA,YAC/B,eAAe,KAAK,MAAM;AAAA,YAC1B,gBAAgB,KAAK,MAAM,gBAAgB,KAAK,IAAI;AAAA,YACpD,aAAa,KAAK,MAAM,YAAY,KAAK,IAAI;AAAA,YAC7C,yBAAyB,KAAK,MAAM,wBAAwB,KAAK,IAAI;AAAA,YACpE,GAAG;AAAA;AAAA,UAXC,MAAM;AAAA,QAYb;AACA,kBAAU,KAAK,QAAQ;AACvB,eAAO;AAAA,MACT,CAAC;AAAA,IACH,CAAC;AAED,UAAM,IAAI,KAAK,MAAM;AAErB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAY,EAAE,aAAa;AAAA,QAC3B,KAAK,KAAK;AAAA,QAEV;AAAA;AAAA,YAAC;AAAA;AAAA,cAEC,QAAQ,KAAK,MAAM;AAAA,cACnB,SAAS,KAAK,MAAM;AAAA,cACpB,QAAQ,KAAK,MAAM,OAAO;AAAA,cAC1B,cAAc,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,cAC/C,gBAAgB,KAAK,MAAM;AAAA;AAAA,YALtB,KAAK,MAAM,KAAK;AAAA,UAMvB;AAAA,UACA,qBAAC,YAAO,WAAU,8BAChB;AAAA,gCAAC,UAAK,WAAU,oCAAoC,YAAE,QAAQ,GAAE;AAAA,YAChE,oBAAC,UAAK,WAAU,kBAAiB;AAAA,YACjC,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,IAAG;AAAA,gBACH,eAAY;AAAA,gBACZ,SAAS,KAAK;AAAA,gBACd,WAAU;AAAA,gBACT,eAAK,MAAM,yBAAyB,OACnC,EAAE,UAAU,IAEZ,EAAE,QAAQ;AAAA;AAAA,YAEd,GACF,GACF;AAAA,YACA,oBAAC,SAAI,WAAU,6BACb,8BAAC,SAAI,WAAU,wBACb;AAAA,cAAC;AAAA;AAAA,gBACC,SAAS,KAAK,YAAY,KAAK,MAAM,KAAK;AAAA,gBAC1C,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACT,YAAE,WAAW;AAAA;AAAA,YAChB,GACF,GACF;AAAA,aACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAY,EAAE,aAAa;AAAA,cAE3B,8BAAC,QAAG,WAAU,iCACX,qBACH;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AACvE,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:"fce844afd94013ad4b9b4e84bd148b8b849d3079"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Cn=function(){return a},a}Cn();class gN extends rr.Component{constructor(t){Cn().f[1]++,Cn().s[1]++;super(t);kn(this,"selectedItemRef");kn(this,"scrollContainerRef");kn(this,"toggleLayers",(Cn().s[6]++,()=>{Cn().f[3]++;let t=(Cn().s[7]++,0);const r=(Cn().s[8]++,{});Cn().s[9]++,this.groupedLayers().forEach(i=>{Cn().f[4]++;const s=(Cn().s[10]++,H1(i[0].id)),a=(Cn().s[11]++,[s,t].join("-"));Cn().s[12]++,i.length>1?(Cn().b[0][0]++,Cn().s[13]++,r[a]=this.state.areAllGroupsExpanded):Cn().b[0][1]++,Cn().s[14]++,i.forEach(o=>{Cn().f[5]++,Cn().s[15]++,t+=1})}),Cn().s[16]++,this.setState({collapsedGroups:r,areAllGroupsExpanded:!this.state.areAllGroupsExpanded})}));Cn().s[2]++,this.selectedItemRef=rr.createRef(),Cn().s[3]++,this.scrollContainerRef=rr.createRef(),Cn().s[4]++,this.state={collapsedGroups:{},areAllGroupsExpanded:!1,keys:{add:+Sy()},isOpen:{add:!1}}}toggleModal(t){Cn().f[2]++,Cn().s[5]++,this.setState({keys:{...this.state.keys,[t]:+Sy()},isOpen:{...this.state.isOpen,[t]:!this.state.isOpen[t]}})}groupedLayers(){Cn().f[6]++;const t=(Cn().s[17]++,[]),r=(Cn().s[18]++,new Map);Cn().s[19]++;for(let i=(Cn().s[20]++,0);i<this.props.layers.length;i++){const s=(Cn().s[21]++,this.props.layers[i]),a=(Cn().s[22]++,this.props.layers[i-1]);Cn().s[23]++,r.set(s.id,r.has(s.id)?(Cn().b[1][0]++,r.get(s.id)+1):(Cn().b[1][1]++,0));const o=(Cn().s[24]++,{...s,key:`layers-list-${s.id}-${r.get(s.id)}`});if(Cn().s[25]++,Cn().b[3][0]++,a&&(Cn().b[3][1]++,H1(a.id)==H1(o.id))){Cn().b[2][0]++;const d=(Cn().s[26]++,t[t.length-1]);Cn().s[27]++,d.push(o)}else Cn().b[2][1]++,Cn().s[28]++,t.push([o])}return Cn().s[29]++,t}toggleLayerGroup(t,r){Cn().f[7]++;const i=(Cn().s[30]++,[t,r].join("-")),s=(Cn().s[31]++,{...this.state.collapsedGroups});Cn().s[32]++,i in this.state.collapsedGroups?(Cn().b[4][0]++,Cn().s[33]++,s[i]=!this.state.collapsedGroups[i]):(Cn().b[4][1]++,Cn().s[34]++,s[i]=!1),Cn().s[35]++,this.setState({collapsedGroups:s})}isCollapsed(t,r){Cn().f[8]++;const i=(Cn().s[36]++,this.state.collapsedGroups[[t,r].join("-")]);return Cn().s[37]++,i===void 0?(Cn().b[5][0]++,!0):(Cn().b[5][1]++,i)}shouldComponentUpdate(t,r){if(Cn().f[9]++,Cn().s[38]++,this.state!==r)return Cn().b[6][0]++,Cn().s[39]++,!0;Cn().b[6][1]++;function i(g){Cn().f[10]++;const b=(Cn().s[40]++,{id:g.id});return Cn().s[41]++,g.layout?(Cn().b[7][0]++,Cn().s[42]++,b.layout={visibility:g.layout.visibility}):Cn().b[7][1]++,Cn().s[43]++,b}const s=(Cn().s[44]++,t6.isEqual(t.layers.map(i),this.props.layers.map(i)));function a(g){Cn().f[11]++;const b=(Cn().s[45]++,{...g});return Cn().s[46]++,delete b.layers,Cn().s[47]++,b}const o=(Cn().s[48]++,t6.isEqual(a(this.props),a(t))),d=(Cn().s[49]++,Cn().b[8][0]++,!(s&&(Cn().b[8][1]++,o)));return Cn().s[50]++,d}componentDidUpdate(t){if(Cn().f[12]++,Cn().s[51]++,t.selectedLayerIndex!==this.props.selectedLayerIndex){Cn().b[9][0]++;const r=(Cn().s[52]++,this.selectedItemRef.current);if(Cn().s[53]++,Cn().b[11][0]++,r&&(Cn().b[11][1]++,r.node)){Cn().b[10][0]++;const i=(Cn().s[54]++,r.node),s=(Cn().s[55]++,{root:this.scrollContainerRef.current,threshold:1}),a=(Cn().s[56]++,new IntersectionObserver(o=>{Cn().f[13]++,Cn().s[57]++,a.unobserve(i),Cn().s[58]++,Cn().b[13][0]++,o.length>0&&(Cn().b[13][1]++,o[0].intersectionRatio<1)?(Cn().b[12][0]++,Cn().s[59]++,i.scrollIntoView()):Cn().b[12][1]++},s));Cn().s[60]++,a.observe(i)}else Cn().b[10][1]++}else Cn().b[9][1]++}render(){Cn().f[14]++;const t=(Cn().s[61]++,[]);let r=(Cn().s[62]++,0);const i=(Cn().s[63]++,this.groupedLayers());Cn().s[64]++,i.forEach(a=>{Cn().f[15]++;const o=(Cn().s[65]++,H1(a[0].id));if(Cn().s[66]++,a.length>1){Cn().b[14][0]++;const d=(Cn().s[67]++,le.jsx(yoe,{"data-wd-key":[o,r].join("-"),"aria-controls":a.map(g=>(Cn().f[16]++,Cn().s[68]++,g.key)).join(" "),title:o,isActive:(Cn().b[15][0]++,!this.isCollapsed(o,r)||(Cn().b[15][1]++,r===this.props.selectedLayerIndex)),onActiveToggle:this.toggleLayerGroup.bind(this,o,r)},`group-${o}-${r}`));Cn().s[69]++,t.push(d)}else Cn().b[14][1]++;Cn().s[70]++,a.forEach((d,g)=>{var k;Cn().f[17]++;const b=(Cn().s[71]++,Bae(this.props.layers,r)),E=(Cn().s[72]++,this.props.errors.find(U=>(Cn().f[18]++,Cn().s[73]++,Cn().b[16][0]++,U.parsed&&(Cn().b[16][1]++,U.parsed.type==="layer")&&(Cn().b[16][2]++,U.parsed.data.index==r)))),S=(Cn().s[74]++,{});Cn().s[75]++,r===this.props.selectedLayerIndex?(Cn().b[17][0]++,Cn().s[76]++,S.ref=this.selectedItemRef):Cn().b[17][1]++;const O=(Cn().s[77]++,le.jsx(Zoe,{className:tm({"maputnik-layer-list-item-collapsed":(Cn().b[18][0]++,a.length>1&&(Cn().b[18][1]++,this.isCollapsed(o,b))&&(Cn().b[18][2]++,r!==this.props.selectedLayerIndex)),"maputnik-layer-list-item-group-last":(Cn().b[19][0]++,g==a.length-1&&(Cn().b[19][1]++,a.length>1)),"maputnik-layer-list-item--error":!!E}),index:r,id:d.key,layerId:d.id,layerIndex:r,layerType:d.type,visibility:(Cn().b[20][0]++,d.layout||(Cn().b[20][1]++,{})).visibility,isSelected:r===this.props.selectedLayerIndex,onLayerSelect:this.props.onLayerSelect,onLayerDestroy:(k=this.props.onLayerDestroy)==null?void 0:k.bind(this),onLayerCopy:this.props.onLayerCopy.bind(this),onLayerVisibilityToggle:this.props.onLayerVisibilityToggle.bind(this),...S},d.key));Cn().s[78]++,t.push(O),Cn().s[79]++,r+=1})});const s=(Cn().s[80]++,this.props.t);return Cn().s[81]++,le.jsxs("section",{className:"maputnik-layer-list",role:"complementary","aria-label":s("Layers list"),ref:this.scrollContainerRef,children:[le.jsx(Mae,{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),le.jsxs("header",{className:"maputnik-layer-list-header",children:[le.jsx("span",{className:"maputnik-layer-list-header-title",children:s("Layers")}),le.jsx("span",{className:"maputnik-space"}),le.jsx("div",{className:"maputnik-default-property",children:le.jsx("div",{className:"maputnik-multibutton",children:le.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?(Cn().b[21][0]++,s("Collapse")):(Cn().b[21][1]++,s("Expand"))})})}),le.jsx("div",{className:"maputnik-default-property",children:le.jsx("div",{className:"maputnik-multibutton",children:le.jsx("button",{onClick:this.toggleModal.bind(this,"add"),"data-wd-key":"layer-list:add-layer",className:"maputnik-button maputnik-button-selected",children:s("Add Layer")})})})]}),le.jsx("div",{role:"navigation","aria-label":s("Layers list"),children:le.jsx("ul",{className:"maputnik-layer-list-container",children:t})})]})}}kn(gN,"defaultProps",(Cn().s[0]++,{onLayerSelect:()=>{Cn().f[0]++}}));const Oae=(Cn().s[82]++,$s()(gN)),Iae=(Cn().s[83]++,Yoe(n=>(Cn().f[19]++,Cn().s[84]++,le.jsx(Oae,{...n}))));class kae extends rr.Component{render(){return Cn().f[20]++,Cn().s[85]++,le.jsx(Iae,{...this.props,helperClass:"sortableHelper",onSortEnd:this.props.onMoveLayer.bind(this),useDragHandle:!0,shouldCancelStart:()=>(Cn().f[21]++,Cn().s[86]++,!1)})}}var _5,V9;function yN(){if(V9)return _5;V9=1;var n={},e="a menu outside a mounted Wrapper with an id, or a menu that does not exist";function t(a,o){n[a]=o}function r(a){delete n[a]}function i(a,o){var d=n[a];if(!d)throw new Error("Cannot open "+e);d.openMenu(o)}function s(a,o){var d=n[a];if(!d)throw new Error("Cannot close "+e);d.closeMenu(o)}return _5={registerManager:t,unregisterManager:r,openMenu:i,closeMenu:s},_5}var b5,H9;function Tae(){if(H9)return b5;H9=1;function n(i){i=i||{};var s=i.keybindings||{};this._settings={keybindings:{next:s.next||{keyCode:40},prev:s.prev||{keyCode:38},first:s.first,last:s.last},wrap:i.wrap,stringSearch:i.stringSearch,stringSearchDelay:800},this._keybindingsLookup=[];var a,o;for(a in this._settings.keybindings)o=this._settings.keybindings[a],o&&[].concat(o).forEach((function(d){d.metaKey=d.metaKey||!1,d.ctrlKey=d.ctrlKey||!1,d.altKey=d.altKey||!1,d.shiftKey=d.shiftKey||!1,this._keybindingsLookup.push({action:a,eventMatcher:d})}).bind(this));this._searchString="",this._members=[],i.members&&this.setMembers(i.members),this._boundHandleKeydownEvent=this._handleKeydownEvent.bind(this)}n.prototype.activate=function(){return document.addEventListener("keydown",this._boundHandleKeydownEvent,!0),this},n.prototype.deactivate=function(){return document.removeEventListener("keydown",this._boundHandleKeydownEvent,!0),this._clearSearchStringRefreshTimer(),this},n.prototype._handleKeydownEvent=function(i){var s=this._getActiveElementIndex();if(s!==-1){var a=!1;this._keybindingsLookup.forEach((function(o){if(e(o.eventMatcher,i))switch(a=!0,i.preventDefault(),o.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)),a||this._handleUnboundKey(i)}},n.prototype.moveFocusForward=function(){var i=this._getActiveElementIndex(),s;return i<this._members.length-1?s=i+1:this._settings.wrap?s=0:s=i,this.focusNodeAtIndex(s),s},n.prototype.moveFocusBack=function(){var i=this._getActiveElementIndex(),s;return i>0?s=i-1:this._settings.wrap?s=this._members.length-1:s=i,this.focusNodeAtIndex(s),s},n.prototype.moveFocusToFirst=function(){this.focusNodeAtIndex(0)},n.prototype.moveFocusToLast=function(){this.focusNodeAtIndex(this._members.length-1)},n.prototype._handleUnboundKey=function(i){if(this._settings.stringSearch){if(this._searchString!==""&&(i.key===" "||i.keyCode===32))return i.preventDefault(),-1;if(!t(i.keyCode)||i.ctrlKey||i.metaKey||i.altKey)return-1;i.preventDefault(),this._addToSearchString(String.fromCharCode(i.keyCode)),this._runStringSearch()}},n.prototype._clearSearchString=function(){this._searchString=""},n.prototype._addToSearchString=function(i){this._searchString+=i.toLowerCase()},n.prototype._startSearchStringRefreshTimer=function(){var i=this;this._clearSearchStringRefreshTimer(),this._stringSearchTimer=setTimeout(function(){i._clearSearchString()},this._settings.stringSearchDelay)},n.prototype._clearSearchStringRefreshTimer=function(){clearTimeout(this._stringSearchTimer)},n.prototype._runStringSearch=function(){this._startSearchStringRefreshTimer(),this.moveFocusByString(this._searchString)},n.prototype.moveFocusByString=function(i){for(var s,a=0,o=this._members.length;a<o;a++)if(s=this._members[a],!!s.text&&s.text.indexOf(i)===0)return r(s.node)},n.prototype._findIndexOfNode=function(i){for(var s=0,a=this._members.length;s<a;s++)if(this._members[s].node===i)return s;return-1},n.prototype._getActiveElementIndex=function(){return this._findIndexOfNode(document.activeElement)},n.prototype.focusNodeAtIndex=function(i){var s=this._members[i];return s&&r(s.node),this},n.prototype.addMember=function(i,s){var a=i.node||i,o=i.text||a.getAttribute("data-focus-group-text")||a.textContent||"";this._checkNode(a);var d=o.replace(/[\W_]/g,"").toLowerCase(),g={node:a,text:d};return s!=null?this._members.splice(s,0,g):this._members.push(g),this},n.prototype.removeMember=function(i){var s=typeof i=="number"?i:this._findIndexOfNode(i);if(s!==-1)return this._members.splice(s,1),this},n.prototype.clearMembers=function(){return this._members=[],this},n.prototype.setMembers=function(i){this.clearMembers();for(var s=0,a=i.length;s<a;s++)this.addMember(i[s]);return this},n.prototype.getMembers=function(){return this._members},n.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 e(i,s){for(var a in i)if(s[a]!==void 0&&i[a]!==s[a])return!1;return!0}function t(i){return i>=65&&i<=90}function r(i){!i||!i.focus||(i.focus(),i.tagName.toLowerCase()==="input"&&i.select())}return b5=function(s){return new n(s)},b5}var x5,Z9;function Pae(){if(Z9)return x5;Z9=1;var n=Tae(),e=yN(),t={wrap:!0,stringSearch:!0},r={init:function(d){this.updateOptions(d),this.handleBlur=i.bind(this),this.handleSelection=s.bind(this),this.handleMenuKey=a.bind(this),this.focusGroup=n(t),this.button=null,this.menu=null,this.isOpen=!1},updateOptions:function(d){var g=this.options;this.options=d||this.options||{},typeof this.options.closeOnSelection>"u"&&(this.options.closeOnSelection=!0),typeof this.options.closeOnBlur>"u"&&(this.options.closeOnBlur=!0),this.options.id&&e.registerManager(this.options.id,this),g&&g.id&&g.id!==this.options.id&&e.unregisterManager(this.options.id,this)},focusItem:function(d){this.focusGroup.focusNodeAtIndex(d)},addItem:function(d){this.focusGroup.addMember(d)},clearItems:function(){this.focusGroup.clearMembers()},handleButtonNonArrowKey:function(d){this.focusGroup._handleUnboundKey(d)},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(d){if(!this.isOpen&&(d=d||{},d.focusMenu===void 0&&(d.focusMenu=!0),this.isOpen=!0,this.update(),this.focusGroup.activate(),d.focusMenu)){var g=this;this.moveFocusTimer=setTimeout(function(){g.focusItem(0)},0)}},closeMenu:function(d){this.isOpen&&(d=d||{},this.isOpen=!1,this.update(),d.focusButton&&this.button.ref.current.focus())},toggleMenu:function(d,g){d=d||{},g=g||{},this.isOpen?this.closeMenu(d):this.openMenu(g)}};function i(){var o=this;o.blurTimer=setTimeout(function(){if(o.button){var d=o.button.ref.current;if(d){var g=d.ownerDocument.activeElement;if(!(d&&g===d)){var b=o.menu.ref.current;if(b===g){o.focusItem(0);return}b&&b.contains(g)||o.isOpen&&o.closeMenu({focusButton:!1})}}}},0)}function s(o,d){this.options.closeOnSelection&&this.closeMenu({focusButton:!0}),this.options.onSelection&&this.options.onSelection(o,d)}function a(o){if(this.isOpen)switch(o.key){case"Escape":o.preventDefault(),this.closeMenu({focusButton:!0});break;case"Home":o.preventDefault(),this.focusGroup.moveFocusToFirst();break;case"End":o.preventDefault(),this.focusGroup.moveFocusToLast();break}}return x5=function(o){var d=Object.create(r);return d.init(o),d},x5}var w5,X9;function Nx(){if(X9)return w5;X9=1;var n=Fa(),e=n.createContext();return w5=e,w5}var M5,J9;function Wx(){if(J9)return M5;J9=1;var n=dp();return M5={refType:n.oneOfType([n.func,n.shape({current:n.elementType})])},M5}var S5,eT;function Gx(){return eT||(eT=1,S5=function(n,e,t){t=t||{};for(var r in e)e.hasOwnProperty(r)&&(t[r]||(n[r]=e[r]))}),S5}var E5,tT;function Rae(){if(tT)return E5;tT=1;function n(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function e(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:O}function t(O,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}var r=Fa(),i=dp(),s=Pae(),a=Nx(),o=Wx(),d=o.refType,g=Gx(),b={children:i.node.isRequired,forwardedRef:d,onMenuToggle:i.func,onSelection:i.func,closeOnSelection:i.bool,closeOnBlur:i.bool,tag:i.string},E=function(k){return{onMenuToggle:k.onMenuToggle,onSelection:k.onSelection,closeOnSelection:k.closeOnSelection,closeOnBlur:k.closeOnBlur,id:k.id}},S=function(O){t(k,O);function k(U){n(this,k);var z=e(this,O.call(this,U));return z.manager=s(E(U)),z}return k.prototype.componentDidUpdate=function(){this.manager.updateOptions(E(this.props))},k.prototype.render=function(){var z={};return g(z,this.props,b),r.createElement(a.Provider,{value:this.manager},r.createElement(this.props.tag,z,this.props.children))},k}(r.Component);return S.propTypes=b,S.defaultProps={tag:"div"},E5=r.forwardRef(function(O,k){var U={forwardedRef:k};return g(U,O,{children:b.children,forwardedRef:b.forwardedRef}),g(U,{forwardedRef:k}),r.createElement(S,U,O.children)}),E5}var B5,nT;function Dae(){if(nT)return B5;nT=1;function n(S,O){if(!(S instanceof O))throw new TypeError("Cannot call a class as a function")}function e(S,O){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:S}function t(S,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);S.prototype=Object.create(O&&O.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(S,O):S.__proto__=O)}var r=Fa(),i=dp(),s=Nx(),a=Wx(),o=a.refType,d=Gx(),g={ambManager:i.object.isRequired,children:i.node.isRequired,disabled:i.bool,forwardedRef:o,tag:i.string},b=function(){return["button","fieldset","input","optgroup","option","select","textarea"]},E=function(S){t(O,S);function O(){var k,U,z;n(this,O);for(var q=arguments.length,Q=Array(q),re=0;re<q;re++)Q[re]=arguments[re];return z=(k=(U=e(this,S.call.apply(S,[this].concat(Q))),U),U.ref=r.createRef(),U.handleKeyDown=function(X){if(!U.props.disabled){var Y=U.props.ambManager;switch(X.key){case"ArrowDown":X.preventDefault(),Y.isOpen?Y.focusItem(0):Y.openMenu();break;case"Enter":case" ":X.preventDefault(),Y.toggleMenu();break;case"Escape":Y.handleMenuKey(X);break;default:Y.handleButtonNonArrowKey(X)}}},U.handleClick=function(){U.props.disabled||U.props.ambManager.toggleMenu({},{focusMenu:!1})},U.setRef=function(X){U.ref.current=X,typeof U.props.forwardedRef=="function"?U.props.forwardedRef(X):U.props.forwardedRef&&(U.props.forwardedRef.current=X)},k),e(U,z)}return O.prototype.componentDidMount=function(){this.props.ambManager.button=this},O.prototype.componentWillUnmount=function(){this.props.ambManager.destroy()},O.prototype.render=function(){var U=this.props,z=this.props.ambManager,q={role:"button",tabIndex:U.disabled?"":"0","aria-haspopup":!0,"aria-expanded":z.isOpen,"aria-disabled":U.disabled,onKeyDown:this.handleKeyDown,onClick:this.handleClick},Q={};return d(Q,g),b().indexOf(U.tag)>=0&&delete Q.disabled,z.options.closeOnBlur&&(q.onBlur=z.handleBlur),d(q,U,Q),d(q,{ref:this.setRef}),r.createElement(U.tag,q,U.children)},O}(r.Component);return E.propTypes=g,E.defaultProps={tag:"span"},B5=r.forwardRef(function(S,O){return r.createElement(s.Consumer,null,function(k){var U={ambManager:k,forwardedRef:O};return d(U,S,{ambManager:g.ambManager,children:g.children,forwardedRef:g.forwardedRef}),r.createElement(E,U,S.children)})}),B5}var O5,rT;function Kae(){return rT||(rT=1,O5=function(e,t,r){var i=0,s=0,a=!1,o=!1,d=!1;e.addEventListener("click",g,r),e.addEventListener("touchstart",b,r);function g(z){d||t(z)}function b(z){d=!0,!a&&(a=!0,e.addEventListener("touchmove",E,r),e.addEventListener("touchend",S,r),e.addEventListener("touchcancel",O,r),o=!1,i=z.touches[0].clientX,s=z.touches[0].clientY)}function E(z){o||Math.abs(z.touches[0].clientX-i)<=10&&Math.abs(z.touches[0].clientY-s)<=10||(o=!0)}function S(z){a=!1,k(),o||t(z)}function O(){a=!1,o=!1,i=0,s=0}function k(){e.removeEventListener("touchmove",E,r),e.removeEventListener("touchend",S,r),e.removeEventListener("touchcancel",O,r)}function U(){e.removeEventListener("click",g,r),e.removeEventListener("touchstart",b,r),k()}return{remove:U}}),O5}var I5,iT;function Fae(){if(iT)return I5;iT=1;function n(S,O){if(!(S instanceof O))throw new TypeError("Cannot call a class as a function")}function e(S,O){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:S}function t(S,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);S.prototype=Object.create(O&&O.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(S,O):S.__proto__=O)}var r=Fa(),i=dp(),s=Kae(),a=Nx(),o=Wx(),d=o.refType,g=Gx(),b={ambManager:i.object.isRequired,children:i.oneOfType([i.func,i.node]).isRequired,forwardedRef:d,tag:i.string},E=function(S){t(O,S);function O(){var k,U,z;n(this,O);for(var q=arguments.length,Q=Array(q),re=0;re<q;re++)Q[re]=arguments[re];return z=(k=(U=e(this,S.call.apply(S,[this].concat(Q))),U),U.ref=r.createRef(),U.addTapListener=function(){var X=U.ref.current;if(X){var Y=X.ownerDocument;Y&&(U.tapListener=s(Y.documentElement,U.handleTap))}},U.handleTap=function(X){U.ref.current.contains(X.target)||U.props.ambManager.button.ref.current.contains(X.target)||U.props.ambManager.closeMenu()},U.setRef=function(X){U.ref.current=X,typeof U.props.forwardedRef=="function"?U.props.forwardedRef(X):U.props.forwardedRef&&(U.props.forwardedRef.current=X)},k),e(U,z)}return O.prototype.componentDidMount=function(){this.props.ambManager.menu=this},O.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())},O.prototype.componentWillUnmount=function(){this.tapListener&&this.tapListener.remove(),this.props.ambManager.destroy()},O.prototype.render=function(){var U=this.props,z=this.props.ambManager,q=function(){return typeof U.children=="function"?U.children({isOpen:z.isOpen}):z.isOpen?U.children:!1}();if(!q)return!1;var Q={onKeyDown:z.handleMenuKey,role:"menu",tabIndex:-1};return z.options.closeOnBlur&&(Q.onBlur=z.handleBlur),g(Q,U,b),g(Q,{ref:this.setRef}),r.createElement(U.tag,Q,q)},O}(r.Component);return E.propTypes=b,E.defaultProps={tag:"div"},I5=r.forwardRef(function(S,O){return r.createElement(a.Consumer,null,function(k){var U={ambManager:k,forwardedRef:O};return g(U,S,{ambManager:b.ambManager,children:b.children,forwardedRef:b.forwardedRef}),r.createElement(E,U,S.children)})}),I5}var k5,oT;function Lae(){if(oT)return k5;oT=1;function n(E,S){if(!(E instanceof S))throw new TypeError("Cannot call a class as a function")}function e(E,S){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:E}function t(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(E,S):E.__proto__=S)}var r=Fa(),i=dp(),s=Nx(),a=Wx(),o=a.refType,d=Gx(),g={ambManager:i.object.isRequired,children:i.node.isRequired,forwardedRef:o,tag:i.string,text:i.string,value:i.any},b=function(E){t(S,E);function S(){var O,k,U;n(this,S);for(var z=arguments.length,q=Array(z),Q=0;Q<z;Q++)q[Q]=arguments[Q];return U=(O=(k=e(this,E.call.apply(E,[this].concat(q))),k),k.ref=r.createRef(),k.handleKeyDown=function(re){re.key!=="Enter"&&re.key!==" "||k.props.tag==="a"&&k.props.href||(re.preventDefault(),k.selectItem(re))},k.selectItem=function(re){var X=typeof k.props.value<"u"?k.props.value:k.props.children;k.props.ambManager.handleSelection(X,re)},k.setRef=function(re){k.ref.current=re,typeof k.props.forwardedRef=="function"?k.props.forwardedRef(re):k.props.forwardedRef&&(k.props.forwardedRef.current=re)},O),e(k,U)}return S.prototype.componentDidMount=function(){this.props.ambManager.addItem({node:this.ref.current,text:this.props.text})},S.prototype.render=function(){var k={onClick:this.selectItem,onKeyDown:this.handleKeyDown,role:"menuitem",tabIndex:"-1",ref:this.setRef};return d(k,this.props,g),r.createElement(this.props.tag,k,this.props.children)},S}(r.Component);return b.propTypes=g,b.defaultProps={tag:"div"},k5=r.forwardRef(function(E,S){return r.createElement(s.Consumer,null,function(O){var k={ambManager:O,forwardedRef:S};return d(k,E,{ambManager:g.ambManager,children:g.children,forwardedRef:g.forwardedRef}),r.createElement(b,k,E.children)})}),k5}var T5,sT;function Uae(){if(sT)return T5;sT=1;var n=yN();return T5={Wrapper:Rae(),Button:Dae(),Menu:Fae(),MenuItem:Lae(),openMenu:n.openMenu,closeMenu:n.closeMenu},T5}var ub=Uae();function aT(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function dB(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?aT(Object(t),!0).forEach(function(r){Ll(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):aT(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Qx(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function lT(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}function qx(n,e,t){return e&&lT(n.prototype,e),t&&lT(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function Ll(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function nm(){return nm=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},nm.apply(this,arguments)}function C8(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&hB(n,e)}function D2(n){return D2=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},D2(n)}function hB(n,e){return hB=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},hB(n,e)}function zae(){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 jae(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function Yx(n,e){if(n==null)return{};var t=jae(n,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function rp(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Nae(n,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rp(n)}function _8(n){var e=zae();return function(){var r=D2(n),i;if(e){var s=D2(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return Nae(this,i)}}function Wae(n,e){return qae(n)||$ae(n,e)||vN(n,e)||Hae()}function Gae(n){return Qae(n)||Yae(n)||vN(n)||Vae()}function Qae(n){if(Array.isArray(n))return fB(n)}function qae(n){if(Array.isArray(n))return n}function Yae(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function $ae(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r=[],i=!0,s=!1,a,o;try{for(t=t.call(n);!(i=(a=t.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(d){s=!0,o=d}finally{try{!i&&t.return!=null&&t.return()}finally{if(s)throw o}}return r}}function vN(n,e){if(n){if(typeof n=="string")return fB(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fB(n,e)}}function fB(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function Vae(){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 Hae(){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 Zae=qx(function n(e){var t=this,r=e.expanded,i=r===void 0?[]:r,s=e.allowMultipleExpanded,a=s===void 0?!1:s,o=e.allowZeroExpanded,d=o===void 0?!1:o;Qx(this,n),Ll(this,"expanded",void 0),Ll(this,"allowMultipleExpanded",void 0),Ll(this,"allowZeroExpanded",void 0),Ll(this,"toggleExpanded",function(g){if(t.isItemDisabled(g))return t;var b=t.isItemExpanded(g);return b?t.augment({expanded:t.expanded.filter(function(E){return E!==g})}):t.augment({expanded:t.allowMultipleExpanded?[].concat(Gae(t.expanded),[g]):[g]})}),Ll(this,"isItemDisabled",function(g){var b=t.isItemExpanded(g),E=t.expanded.length===1;return!!(b&&!t.allowZeroExpanded&&E)}),Ll(this,"isItemExpanded",function(g){return t.expanded.indexOf(g)!==-1}),Ll(this,"getPanelAttributes",function(g,b){var E=b??t.isItemExpanded(g);return{role:t.allowMultipleExpanded?void 0:"region","aria-hidden":t.allowMultipleExpanded?!E:void 0,"aria-labelledby":t.getButtonId(g),id:t.getPanelId(g),hidden:E?void 0:!0}}),Ll(this,"getHeadingAttributes",function(){return{role:"heading"}}),Ll(this,"getButtonAttributes",function(g,b){var E=b??t.isItemExpanded(g),S=t.isItemDisabled(g);return{id:t.getButtonId(g),"aria-disabled":S,"aria-expanded":E,"aria-controls":t.getPanelId(g),role:"button",tabIndex:0}}),Ll(this,"getPanelId",function(g){return"accordion__panel-".concat(g)}),Ll(this,"getButtonId",function(g){return"accordion__heading-".concat(g)}),Ll(this,"augment",function(g){return new n(dB({expanded:t.expanded,allowMultipleExpanded:t.allowMultipleExpanded,allowZeroExpanded:t.allowZeroExpanded},g))}),this.expanded=i,this.allowMultipleExpanded=a,this.allowZeroExpanded=d}),CN=ui.createContext(null),_N=function(n){C8(t,n);var e=_8(t);function t(){var r;Qx(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Ll(rp(r),"state",new Zae({expanded:r.props.preExpanded,allowMultipleExpanded:r.props.allowMultipleExpanded,allowZeroExpanded:r.props.allowZeroExpanded})),Ll(rp(r),"toggleExpanded",function(o){r.setState(function(d){return d.toggleExpanded(o)},function(){r.props.onChange&&r.props.onChange(r.state.expanded)})}),Ll(rp(r),"isItemDisabled",function(o){return r.state.isItemDisabled(o)}),Ll(rp(r),"isItemExpanded",function(o){return r.state.isItemExpanded(o)}),Ll(rp(r),"getPanelAttributes",function(o,d){return r.state.getPanelAttributes(o,d)}),Ll(rp(r),"getHeadingAttributes",function(){return r.state.getHeadingAttributes()}),Ll(rp(r),"getButtonAttributes",function(o,d){return r.state.getButtonAttributes(o,d)}),r}return qx(t,[{key:"render",value:function(){var i=this.state,s=i.allowZeroExpanded,a=i.allowMultipleExpanded;return ui.createElement(CN.Provider,{value:{allowMultipleExpanded:a,allowZeroExpanded:s,toggleExpanded:this.toggleExpanded,isItemDisabled:this.isItemDisabled,isItemExpanded:this.isItemExpanded,getPanelAttributes:this.getPanelAttributes,getHeadingAttributes:this.getHeadingAttributes,getButtonAttributes:this.getButtonAttributes}},this.props.children||null)}}]),t}(ui.PureComponent);Ll(_N,"defaultProps",{allowMultipleExpanded:!1,allowZeroExpanded:!1});var bN=function(n){C8(t,n);var e=_8(t);function t(){var r;Qx(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Ll(rp(r),"renderChildren",function(o){return o?r.props.children(o):null}),r}return qx(t,[{key:"render",value:function(){return ui.createElement(CN.Consumer,null,this.renderChildren)}}]),t}(ui.PureComponent),Xae=["className","allowMultipleExpanded","allowZeroExpanded","onChange","preExpanded"],Jae=function(e){var t=e.className,r=t===void 0?"accordion":t,i=e.allowMultipleExpanded,s=e.allowZeroExpanded,a=e.onChange,o=e.preExpanded,d=Yx(e,Xae);return ui.createElement(_N,{preExpanded:o,allowMultipleExpanded:i,allowZeroExpanded:s,onChange:a},ui.createElement("div",nm({"data-accordion-component":"Accordion",className:r},d)))},pB;(function(n){n.Accordion="Accordion",n.AccordionItem="AccordionItem",n.AccordionItemButton="AccordionItemButton",n.AccordionItemHeading="AccordionItemHeading",n.AccordionItemPanel="AccordionItemPanel"})(pB||(pB={}));var xN=pB,P5=0;function ele(){var n=P5;return P5=P5+1,"raa-".concat(n)}var tle=ui.useId||ele,nle=/[\u0009\u000a\u000c\u000d\u0020]/g;function MC(n){return n===""||nle.test(n)?(console.error('uuid must be a valid HTML5 id but was given "'.concat(n,'", ASCII whitespaces are forbidden')),!1):!0}var wN=ui.createContext(null),rle=function(e){var t=e.children,r=e.uuid,i=e.accordionContext,s=e.dangerouslySetExpanded,a=function(){i.toggleExpanded(r)},o=function(g){var b=s??g.isItemExpanded(r),E=g.isItemDisabled(r),S=g.getPanelAttributes(r,s),O=g.getHeadingAttributes(r),k=g.getButtonAttributes(r,s);return ui.createElement(wN.Provider,{value:{uuid:r,expanded:b,disabled:E,toggleExpanded:a,panelAttributes:S,headingAttributes:O,buttonAttributes:k}},t)};return ui.createElement(bN,null,o)},ile=function(e){return ui.createElement(bN,null,function(t){return ui.createElement(rle,nm({},e,{accordionContext:t}))})},$x=function(e){var t=e.children,r=function(s){return s?t(s):null};return ui.createElement(wN.Consumer,null,r)},ole=["uuid","dangerouslySetExpanded","className","activeClassName"],MN=function(e){var t=e.uuid,r=e.dangerouslySetExpanded,i=e.className,s=i===void 0?"accordion__item":i,a=e.activeClassName,o=Yx(e,ole),d=ui.useState(tle()),g=Wae(d,1),b=g[0],E=t??b,S=function(k){var U=k.expanded,z=U&&a?a:s;return ui.createElement("div",nm({"data-accordion-component":"AccordionItem",className:z},o))};return MC(E.toString()),o.id&&MC(o.id),ui.createElement(ile,{uuid:E,dangerouslySetExpanded:r},ui.createElement($x,null,S))};MN.displayName=xN.AccordionItem;function SN(n){return n&&(n.matches('[data-accordion-component="Accordion"]')?n:SN(n.parentElement))}function Vx(n){var e=SN(n);return e&&Array.from(e.querySelectorAll('[data-accordion-component="AccordionItemButton"]'))}function sle(n){var e=Vx(n)||[],t=e[0];t&&t.focus()}function ale(n){var e=Vx(n)||[],t=e[e.length-1];t&&t.focus()}function lle(n){var e=Vx(n)||[],t=e.indexOf(n);if(t!==-1){var r=e[t+1];r&&r.focus()}}function ule(n){var e=Vx(n)||[],t=e.indexOf(n);if(t!==-1){var r=e[t-1];r&&r.focus()}}var Im={END:"End",ENTER:"Enter",HOME:"Home",SPACE:" ",SPACE_DEPRECATED:"Spacebar",UP:"ArrowUp",DOWN:"ArrowDown",LEFT:"ArrowLeft",RIGHT:"ArrowRight"},Ale=["toggleExpanded","className"],cle=function(e){var t=e.toggleExpanded,r=e.className,i=r===void 0?"accordion__button":r,s=Yx(e,Ale),a=function(d){var g=d.key;if((g===Im.ENTER||g===Im.SPACE||g===Im.SPACE_DEPRECATED)&&(d.preventDefault(),t()),d.target instanceof HTMLElement)switch(g){case Im.HOME:{d.preventDefault(),sle(d.target);break}case Im.END:{d.preventDefault(),ale(d.target);break}case Im.LEFT:case Im.UP:{d.preventDefault(),ule(d.target);break}case Im.RIGHT:case Im.DOWN:{d.preventDefault(),lle(d.target);break}}};return s.id&&MC(s.id),ui.createElement("div",nm({className:i},s,{role:"button",tabIndex:0,onClick:t,onKeyDown:a,"data-accordion-component":"AccordionItemButton"}))},dle=function(e){return ui.createElement($x,null,function(t){var r=t.toggleExpanded,i=t.buttonAttributes;return ui.createElement(cle,nm({toggleExpanded:r},e,i))})},hle={className:"accordion__heading","aria-level":3},fle=`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.”
|
||
|
||
`,EN=function(n){C8(t,n);var e=_8(t);function t(){var r;Qx(this,t);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s)),Ll(rp(r),"ref",void 0),Ll(rp(r),"setRef",function(o){r.ref=o}),r}return qx(t,[{key:"componentDidUpdate",value:function(){t.VALIDATE(this.ref)}},{key:"componentDidMount",value:function(){t.VALIDATE(this.ref)}},{key:"render",value:function(){return ui.createElement("div",nm({"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(fle)}}]),t}(ui.PureComponent);Ll(EN,"defaultProps",hle);var BN=function(e){return ui.createElement($x,null,function(t){var r=t.headingAttributes;return e.id&&MC(e.id),ui.createElement(EN,nm({},e,r))})};BN.displayName=xN.AccordionItemHeading;var ple=["className","region","id"],mle=function(e){var t=e.className,r=t===void 0?"accordion__panel":t,i=e.region,s=e.id,a=Yx(e,ple),o=function(g){var b=g.panelAttributes;s&&MC(s);var E=dB(dB({},b),{},{"aria-labelledby":i?b["aria-labelledby"]:void 0});return ui.createElement("div",nm({"data-accordion-component":"AccordionItemPanel",className:r},a,E,{role:i?"region":void 0}))};return ui.createElement($x,null,o)},Ib={exports:{}},gle=Ib.exports,uT;function Hx(){return uT||(uT=1,function(n,e){(function(t,r){n.exports=r()})(gle,function(){var t=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),d=s||a||o,g=d&&(s?document.documentMode||6:+(o||a)[1]),b=!o&&/WebKit\//.test(t),E=b&&/Qt\/\d+\.\d+/.test(t),S=!o&&/Chrome\/(\d+)/.exec(t),O=S&&+S[1],k=/Opera\//.test(t),U=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),q=/PhantomJS/.test(t),Q=U&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),re=/Android/.test(t),X=Q||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),Y=Q||/Mac/.test(r),ee=/\bCrOS\b/.test(t),N=/win/i.test(r),ie=k&&t.match(/Version\/(\d*\.\d*)/);ie&&(ie=Number(ie[1])),ie&&ie>=15&&(k=!1,b=!0);var he=Y&&(E||k&&(ie==null||ie<12.11)),de=i||d&&g>=9;function Me(A){return new RegExp("(^|\\s)"+A+"(?:$|\\s)\\s*")}var fe=function(A,y){var I=A.className,B=Me(y).exec(I);if(B){var D=I.slice(B.index+B[0].length);A.className=I.slice(0,B.index)+(D?B[1]+D:"")}};function xe(A){for(var y=A.childNodes.length;y>0;--y)A.removeChild(A.firstChild);return A}function De(A,y){return xe(A).appendChild(y)}function me(A,y,I,B){var D=document.createElement(A);if(I&&(D.className=I),B&&(D.style.cssText=B),typeof y=="string")D.appendChild(document.createTextNode(y));else if(y)for(var H=0;H<y.length;++H)D.appendChild(y[H]);return D}function at(A,y,I,B){var D=me(A,y,I,B);return D.setAttribute("role","presentation"),D}var Qe;document.createRange?Qe=function(A,y,I,B){var D=document.createRange();return D.setEnd(B||A,I),D.setStart(A,y),D}:Qe=function(A,y,I){var B=document.body.createTextRange();try{B.moveToElementText(A.parentNode)}catch{return B}return B.collapse(!0),B.moveEnd("character",I),B.moveStart("character",y),B};function He(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 We(A){var y=A.ownerDocument||A,I;try{I=A.activeElement}catch{I=y.body||null}for(;I&&I.shadowRoot&&I.shadowRoot.activeElement;)I=I.shadowRoot.activeElement;return I}function Ce(A,y){var I=A.className;Me(y).test(I)||(A.className+=(I?" ":"")+y)}function Te(A,y){for(var I=A.split(" "),B=0;B<I.length;B++)I[B]&&!Me(I[B]).test(y)&&(y+=" "+I[B]);return y}var rt=function(A){A.select()};Q?rt=function(A){A.selectionStart=0,A.selectionEnd=A.value.length}:d&&(rt=function(A){try{A.select()}catch{}});function yt(A){return A.display.wrapper.ownerDocument}function bt(A){return gt(A.display.wrapper)}function gt(A){return A.getRootNode?A.getRootNode():A.ownerDocument}function Dt(A){return yt(A).defaultView}function Pt(A){var y=Array.prototype.slice.call(arguments,1);return function(){return A.apply(null,y)}}function Le(A,y,I){y||(y={});for(var B in A)A.hasOwnProperty(B)&&(I!==!1||!y.hasOwnProperty(B))&&(y[B]=A[B]);return y}function Pe(A,y,I,B,D){y==null&&(y=A.search(/[^\s\u00a0]/),y==-1&&(y=A.length));for(var H=B||0,ue=D||0;;){var _e=A.indexOf(" ",H);if(_e<0||_e>=y)return ue+(y-H);ue+=_e-H,ue+=I-ue%I,H=_e+1}}var Ee=function(){this.id=null,this.f=null,this.time=0,this.handler=Pt(this.onTimeout,this)};Ee.prototype.onTimeout=function(A){A.id=0,A.time<=+new Date?A.f():setTimeout(A.handler,A.time-+new Date)},Ee.prototype.set=function(A,y){this.f=y;var I=+new Date+A;(!this.id||I<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,A),this.time=I)};function nt(A,y){for(var I=0;I<A.length;++I)if(A[I]==y)return I;return-1}var _t=50,ht={toString:function(){return"CodeMirror.Pass"}},Ut={scroll:!1},en={origin:"*mouse"},Ft={origin:"+move"};function mn(A,y,I){for(var B=0,D=0;;){var H=A.indexOf(" ",B);H==-1&&(H=A.length);var ue=H-B;if(H==A.length||D+ue>=y)return B+Math.min(ue,y-D);if(D+=H-B,D+=I-D%I,B=H+1,D>=y)return B}}var jn=[""];function nn(A){for(;jn.length<=A;)jn.push(ir(jn)+" ");return jn[A]}function ir(A){return A[A.length-1]}function Dn(A,y){for(var I=[],B=0;B<A.length;B++)I[B]=y(A[B],B);return I}function fn(A,y,I){for(var B=0,D=I(y);B<A.length&&I(A[B])<=D;)B++;A.splice(B,0,y)}function Hn(){}function wr(A,y){var I;return Object.create?I=Object.create(A):(Hn.prototype=A,I=new Hn),y&&Le(y,I),I}var Qn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Xn(A){return/\w/.test(A)||A>""&&(A.toUpperCase()!=A.toLowerCase()||Qn.test(A))}function Ge(A,y){return y?y.source.indexOf("\\w")>-1&&Xn(A)?!0:y.test(A):Xn(A)}function Ae(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 et(A){return A.charCodeAt(0)>=768&&pe.test(A)}function St(A,y,I){for(;(I<0?y>0:y<A.length)&&et(A.charAt(y));)y+=I;return y}function Yt(A,y,I){for(var B=y>I?-1:1;;){if(y==I)return y;var D=(y+I)/2,H=B<0?Math.ceil(D):Math.floor(D);if(H==y)return A(H)?y:I;A(H)?I=H:y=H+B}}function rn(A,y,I,B){if(!A)return B(y,I,"ltr",0);for(var D=!1,H=0;H<A.length;++H){var ue=A[H];(ue.from<I&&ue.to>y||y==I&&ue.to==y)&&(B(Math.max(ue.from,y),Math.min(ue.to,I),ue.level==1?"rtl":"ltr",H),D=!0)}D||B(y,I,"ltr")}var er=null;function Be(A,y,I){var B;er=null;for(var D=0;D<A.length;++D){var H=A[D];if(H.from<y&&H.to>y)return D;H.to==y&&(H.from!=H.to&&I=="before"?B=D:er=D),H.from==y&&(H.from!=H.to&&I!="before"?B=D:er=D)}return B??er}var oe=function(){var A="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function I(ze){return ze<=247?A.charAt(ze):1424<=ze&&ze<=1524?"R":1536<=ze&&ze<=1785?y.charAt(ze-1536):1774<=ze&&ze<=2220?"r":8192<=ze&&ze<=8203?"w":ze==8204?"b":"L"}var B=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,D=/[stwN]/,H=/[LRr]/,ue=/[Lb1n]/,_e=/[1n]/;function ke(ze,mt,Mt){this.level=ze,this.from=mt,this.to=Mt}return function(ze,mt){var Mt=mt=="ltr"?"L":"R";if(ze.length==0||mt=="ltr"&&!B.test(ze))return!1;for(var Xt=ze.length,Qt=[],Mn=0;Mn<Xt;++Mn)Qt.push(I(ze.charCodeAt(Mn)));for(var Kn=0,Zn=Mt;Kn<Xt;++Kn){var or=Qt[Kn];or=="m"?Qt[Kn]=Zn:Zn=or}for(var br=0,dr=Mt;br<Xt;++br){var Lr=Qt[br];Lr=="1"&&dr=="r"?Qt[br]="n":H.test(Lr)&&(dr=Lr,Lr=="r"&&(Qt[br]="R"))}for(var ai=1,Wr=Qt[0];ai<Xt-1;++ai){var Xi=Qt[ai];Xi=="+"&&Wr=="1"&&Qt[ai+1]=="1"?Qt[ai]="1":Xi==","&&Wr==Qt[ai+1]&&(Wr=="1"||Wr=="n")&&(Qt[ai]=Wr),Wr=Xi}for(var ko=0;ko<Xt;++ko){var Qa=Qt[ko];if(Qa==",")Qt[ko]="N";else if(Qa=="%"){var aa=void 0;for(aa=ko+1;aa<Xt&&Qt[aa]=="%";++aa);for(var _a=ko&&Qt[ko-1]=="!"||aa<Xt&&Qt[aa]=="1"?"1":"N",ba=ko;ba<aa;++ba)Qt[ba]=_a;ko=aa-1}}for(var Pa=0,Yl=Mt;Pa<Xt;++Pa){var qa=Qt[Pa];Yl=="L"&&qa=="1"?Qt[Pa]="L":H.test(qa)&&(Yl=qa)}for(var xa=0;xa<Xt;++xa)if(D.test(Qt[xa])){var hs=void 0;for(hs=xa+1;hs<Xt&&D.test(Qt[hs]);++hs);for(var gi=(xa?Qt[xa-1]:Mt)=="L",Xo=(hs<Xt?Qt[hs]:Mt)=="L",la=gi==Xo?gi?"L":"R":Mt,fa=xa;fa<hs;++fa)Qt[fa]=la;xa=hs-1}for(var ks=[],Dl,Ro=0;Ro<Xt;)if(ue.test(Qt[Ro])){var Pd=Ro;for(++Ro;Ro<Xt&&ue.test(Qt[Ro]);++Ro);ks.push(new ke(0,Pd,Ro))}else{var yl=Ro,PA=ks.length,Xc=mt=="rtl"?1:0;for(++Ro;Ro<Xt&&Qt[Ro]!="L";++Ro);for(var vl=yl;vl<Ro;)if(_e.test(Qt[vl])){yl<vl&&(ks.splice(PA,0,new ke(1,yl,vl)),PA+=Xc);var Cl=vl;for(++vl;vl<Ro&&_e.test(Qt[vl]);++vl);ks.splice(PA,0,new ke(2,Cl,vl)),PA+=Xc,yl=vl}else++vl;yl<Ro&&ks.splice(PA,0,new ke(1,yl,Ro))}return mt=="ltr"&&(ks[0].level==1&&(Dl=ze.match(/^\s+/))&&(ks[0].from=Dl[0].length,ks.unshift(new ke(0,0,Dl[0].length))),ir(ks).level==1&&(Dl=ze.match(/\s+$/))&&(ir(ks).to-=Dl[0].length,ks.push(new ke(0,Xt-Dl[0].length,Xt)))),mt=="rtl"?ks.reverse():ks}}();function ve(A,y){var I=A.order;return I==null&&(I=A.order=oe(A.text,y)),I}var p=[],je=function(A,y,I){if(A.addEventListener)A.addEventListener(y,I,!1);else if(A.attachEvent)A.attachEvent("on"+y,I);else{var B=A._handlers||(A._handlers={});B[y]=(B[y]||p).concat(I)}};function Ye(A,y){return A._handlers&&A._handlers[y]||p}function tt(A,y,I){if(A.removeEventListener)A.removeEventListener(y,I,!1);else if(A.detachEvent)A.detachEvent("on"+y,I);else{var B=A._handlers,D=B&&B[y];if(D){var H=nt(D,I);H>-1&&(B[y]=D.slice(0,H).concat(D.slice(H+1)))}}}function ct(A,y){var I=Ye(A,y);if(I.length)for(var B=Array.prototype.slice.call(arguments,2),D=0;D<I.length;++D)I[D].apply(null,B)}function At(A,y,I){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),ct(A,I||y.type,A,y),Bn(y)||y.codemirrorIgnore}function Gt(A){var y=A._handlers&&A._handlers.cursorActivity;if(y)for(var I=A.curOp.cursorActivityHandlers||(A.curOp.cursorActivityHandlers=[]),B=0;B<y.length;++B)nt(I,y[B])==-1&&I.push(y[B])}function $t(A,y){return Ye(A,y).length>0}function jt(A){A.prototype.on=function(y,I){je(this,y,I)},A.prototype.off=function(y,I){tt(this,y,I)}}function xt(A){A.preventDefault?A.preventDefault():A.returnValue=!1}function Rn(A){A.stopPropagation?A.stopPropagation():A.cancelBubble=!0}function Bn(A){return A.defaultPrevented!=null?A.defaultPrevented:A.returnValue==!1}function fr(A){xt(A),Rn(A)}function Sr(A){return A.target||A.srcElement}function on(A){var y=A.which;return y==null&&(A.button&1?y=1:A.button&2?y=3:A.button&4&&(y=2)),Y&&A.ctrlKey&&y==1&&(y=3),y}var Nn=function(){if(d&&g<9)return!1;var A=me("div");return"draggable"in A||"dragDrop"in A}(),Fn;function Or(A){if(Fn==null){var y=me("span","");De(A,me("span",[y,document.createTextNode("x")])),A.firstChild.offsetHeight!=0&&(Fn=y.offsetWidth<=1&&y.offsetHeight>2&&!(d&&g<8))}var I=Fn?me("span",""):me("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return I.setAttribute("cm-text",""),I}var Er;function Dr(A){if(Er!=null)return Er;var y=De(A,document.createTextNode("AخA")),I=Qe(y,0,1).getBoundingClientRect(),B=Qe(y,1,2).getBoundingClientRect();return xe(A),!I||I.left==I.right?!1:Er=B.right-I.right<3}var ur=`
|
||
|
||
b`.split(/\n/).length!=3?function(A){for(var y=0,I=[],B=A.length;y<=B;){var D=A.indexOf(`
|
||
`,y);D==-1&&(D=A.length);var H=A.slice(y,A.charAt(D-1)=="\r"?D-1:D),ue=H.indexOf("\r");ue!=-1?(I.push(H.slice(0,ue)),y+=ue+1):(I.push(H),y=D+1)}return I}:function(A){return A.split(/\r\n?|\n/)},co=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},Sa=function(){var A=me("div");return"oncopy"in A?!0:(A.setAttribute("oncopy","return;"),typeof A.oncopy=="function")}(),qi=null;function yi(A){if(qi!=null)return qi;var y=De(A,me("span","x")),I=y.getBoundingClientRect(),B=Qe(y,0,1).getBoundingClientRect();return qi=Math.abs(I.left-B.left)>1}var oo={},Mo={};function Ti(A,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),oo[A]=y}function La(A,y){Mo[A]=y}function Ea(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=wr(y,A),A.name=y.name}else{if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(A))return Ea("application/xml");if(typeof A=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(A))return Ea("application/json")}return typeof A=="string"?{name:A}:A||{name:"null"}}function ns(A,y){y=Ea(y);var I=oo[y.name];if(!I)return ns(A,"text/plain");var B=I(A,y);if(Aa.hasOwnProperty(y.name)){var D=Aa[y.name];for(var H in D)D.hasOwnProperty(H)&&(B.hasOwnProperty(H)&&(B["_"+H]=B[H]),B[H]=D[H])}if(B.name=y.name,y.helperType&&(B.helperType=y.helperType),y.modeProps)for(var ue in y.modeProps)B[ue]=y.modeProps[ue];return B}var Aa={};function Al(A,y){var I=Aa.hasOwnProperty(A)?Aa[A]:Aa[A]={};Le(y,I)}function ao(A,y){if(y===!0)return y;if(A.copyState)return A.copyState(y);var I={};for(var B in y){var D=y[B];D instanceof Array&&(D=D.concat([])),I[B]=D}return I}function Pu(A,y){for(var I;A.innerMode&&(I=A.innerMode(y),!(!I||I.mode==A));)y=I.state,A=I.mode;return I||{mode:A,state:y}}function tu(A,y,I){return A.startState?A.startState(y,I):!0}var so=function(A,y,I){this.pos=this.start=0,this.string=A,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=I};so.prototype.eol=function(){return this.pos>=this.string.length},so.prototype.sol=function(){return this.pos==this.lineStart},so.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},so.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},so.prototype.eat=function(A){var y=this.string.charAt(this.pos),I;if(typeof A=="string"?I=y==A:I=y&&(A.test?A.test(y):A(y)),I)return++this.pos,y},so.prototype.eatWhile=function(A){for(var y=this.pos;this.eat(A););return this.pos>y},so.prototype.eatSpace=function(){for(var A=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>A},so.prototype.skipToEnd=function(){this.pos=this.string.length},so.prototype.skipTo=function(A){var y=this.string.indexOf(A,this.pos);if(y>-1)return this.pos=y,!0},so.prototype.backUp=function(A){this.pos-=A},so.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},so.prototype.indentation=function(){return Pe(this.string,null,this.tabSize)-(this.lineStart?Pe(this.string,this.lineStart,this.tabSize):0)},so.prototype.match=function(A,y,I){if(typeof A=="string"){var B=function(ue){return I?ue.toLowerCase():ue},D=this.string.substr(this.pos,A.length);if(B(D)==B(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)}},so.prototype.current=function(){return this.string.slice(this.start,this.pos)},so.prototype.hideFirstChars=function(A,y){this.lineStart+=A;try{return y()}finally{this.lineStart-=A}},so.prototype.lookAhead=function(A){var y=this.lineOracle;return y&&y.lookAhead(A)},so.prototype.baseToken=function(){var A=this.lineOracle;return A&&A.baseToken(this.pos)};function Kr(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 I=A;!I.lines;)for(var B=0;;++B){var D=I.children[B],H=D.chunkSize();if(y<H){I=D;break}y-=H}return I.lines[y]}function Za(A,y,I){var B=[],D=y.line;return A.iter(y.line,I.line+1,function(H){var ue=H.text;D==I.line&&(ue=ue.slice(0,I.ch)),D==y.line&&(ue=ue.slice(y.ch)),B.push(ue),++D}),B}function Ps(A,y,I){var B=[];return A.iter(y,I,function(D){B.push(D.text)}),B}function ia(A,y){var I=y-A.height;if(I)for(var B=A;B;B=B.parent)B.height+=I}function qe(A){if(A.parent==null)return null;for(var y=A.parent,I=nt(y.lines,A),B=y.parent;B;y=B,B=B.parent)for(var D=0;B.children[D]!=y;++D)I+=B.children[D].chunkSize();return I+y.first}function wt(A,y){var I=A.first;e:do{for(var B=0;B<A.children.length;++B){var D=A.children[B],H=D.height;if(y<H){A=D;continue e}y-=H,I+=D.chunkSize()}return I}while(!A.lines);for(var ue=0;ue<A.lines.length;++ue){var _e=A.lines[ue],ke=_e.height;if(y<ke)break;y-=ke}return I+ue}function gn(A,y){return y>=A.first&&y<A.first+A.size}function qn(A,y){return String(A.lineNumberFormatter(y+A.firstLineNumber))}function An(A,y,I){if(I===void 0&&(I=null),!(this instanceof An))return new An(A,y,I);this.line=A,this.ch=y,this.sticky=I}function sr(A,y){return A.line-y.line||A.ch-y.ch}function Pi(A,y){return A.sticky==y.sticky&&sr(A,y)==0}function ho(A){return An(A.line,A.ch)}function Cs(A,y){return sr(A,y)<0?y:A}function Ns(A,y){return sr(A,y)<0?A:y}function vA(A,y){return Math.max(A.first,Math.min(y,A.first+A.size-1))}function ri(A,y){if(y.line<A.first)return An(A.first,0);var I=A.first+A.size-1;return y.line>I?An(I,Kr(A,I).text.length):wi(y,Kr(A,y.line).text.length)}function wi(A,y){var I=A.ch;return I==null||I>y?An(A.line,y):I<0?An(A.line,0):A}function Xa(A,y){for(var I=[],B=0;B<y.length;B++)I[B]=ri(A,y[B]);return I}var Ai=function(A,y){this.state=A,this.lookAhead=y},ca=function(A,y,I,B){this.state=y,this.doc=A,this.line=I,this.maxLookAhead=B||0,this.baseTokens=null,this.baseTokenPos=1};ca.prototype.lookAhead=function(A){var y=this.doc.getLine(this.line+A);return y!=null&&A>this.maxLookAhead&&(this.maxLookAhead=A),y},ca.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}},ca.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ca.fromSaved=function(A,y,I){return y instanceof Ai?new ca(A,ao(A.mode,y.state),I,y.lookAhead):new ca(A,ao(A.mode,y),I)},ca.prototype.save=function(A){var y=A!==!1?ao(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ai(y,this.maxLookAhead):y};function iA(A,y,I,B){var D=[A.state.modeGen],H={};zl(A,y.text,A.doc.mode,I,function(ze,mt){return D.push(ze,mt)},H,B);for(var ue=I.state,_e=function(ze){I.baseTokens=D;var mt=A.state.overlays[ze],Mt=1,Xt=0;I.state=!0,zl(A,y.text,mt.mode,I,function(Qt,Mn){for(var Kn=Mt;Xt<Qt;){var Zn=D[Mt];Zn>Qt&&D.splice(Mt,1,Qt,D[Mt+1],Zn),Mt+=2,Xt=Math.min(Qt,Zn)}if(Mn)if(mt.opaque)D.splice(Kn,Mt-Kn,Qt,"overlay "+Mn),Mt=Kn+2;else for(;Kn<Mt;Kn+=2){var or=D[Kn+1];D[Kn+1]=(or?or+" ":"")+"overlay "+Mn}},H),I.state=ue,I.baseTokens=null,I.baseTokenPos=1},ke=0;ke<A.state.overlays.length;++ke)_e(ke);return{styles:D,classes:H.bgClass||H.textClass?H:null}}function ls(A,y,I){if(!y.styles||y.styles[0]!=A.state.modeGen){var B=Fr(A,qe(y)),D=y.text.length>A.options.maxHighlightLength&&ao(A.doc.mode,B.state),H=iA(A,y,B);D&&(B.state=D),y.stateAfter=B.save(!D),y.styles=H.styles,H.classes?y.styleClasses=H.classes:y.styleClasses&&(y.styleClasses=null),I===A.doc.highlightFrontier&&(A.doc.modeFrontier=Math.max(A.doc.modeFrontier,++A.doc.highlightFrontier))}return y.styles}function Fr(A,y,I){var B=A.doc,D=A.display;if(!B.mode.startState)return new ca(B,!0,y);var H=rs(A,y,I),ue=H>B.first&&Kr(B,H-1).stateAfter,_e=ue?ca.fromSaved(B,ue,H):new ca(B,tu(B.mode),H);return B.iter(H,y,function(ke){Ei(A,ke.text,_e);var ze=_e.line;ke.stateAfter=ze==y-1||ze%5==0||ze>=D.viewFrom&&ze<D.viewTo?_e.save():null,_e.nextLine()}),I&&(B.modeFrontier=_e.line),_e}function Ei(A,y,I,B){var D=A.doc.mode,H=new so(y,A.options.tabSize,I);for(H.start=H.pos=B||0,y==""&&Ja(D,I.state);!H.eol();)Rs(D,H,I.state),H.start=H.pos}function Ja(A,y){if(A.blankLine)return A.blankLine(y);if(A.innerMode){var I=Pu(A,y);if(I.mode.blankLine)return I.mode.blankLine(I.state)}}function Rs(A,y,I,B){for(var D=0;D<10;D++){B&&(B[0]=Pu(A,I).mode);var H=A.token(y,I);if(y.pos>y.start)return H}throw new Error("Mode "+A.name+" failed to advance stream.")}var So=function(A,y,I){this.start=A.start,this.end=A.pos,this.string=A.current(),this.type=y||null,this.state=I};function Ws(A,y,I,B){var D=A.doc,H=D.mode,ue;y=ri(D,y);var _e=Kr(D,y.line),ke=Fr(A,y.line,I),ze=new so(_e.text,A.options.tabSize,ke),mt;for(B&&(mt=[]);(B||ze.pos<y.ch)&&!ze.eol();)ze.start=ze.pos,ue=Rs(H,ze,ke.state),B&&mt.push(new So(ze,ue,ao(D.mode,ke.state)));return B?mt:new So(ze,ue,ke.state)}function hu(A,y){if(A)for(;;){var I=A.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!I)break;A=A.slice(0,I.index)+A.slice(I.index+I[0].length);var B=I[1]?"bgClass":"textClass";y[B]==null?y[B]=I[2]:new RegExp("(?:^|\\s)"+I[2]+"(?:$|\\s)").test(y[B])||(y[B]+=" "+I[2])}return A}function zl(A,y,I,B,D,H,ue){var _e=I.flattenSpans;_e==null&&(_e=A.options.flattenSpans);var ke=0,ze=null,mt=new so(y,A.options.tabSize,B),Mt,Xt=A.options.addModeClass&&[null];for(y==""&&hu(Ja(I,B.state),H);!mt.eol();){if(mt.pos>A.options.maxHighlightLength?(_e=!1,ue&&Ei(A,y,B,mt.pos),mt.pos=y.length,Mt=null):Mt=hu(Rs(I,mt,B.state,Xt),H),Xt){var Qt=Xt[0].name;Qt&&(Mt="m-"+(Mt?Qt+" "+Mt:Qt))}if(!_e||ze!=Mt){for(;ke<mt.start;)ke=Math.min(mt.start,ke+5e3),D(ke,ze);ze=Mt}mt.start=mt.pos}for(;ke<mt.pos;){var Mn=Math.min(mt.pos,ke+5e3);D(Mn,ze),ke=Mn}}function rs(A,y,I){for(var B,D,H=A.doc,ue=I?-1:y-(A.doc.mode.innerMode?1e3:100),_e=y;_e>ue;--_e){if(_e<=H.first)return H.first;var ke=Kr(H,_e-1),ze=ke.stateAfter;if(ze&&(!I||_e+(ze instanceof Ai?ze.lookAhead:0)<=H.modeFrontier))return _e;var mt=Pe(ke.text,null,A.options.tabSize);(D==null||B>mt)&&(D=_e-1,B=mt)}return D}function Vs(A,y){if(A.modeFrontier=Math.min(A.modeFrontier,y),!(A.highlightFrontier<y-10)){for(var I=A.first,B=y-1;B>I;B--){var D=Kr(A,B).stateAfter;if(D&&(!(D instanceof Ai)||B+D.lookAhead<y)){I=B+1;break}}A.highlightFrontier=Math.min(A.highlightFrontier,I)}}var fo=!1,ms=!1;function Ms(){fo=!0}function el(){ms=!0}function Ds(A,y,I){this.marker=A,this.from=y,this.to=I}function El(A,y){if(A)for(var I=0;I<A.length;++I){var B=A[I];if(B.marker==y)return B}}function oA(A,y){for(var I,B=0;B<A.length;++B)A[B]!=y&&(I||(I=[])).push(A[B]);return I}function Vi(A,y,I){var B=I&&window.WeakSet&&(I.markedSpans||(I.markedSpans=new WeakSet));B&&A.markedSpans&&B.has(A.markedSpans)?A.markedSpans.push(y):(A.markedSpans=A.markedSpans?A.markedSpans.concat([y]):[y],B&&B.add(A.markedSpans)),y.marker.attachLine(A)}function nu(A,y,I){var B;if(A)for(var D=0;D<A.length;++D){var H=A[D],ue=H.marker,_e=H.from==null||(ue.inclusiveLeft?H.from<=y:H.from<y);if(_e||H.from==y&&ue.type=="bookmark"&&(!I||!H.marker.insertLeft)){var ke=H.to==null||(ue.inclusiveRight?H.to>=y:H.to>y);(B||(B=[])).push(new Ds(ue,H.from,ke?null:H.to))}}return B}function Ui(A,y,I){var B;if(A)for(var D=0;D<A.length;++D){var H=A[D],ue=H.marker,_e=H.to==null||(ue.inclusiveRight?H.to>=y:H.to>y);if(_e||H.from==y&&ue.type=="bookmark"&&(!I||H.marker.insertLeft)){var ke=H.from==null||(ue.inclusiveLeft?H.from<=y:H.from<y);(B||(B=[])).push(new Ds(ue,ke?null:H.from-y,H.to==null?null:H.to-y))}}return B}function Jr(A,y){if(y.full)return null;var I=gn(A,y.from.line)&&Kr(A,y.from.line).markedSpans,B=gn(A,y.to.line)&&Kr(A,y.to.line).markedSpans;if(!I&&!B)return null;var D=y.from.ch,H=y.to.ch,ue=sr(y.from,y.to)==0,_e=nu(I,D,ue),ke=Ui(B,H,ue),ze=y.text.length==1,mt=ir(y.text).length+(ze?D:0);if(_e)for(var Mt=0;Mt<_e.length;++Mt){var Xt=_e[Mt];if(Xt.to==null){var Qt=El(ke,Xt.marker);Qt?ze&&(Xt.to=Qt.to==null?null:Qt.to+mt):Xt.to=D}}if(ke)for(var Mn=0;Mn<ke.length;++Mn){var Kn=ke[Mn];if(Kn.to!=null&&(Kn.to+=mt),Kn.from==null){var Zn=El(_e,Kn.marker);Zn||(Kn.from=mt,ze&&(_e||(_e=[])).push(Kn))}else Kn.from+=mt,ze&&(_e||(_e=[])).push(Kn)}_e&&(_e=ru(_e)),ke&&ke!=_e&&(ke=ru(ke));var or=[_e];if(!ze){var br=y.text.length-2,dr;if(br>0&&_e)for(var Lr=0;Lr<_e.length;++Lr)_e[Lr].to==null&&(dr||(dr=[])).push(new Ds(_e[Lr].marker,null,null));for(var ai=0;ai<br;++ai)or.push(dr);or.push(ke)}return or}function ru(A){for(var y=0;y<A.length;++y){var I=A[y];I.from!=null&&I.from==I.to&&I.marker.clearWhenEmpty!==!1&&A.splice(y--,1)}return A.length?A:null}function Ni(A,y,I){var B=null;if(A.iter(y.line,I.line+1,function(Qt){if(Qt.markedSpans)for(var Mn=0;Mn<Qt.markedSpans.length;++Mn){var Kn=Qt.markedSpans[Mn].marker;Kn.readOnly&&(!B||nt(B,Kn)==-1)&&(B||(B=[])).push(Kn)}}),!B)return null;for(var D=[{from:y,to:I}],H=0;H<B.length;++H)for(var ue=B[H],_e=ue.find(0),ke=0;ke<D.length;++ke){var ze=D[ke];if(!(sr(ze.to,_e.from)<0||sr(ze.from,_e.to)>0)){var mt=[ke,1],Mt=sr(ze.from,_e.from),Xt=sr(ze.to,_e.to);(Mt<0||!ue.inclusiveLeft&&!Mt)&&mt.push({from:ze.from,to:_e.from}),(Xt>0||!ue.inclusiveRight&&!Xt)&&mt.push({from:_e.to,to:ze.to}),D.splice.apply(D,mt),ke+=mt.length-3}}return D}function lo(A){var y=A.markedSpans;if(y){for(var I=0;I<y.length;++I)y[I].marker.detachLine(A);A.markedSpans=null}}function Ri(A,y){if(y){for(var I=0;I<y.length;++I)y[I].marker.attachLine(A);A.markedSpans=y}}function J(A){return A.inclusiveLeft?-1:0}function Oe(A){return A.inclusiveRight?1:0}function ot(A,y){var I=A.lines.length-y.lines.length;if(I!=0)return I;var B=A.find(),D=y.find(),H=sr(B.from,D.from)||J(A)-J(y);if(H)return-H;var ue=sr(B.to,D.to)||Oe(A)-Oe(y);return ue||y.id-A.id}function Vt(A,y){var I=ms&&A.markedSpans,B;if(I)for(var D=void 0,H=0;H<I.length;++H)D=I[H],D.marker.collapsed&&(y?D.from:D.to)==null&&(!B||ot(B,D.marker)<0)&&(B=D.marker);return B}function Ir(A){return Vt(A,!0)}function Yn(A){return Vt(A,!1)}function si(A,y){var I=ms&&A.markedSpans,B;if(I)for(var D=0;D<I.length;++D){var H=I[D];H.marker.collapsed&&(H.from==null||H.from<y)&&(H.to==null||H.to>y)&&(!B||ot(B,H.marker)<0)&&(B=H.marker)}return B}function ci(A,y,I,B,D){var H=Kr(A,y),ue=ms&&H.markedSpans;if(ue)for(var _e=0;_e<ue.length;++_e){var ke=ue[_e];if(ke.marker.collapsed){var ze=ke.marker.find(0),mt=sr(ze.from,I)||J(ke.marker)-J(D),Mt=sr(ze.to,B)||Oe(ke.marker)-Oe(D);if(!(mt>=0&&Mt<=0||mt<=0&&Mt>=0)&&(mt<=0&&(ke.marker.inclusiveRight&&D.inclusiveLeft?sr(ze.to,I)>=0:sr(ze.to,I)>0)||mt>=0&&(ke.marker.inclusiveRight&&D.inclusiveLeft?sr(ze.from,B)<=0:sr(ze.from,B)<0)))return!0}}}function vr(A){for(var y;y=Ir(A);)A=y.find(-1,!0).line;return A}function kr(A){for(var y;y=Yn(A);)A=y.find(1,!0).line;return A}function vi(A){for(var y,I;y=Yn(A);)A=y.find(1,!0).line,(I||(I=[])).push(A);return I}function Eo(A,y){var I=Kr(A,y),B=vr(I);return I==B?y:qe(B)}function ki(A,y){if(y>A.lastLine())return y;var I=Kr(A,y),B;if(!qr(A,I))return y;for(;B=Yn(I);)I=B.find(1,!0).line;return qe(I)+1}function qr(A,y){var I=ms&&y.markedSpans;if(I){for(var B=void 0,D=0;D<I.length;++D)if(B=I[D],!!B.marker.collapsed){if(B.from==null)return!0;if(!B.marker.widgetNode&&B.from==0&&B.marker.inclusiveLeft&&Hi(A,y,B))return!0}}}function Hi(A,y,I){if(I.to==null){var B=I.marker.find(1,!0);return Hi(A,B.line,El(B.line.markedSpans,I.marker))}if(I.marker.inclusiveRight&&I.to==y.text.length)return!0;for(var D=void 0,H=0;H<y.markedSpans.length;++H)if(D=y.markedSpans[H],D.marker.collapsed&&!D.marker.widgetNode&&D.from==I.to&&(D.to==null||D.to!=I.from)&&(D.marker.inclusiveLeft||I.marker.inclusiveRight)&&Hi(A,y,D))return!0}function Zi(A){A=vr(A);for(var y=0,I=A.parent,B=0;B<I.lines.length;++B){var D=I.lines[B];if(D==A)break;y+=D.height}for(var H=I.parent;H;I=H,H=I.parent)for(var ue=0;ue<H.children.length;++ue){var _e=H.children[ue];if(_e==I)break;y+=_e.height}return y}function us(A){if(A.height==0)return 0;for(var y=A.text.length,I,B=A;I=Ir(B);){var D=I.find(0,!0);B=D.from.line,y+=D.from.ch-D.to.ch}for(B=A;I=Yn(B);){var H=I.find(0,!0);y-=B.text.length-H.from.ch,B=H.to.line,y+=B.text.length-H.to.ch}return y}function ya(A){var y=A.display,I=A.doc;y.maxLine=Kr(I,I.first),y.maxLineLength=us(y.maxLine),y.maxLineChanged=!0,I.iter(function(B){var D=us(B);D>y.maxLineLength&&(y.maxLineLength=D,y.maxLine=B)})}var Ua=function(A,y,I){this.text=A,Ri(this,y),this.height=I?I(this):1};Ua.prototype.lineNo=function(){return qe(this)},jt(Ua);function fu(A,y,I,B){A.text=y,A.stateAfter&&(A.stateAfter=null),A.styles&&(A.styles=null),A.order!=null&&(A.order=null),lo(A),Ri(A,I);var D=B?B(A):1;D!=A.height&&ia(A,D)}function Hs(A){A.parent=null,lo(A)}var dc={},Ba={};function cl(A,y){if(!A||/^\s*$/.test(A))return null;var I=y.addModeClass?Ba:dc;return I[A]||(I[A]=A.replace(/\S+/g,"cm-$&"))}function ld(A,y){var I=at("span",null,null,b?"padding-right: .1px":null),B={pre:at("pre",[I],"CodeMirror-line"),content:I,col:0,pos:0,cm:A,trailingSpace:!1,splitSpaces:A.getOption("lineWrapping")};y.measure={};for(var D=0;D<=(y.rest?y.rest.length:0);D++){var H=D?y.rest[D-1]:y.line,ue=void 0;B.pos=0,B.addToken=Du,Dr(A.display.measure)&&(ue=ve(H,A.doc.direction))&&(B.addToken=Ss(B.addToken,ue)),B.map=[];var _e=y!=A.display.externalMeasured&&qe(H);ud(H,B,ls(A,H,_e)),H.styleClasses&&(H.styleClasses.bgClass&&(B.bgClass=Te(H.styleClasses.bgClass,B.bgClass||"")),H.styleClasses.textClass&&(B.textClass=Te(H.styleClasses.textClass,B.textClass||""))),B.map.length==0&&B.map.push(0,0,B.content.appendChild(Or(A.display.measure))),D==0?(y.measure.map=B.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(B.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(b){var ke=B.content.lastChild;(/\bcm-tab\b/.test(ke.className)||ke.querySelector&&ke.querySelector(".cm-tab"))&&(B.content.className="cm-tab-wrap-hack")}return ct(A,"renderLine",A,y.line,B.pre),B.pre.className&&(B.textClass=Te(B.pre.className,B.textClass||"")),B}function Ru(A){var y=me("span","•","cm-invalidchar");return y.title="\\u"+A.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Du(A,y,I,B,D,H,ue){if(y){var _e=A.splitSpaces?bh(y,A.trailingSpace):y,ke=A.cm.state.specialChars,ze=!1,mt;if(!ke.test(y))A.col+=y.length,mt=document.createTextNode(_e),A.map.push(A.pos,A.pos+y.length,mt),d&&g<9&&(ze=!0),A.pos+=y.length;else{mt=document.createDocumentFragment();for(var Mt=0;;){ke.lastIndex=Mt;var Xt=ke.exec(y),Qt=Xt?Xt.index-Mt:y.length-Mt;if(Qt){var Mn=document.createTextNode(_e.slice(Mt,Mt+Qt));d&&g<9?mt.appendChild(me("span",[Mn])):mt.appendChild(Mn),A.map.push(A.pos,A.pos+Qt,Mn),A.col+=Qt,A.pos+=Qt}if(!Xt)break;Mt+=Qt+1;var Kn=void 0;if(Xt[0]==" "){var Zn=A.cm.options.tabSize,or=Zn-A.col%Zn;Kn=mt.appendChild(me("span",nn(or),"cm-tab")),Kn.setAttribute("role","presentation"),Kn.setAttribute("cm-text"," "),A.col+=or}else Xt[0]=="\r"||Xt[0]==`
|
||
`?(Kn=mt.appendChild(me("span",Xt[0]=="\r"?"␍":"","cm-invalidchar")),Kn.setAttribute("cm-text",Xt[0]),A.col+=1):(Kn=A.cm.options.specialCharPlaceholder(Xt[0]),Kn.setAttribute("cm-text",Xt[0]),d&&g<9?mt.appendChild(me("span",[Kn])):mt.appendChild(Kn),A.col+=1);A.map.push(A.pos,A.pos+1,Kn),A.pos++}}if(A.trailingSpace=_e.charCodeAt(y.length-1)==32,I||B||D||ze||H||ue){var br=I||"";B&&(br+=B),D&&(br+=D);var dr=me("span",[mt],br,H);if(ue)for(var Lr in ue)ue.hasOwnProperty(Lr)&&Lr!="style"&&Lr!="class"&&dr.setAttribute(Lr,ue[Lr]);return A.content.appendChild(dr)}A.content.appendChild(mt)}}function bh(A,y){if(A.length>1&&!/ /.test(A))return A;for(var I=y,B="",D=0;D<A.length;D++){var H=A.charAt(D);H==" "&&I&&(D==A.length-1||A.charCodeAt(D+1)==32)&&(H=" "),B+=H,I=H==" "}return B}function Ss(A,y){return function(I,B,D,H,ue,_e,ke){D=D?D+" cm-force-border":"cm-force-border";for(var ze=I.pos,mt=ze+B.length;;){for(var Mt=void 0,Xt=0;Xt<y.length&&(Mt=y[Xt],!(Mt.to>ze&&Mt.from<=ze));Xt++);if(Mt.to>=mt)return A(I,B,D,H,ue,_e,ke);A(I,B.slice(0,Mt.to-ze),D,H,null,_e,ke),H=null,B=B.slice(Mt.to-ze),ze=Mt.to}}}function Ku(A,y,I,B){var D=!B&&I.widgetNode;D&&A.map.push(A.pos,A.pos+y,D),!B&&A.cm.display.input.needsContentAttribute&&(D||(D=A.content.appendChild(document.createElement("span"))),D.setAttribute("cm-marker",I.id)),D&&(A.cm.display.input.setUneditable(D),A.content.appendChild(D)),A.pos+=y,A.trailingSpace=!1}function ud(A,y,I){var B=A.markedSpans,D=A.text,H=0;if(!B){for(var ue=1;ue<I.length;ue+=2)y.addToken(y,D.slice(H,H=I[ue]),cl(I[ue+1],y.cm.options));return}for(var _e=D.length,ke=0,ze=1,mt="",Mt,Xt,Qt=0,Mn,Kn,Zn,or,br;;){if(Qt==ke){Mn=Kn=Zn=Xt="",br=null,or=null,Qt=1/0;for(var dr=[],Lr=void 0,ai=0;ai<B.length;++ai){var Wr=B[ai],Xi=Wr.marker;if(Xi.type=="bookmark"&&Wr.from==ke&&Xi.widgetNode)dr.push(Xi);else if(Wr.from<=ke&&(Wr.to==null||Wr.to>ke||Xi.collapsed&&Wr.to==ke&&Wr.from==ke)){if(Wr.to!=null&&Wr.to!=ke&&Qt>Wr.to&&(Qt=Wr.to,Kn=""),Xi.className&&(Mn+=" "+Xi.className),Xi.css&&(Xt=(Xt?Xt+";":"")+Xi.css),Xi.startStyle&&Wr.from==ke&&(Zn+=" "+Xi.startStyle),Xi.endStyle&&Wr.to==Qt&&(Lr||(Lr=[])).push(Xi.endStyle,Wr.to),Xi.title&&((br||(br={})).title=Xi.title),Xi.attributes)for(var ko in Xi.attributes)(br||(br={}))[ko]=Xi.attributes[ko];Xi.collapsed&&(!or||ot(or.marker,Xi)<0)&&(or=Wr)}else Wr.from>ke&&Qt>Wr.from&&(Qt=Wr.from)}if(Lr)for(var Qa=0;Qa<Lr.length;Qa+=2)Lr[Qa+1]==Qt&&(Kn+=" "+Lr[Qa]);if(!or||or.from==ke)for(var aa=0;aa<dr.length;++aa)Ku(y,0,dr[aa]);if(or&&(or.from||0)==ke){if(Ku(y,(or.to==null?_e+1:or.to)-ke,or.marker,or.from==null),or.to==null)return;or.to==ke&&(or=!1)}}if(ke>=_e)break;for(var _a=Math.min(_e,Qt);;){if(mt){var ba=ke+mt.length;if(!or){var Pa=ba>_a?mt.slice(0,_a-ke):mt;y.addToken(y,Pa,Mt?Mt+Mn:Mn,Zn,ke+Pa.length==Qt?Kn:"",Xt,br)}if(ba>=_a){mt=mt.slice(_a-ke),ke=_a;break}ke=ba,Zn=""}mt=D.slice(H,H=I[ze++]),Mt=cl(I[ze++],y.cm.options)}}}function gp(A,y,I){this.line=y,this.rest=vi(y),this.size=this.rest?qe(ir(this.rest))-I+1:1,this.node=this.text=null,this.hidden=qr(A,y)}function sA(A,y,I){for(var B=[],D,H=y;H<I;H=D){var ue=new gp(A.doc,Kr(A.doc,H),H);D=H+ue.size,B.push(ue)}return B}var qd=null;function Fc(A){qd?qd.ops.push(A):A.ownsGroup=qd={ops:[A],delayedCallbacks:[]}}function yp(A){var y=A.delayedCallbacks,I=0;do{for(;I<y.length;I++)y[I].call(null);for(var B=0;B<A.ops.length;B++){var D=A.ops[B];if(D.cursorActivityHandlers)for(;D.cursorActivityCalled<D.cursorActivityHandlers.length;)D.cursorActivityHandlers[D.cursorActivityCalled++].call(null,D.cm)}}while(I<y.length)}function Pf(A,y){var I=A.ownsGroup;if(I)try{yp(I)}finally{qd=null,y(I)}}var hc=null;function Zs(A,y){var I=Ye(A,y);if(I.length){var B=Array.prototype.slice.call(arguments,2),D;qd?D=qd.delayedCallbacks:hc?D=hc:(D=hc=[],setTimeout(xh,0));for(var H=function(_e){D.push(function(){return I[_e].apply(null,B)})},ue=0;ue<I.length;++ue)H(ue)}}function xh(){var A=hc;hc=null;for(var y=0;y<A.length;++y)A[y]()}function Jh(A,y,I,B){for(var D=0;D<y.changes.length;D++){var H=y.changes[D];H=="text"?fc(A,y):H=="gutter"?Mh(A,y,I,B):H=="class"?wh(A,y):H=="widget"&&dd(A,y,B)}y.changes=null}function Ad(A){return A.node==A.text&&(A.node=me("div",null,null,"position: relative"),A.text.parentNode&&A.text.parentNode.replaceChild(A.node,A.text),A.node.appendChild(A.text),d&&g<8&&(A.node.style.zIndex=2)),A.node}function ef(A,y){var I=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(I&&(I+=" CodeMirror-linebackground"),y.background)I?y.background.className=I:(y.background.parentNode.removeChild(y.background),y.background=null);else if(I){var B=Ad(y);y.background=B.insertBefore(me("div",null,I),B.firstChild),A.display.input.setUneditable(y.background)}}function cd(A,y){var I=A.display.externalMeasured;return I&&I.line==y.line?(A.display.externalMeasured=null,y.measure=I.measure,I.built):ld(A,y)}function fc(A,y){var I=y.text.className,B=cd(A,y);y.text==y.node&&(y.node=B.pre),y.text.parentNode.replaceChild(B.pre,y.text),y.text=B.pre,B.bgClass!=y.bgClass||B.textClass!=y.textClass?(y.bgClass=B.bgClass,y.textClass=B.textClass,wh(A,y)):I&&(y.text.className=I)}function wh(A,y){ef(A,y),y.line.wrapClass?Ad(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var I=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=I||""}function Mh(A,y,I,B){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 D=Ad(y);y.gutterBackground=me("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(A.options.fixedGutter?B.fixedPos:-B.gutterTotalWidth)+"px; width: "+B.gutterTotalWidth+"px"),A.display.input.setUneditable(y.gutterBackground),D.insertBefore(y.gutterBackground,y.text)}var H=y.line.gutterMarkers;if(A.options.lineNumbers||H){var ue=Ad(y),_e=y.gutter=me("div",null,"CodeMirror-gutter-wrapper","left: "+(A.options.fixedGutter?B.fixedPos:-B.gutterTotalWidth)+"px");if(_e.setAttribute("aria-hidden","true"),A.display.input.setUneditable(_e),ue.insertBefore(_e,y.text),y.line.gutterClass&&(_e.className+=" "+y.line.gutterClass),A.options.lineNumbers&&(!H||!H["CodeMirror-linenumbers"])&&(y.lineNumber=_e.appendChild(me("div",qn(A.options,I),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+B.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+A.display.lineNumInnerWidth+"px"))),H)for(var ke=0;ke<A.display.gutterSpecs.length;++ke){var ze=A.display.gutterSpecs[ke].className,mt=H.hasOwnProperty(ze)&&H[ze];mt&&_e.appendChild(me("div",[mt],"CodeMirror-gutter-elt","left: "+B.gutterLeft[ze]+"px; width: "+B.gutterWidth[ze]+"px"))}}}function dd(A,y,I){y.alignable&&(y.alignable=null);for(var B=Me("CodeMirror-linewidget"),D=y.node.firstChild,H=void 0;D;D=H)H=D.nextSibling,B.test(D.className)&&y.node.removeChild(D);Lc(A,y,I)}function am(A,y,I,B){var D=cd(A,y);return y.text=y.node=D.pre,D.bgClass&&(y.bgClass=D.bgClass),D.textClass&&(y.textClass=D.textClass),wh(A,y),Mh(A,y,I,B),Lc(A,y,B),y.node}function Lc(A,y,I){if(pu(A,y.line,y,I,!0),y.rest)for(var B=0;B<y.rest.length;B++)pu(A,y.rest[B],y,I,!1)}function pu(A,y,I,B,D){if(y.widgets)for(var H=Ad(I),ue=0,_e=y.widgets;ue<_e.length;++ue){var ke=_e[ue],ze=me("div",[ke.node],"CodeMirror-linewidget"+(ke.className?" "+ke.className:""));ke.handleMouseEvents||ze.setAttribute("cm-ignore-events","true"),Sh(ke,ze,I,B),A.display.input.setUneditable(ze),D&&ke.above?H.insertBefore(ze,I.gutter||I.text):H.appendChild(ze),Zs(ke,"redraw")}}function Sh(A,y,I,B){if(A.noHScroll){(I.alignable||(I.alignable=[])).push(y);var D=B.wrapperWidth;y.style.left=B.fixedPos+"px",A.coverGutter||(D-=B.gutterTotalWidth,y.style.paddingLeft=B.gutterTotalWidth+"px"),y.style.width=D+"px"}A.coverGutter&&(y.style.zIndex=5,y.style.position="relative",A.noHScroll||(y.style.marginLeft=-B.gutterTotalWidth+"px"))}function mu(A){if(A.height!=null)return A.height;var y=A.doc.cm;if(!y)return 0;if(!He(document.body,A.node)){var I="position: relative;";A.coverGutter&&(I+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),A.noHScroll&&(I+="width: "+y.display.wrapper.clientWidth+"px;"),De(y.display.measure,me("div",[A.node],null,I))}return A.height=A.node.parentNode.offsetHeight}function aA(A,y){for(var I=Sr(y);I!=A.wrapper;I=I.parentNode)if(!I||I.nodeType==1&&I.getAttribute("cm-ignore-events")=="true"||I.parentNode==A.sizer&&I!=A.mover)return!0}function Uc(A){return A.lineSpace.offsetTop}function Yd(A){return A.mover.offsetHeight-A.lineSpace.offsetHeight}function tf(A){if(A.cachedPaddingH)return A.cachedPaddingH;var y=De(A.measure,me("pre","x","CodeMirror-line-like")),I=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,B={left:parseInt(I.paddingLeft),right:parseInt(I.paddingRight)};return!isNaN(B.left)&&!isNaN(B.right)&&(A.cachedPaddingH=B),B}function iu(A){return _t-A.display.nativeBarWidth}function Bl(A){return A.display.scroller.clientWidth-iu(A)-A.display.barWidth}function GA(A){return A.display.scroller.clientHeight-iu(A)-A.display.barHeight}function zc(A,y,I){var B=A.options.lineWrapping,D=B&&Bl(A);if(!y.measure.heights||B&&y.measure.width!=D){var H=y.measure.heights=[];if(B){y.measure.width=D;for(var ue=y.text.firstChild.getClientRects(),_e=0;_e<ue.length-1;_e++){var ke=ue[_e],ze=ue[_e+1];Math.abs(ke.bottom-ze.bottom)>2&&H.push((ke.bottom+ze.top)/2-I.top)}}H.push(I.bottom-I.top)}}function nf(A,y,I){if(A.line==y)return{map:A.measure.map,cache:A.measure.cache};if(A.rest){for(var B=0;B<A.rest.length;B++)if(A.rest[B]==y)return{map:A.measure.maps[B],cache:A.measure.caches[B]};for(var D=0;D<A.rest.length;D++)if(qe(A.rest[D])>I)return{map:A.measure.maps[D],cache:A.measure.caches[D],before:!0}}}function Rf(A,y){y=vr(y);var I=qe(y),B=A.display.externalMeasured=new gp(A.doc,y,I);B.lineN=I;var D=B.built=ld(A,B);return B.text=D.pre,De(A.display.lineMeasure,D.pre),B}function hd(A,y,I,B){return Ol(A,tl(A,y),I,B)}function CA(A,y){if(y>=A.display.viewFrom&&y<A.display.viewTo)return A.display.view[lA(A,y)];var I=A.display.externalMeasured;if(I&&y>=I.lineN&&y<I.lineN+I.size)return I}function tl(A,y){var I=qe(y),B=CA(A,I);B&&!B.text?B=null:B&&B.changes&&(Jh(A,B,I,YA(A)),A.curOp.forceUpdate=!0),B||(B=Rf(A,y));var D=nf(B,y,I);return{line:y,view:B,rect:null,map:D.map,cache:D.cache,before:D.before,hasHeights:!1}}function Ol(A,y,I,B,D){y.before&&(I=-1);var H=I+(B||""),ue;return y.cache.hasOwnProperty(H)?ue=y.cache[H]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(zc(A,y.view,y.rect),y.hasHeights=!0),ue=jc(A,y,I,B),ue.bogus||(y.cache[H]=ue)),{left:ue.left,right:ue.right,top:D?ue.rtop:ue.top,bottom:D?ue.rbottom:ue.bottom}}var $o={left:0,right:0,top:0,bottom:0};function Eh(A,y,I){for(var B,D,H,ue,_e,ke,ze=0;ze<A.length;ze+=3)if(_e=A[ze],ke=A[ze+1],y<_e?(D=0,H=1,ue="left"):y<ke?(D=y-_e,H=D+1):(ze==A.length-3||y==ke&&A[ze+3]>y)&&(H=ke-_e,D=H-1,y>=ke&&(ue="right")),D!=null){if(B=A[ze+2],_e==ke&&I==(B.insertLeft?"left":"right")&&(ue=I),I=="left"&&D==0)for(;ze&&A[ze-2]==A[ze-3]&&A[ze-1].insertLeft;)B=A[(ze-=3)+2],ue="left";if(I=="right"&&D==ke-_e)for(;ze<A.length-3&&A[ze+3]==A[ze+4]&&!A[ze+5].insertLeft;)B=A[(ze+=3)+2],ue="right";break}return{node:B,start:D,end:H,collapse:ue,coverStart:_e,coverEnd:ke}}function lm(A,y){var I=$o;if(y=="left")for(var B=0;B<A.length&&(I=A[B]).left==I.right;B++);else for(var D=A.length-1;D>=0&&(I=A[D]).left==I.right;D--);return I}function jc(A,y,I,B){var D=Eh(y.map,I,B),H=D.node,ue=D.start,_e=D.end,ke=D.collapse,ze;if(H.nodeType==3){for(var mt=0;mt<4;mt++){for(;ue&&et(y.line.text.charAt(D.coverStart+ue));)--ue;for(;D.coverStart+_e<D.coverEnd&&et(y.line.text.charAt(D.coverStart+_e));)++_e;if(d&&g<9&&ue==0&&_e==D.coverEnd-D.coverStart?ze=H.parentNode.getBoundingClientRect():ze=lm(Qe(H,ue,_e).getClientRects(),B),ze.left||ze.right||ue==0)break;_e=ue,ue=ue-1,ke="right"}d&&g<11&&(ze=Fu(A.display.measure,ze))}else{ue>0&&(ke=B="right");var Mt;A.options.lineWrapping&&(Mt=H.getClientRects()).length>1?ze=Mt[B=="right"?Mt.length-1:0]:ze=H.getBoundingClientRect()}if(d&&g<9&&!ue&&(!ze||!ze.left&&!ze.right)){var Xt=H.parentNode.getClientRects()[0];Xt?ze={left:Xt.left,right:Xt.left+Wi(A.display),top:Xt.top,bottom:Xt.bottom}:ze=$o}for(var Qt=ze.top-y.rect.top,Mn=ze.bottom-y.rect.top,Kn=(Qt+Mn)/2,Zn=y.view.measure.heights,or=0;or<Zn.length-1&&!(Kn<Zn[or]);or++);var br=or?Zn[or-1]:0,dr=Zn[or],Lr={left:(ke=="right"?ze.right:ze.left)-y.rect.left,right:(ke=="left"?ze.left:ze.right)-y.rect.left,top:br,bottom:dr};return!ze.left&&!ze.right&&(Lr.bogus=!0),A.options.singleCursorHeightPerLine||(Lr.rtop=Qt,Lr.rbottom=Mn),Lr}function Fu(A,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!yi(A))return y;var I=screen.logicalXDPI/screen.deviceXDPI,B=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*I,right:y.right*I,top:y.top*B,bottom:y.bottom*B}}function $d(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 Vd(A){A.display.externalMeasure=null,xe(A.display.lineMeasure);for(var y=0;y<A.display.view.length;y++)$d(A.display.view[y])}function pc(A){Vd(A),A.display.cachedCharWidth=A.display.cachedTextHeight=A.display.cachedPaddingH=null,A.options.lineWrapping||(A.display.maxLineChanged=!0),A.display.lineNumChars=null}function Hd(A){return S&&re?-(A.body.getBoundingClientRect().left-parseInt(getComputedStyle(A.body).marginLeft)):A.defaultView.pageXOffset||(A.documentElement||A.body).scrollLeft}function rf(A){return S&&re?-(A.body.getBoundingClientRect().top-parseInt(getComputedStyle(A.body).marginTop)):A.defaultView.pageYOffset||(A.documentElement||A.body).scrollTop}function mc(A){var y=vr(A),I=y.widgets,B=0;if(I)for(var D=0;D<I.length;++D)I[D].above&&(B+=mu(I[D]));return B}function gu(A,y,I,B,D){if(!D){var H=mc(y);I.top+=H,I.bottom+=H}if(B=="line")return I;B||(B="local");var ue=Zi(y);if(B=="local"?ue+=Uc(A.display):ue-=A.display.viewOffset,B=="page"||B=="window"){var _e=A.display.lineSpace.getBoundingClientRect();ue+=_e.top+(B=="window"?0:rf(yt(A)));var ke=_e.left+(B=="window"?0:Hd(yt(A)));I.left+=ke,I.right+=ke}return I.top+=ue,I.bottom+=ue,I}function Ht(A,y,I){if(I=="div")return y;var B=y.left,D=y.top;if(I=="page")B-=Hd(yt(A)),D-=rf(yt(A));else if(I=="local"||!I){var H=A.display.sizer.getBoundingClientRect();B+=H.left,D+=H.top}var ue=A.display.lineSpace.getBoundingClientRect();return{left:B-ue.left,top:D-ue.top}}function Pn(A,y,I,B,D){return B||(B=Kr(A.doc,y.line)),gu(A,B,hd(A,B,y.ch,D),I)}function an(A,y,I,B,D,H){B=B||Kr(A.doc,y.line),D||(D=tl(A,B));function ue(Mn,Kn){var Zn=Ol(A,D,Mn,Kn?"right":"left",H);return Kn?Zn.left=Zn.right:Zn.right=Zn.left,gu(A,B,Zn,I)}var _e=ve(B,A.doc.direction),ke=y.ch,ze=y.sticky;if(ke>=B.text.length?(ke=B.text.length,ze="before"):ke<=0&&(ke=0,ze="after"),!_e)return ue(ze=="before"?ke-1:ke,ze=="before");function mt(Mn,Kn,Zn){var or=_e[Kn],br=or.level==1;return ue(Zn?Mn-1:Mn,br!=Zn)}var Mt=Be(_e,ke,ze),Xt=er,Qt=mt(ke,Mt,ze=="before");return Xt!=null&&(Qt.other=mt(ke,Xt,ze!="before")),Qt}function Ur(A,y){var I=0;y=ri(A.doc,y),A.options.lineWrapping||(I=Wi(A.display)*y.ch);var B=Kr(A.doc,y.line),D=Zi(B)+Uc(A.display);return{left:I,right:I,top:D,bottom:D+B.height}}function Ci(A,y,I,B,D){var H=An(A,y,I);return H.xRel=D,B&&(H.outside=B),H}function _o(A,y,I){var B=A.doc;if(I+=A.display.viewOffset,I<0)return Ci(B.first,0,null,-1,-1);var D=wt(B,I),H=B.first+B.size-1;if(D>H)return Ci(B.first+B.size-1,Kr(B,H).text.length,null,1,1);y<0&&(y=0);for(var ue=Kr(B,D);;){var _e=vp(A,ue,D,y,I),ke=si(ue,_e.ch+(_e.xRel>0||_e.outside>0?1:0));if(!ke)return _e;var ze=ke.find(1);if(ze.line==D)return ze;ue=Kr(B,D=ze.line)}}function oa(A,y,I,B){B-=mc(y);var D=y.text.length,H=Yt(function(ue){return Ol(A,I,ue-1).bottom<=B},D,0);return D=Yt(function(ue){return Ol(A,I,ue).top>B},H,D),{begin:H,end:D}}function Vo(A,y,I,B){I||(I=tl(A,y));var D=gu(A,y,Ol(A,I,B),"line").top;return oa(A,y,I,D)}function QA(A,y,I,B){return A.bottom<=I?!1:A.top>I?!0:(B?A.left:A.right)>y}function vp(A,y,I,B,D){D-=Zi(y);var H=tl(A,y),ue=mc(y),_e=0,ke=y.text.length,ze=!0,mt=ve(y,A.doc.direction);if(mt){var Mt=(A.options.lineWrapping?yu:Il)(A,y,I,H,mt,B,D);ze=Mt.level!=1,_e=ze?Mt.from:Mt.to-1,ke=ze?Mt.to:Mt.from-1}var Xt=null,Qt=null,Mn=Yt(function(ai){var Wr=Ol(A,H,ai);return Wr.top+=ue,Wr.bottom+=ue,QA(Wr,B,D,!1)?(Wr.top<=D&&Wr.left<=B&&(Xt=ai,Qt=Wr),!0):!1},_e,ke),Kn,Zn,or=!1;if(Qt){var br=B-Qt.left<Qt.right-B,dr=br==ze;Mn=Xt+(dr?0:1),Zn=dr?"after":"before",Kn=br?Qt.left:Qt.right}else{!ze&&(Mn==ke||Mn==_e)&&Mn++,Zn=Mn==0?"after":Mn==y.text.length?"before":Ol(A,H,Mn-(ze?1:0)).bottom+ue<=D==ze?"after":"before";var Lr=an(A,An(I,Mn,Zn),"line",y,H);Kn=Lr.left,or=D<Lr.top?-1:D>=Lr.bottom?1:0}return Mn=St(y.text,Mn,1),Ci(I,Mn,Zn,or,B-Kn)}function Il(A,y,I,B,D,H,ue){var _e=Yt(function(Mt){var Xt=D[Mt],Qt=Xt.level!=1;return QA(an(A,An(I,Qt?Xt.to:Xt.from,Qt?"before":"after"),"line",y,B),H,ue,!0)},0,D.length-1),ke=D[_e];if(_e>0){var ze=ke.level!=1,mt=an(A,An(I,ze?ke.from:ke.to,ze?"after":"before"),"line",y,B);QA(mt,H,ue,!0)&&mt.top>ue&&(ke=D[_e-1])}return ke}function yu(A,y,I,B,D,H,ue){var _e=oa(A,y,B,ue),ke=_e.begin,ze=_e.end;/\s/.test(y.text.charAt(ze-1))&&ze--;for(var mt=null,Mt=null,Xt=0;Xt<D.length;Xt++){var Qt=D[Xt];if(!(Qt.from>=ze||Qt.to<=ke)){var Mn=Qt.level!=1,Kn=Ol(A,B,Mn?Math.min(ze,Qt.to)-1:Math.max(ke,Qt.from)).right,Zn=Kn<H?H-Kn+1e9:Kn-H;(!mt||Mt>Zn)&&(mt=Qt,Mt=Zn)}}return mt||(mt=D[D.length-1]),mt.from<ke&&(mt={from:ke,to:mt.to,level:mt.level}),mt.to>ze&&(mt={from:mt.from,to:ze,level:mt.level}),mt}var qA;function kl(A){if(A.cachedTextHeight!=null)return A.cachedTextHeight;if(qA==null){qA=me("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)qA.appendChild(document.createTextNode("x")),qA.appendChild(me("br"));qA.appendChild(document.createTextNode("x"))}De(A.measure,qA);var I=qA.offsetHeight/50;return I>3&&(A.cachedTextHeight=I),xe(A.measure),I||1}function Wi(A){if(A.cachedCharWidth!=null)return A.cachedCharWidth;var y=me("span","xxxxxxxxxx"),I=me("pre",[y],"CodeMirror-line-like");De(A.measure,I);var B=y.getBoundingClientRect(),D=(B.right-B.left)/10;return D>2&&(A.cachedCharWidth=D),D||10}function YA(A){for(var y=A.display,I={},B={},D=y.gutters.clientLeft,H=y.gutters.firstChild,ue=0;H;H=H.nextSibling,++ue){var _e=A.display.gutterSpecs[ue].className;I[_e]=H.offsetLeft+H.clientLeft+D,B[_e]=H.clientWidth}return{fixedPos:Uo(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:I,gutterWidth:B,wrapperWidth:y.wrapper.clientWidth}}function Uo(A){return A.scroller.getBoundingClientRect().left-A.sizer.getBoundingClientRect().left}function Nc(A){var y=kl(A.display),I=A.options.lineWrapping,B=I&&Math.max(5,A.display.scroller.clientWidth/Wi(A.display)-3);return function(D){if(qr(A.doc,D))return 0;var H=0;if(D.widgets)for(var ue=0;ue<D.widgets.length;ue++)D.widgets[ue].height&&(H+=D.widgets[ue].height);return I?H+(Math.ceil(D.text.length/B)||1)*y:H+y}}function $A(A){var y=A.doc,I=Nc(A);y.iter(function(B){var D=I(B);D!=B.height&&ia(B,D)})}function _A(A,y,I,B){var D=A.display;if(!I&&Sr(y).getAttribute("cm-not-content")=="true")return null;var H,ue,_e=D.lineSpace.getBoundingClientRect();try{H=y.clientX-_e.left,ue=y.clientY-_e.top}catch{return null}var ke=_o(A,H,ue),ze;if(B&&ke.xRel>0&&(ze=Kr(A.doc,ke.line).text).length==ke.ch){var mt=Pe(ze,ze.length,A.options.tabSize)-ze.length;ke=An(ke.line,Math.max(0,Math.round((H-tf(A.display).left)/Wi(A.display))-mt))}return ke}function lA(A,y){if(y>=A.display.viewTo||(y-=A.display.viewFrom,y<0))return null;for(var I=A.display.view,B=0;B<I.length;B++)if(y-=I[B].size,y<0)return B}function Tl(A,y,I,B){y==null&&(y=A.doc.first),I==null&&(I=A.doc.first+A.doc.size),B||(B=0);var D=A.display;if(B&&I<D.viewTo&&(D.updateLineNumbers==null||D.updateLineNumbers>y)&&(D.updateLineNumbers=y),A.curOp.viewChanged=!0,y>=D.viewTo)ms&&Eo(A.doc,y)<D.viewTo&&vu(A);else if(I<=D.viewFrom)ms&&ki(A.doc,I+B)>D.viewFrom?vu(A):(D.viewFrom+=B,D.viewTo+=B);else if(y<=D.viewFrom&&I>=D.viewTo)vu(A);else if(y<=D.viewFrom){var H=jl(A,I,I+B,1);H?(D.view=D.view.slice(H.index),D.viewFrom=H.lineN,D.viewTo+=B):vu(A)}else if(I>=D.viewTo){var ue=jl(A,y,y,-1);ue?(D.view=D.view.slice(0,ue.index),D.viewTo=ue.lineN):vu(A)}else{var _e=jl(A,y,y,-1),ke=jl(A,I,I+B,1);_e&&ke?(D.view=D.view.slice(0,_e.index).concat(sA(A,_e.lineN,ke.lineN)).concat(D.view.slice(ke.index)),D.viewTo+=B):vu(A)}var ze=D.externalMeasured;ze&&(I<ze.lineN?ze.lineN+=B:y<ze.lineN+ze.size&&(D.externalMeasured=null))}function gc(A,y,I){A.curOp.viewChanged=!0;var B=A.display,D=A.display.externalMeasured;if(D&&y>=D.lineN&&y<D.lineN+D.size&&(B.externalMeasured=null),!(y<B.viewFrom||y>=B.viewTo)){var H=B.view[lA(A,y)];if(H.node!=null){var ue=H.changes||(H.changes=[]);nt(ue,I)==-1&&ue.push(I)}}}function vu(A){A.display.viewFrom=A.display.viewTo=A.doc.first,A.display.view=[],A.display.viewOffset=0}function jl(A,y,I,B){var D=lA(A,y),H,ue=A.display.view;if(!ms||I==A.doc.first+A.doc.size)return{index:D,lineN:I};for(var _e=A.display.viewFrom,ke=0;ke<D;ke++)_e+=ue[ke].size;if(_e!=y){if(B>0){if(D==ue.length-1)return null;H=_e+ue[D].size-y,D++}else H=_e-y;y+=H,I+=H}for(;Eo(A.doc,I)!=I;){if(D==(B<0?0:ue.length-1))return null;I+=B*ue[D-(B<0?1:0)].size,D+=B}return{index:D,lineN:I}}function Wc(A,y,I){var B=A.display,D=B.view;D.length==0||y>=B.viewTo||I<=B.viewFrom?(B.view=sA(A,y,I),B.viewFrom=y):(B.viewFrom>y?B.view=sA(A,y,B.viewFrom).concat(B.view):B.viewFrom<y&&(B.view=B.view.slice(lA(A,y))),B.viewFrom=y,B.viewTo<I?B.view=B.view.concat(sA(A,B.viewTo,I)):B.viewTo>I&&(B.view=B.view.slice(0,lA(A,I)))),B.viewTo=I}function Zd(A){for(var y=A.display.view,I=0,B=0;B<y.length;B++){var D=y[B];!D.hidden&&(!D.node||D.changes)&&++I}return I}function za(A){A.display.input.showSelection(A.display.input.prepareSelection())}function fd(A,y){y===void 0&&(y=!0);var I=A.doc,B={},D=B.cursors=document.createDocumentFragment(),H=B.selection=document.createDocumentFragment(),ue=A.options.$customCursor;ue&&(y=!0);for(var _e=0;_e<I.sel.ranges.length;_e++)if(!(!y&&_e==I.sel.primIndex)){var ke=I.sel.ranges[_e];if(!(ke.from().line>=A.display.viewTo||ke.to().line<A.display.viewFrom)){var ze=ke.empty();if(ue){var mt=ue(A,ke);mt&&yc(A,mt,D)}else(ze||A.options.showCursorWhenSelecting)&&yc(A,ke.head,D);ze||of(A,ke,H)}}return B}function yc(A,y,I){var B=an(A,y,"div",null,null,!A.options.singleCursorHeightPerLine),D=I.appendChild(me("div"," ","CodeMirror-cursor"));if(D.style.left=B.left+"px",D.style.top=B.top+"px",D.style.height=Math.max(0,B.bottom-B.top)*A.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(A.getWrapperElement().className)){var H=Pn(A,y,"div",null,null),ue=H.right-H.left;D.style.width=(ue>0?ue:A.defaultCharWidth())+"px"}if(B.other){var _e=I.appendChild(me("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));_e.style.display="",_e.style.left=B.other.left+"px",_e.style.top=B.other.top+"px",_e.style.height=(B.other.bottom-B.other.top)*.85+"px"}}function VA(A,y){return A.top-y.top||A.left-y.left}function of(A,y,I){var B=A.display,D=A.doc,H=document.createDocumentFragment(),ue=tf(A.display),_e=ue.left,ke=Math.max(B.sizerWidth,Bl(A)-B.sizer.offsetLeft)-ue.right,ze=D.direction=="ltr";function mt(dr,Lr,ai,Wr){Lr<0&&(Lr=0),Lr=Math.round(Lr),Wr=Math.round(Wr),H.appendChild(me("div",null,"CodeMirror-selected","position: absolute; left: "+dr+`px;
|
||
top: `+Lr+"px; width: "+(ai??ke-dr)+`px;
|
||
height: `+(Wr-Lr)+"px"))}function Mt(dr,Lr,ai){var Wr=Kr(D,dr),Xi=Wr.text.length,ko,Qa;function aa(Pa,Yl){return Pn(A,An(dr,Pa),"div",Wr,Yl)}function _a(Pa,Yl,qa){var xa=Vo(A,Wr,null,Pa),hs=Yl=="ltr"==(qa=="after")?"left":"right",gi=qa=="after"?xa.begin:xa.end-(/\s/.test(Wr.text.charAt(xa.end-1))?2:1);return aa(gi,hs)[hs]}var ba=ve(Wr,D.direction);return rn(ba,Lr||0,ai??Xi,function(Pa,Yl,qa,xa){var hs=qa=="ltr",gi=aa(Pa,hs?"left":"right"),Xo=aa(Yl-1,hs?"right":"left"),la=Lr==null&&Pa==0,fa=ai==null&&Yl==Xi,ks=xa==0,Dl=!ba||xa==ba.length-1;if(Xo.top-gi.top<=3){var Ro=(ze?la:fa)&&ks,Pd=(ze?fa:la)&&Dl,yl=Ro?_e:(hs?gi:Xo).left,PA=Pd?ke:(hs?Xo:gi).right;mt(yl,gi.top,PA-yl,gi.bottom)}else{var Xc,vl,Cl,cf;hs?(Xc=ze&&la&&ks?_e:gi.left,vl=ze?ke:_a(Pa,qa,"before"),Cl=ze?_e:_a(Yl,qa,"after"),cf=ze&&fa&&Dl?ke:Xo.right):(Xc=ze?_a(Pa,qa,"before"):_e,vl=!ze&&la&&ks?ke:gi.right,Cl=!ze&&fa&&Dl?_e:Xo.left,cf=ze?_a(Yl,qa,"after"):ke),mt(Xc,gi.top,vl-Xc,gi.bottom),gi.bottom<Xo.top&&mt(_e,gi.bottom,null,Xo.top),mt(Cl,Xo.top,cf-Cl,Xo.bottom)}(!ko||VA(gi,ko)<0)&&(ko=gi),VA(Xo,ko)<0&&(ko=Xo),(!Qa||VA(gi,Qa)<0)&&(Qa=gi),VA(Xo,Qa)<0&&(Qa=Xo)}),{start:ko,end:Qa}}var Xt=y.from(),Qt=y.to();if(Xt.line==Qt.line)Mt(Xt.line,Xt.ch,Qt.ch);else{var Mn=Kr(D,Xt.line),Kn=Kr(D,Qt.line),Zn=vr(Mn)==vr(Kn),or=Mt(Xt.line,Xt.ch,Zn?Mn.text.length+1:null).end,br=Mt(Qt.line,Zn?0:null,Qt.ch).start;Zn&&(or.top<br.top-2?(mt(or.right,or.top,null,or.bottom),mt(_e,br.top,br.left,br.bottom)):mt(or.right,or.top,br.left-or.right,or.bottom)),or.bottom<br.top&&mt(_e,or.bottom,null,br.top)}I.appendChild(H)}function bA(A){if(A.state.focused){var y=A.display;clearInterval(y.blinker);var I=!0;y.cursorDiv.style.visibility="",A.options.cursorBlinkRate>0?y.blinker=setInterval(function(){A.hasFocus()||Ho(A),y.cursorDiv.style.visibility=(I=!I)?"":"hidden"},A.options.cursorBlinkRate):A.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function HA(A){A.hasFocus()||(A.display.input.focus(),A.state.focused||Xd(A))}function Gc(A){A.state.delayingBlurEvent=!0,setTimeout(function(){A.state.delayingBlurEvent&&(A.state.delayingBlurEvent=!1,A.state.focused&&Ho(A))},100)}function Xd(A,y){A.state.delayingBlurEvent&&!A.state.draggingText&&(A.state.delayingBlurEvent=!1),A.options.readOnly!="nocursor"&&(A.state.focused||(ct(A,"focus",A,y),A.state.focused=!0,Ce(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()),bA(A))}function Ho(A,y){A.state.delayingBlurEvent||(A.state.focused&&(ct(A,"blur",A,y),A.state.focused=!1,fe(A.display.wrapper,"CodeMirror-focused")),clearInterval(A.display.blinker),setTimeout(function(){A.state.focused||(A.display.shift=!1)},150))}function Qc(A){for(var y=A.display,I=y.lineDiv.offsetTop,B=Math.max(0,y.scroller.getBoundingClientRect().top),D=y.lineDiv.getBoundingClientRect().top,H=0,ue=0;ue<y.view.length;ue++){var _e=y.view[ue],ke=A.options.lineWrapping,ze=void 0,mt=0;if(!_e.hidden){if(D+=_e.line.height,d&&g<8){var Mt=_e.node.offsetTop+_e.node.offsetHeight;ze=Mt-I,I=Mt}else{var Xt=_e.node.getBoundingClientRect();ze=Xt.bottom-Xt.top,!ke&&_e.text.firstChild&&(mt=_e.text.firstChild.getBoundingClientRect().right-Xt.left-1)}var Qt=_e.line.height-ze;if((Qt>.005||Qt<-.005)&&(D<B&&(H-=Qt),ia(_e.line,ze),ZA(_e.line),_e.rest))for(var Mn=0;Mn<_e.rest.length;Mn++)ZA(_e.rest[Mn]);if(mt>A.display.sizerWidth){var Kn=Math.ceil(mt/Wi(A.display));Kn>A.display.maxLineLength&&(A.display.maxLineLength=Kn,A.display.maxLine=_e.line,A.display.maxLineChanged=!0)}}}Math.abs(H)>2&&(y.scroller.scrollTop+=H)}function ZA(A){if(A.widgets)for(var y=0;y<A.widgets.length;++y){var I=A.widgets[y],B=I.node.parentNode;B&&(I.height=B.offsetHeight)}}function Lu(A,y,I){var B=I&&I.top!=null?Math.max(0,I.top):A.scroller.scrollTop;B=Math.floor(B-Uc(A));var D=I&&I.bottom!=null?I.bottom:B+A.wrapper.clientHeight,H=wt(y,B),ue=wt(y,D);if(I&&I.ensure){var _e=I.ensure.from.line,ke=I.ensure.to.line;_e<H?(H=_e,ue=wt(y,Zi(Kr(y,_e))+A.wrapper.clientHeight)):Math.min(ke,y.lastLine())>=ue&&(H=wt(y,Zi(Kr(y,ke))-A.wrapper.clientHeight),ue=ke)}return{from:H,to:Math.max(ue,H+1)}}function qc(A,y){if(!At(A,"scrollCursorIntoView")){var I=A.display,B=I.sizer.getBoundingClientRect(),D=null,H=I.wrapper.ownerDocument;if(y.top+B.top<0?D=!0:y.bottom+B.top>(H.defaultView.innerHeight||H.documentElement.clientHeight)&&(D=!1),D!=null&&!q){var ue=me("div","",null,`position: absolute;
|
||
top: `+(y.top-I.viewOffset-Uc(A.display))+`px;
|
||
height: `+(y.bottom-y.top+iu(A)+I.barHeight)+`px;
|
||
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");A.display.lineSpace.appendChild(ue),ue.scrollIntoView(D),A.display.lineSpace.removeChild(ue)}}}function Jd(A,y,I,B){B==null&&(B=0);var D;!A.options.lineWrapping&&y==I&&(I=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 ue=!1,_e=an(A,y),ke=!I||I==y?_e:an(A,I);D={left:Math.min(_e.left,ke.left),top:Math.min(_e.top,ke.top)-B,right:Math.max(_e.left,ke.left),bottom:Math.max(_e.bottom,ke.bottom)+B};var ze=vc(A,D),mt=A.doc.scrollTop,Mt=A.doc.scrollLeft;if(ze.scrollTop!=null&&(Uu(A,ze.scrollTop),Math.abs(A.doc.scrollTop-mt)>1&&(ue=!0)),ze.scrollLeft!=null&&(Nl(A,ze.scrollLeft),Math.abs(A.doc.scrollLeft-Mt)>1&&(ue=!0)),!ue)break}return D}function Yc(A,y){var I=vc(A,y);I.scrollTop!=null&&Uu(A,I.scrollTop),I.scrollLeft!=null&&Nl(A,I.scrollLeft)}function vc(A,y){var I=A.display,B=kl(A.display);y.top<0&&(y.top=0);var D=A.curOp&&A.curOp.scrollTop!=null?A.curOp.scrollTop:I.scroller.scrollTop,H=GA(A),ue={};y.bottom-y.top>H&&(y.bottom=y.top+H);var _e=A.doc.height+Yd(I),ke=y.top<B,ze=y.bottom>_e-B;if(y.top<D)ue.scrollTop=ke?0:y.top;else if(y.bottom>D+H){var mt=Math.min(y.top,(ze?_e:y.bottom)-H);mt!=D&&(ue.scrollTop=mt)}var Mt=A.options.fixedGutter?0:I.gutters.offsetWidth,Xt=A.curOp&&A.curOp.scrollLeft!=null?A.curOp.scrollLeft:I.scroller.scrollLeft-Mt,Qt=Bl(A)-I.gutters.offsetWidth,Mn=y.right-y.left>Qt;return Mn&&(y.right=y.left+Qt),y.left<10?ue.scrollLeft=0:y.left<Xt?ue.scrollLeft=Math.max(0,y.left+Mt-(Mn?0:10)):y.right>Qt+Xt-3&&(ue.scrollLeft=y.right+(Mn?0:10)-Qt),ue}function As(A,y){y!=null&&(pd(A),A.curOp.scrollTop=(A.curOp.scrollTop==null?A.doc.scrollTop:A.curOp.scrollTop)+y)}function zo(A){pd(A);var y=A.getCursor();A.curOp.scrollToPos={from:y,to:y,margin:A.options.cursorScrollMargin}}function cs(A,y,I){(y!=null||I!=null)&&pd(A),y!=null&&(A.curOp.scrollLeft=y),I!=null&&(A.curOp.scrollTop=I)}function Df(A,y){pd(A),A.curOp.scrollToPos=y}function pd(A){var y=A.curOp.scrollToPos;if(y){A.curOp.scrollToPos=null;var I=Ur(A,y.from),B=Ur(A,y.to);md(A,I,B,y.margin)}}function md(A,y,I,B){var D=vc(A,{left:Math.min(y.left,I.left),top:Math.min(y.top,I.top)-B,right:Math.max(y.right,I.right),bottom:Math.max(y.bottom,I.bottom)+B});cs(A,D.scrollLeft,D.scrollTop)}function Uu(A,y){Math.abs(A.doc.scrollTop-y)<2||(i||va(A,{top:y}),XA(A,y,!0),i&&va(A),yd(A,100))}function XA(A,y,I){y=Math.max(0,Math.min(A.display.scroller.scrollHeight-A.display.scroller.clientHeight,y)),!(A.display.scroller.scrollTop==y&&!I)&&(A.doc.scrollTop=y,A.display.scrollbars.setScrollTop(y),A.display.scroller.scrollTop!=y&&(A.display.scroller.scrollTop=y))}function Nl(A,y,I,B){y=Math.max(0,Math.min(y,A.display.scroller.scrollWidth-A.display.scroller.clientWidth)),!((I?y==A.doc.scrollLeft:Math.abs(A.doc.scrollLeft-y)<2)&&!B)&&(A.doc.scrollLeft=y,vd(A),A.display.scroller.scrollLeft!=y&&(A.display.scroller.scrollLeft=y),A.display.scrollbars.setScrollLeft(y))}function xA(A){var y=A.display,I=y.gutters.offsetWidth,B=Math.round(A.doc.height+Yd(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?I:0,docHeight:B,scrollHeight:B+iu(A)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:I}}var dl=function(A,y,I){this.cm=I;var B=this.vert=me("div",[me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),D=this.horiz=me("div",[me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");B.tabIndex=D.tabIndex=-1,A(B),A(D),je(B,"scroll",function(){B.clientHeight&&y(B.scrollTop,"vertical")}),je(D,"scroll",function(){D.clientWidth&&y(D.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};dl.prototype.update=function(A){var y=A.scrollWidth>A.clientWidth+1,I=A.scrollHeight>A.clientHeight+1,B=A.nativeBarWidth;if(I){this.vert.style.display="block",this.vert.style.bottom=y?B+"px":"0";var D=A.viewHeight-(y?B:0);this.vert.firstChild.style.height=Math.max(0,A.scrollHeight-A.clientHeight+D)+"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=I?B+"px":"0",this.horiz.style.left=A.barLeft+"px";var H=A.viewWidth-A.barLeft-(I?B: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&&(B==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:I?B:0,bottom:y?B:0}},dl.prototype.setScrollLeft=function(A){this.horiz.scrollLeft!=A&&(this.horiz.scrollLeft=A),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},dl.prototype.setScrollTop=function(A){this.vert.scrollTop!=A&&(this.vert.scrollTop=A),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},dl.prototype.zeroWidthHack=function(){var A=Y&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=A,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ee,this.disableVert=new Ee},dl.prototype.enableZeroWidthBar=function(A,y,I){A.style.visibility="";function B(){var D=A.getBoundingClientRect(),H=I=="vert"?document.elementFromPoint(D.right-1,(D.top+D.bottom)/2):document.elementFromPoint((D.right+D.left)/2,D.bottom-1);H!=A?A.style.visibility="hidden":y.set(1e3,B)}y.set(1e3,B)},dl.prototype.clear=function(){var A=this.horiz.parentNode;A.removeChild(this.horiz),A.removeChild(this.vert)};var JA=function(){};JA.prototype.update=function(){return{bottom:0,right:0}},JA.prototype.setScrollLeft=function(){},JA.prototype.setScrollTop=function(){},JA.prototype.clear=function(){};function zu(A,y){y||(y=xA(A));var I=A.display.barWidth,B=A.display.barHeight;gd(A,y);for(var D=0;D<4&&I!=A.display.barWidth||B!=A.display.barHeight;D++)I!=A.display.barWidth&&A.options.lineWrapping&&Qc(A),gd(A,xA(A)),I=A.display.barWidth,B=A.display.barHeight}function gd(A,y){var I=A.display,B=I.scrollbars.update(y);I.sizer.style.paddingRight=(I.barWidth=B.right)+"px",I.sizer.style.paddingBottom=(I.barHeight=B.bottom)+"px",I.heightForcer.style.borderBottom=B.bottom+"px solid transparent",B.right&&B.bottom?(I.scrollbarFiller.style.display="block",I.scrollbarFiller.style.height=B.bottom+"px",I.scrollbarFiller.style.width=B.right+"px"):I.scrollbarFiller.style.display="",B.bottom&&A.options.coverGutterNextToScrollbar&&A.options.fixedGutter?(I.gutterFiller.style.display="block",I.gutterFiller.style.height=B.bottom+"px",I.gutterFiller.style.width=y.gutterWidth+"px"):I.gutterFiller.style.display=""}var ju={native:dl,null:JA};function eh(A){A.display.scrollbars&&(A.display.scrollbars.clear(),A.display.scrollbars.addClass&&fe(A.display.wrapper,A.display.scrollbars.addClass)),A.display.scrollbars=new ju[A.options.scrollbarStyle](function(y){A.display.wrapper.insertBefore(y,A.display.scrollbarFiller),je(y,"mousedown",function(){A.state.focused&&setTimeout(function(){return A.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,I){I=="horizontal"?Nl(A,y):Uu(A,y)},A),A.display.scrollbars.addClass&&Ce(A.display.wrapper,A.display.scrollbars.addClass)}var ec=0;function Nu(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:++ec,markArrays:null},Fc(A.curOp)}function Wu(A){var y=A.curOp;y&&Pf(y,function(I){for(var B=0;B<I.ops.length;B++)I.ops[B].cm.curOp=null;wA(I)})}function wA(A){for(var y=A.ops,I=0;I<y.length;I++)Cc(y[I]);for(var B=0;B<y.length;B++)Cu(y[B]);for(var D=0;D<y.length;D++)$c(y[D]);for(var H=0;H<y.length;H++)it(y[H]);for(var ue=0;ue<y.length;ue++)ja(y[ue])}function Cc(A){var y=A.cm,I=y.display;Gs(y),A.updateMaxLine&&ya(y),A.mustUpdate=A.viewChanged||A.forceUpdate||A.scrollTop!=null||A.scrollToPos&&(A.scrollToPos.from.line<I.viewFrom||A.scrollToPos.to.line>=I.viewTo)||I.maxLineChanged&&y.options.lineWrapping,A.update=A.mustUpdate&&new Oa(y,A.mustUpdate&&{top:A.scrollTop,ensure:A.scrollToPos},A.forceUpdate)}function Cu(A){A.updatedDisplay=A.mustUpdate&&Bs(A.cm,A.update)}function $c(A){var y=A.cm,I=y.display;A.updatedDisplay&&Qc(y),A.barMeasure=xA(y),I.maxLineChanged&&!y.options.lineWrapping&&(A.adjustWidthTo=hd(y,I.maxLine,I.maxLine.text.length).left+3,y.display.sizerWidth=A.adjustWidthTo,A.barMeasure.scrollWidth=Math.max(I.scroller.clientWidth,I.sizer.offsetLeft+A.adjustWidthTo+iu(y)+y.display.barWidth),A.maxScrollLeft=Math.max(0,I.sizer.offsetLeft+A.adjustWidthTo-Bl(y))),(A.updatedDisplay||A.selectionChanged)&&(A.preparedSelection=I.input.prepareSelection())}function it(A){var y=A.cm;A.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=A.adjustWidthTo+"px",A.maxScrollLeft<y.doc.scrollLeft&&Nl(y,Math.min(y.display.scroller.scrollLeft,A.maxScrollLeft),!0),y.display.maxLineChanged=!1);var I=A.focus&&A.focus==We(bt(y));A.preparedSelection&&y.display.input.showSelection(A.preparedSelection,I),(A.updatedDisplay||A.startHeight!=y.doc.height)&&zu(y,A.barMeasure),A.updatedDisplay&&tc(y,A.barMeasure),A.selectionChanged&&bA(y),y.state.focused&&A.updateInput&&y.display.input.reset(A.typing),I&&HA(A.cm)}function ja(A){var y=A.cm,I=y.display,B=y.doc;if(A.updatedDisplay&&yr(y,A.update),I.wheelStartX!=null&&(A.scrollTop!=null||A.scrollLeft!=null||A.scrollToPos)&&(I.wheelStartX=I.wheelStartY=null),A.scrollTop!=null&&XA(y,A.scrollTop,A.forceScroll),A.scrollLeft!=null&&Nl(y,A.scrollLeft,!0,!0),A.scrollToPos){var D=Jd(y,ri(B,A.scrollToPos.from),ri(B,A.scrollToPos.to),A.scrollToPos.margin);qc(y,D)}var H=A.maybeHiddenMarkers,ue=A.maybeUnhiddenMarkers;if(H)for(var _e=0;_e<H.length;++_e)H[_e].lines.length||ct(H[_e],"hide");if(ue)for(var ke=0;ke<ue.length;++ke)ue[ke].lines.length&&ct(ue[ke],"unhide");I.wrapper.offsetHeight&&(B.scrollTop=y.display.scroller.scrollTop),A.changeObjs&&ct(y,"changes",y,A.changeObjs),A.update&&A.update.finish()}function Bo(A,y){if(A.curOp)return y();Nu(A);try{return y()}finally{Wu(A)}}function Di(A,y){return function(){if(A.curOp)return y.apply(A,arguments);Nu(A);try{return y.apply(A,arguments)}finally{Wu(A)}}}function $r(A){return function(){if(this.curOp)return A.apply(this,arguments);Nu(this);try{return A.apply(this,arguments)}finally{Wu(this)}}}function Es(A){return function(){var y=this.cm;if(!y||y.curOp)return A.apply(this,arguments);Nu(y);try{return A.apply(this,arguments)}finally{Wu(y)}}}function yd(A,y){A.doc.highlightFrontier<A.display.viewTo&&A.state.highlight.set(y,Pt(th,A))}function th(A){var y=A.doc;if(!(y.highlightFrontier>=A.display.viewTo)){var I=+new Date+A.options.workTime,B=Fr(A,y.highlightFrontier),D=[];y.iter(B.line,Math.min(y.first+y.size,A.display.viewTo+500),function(H){if(B.line>=A.display.viewFrom){var ue=H.styles,_e=H.text.length>A.options.maxHighlightLength?ao(y.mode,B.state):null,ke=iA(A,H,B,!0);_e&&(B.state=_e),H.styles=ke.styles;var ze=H.styleClasses,mt=ke.classes;mt?H.styleClasses=mt:ze&&(H.styleClasses=null);for(var Mt=!ue||ue.length!=H.styles.length||ze!=mt&&(!ze||!mt||ze.bgClass!=mt.bgClass||ze.textClass!=mt.textClass),Xt=0;!Mt&&Xt<ue.length;++Xt)Mt=ue[Xt]!=H.styles[Xt];Mt&&D.push(B.line),H.stateAfter=B.save(),B.nextLine()}else H.text.length<=A.options.maxHighlightLength&&Ei(A,H.text,B),H.stateAfter=B.line%5==0?B.save():null,B.nextLine();if(+new Date>I)return yd(A,A.options.workDelay),!0}),y.highlightFrontier=B.line,y.modeFrontier=Math.max(y.modeFrontier,B.line),D.length&&Bo(A,function(){for(var H=0;H<D.length;H++)gc(A,D[H],"text")})}}var Oa=function(A,y,I){var B=A.display;this.viewport=y,this.visible=Lu(B,A.doc,y),this.editorIsHidden=!B.wrapper.offsetWidth,this.wrapperHeight=B.wrapper.clientHeight,this.wrapperWidth=B.wrapper.clientWidth,this.oldDisplayWidth=Bl(A),this.force=I,this.dims=YA(A),this.events=[]};Oa.prototype.signal=function(A,y){$t(A,y)&&this.events.push(arguments)},Oa.prototype.finish=function(){for(var A=0;A<this.events.length;A++)ct.apply(null,this.events[A])};function Gs(A){var y=A.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=iu(A)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=iu(A)+"px",y.scrollbarsClipped=!0)}function _s(A){if(A.hasFocus())return null;var y=We(bt(A));if(!y||!He(A.display.lineDiv,y))return null;var I={activeElt:y};if(window.getSelection){var B=Dt(A).getSelection();B.anchorNode&&B.extend&&He(A.display.lineDiv,B.anchorNode)&&(I.anchorNode=B.anchorNode,I.anchorOffset=B.anchorOffset,I.focusNode=B.focusNode,I.focusOffset=B.focusOffset)}return I}function uA(A){if(!(!A||!A.activeElt||A.activeElt==We(gt(A.activeElt)))&&(A.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(A.activeElt.nodeName)&&A.anchorNode&&He(document.body,A.anchorNode)&&He(document.body,A.focusNode))){var y=A.activeElt.ownerDocument,I=y.defaultView.getSelection(),B=y.createRange();B.setEnd(A.anchorNode,A.anchorOffset),B.collapse(!1),I.removeAllRanges(),I.addRange(B),I.extend(A.focusNode,A.focusOffset)}}function Bs(A,y){var I=A.display,B=A.doc;if(y.editorIsHidden)return vu(A),!1;if(!y.force&&y.visible.from>=I.viewFrom&&y.visible.to<=I.viewTo&&(I.updateLineNumbers==null||I.updateLineNumbers>=I.viewTo)&&I.renderedView==I.view&&Zd(A)==0)return!1;Cd(A)&&(vu(A),y.dims=YA(A));var D=B.first+B.size,H=Math.max(y.visible.from-A.options.viewportMargin,B.first),ue=Math.min(D,y.visible.to+A.options.viewportMargin);I.viewFrom<H&&H-I.viewFrom<20&&(H=Math.max(B.first,I.viewFrom)),I.viewTo>ue&&I.viewTo-ue<20&&(ue=Math.min(D,I.viewTo)),ms&&(H=Eo(A.doc,H),ue=ki(A.doc,ue));var _e=H!=I.viewFrom||ue!=I.viewTo||I.lastWrapHeight!=y.wrapperHeight||I.lastWrapWidth!=y.wrapperWidth;Wc(A,H,ue),I.viewOffset=Zi(Kr(A.doc,I.viewFrom)),A.display.mover.style.top=I.viewOffset+"px";var ke=Zd(A);if(!_e&&ke==0&&!y.force&&I.renderedView==I.view&&(I.updateLineNumbers==null||I.updateLineNumbers>=I.viewTo))return!1;var ze=_s(A);return ke>4&&(I.lineDiv.style.display="none"),Vc(A,I.updateLineNumbers,y.dims),ke>4&&(I.lineDiv.style.display=""),I.renderedView=I.view,uA(ze),xe(I.cursorDiv),xe(I.selectionDiv),I.gutters.style.height=I.sizer.style.minHeight=0,_e&&(I.lastWrapHeight=y.wrapperHeight,I.lastWrapWidth=y.wrapperWidth,yd(A,400)),I.updateLineNumbers=null,!0}function yr(A,y){for(var I=y.viewport,B=!0;;B=!1){if(!B||!A.options.lineWrapping||y.oldDisplayWidth==Bl(A)){if(I&&I.top!=null&&(I={top:Math.min(A.doc.height+Yd(A.display)-GA(A),I.top)}),y.visible=Lu(A.display,A.doc,I),y.visible.from>=A.display.viewFrom&&y.visible.to<=A.display.viewTo)break}else B&&(y.visible=Lu(A.display,A.doc,I));if(!Bs(A,y))break;Qc(A);var D=xA(A);za(A),zu(A,D),tc(A,D),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 va(A,y){var I=new Oa(A,y);if(Bs(A,I)){Qc(A),yr(A,I);var B=xA(A);za(A),zu(A,B),tc(A,B),I.finish()}}function Vc(A,y,I){var B=A.display,D=A.options.lineNumbers,H=B.lineDiv,ue=H.firstChild;function _e(Mn){var Kn=Mn.nextSibling;return b&&Y&&A.display.currentWheelTarget==Mn?Mn.style.display="none":Mn.parentNode.removeChild(Mn),Kn}for(var ke=B.view,ze=B.viewFrom,mt=0;mt<ke.length;mt++){var Mt=ke[mt];if(!Mt.hidden)if(!Mt.node||Mt.node.parentNode!=H){var Xt=am(A,Mt,ze,I);H.insertBefore(Xt,ue)}else{for(;ue!=Mt.node;)ue=_e(ue);var Qt=D&&y!=null&&y<=ze&&Mt.lineNumber;Mt.changes&&(nt(Mt.changes,"gutter")>-1&&(Qt=!1),Jh(A,Mt,ze,I)),Qt&&(xe(Mt.lineNumber),Mt.lineNumber.appendChild(document.createTextNode(qn(A.options,ze)))),ue=Mt.node.nextSibling}ze+=Mt.size}for(;ue;)ue=_e(ue)}function Ia(A){var y=A.gutters.offsetWidth;A.sizer.style.marginLeft=y+"px",Zs(A,"gutterChanged",A)}function tc(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+iu(A)+"px"}function vd(A){var y=A.display,I=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!A.options.fixedGutter))){for(var B=Uo(y)-y.scroller.scrollLeft+A.doc.scrollLeft,D=y.gutters.offsetWidth,H=B+"px",ue=0;ue<I.length;ue++)if(!I[ue].hidden){A.options.fixedGutter&&(I[ue].gutter&&(I[ue].gutter.style.left=H),I[ue].gutterBackground&&(I[ue].gutterBackground.style.left=H));var _e=I[ue].alignable;if(_e)for(var ke=0;ke<_e.length;ke++)_e[ke].style.left=H}A.options.fixedGutter&&(y.gutters.style.left=B+D+"px")}}function Cd(A){if(!A.options.lineNumbers)return!1;var y=A.doc,I=qn(A.options,y.first+y.size-1),B=A.display;if(I.length!=B.lineNumChars){var D=B.measure.appendChild(me("div",[me("div",I)],"CodeMirror-linenumber CodeMirror-gutter-elt")),H=D.firstChild.offsetWidth,ue=D.offsetWidth-H;return B.lineGutter.style.width="",B.lineNumInnerWidth=Math.max(H,B.lineGutter.offsetWidth-ue)+1,B.lineNumWidth=B.lineNumInnerWidth+ue,B.lineNumChars=B.lineNumInnerWidth?I.length:-1,B.lineGutter.style.width=B.lineNumWidth+"px",Ia(A.display),!0}return!1}function Mi(A,y){for(var I=[],B=!1,D=0;D<A.length;D++){var H=A[D],ue=null;if(typeof H!="string"&&(ue=H.style,H=H.className),H=="CodeMirror-linenumbers")if(y)B=!0;else continue;I.push({className:H,style:ue})}return y&&!B&&I.push({className:"CodeMirror-linenumbers",style:null}),I}function _d(A){var y=A.gutters,I=A.gutterSpecs;xe(y),A.lineGutter=null;for(var B=0;B<I.length;++B){var D=I[B],H=D.className,ue=D.style,_e=y.appendChild(me("div",null,"CodeMirror-gutter "+H));ue&&(_e.style.cssText=ue),H=="CodeMirror-linenumbers"&&(A.lineGutter=_e,_e.style.width=(A.lineNumWidth||1)+"px")}y.style.display=I.length?"":"none",Ia(A)}function Wl(A){_d(A.display),Tl(A),vd(A)}function bd(A,y,I,B){var D=this;this.input=I,D.scrollbarFiller=me("div",null,"CodeMirror-scrollbar-filler"),D.scrollbarFiller.setAttribute("cm-not-content","true"),D.gutterFiller=me("div",null,"CodeMirror-gutter-filler"),D.gutterFiller.setAttribute("cm-not-content","true"),D.lineDiv=at("div",null,"CodeMirror-code"),D.selectionDiv=me("div",null,null,"position: relative; z-index: 1"),D.cursorDiv=me("div",null,"CodeMirror-cursors"),D.measure=me("div",null,"CodeMirror-measure"),D.lineMeasure=me("div",null,"CodeMirror-measure"),D.lineSpace=at("div",[D.measure,D.lineMeasure,D.selectionDiv,D.cursorDiv,D.lineDiv],null,"position: relative; outline: none");var H=at("div",[D.lineSpace],"CodeMirror-lines");D.mover=me("div",[H],null,"position: relative"),D.sizer=me("div",[D.mover],"CodeMirror-sizer"),D.sizerWidth=null,D.heightForcer=me("div",null,null,"position: absolute; height: "+_t+"px; width: 1px;"),D.gutters=me("div",null,"CodeMirror-gutters"),D.lineGutter=null,D.scroller=me("div",[D.sizer,D.heightForcer,D.gutters],"CodeMirror-scroll"),D.scroller.setAttribute("tabIndex","-1"),D.wrapper=me("div",[D.scrollbarFiller,D.gutterFiller,D.scroller],"CodeMirror"),S&&O>=105&&(D.wrapper.style.clipPath="inset(0px)"),D.wrapper.setAttribute("translate","no"),d&&g<8&&(D.gutters.style.zIndex=-1,D.scroller.style.paddingRight=0),!b&&!(i&&X)&&(D.scroller.draggable=!0),A&&(A.appendChild?A.appendChild(D.wrapper):A(D.wrapper)),D.viewFrom=D.viewTo=y.first,D.reportedViewFrom=D.reportedViewTo=y.first,D.view=[],D.renderedView=null,D.externalMeasured=null,D.viewOffset=0,D.lastWrapHeight=D.lastWrapWidth=0,D.updateLineNumbers=null,D.nativeBarWidth=D.barHeight=D.barWidth=0,D.scrollbarsClipped=!1,D.lineNumWidth=D.lineNumInnerWidth=D.lineNumChars=null,D.alignWidgets=!1,D.cachedCharWidth=D.cachedTextHeight=D.cachedPaddingH=null,D.maxLine=null,D.maxLineLength=0,D.maxLineChanged=!1,D.wheelDX=D.wheelDY=D.wheelStartX=D.wheelStartY=null,D.shift=!1,D.selForContextMenu=null,D.activeTouch=null,D.gutterSpecs=Mi(B.gutters,B.lineNumbers),_d(D),I.init(D)}var xd=0,MA=null;d?MA=-.53:i?MA=15:S?MA=-.7:U&&(MA=-1/3);function nc(A){var y=A.wheelDeltaX,I=A.wheelDeltaY;return y==null&&A.detail&&A.axis==A.HORIZONTAL_AXIS&&(y=A.detail),I==null&&A.detail&&A.axis==A.VERTICAL_AXIS?I=A.detail:I==null&&(I=A.wheelDelta),{x:y,y:I}}function AA(A){var y=nc(A);return y.x*=MA,y.y*=MA,y}function _c(A,y){S&&O==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 I=nc(y),B=I.x,D=I.y,H=MA;y.deltaMode===0&&(B=y.deltaX,D=y.deltaY,H=1);var ue=A.display,_e=ue.scroller,ke=_e.scrollWidth>_e.clientWidth,ze=_e.scrollHeight>_e.clientHeight;if(B&&ke||D&&ze){if(D&&Y&&b){e:for(var mt=y.target,Mt=ue.view;mt!=_e;mt=mt.parentNode)for(var Xt=0;Xt<Mt.length;Xt++)if(Mt[Xt].node==mt){A.display.currentWheelTarget=mt;break e}}if(B&&!i&&!k&&H!=null){D&&ze&&Uu(A,Math.max(0,_e.scrollTop+D*H)),Nl(A,Math.max(0,_e.scrollLeft+B*H)),(!D||D&&ze)&&xt(y),ue.wheelStartX=null;return}if(D&&H!=null){var Qt=D*H,Mn=A.doc.scrollTop,Kn=Mn+ue.wrapper.clientHeight;Qt<0?Mn=Math.max(0,Mn+Qt-50):Kn=Math.min(A.doc.height,Kn+Qt+50),va(A,{top:Mn,bottom:Kn})}xd<20&&y.deltaMode!==0&&(ue.wheelStartX==null?(ue.wheelStartX=_e.scrollLeft,ue.wheelStartY=_e.scrollTop,ue.wheelDX=B,ue.wheelDY=D,setTimeout(function(){if(ue.wheelStartX!=null){var Zn=_e.scrollLeft-ue.wheelStartX,or=_e.scrollTop-ue.wheelStartY,br=or&&ue.wheelDY&&or/ue.wheelDY||Zn&&ue.wheelDX&&Zn/ue.wheelDX;ue.wheelStartX=ue.wheelStartY=null,br&&(MA=(MA*xd+br)/(xd+1),++xd)}},200)):(ue.wheelDX+=B,ue.wheelDY+=D))}}var Os=function(A,y){this.ranges=A,this.primIndex=y};Os.prototype.primary=function(){return this.ranges[this.primIndex]},Os.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 I=this.ranges[y],B=A.ranges[y];if(!Pi(I.anchor,B.anchor)||!Pi(I.head,B.head))return!1}return!0},Os.prototype.deepCopy=function(){for(var A=[],y=0;y<this.ranges.length;y++)A[y]=new bo(ho(this.ranges[y].anchor),ho(this.ranges[y].head));return new Os(A,this.primIndex)},Os.prototype.somethingSelected=function(){for(var A=0;A<this.ranges.length;A++)if(!this.ranges[A].empty())return!0;return!1},Os.prototype.contains=function(A,y){y||(y=A);for(var I=0;I<this.ranges.length;I++){var B=this.ranges[I];if(sr(y,B.from())>=0&&sr(A,B.to())<=0)return I}return-1};var bo=function(A,y){this.anchor=A,this.head=y};bo.prototype.from=function(){return Ns(this.anchor,this.head)},bo.prototype.to=function(){return Cs(this.anchor,this.head)},bo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function _u(A,y,I){var B=A&&A.options.selectionsMayTouch,D=y[I];y.sort(function(Xt,Qt){return sr(Xt.from(),Qt.from())}),I=nt(y,D);for(var H=1;H<y.length;H++){var ue=y[H],_e=y[H-1],ke=sr(_e.to(),ue.from());if(B&&!ue.empty()?ke>0:ke>=0){var ze=Ns(_e.from(),ue.from()),mt=Cs(_e.to(),ue.to()),Mt=_e.empty()?ue.from()==ue.head:_e.from()==_e.head;H<=I&&--I,y.splice(--H,2,new bo(Mt?mt:ze,Mt?ze:mt))}}return new Os(y,I)}function Na(A,y){return new Os([new bo(A,y||A)],0)}function Ks(A){return A.text?An(A.from.line+A.text.length-1,ir(A.text).length+(A.text.length==1?A.from.ch:0)):A.to}function Zo(A,y){if(sr(A,y.from)<0)return A;if(sr(A,y.to)<=0)return Ks(y);var I=A.line+y.text.length-(y.to.line-y.from.line)-1,B=A.ch;return A.line==y.to.line&&(B+=Ks(y).ch-y.to.ch),An(I,B)}function ou(A,y){for(var I=[],B=0;B<A.sel.ranges.length;B++){var D=A.sel.ranges[B];I.push(new bo(Zo(D.anchor,y),Zo(D.head,y)))}return _u(A.cm,I,A.sel.primIndex)}function Gu(A,y,I){return A.line==y.line?An(I.line,A.ch-y.ch+I.ch):An(I.line+(A.line-y.line),A.ch)}function bc(A,y,I){for(var B=[],D=An(A.first,0),H=D,ue=0;ue<y.length;ue++){var _e=y[ue],ke=Gu(_e.from,D,H),ze=Gu(Ks(_e),D,H);if(D=_e.to,H=ze,I=="around"){var mt=A.sel.ranges[ue],Mt=sr(mt.head,mt.anchor)<0;B[ue]=new bo(Mt?ze:ke,Mt?ke:ze)}else B[ue]=new bo(ke,ke)}return new Os(B,A.sel.primIndex)}function nh(A){A.doc.mode=ns(A.options,A.doc.modeOption),SA(A)}function SA(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,yd(A,100),A.state.modeGen++,A.curOp&&Tl(A)}function xc(A,y){return y.from.ch==0&&y.to.ch==0&&ir(y.text)==""&&(!A.cm||A.cm.options.wholeLineUpdateBefore)}function gs(A,y,I,B){function D(br){return I?I[br]:null}function H(br,dr,Lr){fu(br,dr,Lr,B),Zs(br,"change",br,y)}function ue(br,dr){for(var Lr=[],ai=br;ai<dr;++ai)Lr.push(new Ua(ze[ai],D(ai),B));return Lr}var _e=y.from,ke=y.to,ze=y.text,mt=Kr(A,_e.line),Mt=Kr(A,ke.line),Xt=ir(ze),Qt=D(ze.length-1),Mn=ke.line-_e.line;if(y.full)A.insert(0,ue(0,ze.length)),A.remove(ze.length,A.size-ze.length);else if(xc(A,y)){var Kn=ue(0,ze.length-1);H(Mt,Mt.text,Qt),Mn&&A.remove(_e.line,Mn),Kn.length&&A.insert(_e.line,Kn)}else if(mt==Mt)if(ze.length==1)H(mt,mt.text.slice(0,_e.ch)+Xt+mt.text.slice(ke.ch),Qt);else{var Zn=ue(1,ze.length-1);Zn.push(new Ua(Xt+mt.text.slice(ke.ch),Qt,B)),H(mt,mt.text.slice(0,_e.ch)+ze[0],D(0)),A.insert(_e.line+1,Zn)}else if(ze.length==1)H(mt,mt.text.slice(0,_e.ch)+ze[0]+Mt.text.slice(ke.ch),D(0)),A.remove(_e.line+1,Mn);else{H(mt,mt.text.slice(0,_e.ch)+ze[0],D(0)),H(Mt,Xt+Mt.text.slice(ke.ch),Qt);var or=ue(1,ze.length-1);Mn>1&&A.remove(_e.line+1,Mn-1),A.insert(_e.line+1,or)}Zs(A,"change",A,y)}function da(A,y,I){function B(D,H,ue){if(D.linked)for(var _e=0;_e<D.linked.length;++_e){var ke=D.linked[_e];if(ke.doc!=H){var ze=ue&&ke.sharedHist;I&&!ze||(y(ke.doc,ze),B(ke.doc,D,ze))}}}B(A,null,!0)}function gr(A,y){if(y.cm)throw new Error("This document is already in use.");A.doc=y,y.cm=A,$A(A),nh(A),Hr(A),A.options.direction=y.direction,A.options.lineWrapping||ya(A),A.options.mode=y.modeOption,Tl(A)}function Hr(A){(A.doc.direction=="rtl"?Ce:fe)(A.display.lineDiv,"CodeMirror-rtl")}function Qu(A){Bo(A,function(){Hr(A),Tl(A)})}function rc(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 bu(A,y){var I={from:ho(y.from),to:Ks(y),text:Za(A,y.from,y.to)};return Is(A,I,y.from.line,y.to.line+1),da(A,function(B){return Is(B,I,y.from.line,y.to.line+1)},!0),I}function bs(A){for(;A.length;){var y=ir(A);if(y.ranges)A.pop();else break}}function Kf(A,y){if(y)return bs(A.done),ir(A.done);if(A.done.length&&!ir(A.done).ranges)return ir(A.done);if(A.done.length>1&&!A.done[A.done.length-2].ranges)return A.done.pop(),ir(A.done)}function su(A,y,I,B){var D=A.history;D.undone.length=0;var H=+new Date,ue,_e;if((D.lastOp==B||D.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&D.lastModTime>H-(A.cm?A.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ue=Kf(D,D.lastOp==B)))_e=ir(ue.changes),sr(y.from,y.to)==0&&sr(y.from,_e.to)==0?_e.to=Ks(y):ue.changes.push(bu(A,y));else{var ke=ir(D.done);for((!ke||!ke.ranges)&&Po(A.sel,D.done),ue={changes:[bu(A,y)],generation:D.generation},D.done.push(ue);D.done.length>D.undoDepth;)D.done.shift(),D.done[0].ranges||D.done.shift()}D.done.push(I),D.generation=++D.maxGeneration,D.lastModTime=D.lastSelTime=H,D.lastOp=D.lastSelOp=B,D.lastOrigin=D.lastSelOrigin=y.origin,_e||ct(A,"historyAdded")}function Ff(A,y,I,B){var D=y.charAt(0);return D=="*"||D=="+"&&I.ranges.length==B.ranges.length&&I.somethingSelected()==B.somethingSelected()&&new Date-A.history.lastSelTime<=(A.cm?A.cm.options.historyEventDelay:500)}function xu(A,y,I,B){var D=A.history,H=B&&B.origin;I==D.lastSelOp||H&&D.lastSelOrigin==H&&(D.lastModTime==D.lastSelTime&&D.lastOrigin==H||Ff(A,H,ir(D.done),y))?D.done[D.done.length-1]=y:Po(y,D.done),D.lastSelTime=+new Date,D.lastSelOrigin=H,D.lastSelOp=I,B&&B.clearRedo!==!1&&bs(D.undone)}function Po(A,y){var I=ir(y);I&&I.ranges&&I.equals(A)||y.push(A)}function Is(A,y,I,B){var D=y["spans_"+A.id],H=0;A.iter(Math.max(A.first,I),Math.min(A.first+A.size,B),function(ue){ue.markedSpans&&((D||(D=y["spans_"+A.id]={}))[H]=ue.markedSpans),++H})}function rh(A){if(!A)return null;for(var y,I=0;I<A.length;++I)A[I].marker.explicitlyCleared?y||(y=A.slice(0,I)):y&&y.push(A[I]);return y?y.length?y:null:A}function EA(A,y){var I=y["spans_"+A.id];if(!I)return null;for(var B=[],D=0;D<y.text.length;++D)B.push(rh(I[D]));return B}function ih(A,y){var I=EA(A,y),B=Jr(A,y);if(!I)return B;if(!B)return I;for(var D=0;D<I.length;++D){var H=I[D],ue=B[D];if(H&&ue)e:for(var _e=0;_e<ue.length;++_e){for(var ke=ue[_e],ze=0;ze<H.length;++ze)if(H[ze].marker==ke.marker)continue e;H.push(ke)}else ue&&(I[D]=ue)}return I}function BA(A,y,I){for(var B=[],D=0;D<A.length;++D){var H=A[D];if(H.ranges){B.push(I?Os.prototype.deepCopy.call(H):H);continue}var ue=H.changes,_e=[];B.push({changes:_e});for(var ke=0;ke<ue.length;++ke){var ze=ue[ke],mt=void 0;if(_e.push({from:ze.from,to:ze.to,text:ze.text}),y)for(var Mt in ze)(mt=Mt.match(/^spans_(\d+)$/))&&nt(y,Number(mt[1]))>-1&&(ir(_e)[Mt]=ze[Mt],delete ze[Mt])}}return B}function Qs(A,y,I,B){if(B){var D=A.anchor;if(I){var H=sr(y,D)<0;H!=sr(I,D)<0?(D=y,y=I):H!=sr(y,I)<0&&(y=I)}return new bo(D,y)}else return new bo(I||y,y)}function wc(A,y,I,B,D){D==null&&(D=A.cm&&(A.cm.display.shift||A.extend)),Ca(A,new Os([Qs(A.sel.primary(),y,I,D)],0),B)}function Gl(A,y,I){for(var B=[],D=A.cm&&(A.cm.display.shift||A.extend),H=0;H<A.sel.ranges.length;H++)B[H]=Qs(A.sel.ranges[H],y[H],null,D);var ue=_u(A.cm,B,A.sel.primIndex);Ca(A,ue,I)}function hl(A,y,I,B){var D=A.sel.ranges.slice(0);D[y]=I,Ca(A,_u(A.cm,D,A.sel.primIndex),B)}function qu(A,y,I,B){Ca(A,Na(y,I),B)}function Mc(A,y,I){var B={ranges:y.ranges,update:function(D){this.ranges=[];for(var H=0;H<D.length;H++)this.ranges[H]=new bo(ri(A,D[H].anchor),ri(A,D[H].head))},origin:I&&I.origin};return ct(A,"beforeSelectionChange",A,B),A.cm&&ct(A.cm,"beforeSelectionChange",A.cm,B),B.ranges!=y.ranges?_u(A.cm,B.ranges,B.ranges.length-1):y}function wu(A,y,I){var B=A.history.done,D=ir(B);D&&D.ranges?(B[B.length-1]=y,Xs(A,y,I)):Ca(A,y,I)}function Ca(A,y,I){Xs(A,y,I),xu(A,A.sel,A.cm?A.cm.curOp.id:NaN,I)}function Xs(A,y,I){($t(A,"beforeSelectionChange")||A.cm&&$t(A.cm,"beforeSelectionChange"))&&(y=Mc(A,y,I));var B=I&&I.bias||(sr(y.primary().head,A.sel.primary().head)<0?-1:1);au(A,cA(A,y,B,!0)),!(I&&I.scroll===!1)&&A.cm&&A.cm.getOption("readOnly")!="nocursor"&&zo(A.cm)}function au(A,y){y.equals(A.sel)||(A.sel=y,A.cm&&(A.cm.curOp.updateInput=1,A.cm.curOp.selectionChanged=!0,Gt(A.cm)),Zs(A,"cursorActivity",A))}function lu(A){au(A,cA(A,A.sel,null,!1))}function cA(A,y,I,B){for(var D,H=0;H<y.ranges.length;H++){var ue=y.ranges[H],_e=y.ranges.length==A.sel.ranges.length&&A.sel.ranges[H],ke=Sc(A,ue.anchor,_e&&_e.anchor,I,B),ze=ue.head==ue.anchor?ke:Sc(A,ue.head,_e&&_e.head,I,B);(D||ke!=ue.anchor||ze!=ue.head)&&(D||(D=y.ranges.slice(0,H)),D[H]=new bo(ke,ze))}return D?_u(A.cm,D,y.primIndex):y}function Mu(A,y,I,B,D){var H=Kr(A,y.line);if(H.markedSpans)for(var ue=0;ue<H.markedSpans.length;++ue){var _e=H.markedSpans[ue],ke=_e.marker,ze="selectLeft"in ke?!ke.selectLeft:ke.inclusiveLeft,mt="selectRight"in ke?!ke.selectRight:ke.inclusiveRight;if((_e.from==null||(ze?_e.from<=y.ch:_e.from<y.ch))&&(_e.to==null||(mt?_e.to>=y.ch:_e.to>y.ch))){if(D&&(ct(ke,"beforeCursorEnter"),ke.explicitlyCleared))if(H.markedSpans){--ue;continue}else break;if(!ke.atomic)continue;if(I){var Mt=ke.find(B<0?1:-1),Xt=void 0;if((B<0?mt:ze)&&(Mt=Yu(A,Mt,-B,Mt&&Mt.line==y.line?H:null)),Mt&&Mt.line==y.line&&(Xt=sr(Mt,I))&&(B<0?Xt<0:Xt>0))return Mu(A,Mt,y,B,D)}var Qt=ke.find(B<0?-1:1);return(B<0?ze:mt)&&(Qt=Yu(A,Qt,B,Qt.line==y.line?H:null)),Qt?Mu(A,Qt,y,B,D):null}}return y}function Sc(A,y,I,B,D){var H=B||1,ue=Mu(A,y,I,H,D)||!D&&Mu(A,y,I,H,!0)||Mu(A,y,I,-H,D)||!D&&Mu(A,y,I,-H,!0);return ue||(A.cantEdit=!0,An(A.first,0))}function Yu(A,y,I,B){return I<0&&y.ch==0?y.line>A.first?ri(A,An(y.line-1)):null:I>0&&y.ch==(B||Kr(A,y.line)).text.length?y.line<A.first+A.size-1?An(y.line+1,0):null:new An(y.line,y.ch+I)}function Ql(A){A.setSelection(An(A.firstLine(),0),An(A.lastLine()),Ut)}function wd(A,y,I){var B={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return B.canceled=!0}};return I&&(B.update=function(D,H,ue,_e){D&&(B.from=ri(A,D)),H&&(B.to=ri(A,H)),ue&&(B.text=ue),_e!==void 0&&(B.origin=_e)}),ct(A,"beforeChange",A,B),A.cm&&ct(A.cm,"beforeChange",A.cm,B),B.canceled?(A.cm&&(A.cm.curOp.updateInput=2),null):{from:B.from,to:B.to,text:B.text,origin:B.origin}}function T(A,y,I){if(A.cm){if(!A.cm.curOp)return Di(A.cm,T)(A,y,I);if(A.cm.state.suppressEdits)return}if(!(($t(A,"beforeChange")||A.cm&&$t(A.cm,"beforeChange"))&&(y=wd(A,y,!0),!y))){var B=fo&&!I&&Ni(A,y.from,y.to);if(B)for(var D=B.length-1;D>=0;--D)l(A,{from:B[D].from,to:B[D].to,text:D?[""]:y.text,origin:y.origin});else l(A,y)}}function l(A,y){if(!(y.text.length==1&&y.text[0]==""&&sr(y.from,y.to)==0)){var I=ou(A,y);su(A,y,I,A.cm?A.cm.curOp.id:NaN),M(A,y,I,Jr(A,y));var B=[];da(A,function(D,H){!H&&nt(B,D.history)==-1&&(se(D.history,y),B.push(D.history)),M(D,y,null,Jr(D,y))})}}function c(A,y,I){var B=A.cm&&A.cm.state.suppressEdits;if(!(B&&!I)){for(var D=A.history,H,ue=A.sel,_e=y=="undo"?D.done:D.undone,ke=y=="undo"?D.undone:D.done,ze=0;ze<_e.length&&(H=_e[ze],!(I?H.ranges&&!H.equals(A.sel):!H.ranges));ze++);if(ze!=_e.length){for(D.lastOrigin=D.lastSelOrigin=null;;)if(H=_e.pop(),H.ranges){if(Po(H,ke),I&&!H.equals(A.sel)){Ca(A,H,{clearRedo:!1});return}ue=H}else if(B){_e.push(H);return}else break;var mt=[];Po(ue,ke),ke.push({changes:mt,generation:D.generation}),D.generation=H.generation||++D.maxGeneration;for(var Mt=$t(A,"beforeChange")||A.cm&&$t(A.cm,"beforeChange"),Xt=function(Kn){var Zn=H.changes[Kn];if(Zn.origin=y,Mt&&!wd(A,Zn,!1))return _e.length=0,{};mt.push(bu(A,Zn));var or=Kn?ou(A,Zn):ir(_e);M(A,Zn,or,ih(A,Zn)),!Kn&&A.cm&&A.cm.scrollIntoView({from:Zn.from,to:Ks(Zn)});var br=[];da(A,function(dr,Lr){!Lr&&nt(br,dr.history)==-1&&(se(dr.history,Zn),br.push(dr.history)),M(dr,Zn,null,ih(dr,Zn))})},Qt=H.changes.length-1;Qt>=0;--Qt){var Mn=Xt(Qt);if(Mn)return Mn.v}}}}function _(A,y){if(y!=0&&(A.first+=y,A.sel=new Os(Dn(A.sel.ranges,function(D){return new bo(An(D.anchor.line+y,D.anchor.ch),An(D.head.line+y,D.head.ch))}),A.sel.primIndex),A.cm)){Tl(A.cm,A.first,A.first-y,y);for(var I=A.cm.display,B=I.viewFrom;B<I.viewTo;B++)gc(A.cm,B,"gutter")}}function M(A,y,I,B){if(A.cm&&!A.cm.curOp)return Di(A.cm,M)(A,y,I,B);if(y.to.line<A.first){_(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 D=y.text.length-1-(A.first-y.from.line);_(A,D),y={from:An(A.first,0),to:An(y.to.line+D,y.to.ch),text:[ir(y.text)],origin:y.origin}}var H=A.lastLine();y.to.line>H&&(y={from:y.from,to:An(H,Kr(A,H).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Za(A,y.from,y.to),I||(I=ou(A,y)),A.cm?R(A.cm,y,B):gs(A,y,B),Xs(A,I,Ut),A.cantEdit&&Sc(A,An(A.firstLine(),0))&&(A.cantEdit=!1)}}function R(A,y,I){var B=A.doc,D=A.display,H=y.from,ue=y.to,_e=!1,ke=H.line;A.options.lineWrapping||(ke=qe(vr(Kr(B,H.line))),B.iter(ke,ue.line+1,function(Qt){if(Qt==D.maxLine)return _e=!0,!0})),B.sel.contains(y.from,y.to)>-1&&Gt(A),gs(B,y,I,Nc(A)),A.options.lineWrapping||(B.iter(ke,H.line+y.text.length,function(Qt){var Mn=us(Qt);Mn>D.maxLineLength&&(D.maxLine=Qt,D.maxLineLength=Mn,D.maxLineChanged=!0,_e=!1)}),_e&&(A.curOp.updateMaxLine=!0)),Vs(B,H.line),yd(A,400);var ze=y.text.length-(ue.line-H.line)-1;y.full?Tl(A):H.line==ue.line&&y.text.length==1&&!xc(A.doc,y)?gc(A,H.line,"text"):Tl(A,H.line,ue.line+1,ze);var mt=$t(A,"changes"),Mt=$t(A,"change");if(Mt||mt){var Xt={from:H,to:ue,text:y.text,removed:y.removed,origin:y.origin};Mt&&Zs(A,"change",A,Xt),mt&&(A.curOp.changeObjs||(A.curOp.changeObjs=[])).push(Xt)}A.display.selForContextMenu=null}function j(A,y,I,B,D){var H;B||(B=I),sr(B,I)<0&&(H=[B,I],I=H[0],B=H[1]),typeof y=="string"&&(y=A.splitLines(y)),T(A,{from:I,to:B,text:y,origin:D})}function $(A,y,I,B){I<A.line?A.line+=B:y<A.line&&(A.line=y,A.ch=0)}function te(A,y,I,B){for(var D=0;D<A.length;++D){var H=A[D],ue=!0;if(H.ranges){H.copied||(H=A[D]=H.deepCopy(),H.copied=!0);for(var _e=0;_e<H.ranges.length;_e++)$(H.ranges[_e].anchor,y,I,B),$(H.ranges[_e].head,y,I,B);continue}for(var ke=0;ke<H.changes.length;++ke){var ze=H.changes[ke];if(I<ze.from.line)ze.from=An(ze.from.line+B,ze.from.ch),ze.to=An(ze.to.line+B,ze.to.ch);else if(y<=ze.to.line){ue=!1;break}}ue||(A.splice(0,D+1),D=0)}}function se(A,y){var I=y.from.line,B=y.to.line,D=y.text.length-(B-I)-1;te(A.done,I,B,D),te(A.undone,I,B,D)}function we(A,y,I,B){var D=y,H=y;return typeof y=="number"?H=Kr(A,vA(A,y)):D=qe(y),D==null?null:(B(H,D)&&A.cm&&gc(A.cm,D,I),H)}function Ie(A){this.lines=A,this.parent=null;for(var y=0,I=0;I<A.length;++I)A[I].parent=this,y+=A[I].height;this.height=y}Ie.prototype={chunkSize:function(){return this.lines.length},removeInner:function(A,y){for(var I=A,B=A+y;I<B;++I){var D=this.lines[I];this.height-=D.height,Hs(D),Zs(D,"delete")}this.lines.splice(A,y)},collapse:function(A){A.push.apply(A,this.lines)},insertInner:function(A,y,I){this.height+=I,this.lines=this.lines.slice(0,A).concat(y).concat(this.lines.slice(A));for(var B=0;B<y.length;++B)y[B].parent=this},iterN:function(A,y,I){for(var B=A+y;A<B;++A)if(I(this.lines[A]))return!0}};function Re(A){this.children=A;for(var y=0,I=0,B=0;B<A.length;++B){var D=A[B];y+=D.chunkSize(),I+=D.height,D.parent=this}this.size=y,this.height=I,this.parent=null}Re.prototype={chunkSize:function(){return this.size},removeInner:function(A,y){this.size-=y;for(var I=0;I<this.children.length;++I){var B=this.children[I],D=B.chunkSize();if(A<D){var H=Math.min(y,D-A),ue=B.height;if(B.removeInner(A,H),this.height-=ue-B.height,D==H&&(this.children.splice(I--,1),B.parent=null),(y-=H)==0)break;A=0}else A-=D}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof Ie))){var _e=[];this.collapse(_e),this.children=[new Ie(_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,I){this.size+=y.length,this.height+=I;for(var B=0;B<this.children.length;++B){var D=this.children[B],H=D.chunkSize();if(A<=H){if(D.insertInner(A,y,I),D.lines&&D.lines.length>50){for(var ue=D.lines.length%25+25,_e=ue;_e<D.lines.length;){var ke=new Ie(D.lines.slice(_e,_e+=25));D.height-=ke.height,this.children.splice(++B,0,ke),ke.parent=this}D.lines=D.lines.slice(0,ue),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),I=new Re(y);if(A.parent){A.size-=I.size,A.height-=I.height;var D=nt(A.parent.children,A);A.parent.children.splice(D+1,0,I)}else{var B=new Re(A.children);B.parent=A,A.children=[B,I],A=B}I.parent=A.parent}while(A.children.length>10);A.parent.maybeSpill()}},iterN:function(A,y,I){for(var B=0;B<this.children.length;++B){var D=this.children[B],H=D.chunkSize();if(A<H){var ue=Math.min(y,H-A);if(D.iterN(A,ue,I))return!0;if((y-=ue)==0)break;A=0}else A-=H}}};var $e=function(A,y,I){if(I)for(var B in I)I.hasOwnProperty(B)&&(this[B]=I[B]);this.doc=A,this.node=y};$e.prototype.clear=function(){var A=this.doc.cm,y=this.line.widgets,I=this.line,B=qe(I);if(!(B==null||!y)){for(var D=0;D<y.length;++D)y[D]==this&&y.splice(D--,1);y.length||(I.widgets=null);var H=mu(this);ia(I,Math.max(0,I.height-H)),A&&(Bo(A,function(){Ze(A,I,-H),gc(A,B,"widget")}),Zs(A,"lineWidgetCleared",A,this,B))}},$e.prototype.changed=function(){var A=this,y=this.height,I=this.doc.cm,B=this.line;this.height=null;var D=mu(this)-y;D&&(qr(this.doc,B)||ia(B,B.height+D),I&&Bo(I,function(){I.curOp.forceUpdate=!0,Ze(I,B,D),Zs(I,"lineWidgetChanged",I,A,qe(B))}))},jt($e);function Ze(A,y,I){Zi(y)<(A.curOp&&A.curOp.scrollTop||A.doc.scrollTop)&&As(A,I)}function ft(A,y,I,B){var D=new $e(A,I,B),H=A.cm;return H&&D.noHScroll&&(H.display.alignWidgets=!0),we(A,y,"widget",function(ue){var _e=ue.widgets||(ue.widgets=[]);if(D.insertAt==null?_e.push(D):_e.splice(Math.min(_e.length,Math.max(0,D.insertAt)),0,D),D.line=ue,H&&!qr(A,ue)){var ke=Zi(ue)<A.scrollTop;ia(ue,ue.height+mu(D)),ke&&As(H,D.height),H.curOp.forceUpdate=!0}return!0}),H&&Zs(H,"lineWidgetAdded",H,D,typeof y=="number"?y:qe(y)),D}var lt=0,pt=function(A,y){this.lines=[],this.type=y,this.doc=A,this.id=++lt};pt.prototype.clear=function(){if(!this.explicitlyCleared){var A=this.doc.cm,y=A&&!A.curOp;if(y&&Nu(A),$t(this,"clear")){var I=this.find();I&&Zs(this,"clear",I.from,I.to)}for(var B=null,D=null,H=0;H<this.lines.length;++H){var ue=this.lines[H],_e=El(ue.markedSpans,this);A&&!this.collapsed?gc(A,qe(ue),"text"):A&&(_e.to!=null&&(D=qe(ue)),_e.from!=null&&(B=qe(ue))),ue.markedSpans=oA(ue.markedSpans,_e),_e.from==null&&this.collapsed&&!qr(this.doc,ue)&&A&&ia(ue,kl(A.display))}if(A&&this.collapsed&&!A.options.lineWrapping)for(var ke=0;ke<this.lines.length;++ke){var ze=vr(this.lines[ke]),mt=us(ze);mt>A.display.maxLineLength&&(A.display.maxLine=ze,A.display.maxLineLength=mt,A.display.maxLineChanged=!0)}B!=null&&A&&this.collapsed&&Tl(A,B,D+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,A&&lu(A.doc)),A&&Zs(A,"markerCleared",A,this,B,D),y&&Wu(A),this.parent&&this.parent.clear()}},pt.prototype.find=function(A,y){A==null&&this.type=="bookmark"&&(A=1);for(var I,B,D=0;D<this.lines.length;++D){var H=this.lines[D],ue=El(H.markedSpans,this);if(ue.from!=null&&(I=An(y?H:qe(H),ue.from),A==-1))return I;if(ue.to!=null&&(B=An(y?H:qe(H),ue.to),A==1))return B}return I&&{from:I,to:B}},pt.prototype.changed=function(){var A=this,y=this.find(-1,!0),I=this,B=this.doc.cm;!y||!B||Bo(B,function(){var D=y.line,H=qe(y.line),ue=CA(B,H);if(ue&&($d(ue),B.curOp.selectionChanged=B.curOp.forceUpdate=!0),B.curOp.updateMaxLine=!0,!qr(I.doc,D)&&I.height!=null){var _e=I.height;I.height=null;var ke=mu(I)-_e;ke&&ia(D,D.height+ke)}Zs(B,"markerChanged",B,A)})},pt.prototype.attachLine=function(A){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||nt(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(A)},pt.prototype.detachLine=function(A){if(this.lines.splice(nt(this.lines,A),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},jt(pt);function vt(A,y,I,B,D){if(B&&B.shared)return kt(A,y,I,B,D);if(A.cm&&!A.cm.curOp)return Di(A.cm,vt)(A,y,I,B,D);var H=new pt(A,D),ue=sr(y,I);if(B&&Le(B,H,!1),ue>0||ue==0&&H.clearWhenEmpty!==!1)return H;if(H.replacedWith&&(H.collapsed=!0,H.widgetNode=at("span",[H.replacedWith],"CodeMirror-widget"),B.handleMouseEvents||H.widgetNode.setAttribute("cm-ignore-events","true"),B.insertLeft&&(H.widgetNode.insertLeft=!0)),H.collapsed){if(ci(A,y.line,y,I,H)||y.line!=I.line&&ci(A,I.line,y,I,H))throw new Error("Inserting collapsed marker partially overlapping an existing one");el()}H.addToHistory&&su(A,{from:y,to:I,origin:"markText"},A.sel,NaN);var _e=y.line,ke=A.cm,ze;if(A.iter(_e,I.line+1,function(Mt){ke&&H.collapsed&&!ke.options.lineWrapping&&vr(Mt)==ke.display.maxLine&&(ze=!0),H.collapsed&&_e!=y.line&&ia(Mt,0),Vi(Mt,new Ds(H,_e==y.line?y.ch:null,_e==I.line?I.ch:null),A.cm&&A.cm.curOp),++_e}),H.collapsed&&A.iter(y.line,I.line+1,function(Mt){qr(A,Mt)&&ia(Mt,0)}),H.clearOnEnter&&je(H,"beforeCursorEnter",function(){return H.clear()}),H.readOnly&&(Ms(),(A.history.done.length||A.history.undone.length)&&A.clearHistory()),H.collapsed&&(H.id=++lt,H.atomic=!0),ke){if(ze&&(ke.curOp.updateMaxLine=!0),H.collapsed)Tl(ke,y.line,I.line+1);else if(H.className||H.startStyle||H.endStyle||H.css||H.attributes||H.title)for(var mt=y.line;mt<=I.line;mt++)gc(ke,mt,"text");H.atomic&&lu(ke.doc),Zs(ke,"markerAdded",ke,H)}return H}var Bt=function(A,y){this.markers=A,this.primary=y;for(var I=0;I<A.length;++I)A[I].parent=this};Bt.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var A=0;A<this.markers.length;++A)this.markers[A].clear();Zs(this,"clear")}},Bt.prototype.find=function(A,y){return this.primary.find(A,y)},jt(Bt);function kt(A,y,I,B,D){B=Le(B),B.shared=!1;var H=[vt(A,y,I,B,D)],ue=H[0],_e=B.widgetNode;return da(A,function(ke){_e&&(B.widgetNode=_e.cloneNode(!0)),H.push(vt(ke,ri(ke,y),ri(ke,I),B,D));for(var ze=0;ze<ke.linked.length;++ze)if(ke.linked[ze].isParent)return;ue=ir(H)}),new Bt(H,ue)}function Rt(A){return A.findMarks(An(A.first,0),A.clipPos(An(A.lastLine())),function(y){return y.parent})}function zt(A,y){for(var I=0;I<y.length;I++){var B=y[I],D=B.find(),H=A.clipPos(D.from),ue=A.clipPos(D.to);if(sr(H,ue)){var _e=vt(A,H,ue,B.primary,B.primary.type);B.markers.push(_e),_e.parent=B}}}function Tt(A){for(var y=function(B){var D=A[B],H=[D.primary.doc];da(D.primary.doc,function(ke){return H.push(ke)});for(var ue=0;ue<D.markers.length;ue++){var _e=D.markers[ue];nt(H,_e.doc)==-1&&(_e.parent=null,D.markers.splice(ue--,1))}},I=0;I<A.length;I++)y(I)}var tn=0,Zt=function(A,y,I,B,D){if(!(this instanceof Zt))return new Zt(A,y,I,B,D);I==null&&(I=0),Re.call(this,[new Ie([new Ua("",null)])]),this.first=I,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=I;var H=An(I,0);this.sel=Na(H),this.history=new rc(null),this.id=++tn,this.modeOption=y,this.lineSep=B,this.direction=D=="rtl"?"rtl":"ltr",this.extend=!1,typeof A=="string"&&(A=this.splitLines(A)),gs(this,{from:H,to:H,text:A}),Ca(this,Na(H),Ut)};Zt.prototype=wr(Re.prototype,{constructor:Zt,iter:function(A,y,I){I?this.iterN(A-this.first,y-A,I):this.iterN(this.first,this.first+this.size,A)},insert:function(A,y){for(var I=0,B=0;B<y.length;++B)I+=y[B].height;this.insertInner(A-this.first,y,I)},remove:function(A,y){this.removeInner(A-this.first,y)},getValue:function(A){var y=Ps(this,this.first,this.first+this.size);return A===!1?y:y.join(A||this.lineSeparator())},setValue:Es(function(A){var y=An(this.first,0),I=this.first+this.size-1;T(this,{from:y,to:An(I,Kr(this,I).text.length),text:this.splitLines(A),origin:"setValue",full:!0},!0),this.cm&&cs(this.cm,0,0),Ca(this,Na(y),Ut)}),replaceRange:function(A,y,I,B){y=ri(this,y),I=I?ri(this,I):y,j(this,A,y,I,B)},getRange:function(A,y,I){var B=Za(this,ri(this,A),ri(this,y));return I===!1?B:I===""?B.join(""):B.join(I||this.lineSeparator())},getLine:function(A){var y=this.getLineHandle(A);return y&&y.text},getLineHandle:function(A){if(gn(this,A))return Kr(this,A)},getLineNumber:function(A){return qe(A)},getLineHandleVisualStart:function(A){return typeof A=="number"&&(A=Kr(this,A)),vr(A)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(A){return ri(this,A)},getCursor:function(A){var y=this.sel.primary(),I;return A==null||A=="head"?I=y.head:A=="anchor"?I=y.anchor:A=="end"||A=="to"||A===!1?I=y.to():I=y.from(),I},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Es(function(A,y,I){qu(this,ri(this,typeof A=="number"?An(A,y||0):A),null,I)}),setSelection:Es(function(A,y,I){qu(this,ri(this,A),ri(this,y||A),I)}),extendSelection:Es(function(A,y,I){wc(this,ri(this,A),y&&ri(this,y),I)}),extendSelections:Es(function(A,y){Gl(this,Xa(this,A),y)}),extendSelectionsBy:Es(function(A,y){var I=Dn(this.sel.ranges,A);Gl(this,Xa(this,I),y)}),setSelections:Es(function(A,y,I){if(A.length){for(var B=[],D=0;D<A.length;D++)B[D]=new bo(ri(this,A[D].anchor),ri(this,A[D].head||A[D].anchor));y==null&&(y=Math.min(A.length-1,this.sel.primIndex)),Ca(this,_u(this.cm,B,y),I)}}),addSelection:Es(function(A,y,I){var B=this.sel.ranges.slice(0);B.push(new bo(ri(this,A),ri(this,y||A))),Ca(this,_u(this.cm,B,B.length-1),I)}),getSelection:function(A){for(var y=this.sel.ranges,I,B=0;B<y.length;B++){var D=Za(this,y[B].from(),y[B].to());I=I?I.concat(D):D}return A===!1?I:I.join(A||this.lineSeparator())},getSelections:function(A){for(var y=[],I=this.sel.ranges,B=0;B<I.length;B++){var D=Za(this,I[B].from(),I[B].to());A!==!1&&(D=D.join(A||this.lineSeparator())),y[B]=D}return y},replaceSelection:function(A,y,I){for(var B=[],D=0;D<this.sel.ranges.length;D++)B[D]=A;this.replaceSelections(B,y,I||"+input")},replaceSelections:Es(function(A,y,I){for(var B=[],D=this.sel,H=0;H<D.ranges.length;H++){var ue=D.ranges[H];B[H]={from:ue.from(),to:ue.to(),text:this.splitLines(A[H]),origin:I}}for(var _e=y&&y!="end"&&bc(this,B,y),ke=B.length-1;ke>=0;ke--)T(this,B[ke]);_e?wu(this,_e):this.cm&&zo(this.cm)}),undo:Es(function(){c(this,"undo")}),redo:Es(function(){c(this,"redo")}),undoSelection:Es(function(){c(this,"undo",!0)}),redoSelection:Es(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,I=0,B=0;B<A.done.length;B++)A.done[B].ranges||++y;for(var D=0;D<A.undone.length;D++)A.undone[D].ranges||++I;return{undo:y,redo:I}},clearHistory:function(){var A=this;this.history=new rc(this.history),da(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 rc(this.history);y.done=BA(A.done.slice(0),null,!0),y.undone=BA(A.undone.slice(0),null,!0)},setGutterMarker:Es(function(A,y,I){return we(this,A,"gutter",function(B){var D=B.gutterMarkers||(B.gutterMarkers={});return D[y]=I,!I&&Ae(D)&&(B.gutterMarkers=null),!0})}),clearGutter:Es(function(A){var y=this;this.iter(function(I){I.gutterMarkers&&I.gutterMarkers[A]&&we(y,I,"gutter",function(){return I.gutterMarkers[A]=null,Ae(I.gutterMarkers)&&(I.gutterMarkers=null),!0})})}),lineInfo:function(A){var y;if(typeof A=="number"){if(!gn(this,A)||(y=A,A=Kr(this,A),!A))return null}else if(y=qe(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:Es(function(A,y,I){return we(this,A,y=="gutter"?"gutter":"class",function(B){var D=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!B[D])B[D]=I;else{if(Me(I).test(B[D]))return!1;B[D]+=" "+I}return!0})}),removeLineClass:Es(function(A,y,I){return we(this,A,y=="gutter"?"gutter":"class",function(B){var D=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",H=B[D];if(H)if(I==null)B[D]=null;else{var ue=H.match(Me(I));if(!ue)return!1;var _e=ue.index+ue[0].length;B[D]=H.slice(0,ue.index)+(!ue.index||_e==H.length?"":" ")+H.slice(_e)||null}else return!1;return!0})}),addLineWidget:Es(function(A,y,I){return ft(this,A,y,I)}),removeLineWidget:function(A){A.clear()},markText:function(A,y,I){return vt(this,ri(this,A),ri(this,y),I,I&&I.type||"range")},setBookmark:function(A,y){var I={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return A=ri(this,A),vt(this,A,A,I,"bookmark")},findMarksAt:function(A){A=ri(this,A);var y=[],I=Kr(this,A.line).markedSpans;if(I)for(var B=0;B<I.length;++B){var D=I[B];(D.from==null||D.from<=A.ch)&&(D.to==null||D.to>=A.ch)&&y.push(D.marker.parent||D.marker)}return y},findMarks:function(A,y,I){A=ri(this,A),y=ri(this,y);var B=[],D=A.line;return this.iter(A.line,y.line+1,function(H){var ue=H.markedSpans;if(ue)for(var _e=0;_e<ue.length;_e++){var ke=ue[_e];!(ke.to!=null&&D==A.line&&A.ch>=ke.to||ke.from==null&&D!=A.line||ke.from!=null&&D==y.line&&ke.from>=y.ch)&&(!I||I(ke.marker))&&B.push(ke.marker.parent||ke.marker)}++D}),B},getAllMarks:function(){var A=[];return this.iter(function(y){var I=y.markedSpans;if(I)for(var B=0;B<I.length;++B)I[B].from!=null&&A.push(I[B].marker)}),A},posFromIndex:function(A){var y,I=this.first,B=this.lineSeparator().length;return this.iter(function(D){var H=D.text.length+B;if(H>A)return y=A,!0;A-=H,++I}),ri(this,An(I,y))},indexFromPos:function(A){A=ri(this,A);var y=A.ch;if(A.line<this.first||A.ch<0)return 0;var I=this.lineSeparator().length;return this.iter(this.first,A.line,function(B){y+=B.text.length+I}),y},copy:function(A){var y=new Zt(Ps(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,I=this.first+this.size;A.from!=null&&A.from>y&&(y=A.from),A.to!=null&&A.to<I&&(I=A.to);var B=new Zt(Ps(this,y,I),A.mode||this.modeOption,y,this.lineSep,this.direction);return A.sharedHist&&(B.history=this.history),(this.linked||(this.linked=[])).push({doc:B,sharedHist:A.sharedHist}),B.linked=[{doc:this,isParent:!0,sharedHist:A.sharedHist}],zt(B,Rt(this)),B},unlinkDoc:function(A){if(A instanceof Io&&(A=A.doc),this.linked)for(var y=0;y<this.linked.length;++y){var I=this.linked[y];if(I.doc==A){this.linked.splice(y,1),A.unlinkDoc(this),Tt(Rt(this));break}}if(A.history==this.history){var B=[A.id];da(A,function(D){return B.push(D.id)},!0),A.history=new rc(null),A.history.done=BA(this.history.done,B),A.history.undone=BA(this.history.undone,B)}},iterLinkedDocs:function(A){da(this,A)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(A){return this.lineSep?A.split(this.lineSep):ur(A)},lineSeparator:function(){return this.lineSep||`
|
||
`},setDirection:Es(function(A){A!="rtl"&&(A="ltr"),A!=this.direction&&(this.direction=A,this.iter(function(y){return y.order=null}),this.cm&&Qu(this.cm))})}),Zt.prototype.eachLine=Zt.prototype.iter;var _n=0;function bn(A){var y=this;if(Wn(y),!(At(y,A)||aA(y.display,A))){xt(A),d&&(_n=+new Date);var I=_A(y,A,!0),B=A.dataTransfer.files;if(!(!I||y.isReadOnly()))if(B&&B.length&&window.FileReader&&window.File)for(var D=B.length,H=Array(D),ue=0,_e=function(){++ue==D&&Di(y,function(){I=ri(y.doc,I);var Qt={from:I,to:I,text:y.doc.splitLines(H.filter(function(Mn){return Mn!=null}).join(y.doc.lineSeparator())),origin:"paste"};T(y.doc,Qt),wu(y.doc,Na(ri(y.doc,I),ri(y.doc,Ks(Qt))))})()},ke=function(Qt,Mn){if(y.options.allowDropFileTypes&&nt(y.options.allowDropFileTypes,Qt.type)==-1){_e();return}var Kn=new FileReader;Kn.onerror=function(){return _e()},Kn.onload=function(){var Zn=Kn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Zn)){_e();return}H[Mn]=Zn,_e()},Kn.readAsText(Qt)},ze=0;ze<B.length;ze++)ke(B[ze],ze);else{if(y.state.draggingText&&y.doc.sel.contains(I)>-1){y.state.draggingText(A),setTimeout(function(){return y.display.input.focus()},20);return}try{var mt=A.dataTransfer.getData("Text");if(mt){var Mt;if(y.state.draggingText&&!y.state.draggingText.copy&&(Mt=y.listSelections()),Xs(y.doc,Na(I,I)),Mt)for(var Xt=0;Xt<Mt.length;++Xt)j(y.doc,"",Mt[Xt].anchor,Mt[Xt].head,"drag");y.replaceSelection(mt,"around","paste"),y.display.input.focus()}}catch{}}}}function vn(A,y){if(d&&(!A.state.draggingText||+new Date-_n<100)){fr(y);return}if(!(At(A,y)||aA(A.display,y))&&(y.dataTransfer.setData("Text",A.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!U)){var I=me("img",null,null,"position: fixed; left: 0; top: 0;");I.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",k&&(I.width=I.height=1,A.display.wrapper.appendChild(I),I._top=I.offsetTop),y.dataTransfer.setDragImage(I,0,0),k&&I.parentNode.removeChild(I)}}function In(A,y){var I=_A(A,y);if(I){var B=document.createDocumentFragment();yc(A,I,B),A.display.dragCursor||(A.display.dragCursor=me("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),A.display.lineSpace.insertBefore(A.display.dragCursor,A.display.cursorDiv)),De(A.display.dragCursor,B)}}function Wn(A){A.display.dragCursor&&(A.display.lineSpace.removeChild(A.display.dragCursor),A.display.dragCursor=null)}function Sn(A){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),I=[],B=0;B<y.length;B++){var D=y[B].CodeMirror;D&&I.push(D)}I.length&&I[0].operation(function(){for(var H=0;H<I.length;H++)A(I[H])})}}var Tr=!1;function Bi(){Tr||($i(),Tr=!0)}function $i(){var A;je(window,"resize",function(){A==null&&(A=setTimeout(function(){A=null,Sn(Oo)},100))}),je(window,"blur",function(){return Sn(Ho)})}function Oo(A){var y=A.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,A.setSize()}for(var Si={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++)Si[jo+48]=Si[jo+96]=String(jo);for(var No=65;No<=90;No++)Si[No]=String.fromCharCode(No);for(var xo=1;xo<=12;xo++)Si[xo+111]=Si[xo+63235]="F"+xo;var yo={};yo.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"},yo.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"},yo.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"},yo.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"]},yo.default=Y?yo.macDefault:yo.pcDefault;function ka(A){var y=A.split(/-(?!$)/);A=y[y.length-1];for(var I,B,D,H,ue=0;ue<y.length-1;ue++){var _e=y[ue];if(/^(cmd|meta|m)$/i.test(_e))H=!0;else if(/^a(lt)?$/i.test(_e))I=!0;else if(/^(c|ctrl|control)$/i.test(_e))B=!0;else if(/^s(hift)?$/i.test(_e))D=!0;else throw new Error("Unrecognized modifier name: "+_e)}return I&&(A="Alt-"+A),B&&(A="Ctrl-"+A),H&&(A="Cmd-"+A),D&&(A="Shift-"+A),A}function Wo(A){var y={};for(var I in A)if(A.hasOwnProperty(I)){var B=A[I];if(/^(name|fallthrough|(de|at)tach)$/.test(I))continue;if(B=="..."){delete A[I];continue}for(var D=Dn(I.split(" "),ka),H=0;H<D.length;H++){var ue=void 0,_e=void 0;H==D.length-1?(_e=D.join(" "),ue=B):(_e=D.slice(0,H+1).join(" "),ue="...");var ke=y[_e];if(!ke)y[_e]=ue;else if(ke!=ue)throw new Error("Inconsistent bindings for "+_e)}delete A[I]}for(var ze in y)A[ze]=y[ze];return A}function ds(A,y,I,B){y=pl(y);var D=y.call?y.call(A,B):y[A];if(D===!1)return"nothing";if(D==="...")return"multi";if(D!=null&&I(D))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return ds(A,y.fallthrough,I,B);for(var H=0;H<y.fallthrough.length;H++){var ue=ds(A,y.fallthrough[H],I,B);if(ue)return ue}}}function Wa(A){var y=typeof A=="string"?A:Si[A.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function $u(A,y,I){var B=A;return y.altKey&&B!="Alt"&&(A="Alt-"+A),(he?y.metaKey:y.ctrlKey)&&B!="Ctrl"&&(A="Ctrl-"+A),(he?y.ctrlKey:y.metaKey)&&B!="Mod"&&(A="Cmd-"+A),!I&&y.shiftKey&&B!="Shift"&&(A="Shift-"+A),A}function fl(A,y){if(k&&A.keyCode==34&&A.char)return!1;var I=Si[A.keyCode];return I==null||A.altGraphKey?!1:(A.keyCode==3&&A.code&&(I=A.code),$u(I,A,y))}function pl(A){return typeof A=="string"?yo[A]:A}function uu(A,y){for(var I=A.doc.sel.ranges,B=[],D=0;D<I.length;D++){for(var H=y(I[D]);B.length&&sr(H.from,ir(B).to)<=0;){var ue=B.pop();if(sr(ue.from,H.from)<0){H.from=ue.from;break}}B.push(H)}Bo(A,function(){for(var _e=B.length-1;_e>=0;_e--)j(A.doc,"",B[_e].from,B[_e].to,"+delete");zo(A)})}function OA(A,y,I){var B=St(A.text,y+I,I);return B<0||B>A.text.length?null:B}function IA(A,y,I){var B=OA(A,y.ch,I);return B==null?null:new An(y.line,B,I<0?"after":"before")}function Vu(A,y,I,B,D){if(A){y.doc.direction=="rtl"&&(D=-D);var H=ve(I,y.doc.direction);if(H){var ue=D<0?ir(H):H[0],_e=D<0==(ue.level==1),ke=_e?"after":"before",ze;if(ue.level>0||y.doc.direction=="rtl"){var mt=tl(y,I);ze=D<0?I.text.length-1:0;var Mt=Ol(y,mt,ze).top;ze=Yt(function(Xt){return Ol(y,mt,Xt).top==Mt},D<0==(ue.level==1)?ue.from:ue.to-1,ze),ke=="before"&&(ze=OA(I,ze,1))}else ze=D<0?ue.to:ue.from;return new An(B,ze,ke)}}return new An(B,D<0?I.text.length:0,D<0?"before":"after")}function Js(A,y,I,B){var D=ve(y,A.doc.direction);if(!D)return IA(y,I,B);I.ch>=y.text.length?(I.ch=y.text.length,I.sticky="before"):I.ch<=0&&(I.ch=0,I.sticky="after");var H=Be(D,I.ch,I.sticky),ue=D[H];if(A.doc.direction=="ltr"&&ue.level%2==0&&(B>0?ue.to>I.ch:ue.from<I.ch))return IA(y,I,B);var _e=function(or,br){return OA(y,or instanceof An?or.ch:or,br)},ke,ze=function(or){return A.options.lineWrapping?(ke=ke||tl(A,y),Vo(A,y,ke,or)):{begin:0,end:y.text.length}},mt=ze(I.sticky=="before"?_e(I,-1):I.ch);if(A.doc.direction=="rtl"||ue.level==1){var Mt=ue.level==1==B<0,Xt=_e(I,Mt?1:-1);if(Xt!=null&&(Mt?Xt<=ue.to&&Xt<=mt.end:Xt>=ue.from&&Xt>=mt.begin)){var Qt=Mt?"before":"after";return new An(I.line,Xt,Qt)}}var Mn=function(or,br,dr){for(var Lr=function(ko,Qa){return Qa?new An(I.line,_e(ko,1),"before"):new An(I.line,ko,"after")};or>=0&&or<D.length;or+=br){var ai=D[or],Wr=br>0==(ai.level!=1),Xi=Wr?dr.begin:_e(dr.end,-1);if(ai.from<=Xi&&Xi<ai.to||(Xi=Wr?ai.from:_e(ai.to,-1),dr.begin<=Xi&&Xi<dr.end))return Lr(Xi,Wr)}},Kn=Mn(H+B,B,mt);if(Kn)return Kn;var Zn=B>0?mt.end:_e(mt.begin,-1);return Zn!=null&&!(B>0&&Zn==y.text.length)&&(Kn=Mn(B>0?0:D.length-1,B,ze(Zn)),Kn)?Kn:null}var ml={selectAll:Ql,singleSelection:function(A){return A.setSelection(A.getCursor("anchor"),A.getCursor("head"),Ut)},killLine:function(A){return uu(A,function(y){if(y.empty()){var I=Kr(A.doc,y.head.line).text.length;return y.head.ch==I&&y.head.line<A.lastLine()?{from:y.head,to:An(y.head.line+1,0)}:{from:y.head,to:An(y.head.line,I)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(A){return uu(A,function(y){return{from:An(y.from().line,0),to:ri(A.doc,An(y.to().line+1,0))}})},delLineLeft:function(A){return uu(A,function(y){return{from:An(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(A){return uu(A,function(y){var I=A.charCoords(y.head,"div").top+5,B=A.coordsChar({left:0,top:I},"div");return{from:B,to:y.from()}})},delWrappedLineRight:function(A){return uu(A,function(y){var I=A.charCoords(y.head,"div").top+5,B=A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:I},"div");return{from:y.from(),to:B}})},undo:function(A){return A.undo()},redo:function(A){return A.redo()},undoSelection:function(A){return A.undoSelection()},redoSelection:function(A){return A.redoSelection()},goDocStart:function(A){return A.extendSelection(An(A.firstLine(),0))},goDocEnd:function(A){return A.extendSelection(An(A.lastLine()))},goLineStart:function(A){return A.extendSelectionsBy(function(y){return sa(A,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(A){return A.extendSelectionsBy(function(y){return xs(A,y.head)},{origin:"+move",bias:1})},goLineEnd:function(A){return A.extendSelectionsBy(function(y){return Pl(A,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(A){return A.extendSelectionsBy(function(y){var I=A.cursorCoords(y.head,"div").top+5;return A.coordsChar({left:A.display.lineDiv.offsetWidth+100,top:I},"div")},Ft)},goLineLeft:function(A){return A.extendSelectionsBy(function(y){var I=A.cursorCoords(y.head,"div").top+5;return A.coordsChar({left:0,top:I},"div")},Ft)},goLineLeftSmart:function(A){return A.extendSelectionsBy(function(y){var I=A.cursorCoords(y.head,"div").top+5,B=A.coordsChar({left:0,top:I},"div");return B.ch<A.getLine(B.line).search(/\S/)?xs(A,y.head):B},Ft)},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=[],I=A.listSelections(),B=A.options.tabSize,D=0;D<I.length;D++){var H=I[D].from(),ue=Pe(A.getLine(H.line),H.ch,B);y.push(nn(B-ue%B))}A.replaceSelections(y)},defaultTab:function(A){A.somethingSelected()?A.indentSelection("add"):A.execCommand("insertTab")},transposeChars:function(A){return Bo(A,function(){for(var y=A.listSelections(),I=[],B=0;B<y.length;B++)if(y[B].empty()){var D=y[B].head,H=Kr(A.doc,D.line).text;if(H){if(D.ch==H.length&&(D=new An(D.line,D.ch-1)),D.ch>0)D=new An(D.line,D.ch+1),A.replaceRange(H.charAt(D.ch-1)+H.charAt(D.ch-2),An(D.line,D.ch-2),D,"+transpose");else if(D.line>A.doc.first){var ue=Kr(A.doc,D.line-1).text;ue&&(D=new An(D.line,1),A.replaceRange(H.charAt(0)+A.doc.lineSeparator()+ue.charAt(ue.length-1),An(D.line-1,ue.length-1),D,"+transpose"))}}I.push(new bo(D,D))}A.setSelections(I)})},newlineAndIndent:function(A){return Bo(A,function(){for(var y=A.listSelections(),I=y.length-1;I>=0;I--)A.replaceRange(A.doc.lineSeparator(),y[I].anchor,y[I].head,"+input");y=A.listSelections();for(var B=0;B<y.length;B++)A.indentLine(y[B].from().line,null,!0);zo(A)})},openLine:function(A){return A.replaceSelection(`
|
||
`,"start")},toggleOverwrite:function(A){return A.toggleOverwrite()}};function sa(A,y){var I=Kr(A.doc,y),B=vr(I);return B!=I&&(y=qe(B)),Vu(!0,A,B,y,1)}function Pl(A,y){var I=Kr(A.doc,y),B=kr(I);return B!=I&&(y=qe(B)),Vu(!0,A,I,y,-1)}function xs(A,y){var I=sa(A,y.line),B=Kr(A.doc,I.line),D=ve(B,A.doc.direction);if(!D||D[0].level==0){var H=Math.max(I.ch,B.text.search(/\S/)),ue=y.line==I.line&&y.ch<=H&&y.ch;return An(I.line,ue?0:H,I.sticky)}return I}function qs(A,y,I){if(typeof y=="string"&&(y=ml[y],!y))return!1;A.display.input.ensurePolled();var B=A.display.shift,D=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),I&&(A.display.shift=!1),D=y(A)!=ht}finally{A.display.shift=B,A.state.suppressEdits=!1}return D}function nl(A,y,I){for(var B=0;B<A.state.keyMaps.length;B++){var D=ds(y,A.state.keyMaps[B],I,A);if(D)return D}return A.options.extraKeys&&ds(y,A.options.extraKeys,I,A)||ds(y,A.options.keyMap,I,A)}var rl=new Ee;function Md(A,y,I,B){var D=A.state.keySeq;if(D){if(Wa(y))return"handled";if(/\'$/.test(y)?A.state.keySeq=null:rl.set(50,function(){A.state.keySeq==D&&(A.state.keySeq=null,A.display.input.reset())}),Bh(A,D+" "+y,I,B))return!0}return Bh(A,y,I,B)}function Bh(A,y,I,B){var D=nl(A,y,B);return D=="multi"&&(A.state.keySeq=y),D=="handled"&&Zs(A,"keyHandled",A,y,I),(D=="handled"||D=="multi")&&(xt(I),bA(A)),!!D}function Oh(A,y){var I=fl(y,!0);return I?y.shiftKey&&!A.state.keySeq?Md(A,"Shift-"+I,y,function(B){return qs(A,B,!0)})||Md(A,I,y,function(B){if(typeof B=="string"?/^go[A-Z]/.test(B):B.motion)return qs(A,B)}):Md(A,I,y,function(B){return qs(A,B)}):!1}function Sd(A,y,I){return Md(A,"'"+I+"'",y,function(B){return qs(A,B,!0)})}var ic=null;function Ih(A){var y=this;if(!(A.target&&A.target!=y.display.input.getField())&&(y.curOp.focus=We(bt(y)),!At(y,A))){d&&g<11&&A.keyCode==27&&(A.returnValue=!1);var I=A.keyCode;y.display.shift=I==16||A.shiftKey;var B=Oh(y,A);k&&(ic=B?I:null,!B&&I==88&&!Sa&&(Y?A.metaKey:A.ctrlKey)&&y.replaceSelection("",null,"cut")),i&&!Y&&!B&&I==46&&A.shiftKey&&!A.ctrlKey&&document.execCommand&&document.execCommand("cut"),I==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Ta(y)}}function Ta(A){var y=A.display.lineDiv;Ce(y,"CodeMirror-crosshair");function I(B){(B.keyCode==18||!B.altKey)&&(fe(y,"CodeMirror-crosshair"),tt(document,"keyup",I),tt(document,"mouseover",I))}je(document,"keyup",I),je(document,"mouseover",I)}function Au(A){A.keyCode==16&&(this.doc.sel.shift=!1),At(this,A)}function Ed(A){var y=this;if(!(A.target&&A.target!=y.display.input.getField())&&!(aA(y.display,A)||At(y,A)||A.ctrlKey&&!A.altKey||Y&&A.metaKey)){var I=A.keyCode,B=A.charCode;if(k&&I==ic){ic=null,xt(A);return}if(!(k&&(!A.which||A.which<10)&&Oh(y,A))){var D=String.fromCharCode(B??I);D!="\b"&&(Sd(y,A,D)||y.display.input.onKeyPress(A))}}}var Cp=400,Ec=function(A,y,I){this.time=A,this.pos=y,this.button=I};Ec.prototype.compare=function(A,y,I){return this.time+Cp>A&&sr(y,this.pos)==0&&I==this.button};var kA,Ga;function _p(A,y){var I=+new Date;return Ga&&Ga.compare(I,A,y)?(kA=Ga=null,"triple"):kA&&kA.compare(I,A,y)?(Ga=new Ec(I,A,y),kA=null,"double"):(kA=new Ec(I,A,y),Ga=null,"single")}function kh(A){var y=this,I=y.display;if(!(At(y,A)||I.activeTouch&&I.input.supportsTouch())){if(I.input.ensurePolled(),I.shift=A.shiftKey,aA(I,A)){b||(I.scroller.draggable=!1,setTimeout(function(){return I.scroller.draggable=!0},100));return}if(!sh(y,A)){var B=_A(y,A),D=on(A),H=B?_p(B,D):"single";Dt(y).focus(),D==1&&y.state.selectingText&&y.state.selectingText(A),!(B&&bp(y,D,B,H,A))&&(D==1?B?Bc(y,B,H,A):Sr(A)==I.scroller&&xt(A):D==2?(B&&wc(y.doc,B),setTimeout(function(){return I.input.focus()},20)):D==3&&(de?y.display.input.onContextMenu(A):Gc(y)))}}}function bp(A,y,I,B,D){var H="Click";return B=="double"?H="Double"+H:B=="triple"&&(H="Triple"+H),H=(y==1?"Left":y==2?"Middle":"Right")+H,Md(A,$u(H,D),D,function(ue){if(typeof ue=="string"&&(ue=ml[ue]),!ue)return!1;var _e=!1;try{A.isReadOnly()&&(A.state.suppressEdits=!0),_e=ue(A,I)!=ht}finally{A.state.suppressEdits=!1}return _e})}function oh(A,y,I){var B=A.getOption("configureMouse"),D=B?B(A,y,I):{};if(D.unit==null){var H=ee?I.shiftKey&&I.metaKey:I.altKey;D.unit=H?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(D.extend==null||A.doc.extend)&&(D.extend=A.doc.extend||I.shiftKey),D.addNew==null&&(D.addNew=Y?I.metaKey:I.ctrlKey),D.moveOnDrag==null&&(D.moveOnDrag=!(Y?I.altKey:I.ctrlKey)),D}function Bc(A,y,I,B){d?setTimeout(Pt(HA,A),0):A.curOp.focus=We(bt(A));var D=oh(A,I,B),H=A.doc.sel,ue;A.options.dragDrop&&Nn&&!A.isReadOnly()&&I=="single"&&(ue=H.contains(y))>-1&&(sr((ue=H.ranges[ue]).from(),y)<0||y.xRel>0)&&(sr(ue.to(),y)>0||y.xRel<0)?um(A,B,y,D):Th(A,B,y,D)}function um(A,y,I,B){var D=A.display,H=!1,ue=Di(A,function(ze){b&&(D.scroller.draggable=!1),A.state.draggingText=!1,A.state.delayingBlurEvent&&(A.hasFocus()?A.state.delayingBlurEvent=!1:Gc(A)),tt(D.wrapper.ownerDocument,"mouseup",ue),tt(D.wrapper.ownerDocument,"mousemove",_e),tt(D.scroller,"dragstart",ke),tt(D.scroller,"drop",ue),H||(xt(ze),B.addNew||wc(A.doc,I,null,null,B.extend),b&&!U||d&&g==9?setTimeout(function(){D.wrapper.ownerDocument.body.focus({preventScroll:!0}),D.input.focus()},20):D.input.focus())}),_e=function(ze){H=H||Math.abs(y.clientX-ze.clientX)+Math.abs(y.clientY-ze.clientY)>=10},ke=function(){return H=!0};b&&(D.scroller.draggable=!0),A.state.draggingText=ue,ue.copy=!B.moveOnDrag,je(D.wrapper.ownerDocument,"mouseup",ue),je(D.wrapper.ownerDocument,"mousemove",_e),je(D.scroller,"dragstart",ke),je(D.scroller,"drop",ue),A.state.delayingBlurEvent=!0,setTimeout(function(){return D.input.focus()},20),D.scroller.dragDrop&&D.scroller.dragDrop()}function oc(A,y,I){if(I=="char")return new bo(y,y);if(I=="word")return A.findWordAt(y);if(I=="line")return new bo(An(y.line,0),ri(A.doc,An(y.line+1,0)));var B=I(A,y);return new bo(B.from,B.to)}function Th(A,y,I,B){d&&Gc(A);var D=A.display,H=A.doc;xt(y);var ue,_e,ke=H.sel,ze=ke.ranges;if(B.addNew&&!B.extend?(_e=H.sel.contains(I),_e>-1?ue=ze[_e]:ue=new bo(I,I)):(ue=H.sel.primary(),_e=H.sel.primIndex),B.unit=="rectangle")B.addNew||(ue=new bo(I,I)),I=_A(A,y,!0,!0),_e=-1;else{var mt=oc(A,I,B.unit);B.extend?ue=Qs(ue,mt.anchor,mt.head,B.extend):ue=mt}B.addNew?_e==-1?(_e=ze.length,Ca(H,_u(A,ze.concat([ue]),_e),{scroll:!1,origin:"*mouse"})):ze.length>1&&ze[_e].empty()&&B.unit=="char"&&!B.extend?(Ca(H,_u(A,ze.slice(0,_e).concat(ze.slice(_e+1)),0),{scroll:!1,origin:"*mouse"}),ke=H.sel):hl(H,_e,ue,en):(_e=0,Ca(H,new Os([ue],0),en),ke=H.sel);var Mt=I;function Xt(dr){if(sr(Mt,dr)!=0)if(Mt=dr,B.unit=="rectangle"){for(var Lr=[],ai=A.options.tabSize,Wr=Pe(Kr(H,I.line).text,I.ch,ai),Xi=Pe(Kr(H,dr.line).text,dr.ch,ai),ko=Math.min(Wr,Xi),Qa=Math.max(Wr,Xi),aa=Math.min(I.line,dr.line),_a=Math.min(A.lastLine(),Math.max(I.line,dr.line));aa<=_a;aa++){var ba=Kr(H,aa).text,Pa=mn(ba,ko,ai);ko==Qa?Lr.push(new bo(An(aa,Pa),An(aa,Pa))):ba.length>Pa&&Lr.push(new bo(An(aa,Pa),An(aa,mn(ba,Qa,ai))))}Lr.length||Lr.push(new bo(I,I)),Ca(H,_u(A,ke.ranges.slice(0,_e).concat(Lr),_e),{origin:"*mouse",scroll:!1}),A.scrollIntoView(dr)}else{var Yl=ue,qa=oc(A,dr,B.unit),xa=Yl.anchor,hs;sr(qa.anchor,xa)>0?(hs=qa.head,xa=Ns(Yl.from(),qa.anchor)):(hs=qa.anchor,xa=Cs(Yl.to(),qa.head));var gi=ke.ranges.slice(0);gi[_e]=Bd(A,new bo(ri(H,xa),hs)),Ca(H,_u(A,gi,_e),en)}}var Qt=D.wrapper.getBoundingClientRect(),Mn=0;function Kn(dr){var Lr=++Mn,ai=_A(A,dr,!0,B.unit=="rectangle");if(ai)if(sr(ai,Mt)!=0){A.curOp.focus=We(bt(A)),Xt(ai);var Wr=Lu(D,H);(ai.line>=Wr.to||ai.line<Wr.from)&&setTimeout(Di(A,function(){Mn==Lr&&Kn(dr)}),150)}else{var Xi=dr.clientY<Qt.top?-20:dr.clientY>Qt.bottom?20:0;Xi&&setTimeout(Di(A,function(){Mn==Lr&&(D.scroller.scrollTop+=Xi,Kn(dr))}),50)}}function Zn(dr){A.state.selectingText=!1,Mn=1/0,dr&&(xt(dr),D.input.focus()),tt(D.wrapper.ownerDocument,"mousemove",or),tt(D.wrapper.ownerDocument,"mouseup",br),H.history.lastSelOrigin=null}var or=Di(A,function(dr){dr.buttons===0||!on(dr)?Zn(dr):Kn(dr)}),br=Di(A,Zn);A.state.selectingText=br,je(D.wrapper.ownerDocument,"mousemove",or),je(D.wrapper.ownerDocument,"mouseup",br)}function Bd(A,y){var I=y.anchor,B=y.head,D=Kr(A.doc,I.line);if(sr(I,B)==0&&I.sticky==B.sticky)return y;var H=ve(D);if(!H)return y;var ue=Be(H,I.ch,I.sticky),_e=H[ue];if(_e.from!=I.ch&&_e.to!=I.ch)return y;var ke=ue+(_e.from==I.ch==(_e.level!=1)?0:1);if(ke==0||ke==H.length)return y;var ze;if(B.line!=I.line)ze=(B.line-I.line)*(A.doc.direction=="ltr"?1:-1)>0;else{var mt=Be(H,B.ch,B.sticky),Mt=mt-ue||(B.ch-I.ch)*(_e.level==1?-1:1);mt==ke-1||mt==ke?ze=Mt<0:ze=Mt>0}var Xt=H[ke+(ze?-1:0)],Qt=ze==(Xt.level==1),Mn=Qt?Xt.from:Xt.to,Kn=Qt?"after":"before";return I.ch==Mn&&I.sticky==Kn?y:new bo(new An(I.line,Mn,Kn),B)}function xp(A,y,I,B){var D,H;if(y.touches)D=y.touches[0].clientX,H=y.touches[0].clientY;else try{D=y.clientX,H=y.clientY}catch{return!1}if(D>=Math.floor(A.display.gutters.getBoundingClientRect().right))return!1;B&&xt(y);var ue=A.display,_e=ue.lineDiv.getBoundingClientRect();if(H>_e.bottom||!$t(A,I))return Bn(y);H-=_e.top-ue.viewOffset;for(var ke=0;ke<A.display.gutterSpecs.length;++ke){var ze=ue.gutters.childNodes[ke];if(ze&&ze.getBoundingClientRect().right>=D){var mt=wt(A.doc,H),Mt=A.display.gutterSpecs[ke];return ct(A,I,A,mt,Mt.className,y),Bn(y)}}}function sh(A,y){return xp(A,y,"gutterClick",!0)}function Lf(A,y){aA(A.display,y)||Uf(A,y)||At(A,y,"contextmenu")||de||A.display.input.onContextMenu(y)}function Uf(A,y){return $t(A,"gutterContextMenu")?xp(A,y,"gutterContextMenu",!1):!1}function wp(A){A.display.wrapper.className=A.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+A.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pc(A)}var Od={toString:function(){return"CodeMirror.Init"}},sf={},ql={};function Rl(A){var y=A.optionHandlers;function I(B,D,H,ue){A.defaults[B]=D,H&&(y[B]=ue?function(_e,ke,ze){ze!=Od&&H(_e,ke,ze)}:H)}A.defineOption=I,A.Init=Od,I("value","",function(B,D){return B.setValue(D)},!0),I("mode",null,function(B,D){B.doc.modeOption=D,nh(B)},!0),I("indentUnit",2,nh,!0),I("indentWithTabs",!1),I("smartIndent",!0),I("tabSize",4,function(B){SA(B),pc(B),Tl(B)},!0),I("lineSeparator",null,function(B,D){if(B.doc.lineSep=D,!!D){var H=[],ue=B.doc.first;B.doc.iter(function(ke){for(var ze=0;;){var mt=ke.text.indexOf(D,ze);if(mt==-1)break;ze=mt+D.length,H.push(An(ue,mt))}ue++});for(var _e=H.length-1;_e>=0;_e--)j(B.doc,D,H[_e],An(H[_e].line,H[_e].ch+D.length))}}),I("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(B,D,H){B.state.specialChars=new RegExp(D.source+(D.test(" ")?"":"| "),"g"),H!=Od&&B.refresh()}),I("specialCharPlaceholder",Ru,function(B){return B.refresh()},!0),I("electricChars",!0),I("inputStyle",X?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),I("spellcheck",!1,function(B,D){return B.getInputField().spellcheck=D},!0),I("autocorrect",!1,function(B,D){return B.getInputField().autocorrect=D},!0),I("autocapitalize",!1,function(B,D){return B.getInputField().autocapitalize=D},!0),I("rtlMoveVisually",!N),I("wholeLineUpdateBefore",!0),I("theme","default",function(B){wp(B),Wl(B)},!0),I("keyMap","default",function(B,D,H){var ue=pl(D),_e=H!=Od&&pl(H);_e&&_e.detach&&_e.detach(B,ue),ue.attach&&ue.attach(B,_e||null)}),I("extraKeys",null),I("configureMouse",null),I("lineWrapping",!1,zf,!0),I("gutters",[],function(B,D){B.display.gutterSpecs=Mi(D,B.options.lineNumbers),Wl(B)},!0),I("fixedGutter",!0,function(B,D){B.display.gutters.style.left=D?Uo(B.display)+"px":"0",B.refresh()},!0),I("coverGutterNextToScrollbar",!1,function(B){return zu(B)},!0),I("scrollbarStyle","native",function(B){eh(B),zu(B),B.display.scrollbars.setScrollTop(B.doc.scrollTop),B.display.scrollbars.setScrollLeft(B.doc.scrollLeft)},!0),I("lineNumbers",!1,function(B,D){B.display.gutterSpecs=Mi(B.options.gutters,D),Wl(B)},!0),I("firstLineNumber",1,Wl,!0),I("lineNumberFormatter",function(B){return B},Wl,!0),I("showCursorWhenSelecting",!1,za,!0),I("resetSelectionOnContextMenu",!0),I("lineWiseCopyCut",!0),I("pasteLinesPerSelection",!0),I("selectionsMayTouch",!1),I("readOnly",!1,function(B,D){D=="nocursor"&&(Ho(B),B.display.input.blur()),B.display.input.readOnlyChanged(D)}),I("screenReaderLabel",null,function(B,D){D=D===""?null:D,B.display.input.screenReaderLabelChanged(D)}),I("disableInput",!1,function(B,D){D||B.display.input.reset()},!0),I("dragDrop",!0,Am),I("allowDropFileTypes",null),I("cursorBlinkRate",530),I("cursorScrollMargin",0),I("cursorHeight",1,za,!0),I("singleCursorHeightPerLine",!0,za,!0),I("workTime",100),I("workDelay",100),I("flattenSpans",!0,SA,!0),I("addModeClass",!1,SA,!0),I("pollInterval",100),I("undoDepth",200,function(B,D){return B.doc.history.undoDepth=D}),I("historyEventDelay",1250),I("viewportMargin",10,function(B){return B.refresh()},!0),I("maxHighlightLength",1e4,SA,!0),I("moveInputWithCursor",!0,function(B,D){D||B.display.input.resetPosition()}),I("tabindex",null,function(B,D){return B.display.input.getField().tabIndex=D||""}),I("autofocus",null),I("direction","ltr",function(B,D){return B.doc.setDirection(D)},!0),I("phrases",null)}function Am(A,y,I){var B=I&&I!=Od;if(!y!=!B){var D=A.display.dragFunctions,H=y?je:tt;H(A.display.scroller,"dragstart",D.start),H(A.display.scroller,"dragenter",D.enter),H(A.display.scroller,"dragover",D.over),H(A.display.scroller,"dragleave",D.leave),H(A.display.scroller,"drop",D.drop)}}function zf(A){A.options.lineWrapping?(Ce(A.display.wrapper,"CodeMirror-wrap"),A.display.sizer.style.minWidth="",A.display.sizerWidth=null):(fe(A.display.wrapper,"CodeMirror-wrap"),ya(A)),$A(A),Tl(A),pc(A),setTimeout(function(){return zu(A)},100)}function Io(A,y){var I=this;if(!(this instanceof Io))return new Io(A,y);this.options=y=y?Le(y):{},Le(sf,y,!1);var B=y.value;typeof B=="string"?B=new Zt(B,y.mode,null,y.lineSeparator,y.direction):y.mode&&(B.modeOption=y.mode),this.doc=B;var D=new Io.inputStyles[y.inputStyle](this),H=this.display=new bd(A,B,D,y);H.wrapper.CodeMirror=this,wp(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),eh(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 Ee,keySeq:null,specialChars:null},y.autofocus&&!X&&H.input.focus(),d&&g<11&&setTimeout(function(){return I.display.input.reset(!0)},20),Hu(this),Bi(),Nu(this),this.curOp.forceUpdate=!0,gr(this,B),y.autofocus&&!X||this.hasFocus()?setTimeout(function(){I.hasFocus()&&!I.state.focused&&Xd(I)},20):Ho(this);for(var ue in ql)ql.hasOwnProperty(ue)&&ql[ue](this,y[ue],Od);Cd(this),y.finishInit&&y.finishInit(this);for(var _e=0;_e<af.length;++_e)af[_e](this);Wu(this),b&&y.lineWrapping&&getComputedStyle(H.lineDiv).textRendering=="optimizelegibility"&&(H.lineDiv.style.textRendering="auto")}Io.defaults=sf,Io.optionHandlers=ql;function Hu(A){var y=A.display;je(y.scroller,"mousedown",Di(A,kh)),d&&g<11?je(y.scroller,"dblclick",Di(A,function(ke){if(!At(A,ke)){var ze=_A(A,ke);if(!(!ze||sh(A,ke)||aA(A.display,ke))){xt(ke);var mt=A.findWordAt(ze);wc(A.doc,mt.anchor,mt.head)}}})):je(y.scroller,"dblclick",function(ke){return At(A,ke)||xt(ke)}),je(y.scroller,"contextmenu",function(ke){return Lf(A,ke)}),je(y.input.getField(),"contextmenu",function(ke){y.scroller.contains(ke.target)||Lf(A,ke)});var I,B={end:0};function D(){y.activeTouch&&(I=setTimeout(function(){return y.activeTouch=null},1e3),B=y.activeTouch,B.end=+new Date)}function H(ke){if(ke.touches.length!=1)return!1;var ze=ke.touches[0];return ze.radiusX<=1&&ze.radiusY<=1}function ue(ke,ze){if(ze.left==null)return!0;var mt=ze.left-ke.left,Mt=ze.top-ke.top;return mt*mt+Mt*Mt>20*20}je(y.scroller,"touchstart",function(ke){if(!At(A,ke)&&!H(ke)&&!sh(A,ke)){y.input.ensurePolled(),clearTimeout(I);var ze=+new Date;y.activeTouch={start:ze,moved:!1,prev:ze-B.end<=300?B:null},ke.touches.length==1&&(y.activeTouch.left=ke.touches[0].pageX,y.activeTouch.top=ke.touches[0].pageY)}}),je(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),je(y.scroller,"touchend",function(ke){var ze=y.activeTouch;if(ze&&!aA(y,ke)&&ze.left!=null&&!ze.moved&&new Date-ze.start<300){var mt=A.coordsChar(y.activeTouch,"page"),Mt;!ze.prev||ue(ze,ze.prev)?Mt=new bo(mt,mt):!ze.prev.prev||ue(ze,ze.prev.prev)?Mt=A.findWordAt(mt):Mt=new bo(An(mt.line,0),ri(A.doc,An(mt.line+1,0))),A.setSelection(Mt.anchor,Mt.head),A.focus(),xt(ke)}D()}),je(y.scroller,"touchcancel",D),je(y.scroller,"scroll",function(){y.scroller.clientHeight&&(Uu(A,y.scroller.scrollTop),Nl(A,y.scroller.scrollLeft,!0),ct(A,"scroll",A))}),je(y.scroller,"mousewheel",function(ke){return _c(A,ke)}),je(y.scroller,"DOMMouseScroll",function(ke){return _c(A,ke)}),je(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ke){At(A,ke)||fr(ke)},over:function(ke){At(A,ke)||(In(A,ke),fr(ke))},start:function(ke){return vn(A,ke)},drop:Di(A,bn),leave:function(ke){At(A,ke)||Wn(A)}};var _e=y.input.getField();je(_e,"keyup",function(ke){return Au.call(A,ke)}),je(_e,"keydown",Di(A,Ih)),je(_e,"keypress",Di(A,Ed)),je(_e,"focus",function(ke){return Xd(A,ke)}),je(_e,"blur",function(ke){return Ho(A,ke)})}var af=[];Io.defineInitHook=function(A){return af.push(A)};function Id(A,y,I,B){var D=A.doc,H;I==null&&(I="add"),I=="smart"&&(D.mode.indent?H=Fr(A,y).state:I="prev");var ue=A.options.tabSize,_e=Kr(D,y),ke=Pe(_e.text,null,ue);_e.stateAfter&&(_e.stateAfter=null);var ze=_e.text.match(/^\s*/)[0],mt;if(!B&&!/\S/.test(_e.text))mt=0,I="not";else if(I=="smart"&&(mt=D.mode.indent(H,_e.text.slice(ze.length),_e.text),mt==ht||mt>150)){if(!B)return;I="prev"}I=="prev"?y>D.first?mt=Pe(Kr(D,y-1).text,null,ue):mt=0:I=="add"?mt=ke+A.options.indentUnit:I=="subtract"?mt=ke-A.options.indentUnit:typeof I=="number"&&(mt=ke+I),mt=Math.max(0,mt);var Mt="",Xt=0;if(A.options.indentWithTabs)for(var Qt=Math.floor(mt/ue);Qt;--Qt)Xt+=ue,Mt+=" ";if(Xt<mt&&(Mt+=nn(mt-Xt)),Mt!=ze)return j(D,Mt,An(y,0),An(y,ze.length),"+input"),_e.stateAfter=null,!0;for(var Mn=0;Mn<D.sel.ranges.length;Mn++){var Kn=D.sel.ranges[Mn];if(Kn.head.line==y&&Kn.head.ch<ze.length){var Zn=An(y,ze.length);hl(D,Mn,new bo(Zn,Zn));break}}}var TA=null;function Ph(A){TA=A}function Mp(A,y,I,B,D){var H=A.doc;A.display.shift=!1,B||(B=H.sel);var ue=+new Date-200,_e=D=="paste"||A.state.pasteIncoming>ue,ke=ur(y),ze=null;if(_e&&B.ranges.length>1)if(TA&&TA.text.join(`
|
||
`)==y){if(B.ranges.length%TA.text.length==0){ze=[];for(var mt=0;mt<TA.text.length;mt++)ze.push(H.splitLines(TA.text[mt]))}}else ke.length==B.ranges.length&&A.options.pasteLinesPerSelection&&(ze=Dn(ke,function(or){return[or]}));for(var Mt=A.curOp.updateInput,Xt=B.ranges.length-1;Xt>=0;Xt--){var Qt=B.ranges[Xt],Mn=Qt.from(),Kn=Qt.to();Qt.empty()&&(I&&I>0?Mn=An(Mn.line,Mn.ch-I):A.state.overwrite&&!_e?Kn=An(Kn.line,Math.min(Kr(H,Kn.line).text.length,Kn.ch+ir(ke).length)):_e&&TA&&TA.lineWise&&TA.text.join(`
|
||
`)==ke.join(`
|
||
`)&&(Mn=Kn=An(Mn.line,0)));var Zn={from:Mn,to:Kn,text:ze?ze[Xt%ze.length]:ke,origin:D||(_e?"paste":A.state.cutIncoming>ue?"cut":"+input")};T(A.doc,Zn),Zs(A,"inputRead",A,Zn)}y&&!_e&&lf(A,y),zo(A),A.curOp.updateInput<2&&(A.curOp.updateInput=Mt),A.curOp.typing=!0,A.state.pasteIncoming=A.state.cutIncoming=-1}function Oc(A,y){var I=A.clipboardData&&A.clipboardData.getData("Text");if(I)return A.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&y.hasFocus()&&Bo(y,function(){return Mp(y,I,0,null,"paste")}),!0}function lf(A,y){if(!(!A.options.electricChars||!A.options.smartIndent))for(var I=A.doc.sel,B=I.ranges.length-1;B>=0;B--){var D=I.ranges[B];if(!(D.head.ch>100||B&&I.ranges[B-1].head.line==D.head.line)){var H=A.getModeAt(D.head),ue=!1;if(H.electricChars){for(var _e=0;_e<H.electricChars.length;_e++)if(y.indexOf(H.electricChars.charAt(_e))>-1){ue=Id(A,D.head.line,"smart");break}}else H.electricInput&&H.electricInput.test(Kr(A.doc,D.head.line).text.slice(0,D.head.ch))&&(ue=Id(A,D.head.line,"smart"));ue&&Zs(A,"electricInput",A,D.head.line)}}}function uf(A){for(var y=[],I=[],B=0;B<A.doc.sel.ranges.length;B++){var D=A.doc.sel.ranges[B].head.line,H={anchor:An(D,0),head:An(D+1,0)};I.push(H),y.push(A.getRange(H.anchor,H.head))}return{text:y,ranges:I}}function ah(A,y,I,B){A.setAttribute("autocorrect",I?"on":"off"),A.setAttribute("autocapitalize",B?"on":"off"),A.setAttribute("spellcheck",!!y)}function kd(){var A=me("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),y=me("div",[A],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return b?A.style.width="1000px":A.setAttribute("wrap","off"),Q&&(A.style.border="1px solid black"),y}function Hc(A){var y=A.optionHandlers,I=A.helpers={};A.prototype={constructor:A,focus:function(){Dt(this).focus(),this.display.input.focus()},setOption:function(B,D){var H=this.options,ue=H[B];H[B]==D&&B!="mode"||(H[B]=D,y.hasOwnProperty(B)&&Di(this,y[B])(this,D,ue),ct(this,"optionChange",this,B))},getOption:function(B){return this.options[B]},getDoc:function(){return this.doc},addKeyMap:function(B,D){this.state.keyMaps[D?"push":"unshift"](pl(B))},removeKeyMap:function(B){for(var D=this.state.keyMaps,H=0;H<D.length;++H)if(D[H]==B||D[H].name==B)return D.splice(H,1),!0},addOverlay:$r(function(B,D){var H=B.token?B:A.getMode(this.options,B);if(H.startState)throw new Error("Overlays may not be stateful.");fn(this.state.overlays,{mode:H,modeSpec:B,opaque:D&&D.opaque,priority:D&&D.priority||0},function(ue){return ue.priority}),this.state.modeGen++,Tl(this)}),removeOverlay:$r(function(B){for(var D=this.state.overlays,H=0;H<D.length;++H){var ue=D[H].modeSpec;if(ue==B||typeof B=="string"&&ue.name==B){D.splice(H,1),this.state.modeGen++,Tl(this);return}}}),indentLine:$r(function(B,D,H){typeof D!="string"&&typeof D!="number"&&(D==null?D=this.options.smartIndent?"smart":"prev":D=D?"add":"subtract"),gn(this.doc,B)&&Id(this,B,D,H)}),indentSelection:$r(function(B){for(var D=this.doc.sel.ranges,H=-1,ue=0;ue<D.length;ue++){var _e=D[ue];if(_e.empty())_e.head.line>H&&(Id(this,_e.head.line,B,!0),H=_e.head.line,ue==this.doc.sel.primIndex&&zo(this));else{var ke=_e.from(),ze=_e.to(),mt=Math.max(H,ke.line);H=Math.min(this.lastLine(),ze.line-(ze.ch?0:1))+1;for(var Mt=mt;Mt<H;++Mt)Id(this,Mt,B);var Xt=this.doc.sel.ranges;ke.ch==0&&D.length==Xt.length&&Xt[ue].from().ch>0&&hl(this.doc,ue,new bo(ke,Xt[ue].to()),Ut)}}}),getTokenAt:function(B,D){return Ws(this,B,D)},getLineTokens:function(B,D){return Ws(this,An(B),D,!0)},getTokenTypeAt:function(B){B=ri(this.doc,B);var D=ls(this,Kr(this.doc,B.line)),H=0,ue=(D.length-1)/2,_e=B.ch,ke;if(_e==0)ke=D[2];else for(;;){var ze=H+ue>>1;if((ze?D[ze*2-1]:0)>=_e)ue=ze;else if(D[ze*2+1]<_e)H=ze+1;else{ke=D[ze*2+2];break}}var mt=ke?ke.indexOf("overlay "):-1;return mt<0?ke:mt==0?null:ke.slice(0,mt-1)},getModeAt:function(B){var D=this.doc.mode;return D.innerMode?A.innerMode(D,this.getTokenAt(B).state).mode:D},getHelper:function(B,D){return this.getHelpers(B,D)[0]},getHelpers:function(B,D){var H=[];if(!I.hasOwnProperty(D))return H;var ue=I[D],_e=this.getModeAt(B);if(typeof _e[D]=="string")ue[_e[D]]&&H.push(ue[_e[D]]);else if(_e[D])for(var ke=0;ke<_e[D].length;ke++){var ze=ue[_e[D][ke]];ze&&H.push(ze)}else _e.helperType&&ue[_e.helperType]?H.push(ue[_e.helperType]):ue[_e.name]&&H.push(ue[_e.name]);for(var mt=0;mt<ue._global.length;mt++){var Mt=ue._global[mt];Mt.pred(_e,this)&&nt(H,Mt.val)==-1&&H.push(Mt.val)}return H},getStateAfter:function(B,D){var H=this.doc;return B=vA(H,B??H.first+H.size-1),Fr(this,B+1,D).state},cursorCoords:function(B,D){var H,ue=this.doc.sel.primary();return B==null?H=ue.head:typeof B=="object"?H=ri(this.doc,B):H=B?ue.from():ue.to(),an(this,H,D||"page")},charCoords:function(B,D){return Pn(this,ri(this.doc,B),D||"page")},coordsChar:function(B,D){return B=Ht(this,B,D||"page"),_o(this,B.left,B.top)},lineAtHeight:function(B,D){return B=Ht(this,{top:B,left:0},D||"page").top,wt(this.doc,B+this.display.viewOffset)},heightAtLine:function(B,D,H){var ue=!1,_e;if(typeof B=="number"){var ke=this.doc.first+this.doc.size-1;B<this.doc.first?B=this.doc.first:B>ke&&(B=ke,ue=!0),_e=Kr(this.doc,B)}else _e=B;return gu(this,_e,{top:0,left:0},D||"page",H||ue).top+(ue?this.doc.height-Zi(_e):0)},defaultTextHeight:function(){return kl(this.display)},defaultCharWidth:function(){return Wi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(B,D,H,ue,_e){var ke=this.display;B=an(this,ri(this.doc,B));var ze=B.bottom,mt=B.left;if(D.style.position="absolute",D.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(D),ke.sizer.appendChild(D),ue=="over")ze=B.top;else if(ue=="above"||ue=="near"){var Mt=Math.max(ke.wrapper.clientHeight,this.doc.height),Xt=Math.max(ke.sizer.clientWidth,ke.lineSpace.clientWidth);(ue=="above"||B.bottom+D.offsetHeight>Mt)&&B.top>D.offsetHeight?ze=B.top-D.offsetHeight:B.bottom+D.offsetHeight<=Mt&&(ze=B.bottom),mt+D.offsetWidth>Xt&&(mt=Xt-D.offsetWidth)}D.style.top=ze+"px",D.style.left=D.style.right="",_e=="right"?(mt=ke.sizer.clientWidth-D.offsetWidth,D.style.right="0px"):(_e=="left"?mt=0:_e=="middle"&&(mt=(ke.sizer.clientWidth-D.offsetWidth)/2),D.style.left=mt+"px"),H&&Yc(this,{left:mt,top:ze,right:mt+D.offsetWidth,bottom:ze+D.offsetHeight})},triggerOnKeyDown:$r(Ih),triggerOnKeyPress:$r(Ed),triggerOnKeyUp:Au,triggerOnMouseDown:$r(kh),execCommand:function(B){if(ml.hasOwnProperty(B))return ml[B].call(null,this)},triggerElectric:$r(function(B){lf(this,B)}),findPosH:function(B,D,H,ue){var _e=1;D<0&&(_e=-1,D=-D);for(var ke=ri(this.doc,B),ze=0;ze<D&&(ke=di(this.doc,ke,_e,H,ue),!ke.hitSide);++ze);return ke},moveH:$r(function(B,D){var H=this;this.extendSelectionsBy(function(ue){return H.display.shift||H.doc.extend||ue.empty()?di(H.doc,ue.head,B,D,H.options.rtlMoveVisually):B<0?ue.from():ue.to()},Ft)}),deleteH:$r(function(B,D){var H=this.doc.sel,ue=this.doc;H.somethingSelected()?ue.replaceSelection("",null,"+delete"):uu(this,function(_e){var ke=di(ue,_e.head,B,D,!1);return B<0?{from:ke,to:_e.head}:{from:_e.head,to:ke}})}),findPosV:function(B,D,H,ue){var _e=1,ke=ue;D<0&&(_e=-1,D=-D);for(var ze=ri(this.doc,B),mt=0;mt<D;++mt){var Mt=an(this,ze,"div");if(ke==null?ke=Mt.left:Mt.left=ke,ze=Zc(this,Mt,_e,H),ze.hitSide)break}return ze},moveV:$r(function(B,D){var H=this,ue=this.doc,_e=[],ke=!this.display.shift&&!ue.extend&&ue.sel.somethingSelected();if(ue.extendSelectionsBy(function(mt){if(ke)return B<0?mt.from():mt.to();var Mt=an(H,mt.head,"div");mt.goalColumn!=null&&(Mt.left=mt.goalColumn),_e.push(Mt.left);var Xt=Zc(H,Mt,B,D);return D=="page"&&mt==ue.sel.primary()&&As(H,Pn(H,Xt,"div").top-Mt.top),Xt},Ft),_e.length)for(var ze=0;ze<ue.sel.ranges.length;ze++)ue.sel.ranges[ze].goalColumn=_e[ze]}),findWordAt:function(B){var D=this.doc,H=Kr(D,B.line).text,ue=B.ch,_e=B.ch;if(H){var ke=this.getHelper(B,"wordChars");(B.sticky=="before"||_e==H.length)&&ue?--ue:++_e;for(var ze=H.charAt(ue),mt=Ge(ze,ke)?function(Mt){return Ge(Mt,ke)}:/\s/.test(ze)?function(Mt){return/\s/.test(Mt)}:function(Mt){return!/\s/.test(Mt)&&!Ge(Mt)};ue>0&&mt(H.charAt(ue-1));)--ue;for(;_e<H.length&&mt(H.charAt(_e));)++_e}return new bo(An(B.line,ue),An(B.line,_e))},toggleOverwrite:function(B){B!=null&&B==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ce(this.display.cursorDiv,"CodeMirror-overwrite"):fe(this.display.cursorDiv,"CodeMirror-overwrite"),ct(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==We(bt(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:$r(function(B,D){cs(this,B,D)}),getScrollInfo:function(){var B=this.display.scroller;return{left:B.scrollLeft,top:B.scrollTop,height:B.scrollHeight-iu(this)-this.display.barHeight,width:B.scrollWidth-iu(this)-this.display.barWidth,clientHeight:GA(this),clientWidth:Bl(this)}},scrollIntoView:$r(function(B,D){B==null?(B={from:this.doc.sel.primary().head,to:null},D==null&&(D=this.options.cursorScrollMargin)):typeof B=="number"?B={from:An(B,0),to:null}:B.from==null&&(B={from:B,to:null}),B.to||(B.to=B.from),B.margin=D||0,B.from.line!=null?Df(this,B):md(this,B.from,B.to,B.margin)}),setSize:$r(function(B,D){var H=this,ue=function(ke){return typeof ke=="number"||/^\d+$/.test(String(ke))?ke+"px":ke};B!=null&&(this.display.wrapper.style.width=ue(B)),D!=null&&(this.display.wrapper.style.height=ue(D)),this.options.lineWrapping&&Vd(this);var _e=this.display.viewFrom;this.doc.iter(_e,this.display.viewTo,function(ke){if(ke.widgets){for(var ze=0;ze<ke.widgets.length;ze++)if(ke.widgets[ze].noHScroll){gc(H,_e,"widget");break}}++_e}),this.curOp.forceUpdate=!0,ct(this,"refresh",this)}),operation:function(B){return Bo(this,B)},startOperation:function(){return Nu(this)},endOperation:function(){return Wu(this)},refresh:$r(function(){var B=this.display.cachedTextHeight;Tl(this),this.curOp.forceUpdate=!0,pc(this),cs(this,this.doc.scrollLeft,this.doc.scrollTop),Ia(this.display),(B==null||Math.abs(B-kl(this.display))>.5||this.options.lineWrapping)&&$A(this),ct(this,"refresh",this)}),swapDoc:$r(function(B){var D=this.doc;return D.cm=null,this.state.selectingText&&this.state.selectingText(),gr(this,B),pc(this),this.display.input.reset(),cs(this,B.scrollLeft,B.scrollTop),this.curOp.forceScroll=!0,Zs(this,"swapDoc",this,D),D}),phrase:function(B){var D=this.options.phrases;return D&&Object.prototype.hasOwnProperty.call(D,B)?D[B]:B},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},jt(A),A.registerHelper=function(B,D,H){I.hasOwnProperty(B)||(I[B]=A[B]={_global:[]}),I[B][D]=H},A.registerGlobalHelper=function(B,D,H,ue){A.registerHelper(B,D,ue),I[B]._global.push({pred:H,val:ue})}}function di(A,y,I,B,D){var H=y,ue=I,_e=Kr(A,y.line),ke=D&&A.direction=="rtl"?-I:I;function ze(){var br=y.line+ke;return br<A.first||br>=A.first+A.size?!1:(y=new An(br,y.ch,y.sticky),_e=Kr(A,br))}function mt(br){var dr;if(B=="codepoint"){var Lr=_e.text.charCodeAt(y.ch+(I>0?0:-1));if(isNaN(Lr))dr=null;else{var ai=I>0?Lr>=55296&&Lr<56320:Lr>=56320&&Lr<57343;dr=new An(y.line,Math.max(0,Math.min(_e.text.length,y.ch+I*(ai?2:1))),-I)}}else D?dr=Js(A.cm,_e,y,I):dr=IA(_e,y,I);if(dr==null)if(!br&&ze())y=Vu(D,A.cm,_e,y.line,ke);else return!1;else y=dr;return!0}if(B=="char"||B=="codepoint")mt();else if(B=="column")mt(!0);else if(B=="word"||B=="group")for(var Mt=null,Xt=B=="group",Qt=A.cm&&A.cm.getHelper(y,"wordChars"),Mn=!0;!(I<0&&!mt(!Mn));Mn=!1){var Kn=_e.text.charAt(y.ch)||`
|
||
`,Zn=Ge(Kn,Qt)?"w":Xt&&Kn==`
|
||
`?"n":!Xt||/\s/.test(Kn)?null:"p";if(Xt&&!Mn&&!Zn&&(Zn="s"),Mt&&Mt!=Zn){I<0&&(I=1,mt(),y.sticky="after");break}if(Zn&&(Mt=Zn),I>0&&!mt(!Mn))break}var or=Sc(A,y,H,ue,!0);return Pi(H,or)&&(or.hitSide=!0),or}function Zc(A,y,I,B){var D=A.doc,H=y.left,ue;if(B=="page"){var _e=Math.min(A.display.wrapper.clientHeight,Dt(A).innerHeight||D(A).documentElement.clientHeight),ke=Math.max(_e-.5*kl(A.display),3);ue=(I>0?y.bottom:y.top)+I*ke}else B=="line"&&(ue=I>0?y.bottom+3:y.top-3);for(var ze;ze=_o(A,H,ue),!!ze.outside;){if(I<0?ue<=0:ue>=D.height){ze.hitSide=!0;break}ue+=I*5}return ze}var is=function(A){this.cm=A,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};is.prototype.init=function(A){var y=this,I=this,B=I.cm,D=I.div=A.lineDiv;D.contentEditable=!0,ah(D,B.options.spellcheck,B.options.autocorrect,B.options.autocapitalize);function H(_e){for(var ke=_e.target;ke;ke=ke.parentNode){if(ke==D)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ke.className))break}return!1}je(D,"paste",function(_e){!H(_e)||At(B,_e)||Oc(_e,B)||g<=11&&setTimeout(Di(B,function(){return y.updateFromDOM()}),20)}),je(D,"compositionstart",function(_e){y.composing={data:_e.data,done:!1}}),je(D,"compositionupdate",function(_e){y.composing||(y.composing={data:_e.data,done:!1})}),je(D,"compositionend",function(_e){y.composing&&(_e.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),je(D,"touchstart",function(){return I.forceCompositionEnd()}),je(D,"input",function(){y.composing||y.readFromDOMSoon()});function ue(_e){if(!(!H(_e)||At(B,_e))){if(B.somethingSelected())Ph({lineWise:!1,text:B.getSelections()}),_e.type=="cut"&&B.replaceSelection("",null,"cut");else if(B.options.lineWiseCopyCut){var ke=uf(B);Ph({lineWise:!0,text:ke.text}),_e.type=="cut"&&B.operation(function(){B.setSelections(ke.ranges,0,Ut),B.replaceSelection("",null,"cut")})}else return;if(_e.clipboardData){_e.clipboardData.clearData();var ze=TA.text.join(`
|
||
`);if(_e.clipboardData.setData("Text",ze),_e.clipboardData.getData("Text")==ze){_e.preventDefault();return}}var mt=kd(),Mt=mt.firstChild;ah(Mt),B.display.lineSpace.insertBefore(mt,B.display.lineSpace.firstChild),Mt.value=TA.text.join(`
|
||
`);var Xt=We(gt(D));rt(Mt),setTimeout(function(){B.display.lineSpace.removeChild(mt),Xt.focus(),Xt==D&&I.showPrimarySelection()},50)}}je(D,"copy",ue),je(D,"cut",ue)},is.prototype.screenReaderLabelChanged=function(A){A?this.div.setAttribute("aria-label",A):this.div.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var A=fd(this.cm,!1);return A.focus=We(gt(this.div))==this.div,A},is.prototype.showSelection=function(A,y){!A||!this.cm.display.view.length||((A.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(A))},is.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},is.prototype.showPrimarySelection=function(){var A=this.getSelection(),y=this.cm,I=y.doc.sel.primary(),B=I.from(),D=I.to();if(y.display.viewTo==y.display.viewFrom||B.line>=y.display.viewTo||D.line<y.display.viewFrom){A.removeAllRanges();return}var H=gl(y,A.anchorNode,A.anchorOffset),ue=gl(y,A.focusNode,A.focusOffset);if(!(H&&!H.bad&&ue&&!ue.bad&&sr(Ns(H,ue),B)==0&&sr(Cs(H,ue),D)==0)){var _e=y.display.view,ke=B.line>=y.display.viewFrom&&Td(y,B)||{node:_e[0].measure.map[2],offset:0},ze=D.line<y.display.viewTo&&Td(y,D);if(!ze){var mt=_e[_e.length-1].measure,Mt=mt.maps?mt.maps[mt.maps.length-1]:mt.map;ze={node:Mt[Mt.length-1],offset:Mt[Mt.length-2]-Mt[Mt.length-3]}}if(!ke||!ze){A.removeAllRanges();return}var Xt=A.rangeCount&&A.getRangeAt(0),Qt;try{Qt=Qe(ke.node,ke.offset,ze.offset,ze.node)}catch{}Qt&&(!i&&y.state.focused?(A.collapse(ke.node,ke.offset),Qt.collapsed||(A.removeAllRanges(),A.addRange(Qt))):(A.removeAllRanges(),A.addRange(Qt)),Xt&&A.anchorNode==null?A.addRange(Xt):i&&this.startGracePeriod()),this.rememberSelection()}},is.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)},is.prototype.showMultipleSelections=function(A){De(this.cm.display.cursorDiv,A.cursors),De(this.cm.display.selectionDiv,A.selection)},is.prototype.rememberSelection=function(){var A=this.getSelection();this.lastAnchorNode=A.anchorNode,this.lastAnchorOffset=A.anchorOffset,this.lastFocusNode=A.focusNode,this.lastFocusOffset=A.focusOffset},is.prototype.selectionInEditor=function(){var A=this.getSelection();if(!A.rangeCount)return!1;var y=A.getRangeAt(0).commonAncestorContainer;return He(this.div,y)},is.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||We(gt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},is.prototype.blur=function(){this.div.blur()},is.prototype.getField=function(){return this.div},is.prototype.supportsTouch=function(){return!0},is.prototype.receivedFocus=function(){var A=this,y=this;this.selectionInEditor()?setTimeout(function(){return A.pollSelection()},20):Bo(this.cm,function(){return y.cm.curOp.selectionChanged=!0});function I(){y.cm.state.focused&&(y.pollSelection(),y.polling.set(y.cm.options.pollInterval,I))}this.polling.set(this.cm.options.pollInterval,I)},is.prototype.selectionChanged=function(){var A=this.getSelection();return A.anchorNode!=this.lastAnchorNode||A.anchorOffset!=this.lastAnchorOffset||A.focusNode!=this.lastFocusNode||A.focusOffset!=this.lastFocusOffset},is.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var A=this.getSelection(),y=this.cm;if(re&&S&&this.cm.display.gutterSpecs.length&&Sp(A.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var I=gl(y,A.anchorNode,A.anchorOffset),B=gl(y,A.focusNode,A.focusOffset);I&&B&&Bo(y,function(){Ca(y.doc,Na(I,B),Ut),(I.bad||B.bad)&&(y.curOp.selectionChanged=!0)})}}},is.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var A=this.cm,y=A.display,I=A.doc.sel.primary(),B=I.from(),D=I.to();if(B.ch==0&&B.line>A.firstLine()&&(B=An(B.line-1,Kr(A.doc,B.line-1).length)),D.ch==Kr(A.doc,D.line).text.length&&D.line<A.lastLine()&&(D=An(D.line+1,0)),B.line<y.viewFrom||D.line>y.viewTo-1)return!1;var H,ue,_e;B.line==y.viewFrom||(H=lA(A,B.line))==0?(ue=qe(y.view[0].line),_e=y.view[0].node):(ue=qe(y.view[H].line),_e=y.view[H-1].node.nextSibling);var ke=lA(A,D.line),ze,mt;if(ke==y.view.length-1?(ze=y.viewTo-1,mt=y.lineDiv.lastChild):(ze=qe(y.view[ke+1].line)-1,mt=y.view[ke+1].node.previousSibling),!_e)return!1;for(var Mt=A.doc.splitLines(Ym(A,_e,mt,ue,ze)),Xt=Za(A.doc,An(ue,0),An(ze,Kr(A.doc,ze).text.length));Mt.length>1&&Xt.length>1;)if(ir(Mt)==ir(Xt))Mt.pop(),Xt.pop(),ze--;else if(Mt[0]==Xt[0])Mt.shift(),Xt.shift(),ue++;else break;for(var Qt=0,Mn=0,Kn=Mt[0],Zn=Xt[0],or=Math.min(Kn.length,Zn.length);Qt<or&&Kn.charCodeAt(Qt)==Zn.charCodeAt(Qt);)++Qt;for(var br=ir(Mt),dr=ir(Xt),Lr=Math.min(br.length-(Mt.length==1?Qt:0),dr.length-(Xt.length==1?Qt:0));Mn<Lr&&br.charCodeAt(br.length-Mn-1)==dr.charCodeAt(dr.length-Mn-1);)++Mn;if(Mt.length==1&&Xt.length==1&&ue==B.line)for(;Qt&&Qt>B.ch&&br.charCodeAt(br.length-Mn-1)==dr.charCodeAt(dr.length-Mn-1);)Qt--,Mn++;Mt[Mt.length-1]=br.slice(0,br.length-Mn).replace(/^\u200b+/,""),Mt[0]=Mt[0].slice(Qt).replace(/\u200b+$/,"");var ai=An(ue,Qt),Wr=An(ze,Xt.length?ir(Xt).length-Mn:0);if(Mt.length>1||Mt[0]||sr(ai,Wr))return j(A.doc,Mt,ai,Wr,"+input"),!0},is.prototype.ensurePolled=function(){this.forceCompositionEnd()},is.prototype.reset=function(){this.forceCompositionEnd()},is.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},is.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))},is.prototype.updateFromDOM=function(){var A=this;(this.cm.isReadOnly()||!this.pollContent())&&Bo(this.cm,function(){return Tl(A.cm)})},is.prototype.setUneditable=function(A){A.contentEditable="false"},is.prototype.onKeyPress=function(A){A.charCode==0||this.composing||(A.preventDefault(),this.cm.isReadOnly()||Di(this.cm,Mp)(this.cm,String.fromCharCode(A.charCode==null?A.keyCode:A.charCode),0))},is.prototype.readOnlyChanged=function(A){this.div.contentEditable=String(A!="nocursor")},is.prototype.onContextMenu=function(){},is.prototype.resetPosition=function(){},is.prototype.needsContentAttribute=!0;function Td(A,y){var I=CA(A,y.line);if(!I||I.hidden)return null;var B=Kr(A.doc,y.line),D=nf(I,B,y.line),H=ve(B,A.doc.direction),ue="left";if(H){var _e=Be(H,y.ch);ue=_e%2?"right":"left"}var ke=Eh(D.map,y.ch,ue);return ke.offset=ke.collapse=="right"?ke.end:ke.start,ke}function Sp(A){for(var y=A;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Su(A,y){return y&&(A.bad=!0),A}function Ym(A,y,I,B,D){var H="",ue=!1,_e=A.doc.lineSeparator(),ke=!1;function ze(Qt){return function(Mn){return Mn.id==Qt}}function mt(){ue&&(H+=_e,ke&&(H+=_e),ue=ke=!1)}function Mt(Qt){Qt&&(mt(),H+=Qt)}function Xt(Qt){if(Qt.nodeType==1){var Mn=Qt.getAttribute("cm-text");if(Mn){Mt(Mn);return}var Kn=Qt.getAttribute("cm-marker"),Zn;if(Kn){var or=A.findMarks(An(B,0),An(D+1,0),ze(+Kn));or.length&&(Zn=or[0].find(0))&&Mt(Za(A.doc,Zn.from,Zn.to).join(_e));return}if(Qt.getAttribute("contenteditable")=="false")return;var br=/^(pre|div|p|li|table|br)$/i.test(Qt.nodeName);if(!/^br$/i.test(Qt.nodeName)&&Qt.textContent.length==0)return;br&&mt();for(var dr=0;dr<Qt.childNodes.length;dr++)Xt(Qt.childNodes[dr]);/^(pre|p)$/i.test(Qt.nodeName)&&(ke=!0),br&&(ue=!0)}else Qt.nodeType==3&&Mt(Qt.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Xt(y),y!=I;)y=y.nextSibling,ke=!1;return H}function gl(A,y,I){var B;if(y==A.display.lineDiv){if(B=A.display.lineDiv.childNodes[I],!B)return Su(A.clipPos(An(A.display.viewTo-1)),!0);y=null,I=0}else for(B=y;;B=B.parentNode){if(!B||B==A.display.lineDiv)return null;if(B.parentNode&&B.parentNode==A.display.lineDiv)break}for(var D=0;D<A.display.view.length;D++){var H=A.display.view[D];if(H.node==B)return cm(H,y,I)}}function cm(A,y,I){var B=A.text.firstChild,D=!1;if(!y||!He(B,y))return Su(An(qe(A.line),0),!0);if(y==B&&(D=!0,y=B.childNodes[I],I=0,!y)){var H=A.rest?ir(A.rest):A.line;return Su(An(qe(H),H.text.length),D)}var ue=y.nodeType==3?y:null,_e=y;for(!ue&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(ue=y.firstChild,I&&(I=ue.nodeValue.length));_e.parentNode!=B;)_e=_e.parentNode;var ke=A.measure,ze=ke.maps;function mt(Zn,or,br){for(var dr=-1;dr<(ze?ze.length:0);dr++)for(var Lr=dr<0?ke.map:ze[dr],ai=0;ai<Lr.length;ai+=3){var Wr=Lr[ai+2];if(Wr==Zn||Wr==or){var Xi=qe(dr<0?A.line:A.rest[dr]),ko=Lr[ai]+br;return(br<0||Wr!=Zn)&&(ko=Lr[ai+(br?1:0)]),An(Xi,ko)}}}var Mt=mt(ue,_e,I);if(Mt)return Su(Mt,D);for(var Xt=_e.nextSibling,Qt=ue?ue.nodeValue.length-I:0;Xt;Xt=Xt.nextSibling){if(Mt=mt(Xt,Xt.firstChild,0),Mt)return Su(An(Mt.line,Mt.ch-Qt),D);Qt+=Xt.textContent.length}for(var Mn=_e.previousSibling,Kn=I;Mn;Mn=Mn.previousSibling){if(Mt=mt(Mn,Mn.firstChild,-1),Mt)return Su(An(Mt.line,Mt.ch+Kn),D);Kn+=Mn.textContent.length}}var ha=function(A){this.cm=A,this.prevInput="",this.pollingFast=!1,this.polling=new Ee,this.hasSelection=!1,this.composing=null,this.resetting=!1};ha.prototype.init=function(A){var y=this,I=this,B=this.cm;this.createField(A);var D=this.textarea;A.wrapper.insertBefore(this.wrapper,A.wrapper.firstChild),Q&&(D.style.width="0px"),je(D,"input",function(){d&&g>=9&&y.hasSelection&&(y.hasSelection=null),I.poll()}),je(D,"paste",function(ue){At(B,ue)||Oc(ue,B)||(B.state.pasteIncoming=+new Date,I.fastPoll())});function H(ue){if(!At(B,ue)){if(B.somethingSelected())Ph({lineWise:!1,text:B.getSelections()});else if(B.options.lineWiseCopyCut){var _e=uf(B);Ph({lineWise:!0,text:_e.text}),ue.type=="cut"?B.setSelections(_e.ranges,null,Ut):(I.prevInput="",D.value=_e.text.join(`
|
||
`),rt(D))}else return;ue.type=="cut"&&(B.state.cutIncoming=+new Date)}}je(D,"cut",H),je(D,"copy",H),je(A.scroller,"paste",function(ue){if(!(aA(A,ue)||At(B,ue))){if(!D.dispatchEvent){B.state.pasteIncoming=+new Date,I.focus();return}var _e=new Event("paste");_e.clipboardData=ue.clipboardData,D.dispatchEvent(_e)}}),je(A.lineSpace,"selectstart",function(ue){aA(A,ue)||xt(ue)}),je(D,"compositionstart",function(){var ue=B.getCursor("from");I.composing&&I.composing.range.clear(),I.composing={start:ue,range:B.markText(ue,B.getCursor("to"),{className:"CodeMirror-composing"})}}),je(D,"compositionend",function(){I.composing&&(I.poll(),I.composing.range.clear(),I.composing=null)})},ha.prototype.createField=function(A){this.wrapper=kd(),this.textarea=this.wrapper.firstChild;var y=this.cm.options;ah(this.textarea,y.spellcheck,y.autocorrect,y.autocapitalize)},ha.prototype.screenReaderLabelChanged=function(A){A?this.textarea.setAttribute("aria-label",A):this.textarea.removeAttribute("aria-label")},ha.prototype.prepareSelection=function(){var A=this.cm,y=A.display,I=A.doc,B=fd(A);if(A.options.moveInputWithCursor){var D=an(A,I.sel.primary().head,"div"),H=y.wrapper.getBoundingClientRect(),ue=y.lineDiv.getBoundingClientRect();B.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,D.top+ue.top-H.top)),B.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,D.left+ue.left-H.left))}return B},ha.prototype.showSelection=function(A){var y=this.cm,I=y.display;De(I.cursorDiv,A.cursors),De(I.selectionDiv,A.selection),A.teTop!=null&&(this.wrapper.style.top=A.teTop+"px",this.wrapper.style.left=A.teLeft+"px")},ha.prototype.reset=function(A){if(!(this.contextMenuPending||this.composing&&A)){var y=this.cm;if(this.resetting=!0,y.somethingSelected()){this.prevInput="";var I=y.getSelection();this.textarea.value=I,y.state.focused&&rt(this.textarea),d&&g>=9&&(this.hasSelection=I)}else A||(this.prevInput=this.textarea.value="",d&&g>=9&&(this.hasSelection=null));this.resetting=!1}},ha.prototype.getField=function(){return this.textarea},ha.prototype.supportsTouch=function(){return!1},ha.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!X||We(gt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ha.prototype.blur=function(){this.textarea.blur()},ha.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ha.prototype.receivedFocus=function(){this.slowPoll()},ha.prototype.slowPoll=function(){var A=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){A.poll(),A.cm.state.focused&&A.slowPoll()})},ha.prototype.fastPoll=function(){var A=!1,y=this;y.pollingFast=!0;function I(){var B=y.poll();!B&&!A?(A=!0,y.polling.set(60,I)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,I)},ha.prototype.poll=function(){var A=this,y=this.cm,I=this.textarea,B=this.prevInput;if(this.contextMenuPending||this.resetting||!y.state.focused||co(I)&&!B&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var D=I.value;if(D==B&&!y.somethingSelected())return!1;if(d&&g>=9&&this.hasSelection===D||Y&&/[\uf700-\uf7ff]/.test(D))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var H=D.charCodeAt(0);if(H==8203&&!B&&(B=""),H==8666)return this.reset(),this.cm.execCommand("undo")}for(var ue=0,_e=Math.min(B.length,D.length);ue<_e&&B.charCodeAt(ue)==D.charCodeAt(ue);)++ue;return Bo(y,function(){Mp(y,D.slice(ue),B.length-ue,null,A.composing?"*compose":null),D.length>1e3||D.indexOf(`
|
||
`)>-1?I.value=A.prevInput="":A.prevInput=D,A.composing&&(A.composing.range.clear(),A.composing.range=y.markText(A.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ha.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ha.prototype.onKeyPress=function(){d&&g>=9&&(this.hasSelection=null),this.fastPoll()},ha.prototype.onContextMenu=function(A){var y=this,I=y.cm,B=I.display,D=y.textarea;y.contextMenuPending&&y.contextMenuPending();var H=_A(I,A),ue=B.scroller.scrollTop;if(!H||k)return;var _e=I.options.resetSelectionOnContextMenu;_e&&I.doc.sel.contains(H)==-1&&Di(I,Ca)(I.doc,Na(H),Ut);var ke=D.style.cssText,ze=y.wrapper.style.cssText,mt=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",D.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||
top: `+(A.clientY-mt.top-5)+"px; left: "+(A.clientX-mt.left-5)+`px;
|
||
z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Mt;b&&(Mt=D.ownerDocument.defaultView.scrollY),B.input.focus(),b&&D.ownerDocument.defaultView.scrollTo(null,Mt),B.input.reset(),I.somethingSelected()||(D.value=y.prevInput=" "),y.contextMenuPending=Qt,B.selForContextMenu=I.doc.sel,clearTimeout(B.detectingSelectAll);function Xt(){if(D.selectionStart!=null){var Kn=I.somethingSelected(),Zn=""+(Kn?D.value:"");D.value="⇚",D.value=Zn,y.prevInput=Kn?"":"",D.selectionStart=1,D.selectionEnd=Zn.length,B.selForContextMenu=I.doc.sel}}function Qt(){if(y.contextMenuPending==Qt&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ze,D.style.cssText=ke,d&&g<9&&B.scrollbars.setScrollTop(B.scroller.scrollTop=ue),D.selectionStart!=null)){(!d||d&&g<9)&&Xt();var Kn=0,Zn=function(){B.selForContextMenu==I.doc.sel&&D.selectionStart==0&&D.selectionEnd>0&&y.prevInput==""?Di(I,Ql)(I):Kn++<10?B.detectingSelectAll=setTimeout(Zn,500):(B.selForContextMenu=null,B.input.reset())};B.detectingSelectAll=setTimeout(Zn,200)}}if(d&&g>=9&&Xt(),de){fr(A);var Mn=function(){tt(window,"mouseup",Mn),setTimeout(Qt,20)};je(window,"mouseup",Mn)}else setTimeout(Qt,50)},ha.prototype.readOnlyChanged=function(A){A||this.reset(),this.textarea.disabled=A=="nocursor",this.textarea.readOnly=!!A},ha.prototype.setUneditable=function(){},ha.prototype.needsContentAttribute=!1;function dm(A,y){if(y=y?Le(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 I=We(gt(A));y.autofocus=I==A||A.getAttribute("autofocus")!=null&&I==document.body}function B(){A.value=_e.getValue()}var D;if(A.form&&(je(A.form,"submit",B),!y.leaveSubmitMethodAlone)){var H=A.form;D=H.submit;try{var ue=H.submit=function(){B(),H.submit=D,H.submit(),H.submit=ue}}catch{}}y.finishInit=function(ke){ke.save=B,ke.getTextArea=function(){return A},ke.toTextArea=function(){ke.toTextArea=isNaN,B(),A.parentNode.removeChild(ke.getWrapperElement()),A.style.display="",A.form&&(tt(A.form,"submit",B),!y.leaveSubmitMethodAlone&&typeof A.form.submit=="function"&&(A.form.submit=D))}},A.style.display="none";var _e=Io(function(ke){return A.parentNode.insertBefore(ke,A.nextSibling)},y);return _e}function Af(A){A.off=tt,A.on=je,A.wheelEventPixels=AA,A.Doc=Zt,A.splitLines=ur,A.countColumn=Pe,A.findColumn=mn,A.isWordChar=Xn,A.Pass=ht,A.signal=ct,A.Line=Ua,A.changeEnd=Ks,A.scrollbarModel=ju,A.Pos=An,A.cmpPos=sr,A.modes=oo,A.mimeModes=Mo,A.resolveMode=Ea,A.getMode=ns,A.modeExtensions=Aa,A.extendMode=Al,A.copyState=ao,A.startState=tu,A.innerMode=Pu,A.commands=ml,A.keyMap=yo,A.keyName=fl,A.isModifierKey=Wa,A.lookupKey=ds,A.normalizeKeyMap=Wo,A.StringStream=so,A.SharedTextMarker=Bt,A.TextMarker=pt,A.LineWidget=$e,A.e_preventDefault=xt,A.e_stopPropagation=Rn,A.e_stop=fr,A.addClass=Ce,A.contains=He,A.rmClass=fe,A.keyNames=Si}Rl(Io),Hc(Io);var il="iter insert remove copy getEditor constructor".split(" ");for(var Ep in Zt.prototype)Zt.prototype.hasOwnProperty(Ep)&&nt(il,Ep)<0&&(Io.prototype[Ep]=function(A){return function(){return A.apply(this.doc,arguments)}}(Zt.prototype[Ep]));return jt(Zt),Io.inputStyles={textarea:ha,contenteditable:is},Io.defineMode=function(A){!Io.defaults.mode&&A!="null"&&(Io.defaults.mode=A),Ti.apply(this,arguments)},Io.defineMIME=La,Io.defineMode("null",function(){return{token:function(A){return A.skipToEnd()}}}),Io.defineMIME("text/plain","null"),Io.defineExtension=function(A,y){Io.prototype[A]=y},Io.defineDocExtension=function(A,y){Zt.prototype[A]=y},Io.fromTextArea=dm,Af(Io),Io.version="5.65.16",Io})}(Ib)),Ib.exports}var yle=Hx();const ap=Ha(yle);var AT={exports:{}},cT;function vle(){return cT||(cT=1,function(n,e){(function(t){t(Hx())})(function(t){t.defineMode("javascript",function(r,i){var s=r.indentUnit,a=i.statementIndent,o=i.jsonld,d=i.json||o,g=i.trackScope!==!1,b=i.typescript,E=i.wordCharacters||/[\w$\xa1-\uffff]/,S=function(){function qe(ho){return{type:ho,style:"keyword"}}var wt=qe("keyword a"),gn=qe("keyword b"),qn=qe("keyword c"),An=qe("keyword d"),sr=qe("operator"),Pi={type:"atom",style:"atom"};return{if:qe("if"),while:wt,with:wt,else:gn,do:gn,try:gn,finally:gn,return:An,break:An,continue:An,new:qe("new"),delete:qn,void:qn,throw:qn,debugger:qe("debugger"),var:qe("var"),const:qe("var"),let:qe("var"),function:qe("function"),catch:qe("catch"),for:qe("for"),switch:qe("switch"),case:qe("case"),default:qe("default"),in:sr,typeof:sr,instanceof:sr,true:Pi,false:Pi,null:Pi,undefined:Pi,NaN:Pi,Infinity:Pi,this:qe("this"),class:qe("class"),super:qe("atom"),yield:qn,export:qe("export"),import:qe("import"),extends:qn,await:qn}}(),O=/[+\-*&%=<>!?|~^@]/,k=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function U(qe){for(var wt=!1,gn,qn=!1;(gn=qe.next())!=null;){if(!wt){if(gn=="/"&&!qn)return;gn=="["?qn=!0:qn&&gn=="]"&&(qn=!1)}wt=!wt&&gn=="\\"}}var z,q;function Q(qe,wt,gn){return z=qe,q=gn,wt}function re(qe,wt){var gn=qe.next();if(gn=='"'||gn=="'")return wt.tokenize=X(gn),wt.tokenize(qe,wt);if(gn=="."&&qe.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return Q("number","number");if(gn=="."&&qe.match(".."))return Q("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(gn))return Q(gn);if(gn=="="&&qe.eat(">"))return Q("=>","operator");if(gn=="0"&&qe.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return Q("number","number");if(/\d/.test(gn))return qe.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),Q("number","number");if(gn=="/")return qe.eat("*")?(wt.tokenize=Y,Y(qe,wt)):qe.eat("/")?(qe.skipToEnd(),Q("comment","comment")):ia(qe,wt,1)?(U(qe),qe.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),Q("regexp","string-2")):(qe.eat("="),Q("operator","operator",qe.current()));if(gn=="`")return wt.tokenize=ee,ee(qe,wt);if(gn=="#"&&qe.peek()=="!")return qe.skipToEnd(),Q("meta","meta");if(gn=="#"&&qe.eatWhile(E))return Q("variable","property");if(gn=="<"&&qe.match("!--")||gn=="-"&&qe.match("->")&&!/\S/.test(qe.string.slice(0,qe.start)))return qe.skipToEnd(),Q("comment","comment");if(O.test(gn))return(gn!=">"||!wt.lexical||wt.lexical.type!=">")&&(qe.eat("=")?(gn=="!"||gn=="=")&&qe.eat("="):/[<>*+\-|&?]/.test(gn)&&(qe.eat(gn),gn==">"&&qe.eat(gn))),gn=="?"&&qe.eat(".")?Q("."):Q("operator","operator",qe.current());if(E.test(gn)){qe.eatWhile(E);var qn=qe.current();if(wt.lastType!="."){if(S.propertyIsEnumerable(qn)){var An=S[qn];return Q(An.type,An.style,qn)}if(qn=="async"&&qe.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return Q("async","keyword",qn)}return Q("variable","variable",qn)}}function X(qe){return function(wt,gn){var qn=!1,An;if(o&&wt.peek()=="@"&&wt.match(k))return gn.tokenize=re,Q("jsonld-keyword","meta");for(;(An=wt.next())!=null&&!(An==qe&&!qn);)qn=!qn&&An=="\\";return qn||(gn.tokenize=re),Q("string","string")}}function Y(qe,wt){for(var gn=!1,qn;qn=qe.next();){if(qn=="/"&&gn){wt.tokenize=re;break}gn=qn=="*"}return Q("comment","comment")}function ee(qe,wt){for(var gn=!1,qn;(qn=qe.next())!=null;){if(!gn&&(qn=="`"||qn=="$"&&qe.eat("{"))){wt.tokenize=re;break}gn=!gn&&qn=="\\"}return Q("quasi","string-2",qe.current())}var N="([{}])";function ie(qe,wt){wt.fatArrowAt&&(wt.fatArrowAt=null);var gn=qe.string.indexOf("=>",qe.start);if(!(gn<0)){if(b){var qn=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(qe.string.slice(qe.start,gn));qn&&(gn=qn.index)}for(var An=0,sr=!1,Pi=gn-1;Pi>=0;--Pi){var ho=qe.string.charAt(Pi),Cs=N.indexOf(ho);if(Cs>=0&&Cs<3){if(!An){++Pi;break}if(--An==0){ho=="("&&(sr=!0);break}}else if(Cs>=3&&Cs<6)++An;else if(E.test(ho))sr=!0;else if(/["'\/`]/.test(ho))for(;;--Pi){if(Pi==0)return;var Ns=qe.string.charAt(Pi-1);if(Ns==ho&&qe.string.charAt(Pi-2)!="\\"){Pi--;break}}else if(sr&&!An){++Pi;break}}sr&&!An&&(wt.fatArrowAt=Pi)}}var he={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function de(qe,wt,gn,qn,An,sr){this.indented=qe,this.column=wt,this.type=gn,this.prev=An,this.info=sr,qn!=null&&(this.align=qn)}function Me(qe,wt){if(!g)return!1;for(var gn=qe.localVars;gn;gn=gn.next)if(gn.name==wt)return!0;for(var qn=qe.context;qn;qn=qn.prev)for(var gn=qn.vars;gn;gn=gn.next)if(gn.name==wt)return!0}function fe(qe,wt,gn,qn,An){var sr=qe.cc;for(xe.state=qe,xe.stream=An,xe.marked=null,xe.cc=sr,xe.style=wt,qe.lexical.hasOwnProperty("align")||(qe.lexical.align=!0);;){var Pi=sr.length?sr.pop():d?nt:Pe;if(Pi(gn,qn)){for(;sr.length&&sr[sr.length-1].lex;)sr.pop()();return xe.marked?xe.marked:gn=="variable"&&Me(qe,qn)?"variable-2":wt}}}var xe={state:null,column:null,marked:null,cc:null};function De(){for(var qe=arguments.length-1;qe>=0;qe--)xe.cc.push(arguments[qe])}function me(){return De.apply(null,arguments),!0}function at(qe,wt){for(var gn=wt;gn;gn=gn.next)if(gn.name==qe)return!0;return!1}function Qe(qe){var wt=xe.state;if(xe.marked="def",!!g){if(wt.context){if(wt.lexical.info=="var"&&wt.context&&wt.context.block){var gn=He(qe,wt.context);if(gn!=null){wt.context=gn;return}}else if(!at(qe,wt.localVars)){wt.localVars=new Te(qe,wt.localVars);return}}i.globalVars&&!at(qe,wt.globalVars)&&(wt.globalVars=new Te(qe,wt.globalVars))}}function He(qe,wt){if(wt)if(wt.block){var gn=He(qe,wt.prev);return gn?gn==wt.prev?wt:new Ce(gn,wt.vars,!0):null}else return at(qe,wt.vars)?wt:new Ce(wt.prev,new Te(qe,wt.vars),!1);else return null}function We(qe){return qe=="public"||qe=="private"||qe=="protected"||qe=="abstract"||qe=="readonly"}function Ce(qe,wt,gn){this.prev=qe,this.vars=wt,this.block=gn}function Te(qe,wt){this.name=qe,this.next=wt}var rt=new Te("this",new Te("arguments",null));function yt(){xe.state.context=new Ce(xe.state.context,xe.state.localVars,!1),xe.state.localVars=rt}function bt(){xe.state.context=new Ce(xe.state.context,xe.state.localVars,!0),xe.state.localVars=null}yt.lex=bt.lex=!0;function gt(){xe.state.localVars=xe.state.context.vars,xe.state.context=xe.state.context.prev}gt.lex=!0;function Dt(qe,wt){var gn=function(){var qn=xe.state,An=qn.indented;if(qn.lexical.type=="stat")An=qn.lexical.indented;else for(var sr=qn.lexical;sr&&sr.type==")"&&sr.align;sr=sr.prev)An=sr.indented;qn.lexical=new de(An,xe.stream.column(),qe,null,qn.lexical,wt)};return gn.lex=!0,gn}function Pt(){var qe=xe.state;qe.lexical.prev&&(qe.lexical.type==")"&&(qe.indented=qe.lexical.indented),qe.lexical=qe.lexical.prev)}Pt.lex=!0;function Le(qe){function wt(gn){return gn==qe?me():qe==";"||gn=="}"||gn==")"||gn=="]"?De():me(wt)}return wt}function Pe(qe,wt){return qe=="var"?me(Dt("vardef",wt),Rn,Le(";"),Pt):qe=="keyword a"?me(Dt("form"),ht,Pe,Pt):qe=="keyword b"?me(Dt("form"),Pe,Pt):qe=="keyword d"?xe.stream.match(/^\s*$/,!1)?me():me(Dt("stat"),en,Le(";"),Pt):qe=="debugger"?me(Le(";")):qe=="{"?me(Dt("}"),bt,Yt,Pt,gt):qe==";"?me():qe=="if"?(xe.state.lexical.info=="else"&&xe.state.cc[xe.state.cc.length-1]==Pt&&xe.state.cc.pop()(),me(Dt("form"),ht,Pe,Pt,Fn)):qe=="function"?me(ur):qe=="for"?me(Dt("form"),bt,Or,Pe,gt,Pt):qe=="class"||b&&wt=="interface"?(xe.marked="keyword",me(Dt("form",qe=="class"?qe:wt),oo,Pt)):qe=="variable"?b&&wt=="declare"?(xe.marked="keyword",me(Pe)):b&&(wt=="module"||wt=="enum"||wt=="type")&&xe.stream.match(/^\s*\w/,!1)?(xe.marked="keyword",wt=="enum"?me(Kr):wt=="type"?me(Sa,Le("operator"),ve,Le(";")):me(Dt("form"),Bn,Le("{"),Dt("}"),Yt,Pt,Pt)):b&&wt=="namespace"?(xe.marked="keyword",me(Dt("form"),nt,Pe,Pt)):b&&wt=="abstract"?(xe.marked="keyword",me(Pe)):me(Dt("stat"),Qn):qe=="switch"?me(Dt("form"),ht,Le("{"),Dt("}","switch"),bt,Yt,Pt,Pt,gt):qe=="case"?me(nt,Le(":")):qe=="default"?me(Le(":")):qe=="catch"?me(Dt("form"),yt,Ee,Pe,Pt,gt):qe=="export"?me(Dt("stat"),Ea,Pt):qe=="import"?me(Dt("stat"),Aa,Pt):qe=="async"?me(Pe):wt=="@"?me(nt,Pe):De(Dt("stat"),nt,Le(";"),Pt)}function Ee(qe){if(qe=="(")return me(qi,Le(")"))}function nt(qe,wt){return Ut(qe,wt,!1)}function _t(qe,wt){return Ut(qe,wt,!0)}function ht(qe){return qe!="("?De():me(Dt(")"),en,Le(")"),Pt)}function Ut(qe,wt,gn){if(xe.state.fatArrowAt==xe.stream.start){var qn=gn?Dn:ir;if(qe=="(")return me(yt,Dt(")"),et(qi,")"),Pt,Le("=>"),qn,gt);if(qe=="variable")return De(yt,Bn,Le("=>"),qn,gt)}var An=gn?mn:Ft;return he.hasOwnProperty(qe)?me(An):qe=="function"?me(ur,An):qe=="class"||b&&wt=="interface"?(xe.marked="keyword",me(Dt("form"),yi,Pt)):qe=="keyword c"||qe=="async"?me(gn?_t:nt):qe=="("?me(Dt(")"),en,Le(")"),Pt,An):qe=="operator"||qe=="spread"?me(gn?_t:nt):qe=="["?me(Dt("]"),so,Pt,An):qe=="{"?St(Ge,"}",null,An):qe=="quasi"?De(jn,An):qe=="new"?me(fn(gn)):me()}function en(qe){return qe.match(/[;\}\)\],]/)?De():De(nt)}function Ft(qe,wt){return qe==","?me(en):mn(qe,wt,!1)}function mn(qe,wt,gn){var qn=gn==!1?Ft:mn,An=gn==!1?nt:_t;if(qe=="=>")return me(yt,gn?Dn:ir,gt);if(qe=="operator")return/\+\+|--/.test(wt)||b&&wt=="!"?me(qn):b&&wt=="<"&&xe.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?me(Dt(">"),et(ve,">"),Pt,qn):wt=="?"?me(nt,Le(":"),An):me(An);if(qe=="quasi")return De(jn,qn);if(qe!=";"){if(qe=="(")return St(_t,")","call",qn);if(qe==".")return me(Xn,qn);if(qe=="[")return me(Dt("]"),en,Le("]"),Pt,qn);if(b&&wt=="as")return xe.marked="keyword",me(ve,qn);if(qe=="regexp")return xe.state.lastType=xe.marked="operator",xe.stream.backUp(xe.stream.pos-xe.stream.start-1),me(An)}}function jn(qe,wt){return qe!="quasi"?De():wt.slice(wt.length-2)!="${"?me(jn):me(en,nn)}function nn(qe){if(qe=="}")return xe.marked="string-2",xe.state.tokenize=ee,me(jn)}function ir(qe){return ie(xe.stream,xe.state),De(qe=="{"?Pe:nt)}function Dn(qe){return ie(xe.stream,xe.state),De(qe=="{"?Pe:_t)}function fn(qe){return function(wt){return wt=="."?me(qe?wr:Hn):wt=="variable"&&b?me($t,qe?mn:Ft):De(qe?_t:nt)}}function Hn(qe,wt){if(wt=="target")return xe.marked="keyword",me(Ft)}function wr(qe,wt){if(wt=="target")return xe.marked="keyword",me(mn)}function Qn(qe){return qe==":"?me(Pt,Pe):De(Ft,Le(";"),Pt)}function Xn(qe){if(qe=="variable")return xe.marked="property",me()}function Ge(qe,wt){if(qe=="async")return xe.marked="property",me(Ge);if(qe=="variable"||xe.style=="keyword"){if(xe.marked="property",wt=="get"||wt=="set")return me(Ae);var gn;return b&&xe.state.fatArrowAt==xe.stream.start&&(gn=xe.stream.match(/^\s*:\s*/,!1))&&(xe.state.fatArrowAt=xe.stream.pos+gn[0].length),me(pe)}else{if(qe=="number"||qe=="string")return xe.marked=o?"property":xe.style+" property",me(pe);if(qe=="jsonld-keyword")return me(pe);if(b&&We(wt))return xe.marked="keyword",me(Ge);if(qe=="[")return me(nt,rn,Le("]"),pe);if(qe=="spread")return me(_t,pe);if(wt=="*")return xe.marked="keyword",me(Ge);if(qe==":")return De(pe)}}function Ae(qe){return qe!="variable"?De(pe):(xe.marked="property",me(ur))}function pe(qe){if(qe==":")return me(_t);if(qe=="(")return De(ur)}function et(qe,wt,gn){function qn(An,sr){if(gn?gn.indexOf(An)>-1:An==","){var Pi=xe.state.lexical;return Pi.info=="call"&&(Pi.pos=(Pi.pos||0)+1),me(function(ho,Cs){return ho==wt||Cs==wt?De():De(qe)},qn)}return An==wt||sr==wt?me():gn&&gn.indexOf(";")>-1?De(qe):me(Le(wt))}return function(An,sr){return An==wt||sr==wt?me():De(qe,qn)}}function St(qe,wt,gn){for(var qn=3;qn<arguments.length;qn++)xe.cc.push(arguments[qn]);return me(Dt(wt,gn),et(qe,wt),Pt)}function Yt(qe){return qe=="}"?me():De(Pe,Yt)}function rn(qe,wt){if(b){if(qe==":")return me(ve);if(wt=="?")return me(rn)}}function er(qe,wt){if(b&&(qe==":"||wt=="in"))return me(ve)}function Be(qe){if(b&&qe==":")return xe.stream.match(/^\s*\w+\s+is\b/,!1)?me(nt,oe,ve):me(ve)}function oe(qe,wt){if(wt=="is")return xe.marked="keyword",me()}function ve(qe,wt){if(wt=="keyof"||wt=="typeof"||wt=="infer"||wt=="readonly")return xe.marked="keyword",me(wt=="typeof"?_t:ve);if(qe=="variable"||wt=="void")return xe.marked="type",me(Gt);if(wt=="|"||wt=="&")return me(ve);if(qe=="string"||qe=="number"||qe=="atom")return me(Gt);if(qe=="[")return me(Dt("]"),et(ve,"]",","),Pt,Gt);if(qe=="{")return me(Dt("}"),je,Pt,Gt);if(qe=="(")return me(et(At,")"),p,Gt);if(qe=="<")return me(et(ve,">"),ve);if(qe=="quasi")return De(tt,Gt)}function p(qe){if(qe=="=>")return me(ve)}function je(qe){return qe.match(/[\}\)\]]/)?me():qe==","||qe==";"?me(je):De(Ye,je)}function Ye(qe,wt){if(qe=="variable"||xe.style=="keyword")return xe.marked="property",me(Ye);if(wt=="?"||qe=="number"||qe=="string")return me(Ye);if(qe==":")return me(ve);if(qe=="[")return me(Le("variable"),er,Le("]"),Ye);if(qe=="(")return De(co,Ye);if(!qe.match(/[;\}\)\],]/))return me()}function tt(qe,wt){return qe!="quasi"?De():wt.slice(wt.length-2)!="${"?me(tt):me(ve,ct)}function ct(qe){if(qe=="}")return xe.marked="string-2",xe.state.tokenize=ee,me(tt)}function At(qe,wt){return qe=="variable"&&xe.stream.match(/^\s*[?:]/,!1)||wt=="?"?me(At):qe==":"?me(ve):qe=="spread"?me(At):De(ve)}function Gt(qe,wt){if(wt=="<")return me(Dt(">"),et(ve,">"),Pt,Gt);if(wt=="|"||qe=="."||wt=="&")return me(ve);if(qe=="[")return me(ve,Le("]"),Gt);if(wt=="extends"||wt=="implements")return xe.marked="keyword",me(ve);if(wt=="?")return me(ve,Le(":"),ve)}function $t(qe,wt){if(wt=="<")return me(Dt(">"),et(ve,">"),Pt,Gt)}function jt(){return De(ve,xt)}function xt(qe,wt){if(wt=="=")return me(ve)}function Rn(qe,wt){return wt=="enum"?(xe.marked="keyword",me(Kr)):De(Bn,rn,on,Nn)}function Bn(qe,wt){if(b&&We(wt))return xe.marked="keyword",me(Bn);if(qe=="variable")return Qe(wt),me();if(qe=="spread")return me(Bn);if(qe=="[")return St(Sr,"]");if(qe=="{")return St(fr,"}")}function fr(qe,wt){return qe=="variable"&&!xe.stream.match(/^\s*:/,!1)?(Qe(wt),me(on)):(qe=="variable"&&(xe.marked="property"),qe=="spread"?me(Bn):qe=="}"?De():qe=="["?me(nt,Le("]"),Le(":"),fr):me(Le(":"),Bn,on))}function Sr(){return De(Bn,on)}function on(qe,wt){if(wt=="=")return me(_t)}function Nn(qe){if(qe==",")return me(Rn)}function Fn(qe,wt){if(qe=="keyword b"&&wt=="else")return me(Dt("form","else"),Pe,Pt)}function Or(qe,wt){if(wt=="await")return me(Or);if(qe=="(")return me(Dt(")"),Er,Pt)}function Er(qe){return qe=="var"?me(Rn,Dr):qe=="variable"?me(Dr):De(Dr)}function Dr(qe,wt){return qe==")"?me():qe==";"?me(Dr):wt=="in"||wt=="of"?(xe.marked="keyword",me(nt,Dr)):De(nt,Dr)}function ur(qe,wt){if(wt=="*")return xe.marked="keyword",me(ur);if(qe=="variable")return Qe(wt),me(ur);if(qe=="(")return me(yt,Dt(")"),et(qi,")"),Pt,Be,Pe,gt);if(b&&wt=="<")return me(Dt(">"),et(jt,">"),Pt,ur)}function co(qe,wt){if(wt=="*")return xe.marked="keyword",me(co);if(qe=="variable")return Qe(wt),me(co);if(qe=="(")return me(yt,Dt(")"),et(qi,")"),Pt,Be,gt);if(b&&wt=="<")return me(Dt(">"),et(jt,">"),Pt,co)}function Sa(qe,wt){if(qe=="keyword"||qe=="variable")return xe.marked="type",me(Sa);if(wt=="<")return me(Dt(">"),et(jt,">"),Pt)}function qi(qe,wt){return wt=="@"&&me(nt,qi),qe=="spread"?me(qi):b&&We(wt)?(xe.marked="keyword",me(qi)):b&&qe=="this"?me(rn,on):De(Bn,rn,on)}function yi(qe,wt){return qe=="variable"?oo(qe,wt):Mo(qe,wt)}function oo(qe,wt){if(qe=="variable")return Qe(wt),me(Mo)}function Mo(qe,wt){if(wt=="<")return me(Dt(">"),et(jt,">"),Pt,Mo);if(wt=="extends"||wt=="implements"||b&&qe==",")return wt=="implements"&&(xe.marked="keyword"),me(b?ve:nt,Mo);if(qe=="{")return me(Dt("}"),Ti,Pt)}function Ti(qe,wt){if(qe=="async"||qe=="variable"&&(wt=="static"||wt=="get"||wt=="set"||b&&We(wt))&&xe.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return xe.marked="keyword",me(Ti);if(qe=="variable"||xe.style=="keyword")return xe.marked="property",me(La,Ti);if(qe=="number"||qe=="string")return me(La,Ti);if(qe=="[")return me(nt,rn,Le("]"),La,Ti);if(wt=="*")return xe.marked="keyword",me(Ti);if(b&&qe=="(")return De(co,Ti);if(qe==";"||qe==",")return me(Ti);if(qe=="}")return me();if(wt=="@")return me(nt,Ti)}function La(qe,wt){if(wt=="!"||wt=="?")return me(La);if(qe==":")return me(ve,on);if(wt=="=")return me(_t);var gn=xe.state.lexical.prev,qn=gn&&gn.info=="interface";return De(qn?co:ur)}function Ea(qe,wt){return wt=="*"?(xe.marked="keyword",me(tu,Le(";"))):wt=="default"?(xe.marked="keyword",me(nt,Le(";"))):qe=="{"?me(et(ns,"}"),tu,Le(";")):De(Pe)}function ns(qe,wt){if(wt=="as")return xe.marked="keyword",me(Le("variable"));if(qe=="variable")return De(_t,ns)}function Aa(qe){return qe=="string"?me():qe=="("?De(nt):qe=="."?De(Ft):De(Al,ao,tu)}function Al(qe,wt){return qe=="{"?St(Al,"}"):(qe=="variable"&&Qe(wt),wt=="*"&&(xe.marked="keyword"),me(Pu))}function ao(qe){if(qe==",")return me(Al,ao)}function Pu(qe,wt){if(wt=="as")return xe.marked="keyword",me(Al)}function tu(qe,wt){if(wt=="from")return xe.marked="keyword",me(nt)}function so(qe){return qe=="]"?me():De(et(_t,"]"))}function Kr(){return De(Dt("form"),Bn,Le("{"),Dt("}"),et(Za,"}"),Pt,Pt)}function Za(){return De(Bn,on)}function Ps(qe,wt){return qe.lastType=="operator"||qe.lastType==","||O.test(wt.charAt(0))||/[,.]/.test(wt.charAt(0))}function ia(qe,wt,gn){return wt.tokenize==re&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(wt.lastType)||wt.lastType=="quasi"&&/\{\s*$/.test(qe.string.slice(0,qe.pos-(gn||0)))}return{startState:function(qe){var wt={tokenize:re,lastType:"sof",cc:[],lexical:new de((qe||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new Ce(null,null,!1),indented:qe||0};return i.globalVars&&typeof i.globalVars=="object"&&(wt.globalVars=i.globalVars),wt},token:function(qe,wt){if(qe.sol()&&(wt.lexical.hasOwnProperty("align")||(wt.lexical.align=!1),wt.indented=qe.indentation(),ie(qe,wt)),wt.tokenize!=Y&&qe.eatSpace())return null;var gn=wt.tokenize(qe,wt);return z=="comment"?gn:(wt.lastType=z=="operator"&&(q=="++"||q=="--")?"incdec":z,fe(wt,gn,z,q,qe))},indent:function(qe,wt){if(qe.tokenize==Y||qe.tokenize==ee)return t.Pass;if(qe.tokenize!=re)return 0;var gn=wt&&wt.charAt(0),qn=qe.lexical,An;if(!/^\s*else\b/.test(wt))for(var sr=qe.cc.length-1;sr>=0;--sr){var Pi=qe.cc[sr];if(Pi==Pt)qn=qn.prev;else if(Pi!=Fn&&Pi!=gt)break}for(;(qn.type=="stat"||qn.type=="form")&&(gn=="}"||(An=qe.cc[qe.cc.length-1])&&(An==Ft||An==mn)&&!/^[,\.=+\-*:?[\(]/.test(wt));)qn=qn.prev;a&&qn.type==")"&&qn.prev.type=="stat"&&(qn=qn.prev);var ho=qn.type,Cs=gn==ho;return ho=="vardef"?qn.indented+(qe.lastType=="operator"||qe.lastType==","?qn.info.length+1:0):ho=="form"&&gn=="{"?qn.indented:ho=="form"?qn.indented+s:ho=="stat"?qn.indented+(Ps(qe,wt)?a||s:0):qn.info=="switch"&&!Cs&&i.doubleIndentSwitch!=!1?qn.indented+(/^(?:case|default)\b/.test(wt)?s:2*s):qn.align?qn.column+(Cs?0:1):qn.indented+(Cs?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:o,jsonMode:d,expressionAllowed:ia,skipExpression:function(qe){fe(qe,"atom","atom","true",new t.StringStream("",2,null))}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),AT.exports}vle();var dT={exports:{}},hT;function Cle(){return hT||(hT=1,function(n,e){(function(t){t(Hx())})(function(t){var r="CodeMirror-lint-markers",i="CodeMirror-lint-line-";function s(N,ie,he){var de=document.createElement("div");de.className="CodeMirror-lint-tooltip cm-s-"+N.options.theme,de.appendChild(he.cloneNode(!0)),N.state.lint.options.selfContain?N.getWrapperElement().appendChild(de):document.body.appendChild(de);function Me(fe){if(!de.parentNode)return t.off(document,"mousemove",Me);var xe=Math.max(0,fe.clientY-de.offsetHeight-5),De=Math.max(0,Math.min(fe.clientX+5,de.ownerDocument.defaultView.innerWidth-de.offsetWidth));de.style.top=xe+"px",de.style.left=De+"px"}return t.on(document,"mousemove",Me),Me(ie),de.style.opacity!=null&&(de.style.opacity=1),de}function a(N){N.parentNode&&N.parentNode.removeChild(N)}function o(N){N.parentNode&&(N.style.opacity==null&&a(N),N.style.opacity=0,setTimeout(function(){a(N)},600))}function d(N,ie,he,de){var Me=s(N,ie,he);function fe(){t.off(de,"mouseout",fe),Me&&(o(Me),Me=null)}var xe=setInterval(function(){if(Me)for(var De=de;;De=De.parentNode){if(De&&De.nodeType==11&&(De=De.host),De==document.body)return;if(!De){fe();break}}if(!Me)return clearInterval(xe)},400);t.on(de,"mouseout",fe)}function g(N,ie,he){this.marked=[],ie instanceof Function&&(ie={getAnnotations:ie}),(!ie||ie===!0)&&(ie={}),this.options={},this.linterOptions=ie.options||{};for(var de in b)this.options[de]=b[de];for(var de in ie)b.hasOwnProperty(de)?ie[de]!=null&&(this.options[de]=ie[de]):ie.options||(this.linterOptions[de]=ie[de]);this.timeout=null,this.hasGutter=he,this.onMouseOver=function(Me){ee(N,Me)},this.waitingFor=0}var b={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function E(N){var ie=N.state.lint;ie.hasGutter&&N.clearGutter(r),ie.options.highlightLines&&S(N);for(var he=0;he<ie.marked.length;++he)ie.marked[he].clear();ie.marked.length=0}function S(N){N.eachLine(function(ie){var he=ie.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(ie.wrapClass);he&&N.removeLineClass(ie,"wrap",he[0])})}function O(N,ie,he,de,Me){var fe=document.createElement("div"),xe=fe;return fe.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+he,de&&(xe=fe.appendChild(document.createElement("div")),xe.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),Me!=!1&&t.on(xe,"mouseover",function(De){d(N,De,ie,xe)}),fe}function k(N,ie){return N=="error"?N:ie}function U(N){for(var ie=[],he=0;he<N.length;++he){var de=N[he],Me=de.from.line;(ie[Me]||(ie[Me]=[])).push(de)}return ie}function z(N){var ie=N.severity;ie||(ie="error");var he=document.createElement("div");return he.className="CodeMirror-lint-message CodeMirror-lint-message-"+ie,typeof N.messageHTML<"u"?he.innerHTML=N.messageHTML:he.appendChild(document.createTextNode(N.message)),he}function q(N,ie){var he=N.state.lint,de=++he.waitingFor;function Me(){de=-1,N.off("change",Me)}N.on("change",Me),ie(N.getValue(),function(fe,xe){N.off("change",Me),he.waitingFor==de&&(xe&&fe instanceof t&&(fe=xe),N.operation(function(){re(N,fe)}))},he.linterOptions,N)}function Q(N){var ie=N.state.lint;if(ie){var he=ie.options,de=he.getAnnotations||N.getHelper(t.Pos(0,0),"lint");if(de)if(he.async||de.async)q(N,de);else{var Me=de(N.getValue(),ie.linterOptions,N);if(!Me)return;Me.then?Me.then(function(fe){N.operation(function(){re(N,fe)})}):N.operation(function(){re(N,Me)})}}}function re(N,ie){var he=N.state.lint;if(he){var de=he.options;E(N);for(var Me=U(ie),fe=0;fe<Me.length;++fe){var xe=Me[fe];if(xe){for(var De=null,me=he.hasGutter&&document.createDocumentFragment(),at=0;at<xe.length;++at){var Qe=xe[at],He=Qe.severity;He||(He="error"),De=k(De,He),de.formatAnnotation&&(Qe=de.formatAnnotation(Qe)),he.hasGutter&&me.appendChild(z(Qe)),Qe.to&&he.marked.push(N.markText(Qe.from,Qe.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+He,__annotation:Qe}))}he.hasGutter&&N.setGutterMarker(fe,r,O(N,me,De,xe.length>1,de.tooltips)),de.highlightLines&&N.addLineClass(fe,"wrap",i+De)}}de.onUpdateLinting&&de.onUpdateLinting(ie,Me,N)}}function X(N){var ie=N.state.lint;ie&&(clearTimeout(ie.timeout),ie.timeout=setTimeout(function(){Q(N)},ie.options.delay))}function Y(N,ie,he){for(var de=he.target||he.srcElement,Me=document.createDocumentFragment(),fe=0;fe<ie.length;fe++){var xe=ie[fe];Me.appendChild(z(xe))}d(N,he,Me,de)}function ee(N,ie){var he=ie.target||ie.srcElement;if(/\bCodeMirror-lint-mark-/.test(he.className)){for(var de=he.getBoundingClientRect(),Me=(de.left+de.right)/2,fe=(de.top+de.bottom)/2,xe=N.findMarksAt(N.coordsChar({left:Me,top:fe},"client")),De=[],me=0;me<xe.length;++me){var at=xe[me].__annotation;at&&De.push(at)}De.length&&Y(N,De,ie)}}t.defineOption("lint",!1,function(N,ie,he){if(he&&he!=t.Init&&(E(N),N.state.lint.options.lintOnChange!==!1&&N.off("change",X),t.off(N.getWrapperElement(),"mouseover",N.state.lint.onMouseOver),clearTimeout(N.state.lint.timeout),delete N.state.lint),ie){for(var de=N.getOption("gutters"),Me=!1,fe=0;fe<de.length;++fe)de[fe]==r&&(Me=!0);var xe=N.state.lint=new g(N,ie,Me);xe.options.lintOnChange&&N.on("change",X),xe.options.tooltips!=!1&&xe.options.tooltips!="gutter"&&t.on(N.getWrapperElement(),"mouseover",xe.onMouseOver),Q(N)}}),t.defineExtension("performLint",function(){Q(this)})})}()),dT.exports}Cle();var fT={exports:{}},pT;function _le(){return pT||(pT=1,function(n,e){(function(t){t(Hx())})(function(t){var r=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),i=t.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function a(S){return S&&S.bracketRegex||/[(){}[\]]/}function o(S,O,k){var U=S.getLineHandle(O.line),z=O.ch-1,q=k&&k.afterCursor;q==null&&(q=/(^| )cm-fat-cursor($| )/.test(S.getWrapperElement().className));var Q=a(k),re=!q&&z>=0&&Q.test(U.text.charAt(z))&&s[U.text.charAt(z)]||Q.test(U.text.charAt(z+1))&&s[U.text.charAt(++z)];if(!re)return null;var X=re.charAt(1)==">"?1:-1;if(k&&k.strict&&X>0!=(z==O.ch))return null;var Y=S.getTokenTypeAt(i(O.line,z+1)),ee=d(S,i(O.line,z+(X>0?1:0)),X,Y,k);return ee==null?null:{from:i(O.line,z),to:ee&&ee.pos,match:ee&&ee.ch==re.charAt(0),forward:X>0}}function d(S,O,k,U,z){for(var q=z&&z.maxScanLineLength||1e4,Q=z&&z.maxScanLines||1e3,re=[],X=a(z),Y=k>0?Math.min(O.line+Q,S.lastLine()+1):Math.max(S.firstLine()-1,O.line-Q),ee=O.line;ee!=Y;ee+=k){var N=S.getLine(ee);if(N){var ie=k>0?0:N.length-1,he=k>0?N.length:-1;if(!(N.length>q))for(ee==O.line&&(ie=O.ch-(k<0?1:0));ie!=he;ie+=k){var de=N.charAt(ie);if(X.test(de)&&(U===void 0||(S.getTokenTypeAt(i(ee,ie+1))||"")==(U||""))){var Me=s[de];if(Me&&Me.charAt(1)==">"==k>0)re.push(de);else if(re.length)re.pop();else return{pos:i(ee,ie),ch:de}}}}}return ee-k==(k>0?S.lastLine():S.firstLine())?!1:null}function g(S,O,k){for(var U=S.state.matchBrackets.maxHighlightLineLength||1e3,z=k&&k.highlightNonMatching,q=[],Q=S.listSelections(),re=0;re<Q.length;re++){var X=Q[re].empty()&&o(S,Q[re].head,k);if(X&&(X.match||z!==!1)&&S.getLine(X.from.line).length<=U){var Y=X.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";q.push(S.markText(X.from,i(X.from.line,X.from.ch+1),{className:Y})),X.to&&S.getLine(X.to.line).length<=U&&q.push(S.markText(X.to,i(X.to.line,X.to.ch+1),{className:Y}))}}if(q.length){r&&S.state.focused&&S.focus();var ee=function(){S.operation(function(){for(var N=0;N<q.length;N++)q[N].clear()})};if(O)setTimeout(ee,800);else return ee}}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 E(S){S.state.matchBrackets&&S.state.matchBrackets.currentlyHighlighted&&(S.state.matchBrackets.currentlyHighlighted(),S.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,function(S,O,k){k&&k!=t.Init&&(S.off("cursorActivity",b),S.off("focus",b),S.off("blur",E),E(S)),O&&(S.state.matchBrackets=typeof O=="object"?O:{},S.on("cursorActivity",b),S.on("focus",b),S.on("blur",E))}),t.defineExtension("matchBrackets",function(){g(this,!0)}),t.defineExtension("findMatchingBracket",function(S,O,k){return(k||typeof O=="boolean")&&(k?(k.strict=O,O=k):O=O?{strict:!0}:null),o(this,S,O)}),t.defineExtension("scanForBracket",function(S,O,k,U){return d(this,S,O,k,U)})})}()),fT.exports}_le();const ble=/("(?:[^\\"]|\\.)*")|[:,]/g;function ON(n,e={}){const t=JSON.stringify([1],void 0,e.indent===void 0?2:e.indent).slice(2,-3),r=t===""?1/0:e.maxLength===void 0?80:e.maxLength;let{replacer:i}=e;return function s(a,o,d){a&&typeof a.toJSON=="function"&&(a=a.toJSON());const g=JSON.stringify(a,i);if(g===void 0)return g;const b=r-o.length-d;if(g.length<=b){const E=g.replace(ble,(S,O)=>O||`${S} `);if(E.length<=b)return E}if(i!=null&&(a=JSON.parse(g),i=void 0),typeof a=="object"&&a!==null){const E=o+t,S=[];let O=0,k,U;if(Array.isArray(a)){k="[",U="]";const{length:z}=a;for(;O<z;O++)S.push(s(a[O],E,O===z-1?0:1)||"null")}else{k="{",U="}";const z=Object.keys(a),{length:q}=z;for(;O<q;O++){const Q=z[O],re=`${JSON.stringify(Q)}: `,X=s(a[Q],E,re.length+(O===q-1?0:1));X!==void 0&&S.push(re+X)}}if(S.length>0)return[k,t+S.join(`,
|
||
${E}`),U].join(`
|
||
${o}`)}return g}(n,"",0)}var Tv={exports:{}},xle=Tv.exports,mT;function wle(){return mT||(mT=1,function(n,e){(function(t,r){r(e)})(xle,function(t){const r={isWhiteSpace:function(Ce){return Ce===" "||Ce===" "||Ce==="\uFEFF"||Ce>=" "&&Ce<="\r"||Ce===" "||Ce>=" "&&Ce<=" "||Ce==="\u2028"||Ce==="\u2029"||Ce===" "||Ce===" "||Ce===" "},isWhiteSpaceJSON:function(Ce){return Ce===" "||Ce===" "||Ce===`
|
||
`||Ce==="\r"},isLineTerminator:function(Ce){return Ce===`
|
||
`||Ce==="\r"||Ce==="\u2028"||Ce==="\u2029"},isLineTerminatorJSON:function(Ce){return Ce===`
|
||
`||Ce==="\r"},isIdentifierStart:function(Ce){return Ce==="$"||Ce==="_"||Ce>="A"&&Ce<="Z"||Ce>="a"&&Ce<="z"||Ce>=""&&r.NonAsciiIdentifierStart.test(Ce)},isIdentifierPart:function(Ce){return Ce==="$"||Ce==="_"||Ce>="A"&&Ce<="Z"||Ce>="a"&&Ce<="z"||Ce>="0"&&Ce<="9"||Ce>=""&&r.NonAsciiIdentifierPart.test(Ce)},NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};function i(We){return We>="0"&&We<="9"||We>="A"&&We<="F"||We>="a"&&We<="f"}function s(We){return We>="0"&&We<="7"}function a(We){return We>="0"&&We<="9"}function o(We){return We.charCodeAt(0)===65279}const d={"'":"'",'"':'"',"\\":"\\",b:"\b",f:"\f",n:`
|
||
`,r:"\r",t:" ",v:"\v","/":"/"},g=Object.hasOwn,b={};function E(We,Ce){(typeof We!="string"||!(We instanceof String))&&(We=String(We));const Te=Ce.mode==="json5",rt=Ce.ignoreBOM,yt=Ce.ignoreComments||Ce.mode==="cjson"||Te,bt=Ce.ignoreTrailingCommas||Te,gt=Ce.ignoreProtoKey,Dt=Ce.ignorePrototypeKeys,Pt=Ce.allowSingleQuotedStrings||Te,Le=Ce.allowDuplicateObjectKeys,Pe=Ce.reviver,Ee=Ce.tokenize,nt=Ce.rawTokens,_t=Ce.tokenLocations,ht=Ce.tokenPaths,Ut=Te?r.isLineTerminator:r.isLineTerminatorJSON,en=Te?r.isWhiteSpace:r.isWhiteSpaceJSON,Ft=We.length;let mn=0,jn=0,nn=0;const ir=[];let Dn,fn,Hn;if(Ee){let Ye=null,tt,ct;Dn=function(){if(Ye!==null)throw Error("internal error, token overlap");tt=mn+1,ct=nn-jn+1,Ye=nn},fn=function(At,Gt){if(Ye!==nn){const $t={type:At};nt&&($t.raw=We.substr(Ye,nn-Ye)),Gt!==void 0&&($t.value=Gt),_t&&($t.location={start:{column:ct,line:tt,offset:Ye}}),ht&&($t.path=Hn.slice()),ir.push($t)}return Ye=null,Gt},ht&&(Hn=[])}function wr(){let Ye;return nn<Ft?Ye=`Unexpected token ${JSON.stringify(We[nn])}`:Ye="Unexpected end of input",Ye}function Qn(Ye){const tt=nn-jn+1;++mn;const ct=Me(Ye,We,nn,mn,tt),At=SyntaxError(ct.message);return At.reason=Ye,At.excerpt=ct.excerpt,At.pointer=ct.pointer,At.location={start:{column:tt,line:mn,offset:nn}},At}function Xn(Ye){throw Ye||(Ye=wr()),Qn(Ye)}function Ge(Ye){Ye==="\r"&&We[nn]===`
|
||
`&&++nn,jn=nn,++mn}function Ae(){if(nn<Ft){Dn==null||Dn();const Ye=We[nn++];if(Ye==='"'||Ye==="'"&&Pt){const tt=p(Ye);return fn==null||fn("literal",tt),tt}if(Ye==="{")return fn==null||fn("symbol","{"),er();if(Ye==="[")return fn==null||fn("symbol","["),Be();if(Ye==="-"||Ye==="."||a(Ye)||Te&&(Ye==="+"||Ye==="I"||Ye==="N")){const tt=oe();return fn==null||fn("literal",tt),tt}if(Ye==="n")return rn("null"),fn==null||fn("literal",null),null;if(Ye==="t")return rn("true"),fn==null||fn("literal",!0),!0;if(Ye==="f")return rn("false"),fn==null||fn("literal",!1),!1;--nn,fn==null||fn();return}}function pe(){let Ye;if(nn<Ft){Dn==null||Dn();const tt=We[nn++];if(tt==='"'||tt==="'"&&Pt){const ct=p(tt);return fn==null||fn("literal",ct),ct}if(tt==="{")return fn==null||fn("symbol","{"),er();if(tt==="[")return fn==null||fn("symbol","["),Be();if(tt==="."||a(tt)){const ct=oe();return fn==null||fn("literal",ct),ct}if(Te&&r.isIdentifierStart(tt)||tt==="\\"&&We[nn]==="u"){const ct=nn-1;if(Ye=ve(),Ye===void 0){nn=ct,fn==null||fn();return}return fn==null||fn("literal",Ye),Ye}--nn,fn==null||fn();return}}function et(){o(We)&&(Dn==null||Dn(),++nn,fn==null||fn("bom"))}function St(){let Ye;function tt(){Ye||(Ye=!0,--nn,Dn(),++nn)}function ct(){Ye&&(Ye=!1,fn("whitespace"))}for(;nn<Ft;){const At=We[nn++];if(Ut(At))Dn&&tt(),Ge(At);else if(en(At))Dn&&tt();else if(At==="/"&&yt&&(We[nn]==="/"||We[nn]==="*"))Dn&&(--nn,ct(),Dn(),++nn),Yt(We[nn++]==="*"),fn==null||fn("comment");else{--nn;break}}fn&&ct()}function Yt(Ye){for(;nn<Ft;){const tt=We[nn++];if(Ut(tt)){if(!Ye){--nn;return}Ge(tt)}else if(tt==="*"&&Ye&&We[nn]==="/"){++nn;return}}Ye&&Xn("Unclosed multiline comment")}function rn(Ye){const tt=nn;for(let ct=1,At=Ye.length;ct<At;++ct)(nn>=Ft||Ye[ct]!==We[nn])&&(nn=tt-1,Xn()),++nn}function er(){let Ye={},tt=!1;for(;nn<Ft;){St();const ct=pe();Le===!1&&g(Ye,ct)&&Xn(`Duplicate key: "${ct}"`),St(),Dn==null||Dn();let At=We[nn++];if(fn==null||fn("symbol",At),At==="}"&&ct===void 0)return!bt&&tt&&(--nn,Xn("Trailing comma in object")),Ye;if(At===":"&&ct!==void 0){St(),Hn==null||Hn.push(ct);let Gt=Ae();if(Hn==null||Hn.pop(),Gt===void 0&&Xn(`No value found for key "${ct}"`),typeof ct!="string"&&(!Te||typeof ct!="number")&&Xn(`Wrong key type: "${ct}"`),Dt&&(ct in b||b[ct]!=null)||gt&&ct==="__proto__"||(Pe&&(Gt=Pe(ct,Gt)),Gt!==void 0&&(tt=!0,ct==="__proto__"?Ye=Object.assign(JSON.parse(`{"__proto__":${JSON.stringify(Gt)}}`),Ye):Ye[ct]=Gt)),St(),Dn==null||Dn(),At=We[nn++],fn==null||fn("symbol",At),At!==","){if(At==="}")return Ye;Xn()}}else--nn,Xn()}Xn()}function Be(){const Ye=[];for(;nn<Ft;){St(),Hn==null||Hn.push(Ye.length);let tt=Ae();Hn==null||Hn.pop(),St(),Dn==null||Dn();const ct=We[nn++];if(fn==null||fn("symbol",ct),tt!==void 0&&(Pe&&(tt=Pe(String(Ye.length),tt)),tt===void 0?(++Ye.length,tt=!0):Ye.push(tt)),ct===",")tt===void 0&&Xn("Elisions are not supported");else{if(ct==="]")return!bt&&tt===void 0&&Ye.length&&(--nn,Xn("Trailing comma in array")),Ye;--nn,Xn()}}}function oe(){--nn;let Ye=nn,tt=We[nn++];const ct=function(At){const Gt=We.substr(Ye,nn-Ye);let $t;if(At?$t=Number.parseInt(Gt.replace(/^0o?/,""),8):$t=Number(Gt),Number.isNaN($t))--nn,Xn(`Bad numeric literal - "${We.substr(Ye,nn-Ye+1)}"`);else if(!Te&&!Gt.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i))--nn,Xn(`Non-json numeric literal - "${We.substr(Ye,nn-Ye+1)}"`);else return $t};if((tt==="-"||tt==="+"&&Te)&&(tt=We[nn++]),tt==="N"&&Te)return rn("NaN"),Number.NaN;if(tt==="I"&&Te)return rn("Infinity"),ct();if(tt>="1"&&tt<="9"){for(;nn<Ft&&a(We[nn]);)++nn;tt=We[nn++]}if(tt==="0"){tt=We[nn++];const At=tt==="o"||tt==="O"||s(tt),Gt=tt==="x"||tt==="X";if(Te&&(At||Gt)){for(;nn<Ft&&(Gt?i:s)(We[nn]);)++nn;let $t=1;return We[Ye]==="-"?($t=-1,++Ye):We[Ye]==="+"&&++Ye,$t*ct(At)}}if(tt==="."){for(;nn<Ft&&a(We[nn]);)++nn;tt=We[nn++]}if(tt==="e"||tt==="E"){for(tt=We[nn++],(tt==="-"||tt==="+")&&++nn;nn<Ft&&a(We[nn]);)++nn;tt=We[nn++]}return--nn,ct()}function ve(){--nn;let Ye="";for(;nn<Ft;){let tt=We[nn++];if(tt==="\\"&&We[nn]==="u"&&i(We[nn+1])&&i(We[nn+2])&&i(We[nn+3])&&i(We[nn+4])&&(tt=String.fromCharCode(Number.parseInt(We.substr(nn+1,4),16)),nn+=5),Ye.length)if(r.isIdentifierPart(tt))Ye+=tt;else return--nn,Ye;else if(r.isIdentifierStart(tt))Ye+=tt;else return}Xn()}function p(Ye){let tt="";for(;nn<Ft;){let ct=We[nn++];if(ct===Ye)return tt;if(ct==="\\")if(nn>=Ft&&Xn(),ct=We[nn++],d[ct]&&(Te||ct!=="v"&&(ct!=="'"||Pt)))tt+=d[ct];else if(Te&&Ut(ct))Ge(ct);else if(ct==="u"||ct==="x"&&Te){const At=ct==="u"?4:2;for(let Gt=0;Gt<At;++Gt)nn>=Ft&&Xn(),i(We[nn])||Xn("Bad escape sequence"),nn++;tt+=String.fromCharCode(Number.parseInt(We.substr(nn-At,At),16))}else if(Te&&s(ct)){let At;ct<"4"&&s(We[nn])&&s(We[nn+1])?At=3:s(We[nn])?At=2:At=1,nn+=At-1,tt+=String.fromCharCode(Number.parseInt(We.substr(nn-At,At),8))}else Te?tt+=ct:(--nn,Xn());else Ut(ct)?Xn():(!Te&&ct.charCodeAt(0)<32&&(--nn,Xn("Unexpected control character")),tt+=ct)}Xn()}rt&&et(),St();let je=Ae();if(je!==void 0||nn<Ft){if(St(),nn>=Ft)return Pe&&(je=Pe("",je)),Ee?ir:je;Xn()}else Xn(nn?"No data, only a whitespace":"No data, empty input")}function S(We,Ce){return typeof Ce=="function"?Ce={reviver:Ce}:Ce||(Ce={}),E(We,Ce)}function O(We,Ce){Ce||(Ce={});const Te=Ce.tokenize;Ce.tokenize=!0;const rt=E(We,Ce);return Ce.tokenize=Te,rt}function k(We){return We.toString().replace(/~/g,"~0").replace(/\//g,"~1")}function U(We){return We.length===0?"":`/${We.map(k).join("/")}`}function z(We){return We.replace(/~1/g,"/").replace(/~0/g,"~")}function q(We){if(We==="")return[];if(We[0]!=="/")throw new Error('Missing initial "/" in the reference');return We.substr(1).split("/").map(z)}function Q(We,Ce){const Te=We.substr(0,Ce).split(/\r?\n/),rt=Te.length,yt=Te[rt-1].length+1;return{line:rt,column:yt}}function re(We,Ce,Te){if(Ce>1){const rt=/\r?\n/g;let yt;for(;yt=rt.exec(We);)if(--Ce===1)return yt.index+Te}return Te-1}function X(We,Ce){const Te=Math.max(0,Ce-20),rt=We.substr(Te,Ce-Te);return(Ce>20?"...":"")+rt.replace(/\r?\n/g,"")}function Y(We,Ce){let Te=Math.max(0,Ce-20);Te+=Ce-Te;const rt=We.length-Te;return We.substr(Te,Math.min(20,rt)).replace(/\r?\n/g,"")+(rt>20?"...":"")}function ee(We,Ce){const Te=X(We,Ce),rt=Y(We,Ce),yt=`${new Array(Te.length+1).join("-")}^`;return{excerpt:Te+rt,pointer:yt}}function N(We){let Ce=We.message.replace("JSON.parse: ","").replace("JSON Parse error: ","");const Te=Ce.charAt(0);return Te>="a"&&(Ce=Te.toUpperCase()+Ce.substr(1)),Ce}function ie(We,Ce){const Te=/ in JSON at position (\d+)$/.exec(Ce);if(Te){const rt=+Te[1],yt=Q(We,rt);return{offset:rt,line:yt.line,column:yt.column,reason:Ce.substr(0,Te.index)}}}function he(We,Ce){const Te=/ end of JSON input$/.exec(Ce);if(Te){const rt=We.length,yt=Q(We,rt);return{offset:rt,line:yt.line,column:yt.column,reason:Ce.substr(0,Te.index+4)}}}function de(We,Ce){const Te=/ at line (\d+) column (\d+) of the JSON data$/.exec(Ce);if(Te){const rt=+Te[1],yt=+Te[2];return{offset:re(We,rt,yt),line:rt,column:yt,reason:Ce.substr(0,Te.index)}}}function Me(We,Ce,Te,rt,yt){const bt=ee(Ce,Te),gt=bt.excerpt;let Dt,Pt;return typeof rt=="number"?(Pt=bt.pointer,Dt=`Parse error on line ${rt}, column ${yt}:
|
||
${gt}
|
||
${Pt}
|
||
${We}`):Dt=`Parse error in JSON input:
|
||
${gt}
|
||
${We}`,{message:Dt,excerpt:gt,pointer:Pt}}function fe(We,Ce){let Te=N(Ce);const rt=ie(We,Te)||he(We,Te)||de(We,Te);let yt,bt,gt;rt?(yt=rt.offset,bt=rt.line,gt=rt.column,Te=rt.reason):yt=0,Ce.reason=Te;const Dt=Me(Te,We,yt,bt,gt);return Ce.message=Dt.message,Ce.excerpt=Dt.excerpt,Dt.pointer&&(Ce.pointer=Dt.pointer,Ce.location={start:{column:gt,line:bt,offset:yt}}),Ce}function xe(We,Ce){try{return JSON.parse(We,Ce)}catch(Te){const rt=fe(We,Te);if(Te.location)throw rt;return S(We,Ce)}}const De=typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor),me=typeof process<"u"&&process.version.startsWith("v4.");function at(We){return We.ignoreBOM||We.ignoreComments||We.ignoreTrailingCommas||We.allowSingleQuotedStrings||We.allowDuplicateObjectKeys===!1||We.ignoreProtoKey||We.ignorePrototypeKeys||We.mode==="cjson"||We.mode==="json5"||De||me}function Qe(We){if(typeof We=="function")return We;if(We)return We.reviver}function He(We,Ce){return Ce||(Ce={}),at(Ce)?S(We,Ce):xe(We,Qe(Ce))}t.parse=He,t.tokenize=O,t.pathToPointer=U,t.pointerToPath=q,t.parseNative=xe,t.parseCustom=S,t.getErrorTexts=Me,Object.defineProperty(t,"__esModule",{value:!0})})}(Tv,Tv.exports)),Tv.exports}var Mle=wle(),kb={exports:{}},Sle=kb.exports,gT;function Ele(){return gT||(gT=1,function(n,e){(function(t,r){n.exports=r()})(Sle,function(){var t=typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{};function r(Pe,Ee){return Ee={exports:{}},Pe(Ee,Ee.exports),Ee.exports}var i=r(function(Pe){function Ee(){var nt=0,_t=1,ht=2,Ut=3,en=4,Ft=5,mn=6,jn=7,nn=8,ir=9,Dn=10,fn=11,Hn=12,wr=13,Qn=14,Xn=15,Ge=16,Ae=17,pe=0,et=1,St=2,Yt=3,rn=4;function er(p,je){return 55296<=p.charCodeAt(je)&&p.charCodeAt(je)<=56319&&56320<=p.charCodeAt(je+1)&&p.charCodeAt(je+1)<=57343}function Be(p,je){je===void 0&&(je=0);var Ye=p.charCodeAt(je);if(55296<=Ye&&Ye<=56319&&je<p.length-1){var tt=Ye,ct=p.charCodeAt(je+1);return 56320<=ct&&ct<=57343?(tt-55296)*1024+(ct-56320)+65536:tt}if(56320<=Ye&&Ye<=57343&&je>=1){var tt=p.charCodeAt(je-1),ct=Ye;return 55296<=tt&&tt<=56319?(tt-55296)*1024+(ct-56320)+65536:ct}return Ye}function oe(p,je,Ye){var tt=[p].concat(je).concat([Ye]),ct=tt[tt.length-2],At=Ye,Gt=tt.lastIndexOf(Qn);if(Gt>1&&tt.slice(1,Gt).every(function(xt){return xt==Ut})&&[Ut,wr,Ae].indexOf(p)==-1)return St;var $t=tt.lastIndexOf(en);if($t>0&&tt.slice(1,$t).every(function(xt){return xt==en})&&[Hn,en].indexOf(ct)==-1)return tt.filter(function(xt){return xt==en}).length%2==1?Yt:rn;if(ct==nt&&At==_t)return pe;if(ct==ht||ct==nt||ct==_t)return At==Qn&&je.every(function(xt){return xt==Ut})?St:et;if(At==ht||At==nt||At==_t)return et;if(ct==mn&&(At==mn||At==jn||At==ir||At==Dn))return pe;if((ct==ir||ct==jn)&&(At==jn||At==nn))return pe;if((ct==Dn||ct==nn)&&At==nn)return pe;if(At==Ut||At==Xn)return pe;if(At==Ft)return pe;if(ct==Hn)return pe;var jt=tt.indexOf(Ut)!=-1?tt.lastIndexOf(Ut)-1:tt.length-2;return[wr,Ae].indexOf(tt[jt])!=-1&&tt.slice(jt+1,-1).every(function(xt){return xt==Ut})&&At==Qn||ct==Xn&&[Ge,Ae].indexOf(At)!=-1?pe:je.indexOf(en)!=-1?St:ct==en&&At==en?pe:et}this.nextBreak=function(p,je){if(je===void 0&&(je=0),je<0)return 0;if(je>=p.length-1)return p.length;for(var Ye=ve(Be(p,je)),tt=[],ct=je+1;ct<p.length;ct++)if(!er(p,ct-1)){var At=ve(Be(p,ct));if(oe(Ye,tt,At))return ct;tt.push(At)}return p.length},this.splitGraphemes=function(p){for(var je=[],Ye=0,tt;(tt=this.nextBreak(p,Ye))<p.length;)je.push(p.slice(Ye,tt)),Ye=tt;return Ye<p.length&&je.push(p.slice(Ye)),je},this.iterateGraphemes=function(p){var je=0,Ye={next:(function(){var tt,ct;return(ct=this.nextBreak(p,je))<p.length?(tt=p.slice(je,ct),je=ct,{value:tt,done:!1}):je<p.length?(tt=p.slice(je),je=p.length,{value:tt,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(Ye[Symbol.iterator]=function(){return Ye}),Ye},this.countGraphemes=function(p){for(var je=0,Ye=0,tt;(tt=this.nextBreak(p,Ye))<p.length;)Ye=tt,je++;return Ye<p.length&&je++,je};function ve(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?Hn:p==13?nt:p==10?_t: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?ht: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?Ut:127462<=p&&p<=127487?en: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?Ft:4352<=p&&p<=4447||43360<=p&&p<=43388?mn:4448<=p&&p<=4519||55216<=p&&p<=55238?jn:4520<=p&&p<=4607||55243<=p&&p<=55291?nn: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?ir: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?Dn: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?wr:127995<=p&&p<=127999?Qn:p==8205?Xn: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?Ge:128102<=p&&p<=128105?Ae:fn}return this}Pe.exports&&(Pe.exports=Ee)}),s=new i,a=function(Ee,nt,_t){for(var ht=s.iterateGraphemes(Ee.substring(nt)),Ut="",en=0;en<_t-nt;en++){var Ft=ht.next();if(Ut+=Ft.value,Ft.done)break}return Ut},o=function(Pe,Ee,nt,_t,ht,Ut,en){return{start:{line:Pe,column:Ee,offset:nt},end:{line:_t,column:ht,offset:Ut},source:en||null}},d=r(function(Pe,Ee){(function(nt,_t){Pe.exports=_t()})(t,function(){var nt="",_t,ht=Ut;function Ut(Dn,fn){if(typeof Dn!="string")throw new TypeError("expected a string");if(fn===1)return Dn;if(fn===2)return Dn+Dn;var Hn=Dn.length*fn;if(_t!==Dn||typeof _t>"u")_t=Dn,nt="";else if(nt.length>=Hn)return nt.substr(0,Hn);for(;Hn>nt.length&&fn>1;)fn&1&&(nt+=Dn),fn>>=1,Dn+=Dn;return nt+=Dn,nt=nt.substr(0,Hn),nt}var en=function(fn,Hn,wr){if(fn==null||Hn==null)return fn;var Qn=String(fn),Xn=typeof Hn=="number"?Hn:parseInt(Hn,10);if(isNaN(Xn)||!isFinite(Xn))return Qn;var Ge=Qn.length;if(Ge>=Xn)return Qn;var Ae=String(wr);Ae===""&&(Ae=" ");for(var pe=Xn-Ge;Ae.length<pe;)Ae+=Ae;var et=Ae.length>pe?Ae.substr(0,pe):Ae;return et+Qn},Ft=Object.assign||function(Dn){for(var fn=1;fn<arguments.length;fn++){var Hn=arguments[fn];for(var wr in Hn)Object.prototype.hasOwnProperty.call(Hn,wr)&&(Dn[wr]=Hn[wr])}return Dn};function mn(Dn,fn,Hn,wr){var Qn=String(fn),Xn=en(Qn,Hn," "),Ge=ht(" ",wr.tabSize);return Xn+" | "+Dn.replace(/\t/g,Ge)}function jn(Dn,fn,Hn,wr,Qn){return Dn.slice(fn,Hn).map(function(Xn,Ge){return mn(Xn,fn+Ge+1,wr,Qn)}).join(`
|
||
`)}var nn={extraLines:2,tabSize:4},ir=function(fn,Hn,wr,Qn){Qn=Ft({},nn,Qn);var Xn=fn.split(/\r\n?|\n|\f/),Ge=Math.max(1,Hn-Qn.extraLines)-1,Ae=Math.min(Hn+Qn.extraLines,Xn.length),pe=String(Ae).length,et=jn(Xn,Ge,Hn,pe,Qn),St=mn(Xn[Hn-1].substring(0,wr-1),Hn,pe,Qn),Yt=ht(" ",St.length)+"^",rn=jn(Xn,Hn,Ae,pe,Qn);return[et,Yt,rn].filter(Boolean).join(`
|
||
`)};return ir})}),g=new Error().stack,b=function(Pe){var Ee=Object.create(SyntaxError.prototype);return Object.assign(Ee,Pe,{name:"SyntaxError"}),Object.defineProperty(Ee,"stack",{get:function(){return g?g.replace(/^(.+\n){1,3}/,String(Ee)+`
|
||
`):""}}),Ee},E=function(Pe,Ee,nt,_t,ht){throw b({message:_t?Pe+`
|
||
`+d(Ee,_t,ht):Pe,rawMessage:Pe,source:nt,line:_t,column:ht})},S={unexpectedEnd:function(){return"Unexpected end of input"},unexpectedToken:function(Ee){for(var nt=arguments.length,_t=Array(nt>1?nt-1:0),ht=1;ht<nt;ht++)_t[ht-1]=arguments[ht];return"Unexpected token <"+Ee+"> at "+_t.filter(Boolean).join(":")}},O={unexpectedSymbol:function(Ee){for(var nt=arguments.length,_t=Array(nt>1?nt-1:0),ht=1;ht<nt;ht++)_t[ht-1]=arguments[ht];return"Unexpected symbol <"+Ee+"> at "+_t.filter(Boolean).join(":")}},k={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={"{":k.LEFT_BRACE,"}":k.RIGHT_BRACE,"[":k.LEFT_BRACKET,"]":k.RIGHT_BRACKET,":":k.COLON,",":k.COMMA},z={true:k.TRUE,false:k.FALSE,null:k.NULL},q={_START_:0,START_QUOTE_OR_CHAR:1,ESCAPE:2},Q={'"':0,"\\":1,"/":2,b:3,f:4,n:5,r:6,t:7,u:8},re={_START_:0,MINUS:1,ZERO:2,DIGIT:3,POINT:4,DIGIT_FRACTION:5,EXP:6,EXP_DIGIT_OR_SIGN:7};function X(Pe){return Pe>="1"&&Pe<="9"}function Y(Pe){return Pe>="0"&&Pe<="9"}function ee(Pe){return Y(Pe)||Pe>="a"&&Pe<="f"||Pe>="A"&&Pe<="F"}function N(Pe){return Pe==="e"||Pe==="E"}function ie(Pe,Ee,nt,_t){var ht=Pe.charAt(Ee);if(ht==="\r")Ee++,nt++,_t=1,Pe.charAt(Ee)===`
|
||
`&&Ee++;else if(ht===`
|
||
`)Ee++,nt++,_t=1;else if(ht===" "||ht===" ")Ee++,_t++;else return null;return{index:Ee,line:nt,column:_t}}function he(Pe,Ee,nt,_t){var ht=Pe.charAt(Ee);return ht in U?{type:U[ht],line:nt,column:_t+1,index:Ee+1,value:null}:null}function de(Pe,Ee,nt,_t){for(var ht in z)if(z.hasOwnProperty(ht)&&Pe.substr(Ee,ht.length)===ht)return{type:z[ht],line:nt,column:_t+ht.length,index:Ee+ht.length,value:ht};return null}function Me(Pe,Ee,nt,_t){for(var ht=Ee,Ut=q._START_;Ee<Pe.length;){var en=Pe.charAt(Ee);switch(Ut){case q._START_:{if(en==='"')Ee++,Ut=q.START_QUOTE_OR_CHAR;else return null;break}case q.START_QUOTE_OR_CHAR:{if(en==="\\")Ee++,Ut=q.ESCAPE;else{if(en==='"')return Ee++,{type:k.STRING,line:nt,column:_t+Ee-ht,index:Ee,value:Pe.slice(ht,Ee)};Ee++}break}case q.ESCAPE:{if(en in Q){if(Ee++,en==="u")for(var Ft=0;Ft<4;Ft++){var mn=Pe.charAt(Ee);if(mn&&ee(mn))Ee++;else return null}Ut=q.START_QUOTE_OR_CHAR}else return null;break}}}}function fe(Pe,Ee,nt,_t){var ht=Ee,Ut=Ee,en=re._START_;e:for(;Ee<Pe.length;){var Ft=Pe.charAt(Ee);switch(en){case re._START_:{if(Ft==="-")en=re.MINUS;else if(Ft==="0")Ut=Ee+1,en=re.ZERO;else if(X(Ft))Ut=Ee+1,en=re.DIGIT;else return null;break}case re.MINUS:{if(Ft==="0")Ut=Ee+1,en=re.ZERO;else if(X(Ft))Ut=Ee+1,en=re.DIGIT;else return null;break}case re.ZERO:{if(Ft===".")en=re.POINT;else if(N(Ft))en=re.EXP;else break e;break}case re.DIGIT:{if(Y(Ft))Ut=Ee+1;else if(Ft===".")en=re.POINT;else if(N(Ft))en=re.EXP;else break e;break}case re.POINT:{if(Y(Ft))Ut=Ee+1,en=re.DIGIT_FRACTION;else break e;break}case re.DIGIT_FRACTION:{if(Y(Ft))Ut=Ee+1;else if(N(Ft))en=re.EXP;else break e;break}case re.EXP:{if(Ft==="+"||Ft==="-")en=re.EXP_DIGIT_OR_SIGN;else if(Y(Ft))Ut=Ee+1,en=re.EXP_DIGIT_OR_SIGN;else break e;break}case re.EXP_DIGIT_OR_SIGN:{if(Y(Ft))Ut=Ee+1;else break e;break}}Ee++}return Ut>0?{type:k.NUMBER,line:nt,column:_t+Ut-ht,index:Ut,value:Pe.slice(ht,Ut)}:null}var xe=function(Ee,nt){for(var _t=1,ht=1,Ut=0,en=[];Ut<Ee.length;){var Ft=[Ee,Ut,_t,ht],mn=ie.apply(void 0,Ft);if(mn){Ut=mn.index,_t=mn.line,ht=mn.column;continue}var jn=he.apply(void 0,Ft)||de.apply(void 0,Ft)||Me.apply(void 0,Ft)||fe.apply(void 0,Ft);if(jn){var nn={type:jn.type,value:jn.value,loc:o(_t,ht,Ut,jn.line,jn.column,jn.index,nt.source)};en.push(nn),Ut=jn.index,_t=jn.line,ht=jn.column}else E(O.unexpectedSymbol(a(Ee,Ut,Ut+1),nt.source,_t,ht),Ee,nt.source,_t,ht)}return en},De={_START_:0,OPEN_OBJECT:1,PROPERTY:2,COMMA:3},me={_START_:0,KEY:1,COLON:2},at={_START_:0,OPEN_ARRAY:1,VALUE:2,COMMA:3},Qe={loc:!0,source:null};function He(Pe,Ee,nt){var _t=Ee.length>0?Ee[Ee.length-1].loc.end:{line:1,column:1};E(S.unexpectedEnd(),Pe,nt.source,_t.line,_t.column)}function We(Pe){for(var Ee=0,nt=0;nt<4;nt++)Ee=Ee*16+parseInt(Pe[nt],16);return String.fromCharCode(Ee)}var Ce={b:"\b",f:"\f",n:`
|
||
`,r:"\r",t:" "},Te=['"',"\\","/"];function rt(Pe){for(var Ee="",nt=0;nt<Pe.length;nt++){var _t=Pe.charAt(nt);if(_t==="\\"){nt++;var ht=Pe.charAt(nt);if(ht==="u")Ee+=We(Pe.substr(nt+1,4)),nt+=4;else if(Te.indexOf(ht)!==-1)Ee+=ht;else if(ht in Ce)Ee+=Ce[ht];else break}else Ee+=_t}return Ee}function yt(Pe,Ee,nt,_t){for(var ht=void 0,Ut={type:"Object",children:[]},en=De._START_;nt<Ee.length;){var Ft=Ee[nt];switch(en){case De._START_:{if(Ft.type===k.LEFT_BRACE)ht=Ft,en=De.OPEN_OBJECT,nt++;else return null;break}case De.OPEN_OBJECT:{if(Ft.type===k.RIGHT_BRACE)return _t.loc&&(Ut.loc=o(ht.loc.start.line,ht.loc.start.column,ht.loc.start.offset,Ft.loc.end.line,Ft.loc.end.column,Ft.loc.end.offset,_t.source)),{value:Ut,index:nt+1};var mn=bt(Pe,Ee,nt,_t);Ut.children.push(mn.value),en=De.PROPERTY,nt=mn.index;break}case De.PROPERTY:{if(Ft.type===k.RIGHT_BRACE)return _t.loc&&(Ut.loc=o(ht.loc.start.line,ht.loc.start.column,ht.loc.start.offset,Ft.loc.end.line,Ft.loc.end.column,Ft.loc.end.offset,_t.source)),{value:Ut,index:nt+1};Ft.type===k.COMMA?(en=De.COMMA,nt++):E(S.unexpectedToken(a(Pe,Ft.loc.start.offset,Ft.loc.end.offset),_t.source,Ft.loc.start.line,Ft.loc.start.column),Pe,_t.source,Ft.loc.start.line,Ft.loc.start.column);break}case De.COMMA:{var jn=bt(Pe,Ee,nt,_t);jn?(nt=jn.index,Ut.children.push(jn.value),en=De.PROPERTY):E(S.unexpectedToken(a(Pe,Ft.loc.start.offset,Ft.loc.end.offset),_t.source,Ft.loc.start.line,Ft.loc.start.column),Pe,_t.source,Ft.loc.start.line,Ft.loc.start.column);break}}}He(Pe,Ee,_t)}function bt(Pe,Ee,nt,_t){for(var ht=void 0,Ut={type:"Property",key:null,value:null},en=me._START_;nt<Ee.length;){var Ft=Ee[nt];switch(en){case me._START_:{if(Ft.type===k.STRING){var mn={type:"Identifier",value:rt(Pe.slice(Ft.loc.start.offset+1,Ft.loc.end.offset-1)),raw:Ft.value};_t.loc&&(mn.loc=Ft.loc),ht=Ft,Ut.key=mn,en=me.KEY,nt++}else return null;break}case me.KEY:{Ft.type===k.COLON?(en=me.COLON,nt++):E(S.unexpectedToken(a(Pe,Ft.loc.start.offset,Ft.loc.end.offset),_t.source,Ft.loc.start.line,Ft.loc.start.column),Pe,_t.source,Ft.loc.start.line,Ft.loc.start.column);break}case me.COLON:{var jn=Pt(Pe,Ee,nt,_t);return Ut.value=jn.value,_t.loc&&(Ut.loc=o(ht.loc.start.line,ht.loc.start.column,ht.loc.start.offset,jn.value.loc.end.line,jn.value.loc.end.column,jn.value.loc.end.offset,_t.source)),{value:Ut,index:jn.index}}}}}function gt(Pe,Ee,nt,_t){for(var ht=void 0,Ut={type:"Array",children:[]},en=at._START_,Ft=void 0;nt<Ee.length;)switch(Ft=Ee[nt],en){case at._START_:{if(Ft.type===k.LEFT_BRACKET)ht=Ft,en=at.OPEN_ARRAY,nt++;else return null;break}case at.OPEN_ARRAY:{if(Ft.type===k.RIGHT_BRACKET)return _t.loc&&(Ut.loc=o(ht.loc.start.line,ht.loc.start.column,ht.loc.start.offset,Ft.loc.end.line,Ft.loc.end.column,Ft.loc.end.offset,_t.source)),{value:Ut,index:nt+1};var mn=Pt(Pe,Ee,nt,_t);nt=mn.index,Ut.children.push(mn.value),en=at.VALUE;break}case at.VALUE:{if(Ft.type===k.RIGHT_BRACKET)return _t.loc&&(Ut.loc=o(ht.loc.start.line,ht.loc.start.column,ht.loc.start.offset,Ft.loc.end.line,Ft.loc.end.column,Ft.loc.end.offset,_t.source)),{value:Ut,index:nt+1};Ft.type===k.COMMA?(en=at.COMMA,nt++):E(S.unexpectedToken(a(Pe,Ft.loc.start.offset,Ft.loc.end.offset),_t.source,Ft.loc.start.line,Ft.loc.start.column),Pe,_t.source,Ft.loc.start.line,Ft.loc.start.column);break}case at.COMMA:{var jn=Pt(Pe,Ee,nt,_t);nt=jn.index,Ut.children.push(jn.value),en=at.VALUE;break}}He(Pe,Ee,_t)}function Dt(Pe,Ee,nt,_t){var ht=Ee[nt],Ut=null;switch(ht.type){case k.STRING:{Ut=rt(Pe.slice(ht.loc.start.offset+1,ht.loc.end.offset-1));break}case k.NUMBER:{Ut=Number(ht.value);break}case k.TRUE:{Ut=!0;break}case k.FALSE:{Ut=!1;break}case k.NULL:{Ut=null;break}default:return null}var en={type:"Literal",value:Ut,raw:ht.value};return _t.loc&&(en.loc=ht.loc),{value:en,index:nt+1}}function Pt(Pe,Ee,nt,_t){var ht=Ee[nt],Ut=Dt.apply(void 0,arguments)||yt.apply(void 0,arguments)||gt.apply(void 0,arguments);if(Ut)return Ut;E(S.unexpectedToken(a(Pe,ht.loc.start.offset,ht.loc.end.offset),_t.source,ht.loc.start.line,ht.loc.start.column),Pe,_t.source,ht.loc.start.line,ht.loc.start.column)}var Le=function(Pe,Ee){Ee=Object.assign({},Qe,Ee);var nt=xe(Pe,Ee);nt.length===0&&He(Pe,nt,Ee);var _t=Pt(Pe,nt,0,Ee);if(_t.index===nt.length)return _t.value;var ht=nt[_t.index];E(S.unexpectedToken(a(Pe,ht.loc.start.offset,ht.loc.end.offset),Ee.source,ht.loc.start.line,ht.loc.start.column),Pe,Ee.source,ht.loc.start.line,ht.loc.start.column)};return Le})}(kb)),kb.exports}var Ble=Ele();const Ole=Ha(Ble);function hr(){var n="/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",e="89c156e637b20b434cfb214df7fad7d710253070",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/codemirror-mgl.ts",statementMap:{0:{start:{line:5,column:0},end:{line:10,column:3}},1:{start:{line:6,column:2},end:{line:9,column:4}},2:{start:{line:12,column:16},end:{line:12,column:18}},3:{start:{line:13,column:2},end:{line:30,column:3}},4:{start:{line:14,column:4},end:{line:14,column:16}},5:{start:{line:16,column:23},end:{line:16,column:71}},6:{start:{line:17,column:4},end:{line:29,column:5}},7:{start:{line:18,column:18},end:{line:23,column:7}},8:{start:{line:24,column:6},end:{line:28,column:9}},9:{start:{line:31,column:2},end:{line:31,column:15}},10:{start:{line:33,column:0},end:{line:35,column:3}},11:{start:{line:34,column:2},end:{line:34,column:26}},12:{start:{line:36,column:0},end:{line:130,column:3}},13:{start:{line:37,column:16},end:{line:37,column:32}},14:{start:{line:38,column:22},end:{line:38,column:26}},15:{start:{line:39,column:2},end:{line:41,column:3}},16:{start:{line:40,column:4},end:{line:40,column:17}},17:{start:{line:42,column:14},end:{line:42,column:29}},18:{start:{line:43,column:16},end:{line:43,column:32}},19:{start:{line:45,column:4},end:{line:65,column:5}},20:{start:{line:46,column:6},end:{line:46,column:20}},21:{start:{line:47,column:11},end:{line:65,column:5}},22:{start:{line:48,column:6},end:{line:48,column:18}},23:{start:{line:49,column:11},end:{line:65,column:5}},24:{start:{line:50,column:6},end:{line:50,column:20}},25:{start:{line:52,column:18},end:{line:52,column:25}},26:{start:{line:54,column:6},end:{line:63,column:7}},27:{start:{line:55,column:8},end:{line:55,column:41}},28:{start:{line:57,column:8},end:{line:59,column:11}},29:{start:{line:58,column:10},end:{line:58,column:101}},30:{start:{line:60,column:8},end:{line:62,column:9}},31:{start:{line:61,column:10},end:{line:61,column:34}},32:{start:{line:64,column:6},end:{line:64,column:63}},33:{start:{line:67,column:12},end:{line:67,column:16}},34:{start:{line:68,column:2},end:{line:99,column:3}},35:{start:{line:69,column:19},end:{line:79,column:6}},36:{start:{line:80,column:4},end:{line:94,column:5}},37:{start:{line:81,column:6},end:{line:93,column:8}},38:{start:{line:84,column:10},end:{line:84,column:76}},39:{start:{line:86,column:34},end:{line:86,column:85}},40:{start:{line:87,column:10},end:{line:91,column:12}},41:{start:{line:95,column:9},end:{line:99,column:3}},42:{start:{line:96,column:4},end:{line:96,column:56}},43:{start:{line:98,column:4},end:{line:98,column:50}},44:{start:{line:100,column:2},end:{line:128,column:3}},45:{start:{line:101,column:19},end:{line:101,column:28}},46:{start:{line:102,column:4},end:{line:127,column:7}},47:{start:{line:103,column:31},end:{line:103,column:36}},48:{start:{line:104,column:6},end:{line:126,column:7}},49:{start:{line:105,column:31},end:{line:105,column:64}},50:{start:{line:106,column:20},end:{line:110,column:9}},51:{start:{line:111,column:8},end:{line:111,column:24}},52:{start:{line:112,column:13},end:{line:126,column:7}},53:{start:{line:113,column:21},end:{line:113,column:83}},54:{start:{line:114,column:28},end:{line:114,column:64}},55:{start:{line:115,column:8},end:{line:118,column:9}},56:{start:{line:116,column:10},end:{line:116,column:69}},57:{start:{line:117,column:10},end:{line:117,column:17}},58:{start:{line:119,column:24},end:{line:119,column:35}},59:{start:{line:120,column:31},end:{line:120,column:34}},60:{start:{line:121,column:8},end:{line:125,column:11}},61:{start:{line:129,column:2},end:{line:129,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:"tryToParse",decl:{start:{line:11,column:9},end:{line:11,column:19}},loc:{start:{line:11,column:26},end:{line:32,column:1}},line:11},2:{name:"(anonymous_2)",decl:{start:{line:33,column:42},end:{line:33,column:43}},loc:{start:{line:33,column:52},end:{line:35,column:1}},line:33},3:{name:"(anonymous_3)",decl:{start:{line:36,column:41},end:{line:36,column:42}},loc:{start:{line:36,column:62},end:{line:130,column:1}},line:36},4:{name:"getArrayPositionalFromAst",decl:{start:{line:44,column:11},end:{line:44,column:36}},loc:{start:{line:44,column:49},end:{line:66,column:3}},line:44},5:{name:"(anonymous_5)",decl:{start:{line:57,column:37},end:{line:57,column:38}},loc:{start:{line:57,column:52},end:{line:59,column:9}},line:57},6:{name:"(anonymous_6)",decl:{start:{line:83,column:29},end:{line:83,column:30}},loc:{start:{line:83,column:38},end:{line:85,column:9}},line:83},7:{name:"(anonymous_7)",decl:{start:{line:85,column:15},end:{line:85,column:16}},loc:{start:{line:85,column:24},end:{line:92,column:9}},line:85},8:{name:"(anonymous_8)",decl:{start:{line:102,column:19},end:{line:102,column:20}},loc:{start:{line:102,column:30},end:{line:127,column:5}},line:102}},branchMap:{0:{loc:{start:{line:17,column:4},end:{line:29,column:5}},type:"if",locations:[{start:{line:17,column:4},end:{line:29,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:39,column:2},end:{line:41,column:3}},type:"if",locations:[{start:{line:39,column:2},end:{line:41,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:39},2:{loc:{start:{line:45,column:4},end:{line:65,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:65,column:5}},{start:{line:47,column:11},end:{line:65,column:5}}],line:45},3:{loc:{start:{line:47,column:11},end:{line:65,column:5}},type:"if",locations:[{start:{line:47,column:11},end:{line:65,column:5}},{start:{line:49,column:11},end:{line:65,column:5}}],line:47},4:{loc:{start:{line:49,column:11},end:{line:65,column:5}},type:"if",locations:[{start:{line:49,column:11},end:{line:65,column:5}},{start:{line:51,column:11},end:{line:65,column:5}}],line:49},5:{loc:{start:{line:54,column:6},end:{line:63,column:7}},type:"if",locations:[{start:{line:54,column:6},end:{line:63,column:7}},{start:{line:56,column:13},end:{line:63,column:7}}],line:54},6:{loc:{start:{line:58,column:17},end:{line:58,column:100}},type:"binary-expr",locations:[{start:{line:58,column:17},end:{line:58,column:30}},{start:{line:58,column:34},end:{line:58,column:69}},{start:{line:58,column:73},end:{line:58,column:100}}],line:58},7:{loc:{start:{line:60,column:8},end:{line:62,column:9}},type:"if",locations:[{start:{line:60,column:8},end:{line:62,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:60},8:{loc:{start:{line:68,column:2},end:{line:99,column:3}},type:"if",locations:[{start:{line:68,column:2},end:{line:99,column:3}},{start:{line:95,column:9},end:{line:99,column:3}}],line:68},9:{loc:{start:{line:80,column:4},end:{line:94,column:5}},type:"if",locations:[{start:{line:80,column:4},end:{line:94,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:80},10:{loc:{start:{line:95,column:9},end:{line:99,column:3}},type:"if",locations:[{start:{line:95,column:9},end:{line:99,column:3}},{start:{line:97,column:9},end:{line:99,column:3}}],line:95},11:{loc:{start:{line:100,column:2},end:{line:128,column:3}},type:"if",locations:[{start:{line:100,column:2},end:{line:128,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:100},12:{loc:{start:{line:104,column:6},end:{line:126,column:7}},type:"if",locations:[{start:{line:104,column:6},end:{line:126,column:7}},{start:{line:112,column:13},end:{line:126,column:7}}],line:104},13:{loc:{start:{line:112,column:13},end:{line:126,column:7}},type:"if",locations:[{start:{line:112,column:13},end:{line:126,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:112},14:{loc:{start:{line:115,column:8},end:{line:118,column:9}},type:"if",locations:[{start:{line:115,column:8},end:{line:118,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:115}},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},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,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/libs/codemirror-mgl.ts"],names:[],mappings:"AAAA,SAAQ,aAAY;AACpB,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;AAGD,SAAS,WAAW,MAAc;AAEhC,QAAM,QAAkC,CAAC;AACzC,MAAI;AACF,UAAM,IAAI;AAAA,EACZ,SACM,KAAU;AAEd,UAAM,aAAa,IAAI,SAAS,EAAE,MAAM,0BAA0B;AAClE,QAAI,YAAY;AACd,YAAM,MAAM;AAAA,QACV,YAAY,SAAS,WAAW,CAAC,GAAG,EAAE;AAAA,QACtC,cAAc,SAAS,WAAW,CAAC,GAAG,EAAE;AAAA,QACxC,WAAW,SAAS,WAAW,CAAC,GAAG,EAAE;AAAA,QACrC,aAAa,SAAS,WAAW,CAAC,GAAG,EAAE;AAAA,MACzC;AAGA,YAAM,KAAK;AAAA,QACT,MAAM,WAAW,IAAI,IAAI,aAAa,GAAG,IAAI,YAAY;AAAA,QACzD,IAAI,WAAW,IAAI,IAAI,YAAY,GAAG,IAAI,WAAW;AAAA,QACrD,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;AAEA,WAAW,eAAe,QAAQ,QAAQ,CAAC,SAAiB;AAC1D,SAAO,WAAW,IAAI;AACxB,CAAC;AAED,WAAW,eAAe,QAAQ,OAAO,CAAC,MAAc,MAAW,QAAa;AAE9E,QAAM,QAAkC,WAAW,IAAI;AAEvD,QAAM,EAAC,QAAO,IAAI;AAElB,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:"89c156e637b20b434cfb214df7fad7d710253070"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return hr=function(){return a},a}hr();hr().s[0]++;ap.defineMode("mgl",(n,e)=>(hr().f[0]++,hr().s[1]++,ap.modes.javascript({...n,json:!0},e)));function IN(n){hr().f[1]++;const e=(hr().s[2]++,[]);hr().s[3]++;try{hr().s[4]++,Mle.parse(n)}catch(t){const r=(hr().s[5]++,t.toString().match(/line (\d+), column (\d+)/));if(hr().s[6]++,r){hr().b[0][0]++;const i=(hr().s[7]++,{first_line:parseInt(r[1],10),first_column:parseInt(r[2],10),last_line:parseInt(r[1],10),last_column:parseInt(r[2],10)});hr().s[8]++,e.push({from:ap.Pos(i.first_line-1,i.first_column),to:ap.Pos(i.last_line-1,i.last_column),message:t})}else hr().b[0][1]++}return hr().s[9]++,e}hr().s[10]++;ap.registerHelper("lint","json",n=>(hr().f[2]++,hr().s[11]++,IN(n)));hr().s[12]++;ap.registerHelper("lint","mgl",(n,e,t)=>{hr().f[3]++;const r=(hr().s[13]++,IN(n)),{context:i}=(hr().s[14]++,e);if(hr().s[15]++,r.length>0)return hr().b[1][0]++,hr().s[16]++,r;hr().b[1][1]++;const s=(hr().s[17]++,Ole(n)),a=(hr().s[18]++,JSON.parse(n));function o(g,b){if(hr().f[4]++,hr().s[19]++,g){if(hr().b[2][1]++,hr().s[21]++,b.length<1)return hr().b[3][0]++,hr().s[22]++,g;if(hr().b[3][1]++,hr().s[23]++,g.children){hr().b[4][1]++;const E=(hr().s[25]++,b[0]);let S;return hr().s[26]++,E.match(/^[0-9]+$/)?(hr().b[5][0]++,hr().s[27]++,S=g.children[b[0]]):(hr().b[5][1]++,hr().s[28]++,S=g.children.find(O=>(hr().f[5]++,hr().s[29]++,hr().b[6][0]++,O.key&&(hr().b[6][1]++,O.key.type==="Identifier")&&(hr().b[6][2]++,O.key.value===E))),hr().s[30]++,S?(hr().b[7][0]++,hr().s[31]++,S=S.value):hr().b[7][1]++),hr().s[32]++,o(S,b.slice(1))}else{hr().b[4][0]++,hr().s[24]++;return}}else{hr().b[2][0]++,hr().s[20]++;return}}let d=(hr().s[33]++,null);if(hr().s[34]++,i==="layer"){hr().b[8][0]++;const g=(hr().s[35]++,kf({version:8,name:"Empty Style",metadata:{},sources:{},sprite:"",glyphs:"https://example.com/glyphs/{fontstack}/{range}.pbf",layers:[a]}));hr().s[36]++,g?(hr().b[9][0]++,hr().s[37]++,d={result:"error",value:g.filter(b=>(hr().f[6]++,hr().s[38]++,!b.message.match(/^layers\[0\]: source ".*" not found$/))).map(b=>{hr().f[7]++;const E=(hr().s[39]++,b.message.replace(/^layers\[0\]./,"").split(":"));return hr().s[40]++,{name:"",key:E[0],message:E[1]}})}):hr().b[9][1]++}else if(hr().b[8][1]++,hr().s[41]++,i==="expression")hr().b[10][0]++,hr().s[42]++,d=BV.createExpression(a,e.spec);else throw hr().b[10][1]++,hr().s[43]++,new Error(`Invalid context ${i}`);if(hr().s[44]++,(d==null?void 0:d.result)==="error"){hr().b[11][0]++;const g=(hr().s[45]++,d.value);hr().s[46]++,g.forEach(b=>{hr().f[8]++;const{key:E,message:S}=(hr().s[47]++,b);if(hr().s[48]++,E)if(hr().b[12][1]++,hr().s[52]++,E){hr().b[13][0]++;const O=(hr().s[53]++,E.replace(/^\[|\]$/g,"").split(/\.|[[\]]+/).filter(Boolean)),k=(hr().s[54]++,o(s,O));if(hr().s[55]++,k)hr().b[14][1]++;else{hr().b[14][0]++,hr().s[56]++,console.warn("Something went wrong parsing error:",b),hr().s[57]++;return}const{loc:U}=(hr().s[58]++,k),{start:z,end:q}=(hr().s[59]++,U);hr().s[60]++,r.push({from:ap.Pos(z.line-1,z.column),to:ap.Pos(q.line-1,q.column),message:S})}else hr().b[13][1]++;else{hr().b[12][0]++;const O=(hr().s[49]++,t.getLineHandle(t.lastLine())),k=(hr().s[50]++,{from:ap.Pos(t.firstLine(),0),to:ap.Pos(t.lastLine(),O.text.length),message:S});hr().s[51]++,r.push(k)}})}else hr().b[11][1]++;return hr().s[61]++,r});function _r(){var n="/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",e="da44fe7250311daecfc0a96e15b8409621007dbc",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputJson.tsx",statementMap:{0:{start:{line:14,column:24},end:{line:29,column:3}},1:{start:{line:19,column:6},end:{line:19,column:65}},2:{start:{line:32,column:8},end:{line:32,column:12}},3:{start:{line:33,column:22},end:{line:33,column:27}},4:{start:{line:35,column:4},end:{line:35,column:17}},5:{start:{line:36,column:4},end:{line:36,column:32}},6:{start:{line:37,column:4},end:{line:41,column:6}},7:{start:{line:44,column:4},end:{line:60,column:7}},8:{start:{line:61,column:4},end:{line:61,column:42}},9:{start:{line:62,column:4},end:{line:62,column:40}},10:{start:{line:63,column:4},end:{line:63,column:38}},11:{start:{line:65,column:18},end:{line:67,column:3}},12:{start:{line:66,column:4},end:{line:66,column:31}},13:{start:{line:68,column:12},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return _r=function(){return a},a}_r();class kN extends rr.Component{constructor(t){_r().f[5]++,_r().s[4]++;super(t);kn(this,"_keyEvent");kn(this,"_doc");kn(this,"_el",(_r().s[2]++,null));kn(this,"_cancelNextChange",(_r().s[3]++,!1));kn(this,"onPointerDown",(_r().s[11]++,()=>{_r().f[7]++,_r().s[12]++,this._keyEvent="pointer"}));kn(this,"onFocus",(_r().s[13]++,()=>{_r().f[8]++,_r().s[14]++,this.props.onFocus?(_r().b[2][0]++,_r().s[15]++,this.props.onFocus()):_r().b[2][1]++,_r().s[16]++,this.setState({isEditing:!0,showMessage:this._keyEvent==="keyboard"})}));kn(this,"onBlur",(_r().s[17]++,()=>{_r().f[9]++,_r().s[18]++,this._keyEvent="keyboard",_r().s[19]++,this.props.onBlur?(_r().b[3][0]++,_r().s[20]++,this.props.onBlur()):_r().b[3][1]++,_r().s[21]++,this.setState({isEditing:!1,showMessage:!1})}));kn(this,"onChange",(_r().s[28]++,t=>{if(_r().f[12]++,_r().s[29]++,this._cancelNextChange){_r().b[6][0]++,_r().s[30]++,this._cancelNextChange=!1,_r().s[31]++,this.setState({prevValue:this._doc.getValue()}),_r().s[32]++;return}else _r().b[6][1]++;const r=(_r().s[33]++,this._doc.getValue());if(_r().s[34]++,this.state.prevValue!==r){_r().b[7][0]++;let i,s;_r().s[35]++;try{_r().s[36]++,i=JSON.parse(r)}catch(a){_r().s[37]++,s=a,_r().s[38]++,console.warn(a)}_r().s[39]++,_r().b[9][0]++,s&&(_r().b[9][1]++,this.props.onJSONInvalid)?(_r().b[8][0]++,_r().s[40]++,this.props.onJSONInvalid()):(_r().b[8][1]++,_r().s[41]++,this.props.onChange?(_r().b[10][0]++,_r().s[42]++,this.props.onChange(i)):_r().b[10][1]++,_r().s[43]++,this.props.onJSONValid?(_r().b[11][0]++,_r().s[44]++,this.props.onJSONValid()):_r().b[11][1]++)}else _r().b[7][1]++;_r().s[45]++,this.setState({prevValue:r})}));_r().s[5]++,this._keyEvent="keyboard",_r().s[6]++,this.state={isEditing:!1,showMessage:!1,prevValue:this.props.getValue(this.props.layer)}}componentDidMount(){_r().f[6]++,_r().s[7]++,this._doc=ap(this._el,{value:this.props.getValue(this.props.layer),mode:(_r().b[0][0]++,this.props.mode||(_r().b[0][1]++,{name:"mgl"})),lineWrapping:this.props.lineWrapping,tabSize:2,theme:"maputnik",viewportMargin:1/0,lineNumbers:this.props.lineNumbers,lint:(_r().b[1][0]++,this.props.lint||(_r().b[1][1]++,{context:"layer"})),matchBrackets:!0,gutters:this.props.gutters,scrollbarStyle:"null"}),_r().s[8]++,this._doc.on("change",this.onChange),_r().s[9]++,this._doc.on("focus",this.onFocus),_r().s[10]++,this._doc.on("blur",this.onBlur)}componentWillUnMount(){_r().f[10]++,_r().s[22]++,this._doc.off("change",this.onChange),_r().s[23]++,this._doc.off("focus",this.onFocus),_r().s[24]++,this._doc.off("blur",this.onBlur)}componentDidUpdate(t){_r().f[11]++,_r().s[25]++,_r().b[5][0]++,!this.state.isEditing&&(_r().b[5][1]++,t.layer!==this.props.layer)?(_r().b[4][0]++,_r().s[26]++,this._cancelNextChange=!0,_r().s[27]++,this._doc.setValue(this.props.getValue(this.props.layer))):_r().b[4][1]++}render(){_r().f[13]++;const t=(_r().s[46]++,this.props.t),{showMessage:r}=(_r().s[47]++,this.state),i=(_r().s[48]++,{});return _r().s[49]++,this.props.maxHeight?(_r().b[12][0]++,_r().s[50]++,i.maxHeight=this.props.maxHeight):_r().b[12][1]++,_r().s[51]++,le.jsxs("div",{className:"JSONEditor",onPointerDown:this.onPointerDown,"aria-hidden":"true",children:[le.jsx("div",{className:tm("JSONEditor__message",{"JSONEditor__message--on":r}),children:le.jsxs(M0,{t,children:["Press ",le.jsx("kbd",{children:"ESC"})," to lose focus"]})}),le.jsx("div",{className:tm("codemirror-container",this.props.className),ref:s=>(_r().f[14]++,_r().s[52]++,this._el=s),style:i})]})}}kn(kN,"defaultProps",(_r().s[0]++,{lineNumbers:!0,lineWrapping:!1,gutters:["CodeMirror-lint-markers"],getValue:t=>(_r().f[0]++,_r().s[1]++,ON(t,{indent:2,maxLength:40})),onFocus:()=>{_r().f[1]++},onBlur:()=>{_r().f[2]++},onJSONInvalid:()=>{_r().f[3]++},onJSONValid:()=>{_r().f[4]++}}));const Ile=(_r().s[53]++,$s()(kN));function K2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",e="60f4cd40e505c4a9f8de1078b77716b10a4a4264",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx",statementMap:{0:{start:{line:6,column:4},end:{line:6,column:61}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:7,column:3}},line:5}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldJson.tsx"],names:[],mappings:"AASW;AATX,OAAO,WAAW;AAClB,OAAO,eAAiC;AAMxC,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,WAAO,oBAAC,aAAW,GAAG,KAAK,OAAO;AAAA,EACpC;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"60f4cd40e505c4a9f8de1078b77716b10a4a4264"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return K2=function(){return a},a}K2();class b8 extends rr.Component{render(){return K2().f[0]++,K2().s[0]++,le.jsx(Ile,{...this.props})}}var SC="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",kle="M7,10L12,15L17,10H7Z",Tle="M7,15L12,10L17,15H7Z",x8="M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z";function Eg(){var n="/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",e="99dad9631fbee5fc23be2dafaf7c7eea92c38eac",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/filterops.ts",statementMap:{0:{start:{line:2,column:34},end:{line:2,column:56}},1:{start:{line:3,column:28},end:{line:3,column:41}},2:{start:{line:4,column:30},end:{line:4,column:123}},3:{start:{line:4,column:88},end:{line:4,column:122}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:80},end:{line:4,column:81}},loc:{start:{line:4,column:88},end:{line:4,column:122}},line:4}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/filterops.ts"],names:[],mappings:"AAAA,OAAO,YAAY;AAEZ,aAAM,qBAAqB,CAAC,OAAO,OAAO,MAAM;AAChD,aAAM,eAAe,CAAC,MAAM,KAAK;AACjC,aAAM,iBAAiB,OAC3B,KAAK,OAAO,gBAAgB,MAAM,EAClC,OAAO,QAAM,mBAAmB,QAAQ,EAAE,IAAI,CAAC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"99dad9631fbee5fc23be2dafaf7c7eea92c38eac"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Eg=function(){return a},a}Eg();const w8=(Eg().s[0]++,["all","any","none"]);Eg().s[1]++;const Ple=(Eg().s[2]++,Object.keys(ts.filter_operator.values).filter(n=>(Eg().f[0]++,Eg().s[3]++,w8.indexOf(n)<0)));function bi(){var n="/home/runner/work/maputnik/maputnik/src/components/SingleFilterEditor.tsx",e="d18e3b448d830733ac17bcacd45f7c08e364baa2",t=globalThis,r="__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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return bi=function(){return a},a}bi();function Rle(n){return bi().f[0]++,bi().s[0]++,n===""?(bi().b[0][0]++,bi().s[1]++,n):(bi().b[0][1]++,bi().s[2]++,isNaN(n)?(bi().b[1][0]++,bi().s[3]++,n):(bi().b[1][1]++,bi().s[4]++,parseFloat(n)))}function Dle(n){bi().f[1]++;const e=(bi().s[5]++,typeof n=="string");if(bi().s[6]++,e)bi().b[2][1]++;else return bi().b[2][0]++,bi().s[7]++,n;return bi().s[8]++,n.match(/^\s*true\s*$/)?(bi().b[3][0]++,bi().s[9]++,!0):(bi().b[3][1]++,bi().s[10]++,n.match(/^\s*false\s*$/)?(bi().b[4][0]++,bi().s[11]++,!1):(bi().b[4][1]++,bi().s[12]++,n))}function Kle(n){return bi().f[2]++,bi().s[13]++,n=Rle(n),bi().s[14]++,n=Dle(n),bi().s[15]++,n}class TN extends rr.Component{onFilterPartChanged(e,t,r){bi().f[3]++;let i=(bi().s[17]++,[e,t,...r.map(Kle)]);bi().s[18]++,bi().b[6][0]++,e==="has"||(bi().b[6][1]++,e==="!has")?(bi().b[5][0]++,bi().s[19]++,i=[e,t]):(bi().b[5][1]++,bi().s[20]++,r.length===0?(bi().b[7][0]++,bi().s[21]++,i=[e,t,""]):bi().b[7][1]++),bi().s[22]++,this.props.onChange(i)}render(){bi().f[4]++;const e=(bi().s[23]++,this.props.filter),t=(bi().s[24]++,e[0]),r=(bi().s[25]++,e[1]),i=(bi().s[26]++,e.slice(2));return bi().s[27]++,le.jsxs("div",{className:"maputnik-filter-editor-single",children:[le.jsx("div",{className:"maputnik-filter-editor-property",children:le.jsx(zy,{"aria-label":"key",value:r,options:Object.keys(this.props.properties).map(s=>(bi().f[5]++,bi().s[28]++,[s,s])),onChange:s=>(bi().f[6]++,bi().s[29]++,this.onFilterPartChanged(t,s,i))})}),le.jsx("div",{className:"maputnik-filter-editor-operator",children:le.jsx(Ng,{"aria-label":"function",value:t,onChange:s=>(bi().f[7]++,bi().s[30]++,this.onFilterPartChanged(s,r,i)),options:Ple})}),(bi().b[8][0]++,i.length>0&&(bi().b[8][1]++,le.jsx("div",{className:"maputnik-filter-editor-args",children:le.jsx(If,{"aria-label":"value",value:i.join(","),onChange:s=>(bi().f[8]++,bi().s[31]++,this.onFilterPartChanged(t,r,s.split(",")))})})))]})}}kn(TN,"defaultProps",(bi().s[16]++,{properties:{}}));function uy(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",e="cef1671f65ba48cf49a518a548a597faa051d67d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:20,column:9}},2:{start:{line:23,column:26},end:{line:23,column:70}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:21,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditorBlock.tsx"],names:[],mappings:"AAYW,SAOD,KAPC;AAZX,OAAO,WAAkC;AACzC,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAMjD,MAAM,kCAAkC,MAAM,UAA0C;AAAA,EACtF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO,qBAAC,SAAI,WAAU,gCACpB;AAAA,0BAAC,SAAI,WAAU,uCACb;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,qBAAqB;AAAA,UAE9B,8BAAC,YAAS;AAAA;AAAA,MACZ,GACF;AAAA,MACA,oBAAC,SAAI,WAAU,wCACZ,eAAK,MAAM,UACd;AAAA,OACF;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,gBAAgB,EAAE,yBAAyB;AACrE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cef1671f65ba48cf49a518a548a597faa051d67d"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return uy=function(){return a},a}uy();class Fle extends rr.Component{render(){uy().f[0]++;const e=(uy().s[0]++,this.props.t);return uy().s[1]++,le.jsxs("div",{className:"maputnik-filter-editor-block",children:[le.jsx("div",{className:"maputnik-filter-editor-block-action",children:le.jsx(Va,{className:"maputnik-delete-filter",onClick:this.props.onDelete,title:e("Delete filter block"),children:le.jsx(ky,{})})}),le.jsx("div",{className:"maputnik-filter-editor-block-content",children:this.props.children})]})}}const Lle=(uy().s[2]++,$s()(Fle));var R5,yT;function Ule(){if(yT)return R5;yT=1;var n="[object Symbol]",e="\\ud800-\\udfff",t="\\u0300-\\u036f\\ufe20-\\ufe23",r="\\u20d0-\\u20f0",i="\\ufe0e\\ufe0f",s="["+e+"]",a="["+t+r+"]",o="\\ud83c[\\udffb-\\udfff]",d="(?:"+a+"|"+o+")",g="[^"+e+"]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",O=d+"?",k="["+i+"]?",U="(?:"+S+"(?:"+[g,b,E].join("|")+")"+k+O+")*",z=k+O+U,q="(?:"+[g+a+"?",a,b,E,s].join("|")+")",Q=RegExp(o+"(?="+o+")|"+q+z,"g"),re=RegExp("["+S+e+t+r+i+"]"),X=typeof window=="object"&&window&&window.Object===Object&&window,Y=typeof self=="object"&&self&&self.Object===Object&&self,ee=X||Y||Function("return this")();function N(gt){return gt.split("")}function ie(gt){return re.test(gt)}function he(gt){return ie(gt)?de(gt):N(gt)}function de(gt){return gt.match(Q)||[]}var Me=Object.prototype,fe=Me.toString,xe=ee.Symbol,De=xe?xe.prototype:void 0,me=De?De.toString:void 0;function at(gt,Dt,Pt){var Le=-1,Pe=gt.length;Dt<0&&(Dt=-Dt>Pe?0:Pe+Dt),Pt=Pt>Pe?Pe:Pt,Pt<0&&(Pt+=Pe),Pe=Dt>Pt?0:Pt-Dt>>>0,Dt>>>=0;for(var Ee=Array(Pe);++Le<Pe;)Ee[Le]=gt[Le+Dt];return Ee}function Qe(gt){if(typeof gt=="string")return gt;if(Te(gt))return me?me.call(gt):"";var Dt=gt+"";return Dt=="0"&&1/gt==-1/0?"-0":Dt}function He(gt,Dt,Pt){var Le=gt.length;return Pt=Pt===void 0?Le:Pt,!Dt&&Pt>=Le?gt:at(gt,Dt,Pt)}function We(gt){return function(Dt){Dt=rt(Dt);var Pt=ie(Dt)?he(Dt):void 0,Le=Pt?Pt[0]:Dt.charAt(0),Pe=Pt?He(Pt,1).join(""):Dt.slice(1);return Le[gt]()+Pe}}function Ce(gt){return!!gt&&typeof gt=="object"}function Te(gt){return typeof gt=="symbol"||Ce(gt)&&fe.call(gt)==n}function rt(gt){return gt==null?"":Qe(gt)}function yt(gt){return bt(rt(gt).toLowerCase())}var bt=We("toUpperCase");return R5=yt,R5}var zle=Ule();const M8=Ha(zle);function Fp(){var n="/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",e="8b86d889d32efa9a6cc667b2fa3579002dfb58fc",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts",statementMap:{0:{start:{line:4,column:16},end:{line:4,column:36}},1:{start:{line:5,column:2},end:{line:9,column:3}},2:{start:{line:6,column:4},end:{line:6,column:52}},3:{start:{line:8,column:4},end:{line:8,column:22}},4:{start:{line:10,column:2},end:{line:10,column:27}}},fnMap:{0:{name:"labelFromFieldName",decl:{start:{line:2,column:24},end:{line:2,column:42}},loc:{start:{line:2,column:54},end:{line:11,column:1}},line:2}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:9,column:3}},{start:{line:7,column:9},end:{line:9,column:3}}],line:5}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/label-from-field-name.ts"],names:[],mappings:"AAAA,OAAO,gBAAgB;AAEvB,wBAAwB,mBAAmB,WAAmB;AAC5D,MAAI;AACJ,QAAM,QAAQ,UAAU,MAAM,GAAG;AACjC,MAAI,MAAM,SAAS,GAAG;AACpB,YAAQ,UAAU,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG;AAAA,EAChD,OACK;AACH,YAAQ;AAAA,EACV;AACA,SAAO,WAAW,KAAK;AACzB;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8b86d889d32efa9a6cc667b2fa3579002dfb58fc"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Fp=function(){return a},a}Fp();function Zx(n){Fp().f[0]++;let e;const t=(Fp().s[0]++,n.split("-"));return Fp().s[1]++,t.length>1?(Fp().b[0][0]++,Fp().s[2]++,e=n.split("-").slice(1).join(" ")):(Fp().b[0][1]++,Fp().s[3]++,e=n),Fp().s[4]++,M8(e)}function Co(){var n="/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",e="550aede3b5713892add5bda71ec153770e1b1129",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx",statementMap:{0:{start:{line:11,column:24},end:{line:17,column:3}},1:{start:{line:19,column:4},end:{line:19,column:17}},2:{start:{line:20,column:4},end:{line:22,column:6}},3:{start:{line:24,column:18},end:{line:28,column:3}},4:{start:{line:25,column:4},end:{line:27,column:7}},5:{start:{line:29,column:16},end:{line:33,column:3}},6:{start:{line:30,column:4},end:{line:32,column:7}},7:{start:{line:35,column:64},end:{line:35,column:74}},8:{start:{line:36,column:26},end:{line:36,column:36}},9:{start:{line:37,column:25},end:{line:37,column:52}},10:{start:{line:38,column:42},end:{line:60,column:8}},11:{start:{line:61,column:21},end:{line:61,column:83}},12:{start:{line:62,column:23},end:{line:62,column:39}},13:{start:{line:63,column:26},end:{line:63,column:40}},14:{start:{line:64,column:24},end:{line:64,column:26}},15:{start:{line:66,column:6},end:{line:66,column:65}},16:{start:{line:68,column:4},end:{line:79,column:5}},17:{start:{line:69,column:6},end:{line:69,column:52}},18:{start:{line:71,column:6},end:{line:75,column:9}},19:{start:{line:72,column:8},end:{line:72,column:45}},20:{start:{line:74,column:8},end:{line:74,column:39}},21:{start:{line:76,column:6},end:{line:78,column:7}},22:{start:{line:77,column:8},end:{line:77,column:37}},23:{start:{line:80,column:4},end:{line:110,column:6}},24:{start:{line:113,column:27},end:{line:113,column:72}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:13,column:13},end:{line:13,column:14}},loc:{start:{line:13,column:19},end:{line:14,column:5}},line:13},1:{name:"(anonymous_1)",decl:{start:{line:15,column:12},end:{line:15,column:13}},loc:{start:{line:15,column:18},end:{line:16,column:5}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:21},end:{line:23,column:3}},line:18},3:{name:"(anonymous_3)",decl:{start:{line:24,column:18},end:{line:24,column:19}},loc:{start:{line:24,column:28},end:{line:28,column:3}},line:24},4:{name:"(anonymous_4)",decl:{start:{line:29,column:16},end:{line:29,column:17}},loc:{start:{line:29,column:22},end:{line:33,column:3}},line:29},5:{name:"(anonymous_5)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:11},end:{line:111,column:3}},line:34},6:{name:"getValue",decl:{start:{line:65,column:13},end:{line:65,column:21}},loc:{start:{line:65,column:28},end:{line:67,column:5}},line:65},7:{name:"(anonymous_7)",decl:{start:{line:71,column:36},end:{line:71,column:37}},loc:{start:{line:71,column:55},end:{line:73,column:7}},line:71},8:{name:"(anonymous_8)",decl:{start:{line:73,column:17},end:{line:73,column:18}},loc:{start:{line:73,column:36},end:{line:75,column:7}},line:73}},branchMap:{0:{loc:{start:{line:37,column:25},end:{line:37,column:52}},type:"cond-expr",locations:[{start:{line:37,column:35},end:{line:37,column:45}},{start:{line:37,column:48},end:{line:37,column:52}}],line:37},1:{loc:{start:{line:39,column:6},end:{line:49,column:7}},type:"binary-expr",locations:[{start:{line:39,column:6},end:{line:39,column:23}},{start:{line:39,column:43},end:{line:49,column:7}}],line:39},2:{loc:{start:{line:61,column:21},end:{line:61,column:83}},type:"cond-expr",locations:[{start:{line:61,column:44},end:{line:61,column:53}},{start:{line:61,column:56},end:{line:61,column:83}}],line:61},3:{loc:{start:{line:68,column:4},end:{line:79,column:5}},type:"if",locations:[{start:{line:68,column:4},end:{line:79,column:5}},{start:{line:70,column:11},end:{line:79,column:5}}],line:68},4:{loc:{start:{line:76,column:6},end:{line:78,column:7}},type:"if",locations:[{start:{line:76,column:6},end:{line:78,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ExpressionProperty.tsx"],names:[],mappings:"AA6DM,mBASM,KATN;AA7DN,OAAO,WAAW;AAClB,SAAQ,UAAU,cAAa;AAC/B,OAAO,qBAAqB;AAC5B,SAA0B,uBAAuB;AAEjD,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,wBAAwB;AAC/B,OAAO,eAAe;AAqBtB,MAAM,mCAAmC,MAAM,UAAoE;AAAA,EACjH,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,IACT,SAAS,MAAM;AAAA,IAAC;AAAA,IAChB,QAAQ,MAAM;AAAA,IAAC;AAAA,EACjB;AAAA,EAEA,YAAY,OAAwC;AAClD,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,SAAgB;AAC/B,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,cAAc,MAAM;AAClB,SAAK,SAAS;AAAA,MACZ,WAAW;AAAA,IACb,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,QAAQ,WAAW,WAAW,OAAO,QAAO,IAAI,KAAK;AAC/D,UAAM,EAAC,UAAS,IAAI,KAAK;AACzB,UAAM,eAAe,UAAU,CAAC,QAAQ,IAAI;AAE5C,UAAM,gBACJ,iCACG;AAAA,WAAK,MAAM,UACV;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,UAAU;AAAA,UACV,WAAU;AAAA,UACV,OAAO,EAAE,wBAAwB;AAAA,UAEjC,8BAAC,UAAO;AAAA;AAAA,QANJ;AAAA,MAON;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,KAAK,MAAM;AAAA,UACpB,WAAU;AAAA,UACV,OAAO,EAAE,mBAAmB;AAAA,UAE5B,8BAAC,YAAS;AAAA;AAAA,QALN;AAAA,MAMN;AAAA,OACF;AAGF,UAAM,WAAW,cAAc,SAAY,YAAY,GAAG,SAAS,IAAI,SAAS;AAEhF,UAAM,aAAa,OAAQ,QAAQ;AACnC,UAAM,gBAAgB,GAAG,QAAQ;AACjC,UAAM,cAAc,CAAC;AAErB,aAAS,SAAS,MAAW;AAC3B,aAAO,gBAAgB,MAAM,EAAC,QAAQ,GAAG,WAAW,GAAE,CAAC;AAAA,IACzD;AAEA,QAAI,WAAW;AACb,kBAAY,KAAK,EAAC,SAAS,eAAc,CAAC;AAAA,IAC5C,OACK;AACH,aAAO,QAAQ,MAAO,EACnB,OAAO,CAAC,CAAC,KAAK,MAAM,MAAM;AACzB,eAAO,IAAI,WAAW,aAAa;AAAA,MACrC,CAAC,EACA,QAAQ,CAAC,CAAC,MAAM,KAAK,MAAM;AAC1B,eAAO,YAAY,KAAK,KAAK;AAAA,MAC/B,CAAC;AAEH,UAAI,YAAY;AACd,oBAAY,KAAK,UAAU;AAAA,MAC7B;AAAA,IACF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QAEN,OAAO;AAAA,QACP,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,EAAE,mBAAmB,KAAK,MAAM,SAAS,CAAC;AAAA,QACjD,QAAQ;AAAA,QACR,UAAU;AAAA,QAEV;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,EAAC,MAAM,MAAK;AAAA,YAClB,MAAM;AAAA,cACJ,SAAS;AAAA,cACT,MAAM,KAAK,MAAM;AAAA,YACnB;AAAA,YACA,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,QAAQ,KAAK,MAAM;AAAA,YACnB,eAAe,KAAK;AAAA,YACpB,aAAa,KAAK;AAAA,YAClB,OAAO;AAAA,YACP,aAAa;AAAA,YACb,WAAW;AAAA,YACX,cAAc;AAAA,YACd;AAAA,YACA,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,qBAAqB,gBAAgB,EAAE,0BAA0B;AACvE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"550aede3b5713892add5bda71ec153770e1b1129"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Co=function(){return a},a}Co();class PN extends rr.Component{constructor(t){Co().f[2]++,Co().s[1]++;super(t);kn(this,"onJSONInvalid",(Co().s[3]++,t=>{Co().f[3]++,Co().s[4]++,this.setState({jsonError:!0})}));kn(this,"onJSONValid",(Co().s[5]++,()=>{Co().f[4]++,Co().s[6]++,this.setState({jsonError:!1})}));Co().s[2]++,this.state={jsonError:!1}}render(){Co().f[5]++;const{t,errors:r,fieldName:i,fieldType:s,value:a,canUndo:o}=(Co().s[7]++,this.props),{jsonError:d}=(Co().s[8]++,this.state),g=(Co().s[9]++,o?(Co().b[0][0]++,!o()):(Co().b[0][1]++,!0)),b=(Co().s[10]++,le.jsxs(le.Fragment,{children:[(Co().b[1][0]++,this.props.onUndo&&(Co().b[1][1]++,le.jsx(Va,{onClick:this.props.onUndo,disabled:g,className:"maputnik-delete-stop",title:t("Revert from expression"),children:le.jsx(_H,{})},"undo_action"))),le.jsx(Va,{onClick:this.props.onDelete,className:"maputnik-delete-stop",title:t("Delete expression"),children:le.jsx(ky,{})},"delete_action")]})),E=(Co().s[11]++,s===void 0?(Co().b[2][0]++,i):(Co().b[2][1]++,`${s}.${i}`)),S=(Co().s[12]++,r[E]),O=(Co().s[13]++,`${E}[`),k=(Co().s[14]++,[]);function U(z){return Co().f[6]++,Co().s[15]++,ON(z,{indent:2,maxLength:38})}return Co().s[16]++,d?(Co().b[3][0]++,Co().s[17]++,k.push({message:"Invalid JSON"})):(Co().b[3][1]++,Co().s[18]++,Object.entries(r).filter(([z,q])=>(Co().f[7]++,Co().s[19]++,z.startsWith(O))).forEach(([z,q])=>(Co().f[8]++,Co().s[20]++,k.push(q))),Co().s[21]++,S?(Co().b[4][0]++,Co().s[22]++,k.push(S)):Co().b[4][1]++),Co().s[23]++,le.jsx(ga,{error:k,fieldSpec:this.props.fieldSpec,label:t(Zx(this.props.fieldName)),action:b,wideMode:!0,children:le.jsx(b8,{mode:{name:"mgl"},lint:{context:"expression",spec:this.props.fieldSpec},className:"maputnik-expression-editor",onFocus:this.props.onFocus,onBlur:this.props.onBlur,onJSONInvalid:this.onJSONInvalid,onJSONValid:this.onJSONValid,layer:a,lineNumbers:!1,maxHeight:200,lineWrapping:!0,getValue:U,onChange:this.props.onChange})})}}kn(PN,"defaultProps",(Co().s[0]++,{errors:{},onFocus:()=>{Co().f[0]++},onBlur:()=>{Co().f[1]++}}));const RN=(Co().s[24]++,$s()(PN));function Ln(){var n="/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",e="10bf63b3f71adfa5066d0aecd6eaecbe45ada76f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx",statementMap:{0:{start:{line:17,column:17},end:{line:17,column:40}},1:{start:{line:18,column:2},end:{line:20,column:3}},2:{start:{line:19,column:4},end:{line:19,column:18}},3:{start:{line:21,column:20},end:{line:21,column:29}},4:{start:{line:22,column:16},end:{line:22,column:31}},5:{start:{line:23,column:2},end:{line:26,column:3}},6:{start:{line:24,column:4},end:{line:24,column:24}},7:{start:{line:25,column:4},end:{line:25,column:32}},8:{start:{line:27,column:2},end:{line:27,column:35}},9:{start:{line:30,column:2},end:{line:30,column:65}},10:{start:{line:33,column:2},end:{line:54,column:4}},11:{start:{line:56,column:19},end:{line:60,column:1}},12:{start:{line:62,column:2},end:{line:64,column:3}},13:{start:{line:63,column:4},end:{line:63,column:16}},14:{start:{line:65,column:21},end:{line:65,column:42}},15:{start:{line:66,column:2},end:{line:66,column:38}},16:{start:{line:69,column:2},end:{line:69,column:52}},17:{start:{line:72,column:2},end:{line:74,column:3}},18:{start:{line:73,column:4},end:{line:73,column:97}},19:{start:{line:73,column:38},end:{line:73,column:59}},20:{start:{line:73,column:75},end:{line:73,column:84}},21:{start:{line:75,column:2},end:{line:75,column:15}},22:{start:{line:78,column:24},end:{line:80,column:3}},23:{start:{line:82,column:4},end:{line:82,column:17}},24:{start:{line:83,column:4},end:{line:86,column:6}},25:{start:{line:90,column:22},end:{line:90,column:58}},26:{start:{line:91,column:4},end:{line:91,column:35}},27:{start:{line:92,column:4},end:{line:92,column:35}},28:{start:{line:95,column:22},end:{line:95,column:58}},29:{start:{line:96,column:4},end:{line:96,column:39}},30:{start:{line:97,column:4},end:{line:97,column:35}},31:{start:{line:99,column:18},end:{line:103,column:3}},32:{start:{line:100,column:26},end:{line:100,column:62}},33:{start:{line:101,column:4},end:{line:101,column:43}},34:{start:{line:102,column:4},end:{line:102,column:39}},35:{start:{line:104,column:16},end:{line:108,column:3}},36:{start:{line:105,column:4},end:{line:107,column:7}},37:{start:{line:109,column:15},end:{line:113,column:3}},38:{start:{line:110,column:4},end:{line:112,column:7}},39:{start:{line:114,column:19},end:{line:120,column:3}},40:{start:{line:115,column:19},end:{line:115,column:46}},41:{start:{line:116,column:4},end:{line:116,column:47}},42:{start:{line:117,column:4},end:{line:119,column:7}},43:{start:{line:122,column:32},end:{line:122,column:75}},44:{start:{line:123,column:4},end:{line:136,column:5}},45:{start:{line:124,column:6},end:{line:127,column:8}},46:{start:{line:128,column:11},end:{line:136,column:5}},47:{start:{line:129,column:6},end:{line:131,column:8}},48:{start:{line:133,column:6},end:{line:135,column:8}},49:{start:{line:139,column:26},end:{line:139,column:36}},50:{start:{line:140,column:36},end:{line:140,column:46}},51:{start:{line:141,column:22},end:{line:143,column:5}},52:{start:{line:144,column:26},end:{line:144,column:33}},53:{start:{line:145,column:36},end:{line:145,column:112}},54:{start:{line:146,column:4},end:{line:271,column:5}},55:{start:{line:147,column:6},end:{line:160,column:11}},56:{start:{line:161,column:11},end:{line:271,column:5}},57:{start:{line:162,column:21},end:{line:162,column:48}},58:{start:{line:163,column:26},end:{line:163,column:35}},59:{start:{line:164,column:22},end:{line:164,column:37}},60:{start:{line:165,column:38},end:{line:173,column:10}},61:{start:{line:174,column:27},end:{line:187,column:8}},62:{start:{line:175,column:22},end:{line:175,column:50}},63:{start:{line:176,column:8},end:{line:186,column:29}},64:{start:{line:188,column:6},end:{line:240,column:11}},65:{start:{line:199,column:33},end:{line:199,column:63}},66:{start:{line:242,column:25},end:{line:242,column:35}},67:{start:{line:243,column:6},end:{line:270,column:11}},68:{start:{line:248,column:14},end:{line:248,column:59}},69:{start:{line:249,column:14},end:{line:249,column:49}},70:{start:{line:274,column:21},end:{line:274,column:60}}},fnMap:{0:{name:"combiningFilter",decl:{start:{line:16,column:9},end:{line:16,column:24}},loc:{start:{line:16,column:32},end:{line:28,column:1}},line:16},1:{name:"migrateFilter",decl:{start:{line:29,column:9},end:{line:29,column:22}},loc:{start:{line:29,column:31},end:{line:31,column:1}},line:29},2:{name:"createStyleFromFilter",decl:{start:{line:32,column:9},end:{line:32,column:30}},loc:{start:{line:32,column:39},end:{line:55,column:1}},line:32},3:{name:"checkIfSimpleFilter",decl:{start:{line:61,column:9},end:{line:61,column:28}},loc:{start:{line:61,column:37},end:{line:67,column:1}},line:61},4:{name:"hasCombiningFilter",decl:{start:{line:68,column:9},end:{line:68,column:27}},loc:{start:{line:68,column:36},end:{line:70,column:1}},line:68},5:{name:"hasNestedCombiningFilter",decl:{start:{line:71,column:9},end:{line:71,column:33}},loc:{start:{line:71,column:42},end:{line:76,column:1}},line:71},6:{name:"(anonymous_6)",decl:{start:{line:73,column:31},end:{line:73,column:32}},loc:{start:{line:73,column:38},end:{line:73,column:59}},line:73},7:{name:"(anonymous_7)",decl:{start:{line:73,column:68},end:{line:73,column:69}},loc:{start:{line:73,column:75},end:{line:73,column:84}},line:73},8:{name:"(anonymous_8)",decl:{start:{line:81,column:2},end:{line:81,column:3}},loc:{start:{line:81,column:21},end:{line:87,column:3}},line:81},9:{name:"(anonymous_9)",decl:{start:{line:89,column:2},end:{line:89,column:3}},loc:{start:{line:89,column:42},end:{line:93,column:3}},line:89},10:{name:"(anonymous_10)",decl:{start:{line:94,column:2},end:{line:94,column:3}},loc:{start:{line:94,column:30},end:{line:98,column:3}},line:94},11:{name:"(anonymous_11)",decl:{start:{line:99,column:18},end:{line:99,column:19}},loc:{start:{line:99,column:24},end:{line:103,column:3}},line:99},12:{name:"(anonymous_12)",decl:{start:{line:104,column:16},end:{line:104,column:17}},loc:{start:{line:104,column:25},end:{line:108,column:3}},line:104},13:{name:"(anonymous_13)",decl:{start:{line:109,column:15},end:{line:109,column:16}},loc:{start:{line:109,column:21},end:{line:113,column:3}},line:109},14:{name:"(anonymous_14)",decl:{start:{line:114,column:19},end:{line:114,column:20}},loc:{start:{line:114,column:25},end:{line:120,column:3}},line:114},15:{name:"(anonymous_15)",decl:{start:{line:121,column:2},end:{line:121,column:3}},loc:{start:{line:121,column:48},end:{line:137,column:3}},line:121},16:{name:"(anonymous_16)",decl:{start:{line:138,column:2},end:{line:138,column:3}},loc:{start:{line:138,column:11},end:{line:272,column:3}},line:138},17:{name:"(anonymous_17)",decl:{start:{line:174,column:39},end:{line:174,column:40}},loc:{start:{line:174,column:51},end:{line:187,column:7}},line:174},18:{name:"(anonymous_18)",decl:{start:{line:199,column:26},end:{line:199,column:27}},loc:{start:{line:199,column:33},end:{line:199,column:63}},line:199},19:{name:"(anonymous_19)",decl:{start:{line:247,column:22},end:{line:247,column:23}},loc:{start:{line:247,column:28},end:{line:250,column:13}},line:247}},branchMap:{0:{loc:{start:{line:17,column:17},end:{line:17,column:40}},type:"binary-expr",locations:[{start:{line:17,column:17},end:{line:17,column:29}},{start:{line:17,column:33},end:{line:17,column:40}}],line:17},1:{loc:{start:{line:18,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:18,column:2},end:{line:20,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:18},2:{loc:{start:{line:23,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:23,column:2},end:{line:26,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},3:{loc:{start:{line:62,column:2},end:{line:64,column:3}},type:"if",locations:[{start:{line:62,column:2},end:{line:64,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:62},4:{loc:{start:{line:62,column:6},end:{line:62,column:59}},type:"binary-expr",locations:[{start:{line:62,column:6},end:{line:62,column:25}},{start:{line:62,column:29},end:{line:62,column:59}}],line:62},5:{loc:{start:{line:72,column:2},end:{line:74,column:3}},type:"if",locations:[{start:{line:72,column:2},end:{line:74,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:72},6:{loc:{start:{line:123,column:4},end:{line:136,column:5}},type:"if",locations:[{start:{line:123,column:4},end:{line:136,column:5}},{start:{line:128,column:11},end:{line:136,column:5}}],line:123},7:{loc:{start:{line:123,column:8},end:{line:123,column:66}},type:"binary-expr",locations:[{start:{line:123,column:8},end:{line:123,column:28}},{start:{line:123,column:32},end:{line:123,column:66}}],line:123},8:{loc:{start:{line:128,column:11},end:{line:136,column:5}},type:"if",locations:[{start:{line:128,column:11},end:{line:136,column:5}},{start:{line:132,column:11},end:{line:136,column:5}}],line:128},9:{loc:{start:{line:128,column:15},end:{line:128,column:73}},type:"binary-expr",locations:[{start:{line:128,column:15},end:{line:128,column:34}},{start:{line:128,column:38},end:{line:128,column:73}}],line:128},10:{loc:{start:{line:145,column:36},end:{line:145,column:112}},type:"binary-expr",locations:[{start:{line:145,column:36},end:{line:145,column:55}},{start:{line:145,column:59},end:{line:145,column:112}}],line:145},11:{loc:{start:{line:146,column:4},end:{line:271,column:5}},type:"if",locations:[{start:{line:146,column:4},end:{line:271,column:5}},{start:{line:161,column:11},end:{line:271,column:5}}],line:146},12:{loc:{start:{line:161,column:11},end:{line:271,column:5}},type:"if",locations:[{start:{line:161,column:11},end:{line:271,column:5}},{start:{line:241,column:11},end:{line:271,column:5}}],line:161},13:{loc:{start:{line:185,column:10},end:{line:185,column:119}},type:"binary-expr",locations:[{start:{line:185,column:10},end:{line:185,column:15}},{start:{line:185,column:35},end:{line:185,column:119}}],line:185},14:{loc:{start:{line:235,column:30},end:{line:235,column:62}},type:"cond-expr",locations:[{start:{line:235,column:51},end:{line:235,column:53}},{start:{line:235,column:56},end:{line:235,column:62}}],line:235},15:{loc:{start:{line:258,column:8},end:{line:269,column:12}},type:"binary-expr",locations:[{start:{line:258,column:8},end:{line:258,column:38}},{start:{line:258,column:58},end:{line:269,column:12}}],line:258}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FilterEditor.tsx"],names:[],mappings:"AAgMQ,SAsDA,UAtDA,KAGA,YAHA;AAhMR,OAAO,WAAW;AAClB,SAAQ,4BAA2B;AACnC,SAAQ,eAAc;AAEtB,SAAQ,QAAQ,SAAS,qBAAoB;AAC7C,SAAQ,0BAAyB;AAEjC,SAAQ,0BAAyB;AACjC,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,wBAAwB;AAC/B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,SAAS;AAChB,OAAO,wBAAwB;AAC/B,SAA0B,uBAAuB;AAGjD,SAAS,gBAAgB,OAAuF;AAC9G,QAAM,SAAS,MAAM,UAAU,CAAC,KAAK;AAErC,MAAI,CAAC,MAAM,QAAQ,MAAM,GAAG;AAC1B,WAAO;AAAA,EACT;AAEA,MAAI,cAAc,OAAO,CAAC;AAC1B,MAAI,UAAU,OAAO,MAAM,CAAC;AAE5B,MAAG,mBAAmB,QAAQ,WAAW,IAAI,GAAG;AAC9C,kBAAc;AACd,cAAU,CAAC,OAAO,MAAM,CAAC,CAAC;AAAA,EAC5B;AAEA,SAAO,CAAC,aAAa,GAAG,OAAO;AACjC;AAEA,SAAS,cAAc,QAA6D;AAElF,SAAQ,QAAQ,sBAAsB,MAAM,CAAQ,EAAE,OAAO,CAAC,EAAU;AAC1E;AAEA,SAAS,sBAAsB,QAAgG;AAC7H,SAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,YAAY,EAAC,qBAAqB,SAAQ;AAAA,IAC1C,WAAW;AAAA,MACT,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,UAAU;AAAA,IACV,UAAU;AAAA,MACR;AAAA,QACE,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF;AAGA,SAAS,oBAAqB,QAA6D;AACzF,MAAI,OAAO,WAAW,KAAK,WAAW,SAAS,OAAO,CAAC,CAAC,GAAG;AACzD,WAAO;AAAA,EACT;AACA,QAAM,aAAa,cAAc,MAAM;AACvC,SAAO,CAAC,QAAQ,YAAY,MAAM;AACpC;AAEA,SAAS,mBAAmB,QAA6D;AACvF,SAAO,mBAAmB,QAAQ,OAAO,CAAC,CAAC,KAAK;AAClD;AAEA,SAAS,yBAAyB,QAA6D;AAC7F,MAAG,mBAAmB,MAAM,GAAG;AAC7B,WAAO,OAAO,MAAM,CAAC,EAAE,IAAI,OAAK,mBAAmB,CAAQ,CAAC,EAAE,OAAO,OAAK,KAAK,IAAI,EAAE,SAAS;AAAA,EAChG;AACA,SAAO;AACT;AAgBA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC,KAAK;AAAA,EAChB;AAAA,EAEA,YAAa,OAAkC;AAC7C,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,qBAAqB,oBAAoB,gBAAgB,KAAK,CAAC;AAAA,IACjE;AAAA,EACF;AAAA;AAAA,EAGA,oBAAoB,WAAmB,SAAgB;AACrD,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,SAAS,IAAI;AACvB,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,iBAAiB,WAAmB;AAClC,UAAM,YAAY,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACrD,cAAU,OAAO,YAAY,GAAG,CAAC;AACjC,SAAK,MAAM,SAAS,SAAS;AAAA,EAC/B;AAAA,EAEA,gBAAgB,MAAM;AACpB,UAAM,gBAAgB,gBAAgB,KAAK,KAAK,EAAE,MAAM,CAAC;AACzD,IAAC,cAAwB,KAAK,CAAC,MAAM,QAAQ,EAAE,CAAC;AAChD,SAAK,MAAM,SAAS,aAAa;AAAA,EACnC;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,MAAM;AACjB,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,SAAK,MAAM,SAAS,cAAc,MAAM,CAAC;AACzC,SAAK,SAAS;AAAA,MACZ,qBAAqB;AAAA,IACvB,CAAC;AAAA,EACH;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,sBAAsB,oBAAoB,gBAAgB,KAAK,CAAC;AAGtE,QAAI,CAAC,uBAAuB,MAAM,wBAAwB,MAAM;AAC9D,aAAO;AAAA,QACL,qBAAqB;AAAA,QACrB,qBAAqB;AAAA,MACvB;AAAA,IACF,WACS,uBAAuB,MAAM,wBAAwB,OAAO;AACnE,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF,OACK;AACH,aAAO;AAAA,QACL,qBAAqB;AAAA,MACvB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,EAAC,IAAI,KAAK;AACzB,UAAM,EAAC,oBAAmB,IAAI,KAAK;AACnC,UAAM,YAAU;AAAA,MACd,KAAK,OAAO,MAAM,OAAO,MAAM;AAAA,IACjC;AACA,UAAM,gBAAgB,CAAC,KAAK;AAE5B,UAAM,0BAA0B,uBAAuB,yBAAyB,gBAAgB,KAAK,KAAK,CAAC;AAE3G,QAAI,yBAAyB;AAC3B,aAAO,qBAAC,SAAI,WAAU,sCACpB;AAAA,4BAAC,OACE,YAAE,mCAAmC,GACxC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,KAAK;AAAA,YACd,OAAO,EAAE,uBAAuB;AAAA,YAEhC;AAAA,kCAAC,SAAI,OAAO,EAAC,aAAa,SAAS,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAChG,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,cACC,EAAE,uBAAuB;AAAA;AAAA;AAAA,QAC5B;AAAA,SACF;AAAA,IACF,WACS,qBAAqB;AAC5B,YAAM,SAAS,gBAAgB,KAAK,KAAK;AACzC,YAAM,cAAc,OAAO,CAAC;AAC5B,YAAM,UAAU,OAAO,MAAM,CAAC;AAE9B,YAAM,UACJ,oBAAC,SACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,KAAK;AAAA,UACd,OAAO,EAAE,uBAAuB;AAAA,UAChC,WAAU;AAAA,UAEV,8BAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAC1E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA;AAAA,MACF,GACF;AAGF,YAAM,eAAe,QAAQ,IAAI,CAAC,GAAG,QAAQ;AAC3C,cAAM,QAAQ,OAAQ,UAAU,MAAI,CAAC,GAAG;AAExC,eACE,qBAAC,SACC;AAAA,8BAAC,qBAA4B,UAAU,KAAK,iBAAiB,KAAK,MAAM,GAAG,GACzE;AAAA,YAAC;AAAA;AAAA,cACC,YAAY,KAAK,MAAM;AAAA,cACvB,QAAQ;AAAA,cACR,UAAU,KAAK,oBAAoB,KAAK,MAAM,MAAM,CAAC;AAAA;AAAA,UACvD,KALsB,GAMxB;AAAA,UACC,SACC,oBAAC,SAAgB,WAAU,yBAAyB,gBAAM,WAAjD,OAAyD;AAAA,aAT5D,SAAS,GAAG,EAWtB;AAAA,MAEJ,CAAC;AAGD,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA,OAAO,EAAE,QAAQ;AAAA,YACjB,QAAQ;AAAA,YAER;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,MAAqB,KAAK,oBAAoB,GAAG,CAAC;AAAA,gBAC7D,SAAS;AAAA,kBACP,CAAC,OAAO,EAAE,sBAAsB,CAAC;AAAA,kBACjC,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AAAA,kBAC/B,CAAC,OAAO,EAAE,oBAAoB,CAAC;AAAA,gBACjC;AAAA;AAAA,YACF;AAAA;AAAA,UAbI;AAAA,QAcN;AAAA,QACC;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,WAAU;AAAA,gBACV,SAAS,KAAK;AAAA,gBAEd;AAAA,sCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,kBAAM;AAAA,kBAAE,EAAE,YAAY;AAAA;AAAA;AAAA,YACxB;AAAA;AAAA,UAXI;AAAA,QAYN;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YAEC,WAAU;AAAA,YACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,YAEjD,8BAAC,OAAI,WAAsB;AAAA;AAAA,UAJvB;AAAA,QAKN;AAAA,SACF;AAAA,IAEJ,OACK;AACH,YAAM,EAAC,OAAM,IAAI,KAAK;AAEtB,aACE,iCACE;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,MAAM;AACd,mBAAK,SAAS,EAAC,qBAAqB,KAAI,CAAC;AACzC,mBAAK,MAAM,SAAS,aAAa;AAAA,YACnC;AAAA,YACA,WAAU;AAAA,YACV;AAAA,YACA,OAAO;AAAA,YACP;AAAA,YACA,UAAU,KAAK,MAAM;AAAA;AAAA,QACvB;AAAA,QACC,KAAK,MAAM,uBACV,qBAAC,SAAI,WAAU,yBACZ;AAAA,YAAE,qCAAqC;AAAA,UACvC;AAAA,UACD;AAAA,YAAC;AAAA;AAAA,cACC,SAAS,KAAK;AAAA,cACd,WAAU;AAAA,cAET,YAAE,0BAA0B;AAAA;AAAA,UAC/B;AAAA,WACF;AAAA,SAEJ;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"10bf63b3f71adfa5066d0aecd6eaecbe45ada76f"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Ln=function(){return a},a}Ln();function f0(n){Ln().f[0]++;const e=(Ln().s[0]++,Ln().b[0][0]++,n.filter||(Ln().b[0][1]++,["all"]));if(Ln().s[1]++,Array.isArray(e))Ln().b[1][1]++;else return Ln().b[1][0]++,Ln().s[2]++,e;let t=(Ln().s[3]++,e[0]),r=(Ln().s[4]++,e.slice(1));return Ln().s[5]++,w8.indexOf(t)<0?(Ln().b[2][0]++,Ln().s[6]++,t="all",Ln().s[7]++,r=[e.slice(0)]):Ln().b[2][1]++,Ln().s[8]++,[t,...r]}function jle(n){return Ln().f[1]++,Ln().s[9]++,EV(Nle(n)).layers[0].filter}function Nle(n){return Ln().f[2]++,Ln().s[10]++,{id:"tmp",version:8,name:"Empty Style",metadata:{"maputnik:renderer":"mlgljs"},sources:{tmp:{type:"geojson",data:""}},sprite:"",glyphs:"https://orangemug.github.io/font-glyphs/glyphs/{fontstack}/{range}.pbf",layers:[{id:"tmp",type:"fill",source:"tmp",filter:n}]}}const Wle=(Ln().s[11]++,["all","any","none"]);function vT(n){if(Ln().f[3]++,Ln().s[12]++,Ln().b[4][0]++,n.length===1&&(Ln().b[4][1]++,Wle.includes(n[0])))return Ln().b[3][0]++,Ln().s[13]++,!0;Ln().b[3][1]++;const e=(Ln().s[14]++,zv(n));return Ln().s[15]++,!V2.isEqual(e,n)}function CT(n){return Ln().f[4]++,Ln().s[16]++,w8.indexOf(n[0])>=0}function Gle(n){return Ln().f[5]++,Ln().s[17]++,CT(n)?(Ln().b[5][0]++,Ln().s[18]++,n.slice(1).map(e=>(Ln().f[6]++,Ln().s[19]++,CT(e))).filter(e=>(Ln().f[7]++,Ln().s[20]++,e==!0)).length>0):(Ln().b[5][1]++,Ln().s[21]++,!1)}class DN extends rr.Component{constructor(t){Ln().f[8]++,Ln().s[23]++;super(t);kn(this,"addFilterItem",(Ln().s[31]++,()=>{Ln().f[11]++;const t=(Ln().s[32]++,f0(this.props).slice(0));Ln().s[33]++,t.push(["==","name",""]),Ln().s[34]++,this.props.onChange(t)}));kn(this,"onToggleDoc",(Ln().s[35]++,t=>{Ln().f[12]++,Ln().s[36]++,this.setState({showDoc:t})}));kn(this,"makeFilter",(Ln().s[37]++,()=>{Ln().f[13]++,Ln().s[38]++,this.setState({displaySimpleFilter:!0})}));kn(this,"makeExpression",(Ln().s[39]++,()=>{Ln().f[14]++;const t=(Ln().s[40]++,f0(this.props));Ln().s[41]++,this.props.onChange(jle(t)),Ln().s[42]++,this.setState({displaySimpleFilter:!1})}));Ln().s[24]++,this.state={showDoc:!1,displaySimpleFilter:vT(f0(t))}}onFilterPartChanged(t,r){Ln().f[9]++;const i=(Ln().s[25]++,f0(this.props).slice(0));Ln().s[26]++,i[t]=r,Ln().s[27]++,this.props.onChange(i)}deleteFilterItem(t){Ln().f[10]++;const r=(Ln().s[28]++,f0(this.props).slice(0));Ln().s[29]++,r.splice(t+1,1),Ln().s[30]++,this.props.onChange(r)}static getDerivedStateFromProps(t,r){Ln().f[15]++;const i=(Ln().s[43]++,vT(f0(t)));return Ln().s[44]++,Ln().b[7][0]++,!i&&(Ln().b[7][1]++,r.displaySimpleFilter===!0)?(Ln().b[6][0]++,Ln().s[45]++,{displaySimpleFilter:!1,valueIsSimpleFilter:!1}):(Ln().b[6][1]++,Ln().s[46]++,Ln().b[9][0]++,i&&(Ln().b[9][1]++,r.displaySimpleFilter===!1)?(Ln().b[8][0]++,Ln().s[47]++,{valueIsSimpleFilter:!0}):(Ln().b[8][1]++,Ln().s[48]++,{valueIsSimpleFilter:!1}))}render(){Ln().f[16]++;const{errors:t,t:r}=(Ln().s[49]++,this.props),{displaySimpleFilter:i}=(Ln().s[50]++,this.state),s=(Ln().s[51]++,{doc:Ys.layer.filter.doc+" Combine multiple filters together by using a compound filter."}),a=(Ln().s[52]++,["all"]),o=(Ln().s[53]++,Ln().b[10][0]++,i&&(Ln().b[10][1]++,Gle(f0(this.props))));if(Ln().s[54]++,o)return Ln().b[11][0]++,Ln().s[55]++,le.jsxs("div",{className:"maputnik-filter-editor-unsupported",children:[le.jsx("p",{children:r("Nested filters are not supported.")}),le.jsxs(Va,{onClick:this.makeExpression,title:r("Convert to expression"),children:[le.jsx("svg",{style:{marginRight:"0.2em",width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:SC})}),r("Upgrade to expression")]})]});if(Ln().b[11][1]++,Ln().s[56]++,i){Ln().b[12][0]++;const d=(Ln().s[57]++,f0(this.props)),g=(Ln().s[58]++,d[0]),b=(Ln().s[59]++,d.slice(1)),E=(Ln().s[60]++,le.jsx("div",{children:le.jsx(Va,{onClick:this.makeExpression,title:r("Convert to expression"),className:"maputnik-make-zoom-function",children:le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:SC})})})})),S=(Ln().s[61]++,b.map((O,k)=>{Ln().f[17]++;const U=(Ln().s[62]++,t[`filter[${k+1}]`]);return Ln().s[63]++,le.jsxs("div",{children:[le.jsx(Lle,{onDelete:this.deleteFilterItem.bind(this,k),children:le.jsx(TN,{properties:this.props.properties,filter:O,onChange:this.onFilterPartChanged.bind(this,k+1)})},k),(Ln().b[13][0]++,U&&(Ln().b[13][1]++,le.jsx("div",{className:"maputnik-inline-error",children:U.message},"error")))]},`block-${k}`)}));return Ln().s[64]++,le.jsxs(le.Fragment,{children:[le.jsx(ga,{fieldSpec:s,label:r("Filter"),action:E,children:le.jsx(Ng,{value:g,onChange:O=>(Ln().f[18]++,Ln().s[65]++,this.onFilterPartChanged(0,O)),options:[["all",r("every filter matches")],["none",r("no filter matches")],["any",r("any filter matches")]]})},"top"),S,le.jsx("div",{className:"maputnik-filter-editor-add-wrapper",children:le.jsxs(Va,{"data-wd-key":"layer-filter-button",className:"maputnik-add-filter",onClick:this.addFilterItem,children:[le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:x8})})," ",r("Add filter")]})},"buttons"),le.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(Ln().b[14][0]++,""):(Ln().b[14][1]++,"none")},children:le.jsx(v8,{fieldSpec:s})},"doc")]})}else{Ln().b[12][1]++;const{filter:d}=(Ln().s[66]++,this.props);return Ln().s[67]++,le.jsxs(le.Fragment,{children:[le.jsx(RN,{onDelete:()=>{Ln().f[19]++,Ln().s[68]++,this.setState({displaySimpleFilter:!0}),Ln().s[69]++,this.props.onChange(a)},fieldName:"filter",fieldSpec:s,value:d,errors:t,onChange:this.props.onChange}),(Ln().b[15][0]++,this.state.valueIsSimpleFilter&&(Ln().b[15][1]++,le.jsxs("div",{className:"maputnik-expr-infobox",children:[r("You've entered an old style filter.")," ",le.jsx("button",{onClick:this.makeFilter,className:"maputnik-expr-infobox__button",children:r("Switch to filter editor.")})]})))]})}}}kn(DN,"defaultProps",(Ln().s[22]++,{filter:["all"]}));const Qle=(Ln().s[70]++,$s()(DN));var g1={},hh={},y1={},D5,_T;function KN(){if(_T)return D5;_T=1;var n=typeof window=="object"&&window&&window.Object===Object&&window;return D5=n,D5}var K5,bT;function pp(){if(bT)return K5;bT=1;var n=KN(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return K5=t,K5}var F5,xT;function t_(){if(xT)return F5;xT=1;var n=pp(),e=n.Symbol;return F5=e,F5}var L5,wT;function qle(){if(wT)return L5;wT=1;var n=t_(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,i=n?n.toStringTag:void 0;function s(a){var o=t.call(a,i),d=a[i];try{a[i]=void 0;var g=!0}catch{}var b=r.call(a);return g&&(o?a[i]=d:delete a[i]),b}return L5=s,L5}var U5,MT;function Yle(){if(MT)return U5;MT=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return U5=t,U5}var z5,ST;function Wg(){if(ST)return z5;ST=1;var n=t_(),e=qle(),t=Yle(),r="[object Null]",i="[object Undefined]",s=n?n.toStringTag:void 0;function a(o){return o==null?o===void 0?i:r:s&&s in Object(o)?e(o):t(o)}return z5=a,z5}var j5,ET;function Xh(){if(ET)return j5;ET=1;var n=Array.isArray;return j5=n,j5}var N5,BT;function sm(){if(BT)return N5;BT=1;function n(e){return e!=null&&typeof e=="object"}return N5=n,N5}var W5,OT;function $le(){if(OT)return W5;OT=1;var n=Wg(),e=Xh(),t=sm(),r="[object String]";function i(s){return typeof s=="string"||!e(s)&&t(s)&&n(s)==r}return W5=i,W5}var G5,IT;function Vle(){if(IT)return G5;IT=1;function n(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),d=o.length;d--;){var g=o[e?d:++s];if(r(a[g],g,a)===!1)break}return t}}return G5=n,G5}var Q5,kT;function FN(){if(kT)return Q5;kT=1;var n=Vle(),e=n();return Q5=e,Q5}var q5,TT;function Hle(){if(TT)return q5;TT=1;function n(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}return q5=n,q5}var Y5,PT;function Zle(){if(PT)return Y5;PT=1;var n=Wg(),e=sm(),t="[object Arguments]";function r(i){return e(i)&&n(i)==t}return Y5=r,Y5}var $5,RT;function S8(){if(RT)return $5;RT=1;var n=Zle(),e=sm(),t=Object.prototype,r=t.hasOwnProperty,i=t.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(a){return e(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return $5=s,$5}var Pv={exports:{}},V5,DT;function Xle(){if(DT)return V5;DT=1;function n(){return!1}return V5=n,V5}Pv.exports;var KT;function Xx(){return KT||(KT=1,function(n,e){var t=pp(),r=Xle(),i=e&&!e.nodeType&&e,s=i&&!0&&n&&!n.nodeType&&n,a=s&&s.exports===i,o=a?t.Buffer:void 0,d=o?o.isBuffer:void 0,g=d||r;n.exports=g}(Pv,Pv.exports)),Pv.exports}var H5,FT;function E8(){if(FT)return H5;FT=1;var n=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(r,i){var s=typeof r;return i=i??n,!!i&&(s=="number"||s!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<i}return H5=t,H5}var Z5,LT;function B8(){if(LT)return Z5;LT=1;var n=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n}return Z5=e,Z5}var X5,UT;function Jle(){if(UT)return X5;UT=1;var n=Wg(),e=B8(),t=sm(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",o="[object Error]",d="[object Function]",g="[object Map]",b="[object Number]",E="[object Object]",S="[object RegExp]",O="[object Set]",k="[object String]",U="[object WeakMap]",z="[object ArrayBuffer]",q="[object DataView]",Q="[object Float32Array]",re="[object Float64Array]",X="[object Int8Array]",Y="[object Int16Array]",ee="[object Int32Array]",N="[object Uint8Array]",ie="[object Uint8ClampedArray]",he="[object Uint16Array]",de="[object Uint32Array]",Me={};Me[Q]=Me[re]=Me[X]=Me[Y]=Me[ee]=Me[N]=Me[ie]=Me[he]=Me[de]=!0,Me[r]=Me[i]=Me[z]=Me[s]=Me[q]=Me[a]=Me[o]=Me[d]=Me[g]=Me[b]=Me[E]=Me[S]=Me[O]=Me[k]=Me[U]=!1;function fe(xe){return t(xe)&&e(xe.length)&&!!Me[n(xe)]}return X5=fe,X5}var J5,zT;function O8(){if(zT)return J5;zT=1;function n(e){return function(t){return e(t)}}return J5=n,J5}var Rv={exports:{}};Rv.exports;var jT;function I8(){return jT||(jT=1,function(n,e){var t=KN(),r=e&&!e.nodeType&&e,i=r&&!0&&n&&!n.nodeType&&n,s=i&&i.exports===r,a=s&&t.process,o=function(){try{var d=i&&i.require&&i.require("util").types;return d||a&&a.binding&&a.binding("util")}catch{}}();n.exports=o}(Rv,Rv.exports)),Rv.exports}var ew,NT;function k8(){if(NT)return ew;NT=1;var n=Jle(),e=O8(),t=I8(),r=t&&t.isTypedArray,i=r?e(r):n;return ew=i,ew}var tw,WT;function LN(){if(WT)return tw;WT=1;var n=Hle(),e=S8(),t=Xh(),r=Xx(),i=E8(),s=k8(),a=Object.prototype,o=a.hasOwnProperty;function d(g,b){var E=t(g),S=!E&&e(g),O=!E&&!S&&r(g),k=!E&&!S&&!O&&s(g),U=E||S||O||k,z=U?n(g.length,String):[],q=z.length;for(var Q in g)(b||o.call(g,Q))&&!(U&&(Q=="length"||O&&(Q=="offset"||Q=="parent")||k&&(Q=="buffer"||Q=="byteLength"||Q=="byteOffset")||i(Q,q)))&&z.push(Q);return z}return tw=d,tw}var nw,GT;function T8(){if(GT)return nw;GT=1;var n=Object.prototype;function e(t){var r=t&&t.constructor,i=typeof r=="function"&&r.prototype||n;return t===i}return nw=e,nw}var rw,QT;function UN(){if(QT)return rw;QT=1;function n(e,t){return function(r){return e(t(r))}}return rw=n,rw}var iw,qT;function eue(){if(qT)return iw;qT=1;var n=UN(),e=n(Object.keys,Object);return iw=e,iw}var ow,YT;function tue(){if(YT)return ow;YT=1;var n=T8(),e=eue(),t=Object.prototype,r=t.hasOwnProperty;function i(s){if(!n(s))return e(s);var a=[];for(var o in Object(s))r.call(s,o)&&o!="constructor"&&a.push(o);return a}return ow=i,ow}var sw,$T;function Tf(){if($T)return sw;$T=1;function n(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return sw=n,sw}var aw,VT;function P8(){if(VT)return aw;VT=1;var n=Wg(),e=Tf(),t="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function a(o){if(!e(o))return!1;var d=n(o);return d==r||d==i||d==t||d==s}return aw=a,aw}var lw,HT;function jy(){if(HT)return lw;HT=1;var n=P8(),e=B8();function t(r){return r!=null&&e(r.length)&&!n(r)}return lw=t,lw}var uw,ZT;function n_(){if(ZT)return uw;ZT=1;var n=LN(),e=tue(),t=jy();function r(i){return t(i)?n(i):e(i)}return uw=r,uw}var Aw,XT;function zN(){if(XT)return Aw;XT=1;var n=FN(),e=n_();function t(r,i){return r&&n(r,i,e)}return Aw=t,Aw}var cw,JT;function Jx(){if(JT)return cw;JT=1;function n(e){return e}return cw=n,cw}var dw,eP;function jN(){if(eP)return dw;eP=1;var n=Jx();function e(t){return typeof t=="function"?t:n}return dw=e,dw}var hw,tP;function R8(){if(tP)return hw;tP=1;var n=zN(),e=jN();function t(r,i){return r&&n(r,e(i))}return hw=t,hw}var fw,nP;function D8(){if(nP)return fw;nP=1;var n=UN(),e=n(Object.getPrototypeOf,Object);return fw=e,fw}var pw,rP;function NN(){if(rP)return pw;rP=1;var n=Wg(),e=D8(),t=sm(),r="[object Object]",i=Function.prototype,s=Object.prototype,a=i.toString,o=s.hasOwnProperty,d=a.call(Object);function g(b){if(!t(b)||n(b)!=r)return!1;var E=e(b);if(E===null)return!0;var S=o.call(E,"constructor")&&E.constructor;return typeof S=="function"&&S instanceof S&&a.call(S)==d}return pw=g,pw}var mw,iP;function WN(){if(iP)return mw;iP=1;function n(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}return mw=n,mw}var gw,oP;function nue(){if(oP)return gw;oP=1;function n(){this.__data__=[],this.size=0}return gw=n,gw}var yw,sP;function r_(){if(sP)return yw;sP=1;function n(e,t){return e===t||e!==e&&t!==t}return yw=n,yw}var vw,aP;function e3(){if(aP)return vw;aP=1;var n=r_();function e(t,r){for(var i=t.length;i--;)if(n(t[i][0],r))return i;return-1}return vw=e,vw}var Cw,lP;function rue(){if(lP)return Cw;lP=1;var n=e3(),e=Array.prototype,t=e.splice;function r(i){var s=this.__data__,a=n(s,i);if(a<0)return!1;var o=s.length-1;return a==o?s.pop():t.call(s,a,1),--this.size,!0}return Cw=r,Cw}var _w,uP;function iue(){if(uP)return _w;uP=1;var n=e3();function e(t){var r=this.__data__,i=n(r,t);return i<0?void 0:r[i][1]}return _w=e,_w}var bw,AP;function oue(){if(AP)return bw;AP=1;var n=e3();function e(t){return n(this.__data__,t)>-1}return bw=e,bw}var xw,cP;function sue(){if(cP)return xw;cP=1;var n=e3();function e(t,r){var i=this.__data__,s=n(i,t);return s<0?(++this.size,i.push([t,r])):i[s][1]=r,this}return xw=e,xw}var ww,dP;function t3(){if(dP)return ww;dP=1;var n=nue(),e=rue(),t=iue(),r=oue(),i=sue();function s(a){var o=-1,d=a==null?0:a.length;for(this.clear();++o<d;){var g=a[o];this.set(g[0],g[1])}}return s.prototype.clear=n,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=r,s.prototype.set=i,ww=s,ww}var Mw,hP;function aue(){if(hP)return Mw;hP=1;var n=t3();function e(){this.__data__=new n,this.size=0}return Mw=e,Mw}var Sw,fP;function lue(){if(fP)return Sw;fP=1;function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}return Sw=n,Sw}var Ew,pP;function uue(){if(pP)return Ew;pP=1;function n(e){return this.__data__.get(e)}return Ew=n,Ew}var Bw,mP;function Aue(){if(mP)return Bw;mP=1;function n(e){return this.__data__.has(e)}return Bw=n,Bw}var Ow,gP;function cue(){if(gP)return Ow;gP=1;var n=pp(),e=n["__core-js_shared__"];return Ow=e,Ow}var Iw,yP;function due(){if(yP)return Iw;yP=1;var n=cue(),e=function(){var r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function t(r){return!!e&&e in r}return Iw=t,Iw}var kw,vP;function GN(){if(vP)return kw;vP=1;var n=Function.prototype,e=n.toString;function t(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return kw=t,kw}var Tw,CP;function hue(){if(CP)return Tw;CP=1;var n=P8(),e=due(),t=Tf(),r=GN(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,d=a.toString,g=o.hasOwnProperty,b=RegExp("^"+d.call(g).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E(S){if(!t(S)||e(S))return!1;var O=n(S)?b:s;return O.test(r(S))}return Tw=E,Tw}var Pw,_P;function fue(){if(_P)return Pw;_P=1;function n(e,t){return e==null?void 0:e[t]}return Pw=n,Pw}var Rw,bP;function Gg(){if(bP)return Rw;bP=1;var n=hue(),e=fue();function t(r,i){var s=e(r,i);return n(s)?s:void 0}return Rw=t,Rw}var Dw,xP;function K8(){if(xP)return Dw;xP=1;var n=Gg(),e=pp(),t=n(e,"Map");return Dw=t,Dw}var Kw,wP;function n3(){if(wP)return Kw;wP=1;var n=Gg(),e=n(Object,"create");return Kw=e,Kw}var Fw,MP;function pue(){if(MP)return Fw;MP=1;var n=n3();function e(){this.__data__=n?n(null):{},this.size=0}return Fw=e,Fw}var Lw,SP;function mue(){if(SP)return Lw;SP=1;function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return Lw=n,Lw}var Uw,EP;function gue(){if(EP)return Uw;EP=1;var n=n3(),e="__lodash_hash_undefined__",t=Object.prototype,r=t.hasOwnProperty;function i(s){var a=this.__data__;if(n){var o=a[s];return o===e?void 0:o}return r.call(a,s)?a[s]:void 0}return Uw=i,Uw}var zw,BP;function yue(){if(BP)return zw;BP=1;var n=n3(),e=Object.prototype,t=e.hasOwnProperty;function r(i){var s=this.__data__;return n?s[i]!==void 0:t.call(s,i)}return zw=r,zw}var jw,OP;function vue(){if(OP)return jw;OP=1;var n=n3(),e="__lodash_hash_undefined__";function t(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=n&&i===void 0?e:i,this}return jw=t,jw}var Nw,IP;function Cue(){if(IP)return Nw;IP=1;var n=pue(),e=mue(),t=gue(),r=yue(),i=vue();function s(a){var o=-1,d=a==null?0:a.length;for(this.clear();++o<d;){var g=a[o];this.set(g[0],g[1])}}return s.prototype.clear=n,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=r,s.prototype.set=i,Nw=s,Nw}var Ww,kP;function _ue(){if(kP)return Ww;kP=1;var n=Cue(),e=t3(),t=K8();function r(){this.size=0,this.__data__={hash:new n,map:new(t||e),string:new n}}return Ww=r,Ww}var Gw,TP;function bue(){if(TP)return Gw;TP=1;function n(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return Gw=n,Gw}var Qw,PP;function r3(){if(PP)return Qw;PP=1;var n=bue();function e(t,r){var i=t.__data__;return n(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Qw=e,Qw}var qw,RP;function xue(){if(RP)return qw;RP=1;var n=r3();function e(t){var r=n(this,t).delete(t);return this.size-=r?1:0,r}return qw=e,qw}var Yw,DP;function wue(){if(DP)return Yw;DP=1;var n=r3();function e(t){return n(this,t).get(t)}return Yw=e,Yw}var $w,KP;function Mue(){if(KP)return $w;KP=1;var n=r3();function e(t){return n(this,t).has(t)}return $w=e,$w}var Vw,FP;function Sue(){if(FP)return Vw;FP=1;var n=r3();function e(t,r){var i=n(this,t),s=i.size;return i.set(t,r),this.size+=i.size==s?0:1,this}return Vw=e,Vw}var Hw,LP;function F8(){if(LP)return Hw;LP=1;var n=_ue(),e=xue(),t=wue(),r=Mue(),i=Sue();function s(a){var o=-1,d=a==null?0:a.length;for(this.clear();++o<d;){var g=a[o];this.set(g[0],g[1])}}return s.prototype.clear=n,s.prototype.delete=e,s.prototype.get=t,s.prototype.has=r,s.prototype.set=i,Hw=s,Hw}var Zw,UP;function Eue(){if(UP)return Zw;UP=1;var n=t3(),e=K8(),t=F8(),r=200;function i(s,a){var o=this.__data__;if(o instanceof n){var d=o.__data__;if(!e||d.length<r-1)return d.push([s,a]),this.size=++o.size,this;o=this.__data__=new t(d)}return o.set(s,a),this.size=o.size,this}return Zw=i,Zw}var Xw,zP;function i3(){if(zP)return Xw;zP=1;var n=t3(),e=aue(),t=lue(),r=uue(),i=Aue(),s=Eue();function a(o){var d=this.__data__=new n(o);this.size=d.size}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=i,a.prototype.set=s,Xw=a,Xw}var Jw,jP;function Bue(){if(jP)return Jw;jP=1;var n="__lodash_hash_undefined__";function e(t){return this.__data__.set(t,n),this}return Jw=e,Jw}var eM,NP;function Oue(){if(NP)return eM;NP=1;function n(e){return this.__data__.has(e)}return eM=n,eM}var tM,WP;function Iue(){if(WP)return tM;WP=1;var n=F8(),e=Bue(),t=Oue();function r(i){var s=-1,a=i==null?0:i.length;for(this.__data__=new n;++s<a;)this.add(i[s])}return r.prototype.add=r.prototype.push=e,r.prototype.has=t,tM=r,tM}var nM,GP;function kue(){if(GP)return nM;GP=1;function n(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}return nM=n,nM}var rM,QP;function Tue(){if(QP)return rM;QP=1;function n(e,t){return e.has(t)}return rM=n,rM}var iM,qP;function QN(){if(qP)return iM;qP=1;var n=Iue(),e=kue(),t=Tue(),r=1,i=2;function s(a,o,d,g,b,E){var S=d&r,O=a.length,k=o.length;if(O!=k&&!(S&&k>O))return!1;var U=E.get(a),z=E.get(o);if(U&&z)return U==o&&z==a;var q=-1,Q=!0,re=d&i?new n:void 0;for(E.set(a,o),E.set(o,a);++q<O;){var X=a[q],Y=o[q];if(g)var ee=S?g(Y,X,q,o,a,E):g(X,Y,q,a,o,E);if(ee!==void 0){if(ee)continue;Q=!1;break}if(re){if(!e(o,function(N,ie){if(!t(re,ie)&&(X===N||b(X,N,d,g,E)))return re.push(ie)})){Q=!1;break}}else if(!(X===Y||b(X,Y,d,g,E))){Q=!1;break}}return E.delete(a),E.delete(o),Q}return iM=s,iM}var oM,YP;function qN(){if(YP)return oM;YP=1;var n=pp(),e=n.Uint8Array;return oM=e,oM}var sM,$P;function Pue(){if($P)return sM;$P=1;function n(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}return sM=n,sM}var aM,VP;function Rue(){if(VP)return aM;VP=1;function n(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}return aM=n,aM}var lM,HP;function Due(){if(HP)return lM;HP=1;var n=t_(),e=qN(),t=r_(),r=QN(),i=Pue(),s=Rue(),a=1,o=2,d="[object Boolean]",g="[object Date]",b="[object Error]",E="[object Map]",S="[object Number]",O="[object RegExp]",k="[object Set]",U="[object String]",z="[object Symbol]",q="[object ArrayBuffer]",Q="[object DataView]",re=n?n.prototype:void 0,X=re?re.valueOf:void 0;function Y(ee,N,ie,he,de,Me,fe){switch(ie){case Q:if(ee.byteLength!=N.byteLength||ee.byteOffset!=N.byteOffset)return!1;ee=ee.buffer,N=N.buffer;case q:return!(ee.byteLength!=N.byteLength||!Me(new e(ee),new e(N)));case d:case g:case S:return t(+ee,+N);case b:return ee.name==N.name&&ee.message==N.message;case O:case U:return ee==N+"";case E:var xe=i;case k:var De=he&a;if(xe||(xe=s),ee.size!=N.size&&!De)return!1;var me=fe.get(ee);if(me)return me==N;he|=o,fe.set(ee,N);var at=r(xe(ee),xe(N),he,de,Me,fe);return fe.delete(ee),at;case z:if(X)return X.call(ee)==X.call(N)}return!1}return lM=Y,lM}var uM,ZP;function YN(){if(ZP)return uM;ZP=1;function n(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}return uM=n,uM}var AM,XP;function $N(){if(XP)return AM;XP=1;var n=YN(),e=Xh();function t(r,i,s){var a=i(r);return e(r)?a:n(a,s(r))}return AM=t,AM}var cM,JP;function Kue(){if(JP)return cM;JP=1;function n(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}return cM=n,cM}var dM,eR;function VN(){if(eR)return dM;eR=1;function n(){return[]}return dM=n,dM}var hM,tR;function L8(){if(tR)return hM;tR=1;var n=Kue(),e=VN(),t=Object.prototype,r=t.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(a){return a==null?[]:(a=Object(a),n(i(a),function(o){return r.call(a,o)}))}:e;return hM=s,hM}var fM,nR;function HN(){if(nR)return fM;nR=1;var n=$N(),e=L8(),t=n_();function r(i){return n(i,t,e)}return fM=r,fM}var pM,rR;function Fue(){if(rR)return pM;rR=1;var n=HN(),e=1,t=Object.prototype,r=t.hasOwnProperty;function i(s,a,o,d,g,b){var E=o&e,S=n(s),O=S.length,k=n(a),U=k.length;if(O!=U&&!E)return!1;for(var z=O;z--;){var q=S[z];if(!(E?q in a:r.call(a,q)))return!1}var Q=b.get(s),re=b.get(a);if(Q&&re)return Q==a&&re==s;var X=!0;b.set(s,a),b.set(a,s);for(var Y=E;++z<O;){q=S[z];var ee=s[q],N=a[q];if(d)var ie=E?d(N,ee,q,a,s,b):d(ee,N,q,s,a,b);if(!(ie===void 0?ee===N||g(ee,N,o,d,b):ie)){X=!1;break}Y||(Y=q=="constructor")}if(X&&!Y){var he=s.constructor,de=a.constructor;he!=de&&"constructor"in s&&"constructor"in a&&!(typeof he=="function"&&he instanceof he&&typeof de=="function"&&de instanceof de)&&(X=!1)}return b.delete(s),b.delete(a),X}return pM=i,pM}var mM,iR;function Lue(){if(iR)return mM;iR=1;var n=Gg(),e=pp(),t=n(e,"DataView");return mM=t,mM}var gM,oR;function Uue(){if(oR)return gM;oR=1;var n=Gg(),e=pp(),t=n(e,"Promise");return gM=t,gM}var yM,sR;function zue(){if(sR)return yM;sR=1;var n=Gg(),e=pp(),t=n(e,"Set");return yM=t,yM}var vM,aR;function jue(){if(aR)return vM;aR=1;var n=Gg(),e=pp(),t=n(e,"WeakMap");return vM=t,vM}var CM,lR;function o3(){if(lR)return CM;lR=1;var n=Lue(),e=K8(),t=Uue(),r=zue(),i=jue(),s=Wg(),a=GN(),o="[object Map]",d="[object Object]",g="[object Promise]",b="[object Set]",E="[object WeakMap]",S="[object DataView]",O=a(n),k=a(e),U=a(t),z=a(r),q=a(i),Q=s;return(n&&Q(new n(new ArrayBuffer(1)))!=S||e&&Q(new e)!=o||t&&Q(t.resolve())!=g||r&&Q(new r)!=b||i&&Q(new i)!=E)&&(Q=function(re){var X=s(re),Y=X==d?re.constructor:void 0,ee=Y?a(Y):"";if(ee)switch(ee){case O:return S;case k:return o;case U:return g;case z:return b;case q:return E}return X}),CM=Q,CM}var _M,uR;function Nue(){if(uR)return _M;uR=1;var n=i3(),e=QN(),t=Due(),r=Fue(),i=o3(),s=Xh(),a=Xx(),o=k8(),d=1,g="[object Arguments]",b="[object Array]",E="[object Object]",S=Object.prototype,O=S.hasOwnProperty;function k(U,z,q,Q,re,X){var Y=s(U),ee=s(z),N=Y?b:i(U),ie=ee?b:i(z);N=N==g?E:N,ie=ie==g?E:ie;var he=N==E,de=ie==E,Me=N==ie;if(Me&&a(U)){if(!a(z))return!1;Y=!0,he=!1}if(Me&&!he)return X||(X=new n),Y||o(U)?e(U,z,q,Q,re,X):t(U,z,N,q,Q,re,X);if(!(q&d)){var fe=he&&O.call(U,"__wrapped__"),xe=de&&O.call(z,"__wrapped__");if(fe||xe){var De=fe?U.value():U,me=xe?z.value():z;return X||(X=new n),re(De,me,q,Q,X)}}return Me?(X||(X=new n),r(U,z,q,Q,re,X)):!1}return _M=k,_M}var bM,AR;function ZN(){if(AR)return bM;AR=1;var n=Nue(),e=sm();function t(r,i,s,a,o){return r===i?!0:r==null||i==null||!e(r)&&!e(i)?r!==r&&i!==i:n(r,i,s,a,t,o)}return bM=t,bM}var xM,cR;function Wue(){if(cR)return xM;cR=1;var n=i3(),e=ZN(),t=1,r=2;function i(s,a,o,d){var g=o.length,b=g,E=!d;if(s==null)return!b;for(s=Object(s);g--;){var S=o[g];if(E&&S[2]?S[1]!==s[S[0]]:!(S[0]in s))return!1}for(;++g<b;){S=o[g];var O=S[0],k=s[O],U=S[1];if(E&&S[2]){if(k===void 0&&!(O in s))return!1}else{var z=new n;if(d)var q=d(k,U,O,s,a,z);if(!(q===void 0?e(U,k,t|r,d,z):q))return!1}}return!0}return xM=i,xM}var wM,dR;function XN(){if(dR)return wM;dR=1;var n=Tf();function e(t){return t===t&&!n(t)}return wM=e,wM}var MM,hR;function Gue(){if(hR)return MM;hR=1;var n=XN(),e=n_();function t(r){for(var i=e(r),s=i.length;s--;){var a=i[s],o=r[a];i[s]=[a,o,n(o)]}return i}return MM=t,MM}var SM,fR;function JN(){if(fR)return SM;fR=1;function n(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}return SM=n,SM}var EM,pR;function Que(){if(pR)return EM;pR=1;var n=Wue(),e=Gue(),t=JN();function r(i){var s=e(i);return s.length==1&&s[0][2]?t(s[0][0],s[0][1]):function(a){return a===i||n(a,i,s)}}return EM=r,EM}var BM,mR;function s3(){if(mR)return BM;mR=1;var n=Wg(),e=sm(),t="[object Symbol]";function r(i){return typeof i=="symbol"||e(i)&&n(i)==t}return BM=r,BM}var OM,gR;function U8(){if(gR)return OM;gR=1;var n=Xh(),e=s3(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,a){if(n(s))return!1;var o=typeof s;return o=="number"||o=="symbol"||o=="boolean"||s==null||e(s)?!0:r.test(s)||!t.test(s)||a!=null&&s in Object(a)}return OM=i,OM}var IM,yR;function que(){if(yR)return IM;yR=1;var n=F8(),e="Expected a function";function t(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var s=function(){var a=arguments,o=i?i.apply(this,a):a[0],d=s.cache;if(d.has(o))return d.get(o);var g=r.apply(this,a);return s.cache=d.set(o,g)||d,g};return s.cache=new(t.Cache||n),s}return t.Cache=n,IM=t,IM}var kM,vR;function Yue(){if(vR)return kM;vR=1;var n=que(),e=500;function t(r){var i=n(r,function(a){return s.size===e&&s.clear(),a}),s=i.cache;return i}return kM=t,kM}var TM,CR;function $ue(){if(CR)return TM;CR=1;var n=Yue(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t=/\\(\\)?/g,r=n(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(e,function(a,o,d,g){s.push(d?g.replace(t,"$1"):o||a)}),s});return TM=r,TM}var PM,_R;function Vue(){if(_R)return PM;_R=1;var n=t_(),e=WN(),t=Xh(),r=s3(),i=n?n.prototype:void 0,s=i?i.toString:void 0;function a(o){if(typeof o=="string")return o;if(t(o))return e(o,a)+"";if(r(o))return s?s.call(o):"";var d=o+"";return d=="0"&&1/o==-1/0?"-0":d}return PM=a,PM}var RM,bR;function Hue(){if(bR)return RM;bR=1;var n=Vue();function e(t){return t==null?"":n(t)}return RM=e,RM}var DM,xR;function eW(){if(xR)return DM;xR=1;var n=Xh(),e=U8(),t=$ue(),r=Hue();function i(s,a){return n(s)?s:e(s,a)?[s]:t(r(s))}return DM=i,DM}var KM,wR;function a3(){if(wR)return KM;wR=1;var n=s3();function e(t){if(typeof t=="string"||n(t))return t;var r=t+"";return r=="0"&&1/t==-1/0?"-0":r}return KM=e,KM}var FM,MR;function tW(){if(MR)return FM;MR=1;var n=eW(),e=a3();function t(r,i){i=n(i,r);for(var s=0,a=i.length;r!=null&&s<a;)r=r[e(i[s++])];return s&&s==a?r:void 0}return FM=t,FM}var LM,SR;function Zue(){if(SR)return LM;SR=1;var n=tW();function e(t,r,i){var s=t==null?void 0:n(t,r);return s===void 0?i:s}return LM=e,LM}var UM,ER;function Xue(){if(ER)return UM;ER=1;function n(e,t){return e!=null&&t in Object(e)}return UM=n,UM}var zM,BR;function Jue(){if(BR)return zM;BR=1;var n=eW(),e=S8(),t=Xh(),r=E8(),i=B8(),s=a3();function a(o,d,g){d=n(d,o);for(var b=-1,E=d.length,S=!1;++b<E;){var O=s(d[b]);if(!(S=o!=null&&g(o,O)))break;o=o[O]}return S||++b!=E?S:(E=o==null?0:o.length,!!E&&i(E)&&r(O,E)&&(t(o)||e(o)))}return zM=a,zM}var jM,OR;function eAe(){if(OR)return jM;OR=1;var n=Xue(),e=Jue();function t(r,i){return r!=null&&e(r,i,n)}return jM=t,jM}var NM,IR;function tAe(){if(IR)return NM;IR=1;var n=ZN(),e=Zue(),t=eAe(),r=U8(),i=XN(),s=JN(),a=a3(),o=1,d=2;function g(b,E){return r(b)&&i(E)?s(a(b),E):function(S){var O=e(S,b);return O===void 0&&O===E?t(S,b):n(E,O,o|d)}}return NM=g,NM}var WM,kR;function nAe(){if(kR)return WM;kR=1;function n(e){return function(t){return t==null?void 0:t[e]}}return WM=n,WM}var GM,TR;function rAe(){if(TR)return GM;TR=1;var n=tW();function e(t){return function(r){return n(r,t)}}return GM=e,GM}var QM,PR;function iAe(){if(PR)return QM;PR=1;var n=nAe(),e=rAe(),t=U8(),r=a3();function i(s){return t(s)?n(r(s)):e(s)}return QM=i,QM}var qM,RR;function oAe(){if(RR)return qM;RR=1;var n=Que(),e=tAe(),t=Jx(),r=Xh(),i=iAe();function s(a){return typeof a=="function"?a:a==null?t:typeof a=="object"?r(a)?e(a[0],a[1]):n(a):i(a)}return qM=s,qM}var YM,DR;function sAe(){if(DR)return YM;DR=1;var n=jy();function e(t,r){return function(i,s){if(i==null)return i;if(!n(i))return t(i,s);for(var a=i.length,o=r?a:-1,d=Object(i);(r?o--:++o<a)&&s(d[o],o,d)!==!1;);return i}}return YM=e,YM}var $M,KR;function nW(){if(KR)return $M;KR=1;var n=zN(),e=sAe(),t=e(n);return $M=t,$M}var VM,FR;function aAe(){if(FR)return VM;FR=1;var n=nW(),e=jy();function t(r,i){var s=-1,a=e(r)?Array(r.length):[];return n(r,function(o,d,g){a[++s]=i(o,d,g)}),a}return VM=t,VM}var HM,LR;function lAe(){if(LR)return HM;LR=1;var n=WN(),e=oAe(),t=aAe(),r=Xh();function i(s,a){var o=r(s)?n:t;return o(s,e(a,3))}return HM=i,HM}var UR;function uAe(){if(UR)return y1;UR=1,Object.defineProperty(y1,"__esModule",{value:!0}),y1.flattenNames=void 0;var n=$le(),e=d(n),t=R8(),r=d(t),i=NN(),s=d(i),a=lAe(),o=d(a);function d(b){return b&&b.__esModule?b:{default:b}}var g=y1.flattenNames=function b(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=[];return(0,o.default)(E,function(O){Array.isArray(O)?b(O).map(function(k){return S.push(k)}):(0,s.default)(O)?(0,r.default)(O,function(k,U){k===!0&&S.push(U),S.push(U+"-"+k)}):(0,e.default)(O)&&S.push(O)}),S};return y1.default=g,y1}var v1={},ZM,zR;function rW(){if(zR)return ZM;zR=1;function n(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}return ZM=n,ZM}var XM,jR;function iW(){if(jR)return XM;jR=1;var n=Gg(),e=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch{}}();return XM=e,XM}var JM,NR;function z8(){if(NR)return JM;NR=1;var n=iW();function e(t,r,i){r=="__proto__"&&n?n(t,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[r]=i}return JM=e,JM}var eS,WR;function oW(){if(WR)return eS;WR=1;var n=z8(),e=r_(),t=Object.prototype,r=t.hasOwnProperty;function i(s,a,o){var d=s[a];(!(r.call(s,a)&&e(d,o))||o===void 0&&!(a in s))&&n(s,a,o)}return eS=i,eS}var tS,GR;function i_(){if(GR)return tS;GR=1;var n=oW(),e=z8();function t(r,i,s,a){var o=!s;s||(s={});for(var d=-1,g=i.length;++d<g;){var b=i[d],E=a?a(s[b],r[b],b,s,r):void 0;E===void 0&&(E=r[b]),o?e(s,b,E):n(s,b,E)}return s}return tS=t,tS}var nS,QR;function AAe(){if(QR)return nS;QR=1;var n=i_(),e=n_();function t(r,i){return r&&n(i,e(i),r)}return nS=t,nS}var rS,qR;function cAe(){if(qR)return rS;qR=1;function n(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}return rS=n,rS}var iS,YR;function dAe(){if(YR)return iS;YR=1;var n=Tf(),e=T8(),t=cAe(),r=Object.prototype,i=r.hasOwnProperty;function s(a){if(!n(a))return t(a);var o=e(a),d=[];for(var g in a)g=="constructor"&&(o||!i.call(a,g))||d.push(g);return d}return iS=s,iS}var oS,$R;function o_(){if($R)return oS;$R=1;var n=LN(),e=dAe(),t=jy();function r(i){return t(i)?n(i,!0):e(i)}return oS=r,oS}var sS,VR;function hAe(){if(VR)return sS;VR=1;var n=i_(),e=o_();function t(r,i){return r&&n(i,e(i),r)}return sS=t,sS}var Dv={exports:{}};Dv.exports;var HR;function sW(){return HR||(HR=1,function(n,e){var t=pp(),r=e&&!e.nodeType&&e,i=r&&!0&&n&&!n.nodeType&&n,s=i&&i.exports===r,a=s?t.Buffer:void 0,o=a?a.allocUnsafe:void 0;function d(g,b){if(b)return g.slice();var E=g.length,S=o?o(E):new g.constructor(E);return g.copy(S),S}n.exports=d}(Dv,Dv.exports)),Dv.exports}var aS,ZR;function aW(){if(ZR)return aS;ZR=1;function n(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}return aS=n,aS}var lS,XR;function fAe(){if(XR)return lS;XR=1;var n=i_(),e=L8();function t(r,i){return n(r,e(r),i)}return lS=t,lS}var uS,JR;function lW(){if(JR)return uS;JR=1;var n=YN(),e=D8(),t=L8(),r=VN(),i=Object.getOwnPropertySymbols,s=i?function(a){for(var o=[];a;)n(o,t(a)),a=e(a);return o}:r;return uS=s,uS}var AS,eD;function pAe(){if(eD)return AS;eD=1;var n=i_(),e=lW();function t(r,i){return n(r,e(r),i)}return AS=t,AS}var cS,tD;function mAe(){if(tD)return cS;tD=1;var n=$N(),e=lW(),t=o_();function r(i){return n(i,t,e)}return cS=r,cS}var dS,nD;function gAe(){if(nD)return dS;nD=1;var n=Object.prototype,e=n.hasOwnProperty;function t(r){var i=r.length,s=new r.constructor(i);return i&&typeof r[0]=="string"&&e.call(r,"index")&&(s.index=r.index,s.input=r.input),s}return dS=t,dS}var hS,rD;function j8(){if(rD)return hS;rD=1;var n=qN();function e(t){var r=new t.constructor(t.byteLength);return new n(r).set(new n(t)),r}return hS=e,hS}var fS,iD;function yAe(){if(iD)return fS;iD=1;var n=j8();function e(t,r){var i=r?n(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}return fS=e,fS}var pS,oD;function vAe(){if(oD)return pS;oD=1;var n=/\w*$/;function e(t){var r=new t.constructor(t.source,n.exec(t));return r.lastIndex=t.lastIndex,r}return pS=e,pS}var mS,sD;function CAe(){if(sD)return mS;sD=1;var n=t_(),e=n?n.prototype:void 0,t=e?e.valueOf:void 0;function r(i){return t?Object(t.call(i)):{}}return mS=r,mS}var gS,aD;function uW(){if(aD)return gS;aD=1;var n=j8();function e(t,r){var i=r?n(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}return gS=e,gS}var yS,lD;function _Ae(){if(lD)return yS;lD=1;var n=j8(),e=yAe(),t=vAe(),r=CAe(),i=uW(),s="[object Boolean]",a="[object Date]",o="[object Map]",d="[object Number]",g="[object RegExp]",b="[object Set]",E="[object String]",S="[object Symbol]",O="[object ArrayBuffer]",k="[object DataView]",U="[object Float32Array]",z="[object Float64Array]",q="[object Int8Array]",Q="[object Int16Array]",re="[object Int32Array]",X="[object Uint8Array]",Y="[object Uint8ClampedArray]",ee="[object Uint16Array]",N="[object Uint32Array]";function ie(he,de,Me){var fe=he.constructor;switch(de){case O:return n(he);case s:case a:return new fe(+he);case k:return e(he,Me);case U:case z:case q:case Q:case re:case X:case Y:case ee:case N:return i(he,Me);case o:return new fe;case d:case E:return new fe(he);case g:return t(he);case b:return new fe;case S:return r(he)}}return yS=ie,yS}var vS,uD;function bAe(){if(uD)return vS;uD=1;var n=Tf(),e=Object.create,t=function(){function r(){}return function(i){if(!n(i))return{};if(e)return e(i);r.prototype=i;var s=new r;return r.prototype=void 0,s}}();return vS=t,vS}var CS,AD;function AW(){if(AD)return CS;AD=1;var n=bAe(),e=D8(),t=T8();function r(i){return typeof i.constructor=="function"&&!t(i)?n(e(i)):{}}return CS=r,CS}var _S,cD;function xAe(){if(cD)return _S;cD=1;var n=o3(),e=sm(),t="[object Map]";function r(i){return e(i)&&n(i)==t}return _S=r,_S}var bS,dD;function wAe(){if(dD)return bS;dD=1;var n=xAe(),e=O8(),t=I8(),r=t&&t.isMap,i=r?e(r):n;return bS=i,bS}var xS,hD;function MAe(){if(hD)return xS;hD=1;var n=o3(),e=sm(),t="[object Set]";function r(i){return e(i)&&n(i)==t}return xS=r,xS}var wS,fD;function SAe(){if(fD)return wS;fD=1;var n=MAe(),e=O8(),t=I8(),r=t&&t.isSet,i=r?e(r):n;return wS=i,wS}var MS,pD;function EAe(){if(pD)return MS;pD=1;var n=i3(),e=rW(),t=oW(),r=AAe(),i=hAe(),s=sW(),a=aW(),o=fAe(),d=pAe(),g=HN(),b=mAe(),E=o3(),S=gAe(),O=_Ae(),k=AW(),U=Xh(),z=Xx(),q=wAe(),Q=Tf(),re=SAe(),X=n_(),Y=o_(),ee=1,N=2,ie=4,he="[object Arguments]",de="[object Array]",Me="[object Boolean]",fe="[object Date]",xe="[object Error]",De="[object Function]",me="[object GeneratorFunction]",at="[object Map]",Qe="[object Number]",He="[object Object]",We="[object RegExp]",Ce="[object Set]",Te="[object String]",rt="[object Symbol]",yt="[object WeakMap]",bt="[object ArrayBuffer]",gt="[object DataView]",Dt="[object Float32Array]",Pt="[object Float64Array]",Le="[object Int8Array]",Pe="[object Int16Array]",Ee="[object Int32Array]",nt="[object Uint8Array]",_t="[object Uint8ClampedArray]",ht="[object Uint16Array]",Ut="[object Uint32Array]",en={};en[he]=en[de]=en[bt]=en[gt]=en[Me]=en[fe]=en[Dt]=en[Pt]=en[Le]=en[Pe]=en[Ee]=en[at]=en[Qe]=en[He]=en[We]=en[Ce]=en[Te]=en[rt]=en[nt]=en[_t]=en[ht]=en[Ut]=!0,en[xe]=en[De]=en[yt]=!1;function Ft(mn,jn,nn,ir,Dn,fn){var Hn,wr=jn&ee,Qn=jn&N,Xn=jn&ie;if(nn&&(Hn=Dn?nn(mn,ir,Dn,fn):nn(mn)),Hn!==void 0)return Hn;if(!Q(mn))return mn;var Ge=U(mn);if(Ge){if(Hn=S(mn),!wr)return a(mn,Hn)}else{var Ae=E(mn),pe=Ae==De||Ae==me;if(z(mn))return s(mn,wr);if(Ae==He||Ae==he||pe&&!Dn){if(Hn=Qn||pe?{}:k(mn),!wr)return Qn?d(mn,i(Hn,mn)):o(mn,r(Hn,mn))}else{if(!en[Ae])return Dn?mn:{};Hn=O(mn,Ae,wr)}}fn||(fn=new n);var et=fn.get(mn);if(et)return et;fn.set(mn,Hn),re(mn)?mn.forEach(function(rn){Hn.add(Ft(rn,jn,nn,rn,mn,fn))}):q(mn)&&mn.forEach(function(rn,er){Hn.set(er,Ft(rn,jn,nn,er,mn,fn))});var St=Xn?Qn?b:g:Qn?Y:X,Yt=Ge?void 0:St(mn);return e(Yt||mn,function(rn,er){Yt&&(er=rn,rn=mn[er]),t(Hn,er,Ft(rn,jn,nn,er,mn,fn))}),Hn}return MS=Ft,MS}var SS,mD;function BAe(){if(mD)return SS;mD=1;var n=EAe(),e=1,t=4;function r(i){return n(i,e|t)}return SS=r,SS}var gD;function OAe(){if(gD)return v1;gD=1,Object.defineProperty(v1,"__esModule",{value:!0}),v1.mergeClasses=void 0;var n=R8(),e=s(n),t=BAe(),r=s(t),i=Object.assign||function(o){for(var d=1;d<arguments.length;d++){var g=arguments[d];for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(o[b]=g[b])}return o};function s(o){return o&&o.__esModule?o:{default:o}}var a=v1.mergeClasses=function(d){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=d.default&&(0,r.default)(d.default)||{};return g.map(function(E){var S=d[E];return S&&(0,e.default)(S,function(O,k){b[k]||(b[k]={}),b[k]=i({},b[k],S[k])}),E}),b};return v1.default=a,v1}var C1={},yD;function IAe(){if(yD)return C1;yD=1,Object.defineProperty(C1,"__esModule",{value:!0}),C1.autoprefix=void 0;var n=R8(),e=r(n),t=Object.assign||function(a){for(var o=1;o<arguments.length;o++){var d=arguments[o];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(a[g]=d[g])}return a};function r(a){return a&&a.__esModule?a:{default:a}}var i={borderRadius:function(o){return{msBorderRadius:o,MozBorderRadius:o,OBorderRadius:o,WebkitBorderRadius:o,borderRadius:o}},boxShadow:function(o){return{msBoxShadow:o,MozBoxShadow:o,OBoxShadow:o,WebkitBoxShadow:o,boxShadow:o}},userSelect:function(o){return{WebkitTouchCallout:o,KhtmlUserSelect:o,MozUserSelect:o,msUserSelect:o,WebkitUserSelect:o,userSelect:o}},flex:function(o){return{WebkitBoxFlex:o,MozBoxFlex:o,WebkitFlex:o,msFlex:o,flex:o}},flexBasis:function(o){return{WebkitFlexBasis:o,flexBasis:o}},justifyContent:function(o){return{WebkitJustifyContent:o,justifyContent:o}},transition:function(o){return{msTransition:o,MozTransition:o,OTransition:o,WebkitTransition:o,transition:o}},transform:function(o){return{msTransform:o,MozTransform:o,OTransform:o,WebkitTransform:o,transform:o}},absolute:function(o){var d=o&&o.split(" ");return{position:"absolute",top:d&&d[0],right:d&&d[1],bottom:d&&d[2],left:d&&d[3]}},extend:function(o,d){var g=d[o];return g||{extend:o}}},s=C1.autoprefix=function(o){var d={};return(0,e.default)(o,function(g,b){var E={};(0,e.default)(g,function(S,O){var k=i[O];k?E=t({},E,k(S)):E[O]=S}),d[b]=E}),d};return C1.default=s,C1}var _1={},vD;function kAe(){if(vD)return _1;vD=1,Object.defineProperty(_1,"__esModule",{value:!0}),_1.hover=void 0;var n=Object.assign||function(d){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(d[E]=b[E])}return d},e=Fa(),t=r(e);function r(d){return d&&d.__esModule?d:{default:d}}function i(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")}function s(d,g){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:d}function a(d,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);d.prototype=Object.create(g&&g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(d,g):d.__proto__=g)}var o=_1.hover=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(E){a(S,E);function S(){var O,k,U,z;i(this,S);for(var q=arguments.length,Q=Array(q),re=0;re<q;re++)Q[re]=arguments[re];return z=(k=(U=s(this,(O=S.__proto__||Object.getPrototypeOf(S)).call.apply(O,[this].concat(Q))),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 t.default.createElement(b,{onMouseOver:U.handleMouseOver,onMouseOut:U.handleMouseOut},t.default.createElement(g,n({},U.props,U.state)))},k),s(U,z)}return S}(t.default.Component)};return _1.default=o,_1}var b1={},CD;function TAe(){if(CD)return b1;CD=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.active=void 0;var n=Object.assign||function(d){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(d[E]=b[E])}return d},e=Fa(),t=r(e);function r(d){return d&&d.__esModule?d:{default:d}}function i(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")}function s(d,g){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:d}function a(d,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);d.prototype=Object.create(g&&g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(d,g):d.__proto__=g)}var o=b1.active=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(E){a(S,E);function S(){var O,k,U,z;i(this,S);for(var q=arguments.length,Q=Array(q),re=0;re<q;re++)Q[re]=arguments[re];return z=(k=(U=s(this,(O=S.__proto__||Object.getPrototypeOf(S)).call.apply(O,[this].concat(Q))),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 t.default.createElement(b,{onMouseDown:U.handleMouseDown,onMouseUp:U.handleMouseUp},t.default.createElement(g,n({},U.props,U.state)))},k),s(U,z)}return S}(t.default.Component)};return b1.default=o,b1}var Ab={},_D;function PAe(){if(_D)return Ab;_D=1,Object.defineProperty(Ab,"__esModule",{value:!0});var n=function(t,r){var i={},s=function(o){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i[o]=d};return t===0&&s("first-child"),t===r-1&&s("last-child"),(t===0||t%2===0)&&s("even"),Math.abs(t%2)===1&&s("odd"),s("nth-child",t),i};return Ab.default=n,Ab}var bD;function mp(){if(bD)return hh;bD=1,Object.defineProperty(hh,"__esModule",{value:!0}),hh.ReactCSS=hh.loop=hh.handleActive=hh.handleHover=hh.hover=void 0;var n=uAe(),e=S(n),t=OAe(),r=S(t),i=IAe(),s=S(i),a=kAe(),o=S(a),d=TAe(),g=S(d),b=PAe(),E=S(b);function S(k){return k&&k.__esModule?k:{default:k}}hh.hover=o.default,hh.handleHover=o.default,hh.handleActive=g.default,hh.loop=E.default;var O=hh.ReactCSS=function(U){for(var z=arguments.length,q=Array(z>1?z-1:0),Q=1;Q<z;Q++)q[Q-1]=arguments[Q];var re=(0,e.default)(q),X=(0,r.default)(U,re);return(0,s.default)(X)};return hh.default=O,hh}var ES,xD;function cW(){if(xD)return ES;xD=1;var n=z8(),e=r_();function t(r,i,s){(s!==void 0&&!e(r[i],s)||s===void 0&&!(i in r))&&n(r,i,s)}return ES=t,ES}var BS,wD;function RAe(){if(wD)return BS;wD=1;var n=jy(),e=sm();function t(r){return e(r)&&n(r)}return BS=t,BS}var OS,MD;function dW(){if(MD)return OS;MD=1;function n(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}return OS=n,OS}var IS,SD;function DAe(){if(SD)return IS;SD=1;var n=i_(),e=o_();function t(r){return n(r,e(r))}return IS=t,IS}var kS,ED;function KAe(){if(ED)return kS;ED=1;var n=cW(),e=sW(),t=uW(),r=aW(),i=AW(),s=S8(),a=Xh(),o=RAe(),d=Xx(),g=P8(),b=Tf(),E=NN(),S=k8(),O=dW(),k=DAe();function U(z,q,Q,re,X,Y,ee){var N=O(z,Q),ie=O(q,Q),he=ee.get(ie);if(he){n(z,Q,he);return}var de=Y?Y(N,ie,Q+"",z,q,ee):void 0,Me=de===void 0;if(Me){var fe=a(ie),xe=!fe&&d(ie),De=!fe&&!xe&&S(ie);de=ie,fe||xe||De?a(N)?de=N:o(N)?de=r(N):xe?(Me=!1,de=e(ie,!0)):De?(Me=!1,de=t(ie,!0)):de=[]:E(ie)||s(ie)?(de=N,s(N)?de=k(N):(!b(N)||g(N))&&(de=i(ie))):Me=!1}Me&&(ee.set(ie,de),X(de,ie,re,Y,ee),ee.delete(ie)),n(z,Q,de)}return kS=U,kS}var TS,BD;function FAe(){if(BD)return TS;BD=1;var n=i3(),e=cW(),t=FN(),r=KAe(),i=Tf(),s=o_(),a=dW();function o(d,g,b,E,S){d!==g&&t(g,function(O,k){if(S||(S=new n),i(O))r(d,g,k,b,o,E,S);else{var U=E?E(a(d,k),O,k+"",d,g,S):void 0;U===void 0&&(U=O),e(d,k,U)}},s)}return TS=o,TS}var PS,OD;function LAe(){if(OD)return PS;OD=1;function n(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}return PS=n,PS}var RS,ID;function UAe(){if(ID)return RS;ID=1;var n=LAe(),e=Math.max;function t(r,i,s){return i=e(i===void 0?r.length-1:i,0),function(){for(var a=arguments,o=-1,d=e(a.length-i,0),g=Array(d);++o<d;)g[o]=a[i+o];o=-1;for(var b=Array(i+1);++o<i;)b[o]=a[o];return b[i]=s(g),n(r,this,b)}}return RS=t,RS}var DS,kD;function zAe(){if(kD)return DS;kD=1;function n(e){return function(){return e}}return DS=n,DS}var KS,TD;function jAe(){if(TD)return KS;TD=1;var n=zAe(),e=iW(),t=Jx(),r=e?function(i,s){return e(i,"toString",{configurable:!0,enumerable:!1,value:n(s),writable:!0})}:t;return KS=r,KS}var FS,PD;function NAe(){if(PD)return FS;PD=1;var n=800,e=16,t=Date.now;function r(i){var s=0,a=0;return function(){var o=t(),d=e-(o-a);if(a=o,d>0){if(++s>=n)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return FS=r,FS}var LS,RD;function WAe(){if(RD)return LS;RD=1;var n=jAe(),e=NAe(),t=e(n);return LS=t,LS}var US,DD;function GAe(){if(DD)return US;DD=1;var n=Jx(),e=UAe(),t=WAe();function r(i,s){return t(e(i,s,n),i+"")}return US=r,US}var zS,KD;function QAe(){if(KD)return zS;KD=1;var n=r_(),e=jy(),t=E8(),r=Tf();function i(s,a,o){if(!r(o))return!1;var d=typeof a;return(d=="number"?e(o)&&t(a,o.length):d=="string"&&a in o)?n(o[a],s):!1}return zS=i,zS}var jS,FD;function qAe(){if(FD)return jS;FD=1;var n=GAe(),e=QAe();function t(r){return n(function(i,s){var a=-1,o=s.length,d=o>1?s[o-1]:void 0,g=o>2?s[2]:void 0;for(d=r.length>3&&typeof d=="function"?(o--,d):void 0,g&&e(s[0],s[1],g)&&(d=o<3?void 0:d,o=1),i=Object(i);++a<o;){var b=s[a];b&&r(i,b,a,d)}return i})}return jS=t,jS}var NS,LD;function hW(){if(LD)return NS;LD=1;var n=FAe(),e=qAe(),t=e(function(r,i,s){n(r,i,s)});return NS=t,NS}var WS={},x1={},cb={},UD;function YAe(){return UD||(UD=1,Object.defineProperty(cb,"__esModule",{value:!0}),cb.calculateChange=function(e,t,r,i,s){var a=s.clientWidth,o=s.clientHeight,d=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,g=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,b=d-(s.getBoundingClientRect().left+window.pageXOffset),E=g-(s.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var S=void 0;if(E<0?S=0:E>o?S=1:S=Math.round(E*100/o)/100,t.a!==S)return{h:t.h,s:t.s,l:t.l,a:S,source:"rgb"}}else{var O=void 0;if(b<0?O=0:b>a?O=1:O=Math.round(b*100/a)/100,i!==O)return{h:t.h,s:t.s,l:t.l,a:O,source:"rgb"}}return null}),cb}var w1={},pv={},zD;function $Ae(){if(zD)return pv;zD=1,Object.defineProperty(pv,"__esModule",{value:!0});var n={},e=pv.render=function(r,i,s,a){if(typeof document>"u"&&!a)return null;var o=a?new a:document.createElement("canvas");o.width=s*2,o.height=s*2;var d=o.getContext("2d");return d?(d.fillStyle=r,d.fillRect(0,0,o.width,o.height),d.fillStyle=i,d.fillRect(0,0,s,s),d.translate(s,s),d.fillRect(0,0,s,s),o.toDataURL()):null};return pv.get=function(r,i,s,a){var o=r+"-"+i+"-"+s+(a?"-server":"");if(n[o])return n[o];var d=e(r,i,s,a);return n[o]=d,d},pv}var jD;function N8(){if(jD)return w1;jD=1,Object.defineProperty(w1,"__esModule",{value:!0}),w1.Checkboard=void 0;var n=Object.assign||function(b){for(var E=1;E<arguments.length;E++){var S=arguments[E];for(var O in S)Object.prototype.hasOwnProperty.call(S,O)&&(b[O]=S[O])}return b},e=Fa(),t=d(e),r=mp(),i=d(r),s=$Ae(),a=o(s);function o(b){if(b&&b.__esModule)return b;var E={};if(b!=null)for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(E[S]=b[S]);return E.default=b,E}function d(b){return b&&b.__esModule?b:{default:b}}var g=w1.Checkboard=function(E){var S=E.white,O=E.grey,k=E.size,U=E.renderers,z=E.borderRadius,q=E.boxShadow,Q=E.children,re=(0,i.default)({default:{grid:{borderRadius:z,boxShadow:q,absolute:"0px 0px 0px 0px",background:"url("+a.get(S,O,k,U.canvas)+") center left"}}});return(0,e.isValidElement)(Q)?t.default.cloneElement(Q,n({},Q.props,{style:n({},Q.props.style,re.grid)})):t.default.createElement("div",{style:re.grid})};return g.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},w1.default=g,w1}var ND;function VAe(){if(ND)return x1;ND=1,Object.defineProperty(x1,"__esModule",{value:!0}),x1.Alpha=void 0;var n=Object.assign||function(z){for(var q=1;q<arguments.length;q++){var Q=arguments[q];for(var re in Q)Object.prototype.hasOwnProperty.call(Q,re)&&(z[re]=Q[re])}return z},e=function(){function z(q,Q){for(var re=0;re<Q.length;re++){var X=Q[re];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(q,X.key,X)}}return function(q,Q,re){return Q&&z(q.prototype,Q),re&&z(q,re),q}}(),t=Fa(),r=E(t),i=mp(),s=E(i),a=YAe(),o=b(a),d=N8(),g=E(d);function b(z){if(z&&z.__esModule)return z;var q={};if(z!=null)for(var Q in z)Object.prototype.hasOwnProperty.call(z,Q)&&(q[Q]=z[Q]);return q.default=z,q}function E(z){return z&&z.__esModule?z:{default:z}}function S(z,q){if(!(z instanceof q))throw new TypeError("Cannot call a class as a function")}function O(z,q){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q&&(typeof q=="object"||typeof q=="function")?q:z}function k(z,q){if(typeof q!="function"&&q!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof q);z.prototype=Object.create(q&&q.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),q&&(Object.setPrototypeOf?Object.setPrototypeOf(z,q):z.__proto__=q)}var U=x1.Alpha=function(z){k(q,z);function q(){var Q,re,X,Y;S(this,q);for(var ee=arguments.length,N=Array(ee),ie=0;ie<ee;ie++)N[ie]=arguments[ie];return Y=(re=(X=O(this,(Q=q.__proto__||Object.getPrototypeOf(q)).call.apply(Q,[this].concat(N))),X),X.handleChange=function(he){var de=o.calculateChange(he,X.props.hsl,X.props.direction,X.props.a,X.container);de&&typeof X.props.onChange=="function"&&X.props.onChange(de,he)},X.handleMouseDown=function(he){X.handleChange(he),window.addEventListener("mousemove",X.handleChange),window.addEventListener("mouseup",X.handleMouseUp)},X.handleMouseUp=function(){X.unbindEventListeners()},X.unbindEventListeners=function(){window.removeEventListener("mousemove",X.handleChange),window.removeEventListener("mouseup",X.handleMouseUp)},re),O(X,Y)}return e(q,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var re=this,X=this.props.rgb,Y=(0,s.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("+X.r+","+X.g+","+X.b+`, 0) 0%,
|
||
rgba(`+X.r+","+X.g+","+X.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:X.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("+X.r+","+X.g+","+X.b+`, 0) 0%,
|
||
rgba(`+X.r+","+X.g+","+X.b+", 1) 100%)"},pointer:{left:0,top:X.a*100+"%"}},overwrite:n({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return r.default.createElement("div",{style:Y.alpha},r.default.createElement("div",{style:Y.checkboard},r.default.createElement(g.default,{renderers:this.props.renderers})),r.default.createElement("div",{style:Y.gradient}),r.default.createElement("div",{style:Y.container,ref:function(N){return re.container=N},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.default.createElement("div",{style:Y.pointer},this.props.pointer?r.default.createElement(this.props.pointer,this.props):r.default.createElement("div",{style:Y.slider}))))}}]),q}(t.PureComponent||t.Component);return x1.default=U,x1}var M1={},WD;function HAe(){if(WD)return M1;WD=1,Object.defineProperty(M1,"__esModule",{value:!0}),M1.EditableInput=void 0;var n=function(){function Q(re,X){for(var Y=0;Y<X.length;Y++){var ee=X[Y];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(re,ee.key,ee)}}return function(re,X,Y){return X&&Q(re.prototype,X),Y&&Q(re,Y),re}}(),e=Fa(),t=s(e),r=mp(),i=s(r);function s(Q){return Q&&Q.__esModule?Q:{default:Q}}function a(Q,re,X){return re in Q?Object.defineProperty(Q,re,{value:X,enumerable:!0,configurable:!0,writable:!0}):Q[re]=X,Q}function o(Q,re){if(!(Q instanceof re))throw new TypeError("Cannot call a class as a function")}function d(Q,re){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:Q}function g(Q,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);Q.prototype=Object.create(re&&re.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,re):Q.__proto__=re)}var b=1,E=38,S=40,O=[E,S],k=function(re){return O.indexOf(re)>-1},U=function(re){return Number(String(re).replace(/%/g,""))},z=1,q=M1.EditableInput=function(Q){g(re,Q);function re(X){o(this,re);var Y=d(this,(re.__proto__||Object.getPrototypeOf(re)).call(this));return Y.handleBlur=function(){Y.state.blurValue&&Y.setState({value:Y.state.blurValue,blurValue:null})},Y.handleChange=function(ee){Y.setUpdatedValue(ee.target.value,ee)},Y.handleKeyDown=function(ee){var N=U(ee.target.value);if(!isNaN(N)&&k(ee.keyCode)){var ie=Y.getArrowOffset(),he=ee.keyCode===E?N+ie:N-ie;Y.setUpdatedValue(he,ee)}},Y.handleDrag=function(ee){if(Y.props.dragLabel){var N=Math.round(Y.props.value+ee.movementX);N>=0&&N<=Y.props.dragMax&&Y.props.onChange&&Y.props.onChange(Y.getValueObjectWithLabel(N),ee)}},Y.handleMouseDown=function(ee){Y.props.dragLabel&&(ee.preventDefault(),Y.handleDrag(ee),window.addEventListener("mousemove",Y.handleDrag),window.addEventListener("mouseup",Y.handleMouseUp))},Y.handleMouseUp=function(){Y.unbindEventListeners()},Y.unbindEventListeners=function(){window.removeEventListener("mousemove",Y.handleDrag),window.removeEventListener("mouseup",Y.handleMouseUp)},Y.state={value:String(X.value).toUpperCase(),blurValue:String(X.value).toUpperCase()},Y.inputId="rc-editable-input-"+z++,Y}return n(re,[{key:"componentDidUpdate",value:function(Y,ee){this.props.value!==this.state.value&&(Y.value!==this.props.value||ee.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(Y){return a({},this.props.label,Y)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||b}},{key:"setUpdatedValue",value:function(Y,ee){var N=this.props.label?this.getValueObjectWithLabel(Y):Y;this.props.onChange&&this.props.onChange(N,ee),this.setState({value:Y})}},{key:"render",value:function(){var Y=this,ee=(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 t.default.createElement("div",{style:ee.wrap},t.default.createElement("input",{id:this.inputId,style:ee.input,ref:function(ie){return Y.input=ie},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?t.default.createElement("label",{htmlFor:this.inputId,style:ee.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),re}(e.PureComponent||e.Component);return M1.default=q,M1}var S1={},db={},GD;function ZAe(){return GD||(GD=1,Object.defineProperty(db,"__esModule",{value:!0}),db.calculateChange=function(e,t,r,i){var s=i.clientWidth,a=i.clientHeight,o=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,d=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,g=o-(i.getBoundingClientRect().left+window.pageXOffset),b=d-(i.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var E=void 0;if(b<0)E=359;else if(b>a)E=0;else{var S=-(b*100/a)+100;E=360*S/100}if(r.h!==E)return{h:E,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var O=void 0;if(g<0)O=0;else if(g>s)O=359;else{var k=g*100/s;O=360*k/100}if(r.h!==O)return{h:O,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}),db}var QD;function XAe(){if(QD)return S1;QD=1,Object.defineProperty(S1,"__esModule",{value:!0}),S1.Hue=void 0;var n=function(){function O(k,U){for(var z=0;z<U.length;z++){var q=U[z];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(k,q.key,q)}}return function(k,U,z){return U&&O(k.prototype,U),z&&O(k,z),k}}(),e=Fa(),t=d(e),r=mp(),i=d(r),s=ZAe(),a=o(s);function o(O){if(O&&O.__esModule)return O;var k={};if(O!=null)for(var U in O)Object.prototype.hasOwnProperty.call(O,U)&&(k[U]=O[U]);return k.default=O,k}function d(O){return O&&O.__esModule?O:{default:O}}function g(O,k){if(!(O instanceof k))throw new TypeError("Cannot call a class as a function")}function b(O,k){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:O}function E(O,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);O.prototype=Object.create(k&&k.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(O,k):O.__proto__=k)}var S=S1.Hue=function(O){E(k,O);function k(){var U,z,q,Q;g(this,k);for(var re=arguments.length,X=Array(re),Y=0;Y<re;Y++)X[Y]=arguments[Y];return Q=(z=(q=b(this,(U=k.__proto__||Object.getPrototypeOf(k)).call.apply(U,[this].concat(X))),q),q.handleChange=function(ee){var N=a.calculateChange(ee,q.props.direction,q.props.hsl,q.container);N&&typeof q.props.onChange=="function"&&q.props.onChange(N,ee)},q.handleMouseDown=function(ee){q.handleChange(ee),window.addEventListener("mousemove",q.handleChange),window.addEventListener("mouseup",q.handleMouseUp)},q.handleMouseUp=function(){q.unbindEventListeners()},z),b(q,Q)}return n(k,[{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 z=this,q=this.props.direction,Q=q===void 0?"horizontal":q,re=(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:Q==="vertical"});return t.default.createElement("div",{style:re.hue},t.default.createElement("div",{className:"hue-"+Q,style:re.container,ref:function(Y){return z.container=Y},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.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%);
|
||
}
|
||
`),t.default.createElement("div",{style:re.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:re.slider}))))}}]),k}(e.PureComponent||e.Component);return S1.default=S,S1}var E1={},qD;function JAe(){if(qD)return E1;qD=1,Object.defineProperty(E1,"__esModule",{value:!0}),E1.Raised=void 0;var n=Fa(),e=d(n),t=dp(),r=d(t),i=mp(),s=d(i),a=hW(),o=d(a);function d(b){return b&&b.__esModule?b:{default:b}}var g=E1.Raised=function(E){var S=E.zDepth,O=E.radius,k=E.background,U=E.children,z=E.styles,q=z===void 0?{}:z,Q=(0,s.default)((0,o.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:O,background:k}},"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 e.default.createElement("div",{style:Q.wrap},e.default.createElement("div",{style:Q.bg}),e.default.createElement("div",{style:Q.content},U))};return g.propTypes={background:r.default.string,zDepth:r.default.oneOf([0,1,2,3,4,5]),radius:r.default.number,styles:r.default.object},g.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},E1.default=g,E1}var B1={},GS,YD;function ece(){if(YD)return GS;YD=1;var n=pp(),e=function(){return n.Date.now()};return GS=e,GS}var QS,$D;function tce(){if($D)return QS;$D=1;var n=/\s/;function e(t){for(var r=t.length;r--&&n.test(t.charAt(r)););return r}return QS=e,QS}var qS,VD;function nce(){if(VD)return qS;VD=1;var n=tce(),e=/^\s+/;function t(r){return r&&r.slice(0,n(r)+1).replace(e,"")}return qS=t,qS}var YS,HD;function rce(){if(HD)return YS;HD=1;var n=nce(),e=Tf(),t=s3(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt;function d(g){if(typeof g=="number")return g;if(t(g))return r;if(e(g)){var b=typeof g.valueOf=="function"?g.valueOf():g;g=e(b)?b+"":b}if(typeof g!="string")return g===0?g:+g;g=n(g);var E=s.test(g);return E||a.test(g)?o(g.slice(2),E?2:8):i.test(g)?r:+g}return YS=d,YS}var $S,ZD;function fW(){if(ZD)return $S;ZD=1;var n=Tf(),e=ece(),t=rce(),r="Expected a function",i=Math.max,s=Math.min;function a(o,d,g){var b,E,S,O,k,U,z=0,q=!1,Q=!1,re=!0;if(typeof o!="function")throw new TypeError(r);d=t(d)||0,n(g)&&(q=!!g.leading,Q="maxWait"in g,S=Q?i(t(g.maxWait)||0,d):S,re="trailing"in g?!!g.trailing:re);function X(xe){var De=b,me=E;return b=E=void 0,z=xe,O=o.apply(me,De),O}function Y(xe){return z=xe,k=setTimeout(ie,d),q?X(xe):O}function ee(xe){var De=xe-U,me=xe-z,at=d-De;return Q?s(at,S-me):at}function N(xe){var De=xe-U,me=xe-z;return U===void 0||De>=d||De<0||Q&&me>=S}function ie(){var xe=e();if(N(xe))return he(xe);k=setTimeout(ie,ee(xe))}function he(xe){return k=void 0,re&&b?X(xe):(b=E=void 0,O)}function de(){k!==void 0&&clearTimeout(k),z=0,b=U=E=k=void 0}function Me(){return k===void 0?O:he(e())}function fe(){var xe=e(),De=N(xe);if(b=arguments,E=this,U=xe,De){if(k===void 0)return Y(U);if(Q)return clearTimeout(k),k=setTimeout(ie,d),X(U)}return k===void 0&&(k=setTimeout(ie,d)),O}return fe.cancel=de,fe.flush=Me,fe}return $S=a,$S}var VS,XD;function ice(){if(XD)return VS;XD=1;var n=fW(),e=Tf(),t="Expected a function";function r(i,s,a){var o=!0,d=!0;if(typeof i!="function")throw new TypeError(t);return e(a)&&(o="leading"in a?!!a.leading:o,d="trailing"in a?!!a.trailing:d),n(i,s,{leading:o,maxWait:s,trailing:d})}return VS=r,VS}var hb={},JD;function oce(){return JD||(JD=1,Object.defineProperty(hb,"__esModule",{value:!0}),hb.calculateChange=function(e,t,r){var i=r.getBoundingClientRect(),s=i.width,a=i.height,o=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,d=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,g=o-(r.getBoundingClientRect().left+window.pageXOffset),b=d-(r.getBoundingClientRect().top+window.pageYOffset);g<0?g=0:g>s&&(g=s),b<0?b=0:b>a&&(b=a);var E=g/s,S=1-b/a;return{h:t.h,s:E,v:S,a:t.a,source:"hsv"}}),hb}var eK;function sce(){if(eK)return B1;eK=1,Object.defineProperty(B1,"__esModule",{value:!0}),B1.Saturation=void 0;var n=function(){function U(z,q){for(var Q=0;Q<q.length;Q++){var re=q[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(z,re.key,re)}}return function(z,q,Q){return q&&U(z.prototype,q),Q&&U(z,Q),z}}(),e=Fa(),t=b(e),r=mp(),i=b(r),s=ice(),a=b(s),o=oce(),d=g(o);function g(U){if(U&&U.__esModule)return U;var z={};if(U!=null)for(var q in U)Object.prototype.hasOwnProperty.call(U,q)&&(z[q]=U[q]);return z.default=U,z}function b(U){return U&&U.__esModule?U:{default:U}}function E(U,z){if(!(U instanceof z))throw new TypeError("Cannot call a class as a function")}function S(U,z){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z&&(typeof z=="object"||typeof z=="function")?z:U}function O(U,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof z);U.prototype=Object.create(z&&z.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),z&&(Object.setPrototypeOf?Object.setPrototypeOf(U,z):U.__proto__=z)}var k=B1.Saturation=function(U){O(z,U);function z(q){E(this,z);var Q=S(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,q));return Q.handleChange=function(re){typeof Q.props.onChange=="function"&&Q.throttle(Q.props.onChange,d.calculateChange(re,Q.props.hsl,Q.container),re)},Q.handleMouseDown=function(re){Q.handleChange(re);var X=Q.getContainerRenderWindow();X.addEventListener("mousemove",Q.handleChange),X.addEventListener("mouseup",Q.handleMouseUp)},Q.handleMouseUp=function(){Q.unbindEventListeners()},Q.throttle=(0,a.default)(function(re,X,Y){re(X,Y)},50),Q}return n(z,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var Q=this.container,re=window;!re.document.contains(Q)&&re.parent!==re;)re=re.parent;return re}},{key:"unbindEventListeners",value:function(){var Q=this.getContainerRenderWindow();Q.removeEventListener("mousemove",this.handleChange),Q.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var Q=this,re=this.props.style||{},X=re.color,Y=re.white,ee=re.black,N=re.pointer,ie=re.circle,he=(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:X,white:Y,black:ee,pointer:N,circle:ie}},{custom:!!this.props.style});return t.default.createElement("div",{style:he.color,ref:function(Me){return Q.container=Me},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},t.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));
|
||
}
|
||
`),t.default.createElement("div",{style:he.white,className:"saturation-white"},t.default.createElement("div",{style:he.black,className:"saturation-black"}),t.default.createElement("div",{style:he.pointer},this.props.pointer?t.default.createElement(this.props.pointer,this.props):t.default.createElement("div",{style:he.circle}))))}}]),z}(e.PureComponent||e.Component);return B1.default=k,B1}var O1={},jd={},HS,tK;function ace(){if(tK)return HS;tK=1;var n=rW(),e=nW(),t=jN(),r=Xh();function i(s,a){var o=r(s)?n:e;return o(s,t(a))}return HS=i,HS}var ZS,nK;function lce(){return nK||(nK=1,ZS=ace()),ZS}var Tb={exports:{}},uce=Tb.exports,rK;function Ace(){return rK||(rK=1,function(n,e){(function(t,r){n.exports=r()})(uce,function(){function t(Le){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},t(Le)}var r=/^\s+/,i=/\s+$/;function s(Le,Pe){if(Le=Le||"",Pe=Pe||{},Le instanceof s)return Le;if(!(this instanceof s))return new s(Le,Pe);var Ee=a(Le);this._originalInput=Le,this._r=Ee.r,this._g=Ee.g,this._b=Ee.b,this._a=Ee.a,this._roundA=Math.round(100*this._a)/100,this._format=Pe.format||Ee.format,this._gradientType=Pe.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=Ee.ok}s.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 Pe=this.toRgb();return(Pe.r*299+Pe.g*587+Pe.b*114)/1e3},getLuminance:function(){var Pe=this.toRgb(),Ee,nt,_t,ht,Ut,en;return Ee=Pe.r/255,nt=Pe.g/255,_t=Pe.b/255,Ee<=.03928?ht=Ee/12.92:ht=Math.pow((Ee+.055)/1.055,2.4),nt<=.03928?Ut=nt/12.92:Ut=Math.pow((nt+.055)/1.055,2.4),_t<=.03928?en=_t/12.92:en=Math.pow((_t+.055)/1.055,2.4),.2126*ht+.7152*Ut+.0722*en},setAlpha:function(Pe){return this._a=De(Pe),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var Pe=b(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,v:Pe.v,a:this._a}},toHsvString:function(){var Pe=b(this._r,this._g,this._b),Ee=Math.round(Pe.h*360),nt=Math.round(Pe.s*100),_t=Math.round(Pe.v*100);return this._a==1?"hsv("+Ee+", "+nt+"%, "+_t+"%)":"hsva("+Ee+", "+nt+"%, "+_t+"%, "+this._roundA+")"},toHsl:function(){var Pe=d(this._r,this._g,this._b);return{h:Pe.h*360,s:Pe.s,l:Pe.l,a:this._a}},toHslString:function(){var Pe=d(this._r,this._g,this._b),Ee=Math.round(Pe.h*360),nt=Math.round(Pe.s*100),_t=Math.round(Pe.l*100);return this._a==1?"hsl("+Ee+", "+nt+"%, "+_t+"%)":"hsla("+Ee+", "+nt+"%, "+_t+"%, "+this._roundA+")"},toHex:function(Pe){return S(this._r,this._g,this._b,Pe)},toHexString:function(Pe){return"#"+this.toHex(Pe)},toHex8:function(Pe){return O(this._r,this._g,this._b,this._a,Pe)},toHex8String:function(Pe){return"#"+this.toHex8(Pe)},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(me(this._r,255)*100)+"%",g:Math.round(me(this._g,255)*100)+"%",b:Math.round(me(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(me(this._r,255)*100)+"%, "+Math.round(me(this._g,255)*100)+"%, "+Math.round(me(this._b,255)*100)+"%)":"rgba("+Math.round(me(this._r,255)*100)+"%, "+Math.round(me(this._g,255)*100)+"%, "+Math.round(me(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:fe[S(this._r,this._g,this._b,!0)]||!1},toFilter:function(Pe){var Ee="#"+k(this._r,this._g,this._b,this._a),nt=Ee,_t=this._gradientType?"GradientType = 1, ":"";if(Pe){var ht=s(Pe);nt="#"+k(ht._r,ht._g,ht._b,ht._a)}return"progid:DXImageTransform.Microsoft.gradient("+_t+"startColorstr="+Ee+",endColorstr="+nt+")"},toString:function(Pe){var Ee=!!Pe;Pe=Pe||this._format;var nt=!1,_t=this._a<1&&this._a>=0,ht=!Ee&&_t&&(Pe==="hex"||Pe==="hex6"||Pe==="hex3"||Pe==="hex4"||Pe==="hex8"||Pe==="name");return ht?Pe==="name"&&this._a===0?this.toName():this.toRgbString():(Pe==="rgb"&&(nt=this.toRgbString()),Pe==="prgb"&&(nt=this.toPercentageRgbString()),(Pe==="hex"||Pe==="hex6")&&(nt=this.toHexString()),Pe==="hex3"&&(nt=this.toHexString(!0)),Pe==="hex4"&&(nt=this.toHex8String(!0)),Pe==="hex8"&&(nt=this.toHex8String()),Pe==="name"&&(nt=this.toName()),Pe==="hsl"&&(nt=this.toHslString()),Pe==="hsv"&&(nt=this.toHsvString()),nt||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Pe,Ee){var nt=Pe.apply(null,[this].concat([].slice.call(Ee)));return this._r=nt._r,this._g=nt._g,this._b=nt._b,this.setAlpha(nt._a),this},lighten:function(){return this._applyModification(Q,arguments)},brighten:function(){return this._applyModification(re,arguments)},darken:function(){return this._applyModification(X,arguments)},desaturate:function(){return this._applyModification(U,arguments)},saturate:function(){return this._applyModification(z,arguments)},greyscale:function(){return this._applyModification(q,arguments)},spin:function(){return this._applyModification(Y,arguments)},_applyCombination:function(Pe,Ee){return Pe.apply(null,[this].concat([].slice.call(Ee)))},analogous:function(){return this._applyCombination(he,arguments)},complement:function(){return this._applyCombination(ee,arguments)},monochromatic:function(){return this._applyCombination(de,arguments)},splitcomplement:function(){return this._applyCombination(ie,arguments)},triad:function(){return this._applyCombination(N,[3])},tetrad:function(){return this._applyCombination(N,[4])}},s.fromRatio=function(Le,Pe){if(t(Le)=="object"){var Ee={};for(var nt in Le)Le.hasOwnProperty(nt)&&(nt==="a"?Ee[nt]=Le[nt]:Ee[nt]=Te(Le[nt]));Le=Ee}return s(Le,Pe)};function a(Le){var Pe={r:0,g:0,b:0},Ee=1,nt=null,_t=null,ht=null,Ut=!1,en=!1;return typeof Le=="string"&&(Le=Dt(Le)),t(Le)=="object"&&(gt(Le.r)&>(Le.g)&>(Le.b)?(Pe=o(Le.r,Le.g,Le.b),Ut=!0,en=String(Le.r).substr(-1)==="%"?"prgb":"rgb"):gt(Le.h)&>(Le.s)&>(Le.v)?(nt=Te(Le.s),_t=Te(Le.v),Pe=E(Le.h,nt,_t),Ut=!0,en="hsv"):gt(Le.h)&>(Le.s)&>(Le.l)&&(nt=Te(Le.s),ht=Te(Le.l),Pe=g(Le.h,nt,ht),Ut=!0,en="hsl"),Le.hasOwnProperty("a")&&(Ee=Le.a)),Ee=De(Ee),{ok:Ut,format:Le.format||en,r:Math.min(255,Math.max(Pe.r,0)),g:Math.min(255,Math.max(Pe.g,0)),b:Math.min(255,Math.max(Pe.b,0)),a:Ee}}function o(Le,Pe,Ee){return{r:me(Le,255)*255,g:me(Pe,255)*255,b:me(Ee,255)*255}}function d(Le,Pe,Ee){Le=me(Le,255),Pe=me(Pe,255),Ee=me(Ee,255);var nt=Math.max(Le,Pe,Ee),_t=Math.min(Le,Pe,Ee),ht,Ut,en=(nt+_t)/2;if(nt==_t)ht=Ut=0;else{var Ft=nt-_t;switch(Ut=en>.5?Ft/(2-nt-_t):Ft/(nt+_t),nt){case Le:ht=(Pe-Ee)/Ft+(Pe<Ee?6:0);break;case Pe:ht=(Ee-Le)/Ft+2;break;case Ee:ht=(Le-Pe)/Ft+4;break}ht/=6}return{h:ht,s:Ut,l:en}}function g(Le,Pe,Ee){var nt,_t,ht;Le=me(Le,360),Pe=me(Pe,100),Ee=me(Ee,100);function Ut(mn,jn,nn){return nn<0&&(nn+=1),nn>1&&(nn-=1),nn<1/6?mn+(jn-mn)*6*nn:nn<1/2?jn:nn<2/3?mn+(jn-mn)*(2/3-nn)*6:mn}if(Pe===0)nt=_t=ht=Ee;else{var en=Ee<.5?Ee*(1+Pe):Ee+Pe-Ee*Pe,Ft=2*Ee-en;nt=Ut(Ft,en,Le+1/3),_t=Ut(Ft,en,Le),ht=Ut(Ft,en,Le-1/3)}return{r:nt*255,g:_t*255,b:ht*255}}function b(Le,Pe,Ee){Le=me(Le,255),Pe=me(Pe,255),Ee=me(Ee,255);var nt=Math.max(Le,Pe,Ee),_t=Math.min(Le,Pe,Ee),ht,Ut,en=nt,Ft=nt-_t;if(Ut=nt===0?0:Ft/nt,nt==_t)ht=0;else{switch(nt){case Le:ht=(Pe-Ee)/Ft+(Pe<Ee?6:0);break;case Pe:ht=(Ee-Le)/Ft+2;break;case Ee:ht=(Le-Pe)/Ft+4;break}ht/=6}return{h:ht,s:Ut,v:en}}function E(Le,Pe,Ee){Le=me(Le,360)*6,Pe=me(Pe,100),Ee=me(Ee,100);var nt=Math.floor(Le),_t=Le-nt,ht=Ee*(1-Pe),Ut=Ee*(1-_t*Pe),en=Ee*(1-(1-_t)*Pe),Ft=nt%6,mn=[Ee,Ut,ht,ht,en,Ee][Ft],jn=[en,Ee,Ee,Ut,ht,ht][Ft],nn=[ht,ht,en,Ee,Ee,Ut][Ft];return{r:mn*255,g:jn*255,b:nn*255}}function S(Le,Pe,Ee,nt){var _t=[Ce(Math.round(Le).toString(16)),Ce(Math.round(Pe).toString(16)),Ce(Math.round(Ee).toString(16))];return nt&&_t[0].charAt(0)==_t[0].charAt(1)&&_t[1].charAt(0)==_t[1].charAt(1)&&_t[2].charAt(0)==_t[2].charAt(1)?_t[0].charAt(0)+_t[1].charAt(0)+_t[2].charAt(0):_t.join("")}function O(Le,Pe,Ee,nt,_t){var ht=[Ce(Math.round(Le).toString(16)),Ce(Math.round(Pe).toString(16)),Ce(Math.round(Ee).toString(16)),Ce(rt(nt))];return _t&&ht[0].charAt(0)==ht[0].charAt(1)&&ht[1].charAt(0)==ht[1].charAt(1)&&ht[2].charAt(0)==ht[2].charAt(1)&&ht[3].charAt(0)==ht[3].charAt(1)?ht[0].charAt(0)+ht[1].charAt(0)+ht[2].charAt(0)+ht[3].charAt(0):ht.join("")}function k(Le,Pe,Ee,nt){var _t=[Ce(rt(nt)),Ce(Math.round(Le).toString(16)),Ce(Math.round(Pe).toString(16)),Ce(Math.round(Ee).toString(16))];return _t.join("")}s.equals=function(Le,Pe){return!Le||!Pe?!1:s(Le).toRgbString()==s(Pe).toRgbString()},s.random=function(){return s.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function U(Le,Pe){Pe=Pe===0?0:Pe||10;var Ee=s(Le).toHsl();return Ee.s-=Pe/100,Ee.s=at(Ee.s),s(Ee)}function z(Le,Pe){Pe=Pe===0?0:Pe||10;var Ee=s(Le).toHsl();return Ee.s+=Pe/100,Ee.s=at(Ee.s),s(Ee)}function q(Le){return s(Le).desaturate(100)}function Q(Le,Pe){Pe=Pe===0?0:Pe||10;var Ee=s(Le).toHsl();return Ee.l+=Pe/100,Ee.l=at(Ee.l),s(Ee)}function re(Le,Pe){Pe=Pe===0?0:Pe||10;var Ee=s(Le).toRgb();return Ee.r=Math.max(0,Math.min(255,Ee.r-Math.round(255*-(Pe/100)))),Ee.g=Math.max(0,Math.min(255,Ee.g-Math.round(255*-(Pe/100)))),Ee.b=Math.max(0,Math.min(255,Ee.b-Math.round(255*-(Pe/100)))),s(Ee)}function X(Le,Pe){Pe=Pe===0?0:Pe||10;var Ee=s(Le).toHsl();return Ee.l-=Pe/100,Ee.l=at(Ee.l),s(Ee)}function Y(Le,Pe){var Ee=s(Le).toHsl(),nt=(Ee.h+Pe)%360;return Ee.h=nt<0?360+nt:nt,s(Ee)}function ee(Le){var Pe=s(Le).toHsl();return Pe.h=(Pe.h+180)%360,s(Pe)}function N(Le,Pe){if(isNaN(Pe)||Pe<=0)throw new Error("Argument to polyad must be a positive number");for(var Ee=s(Le).toHsl(),nt=[s(Le)],_t=360/Pe,ht=1;ht<Pe;ht++)nt.push(s({h:(Ee.h+ht*_t)%360,s:Ee.s,l:Ee.l}));return nt}function ie(Le){var Pe=s(Le).toHsl(),Ee=Pe.h;return[s(Le),s({h:(Ee+72)%360,s:Pe.s,l:Pe.l}),s({h:(Ee+216)%360,s:Pe.s,l:Pe.l})]}function he(Le,Pe,Ee){Pe=Pe||6,Ee=Ee||30;var nt=s(Le).toHsl(),_t=360/Ee,ht=[s(Le)];for(nt.h=(nt.h-(_t*Pe>>1)+720)%360;--Pe;)nt.h=(nt.h+_t)%360,ht.push(s(nt));return ht}function de(Le,Pe){Pe=Pe||6;for(var Ee=s(Le).toHsv(),nt=Ee.h,_t=Ee.s,ht=Ee.v,Ut=[],en=1/Pe;Pe--;)Ut.push(s({h:nt,s:_t,v:ht})),ht=(ht+en)%1;return Ut}s.mix=function(Le,Pe,Ee){Ee=Ee===0?0:Ee||50;var nt=s(Le).toRgb(),_t=s(Pe).toRgb(),ht=Ee/100,Ut={r:(_t.r-nt.r)*ht+nt.r,g:(_t.g-nt.g)*ht+nt.g,b:(_t.b-nt.b)*ht+nt.b,a:(_t.a-nt.a)*ht+nt.a};return s(Ut)},s.readability=function(Le,Pe){var Ee=s(Le),nt=s(Pe);return(Math.max(Ee.getLuminance(),nt.getLuminance())+.05)/(Math.min(Ee.getLuminance(),nt.getLuminance())+.05)},s.isReadable=function(Le,Pe,Ee){var nt=s.readability(Le,Pe),_t,ht;switch(ht=!1,_t=Pt(Ee),_t.level+_t.size){case"AAsmall":case"AAAlarge":ht=nt>=4.5;break;case"AAlarge":ht=nt>=3;break;case"AAAsmall":ht=nt>=7;break}return ht},s.mostReadable=function(Le,Pe,Ee){var nt=null,_t=0,ht,Ut,en,Ft;Ee=Ee||{},Ut=Ee.includeFallbackColors,en=Ee.level,Ft=Ee.size;for(var mn=0;mn<Pe.length;mn++)ht=s.readability(Le,Pe[mn]),ht>_t&&(_t=ht,nt=s(Pe[mn]));return s.isReadable(Le,nt,{level:en,size:Ft})||!Ut?nt:(Ee.includeFallbackColors=!1,s.mostReadable(Le,["#fff","#000"],Ee))};var Me=s.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"},fe=s.hexNames=xe(Me);function xe(Le){var Pe={};for(var Ee in Le)Le.hasOwnProperty(Ee)&&(Pe[Le[Ee]]=Ee);return Pe}function De(Le){return Le=parseFloat(Le),(isNaN(Le)||Le<0||Le>1)&&(Le=1),Le}function me(Le,Pe){He(Le)&&(Le="100%");var Ee=We(Le);return Le=Math.min(Pe,Math.max(0,parseFloat(Le))),Ee&&(Le=parseInt(Le*Pe,10)/100),Math.abs(Le-Pe)<1e-6?1:Le%Pe/parseFloat(Pe)}function at(Le){return Math.min(1,Math.max(0,Le))}function Qe(Le){return parseInt(Le,16)}function He(Le){return typeof Le=="string"&&Le.indexOf(".")!=-1&&parseFloat(Le)===1}function We(Le){return typeof Le=="string"&&Le.indexOf("%")!=-1}function Ce(Le){return Le.length==1?"0"+Le:""+Le}function Te(Le){return Le<=1&&(Le=Le*100+"%"),Le}function rt(Le){return Math.round(parseFloat(Le)*255).toString(16)}function yt(Le){return Qe(Le)/255}var bt=function(){var Le="[-\\+]?\\d+%?",Pe="[-\\+]?\\d*\\.\\d+%?",Ee="(?:"+Pe+")|(?:"+Le+")",nt="[\\s|\\(]+("+Ee+")[,|\\s]+("+Ee+")[,|\\s]+("+Ee+")\\s*\\)?",_t="[\\s|\\(]+("+Ee+")[,|\\s]+("+Ee+")[,|\\s]+("+Ee+")[,|\\s]+("+Ee+")\\s*\\)?";return{CSS_UNIT:new RegExp(Ee),rgb:new RegExp("rgb"+nt),rgba:new RegExp("rgba"+_t),hsl:new RegExp("hsl"+nt),hsla:new RegExp("hsla"+_t),hsv:new RegExp("hsv"+nt),hsva:new RegExp("hsva"+_t),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 gt(Le){return!!bt.CSS_UNIT.exec(Le)}function Dt(Le){Le=Le.replace(r,"").replace(i,"").toLowerCase();var Pe=!1;if(Me[Le])Le=Me[Le],Pe=!0;else if(Le=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Ee;return(Ee=bt.rgb.exec(Le))?{r:Ee[1],g:Ee[2],b:Ee[3]}:(Ee=bt.rgba.exec(Le))?{r:Ee[1],g:Ee[2],b:Ee[3],a:Ee[4]}:(Ee=bt.hsl.exec(Le))?{h:Ee[1],s:Ee[2],l:Ee[3]}:(Ee=bt.hsla.exec(Le))?{h:Ee[1],s:Ee[2],l:Ee[3],a:Ee[4]}:(Ee=bt.hsv.exec(Le))?{h:Ee[1],s:Ee[2],v:Ee[3]}:(Ee=bt.hsva.exec(Le))?{h:Ee[1],s:Ee[2],v:Ee[3],a:Ee[4]}:(Ee=bt.hex8.exec(Le))?{r:Qe(Ee[1]),g:Qe(Ee[2]),b:Qe(Ee[3]),a:yt(Ee[4]),format:Pe?"name":"hex8"}:(Ee=bt.hex6.exec(Le))?{r:Qe(Ee[1]),g:Qe(Ee[2]),b:Qe(Ee[3]),format:Pe?"name":"hex"}:(Ee=bt.hex4.exec(Le))?{r:Qe(Ee[1]+""+Ee[1]),g:Qe(Ee[2]+""+Ee[2]),b:Qe(Ee[3]+""+Ee[3]),a:yt(Ee[4]+""+Ee[4]),format:Pe?"name":"hex8"}:(Ee=bt.hex3.exec(Le))?{r:Qe(Ee[1]+""+Ee[1]),g:Qe(Ee[2]+""+Ee[2]),b:Qe(Ee[3]+""+Ee[3]),format:Pe?"name":"hex"}:!1}function Pt(Le){var Pe,Ee;return Le=Le||{level:"AA",size:"small"},Pe=(Le.level||"AA").toUpperCase(),Ee=(Le.size||"small").toLowerCase(),Pe!=="AA"&&Pe!=="AAA"&&(Pe="AA"),Ee!=="small"&&Ee!=="large"&&(Ee="small"),{level:Pe,size:Ee}}return s})}(Tb)),Tb.exports}var iK;function pW(){if(iK)return jd;iK=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.isvalidColorString=jd.red=jd.getContrastingColor=jd.isValidHex=jd.toState=jd.simpleCheckForValidColor=void 0;var n=lce(),e=i(n),t=Ace(),r=i(t);function i(a){return a&&a.__esModule?a:{default:a}}jd.simpleCheckForValidColor=function(o){var d=["r","g","b","a","h","s","l","v"],g=0,b=0;return(0,e.default)(d,function(E){if(o[E]&&(g+=1,isNaN(o[E])||(b+=1),E==="s"||E==="l")){var S=/^\d+%$/;S.test(o[E])&&(b+=1)}}),g===b?o:!1};var s=jd.toState=function(o,d){var g=o.hex?(0,r.default)(o.hex):(0,r.default)(o),b=g.toHsl(),E=g.toHsv(),S=g.toRgb(),O=g.toHex();b.s===0&&(b.h=d||0,E.h=d||0);var k=O==="000000"&&S.a===0;return{hsl:b,hex:k?"transparent":"#"+O,rgb:S,hsv:E,oldHue:o.h||d||b.h,source:o.source}};return jd.isValidHex=function(o){if(o==="transparent")return!0;var d=String(o).charAt(0)==="#"?1:0;return o.length!==4+d&&o.length<7+d&&(0,r.default)(o).isValid()},jd.getContrastingColor=function(o){if(!o)return"#fff";var d=s(o);if(d.hex==="transparent")return"rgba(0,0,0,0.4)";var g=(d.rgb.r*299+d.rgb.g*587+d.rgb.b*114)/1e3;return g>=128?"#000":"#fff"},jd.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}},jd.isvalidColorString=function(o,d){var g=o.replace("°","");return(0,r.default)(d+" ("+g+")")._ok},jd}var oK;function cce(){if(oK)return O1;oK=1,Object.defineProperty(O1,"__esModule",{value:!0}),O1.ColorWrap=void 0;var n=Object.assign||function(k){for(var U=1;U<arguments.length;U++){var z=arguments[U];for(var q in z)Object.prototype.hasOwnProperty.call(z,q)&&(k[q]=z[q])}return k},e=function(){function k(U,z){for(var q=0;q<z.length;q++){var Q=z[q];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(U,Q.key,Q)}}return function(U,z,q){return z&&k(U.prototype,z),q&&k(U,q),U}}(),t=Fa(),r=g(t),i=fW(),s=g(i),a=pW(),o=d(a);function d(k){if(k&&k.__esModule)return k;var U={};if(k!=null)for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(U[z]=k[z]);return U.default=k,U}function g(k){return k&&k.__esModule?k:{default:k}}function b(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}function E(k,U){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:k}function S(k,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(k,U):k.__proto__=U)}var O=O1.ColorWrap=function(U){var z=function(q){S(Q,q);function Q(re){b(this,Q);var X=E(this,(Q.__proto__||Object.getPrototypeOf(Q)).call(this));return X.handleChange=function(Y,ee){var N=o.simpleCheckForValidColor(Y);if(N){var ie=o.toState(Y,Y.h||X.state.oldHue);X.setState(ie),X.props.onChangeComplete&&X.debounce(X.props.onChangeComplete,ie,ee),X.props.onChange&&X.props.onChange(ie,ee)}},X.handleSwatchHover=function(Y,ee){var N=o.simpleCheckForValidColor(Y);if(N){var ie=o.toState(Y,Y.h||X.state.oldHue);X.props.onSwatchHover&&X.props.onSwatchHover(ie,ee)}},X.state=n({},o.toState(re.color,0)),X.debounce=(0,s.default)(function(Y,ee,N){Y(ee,N)},100),X}return e(Q,[{key:"render",value:function(){var X={};return this.props.onSwatchHover&&(X.onSwatchHover=this.handleSwatchHover),r.default.createElement(U,n({},this.props,this.state,{onChange:this.handleChange},X))}}],[{key:"getDerivedStateFromProps",value:function(X,Y){return n({},o.toState(X.color,Y.oldHue))}}]),Q}(t.PureComponent||t.Component);return z.propTypes=n({},U.propTypes),z.defaultProps=n({},U.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),z};return O1.default=O,O1}var I1={},mv={},sK;function dce(){if(sK)return mv;sK=1,Object.defineProperty(mv,"__esModule",{value:!0}),mv.handleFocus=void 0;var n=Object.assign||function(d){for(var g=1;g<arguments.length;g++){var b=arguments[g];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(d[E]=b[E])}return d},e=function(){function d(g,b){for(var E=0;E<b.length;E++){var S=b[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,S.key,S)}}return function(g,b,E){return b&&d(g.prototype,b),E&&d(g,E),g}}(),t=Fa(),r=i(t);function i(d){return d&&d.__esModule?d:{default:d}}function s(d,g){if(!(d instanceof g))throw new TypeError("Cannot call a class as a function")}function a(d,g){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:d}function o(d,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);d.prototype=Object.create(g&&g.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(d,g):d.__proto__=g)}return mv.handleFocus=function(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(E){o(S,E);function S(){var O,k,U,z;s(this,S);for(var q=arguments.length,Q=Array(q),re=0;re<q;re++)Q[re]=arguments[re];return z=(k=(U=a(this,(O=S.__proto__||Object.getPrototypeOf(S)).call.apply(O,[this].concat(Q))),U),U.state={focus:!1},U.handleFocus=function(){return U.setState({focus:!0})},U.handleBlur=function(){return U.setState({focus:!1})},k),a(U,z)}return e(S,[{key:"render",value:function(){return r.default.createElement(b,{onFocus:this.handleFocus,onBlur:this.handleBlur},r.default.createElement(g,n({},this.props,this.state)))}}]),S}(r.default.Component)},mv}var aK;function hce(){if(aK)return I1;aK=1,Object.defineProperty(I1,"__esModule",{value:!0}),I1.Swatch=void 0;var n=Object.assign||function(E){for(var S=1;S<arguments.length;S++){var O=arguments[S];for(var k in O)Object.prototype.hasOwnProperty.call(O,k)&&(E[k]=O[k])}return E},e=Fa(),t=d(e),r=mp(),i=d(r),s=dce(),a=N8(),o=d(a);function d(E){return E&&E.__esModule?E:{default:E}}var g=13,b=I1.Swatch=function(S){var O=S.color,k=S.style,U=S.onClick,z=U===void 0?function(){}:U,q=S.onHover,Q=S.title,re=Q===void 0?O:Q,X=S.children,Y=S.focus,ee=S.focusStyle,N=ee===void 0?{}:ee,ie=O==="transparent",he=(0,i.default)({default:{swatch:n({background:O,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},k,Y?N:{})}}),de=function(me){return z(O,me)},Me=function(me){return me.keyCode===g&&z(O,me)},fe=function(me){return q(O,me)},xe={};return q&&(xe.onMouseOver=fe),t.default.createElement("div",n({style:he.swatch,onClick:de,title:re,tabIndex:0,onKeyDown:Me},xe),X,ie&&t.default.createElement(o.default,{borderRadius:he.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};return I1.default=(0,s.handleFocus)(b),I1}var lK;function mW(){return lK||(lK=1,function(n){Object.defineProperty(n,"__esModule",{value:!0});var e=VAe();Object.defineProperty(n,"Alpha",{enumerable:!0,get:function(){return g(e).default}});var t=N8();Object.defineProperty(n,"Checkboard",{enumerable:!0,get:function(){return g(t).default}});var r=HAe();Object.defineProperty(n,"EditableInput",{enumerable:!0,get:function(){return g(r).default}});var i=XAe();Object.defineProperty(n,"Hue",{enumerable:!0,get:function(){return g(i).default}});var s=JAe();Object.defineProperty(n,"Raised",{enumerable:!0,get:function(){return g(s).default}});var a=sce();Object.defineProperty(n,"Saturation",{enumerable:!0,get:function(){return g(a).default}});var o=cce();Object.defineProperty(n,"ColorWrap",{enumerable:!0,get:function(){return g(o).default}});var d=hce();Object.defineProperty(n,"Swatch",{enumerable:!0,get:function(){return g(d).default}});function g(b){return b&&b.__esModule?b:{default:b}}}(WS)),WS}var k1={},XS,uK;function fce(){if(uK)return XS;uK=1;function n(e){return e===void 0}return XS=n,XS}var fb={},AK;function pce(){if(AK)return fb;AK=1,Object.defineProperty(fb,"__esModule",{value:!0});var n=Object.assign||function(a){for(var o=1;o<arguments.length;o++){var d=arguments[o];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(a[g]=d[g])}return a},e=Fa(),t=r(e);function r(a){return a&&a.__esModule?a:{default:a}}function i(a,o){var d={};for(var g in a)o.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(a,g)&&(d[g]=a[g]);return d}var s=24;return fb.default=function(a){var o=a.fill,d=o===void 0?"currentColor":o,g=a.width,b=g===void 0?s:g,E=a.height,S=E===void 0?s:E,O=a.style,k=O===void 0?{}:O,U=i(a,["fill","width","height","style"]);return t.default.createElement("svg",n({viewBox:"0 0 "+s+" "+s,style:n({fill:d,width:b,height:S},k)},U),t.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"}))},fb}var cK;function mce(){if(cK)return k1;cK=1,Object.defineProperty(k1,"__esModule",{value:!0}),k1.ChromeFields=void 0;var n=function(){function Q(re,X){for(var Y=0;Y<X.length;Y++){var ee=X[Y];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(re,ee.key,ee)}}return function(re,X,Y){return X&&Q(re.prototype,X),Y&&Q(re,Y),re}}(),e=Fa(),t=O(e),r=mp(),i=O(r),s=pW(),a=S(s),o=fce(),d=O(o),g=mW(),b=pce(),E=O(b);function S(Q){if(Q&&Q.__esModule)return Q;var re={};if(Q!=null)for(var X in Q)Object.prototype.hasOwnProperty.call(Q,X)&&(re[X]=Q[X]);return re.default=Q,re}function O(Q){return Q&&Q.__esModule?Q:{default:Q}}function k(Q,re){if(!(Q instanceof re))throw new TypeError("Cannot call a class as a function")}function U(Q,re){if(!Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return re&&(typeof re=="object"||typeof re=="function")?re:Q}function z(Q,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof re);Q.prototype=Object.create(re&&re.prototype,{constructor:{value:Q,enumerable:!1,writable:!0,configurable:!0}}),re&&(Object.setPrototypeOf?Object.setPrototypeOf(Q,re):Q.__proto__=re)}var q=k1.ChromeFields=function(Q){z(re,Q);function re(X){k(this,re);var Y=U(this,(re.__proto__||Object.getPrototypeOf(re)).call(this));return Y.toggleViews=function(){Y.state.view==="hex"?Y.setState({view:"rgb"}):Y.state.view==="rgb"?Y.setState({view:"hsl"}):Y.state.view==="hsl"&&(Y.props.hsl.a===1?Y.setState({view:"hex"}):Y.setState({view:"rgb"}))},Y.handleChange=function(ee,N){ee.hex?a.isValidHex(ee.hex)&&Y.props.onChange({hex:ee.hex,source:"hex"},N):ee.r||ee.g||ee.b?Y.props.onChange({r:ee.r||Y.props.rgb.r,g:ee.g||Y.props.rgb.g,b:ee.b||Y.props.rgb.b,source:"rgb"},N):ee.a?(ee.a<0?ee.a=0:ee.a>1&&(ee.a=1),Y.props.onChange({h:Y.props.hsl.h,s:Y.props.hsl.s,l:Y.props.hsl.l,a:Math.round(ee.a*100)/100,source:"rgb"},N)):(ee.h||ee.s||ee.l)&&(typeof ee.s=="string"&&ee.s.includes("%")&&(ee.s=ee.s.replace("%","")),typeof ee.l=="string"&&ee.l.includes("%")&&(ee.l=ee.l.replace("%","")),ee.s==1?ee.s=.01:ee.l==1&&(ee.l=.01),Y.props.onChange({h:ee.h||Y.props.hsl.h,s:Number((0,d.default)(ee.s)?Y.props.hsl.s:ee.s),l:Number((0,d.default)(ee.l)?Y.props.hsl.l:ee.l),source:"hsl"},N))},Y.showHighlight=function(ee){ee.currentTarget.style.background="#eee"},Y.hideHighlight=function(ee){ee.currentTarget.style.background="transparent"},X.hsl.a!==1&&X.view==="hex"?Y.state={view:"rgb"}:Y.state={view:X.view},Y}return n(re,[{key:"render",value:function(){var Y=this,ee=(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),N=void 0;return this.state.view==="hex"?N=t.default.createElement("div",{style:ee.fields,className:"flexbox-fix"},t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?N=t.default.createElement("div",{style:ee.fields,className:"flexbox-fix"},t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),t.default.createElement("div",{style:ee.alpha},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(N=t.default.createElement("div",{style:ee.fields,className:"flexbox-fix"},t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),t.default.createElement("div",{style:ee.field},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),t.default.createElement("div",{style:ee.alpha},t.default.createElement(g.EditableInput,{style:{input:ee.input,label:ee.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),t.default.createElement("div",{style:ee.wrap,className:"flexbox-fix"},N,t.default.createElement("div",{style:ee.toggle},t.default.createElement("div",{style:ee.icon,onClick:this.toggleViews,ref:function(he){return Y.icon=he}},t.default.createElement(E.default,{style:ee.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(Y,ee){return Y.hsl.a!==1&&ee.view==="hex"?{view:"rgb"}:null}}]),re}(t.default.Component);return q.defaultProps={view:"hex"},k1.default=q,k1}var T1={},dK;function gce(){if(dK)return T1;dK=1,Object.defineProperty(T1,"__esModule",{value:!0}),T1.ChromePointer=void 0;var n=Fa(),e=i(n),t=mp(),r=i(t);function i(a){return a&&a.__esModule?a:{default:a}}var s=T1.ChromePointer=function(){var o=(0,r.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 e.default.createElement("div",{style:o.picker})};return T1.default=s,T1}var P1={},hK;function yce(){if(hK)return P1;hK=1,Object.defineProperty(P1,"__esModule",{value:!0}),P1.ChromePointerCircle=void 0;var n=Fa(),e=i(n),t=mp(),r=i(t);function i(a){return a&&a.__esModule?a:{default:a}}var s=P1.ChromePointerCircle=function(){var o=(0,r.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return e.default.createElement("div",{style:o.picker})};return P1.default=s,P1}var fK;function vce(){if(fK)return g1;fK=1,Object.defineProperty(g1,"__esModule",{value:!0}),g1.Chrome=void 0;var n=Fa(),e=U(n),t=dp(),r=U(t),i=mp(),s=U(i),a=hW(),o=U(a),d=mW(),g=mce(),b=U(g),E=gce(),S=U(E),O=yce(),k=U(O);function U(q){return q&&q.__esModule?q:{default:q}}var z=g1.Chrome=function(Q){var re=Q.width,X=Q.onChange,Y=Q.disableAlpha,ee=Q.rgb,N=Q.hsl,ie=Q.hsv,he=Q.hex,de=Q.renderers,Me=Q.styles,fe=Me===void 0?{}:Me,xe=Q.className,De=xe===void 0?"":xe,me=Q.defaultView,at=(0,s.default)((0,o.default)({default:{picker:{width:re,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("+ee.r+", "+ee.g+", "+ee.b+", "+ee.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"}}},fe),{disableAlpha:Y});return e.default.createElement("div",{style:at.picker,className:"chrome-picker "+De},e.default.createElement("div",{style:at.saturation},e.default.createElement(d.Saturation,{style:at.Saturation,hsl:N,hsv:ie,pointer:k.default,onChange:X})),e.default.createElement("div",{style:at.body},e.default.createElement("div",{style:at.controls,className:"flexbox-fix"},e.default.createElement("div",{style:at.color},e.default.createElement("div",{style:at.swatch},e.default.createElement("div",{style:at.active}),e.default.createElement(d.Checkboard,{renderers:de}))),e.default.createElement("div",{style:at.toggles},e.default.createElement("div",{style:at.hue},e.default.createElement(d.Hue,{style:at.Hue,hsl:N,pointer:S.default,onChange:X})),e.default.createElement("div",{style:at.alpha},e.default.createElement(d.Alpha,{style:at.Alpha,rgb:ee,hsl:N,pointer:S.default,renderers:de,onChange:X})))),e.default.createElement(b.default,{rgb:ee,hsl:N,hex:he,view:me,onChange:X,disableAlpha:Y})))};return z.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),disableAlpha:r.default.bool,styles:r.default.object,defaultView:r.default.oneOf(["hex","rgb","hsl"])},z.defaultProps={width:225,disableAlpha:!1,styles:{}},g1.default=(0,d.ColorWrap)(z),g1}var Cce=vce();const _ce=Ha(Cce);function to(){var n="/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",e="cb6d03ea084207ffce2f89af246bc26074c13af7",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:23}},1:{start:{line:8,column:2},end:{line:8,column:56}},2:{start:{line:11,column:10},end:{line:13,column:3}},3:{start:{line:14,column:15},end:{line:14,column:19}},4:{start:{line:16,column:4},end:{line:16,column:17}},5:{start:{line:17,column:4},end:{line:17,column:75}},6:{start:{line:20,column:4},end:{line:20,column:27}},7:{start:{line:25,column:21},end:{line:39,column:3}},8:{start:{line:26,column:17},end:{line:26,column:32}},9:{start:{line:27,column:4},end:{line:38,column:5}},10:{start:{line:28,column:18},end:{line:28,column:46}},11:{start:{line:29,column:6},end:{line:32,column:8}},12:{start:{line:34,column:6},end:{line:37,column:8}},13:{start:{line:40,column:17},end:{line:42,column:3}},14:{start:{line:41,column:4},end:{line:41,column:62}},15:{start:{line:44,column:4},end:{line:49,column:5}},16:{start:{line:45,column:6},end:{line:45,column:43}},17:{start:{line:47,column:6},end:{line:47,column:49}},18:{start:{line:48,column:6},end:{line:48,column:39}},19:{start:{line:52,column:4},end:{line:52,column:47}},20:{start:{line:55,column:19},end:{line:55,column:42}},21:{start:{line:56,column:25},end:{line:56,column:44}},22:{start:{line:57,column:31},end:{line:63,column:5}},23:{start:{line:64,column:35},end:{line:99,column:5}},24:{start:{line:79,column:31},end:{line:79,column:67}},25:{start:{line:100,column:24},end:{line:102,column:5}},26:{start:{line:103,column:4},end:{line:122,column:9}},27:{start:{line:113,column:26},end:{line:113,column:49}},28:{start:{line:119,column:27},end:{line:119,column:56}}},fnMap:{0:{name:"formatColor",decl:{start:{line:6,column:9},end:{line:6,column:20}},loc:{start:{line:6,column:28},end:{line:9,column:1}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:21},end:{line:18,column:3}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:21},end:{line:21,column:3}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:25,column:21},end:{line:25,column:22}},loc:{start:{line:25,column:27},end:{line:39,column:3}},line:25},4:{name:"(anonymous_4)",decl:{start:{line:40,column:17},end:{line:40,column:18}},loc:{start:{line:40,column:23},end:{line:42,column:3}},line:40},5:{name:"(anonymous_5)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:14},end:{line:50,column:3}},line:43},6:{name:"(anonymous_6)",decl:{start:{line:51,column:2},end:{line:51,column:3}},loc:{start:{line:51,column:14},end:{line:53,column:3}},line:51},7:{name:"(anonymous_7)",decl:{start:{line:54,column:2},end:{line:54,column:3}},loc:{start:{line:54,column:11},end:{line:123,column:3}},line:54},8:{name:"(anonymous_8)",decl:{start:{line:79,column:24},end:{line:79,column:25}},loc:{start:{line:79,column:31},end:{line:79,column:67}},line:79},9:{name:"(anonymous_9)",decl:{start:{line:113,column:15},end:{line:113,column:16}},loc:{start:{line:113,column:26},end:{line:113,column:49}},line:113},10:{name:"(anonymous_10)",decl:{start:{line:119,column:20},end:{line:119,column:21}},loc:{start:{line:119,column:27},end:{line:119,column:56}},line:119}},branchMap:{0:{loc:{start:{line:27,column:4},end:{line:38,column:5}},type:"if",locations:[{start:{line:27,column:4},end:{line:38,column:5}},{start:{line:33,column:11},end:{line:38,column:5}}],line:27},1:{loc:{start:{line:52,column:24},end:{line:52,column:45}},type:"cond-expr",locations:[{start:{line:52,column:35},end:{line:52,column:41}},{start:{line:52,column:44},end:{line:52,column:45}}],line:52},2:{loc:{start:{line:104,column:6},end:{line:104,column:39}},type:"binary-expr",locations:[{start:{line:104,column:6},end:{line:104,column:29}},{start:{line:104,column:33},end:{line:104,column:39}}],line:104},3:{loc:{start:{line:118,column:17},end:{line:118,column:57}},type:"cond-expr",locations:[{start:{line:118,column:36},end:{line:118,column:52}},{start:{line:118,column:55},end:{line:118,column:57}}],line:118}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputColor.tsx"],names:[],mappings:"AAsFmB,SAQb,KARa;AAtFnB,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,kBAAkB;AAEzB,OAAO,YAAY;AAEnB,SAAS,YAAY,OAA4B;AAC/C,QAAM,MAAM,MAAM;AAClB,SAAO,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC;AACpD;AAaA,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,QAAQ;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA,aAAsC;AAAA,EAEtC,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,kBAAkB,OAAO,SAAS,KAAK,iBAAiB,MAAK,EAAE;AAAA,EACtE;AAAA,EAEA,gBAAgB,GAAW;AACzB,SAAK,MAAM,SAAS,CAAC;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,EAKA,mBAAmB,MAAM;AACvB,UAAM,OAAO,KAAK;AAClB,QAAG,MAAM;AACP,YAAM,MAAM,KAAK,sBAAsB;AACvC,aAAO;AAAA,QACL,KAAK,IAAI;AAAA,QACT,MAAM,IAAI,OAAO;AAAA,MACnB;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QACL,KAAK;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,MAAM;AACnB,SAAK,SAAS,EAAE,cAAc,CAAC,KAAK,MAAM,aAAa,CAAC;AAAA,EAC1D;AAAA,EAEA,IAAI,QAAQ;AAEV,QAAI;AACF,aAAO,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI;AAAA,IACrC,SACM,KAAK;AACT,cAAQ,KAAK,yBAAyB,GAAG;AACzC,aAAO,MAAM,kBAAkB;AAAA,IACjC;AAAA,EACF;AAAA,EAEA,SAAU,GAAW;AACnB,SAAK,MAAM,SAAS,MAAM,KAAK,SAAY,CAAC;AAAA,EAC9C;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,iBAAiB;AACrC,UAAM,eAAe,KAAK,MAAM,OAAO;AACvC,UAAM,qBAAqB;AAAA,MACzB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA,MAChB,GAAG,aAAa;AAAA;AAAA,MAEhB,GAAG,aAAa;AAAA,IAClB;AAEA,UAAM,SAAS;AAAA,MAAC;AAAA;AAAA,QACd,WAAU;AAAA,QACV,OAAO;AAAA,UACL,UAAU;AAAA,UACV,QAAQ;AAAA,UACR,MAAM,OAAO;AAAA,UACb,KAAK,OAAO;AAAA,QACd;AAAA,QACA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,gBAAgB,YAAY,CAAC,CAAC;AAAA;AAAA,UACpD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK;AAAA,cACd,OAAO;AAAA,gBACL,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,KAAK;AAAA,gBACL,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,MAAM;AAAA,cACR;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IACF;AAEA,UAAM,cAAc;AAAA,MAClB,iBAAiB,KAAK,MAAM;AAAA,IAC9B;AAEA,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA,WAAK,MAAM,gBAAgB;AAAA,MAC5B,oBAAC,SAAI,WAAU,yBAAwB,OAAO,aAAa;AAAA,MAC3D;AAAA,QAAC;AAAA;AAAA,UACC,cAAY,KAAK,MAAM,YAAY;AAAA,UACnC,YAAW;AAAA,UACX,cAAa;AAAA,UACb,WAAU;AAAA,UACV,KAAK,CAAC,UAAU,KAAK,aAAa;AAAA,UAClC,SAAS,KAAK;AAAA,UACd,OAAO,KAAK,MAAM;AAAA,UAClB,MAAM,KAAK,MAAM;AAAA,UACjB,aAAa,KAAK,MAAM;AAAA,UACxB,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,QAAQ;AAAA,UAC7C,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,OAAO,KAAK;AAAA;AAAA,MAC/C;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cb6d03ea084207ffce2f89af246bc26074c13af7"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return to=function(){return a},a}to();function bce(n){to().f[0]++;const e=(to().s[0]++,n.rgb);return to().s[1]++,`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}class gW extends rr.Component{constructor(t){to().f[1]++,to().s[4]++;super(t);kn(this,"state",(to().s[2]++,{pickerOpened:!1}));kn(this,"colorInput",(to().s[3]++,null));kn(this,"calcPickerOffset",(to().s[7]++,()=>{to().f[3]++;const t=(to().s[8]++,this.colorInput);if(to().s[9]++,t){to().b[0][0]++;const r=(to().s[10]++,t.getBoundingClientRect());return to().s[11]++,{top:r.top,left:r.left+196}}else return to().b[0][1]++,to().s[12]++,{top:160,left:555}}));kn(this,"togglePicker",(to().s[13]++,()=>{to().f[4]++,to().s[14]++,this.setState({pickerOpened:!this.state.pickerOpened})}));to().s[5]++,this.onChangeNoCheck=t6.throttle(this.onChangeNoCheck,1e3/30)}onChangeNoCheck(t){to().f[2]++,to().s[6]++,this.props.onChange(t)}get color(){to().f[5]++,to().s[15]++;try{return to().s[16]++,_6(this.props.value).rgb()}catch(t){return to().s[17]++,console.warn("Error parsing color: ",t),to().s[18]++,_6("rgb(255,255,255)")}}onChange(t){to().f[6]++,to().s[19]++,this.props.onChange(t===""?(to().b[1][0]++,void 0):(to().b[1][1]++,t))}render(){to().f[7]++;const t=(to().s[20]++,this.calcPickerOffset()),r=(to().s[21]++,this.color.object()),i=(to().s[22]++,{r:r.r,g:r.g,b:r.b,a:r.alpha}),s=(to().s[23]++,le.jsxs("div",{className:"maputnik-color-picker-offset",style:{position:"fixed",zIndex:1,left:t.left,top:t.top},children:[le.jsx(_ce,{color:i,onChange:o=>(to().f[8]++,to().s[24]++,this.onChangeNoCheck(bce(o)))}),le.jsx("div",{className:"maputnik-color-picker-offset",onClick:this.togglePicker,style:{zIndex:-1,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}})]})),a=(to().s[25]++,{backgroundColor:this.props.value});return to().s[26]++,le.jsxs("div",{className:"maputnik-color-wrapper",children:[(to().b[2][0]++,this.state.pickerOpened&&(to().b[2][1]++,s)),le.jsx("div",{className:"maputnik-color-swatch",style:a}),le.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",autoComplete:"off",className:"maputnik-color",ref:o=>(to().f[9]++,to().s[27]++,this.colorInput=o),onClick:this.togglePicker,style:this.props.style,name:this.props.name,placeholder:this.props.default,value:this.props.value?(to().b[3][0]++,this.props.value):(to().b[3][1]++,""),onChange:o=>(to().f[10]++,to().s[28]++,this.onChange(o.target.value))})]})}}function pn(){var n="/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",e="ab7734237b4c4e642d73d3a00f670557b7ee2f29",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputNumber.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:8,column:19},end:{line:8,column:24}},2:{start:{line:10,column:4},end:{line:10,column:17}},3:{start:{line:11,column:4},end:{line:16,column:6}},4:{start:{line:19,column:4},end:{line:24,column:5}},5:{start:{line:20,column:6},end:{line:23,column:8}},6:{start:{line:25,column:4},end:{line:25,column:16}},7:{start:{line:28,column:18},end:{line:28,column:77}},8:{start:{line:29,column:23},end:{line:29,column:49}},9:{start:{line:30,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return pn=function(){return a},a}pn();class rm extends rr.Component{constructor(t){pn().f[0]++,pn().s[2]++;super(t);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]++,t=>{pn().f[5]++;let r=(pn().s[37]++,parseFloat(t.target.value));const i=(pn().s[38]++,this.props.rangeStep);let s=(pn().s[39]++,r);if(pn().s[40]++,i){pn().b[19][0]++;const a=(pn().s[41]++,r%i);pn().s[42]++,this._keyboardEvent?(pn().b[20][0]++,pn().s[43]++,r<+this.state.dirtyValue?(pn().b[21][0]++,pn().s[44]++,r=this.state.value-i):(pn().b[21][1]++,pn().s[45]++,r=this.state.value+i),pn().s[46]++,s=r):(pn().b[20][1]++,pn().s[47]++,a<i/2?(pn().b[22][0]++,pn().s[48]++,r=r-a):(pn().b[22][1]++,pn().s[49]++,r=r+(i-a)))}else pn().b[19][1]++;pn().s[50]++,this._keyboardEvent=!1,pn().s[51]++,r=Math.max(this.props.min,Math.min(this.props.max,r)),pn().s[52]++,this.setState({value:r,dirtyValue:s}),pn().s[53]++,this.props.onChange?(pn().b[23][0]++,pn().s[54]++,this.props.onChange(r)):pn().b[23][1]++}));pn().s[3]++,this.state={uuid:+Sy(),editing:!1,value:t.value,dirtyValue:t.value}}static getDerivedStateFromProps(t,r){return pn().f[1]++,pn().s[4]++,pn().b[1][0]++,!r.editing&&(pn().b[1][1]++,t.value!==r.value)?(pn().b[0][0]++,pn().s[5]++,{value:t.value,dirtyValue:t.value}):(pn().b[0][1]++,pn().s[6]++,null)}changeValue(t){pn().f[2]++;const r=(pn().s[7]++,pn().b[3][0]++,t===""||(pn().b[3][1]++,t===void 0)?(pn().b[2][0]++,void 0):(pn().b[2][1]++,+t)),i=(pn().s[8]++,this.props.value!==r);pn().s[9]++,pn().b[5][0]++,this.isValid(r)&&(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(r)):pn().b[6][1]++,pn().s[12]++,this.setState({value:r})):(pn().b[4][1]++,pn().s[13]++,pn().b[8][0]++,!this.isValid(r)&&(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:t===""?(pn().b[9][0]++,void 0):(pn().b[9][1]++,t)})}isValid(t){if(pn().f[3]++,pn().s[16]++,t===void 0)return pn().b[10][0]++,pn().s[17]++,!0;pn().b[10][1]++;const r=(pn().s[18]++,+t);return pn().s[19]++,isNaN(r)?(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]++,r<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]++,r>this.props.max)?(pn().b[14][0]++,pn().s[24]++,!1):(pn().b[14][1]++,pn().s[25]++,!0)))}render(){var t,r;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)),s=(pn().s[57]++,this.props.default===void 0?(pn().b[27][0]++,""):(pn().b[27][1]++,this.props.default));let a;return pn().s[58]++,this.state.editingRange?(pn().b[28][0]++,pn().s[59]++,a=this.state.value):(pn().b[28][1]++,pn().s[60]++,a=i),pn().s[61]++,le.jsxs("div",{className:"maputnik-number-container",children:[le.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]++,s):(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"),le.jsx("input",{type:"text",spellCheck:"false",className:"maputnik-number",placeholder:(t=this.props.default)==null?void 0:t.toString(),value:a===void 0?(pn().b[30][0]++,""):(pn().b[30][1]++,a),onFocus:o=>{pn().f[11]++,pn().s[66]++,this.setState({editing:!0})},onChange:o=>{pn().f[12]++,pn().s[67]++,this.changeValue(o.target.value)},onBlur:o=>{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]++,le.jsx("input",{"aria-label":this.props["aria-label"],spellCheck:"false",className:"maputnik-number",placeholder:(r=this.props.default)==null?void 0:r.toString(),value:i===void 0?(pn().b[32][0]++,""):(pn().b[32][1]++,i),onChange:s=>(pn().f[14]++,pn().s[72]++,this.changeValue(s.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(rm,"defaultProps",(pn().s[0]++,{rangeStep:1}));function Lp(){var n="/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",e="e85f7924976070cbab7795bce9cf0e191e4a6b5e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx",statementMap:{0:{start:{line:4,column:24},end:{line:6,column:3}},1:{start:{line:7,column:13},end:{line:9,column:3}},2:{start:{line:8,column:4},end:{line:8,column:43}},3:{start:{line:11,column:4},end:{line:26,column:9}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:13},end:{line:7,column:14}},loc:{start:{line:7,column:19},end:{line:9,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:27,column:3}},line:10}},branchMap:{0:{loc:{start:{line:24,column:17},end:{line:24,column:53}},type:"cond-expr",locations:[{start:{line:24,column:36},end:{line:24,column:44}},{start:{line:24,column:47},end:{line:24,column:53}}],line:24}},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputCheckbox.tsx"],names:[],mappings:"AAkBW,SACL,KADK;AAlBX,OAAO,WAAW;AAQlB,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,OAAO,eAAe;AAAA,IACpB,OAAO;AAAA,EACT;AAAA,EAEA,WAAW,MAAM;AACf,SAAK,MAAM,SAAS,CAAC,KAAK,MAAM,KAAK;AAAA,EACvC;AAAA,EAEA,SAAS;AACP,WAAO,qBAAC,SAAI,WAAU,6BACpB;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAK;AAAA,UACL,OAAO,KAAK,MAAM;AAAA,UAClB,UAAU,KAAK;AAAA,UACf,SAAS,KAAK;AAAA,UACd,SAAS,KAAK,MAAM;AAAA;AAAA,MACtB;AAAA,MACA,oBAAC,SAAI,WAAU,yBACb,8BAAC,SAAI,OAAO;AAAA,QACV,SAAS,KAAK,MAAM,QAAQ,WAAW;AAAA,MACzC,GAAG,WAAU,0BAAyB,SAAQ,aAC5C,8BAAC,UAAK,GAAE,2CAA0C,GACpD,GACF;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e85f7924976070cbab7795bce9cf0e191e4a6b5e"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Lp=function(){return a},a}Lp();class W8 extends rr.Component{constructor(){super(...arguments);kn(this,"onChange",(Lp().s[1]++,()=>{Lp().f[0]++,Lp().s[2]++,this.props.onChange(!this.props.value)}))}render(){return Lp().f[1]++,Lp().s[3]++,le.jsxs("div",{className:"maputnik-checkbox-wrapper",children:[le.jsx("input",{className:"maputnik-checkbox",type:"checkbox",style:this.props.style,onChange:this.onChange,onClick:this.onChange,checked:this.props.value}),le.jsx("div",{className:"maputnik-checkbox-box",children:le.jsx("svg",{style:{display:this.props.value?(Lp().b[0][0]++,"inline"):(Lp().b[0][1]++,"none")},className:"maputnik-checkbox-icon",viewBox:"0 0 32 32",children:le.jsx("path",{d:"M1 14 L5 10 L13 18 L27 4 L31 8 L13 26 z"})})})]})}}kn(W8,"defaultProps",(Lp().s[0]++,{value:!1}));function Xr(){var n="/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",e="9ed81d69001830f70ea45ac1502cde5125167d89",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:4},end:{line:11,column:17}},2:{start:{line:12,column:4},end:{line:16,column:6}},3:{start:{line:19,column:18},end:{line:19,column:20}},4:{start:{line:20,column:30},end:{line:20,column:62}},5:{start:{line:21,column:4},end:{line:28,column:7}},6:{start:{line:22,column:6},end:{line:27,column:7}},7:{start:{line:23,column:8},end:{line:23,column:34}},8:{start:{line:25,column:8},end:{line:25,column:34}},9:{start:{line:26,column:8},end:{line:26,column:46}},10:{start:{line:29,column:4},end:{line:32,column:6}},11:{start:{line:35,column:4},end:{line:38,column:7}},12:{start:{line:36,column:18},end:{line:36,column:26}},13:{start:{line:37,column:6},end:{line:37,column:45}},14:{start:{line:41,column:18},end:{line:41,column:43}},15:{start:{line:42,column:4},end:{line:42,column:26}},16:{start:{line:43,column:4},end:{line:51,column:7}},17:{start:{line:46,column:6},end:{line:50,column:7}},18:{start:{line:47,column:8},end:{line:47,column:35}},19:{start:{line:48,column:13},end:{line:50,column:7}},20:{start:{line:49,column:8},end:{line:49,column:36}},21:{start:{line:54,column:22},end:{line:54,column:32}},22:{start:{line:55,column:27},end:{line:57,column:6}},23:{start:{line:56,column:6},end:{line:56,column:42}},24:{start:{line:58,column:19},end:{line:84,column:6}},25:{start:{line:59,column:6},end:{line:83,column:7}},26:{start:{line:60,column:8},end:{line:70,column:10}},27:{start:{line:66,column:29},end:{line:66,column:51}},28:{start:{line:72,column:8},end:{line:82,column:10}},29:{start:{line:85,column:4},end:{line:85,column:89}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:21},end:{line:17,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:48},end:{line:33,column:3}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:21,column:39},end:{line:21,column:40}},loc:{start:{line:21,column:49},end:{line:28,column:5}},line:21},3:{name:"(anonymous_3)",decl:{start:{line:34,column:2},end:{line:34,column:3}},loc:{start:{line:34,column:20},end:{line:39,column:3}},line:34},4:{name:"(anonymous_4)",decl:{start:{line:35,column:53},end:{line:35,column:54}},loc:{start:{line:35,column:63},end:{line:38,column:5}},line:35},5:{name:"(anonymous_5)",decl:{start:{line:40,column:2},end:{line:40,column:3}},loc:{start:{line:40,column:29},end:{line:52,column:3}},line:40},6:{name:"(anonymous_6)",decl:{start:{line:45,column:7},end:{line:45,column:8}},loc:{start:{line:45,column:13},end:{line:51,column:5}},line:45},7:{name:"(anonymous_7)",decl:{start:{line:53,column:2},end:{line:53,column:3}},loc:{start:{line:53,column:11},end:{line:86,column:3}},line:53},8:{name:"(anonymous_8)",decl:{start:{line:55,column:60},end:{line:55,column:61}},loc:{start:{line:55,column:69},end:{line:57,column:5}},line:55},9:{name:"(anonymous_9)",decl:{start:{line:58,column:59},end:{line:58,column:60}},loc:{start:{line:58,column:69},end:{line:84,column:5}},line:58},10:{name:"(anonymous_10)",decl:{start:{line:66,column:22},end:{line:66,column:23}},loc:{start:{line:66,column:29},end:{line:66,column:51}},line:66}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:22,column:6},end:{line:27,column:7}},{start:{line:24,column:13},end:{line:27,column:7}}],line:22},1:{loc:{start:{line:37,column:15},end:{line:37,column:43}},type:"binary-expr",locations:[{start:{line:37,column:15},end:{line:37,column:29}},{start:{line:37,column:33},end:{line:37,column:43}}],line:37},2:{loc:{start:{line:46,column:6},end:{line:50,column:7}},type:"if",locations:[{start:{line:46,column:6},end:{line:50,column:7}},{start:{line:48,column:13},end:{line:50,column:7}}],line:46},3:{loc:{start:{line:46,column:10},end:{line:46,column:55}},type:"binary-expr",locations:[{start:{line:46,column:10},end:{line:46,column:32}},{start:{line:46,column:36},end:{line:46,column:55}}],line:46},4:{loc:{start:{line:48,column:13},end:{line:50,column:7}},type:"if",locations:[{start:{line:48,column:13},end:{line:50,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},5:{loc:{start:{line:55,column:27},end:{line:57,column:6}},type:"binary-expr",locations:[{start:{line:55,column:27},end:{line:55,column:43}},{start:{line:55,column:47},end:{line:57,column:6}}],line:55},6:{loc:{start:{line:56,column:13},end:{line:56,column:41}},type:"binary-expr",locations:[{start:{line:56,column:13},end:{line:56,column:23}},{start:{line:56,column:27},end:{line:56,column:41}}],line:56},7:{loc:{start:{line:59,column:6},end:{line:83,column:7}},type:"if",locations:[{start:{line:59,column:6},end:{line:83,column:7}},{start:{line:71,column:13},end:{line:83,column:7}}],line:59},8:{loc:{start:{line:63,column:21},end:{line:63,column:91}},type:"cond-expr",locations:[{start:{line:63,column:61},end:{line:63,column:67}},{start:{line:63,column:70},end:{line:63,column:91}}],line:63},9:{loc:{start:{line:63,column:21},end:{line:63,column:58}},type:"binary-expr",locations:[{start:{line:63,column:21},end:{line:63,column:35}},{start:{line:63,column:39},end:{line:63,column:58}}],line:63},10:{loc:{start:{line:65,column:22},end:{line:65,column:51}},type:"cond-expr",locations:[{start:{line:65,column:39},end:{line:65,column:43}},{start:{line:65,column:46},end:{line:65,column:51}}],line:65},11:{loc:{start:{line:67,column:26},end:{line:67,column:70}},type:"binary-expr",locations:[{start:{line:67,column:26},end:{line:67,column:50}},{start:{line:67,column:54},end:{line:67,column:70}}],line:67},12:{loc:{start:{line:75,column:21},end:{line:75,column:91}},type:"cond-expr",locations:[{start:{line:75,column:61},end:{line:75,column:67}},{start:{line:75,column:70},end:{line:75,column:91}}],line:75},13:{loc:{start:{line:75,column:21},end:{line:75,column:58}},type:"binary-expr",locations:[{start:{line:75,column:21},end:{line:75,column:35}},{start:{line:75,column:39},end:{line:75,column:58}}],line:75},14:{loc:{start:{line:77,column:22},end:{line:77,column:51}},type:"cond-expr",locations:[{start:{line:77,column:39},end:{line:77,column:43}},{start:{line:77,column:46},end:{line:77,column:51}}],line:77},15:{loc:{start:{line:79,column:26},end:{line:79,column:70}},type:"binary-expr",locations:[{start:{line:79,column:26},end:{line:79,column:50}},{start:{line:79,column:54},end:{line:79,column:70}}],line:79}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputArray.tsx"],names:[],mappings:"AA0Fe;AA1Ff,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AAiBxB,qBAAqB,mBAAmB,MAAM,UAA4C;AAAA,EACxF,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,IACR,SAAS,CAAC;AAAA,EACZ;AAAA,EAEA,YAAa,OAAwB;AACnC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,OAAO,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA;AAAA,MAE/B,mBAAmB,KAAK,MAAM,MAAM,MAAM,CAAC;AAAA,IAC7C;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAkC,OAAwB;AACxF,UAAM,QAAe,CAAC;AACtB,UAAM,oBAAoB,MAAM,kBAAkB,MAAM,CAAC;AAEzD,UAAM,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC3C,UAAI,MAAM,MAAM,CAAC,MAAM,MAAM,kBAAkB,CAAC,GAAG;AACjD,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MAC1B,OACK;AACH,cAAM,CAAC,IAAI,MAAM,MAAM,CAAC;AACxB,0BAAkB,CAAC,IAAI,MAAM,MAAM,CAAC;AAAA,MACtC;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,WAAW,OAAkB;AAC3B,WAAO,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM;AACzD,YAAM,MAAM,MAAM,CAAC;AACnB,aAAO,EAAE,QAAQ,UAAa,QAAQ;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,YAAY,KAAa,UAAuC;AAC9D,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,CAAC;AACtC,UAAM,GAAG,IAAI;AAEb,SAAK,SAAS;AAAA,MACZ;AAAA,IACF,GAAG,MAAM;AACP,UAAI,KAAK,WAAW,KAAK,KAAK,KAAK,MAAM,UAAU;AACjD,aAAK,MAAM,SAAS,KAAK;AAAA,MAC3B,WACS,KAAK,MAAM,UAAS;AAE3B,aAAK,MAAM,SAAS,MAAS;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,MAAK,IAAI,KAAK;AAErB,UAAM,iBACJ,MAAM,SAAS,KACf,CAAC,MAAM,MAAM,SAAO;AAClB,aAAQ,QAAQ,MAAM,QAAQ;AAAA,IAChC,CAAC;AAGH,UAAM,SAAS,MAAM,KAAK,MAAM,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,CAAC,GAAG,MAAM;AAC/D,UAAG,KAAK,MAAM,SAAS,UAAU;AAC/B,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,CAAC,MAAM,KAAK,YAAY,GAAG,CAAC;AAAA,YACtC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF,OAAO;AACL,eAAO;AAAA,UAAC;AAAA;AAAA,YAEN,SAAS,kBAAkB,CAAC,KAAK,MAAM,UAAU,SAAY,KAAK,MAAM,QAAQ,CAAC;AAAA,YACjF,OAAO,MAAM,CAAC;AAAA,YACd,UAAU,iBAAiB,OAAO;AAAA,YAClC,UAAU,KAAK,YAAY,KAAK,MAAM,CAAC;AAAA,YACvC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA;AAAA,UAL9C;AAAA,QAMP;AAAA,MACF;AAAA,IACF,CAAC;AAED,WACE,oBAAC,SAAI,WAAU,kBACZ,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9ed81d69001830f70ea45ac1502cde5125167d89"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Xr=function(){return a},a}Xr();var HE;let yW=(HE=class extends rr.Component{constructor(e){Xr().f[0]++,Xr().s[1]++,super(e),Xr().s[2]++,this.state={value:this.props.value.slice(0),initialPropsValue:this.props.value.slice(0)}}static getDerivedStateFromProps(e,t){Xr().f[1]++;const r=(Xr().s[3]++,[]),i=(Xr().s[4]++,t.initialPropsValue.slice(0));return Xr().s[5]++,Array(e.length).fill(null).map((s,a)=>{Xr().f[2]++,Xr().s[6]++,e.value[a]===t.initialPropsValue[a]?(Xr().b[0][0]++,Xr().s[7]++,r[a]=t.value[a]):(Xr().b[0][1]++,Xr().s[8]++,r[a]=t.value[a],Xr().s[9]++,i[a]=t.value[a])}),Xr().s[10]++,{value:r,initialPropsValue:i}}isComplete(e){return Xr().f[3]++,Xr().s[11]++,Array(this.props.length).fill(null).every((t,r)=>{Xr().f[4]++;const i=(Xr().s[12]++,e[r]);return Xr().s[13]++,Xr().b[1][0]++,!(i===void 0||(Xr().b[1][1]++,i===""))})}changeValue(e,t){Xr().f[5]++;const r=(Xr().s[14]++,this.state.value.slice(0));Xr().s[15]++,r[e]=t,Xr().s[16]++,this.setState({value:r},()=>{Xr().f[6]++,Xr().s[17]++,Xr().b[3][0]++,this.isComplete(r)&&(Xr().b[3][1]++,this.props.onChange)?(Xr().b[2][0]++,Xr().s[18]++,this.props.onChange(r)):(Xr().b[2][1]++,Xr().s[19]++,this.props.onChange?(Xr().b[4][0]++,Xr().s[20]++,this.props.onChange(void 0)):Xr().b[4][1]++)})}render(){Xr().f[7]++;const{value:e}=(Xr().s[21]++,this.state),t=(Xr().s[22]++,Xr().b[5][0]++,e.length>0&&(Xr().b[5][1]++,!e.every(i=>(Xr().f[8]++,Xr().s[23]++,Xr().b[6][0]++,i===""||(Xr().b[6][1]++,i===void 0))))),r=(Xr().s[24]++,Array(this.props.length).fill(null).map((i,s)=>(Xr().f[9]++,Xr().s[25]++,this.props.type==="number"?(Xr().b[7][0]++,Xr().s[26]++,le.jsx(rm,{default:(Xr().b[9][0]++,t||(Xr().b[9][1]++,!this.props.default)?(Xr().b[8][0]++,void 0):(Xr().b[8][1]++,this.props.default[s])),value:e[s],required:t?(Xr().b[10][0]++,!0):(Xr().b[10][1]++,!1),onChange:a=>(Xr().f[10]++,Xr().s[27]++,this.changeValue(s,a)),"aria-label":(Xr().b[11][0]++,this.props["aria-label"]||(Xr().b[11][1]++,this.props.label))},s)):(Xr().b[7][1]++,Xr().s[28]++,le.jsx(If,{default:(Xr().b[13][0]++,t||(Xr().b[13][1]++,!this.props.default)?(Xr().b[12][0]++,void 0):(Xr().b[12][1]++,this.props.default[s])),value:e[s],required:t?(Xr().b[14][0]++,!0):(Xr().b[14][1]++,!1),onChange:this.changeValue.bind(this,s),"aria-label":(Xr().b[15][0]++,this.props["aria-label"]||(Xr().b[15][1]++,this.props.label))},s)))));return Xr().s[29]++,le.jsx("div",{className:"maputnik-array",children:r})}},kn(HE,"defaultProps",(Xr().s[0]++,{value:[],default:[]})),HE);function tA(){var n="/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",e="c4660c9ecb80d9f1ce71e70441154e1e765b77ab",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx",statementMap:{0:{start:{line:6,column:18},end:{line:6,column:36}},1:{start:{line:7,column:4},end:{line:9,column:5}},2:{start:{line:8,column:6},end:{line:8,column:43}},3:{start:{line:8,column:35},end:{line:8,column:41}},4:{start:{line:10,column:26},end:{line:10,column:59}},5:{start:{line:11,column:19},end:{line:32,column:6}},6:{start:{line:12,column:6},end:{line:31,column:8}},7:{start:{line:22,column:34},end:{line:22,column:58}},8:{start:{line:33,column:4},end:{line:33,column:140}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:5,column:2},end:{line:5,column:3}},loc:{start:{line:5,column:11},end:{line:34,column:3}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:8,column:28},end:{line:8,column:29}},loc:{start:{line:8,column:35},end:{line:8,column:41}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:31},end:{line:11,column:32}},loc:{start:{line:11,column:49},end:{line:32,column:5}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:22,column:26},end:{line:22,column:27}},loc:{start:{line:22,column:34},end:{line:22,column:58}},line:22}},branchMap:{0:{loc:{start:{line:7,column:4},end:{line:9,column:5}},type:"if",locations:[{start:{line:7,column:4},end:{line:9,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:7},1:{loc:{start:{line:7,column:8},end:{line:7,column:56}},type:"binary-expr",locations:[{start:{line:7,column:8},end:{line:7,column:26}},{start:{line:7,column:30},end:{line:7,column:56}}],line:7},2:{loc:{start:{line:10,column:26},end:{line:10,column:59}},type:"binary-expr",locations:[{start:{line:10,column:26},end:{line:10,column:42}},{start:{line:10,column:46},end:{line:10,column:59}}],line:10}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputMultiInput.tsx"],names:[],mappings:"AAoBa,SAIL,KAJK;AApBb,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAUvB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,QAAI,UAAU,KAAK,MAAM;AACzB,QAAG,QAAQ,SAAS,KAAK,CAAC,MAAM,QAAQ,QAAQ,CAAC,CAAC,GAAG;AACnD,gBAAU,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,IACnC;AAEA,UAAM,gBAAgB,KAAK,MAAM,SAAS,QAAQ,CAAC,EAAE,CAAC;AACtD,UAAM,SAAS,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MAAK;AAC1C,aAAO;AAAA,QAAC;AAAA;AAAA,UAEN,WAAW,WAAW,4BAA4B,EAAC,4BAA4B,QAAQ,cAAa,CAAC;AAAA,UAErG;AAAA;AAAA,cAAC;AAAA;AAAA,gBAAM,MAAK;AAAA,gBACV,MAAM,KAAK,MAAM;AAAA,gBACjB,UAAU,QAAM,KAAK,MAAM,SAAS,GAAG;AAAA,gBACvC,OAAO;AAAA,gBACP,SAAS,QAAQ;AAAA;AAAA,YACnB;AAAA,YACC;AAAA;AAAA;AAAA,QATI;AAAA,MAUP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,cAAS,WAAU,wBAAuB,cAAY,KAAK,MAAM,YAAY,GAClF,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c4660c9ecb80d9f1ce71e70441154e1e765b77ab"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return tA=function(){return a},a}tA();class xce extends rr.Component{render(){tA().f[0]++;let e=(tA().s[0]++,this.props.options);tA().s[1]++,tA().b[1][0]++,e.length>0&&(tA().b[1][1]++,!Array.isArray(e[0]))?(tA().b[0][0]++,tA().s[2]++,e=e.map(i=>(tA().f[1]++,tA().s[3]++,[i,i]))):tA().b[0][1]++;const t=(tA().s[4]++,tA().b[2][0]++,this.props.value||(tA().b[2][1]++,e[0][0])),r=(tA().s[5]++,e.map(([i,s])=>(tA().f[2]++,tA().s[6]++,le.jsxs("label",{className:tm("maputnik-radio-as-button",{"maputnik-button-selected":i===t}),children:[le.jsx("input",{type:"radio",name:this.props.name,onChange:a=>(tA().f[3]++,tA().s[7]++,this.props.onChange(i)),value:i,checked:i===t}),s]},i))));return tA().s[8]++,le.jsx("fieldset",{className:"maputnik-multibutton","aria-label":this.props["aria-label"],children:r})}}function Fl(){var n="/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",e="d905b5da4422f2b84d44f87b04fda3de421542f5",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx",statementMap:{0:{start:{line:6,column:12},end:{line:6,column:13}},1:{start:{line:7,column:2},end:{line:9,column:5}},2:{start:{line:8,column:4},end:{line:8,column:24}},3:{start:{line:10,column:2},end:{line:10,column:13}},4:{start:{line:14,column:54},end:{line:14,column:64}},5:{start:{line:15,column:4},end:{line:36,column:5}},6:{start:{line:16,column:6},end:{line:25,column:8}},7:{start:{line:27,column:6},end:{line:35,column:8}}},fnMap:{0:{name:"optionsLabelLength",decl:{start:{line:5,column:9},end:{line:5,column:27}},loc:{start:{line:5,column:37},end:{line:11,column:1}},line:5},1:{name:"(anonymous_1)",decl:{start:{line:7,column:18},end:{line:7,column:19}},loc:{start:{line:7,column:34},end:{line:9,column:3}},line:7},2:{name:"(anonymous_2)",decl:{start:{line:13,column:2},end:{line:13,column:3}},loc:{start:{line:13,column:11},end:{line:37,column:3}},line:13}},branchMap:{0:{loc:{start:{line:15,column:4},end:{line:36,column:5}},type:"if",locations:[{start:{line:15,column:4},end:{line:36,column:5}},{start:{line:26,column:11},end:{line:36,column:5}}],line:15},1:{loc:{start:{line:15,column:8},end:{line:15,column:64}},type:"binary-expr",locations:[{start:{line:15,column:8},end:{line:15,column:27}},{start:{line:15,column:31},end:{line:15,column:64}}],line:15},2:{loc:{start:{line:21,column:17},end:{line:21,column:44}},type:"binary-expr",locations:[{start:{line:21,column:17},end:{line:21,column:22}},{start:{line:21,column:26},end:{line:21,column:44}}],line:21},3:{loc:{start:{line:23,column:24},end:{line:23,column:57}},type:"binary-expr",locations:[{start:{line:23,column:24},end:{line:23,column:48}},{start:{line:23,column:52},end:{line:23,column:57}}],line:23},4:{loc:{start:{line:31,column:17},end:{line:31,column:44}},type:"binary-expr",locations:[{start:{line:31,column:17},end:{line:31,column:22}},{start:{line:31,column:26},end:{line:31,column:44}}],line:31},5:{loc:{start:{line:33,column:24},end:{line:33,column:57}},type:"binary-expr",locations:[{start:{line:33,column:24},end:{line:33,column:48}},{start:{line:33,column:52},end:{line:33,column:57}}],line:33}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputEnum.tsx"],names:[],mappings:"AAgCa;AAhCb,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAG5B,SAAS,mBAAmB,SAAgB;AAC1C,MAAI,MAAM;AACV,UAAQ,QAAQ,CAAC,CAAC,GAAG,KAAK,MAAM;AAC9B,WAAO,MAAM;AAAA,EACf,CAAC;AACD,SAAO;AACT;AAgBA,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,EAAC,SAAS,OAAO,UAAU,MAAM,MAAK,IAAI,KAAK;AAErD,QAAG,QAAQ,UAAU,KAAK,mBAAmB,OAAO,KAAK,IAAI;AAC3D,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF,OAAO;AACL,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,OAAQ,SAAS,KAAK,MAAM;AAAA,UAC5B;AAAA,UACA,cAAY,KAAK,MAAM,YAAY,KAAK;AAAA;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d905b5da4422f2b84d44f87b04fda3de421542f5"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Fl=function(){return a},a}Fl();function wce(n){Fl().f[0]++;let e=(Fl().s[0]++,0);return Fl().s[1]++,n.forEach(([t,r])=>{Fl().f[1]++,Fl().s[2]++,e+=r.length}),Fl().s[3]++,e}class G8 extends rr.Component{render(){Fl().f[2]++;const{options:e,value:t,onChange:r,name:i,label:s}=(Fl().s[4]++,this.props);return Fl().s[5]++,Fl().b[1][0]++,e.length<=3&&(Fl().b[1][1]++,wce(e)<=20)?(Fl().b[0][0]++,Fl().s[6]++,le.jsx(xce,{name:i,options:e,value:(Fl().b[2][0]++,t||(Fl().b[2][1]++,this.props.default)),onChange:r,"aria-label":(Fl().b[3][0]++,this.props["aria-label"]||(Fl().b[3][1]++,s))})):(Fl().b[0][1]++,Fl().s[7]++,le.jsx(Ng,{options:e,value:(Fl().b[4][0]++,t||(Fl().b[4][1]++,this.props.default)),onChange:r,"aria-label":(Fl().b[5][0]++,this.props["aria-label"]||(Fl().b[5][1]++,s))}))}}function Ay(){var n="/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",e="d603f5ded455e8f3bb5709d22f215a115aa4ac65",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:4},end:{line:12,column:9}},2:{start:{line:15,column:19},end:{line:15,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:13,column:3}},line:6}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SmallError.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,WAAW;AAClB,SAA0B,uBAAuB;AACjD,OAAO;AAOP,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAU;AACR,UAAM,IAAI,KAAK,MAAM;AACrB,WACE,qBAAC,SAAI,WAAU,cACZ;AAAA,QAAE,QAAQ;AAAA,MAAE;AAAA,MAAE,KAAK,MAAM;AAAA,OAC5B;AAAA,EAEJ;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d603f5ded455e8f3bb5709d22f215a115aa4ac65"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Ay=function(){return a},a}Ay();class Mce extends rr.Component{render(){Ay().f[0]++;const e=(Ay().s[0]++,this.props.t);return Ay().s[1]++,le.jsxs("div",{className:"SmallError",children:[e("Error:")," ",this.props.children]})}}const JS=(Ay().s[2]++,$s()(Mce));function no(){var n="/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",e="b8761d76778c2aebcb896575c951cf64cf76ecb7",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputUrl.tsx",statementMap:{0:{start:{line:7,column:2},end:{line:9,column:3}},1:{start:{line:8,column:4},end:{line:8,column:11}},2:{start:{line:11,column:22},end:{line:18,column:3}},3:{start:{line:12,column:4},end:{line:17,column:5}},4:{start:{line:13,column:21},end:{line:13,column:34}},5:{start:{line:14,column:6},end:{line:14,column:29}},6:{start:{line:16,column:6},end:{line:16,column:20}},7:{start:{line:19,column:19},end:{line:19,column:35}},8:{start:{line:20,column:16},end:{line:20,column:53}},9:{start:{line:21,column:2},end:{line:41,column:3}},10:{start:{line:22,column:4},end:{line:34,column:5}},11:{start:{line:23,column:6},end:{line:26,column:14}},12:{start:{line:28,column:6},end:{line:33,column:14}},13:{start:{line:35,column:9},end:{line:41,column:3}},14:{start:{line:36,column:4},end:{line:40,column:12}},15:{start:{line:42,column:2},end:{line:42,column:15}},16:{start:{line:45,column:24},end:{line:48,column:3}},17:{start:{line:50,column:4},end:{line:50,column:17}},18:{start:{line:51,column:4},end:{line:53,column:6}},19:{start:{line:55,column:12},end:{line: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,MAAM;AACX,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:"b8761d76778c2aebcb896575c951cf64cf76ecb7"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return no=function(){return a},a}no();function eE(n,e){if(no().f[0]++,no().s[0]++,n===""){no().b[0][0]++,no().s[1]++;return}else no().b[0][1]++;let t;no().s[2]++;const r=a=>{no().f[1]++,no().s[3]++;try{const o=(no().s[4]++,new URL(a));return no().s[5]++,o.protocol}catch{no().s[6]++;return}},i=(no().s[7]++,r(n)),s=(no().s[8]++,window.location.protocol==="https:");return no().s[9]++,i?(no().b[1][1]++,no().s[13]++,no().b[4][0]++,i&&(no().b[4][1]++,i==="http:")&&(no().b[4][2]++,window.location.protocol==="https:")?(no().b[3][0]++,no().s[14]++,t=le.jsx(JS,{children:le.jsxs(M0,{t:e,children:["CORS policy won't allow fetching resources served over http from https, use a ",le.jsx("code",{children:"https://"})," domain"]})})):no().b[3][1]++):(no().b[1][0]++,no().s[10]++,s?(no().b[2][0]++,no().s[11]++,t=le.jsx(JS,{children:le.jsxs(M0,{t:e,children:["Must provide protocol: ",le.jsx("code",{children:"https://"})]})})):(no().b[2][1]++,no().s[12]++,t=le.jsx(JS,{children:le.jsxs(M0,{t:e,children:["Must provide protocol: ",le.jsx("code",{children:"http://"})," or ",le.jsx("code",{children:"https://"})]})}))),no().s[15]++,t}class vW extends rr.Component{constructor(t){no().f[3]++,no().s[17]++;super(t);kn(this,"onInput",(no().s[19]++,t=>{no().f[4]++,no().s[20]++,this.setState({error:eE(t,this.props.t)}),no().s[21]++,this.props.onInput?(no().b[5][0]++,no().s[22]++,this.props.onInput(t)):no().b[5][1]++}));kn(this,"onChange",(no().s[23]++,t=>{no().f[5]++,no().s[24]++,this.setState({error:eE(t,this.props.t)}),no().s[25]++,this.props.onChange(t)}));no().s[18]++,this.state={error:eE(t.value,t.t)}}render(){return no().f[6]++,no().s[26]++,le.jsxs("div",{children:[le.jsx(If,{...this.props,onInput:this.onInput,onChange:this.onChange,"aria-label":this.props["aria-label"]}),this.state.error]})}}kn(vW,"defaultProps",(no().s[16]++,{onInput:()=>{no().f[2]++}}));const Q8=(no().s[27]++,$s()(vW));function jr(){var n="/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",e="b43f9efa2bc6409a39f030c91aca2fefba2121b9",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputDynamicArray.tsx",statementMap:{0:{start:{line:14,column:19},end:{line:14,column:39}},1:{start:{line:15,column:4},end:{line:15,column:27}},2:{start:{line:16,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return jr=function(){return a},a}jr();class Sce extends rr.Component{constructor(){super(...arguments);kn(this,"addValue",(jr().s[5]++,()=>{jr().f[2]++;const t=(jr().s[6]++,this.values.slice(0));if(jr().s[7]++,this.props.type==="number")jr().b[2][0]++,jr().s[8]++,t.push(0);else if(jr().b[2][1]++,jr().s[9]++,this.props.type==="url")jr().b[3][0]++,jr().s[10]++,t.push("");else if(jr().b[3][1]++,jr().s[11]++,this.props.type==="enum"){jr().b[4][0]++;const{fieldSpec:r}=(jr().s[12]++,this.props),i=(jr().s[13]++,Object.keys(r.values)[0]);jr().s[14]++,t.push(i)}else jr().b[4][1]++,jr().s[15]++,t.push("");jr().s[16]++,this.props.onChange?(jr().b[5][0]++,jr().s[17]++,this.props.onChange(t)):jr().b[5][1]++}))}changeValue(t,r){jr().f[0]++;const i=(jr().s[0]++,this.values.slice(0));jr().s[1]++,i[t]=r,jr().s[2]++,this.props.onChange?(jr().b[0][0]++,jr().s[3]++,this.props.onChange(i)):jr().b[0][1]++}get values(){return jr().f[1]++,jr().s[4]++,jr().b[1][0]++,this.props.value||(jr().b[1][1]++,this.props.default)||(jr().b[1][2]++,[])}deleteValue(t){jr().f[3]++;const r=(jr().s[18]++,this.values.slice(0));jr().s[19]++,r.splice(t,1),jr().s[20]++,this.props.onChange?(jr().b[6][0]++,jr().s[21]++,this.props.onChange(r.length>0?(jr().b[7][0]++,r):(jr().b[7][1]++,void 0))):jr().b[6][1]++}render(){jr().f[4]++;const t=(jr().s[22]++,this.props.t),r=(jr().s[23]++,{t,i18n:this.props.i18n,tReady:this.props.tReady}),i=(jr().s[24]++,this.values.map((s,a)=>{var g;jr().f[5]++;const o=(jr().s[25]++,le.jsx(Ece,{onClick:this.deleteValue.bind(this,a),...r}));let d;if(jr().s[26]++,this.props.type==="url")jr().b[8][0]++,jr().s[27]++,d=le.jsx(Q8,{value:s,onChange:this.changeValue.bind(this,a),"aria-label":(jr().b[9][0]++,this.props["aria-label"]||(jr().b[9][1]++,this.props.label))});else if(jr().b[8][1]++,jr().s[28]++,this.props.type==="number")jr().b[10][0]++,jr().s[29]++,d=le.jsx(rm,{value:s,onChange:this.changeValue.bind(this,a),"aria-label":(jr().b[11][0]++,this.props["aria-label"]||(jr().b[11][1]++,this.props.label))});else if(jr().b[10][1]++,jr().s[30]++,this.props.type==="enum"){jr().b[12][0]++;const b=(jr().s[31]++,Object.keys((g=this.props.fieldSpec)==null?void 0:g.values).map(E=>(jr().f[6]++,jr().s[32]++,[E,M8(E)])));jr().s[33]++,d=le.jsx(G8,{options:b,value:s,onChange:this.changeValue.bind(this,a),"aria-label":(jr().b[13][0]++,this.props["aria-label"]||(jr().b[13][1]++,this.props.label))})}else jr().b[12][1]++,jr().s[34]++,d=le.jsx(If,{value:s,onChange:this.changeValue.bind(this,a),"aria-label":(jr().b[14][0]++,this.props["aria-label"]||(jr().b[14][1]++,this.props.label))});return jr().s[35]++,le.jsxs("div",{style:this.props.style,className:"maputnik-array-block",children:[le.jsx("div",{className:"maputnik-array-block-action",children:o}),le.jsx("div",{className:"maputnik-array-block-content",children:d})]},a)}));return jr().s[36]++,le.jsxs("div",{className:"maputnik-array",children:[i,le.jsx(Va,{className:"maputnik-array-add-value",onClick:this.addValue,children:t("Add value")})]})}}const CW=(jr().s[37]++,$s()(Sce));class Ece extends rr.Component{render(){jr().f[7]++;const e=(jr().s[38]++,this.props.t);return jr().s[39]++,le.jsx(Va,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove array item"),children:le.jsx(y8,{label:le.jsx(ky,{})})})}}function ma(){var n="/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",e="cd16dc68fc42c219caf080518fd74984d4f8d81e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx",statementMap:{0:{start:{line:5,column:24},end:{line:7,column:3}},1:{start:{line:9,column:16},end:{line:9,column:60}},2:{start:{line:10,column:4},end:{line:14,column:5}},3:{start:{line:11,column:6},end:{line:11,column:28}},4:{start:{line:13,column:6},end:{line:13,column:17}},5:{start:{line:17,column:26},end:{line:17,column:46}},6:{start:{line:18,column:4},end:{line:18,column:34}},7:{start:{line:19,column:27},end:{line:19,column:92}},8:{start:{line:19,column:55},end:{line:19,column:67}},9:{start:{line:19,column:83},end:{line:19,column:91}},10:{start:{line:20,column:4},end:{line:20,column:40}},11:{start:{line:23,column:19},end:{line:39,column:6}},12:{start:{line:24,column:6},end:{line:38,column:8}},13:{start:{line:32,column:52},end:{line:32,column:58}},14:{start:{line:40,column:4},end:{line:40,column:87}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:15,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:16,column:2},end:{line:16,column:3}},loc:{start:{line:16,column:28},end:{line:21,column:3}},line:16},2:{name:"(anonymous_2)",decl:{start:{line:19,column:48},end:{line:19,column:49}},loc:{start:{line:19,column:55},end:{line:19,column:67}},line:19},3:{name:"(anonymous_3)",decl:{start:{line:19,column:76},end:{line:19,column:77}},loc:{start:{line:19,column:83},end:{line:19,column:91}},line:19},4:{name:"(anonymous_4)",decl:{start:{line:22,column:2},end:{line:22,column:3}},loc:{start:{line:22,column:11},end:{line:41,column:3}},line:22},5:{name:"(anonymous_5)",decl:{start:{line:23,column:35},end:{line:23,column:36}},loc:{start:{line:23,column:49},end:{line:39,column:5}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:32,column:45},end:{line:32,column:46}},loc:{start:{line:32,column:52},end:{line:32,column:58}},line:32}},branchMap:{0:{loc:{start:{line:9,column:16},end:{line:9,column:60}},type:"binary-expr",locations:[{start:{line:9,column:16},end:{line:9,column:32}},{start:{line:9,column:36},end:{line:9,column:54}},{start:{line:9,column:58},end:{line:9,column:60}}],line:9},1:{loc:{start:{line:10,column:4},end:{line:14,column:5}},type:"if",locations:[{start:{line:10,column:4},end:{line:14,column:5}},{start:{line:12,column:11},end:{line:14,column:5}}],line:10},2:{loc:{start:{line:30,column:28},end:{line:30,column:71}},type:"binary-expr",locations:[{start:{line:30,column:28},end:{line:30,column:52}},{start:{line:30,column:56},end:{line:30,column:71}}],line:30}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputFont.tsx"],names:[],mappings:"AA6CQ;AA7CR,OAAO,WAAW;AAClB,OAAO,uBAAuB;AAY9B,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,OAAO,eAAe;AAAA,IACpB,OAAO,CAAC;AAAA,EACV;AAAA,EAEA,IAAI,SAAS;AACX,UAAM,MAAM,KAAK,MAAM,SAAS,KAAK,MAAM,WAAW,CAAC;AAGvD,QAAI,IAAI,IAAI,SAAO,CAAC,MAAM,IAAG;AAC3B,aAAO,IAAI,OAAO,EAAE;AAAA,IACtB,OACK;AACH,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,WAAW,KAAa,UAAkB;AACxC,UAAM,gBAAgB,KAAK,OAAO,MAAM,CAAC;AACzC,kBAAc,GAAG,IAAI;AACrB,UAAM,iBAAiB,cACpB,OAAO,OAAK,MAAM,MAAS,EAC3B,OAAO,OAAK,MAAM,EAAE;AAEvB,SAAK,MAAM,SAAS,cAAc;AAAA,EACpC;AAAA,EAEA,SAAS;AACP,UAAM,SAAS,KAAK,OAAO,IAAI,CAAC,OAAO,MAAM;AAC3C,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM;AAAA,cACnD;AAAA,cACA,SAAS,KAAK,MAAM,OAAO,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA,cAC1C,UAAU,KAAK,WAAW,KAAK,MAAM,CAAC;AAAA;AAAA,UACxC;AAAA;AAAA,QAPK;AAAA,MAQP;AAAA,IACF,CAAC;AAED,WACE,oBAAC,QAAG,WAAU,iBACX,kBACH;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"cd16dc68fc42c219caf080518fd74984d4f8d81e"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ma=function(){return a},a}ma();class _W extends rr.Component{get values(){ma().f[0]++;const e=(ma().s[1]++,ma().b[0][0]++,this.props.value||(ma().b[0][1]++,this.props.default)||(ma().b[0][2]++,[]));return ma().s[2]++,e[e.length-1]!==""?(ma().b[1][0]++,ma().s[3]++,e.concat("")):(ma().b[1][1]++,ma().s[4]++,e)}changeFont(e,t){ma().f[1]++;const r=(ma().s[5]++,this.values.slice(0));ma().s[6]++,r[e]=t;const i=(ma().s[7]++,r.filter(s=>(ma().f[2]++,ma().s[8]++,s!==void 0)).filter(s=>(ma().f[3]++,ma().s[9]++,s!=="")));ma().s[10]++,this.props.onChange(i)}render(){ma().f[4]++;const e=(ma().s[11]++,this.values.map((t,r)=>{var i;return ma().f[5]++,ma().s[12]++,le.jsx("li",{children:le.jsx(zy,{"aria-label":(ma().b[2][0]++,this.props["aria-label"]||(ma().b[2][1]++,this.props.name)),value:t,options:(i=this.props.fonts)==null?void 0:i.map(s=>(ma().f[6]++,ma().s[13]++,[s,s])),onChange:this.changeFont.bind(this,r)})},r)}));return ma().s[14]++,le.jsx("ul",{className:"maputnik-font",children:e})}}kn(_W,"defaultProps",(ma().s[0]++,{fonts:[]}));function uo(){var n="/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",e="8a7e9c26497bbcdc9141a7bf10d3ed50f729d679",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx",statementMap:{0:{start:{line:13,column:23},end:{line:13,column:117}},1:{start:{line:16,column:24},end:{line:28,column:5}},2:{start:{line:26,column:30},end:{line:26,column:81}},3:{start:{line:29,column:4},end:{line:115,column:5}},4:{start:{line:31,column:8},end:{line:38,column:10}},5:{start:{line:40,column:24},end:{line:40,column:101}},6:{start:{line:40,column:82},end:{line:40,column:100}},7:{start:{line:41,column:8},end:{line:47,column:10}},8:{start:{line:52,column:8},end:{line:68,column:9}},9:{start:{line:53,column:26},end:{line:53,column:59}},10:{start:{line:54,column:10},end:{line:60,column:12}},11:{start:{line:58,column:42},end:{line:58,column:48}},12:{start:{line:62,column:10},end:{line:67,column:12}},13:{start:{line:70,column:8},end:{line:75,column:10}},14:{start:{line:77,column:8},end:{line:82,column:10}},15:{start:{line:84,column:8},end:{line:112,column:9}},16:{start:{line:85,column:10},end:{line:91,column:12}},17:{start:{line:93,column:10},end:{line:111,column:11}},18:{start:{line:94,column:12},end:{line:101,column:14}},19:{start:{line:103,column:12},end:{line:110,column:14}},20:{start:{line:114,column:8},end:{line:114,column:20}},21:{start:{line:118,column:4},end:{line:118,column:124}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:15},end:{line:116,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:26,column:16},end:{line:26,column:17}},loc:{start:{line:26,column:30},end:{line:26,column:81}},line:26},2:{name:"(anonymous_2)",decl:{start:{line:40,column:75},end:{line:40,column:76}},loc:{start:{line:40,column:82},end:{line:40,column:100}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:58,column:35},end:{line:58,column:36}},loc:{start:{line:58,column:42},end:{line:58,column:48}},line:58},4:{name:"(anonymous_4)",decl:{start:{line:117,column:2},end:{line:117,column:3}},loc:{start:{line:117,column:11},end:{line:119,column:3}},line:117}},branchMap:{0:{loc:{start:{line:29,column:4},end:{line:115,column:5}},type:"switch",locations:[{start:{line:30,column:6},end:{line:38,column:10}},{start:{line:39,column:6},end:{line:48,column:7}},{start:{line:49,column:6},end:{line:49,column:27}},{start:{line:50,column:6},end:{line:50,column:23}},{start:{line:51,column:6},end:{line:68,column:9}},{start:{line:69,column:6},end:{line:75,column:10}},{start:{line:76,column:6},end:{line:82,column:10}},{start:{line:83,column:6},end:{line:112,column:9}},{start:{line:113,column:6},end:{line:114,column:20}}],line:29},1:{loc:{start:{line:40,column:36},end:{line:40,column:69}},type:"binary-expr",locations:[{start:{line:40,column:36},end:{line:40,column:63}},{start:{line:40,column:67},end:{line:40,column:69}}],line:40},2:{loc:{start:{line:52,column:8},end:{line:68,column:9}},type:"if",locations:[{start:{line:52,column:8},end:{line:68,column:9}},{start:{line:61,column:15},end:{line:68,column:9}}],line:52},3:{loc:{start:{line:53,column:26},end:{line:53,column:59}},type:"binary-expr",locations:[{start:{line:53,column:26},end:{line:53,column:53}},{start:{line:53,column:57},end:{line:53,column:59}}],line:53},4:{loc:{start:{line:84,column:8},end:{line:112,column:9}},type:"if",locations:[{start:{line:84,column:8},end:{line:112,column:9}},{start:{line:92,column:15},end:{line:112,column:9}}],line:84},5:{loc:{start:{line:93,column:10},end:{line:111,column:11}},type:"if",locations:[{start:{line:93,column:10},end:{line:111,column:11}},{start:{line:102,column:17},end:{line:111,column:11}}],line:93}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0,0,0,0,0,0,0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/InputSpec.tsx"],names:[],mappings:"AAyDM;AAzDN,OAAO,WAA6B;AAEpC,OAAO,gBAAqC;AAC5C,OAAO,iBAAuC;AAC9C,OAAO,mBAA2C;AAClD,OAAO,iBAAuC;AAC9C,OAAO,gBAAqC;AAC5C,OAAO,uBAAmD;AAC1D,OAAO,eAAmC;AAC1C,OAAO,uBAAmD;AAC1D,OAAO,eAAmC;AAC1C,OAAO,gBAAgB;AAEvB,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AA0BpH,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EAErE,aAAa;AACX,UAAM,cAAc;AAAA,MAClB,OAAO,KAAK,MAAM;AAAA,MAClB,WAAW,KAAK,MAAM;AAAA,MACtB,OAAO,KAAK,MAAM;AAAA,MAClB,QAAQ,KAAK,MAAM;AAAA,MACnB,OAAO,KAAK,MAAM;AAAA,MAClB,OAAO,KAAK,MAAM;AAAA,MAClB,SAAS,KAAK,MAAM,WAAW;AAAA,MAC/B,MAAM,KAAK,MAAM;AAAA,MACjB,eAAe,sBAAsB,KAAK,MAAM;AAAA,MAChD,UAAU,CAAC,aAAmE,KAAK,MAAM,SAAU,KAAK,MAAM,WAAW,QAAQ;AAAA,MACjI,cAAc,KAAK,MAAM,YAAY;AAAA,IACvC;AACA,YAAO,KAAK,MAAM,WAAW,MAAM;AAAA,MACnC,KAAK;AAAU,eACb;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACJ,KAAK,KAAK,MAAM,UAAU;AAAA,YAC1B,KAAK,KAAK,MAAM,UAAU;AAAA;AAAA,QAC5B;AAAA,MAEF,KAAK,QAAQ;AACX,cAAM,UAAU,OAAO,KAAK,KAAK,MAAM,UAAU,UAAU,CAAC,CAAC,EAAE,IAAI,OAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;AAE1F,eAAO;AAAA,UAAC;AAAA;AAAA,YACL,GAAG;AAAA,YACJ;AAAA;AAAA,QACF;AAAA,MACF;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,YAAI,eAAe,QAAQ,KAAK,MAAM,SAAU,KAAK,GAAG;AACtD,gBAAM,UAAU,KAAK,MAAM,UAAU,UAAU,CAAC;AAChD,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,SAAS,QAAQ,IAAI,OAAK,CAAC,GAAG,CAAC,CAAC;AAAA;AAAA,UAClC;AAAA,QACF,OAAO;AACL,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA;AAAA,UACN;AAAA,QACF;AAAA,MACF,KAAK;AAAS,eACZ;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AAAW,eACd;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,MAEF,KAAK;AACH,YAAG,KAAK,MAAM,cAAc,aAAa;AACvC,iBAAO;AAAA,YAAC;AAAA;AAAA,cACL,GAAG;AAAA,cACJ,OAAO,KAAK,MAAM,UAAU;AAAA;AAAA,UAC9B;AAAA,QACF,OAAO;AACL,cAAI,KAAK,MAAM,UAAU,QAAQ;AAC/B,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,MAAM,KAAK,MAAM,UAAU;AAAA,gBAC3B,QAAQ,KAAK,MAAM,UAAU;AAAA;AAAA,YAC/B;AAAA,UACF,OAAO;AACL,mBAAO;AAAA,cAAC;AAAA;AAAA,gBACL,GAAG;AAAA,gBACJ,WAAW,KAAK,MAAM;AAAA,gBACtB,MAAM,KAAK,MAAM,UAAU;AAAA;AAAA,YAC7B;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAS,eAAO;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WACE,oBAAC,SAAI,eAAa,gBAAc,KAAK,MAAM,WACxC,eAAK,WAAW,GACnB;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8a7e9c26497bbcdc9141a7bf10d3ed50f729d679"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return uo=function(){return a},a}uo();const Bce=(uo().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);let cy=class extends rr.Component{childNodes(){var t,r;uo().f[0]++;const e=(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:(t=this.props.fieldSpec)==null?void 0:t.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]++,(r=this.props.fieldSpec)==null?void 0:r.type){case"number":return uo().b[0][0]++,uo().s[4]++,le.jsx(rm,{...e,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(s=>(uo().f[2]++,uo().s[6]++,[s,M8(s)])));return uo().s[7]++,le.jsx(G8,{...e,options:i})}case"resolvedImage":uo().b[0][2]++;case"formatted":uo().b[0][3]++;case"string":if(uo().b[0][4]++,uo().s[8]++,Bce.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]++,le.jsx(zy,{...e,options:i.map(s=>(uo().f[3]++,uo().s[11]++,[s,s]))})}else return uo().b[2][1]++,uo().s[12]++,le.jsx(If,{...e});case"color":return uo().b[0][5]++,uo().s[13]++,le.jsx(gW,{...e});case"boolean":return uo().b[0][6]++,uo().s[14]++,le.jsx(W8,{...e});case"array":return uo().b[0][7]++,uo().s[15]++,this.props.fieldName==="text-font"?(uo().b[4][0]++,uo().s[16]++,le.jsx(_W,{...e,fonts:this.props.fieldSpec.values})):(uo().b[4][1]++,uo().s[17]++,this.props.fieldSpec.length?(uo().b[5][0]++,uo().s[18]++,le.jsx(yW,{...e,type:this.props.fieldSpec.value,length:this.props.fieldSpec.length})):(uo().b[5][1]++,uo().s[19]++,le.jsx(CW,{...e,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]++,le.jsx("div",{"data-wd-key":"spec-field:"+this.props.fieldName,children:this.childNodes()})}};function UA(){var n="/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",e="81a841bc0059d656029a86501c08aa823d58e2d6",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx",statementMap:{0:{start:{line:9,column:4},end:{line:9,column:17}},1:{start:{line:10,column:4},end:{line:10,column:56}},2:{start:{line:11,column:4},end:{line:13,column:6}},3:{start:{line:15,column:16},end:{line:19,column:3}},4:{start:{line:16,column:4},end:{line:18,column:7}},5:{start:{line:21,column:4},end:{line:41,column:9}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:21},end:{line:14,column:3}},line:8},1:{name:"(anonymous_1)",decl:{start:{line:15,column:16},end:{line:15,column:17}},loc:{start:{line:15,column:25},end:{line:19,column:3}},line:15},2:{name:"(anonymous_2)",decl:{start:{line:20,column:2},end:{line:20,column:3}},loc:{start:{line:20,column:11},end:{line:42,column:3}},line:20}},branchMap:{0:{loc:{start:{line:22,column:6},end:{line:29,column:10}},type:"binary-expr",locations:[{start:{line:22,column:6},end:{line:22,column:26}},{start:{line:22,column:46},end:{line:29,column:10}}],line:22},1:{loc:{start:{line:30,column:6},end:{line:30,column:130}},type:"binary-expr",locations:[{start:{line:30,column:6},end:{line:30,column:27}},{start:{line:30,column:47},end:{line:30,column:130}}],line:30},2:{loc:{start:{line:33,column:6},end:{line:40,column:7}},type:"binary-expr",locations:[{start:{line:33,column:6},end:{line:33,column:26}},{start:{line:33,column:46},end:{line:40,column:7}}],line:33},3:{loc:{start:{line:37,column:28},end:{line:37,column:60}},type:"cond-expr",locations:[{start:{line:37,column:49},end:{line:37,column:51}},{start:{line:37,column:54},end:{line:37,column:60}}],line:37}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/Fieldset.tsx"],names:[],mappings:"AAiCW,SAGD,KAHC;AAjCX,OAAO,WAAgD;AACvD,OAAO,mBAAmB;AAC1B,OAAO,SAAS;AAChB,OAAO,sBAAsB;AAY7B,qBAAqB,iBAAiB,MAAM,UAAwC;AAAA,EAClF;AAAA,EAEA,YAAa,OAAsB;AACjC,UAAM,KAAK;AACX,SAAK,WAAW,iBAAiB,iBAAiB;AAClD,SAAK,QAAQ;AAAA,MACX,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EAEA,cAAc,CAAC,QAAiB;AAC9B,SAAK,SAAS;AAAA,MACZ,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAAA,EAEA,SAAU;AACR,WAAO,qBAAC,SAAI,WAAU,wBAAuB,MAAK,SAAQ,mBAAiB,KAAK,UAC7E;AAAA,WAAK,MAAM,aACV,oBAAC,SAAI,WAAU,8BACb;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,KAAK,MAAM;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,WAAW,KAAK,MAAM;AAAA;AAAA,MACxB,GACF;AAAA,MAED,CAAC,KAAK,MAAM,aACX,oBAAC,SAAI,WAAU,8BACZ,eAAK,MAAM,OACd;AAAA,MAEF,oBAAC,SAAI,WAAU,+BACZ,eAAK,MAAM,QACd;AAAA,MACA,oBAAC,SAAI,WAAU,gCACZ,eAAK,MAAM,UACd;AAAA,MACC,KAAK,MAAM,aACV;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,OAAO,EAAC,SAAS,KAAK,MAAM,UAAU,KAAK,OAAM;AAAA,UAEjD,8BAAC,OAAI,WAAW,KAAK,MAAM,WAAW;AAAA;AAAA,MACxC;AAAA,OAEJ;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"81a841bc0059d656029a86501c08aa823d58e2d6"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return UA=function(){return a},a}UA();class EC extends rr.Component{constructor(t){UA().f[0]++,UA().s[0]++;super(t);kn(this,"_labelId");kn(this,"onToggleDoc",(UA().s[3]++,t=>{UA().f[1]++,UA().s[4]++,this.setState({showDoc:t})}));UA().s[1]++,this._labelId=Sy("fieldset_label_"),UA().s[2]++,this.state={showDoc:!1}}render(){return UA().f[2]++,UA().s[5]++,le.jsxs("div",{className:"maputnik-input-block",role:"group","aria-labelledby":this._labelId,children:[(UA().b[0][0]++,this.props.fieldSpec&&(UA().b[0][1]++,le.jsx("div",{className:"maputnik-input-block-label",children:le.jsx(y8,{label:this.props.label,onToggleDoc:this.onToggleDoc,fieldSpec:this.props.fieldSpec})}))),(UA().b[1][0]++,!this.props.fieldSpec&&(UA().b[1][1]++,le.jsx("div",{className:"maputnik-input-block-label",children:this.props.label}))),le.jsx("div",{className:"maputnik-input-block-action",children:this.props.action}),le.jsx("div",{className:"maputnik-input-block-content",children:this.props.children}),(UA().b[2][0]++,this.props.fieldSpec&&(UA().b[2][1]++,le.jsx("div",{className:"maputnik-doc-inline",style:{display:this.state.showDoc?(UA().b[3][0]++,""):(UA().b[3][1]++,"none")},children:le.jsx(v8,{fieldSpec:this.props.fieldSpec})})))]})}}function ta(){var n="/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx",e="adadf49dc291f98804cd53f74e320ed51f276886",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx",statementMap:{0:{start:{line:6,column:16},end:{line:16,column:1}},1:{start:{line:7,column:15},end:{line:7,column:20}},2:{start:{line:8,column:27},end:{line:8,column:87}},3:{start:{line:9,column:17},end:{line:9,column:22}},4:{start:{line:10,column:15},end:{line:10,column:23}},5:{start:{line:11,column:23},end:{line:11,column:28}},6:{start:{line:12,column:16},end:{line:12,column:21}},7:{start:{line:13,column:16},end:{line:13,column:21}},8:{start:{line:14,column:19},end:{line:14,column:24}},9:{start:{line:15,column:17},end:{line:15,column:22}},10:{start:{line:19,column:22},end:{line:19,column:48}},11:{start:{line:20,column:24},end:{line:20,column:42}},12:{start:{line:22,column:4},end:{line:27,column:5}},13:{start:{line:23,column:6},end:{line:23,column:42}},14:{start:{line:25,column:6},end:{line:25,column:55}},15:{start:{line:26,column:6},end:{line:26,column:24}},16:{start:{line:28,column:4},end:{line:36,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:9},end:{line:7,column:10}},loc:{start:{line:7,column:15},end:{line:7,column:20}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:8,column:8},end:{line:8,column:9}},loc:{start:{line:8,column:27},end:{line:8,column:87}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:9,column:11},end:{line:9,column:12}},loc:{start:{line:9,column:17},end:{line:9,column:22}},line:9},3:{name:"(anonymous_3)",decl:{start:{line:10,column:9},end:{line:10,column:10}},loc:{start:{line:10,column:15},end:{line:10,column:23}},line:10},4:{name:"(anonymous_4)",decl:{start:{line:11,column:17},end:{line:11,column:18}},loc:{start:{line:11,column:23},end:{line:11,column:28}},line:11},5:{name:"(anonymous_5)",decl:{start:{line:12,column:10},end:{line:12,column:11}},loc:{start:{line:12,column:16},end:{line:12,column:21}},line:12},6:{name:"(anonymous_6)",decl:{start:{line:13,column:10},end:{line:13,column:11}},loc:{start:{line:13,column:16},end:{line:13,column:21}},line:13},7:{name:"(anonymous_7)",decl:{start:{line:14,column:13},end:{line:14,column:14}},loc:{start:{line:14,column:19},end:{line:14,column:24}},line:14},8:{name:"(anonymous_8)",decl:{start:{line:15,column:11},end:{line:15,column:12}},loc:{start:{line:15,column:17},end:{line:15,column:22}},line:15},9:{name:"(anonymous_9)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:11},end:{line:37,column:3}},line:18}},branchMap:{0:{loc:{start:{line:8,column:27},end:{line:8,column:87}},type:"cond-expr",locations:[{start:{line:8,column:71},end:{line:8,column:79}},{start:{line:8,column:82},end:{line:8,column:87}}],line:8},1:{loc:{start:{line:22,column:4},end:{line:27,column:5}},type:"if",locations:[{start:{line:22,column:4},end:{line:27,column:5}},{start:{line:24,column:11},end:{line:27,column:5}}],line:22}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/SpecField.tsx"],names:[],mappings:"AA0CM;AA1CN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,eAA0D;AACjE,OAAO,cAAc;AAGrB,MAAM,UAAU;AAAA,EACd,OAAO,MAAM;AAAA,EACb,MAAM,CAAC,EAAC,UAAS,MAAY,OAAO,KAAK,UAAU,MAAM,EAAE,UAAU,IAAI,WAAW;AAAA,EACpF,SAAS,MAAM;AAAA,EACf,OAAO,MAAM;AAAA,EACb,eAAe,MAAM;AAAA,EACrB,QAAQ,MAAM;AAAA,EACd,QAAQ,MAAM;AAAA,EACd,WAAW,MAAM;AAAA,EACjB,SAAS,MAAM;AACjB;AAMA,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,UAAM,YAAY,KAAK,MAAM,WAAW;AAExC,UAAM,cAAc,QAAQ,SAAU;AAEtC,QAAI;AACJ,QAAI,aAAa;AACf,kBAAY,YAAY,KAAK,KAAK;AAAA,IACpC,OACK;AACH,cAAQ,KAAK,yBAAyB,SAAS;AAC/C,kBAAY;AAAA,IACd;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,KAAK,MAAM;AAAA,QAClB,QAAQ,KAAK,MAAM;AAAA,QACnB,WAAW,KAAK,MAAM;AAAA,QAEtB,8BAAC,aAAW,GAAG,KAAK,OAAO;AAAA;AAAA,IAC7B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"adadf49dc291f98804cd53f74e320ed51f276886"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ta=function(){return a},a}ta();const Oce=(ta().s[0]++,{color:()=>(ta().f[0]++,ta().s[1]++,ga),enum:({fieldSpec:n})=>(ta().f[1]++,ta().s[2]++,Object.keys(n.values).length<=3?(ta().b[0][0]++,EC):(ta().b[0][1]++,ga)),boolean:()=>(ta().f[2]++,ta().s[3]++,ga),array:()=>(ta().f[3]++,ta().s[4]++,EC),resolvedImage:()=>(ta().f[4]++,ta().s[5]++,ga),number:()=>(ta().f[5]++,ta().s[6]++,ga),string:()=>(ta().f[6]++,ta().s[7]++,ga),formatted:()=>(ta().f[7]++,ta().s[8]++,ga),padding:()=>(ta().f[8]++,ta().s[9]++,ga)});class Ice extends rr.Component{render(){var i;ta().f[9]++;const e=(ta().s[10]++,(i=this.props.fieldSpec)==null?void 0:i.type),t=(ta().s[11]++,Oce[e]);let r;return ta().s[12]++,t?(ta().b[1][0]++,ta().s[13]++,r=t(this.props)):(ta().b[1][1]++,ta().s[14]++,console.warn("No such type for '%s'",e),ta().s[15]++,r=ga),ta().s[16]++,le.jsx(r,{label:this.props.label,action:this.props.action,fieldSpec:this.props.fieldSpec,children:le.jsx(cy,{...this.props})})}}function od(){var n="/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",e="e12cc9e5c91261e7ee42544334f5ab56bdde4e3a",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:11,column:4},end:{line:48,column:5}},2:{start:{line:12,column:6},end:{line:20,column:8}},3:{start:{line:21,column:6},end:{line:29,column:8}},4:{start:{line:30,column:6},end:{line:40,column:7}},5:{start:{line:31,column:8},end:{line:39,column:10}},6:{start:{line:41,column:6},end:{line:45,column:11}},7:{start:{line:47,column:6},end:{line:47,column:77}},8:{start:{line:51,column:29},end:{line:51,column:76}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:49,column:3}},line:8}},branchMap:{0:{loc:{start:{line:11,column:4},end:{line:48,column:5}},type:"if",locations:[{start:{line:11,column:4},end:{line:48,column:5}},{start:{line:46,column:11},end:{line:48,column:5}}],line:11},1:{loc:{start:{line:30,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:40,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:30}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_FunctionButtons.tsx"],names:[],mappings:"AA2BY,cAsBC,YAtBD;AA3BZ,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,aAAa,qBAAoB;AACzC,SAAQ,0BAAyB;AACjC,SAA0B,uBAAuB;AASjD,MAAM,qCAAqC,MAAM,UAA6C;AAAA,EAC5F,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,QAAI,qBAAqB,qBAAqB;AAE9C,QAAI,KAAK,MAAM,UAAU,WAAW,WAAW,SAAS,MAAM,GAAG;AAC/D,8BACE;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uBAAuB;AAAA,UAEhC,8BAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,SAAQ,GAAG,SAAQ,aAC1E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA;AAAA,MACF;AAGF,4BAAsB;AAAA,QAAC;AAAA;AAAA,UACrB,WAAU;AAAA,UACV,SAAS,KAAK,MAAM;AAAA,UACpB,OAAO,EAAE,uCAAuC;AAAA,UAEhD,8BAAC,eAAY;AAAA;AAAA,MACf;AAEA,UAAI,KAAK,MAAM,UAAU,eAAe,MAAM,eAAe;AAC3D,8BAAsB;AAAA,UAAC;AAAA;AAAA,YACrB,WAAU;AAAA,YACV,SAAS,KAAK,MAAM;AAAA,YACpB,OAAO,EAAE,mCAAmC;AAAA,YAE5C,8BAAC,iBAAc;AAAA;AAAA,QACjB;AAAA,MACF;AACA,aAAO,qBAAC,SACL;AAAA;AAAA,QACA;AAAA,QACA;AAAA,SACH;AAAA,IACF,OACK;AACH,aAAO,oBAAC,SAAK,iCAAsB;AAAA,IACrC;AAAA,EACF;AACF;AAEA,MAAM,uBAAuB,gBAAgB,EAAE,4BAA4B;AAC3E,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e12cc9e5c91261e7ee42544334f5ab56bdde4e3a"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return od=function(){return a},a}od();class kce extends rr.Component{render(){od().f[0]++;const e=(od().s[0]++,this.props.t);let t,r,i;return od().s[1]++,this.props.fieldSpec.expression.parameters.includes("zoom")?(od().b[0][0]++,od().s[2]++,i=le.jsx(Va,{className:"maputnik-make-zoom-function",onClick:this.props.onExpressionClick,title:e("Convert to expression"),children:le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"middle"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:SC})})}),od().s[3]++,t=le.jsx(Va,{className:"maputnik-make-zoom-function",onClick:this.props.onZoomClick,title:e("Convert property into a zoom function"),children:le.jsx(bH,{})}),od().s[4]++,this.props.fieldSpec["property-type"]==="data-driven"?(od().b[1][0]++,od().s[5]++,r=le.jsx(Va,{className:"maputnik-make-data-function",onClick:this.props.onDataClick,title:e("Convert property to data function"),children:le.jsx(xH,{})})):od().b[1][1]++,od().s[6]++,le.jsxs("div",{children:[i,r,t]})):(od().b[0][1]++,od().s[7]++,le.jsx("div",{children:i}))}}const Tce=(od().s[8]++,$s()(kce));function Up(){var n="/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",e="60f6f0f35f3e44d7e7f08e2966cfff09ee69557d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx",statementMap:{0:{start:{line:7,column:24},end:{line:9,column:3}},1:{start:{line:11,column:45},end:{line:11,column:55}},2:{start:{line:12,column:40},end:{line:20,column:5}},3:{start:{line:21,column:18},end:{line:21,column:53}},4:{start:{line:22,column:4},end:{line:31,column:6}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:32,column:3}},line:10}},branchMap:{0:{loc:{start:{line:28,column:34},end:{line:28,column:60}},type:"binary-expr",locations:[{start:{line:28,column:34},end:{line:28,column:54}},{start:{line:28,column:58},end:{line:28,column:60}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_SpecProperty.tsx"],names:[],mappings:"AA4BwB;AA5BxB,OAAO,WAAW;AAElB,OAAO,eAAiC;AACxC,OAAO,qBAAqB;AAE5B,OAAO,wBAAwB;AAe/B,qBAAqB,qBAAqB,MAAM,UAA6B;AAAA,EAC3E,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,QAAQ,WAAW,UAAS,IAAI,KAAK;AAE5C,UAAM,cAAc;AAAA,MAAC;AAAA;AAAA,QACnB,WAAW,KAAK,MAAM;AAAA,QACtB,aAAa,KAAK,MAAM;AAAA,QACxB,aAAa,KAAK,MAAM;AAAA,QACxB,mBAAmB,KAAK,MAAM;AAAA;AAAA,IAChC;AAEA,UAAM,QAAQ,OAAQ,YAAU,MAAI,SAAgB;AAEpD,WAAO;AAAA,MAAC;AAAA;AAAA,QACL,GAAG,KAAK;AAAA,QACT;AAAA,QACA,WAAW,KAAK,MAAM;AAAA,QACtB,OAAO,mBAAmB,KAAK,MAAM,aAAa,EAAE;AAAA,QACpD,QAAQ;AAAA;AAAA,IACV;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"60f6f0f35f3e44d7e7f08e2966cfff09ee69557d"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Up=function(){return a},a}Up();class bW extends rr.Component{render(){Up().f[0]++;const{errors:e,fieldName:t,fieldType:r}=(Up().s[1]++,this.props),i=(Up().s[2]++,le.jsx(Tce,{fieldSpec:this.props.fieldSpec,onZoomClick:this.props.onZoomClick,onDataClick:this.props.onDataClick,onExpressionClick:this.props.onExpressionClick})),s=(Up().s[3]++,e[r+"."+t]);return Up().s[4]++,le.jsx(Ice,{...this.props,error:s,fieldSpec:this.props.fieldSpec,label:Zx((Up().b[0][0]++,this.props.fieldName||(Up().b[0][1]++,""))),action:i})}}kn(bW,"defaultProps",(Up().s[0]++,{errors:{}}));function fh(){var n="/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",e="e8906f642b33ab7d7a780fc0db870f7e4872d29c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts",statementMap:{0:{start:{line:2,column:12},end:{line:2,column:17}},1:{start:{line:3,column:12},end:{line:3,column:17}},2:{start:{line:4,column:2},end:{line:10,column:3}},3:{start:{line:5,column:4},end:{line:5,column:14}},4:{start:{line:6,column:9},end:{line:10,column:3}},5:{start:{line:7,column:4},end:{line:7,column:13}},6:{start:{line:9,column:4},end:{line:9,column:13}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:1,column:15},end:{line:1,column:16}},loc:{start:{line:1,column:36},end:{line:11,column:1}},line:1}},branchMap:{0:{loc:{start:{line:4,column:2},end:{line:10,column:3}},type:"if",locations:[{start:{line:4,column:2},end:{line:10,column:3}},{start:{line:6,column:9},end:{line:10,column:3}}],line:4},1:{loc:{start:{line:6,column:9},end:{line:10,column:3}},type:"if",locations:[{start:{line:6,column:9},end:{line:10,column:3}},{start:{line:8,column:9},end:{line:10,column:3}}],line:6}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/sort-numerically.ts"],names:[],mappings:"AAAA,wBAAwB,MAAuB,MAAsB;AACnE,QAAM,IAAI,CAAC;AACX,QAAM,IAAI,CAAC;AAEX,MAAG,IAAI,GAAG;AACR,WAAO;AAAA,EACT,WACQ,IAAI,GAAG;AACb,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"e8906f642b33ab7d7a780fc0db870f7e4872d29c"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return fh=function(){return a},a}fh();function xW(n,e){fh().f[0]++;const t=(fh().s[0]++,+n),r=(fh().s[1]++,+e);return fh().s[2]++,t<r?(fh().b[0][0]++,fh().s[3]++,-1):(fh().b[0][1]++,fh().s[4]++,t>r?(fh().b[1][0]++,fh().s[5]++,1):(fh().b[1][1]++,fh().s[6]++,0))}function ep(){var n="/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",e="2f98128f0f990b67a049c58486c1fab4310fbcfa",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts",statementMap:{0:{start:{line:2,column:2},end:{line:4,column:3}},1:{start:{line:3,column:4},end:{line:3,column:24}},2:{start:{line:5,column:19},end:{line:11,column:3}},3:{start:{line:12,column:2},end:{line:12,column:35}}},fnMap:{0:{name:"findDefaultFromSpec",decl:{start:{line:1,column:16},end:{line:1,column:35}},loc:{start:{line:1,column:42},end:{line:13,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:2},end:{line:4,column:3}},type:"if",locations:[{start:{line:2,column:2},end:{line:4,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:2},1:{loc:{start:{line:12,column:9},end:{line:12,column:34}},type:"binary-expr",locations:[{start:{line:12,column:9},end:{line:12,column:28}},{start:{line:12,column:32},end:{line:12,column:34}}],line:12}},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/spec-helper.ts"],names:[],mappings:"AAGO,gBAAS,oBAAoB,MAAyE;AAC3G,MAAI,OAAO,UAAU,eAAe,KAAK,MAAM,SAAS,GAAG;AACzD,WAAO,KAAK;AAAA,EACd;AAEA,QAAM,WAAW;AAAA,IACf,SAAS;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,EACZ;AAEA,SAAO,SAAS,KAAK,IAAI,KAAK;AAChC;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f98128f0f990b67a049c58486c1fab4310fbcfa"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ep=function(){return a},a}ep();function vf(n){if(ep().f[0]++,ep().s[0]++,Object.prototype.hasOwnProperty.call(n,"default"))return ep().b[0][0]++,ep().s[1]++,n.default;ep().b[0][1]++;const e=(ep().s[2]++,{color:"#000000",string:"",boolean:!1,number:0,array:[]});return ep().s[3]++,ep().b[1][0]++,e[n.type]||(ep().b[1][1]++,"")}function dy(){var n="/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",e="04a32613b456a577be3ef20dcd48d43233f27837",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:4},end:{line:17,column:6}},2:{start:{line:20,column:25},end:{line:20,column:68}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:18,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DeleteStopButton.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,SAAQ,gBAAe;AACvB,SAA0B,uBAAuB;AAQjD,MAAM,iCAAiC,MAAM,UAAyC;AAAA,EACpF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,WAAU;AAAA,QACV,SAAS,KAAK,MAAM;AAAA,QACpB,OAAO,EAAE,6BAA6B;AAAA,QAEtC,8BAAC,YAAS;AAAA;AAAA,IACZ;AAAA,EACF;AACF;AAEA,MAAM,mBAAmB,gBAAgB,EAAE,wBAAwB;AACnE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"04a32613b456a577be3ef20dcd48d43233f27837"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return dy=function(){return a},a}dy();class Pce extends rr.Component{render(){dy().f[0]++;const e=(dy().s[0]++,this.props.t);return dy().s[1]++,le.jsx(Va,{className:"maputnik-delete-stop",onClick:this.props.onClick,title:e("Remove zoom level from stop"),children:le.jsx(ky,{})})}}const wW=(dy().s[2]++,$s()(Pce));function dn(){var n="/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",e="97b6de35ac4a8f739cf06eabc39facf249622fab",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx",statementMap:{0:{start:{line:19,column:2},end:{line:28,column:3}},1:{start:{line:20,column:4},end:{line:27,column:7}},2:{start:{line:21,column:6},end:{line:26,column:7}},3:{start:{line:22,column:8},end:{line:24,column:9}},4:{start:{line:23,column:10},end:{line:23,column:33}},5:{start:{line:25,column:8},end:{line:25,column:39}},6:{start:{line:29,column:2},end:{line:29,column:17}},7:{start:{line:32,column:10},end:{line:34,column:3}},8:{start:{line:36,column:20},end:{line:36,column:55}},9:{start:{line:37,column:4},end:{line:41,column:5}},10:{start:{line:38,column:6},end:{line:40,column:9}},11:{start:{line:44,column:20},end:{line:44,column:45}},12:{start:{line:45,column:4},end:{line:49,column:5}},13:{start:{line:46,column:6},end:{line:48,column:8}},14:{start:{line:50,column:4},end:{line:50,column:16}},15:{start:{line:53,column:4},end:{line:55,column:5}},16:{start:{line:54,column:6},end:{line:54,column:27}},17:{start:{line:56,column:4},end:{line:58,column:5}},18:{start:{line:57,column:6},end:{line:57,column:24}},19:{start:{line:59,column:4},end:{line:59,column:25}},20:{start:{line:62,column:4},end:{line:66,column:5}},21:{start:{line:63,column:6},end:{line:63,column:83}},22:{start:{line:65,column:6},end:{line:65,column:53}},23:{start:{line:70,column:26},end:{line:75,column:70}},24:{start:{line:71,column:6},end:{line:74,column:8}},25:{start:{line:75,column:22},end:{line:75,column:69}},26:{start:{line:76,column:20},end:{line:76,column:22}},27:{start:{line:77,column:4},end:{line:79,column:7}},28:{start:{line:78,column:6},end:{line:78,column:30}},29:{start:{line:80,column:4},end:{line:82,column:7}},30:{start:{line:83,column:4},end:{line:83,column:50}},31:{start:{line:83,column:39},end:{line:83,column:48}},32:{start:{line:85,column:13},end:{line:105,column:3}},33:{start:{line:86,column:4},end:{line:103,column:5}},34:{start:{line:87,column:6},end:{line:90,column:8}},35:{start:{line:92,column:24},end:{line:92,column:61}},36:{start:{line:93,column:6},end:{line:102,column:8}},37:{start:{line:104,column:4},end:{line:104,column:42}},38:{start:{line:107,column:18},end:{line:107,column:56}},39:{start:{line:108,column:4},end:{line:114,column:6}},40:{start:{line:115,column:25},end:{line:115,column:53}},41:{start:{line:116,column:25},end:{line:119,column:5}},42:{start:{line:120,column:4},end:{line:120,column:54}},43:{start:{line:123,column:25},end:{line:126,column:5}},44:{start:{line:127,column:4},end:{line:129,column:5}},45:{start:{line:128,column:6},end:{line:128,column:34}},46:{start:{line:130,column:4},end:{line:130,column:60}},47:{start:{line:133,column:4},end:{line:140,column:5}},48:{start:{line:134,column:6},end:{line:134,column:42}},49:{start:{line:136,column:6},end:{line:139,column:9}},50:{start:{line:143,column:4},end:{line:147,column:5}},51:{start:{line:144,column:6},end:{line:144,column:43}},52:{start:{line:146,column:6},end:{line:146,column:40}},53:{start:{line:148,column:4},end:{line:148,column:58}},54:{start:{line:151,column:14},end:{line:151,column:26}},55:{start:{line:152,column:4},end:{line:154,column:5}},56:{start:{line:153,column:6},end:{line:153,column:78}},57:{start:{line:156,column:4},end:{line:204,column:5}},58:{start:{line:157,column:6},end:{line:203,column:9}},59:{start:{line:158,column:26},end:{line:158,column:77}},60:{start:{line:159,column:20},end:{line:159,column:40}},61:{start:{line:160,column:26},end:{line:160,column:79}},62:{start:{line:161,column:22},end:{line:161,column:29}},63:{start:{line:162,column:46},end:{line:162,column:122}},64:{start:{line:163,column:26},end:{line:168,column:9}},65:{start:{line:167,column:33},end:{line:167,column:97}},66:{start:{line:170,column:8},end:{line:174,column:9}},67:{start:{line:171,column:10},end:{line:171,column:73}},68:{start:{line:173,column:10},end:{line:173,column:73}},69:{start:{line:175,column:24},end:{line:175,column:28}},70:{start:{line:176,column:8},end:{line:187,column:9}},71:{start:{line:177,column:10},end:{line:186,column:15}},72:{start:{line:182,column:37},end:{line:182,column:101}},73:{start:{line:188,column:8},end:{line:202,column:18}},74:{start:{line:198,column:41},end:{line:198,column:110}},75:{start:{line:205,column:4},end:{line:307,column:12}},76:{start:{line:216,column:39},end:{line:216,column:67}},77:{start:{line:234,column:43},end:{line:234,column:68}},78:{start:{line:249,column:39},end:{line:249,column:83}},79:{start:{line:265,column:42},end:{line:265,column:85}},80:{start:{line:310,column:21},end:{line:310,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:17,column:9},end:{line:17,column:20}},loc:{start:{line:17,column:35},end:{line:30,column:1}},line:17},1:{name:"(anonymous_1)",decl:{start:{line:20,column:30},end:{line:20,column:31}},loc:{start:{line:20,column:45},end:{line:27,column:5}},line:20},2:{name:"(anonymous_2)",decl:{start:{line:35,column:2},end:{line:35,column:3}},loc:{start:{line:35,column:22},end:{line:42,column:3}},line:35},3:{name:"(anonymous_3)",decl:{start:{line:43,column:2},end:{line:43,column:3}},loc:{start:{line:43,column:48},end:{line:51,column:3}},line:43},4:{name:"(anonymous_4)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:34},end:{line:60,column:3}},line:52},5:{name:"(anonymous_5)",decl:{start:{line:61,column:2},end:{line:61,column:3}},loc:{start:{line:61,column:34},end:{line:67,column:3}},line:61},6:{name:"(anonymous_6)",decl:{start:{line:69,column:2},end:{line:69,column:3}},loc:{start:{line:69,column:26},end:{line:84,column:3}},line:69},7:{name:"(anonymous_7)",decl:{start:{line:70,column:36},end:{line:70,column:37}},loc:{start:{line:70,column:51},end:{line:75,column:5}},line:70},8:{name:"(anonymous_8)",decl:{start:{line:75,column:12},end:{line:75,column:13}},loc:{start:{line:75,column:22},end:{line:75,column:69}},line:75},9:{name:"(anonymous_9)",decl:{start:{line:77,column:26},end:{line:77,column:27}},loc:{start:{line:77,column:41},end:{line:79,column:5}},line:77},10:{name:"(anonymous_10)",decl:{start:{line:83,column:29},end:{line:83,column:30}},loc:{start:{line:83,column:39},end:{line:83,column:48}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:85,column:13},end:{line:85,column:14}},loc:{start:{line:85,column:35},end:{line:105,column:3}},line:85},12:{name:"(anonymous_12)",decl:{start:{line:106,column:2},end:{line:106,column:3}},loc:{start:{line:106,column:41},end:{line:121,column:3}},line:106},13:{name:"(anonymous_13)",decl:{start:{line:122,column:2},end:{line:122,column:3}},loc:{start:{line:122,column:23},end:{line:131,column:3}},line:122},14:{name:"(anonymous_14)",decl:{start:{line:132,column:2},end:{line:132,column:3}},loc:{start:{line:132,column:26},end:{line:141,column:3}},line:132},15:{name:"(anonymous_15)",decl:{start:{line:142,column:2},end:{line:142,column:3}},loc:{start:{line:142,column:40},end:{line:149,column:3}},line:142},16:{name:"(anonymous_16)",decl:{start:{line:150,column:2},end:{line:150,column:3}},loc:{start:{line:150,column:11},end:{line:308,column:3}},line:150},17:{name:"(anonymous_17)",decl:{start:{line:157,column:46},end:{line:157,column:47}},loc:{start:{line:157,column:61},end:{line:203,column:7}},line:157},18:{name:"(anonymous_18)",decl:{start:{line:167,column:20},end:{line:167,column:21}},loc:{start:{line:167,column:33},end:{line:167,column:97}},line:167},19:{name:"(anonymous_19)",decl:{start:{line:182,column:24},end:{line:182,column:25}},loc:{start:{line:182,column:37},end:{line:182,column:101}},line:182},20:{name:"(anonymous_20)",decl:{start:{line:198,column:24},end:{line:198,column:25}},loc:{start:{line:198,column:41},end:{line:198,column:110}},line:198},21:{name:"(anonymous_21)",decl:{start:{line:216,column:26},end:{line:216,column:27}},loc:{start:{line:216,column:39},end:{line:216,column:67}},line:216},22:{name:"(anonymous_22)",decl:{start:{line:234,column:26},end:{line:234,column:27}},loc:{start:{line:234,column:43},end:{line:234,column:68}},line:234},23:{name:"(anonymous_23)",decl:{start:{line:249,column:26},end:{line:249,column:27}},loc:{start:{line:249,column:39},end:{line:249,column:83}},line:249},24:{name:"(anonymous_24)",decl:{start:{line:265,column:26},end:{line:265,column:27}},loc:{start:{line:265,column:42},end:{line:265,column:85}},line:265}},branchMap:{0:{loc:{start:{line:19,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:19,column:2},end:{line:28,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},1:{loc:{start:{line:19,column:6},end:{line:19,column:38}},type:"binary-expr",locations:[{start:{line:19,column:6},end:{line:19,column:17}},{start:{line:19,column:21},end:{line:19,column:38}}],line:19},2:{loc:{start:{line:21,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:21,column:6},end:{line:26,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:21},3:{loc:{start:{line:22,column:8},end:{line:24,column:9}},type:"if",locations:[{start:{line:22,column:8},end:{line:24,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},4:{loc:{start:{line:37,column:4},end:{line:41,column:5}},type:"if",locations:[{start:{line:37,column:4},end:{line:41,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:37},5:{loc:{start:{line:45,column:4},end:{line:49,column:5}},type:"if",locations:[{start:{line:45,column:4},end:{line:49,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:45},6:{loc:{start:{line:53,column:4},end:{line:55,column:5}},type:"if",locations:[{start:{line:53,column:4},end:{line:55,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:53},7:{loc:{start:{line:56,column:4},end:{line:58,column:5}},type:"if",locations:[{start:{line:56,column:4},end:{line:58,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:56},8:{loc:{start:{line:62,column:4},end:{line:66,column:5}},type:"if",locations:[{start:{line:62,column:4},end:{line:66,column:5}},{start:{line:64,column:11},end:{line:66,column:5}}],line:62},9:{loc:{start:{line:86,column:4},end:{line:103,column:5}},type:"if",locations:[{start:{line:86,column:4},end:{line:103,column:5}},{start:{line:91,column:11},end:{line:103,column:5}}],line:86},10:{loc:{start:{line:92,column:24},end:{line:92,column:61}},type:"cond-expr",locations:[{start:{line:92,column:55},end:{line:92,column:57}},{start:{line:92,column:60},end:{line:92,column:61}}],line:92},11:{loc:{start:{line:107,column:18},end:{line:107,column:56}},type:"binary-expr",locations:[{start:{line:107,column:18},end:{line:107,column:50}},{start:{line:107,column:54},end:{line:107,column:56}}],line:107},12:{loc:{start:{line:111,column:14},end:{line:111,column:58}},type:"cond-expr",locations:[{start:{line:111,column:41},end:{line:111,column:42}},{start:{line:111,column:45},end:{line:111,column:58}}],line:111},13:{loc:{start:{line:127,column:4},end:{line:129,column:5}},type:"if",locations:[{start:{line:127,column:4},end:{line:129,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:127},14:{loc:{start:{line:133,column:4},end:{line:140,column:5}},type:"if",locations:[{start:{line:133,column:4},end:{line:140,column:5}},{start:{line:135,column:11},end:{line:140,column:5}}],line:133},15:{loc:{start:{line:133,column:8},end:{line:133,column:70}},type:"binary-expr",locations:[{start:{line:133,column:8},end:{line:133,column:33}},{start:{line:133,column:37},end:{line:133,column:70}}],line:133},16:{loc:{start:{line:143,column:4},end:{line:147,column:5}},type:"if",locations:[{start:{line:143,column:4},end:{line:147,column:5}},{start:{line:145,column:11},end:{line:147,column:5}}],line:143},17:{loc:{start:{line:152,column:4},end:{line:154,column:5}},type:"if",locations:[{start:{line:152,column:4},end:{line:154,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:152},18:{loc:{start:{line:156,column:4},end:{line:204,column:5}},type:"if",locations:[{start:{line:156,column:4},end:{line:204,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:156},19:{loc:{start:{line:158,column:26},end:{line:158,column:77}},type:"cond-expr",locations:[{start:{line:158,column:56},end:{line:158,column:68}},{start:{line:158,column:71},end:{line:158,column:77}}],line:158},20:{loc:{start:{line:160,column:26},end:{line:160,column:79}},type:"cond-expr",locations:[{start:{line:160,column:56},end:{line:160,column:69}},{start:{line:160,column:72},end:{line:160,column:79}}],line:160},21:{loc:{start:{line:170,column:8},end:{line:174,column:9}},type:"if",locations:[{start:{line:170,column:8},end:{line:174,column:9}},{start:{line:172,column:15},end:{line:174,column:9}}],line:170},22:{loc:{start:{line:176,column:8},end:{line:187,column:9}},type:"if",locations:[{start:{line:176,column:8},end:{line:187,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:176},23:{loc:{start:{line:224,column:8},end:{line:239,column:9}},type:"binary-expr",locations:[{start:{line:224,column:8},end:{line:224,column:45}},{start:{line:224,column:65},end:{line:239,column:9}}],line:224},24:{loc:{start:{line:255,column:8},end:{line:270,column:9}},type:"binary-expr",locations:[{start:{line:255,column:8},end:{line:255,column:18}},{start:{line:255,column:38},end:{line:270,column:9}}],line:255},25:{loc:{start:{line:271,column:8},end:{line:279,column:15}},type:"binary-expr",locations:[{start:{line:271,column:8},end:{line:271,column:18}},{start:{line:271,column:38},end:{line:279,column:15}}],line:271},26:{loc:{start:{line:281,column:10},end:{line:292,column:11}},type:"binary-expr",locations:[{start:{line:281,column:10},end:{line:281,column:20}},{start:{line:281,column:40},end:{line:292,column:11}}],line:281}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_DataProperty.tsx"],names:[],mappings:"AAqO8B,cA8Bf,YA9Be;AArO9B,OAAO,WAAW;AAClB,SAAQ,oBAAoB,4BAA2B;AACvD,OAAO,YAAY;AAEnB,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAC5B,SAAQ,2BAA0B;AAClC,SAA0B,uBAAuB;AAEjD,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAI7B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI;AAEJ,MAAG,MAAM,SAAS,MAAM,MAAM,OAAO;AACnC,UAAM,MAAM,MAAM,QAAQ,CAAC,MAAM,QAAQ;AACvC,UAAG,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO;AACT;AAgCA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,eAAe,YAAY,UAAU;AAAA,IAC/C;AAAA,EACF;AAAA;AAAA,EAGA,iBAAiB,OAAe;AAC9B,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC;AAGjE,UAAM,UAAU,CAAC;AACjB,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,WAAW,CAAC,WAAmB,UAAe;AAC5C,QAAI,MAAM,SAAS,YAAY;AAC7B,cAAQ;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,UAAU,MAAM;AAAA,MAClB;AAAA,IACF,OACK;AACH,YAAM,YAAY,MAAM,SAAS,gBAAgB,KAAK;AACtD,cAAQ;AAAA,QACN,UAAU;AAAA,QACV,MAAM,MAAM;AAAA;AAAA,QAEZ,OAAO;AAAA,UACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,UAC9E,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAgB,CAAC;AAAA,QACjF;AAAA,QACA,GAAG;AAAA,MACL;AAAA,IACF;AACA,SAAK,MAAM,SAAU,WAAW,KAAK;AAAA,EACvC;AAAA,EAEA,WAAW,WAAmB,UAAuD,OAAe;AAClG,UAAM,QAAQ,KAAK,MAAM,OAAO,MAAM,MAAM,CAAC,KAAK,CAAC;AAEnD,UAAM,SAAS,IAAI;AAAA,MACjB;AAAA,QACE,OAAO,SAAS;AAAA,QAChB,MAAO,SAAS,SAAS,SAAa,IAAI,SAAS;AAAA,MACrD;AAAA,MACA;AAAA,IACF;AAEA,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EAClD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,eAAe,SAAiB;AAC9B,QAAI,YAAY,iBAAiB,KAAK,MAAM,wBAAwB;AAClE,WAAK,MAAM,uBAAuB;AAAA,IACpC,OACK;AACH,WAAK,SAAS,KAAK,MAAM,WAAW;AAAA,QAClC,GAAG,KAAK,MAAM;AAAA,QACd,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,mBAAmB,UAAkC,SAAc;AACjE,QAAI,SAAS;AACX,WAAK,MAAM,MAAO,QAAQ,IAAI;AAAA,IAChC,OACK;AACH,aAAO,KAAK,MAAM,MAAO,QAAQ;AAAA,IACnC;AACA,SAAK,SAAS,KAAK,MAAM,WAAW,KAAK,MAAM,KAAK;AAAA,EACtD;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,QAAI,OAAO,KAAK,MAAM,OAAO,SAAS,aAAa;AACjD,WAAK,MAAM,MAAO,OAAO,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA,IACzE;AAEA,QAAI;AACJ,QAAI,KAAK,MAAM,OAAO,OAAO;AAC3B,mBAAa,KAAK,MAAM,MAAM,MAAM,IAAI,CAAC,MAAM,QAAQ;AACrD,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,OAAO;AAC/D,cAAM,MAAO,KAAK,MAAM,KAAK,GAAG;AAChC,cAAM,YAAY,OAAO,KAAK,CAAC,MAAM,WAAW,KAAK,CAAC,EAAE,QAAQ,KAAK,CAAC;AACtE,cAAM,QAAQ,KAAK,CAAC;AACpB,cAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAE3F,cAAM,YAAY;AAAA,UAChB,cAAc,EAAE,aAAa;AAAA,UAC7B,OAAO,EAAE,YAAY;AAAA,UACrB,OAAO;AAAA,UACP,UAAU,CAAC,YAAyC,KAAK,WAAW,KAAK,EAAE,MAAM,WAAW,OAAO,QAAkB,GAAG,KAAK;AAAA,QAC/H;AAEA,YAAI;AACJ,YAAG,KAAK,MAAM,OAAO,SAAS,eAAe;AAC3C,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C,OACK;AACH,sBAAY,oBAAC,eAAa,GAAG,WAAW;AAAA,QAC1C;AAEA,YAAI,YAAY;AAChB,YAAG,cAAc,QAAW;AAC1B,sBAAY,oBAAC,SACX;AAAA,YAAC;AAAA;AAAA,cACC,cAAW;AAAA,cACX,OAAO;AAAA,cACP,UAAU,aAAW,KAAK,WAAW,KAAK,EAAC,MAAM,SAAS,OAAO,UAAS,GAAG,KAAK;AAAA,cAClF,KAAK;AAAA,cACL,KAAK;AAAA;AAAA,UACP,GACF;AAAA,QACF;AAEA,eAAO,qBAAC,QACN;AAAA,8BAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACE,qBACH;AAAA,UACA,oBAAC,QACC;AAAA,YAAC;AAAA;AAAA,cACC,cAAY,EAAE,cAAc;AAAA,cAC5B,WAAW,KAAK,MAAM;AAAA,cACtB,WAAW,KAAK,MAAM;AAAA,cACtB;AAAA,cACA,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,KAAK,EAAC,MAAM,WAAW,OAAO,UAAS,GAAG,QAAkB;AAAA;AAAA,UACzG,GACF;AAAA,UACA,oBAAC,QACE,yBACH;AAAA,aAlBc,GAmBhB;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAGnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,MAAO;AAAA,gBACzB,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAS;AAAA;AAAA,YACzD,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QACC,KAAK,MAAM,OAAO,SAAS,cAC1B;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAGf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAAkB;AAAA;AAAA,YAC/D,GACF;AAAA;AAAA,UATI;AAAA,QAUN;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YAGP,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,OAAO,EAAE,8CAA8C;AAAA,gBACvD,UAAU,aAAW,KAAK,mBAAmB,YAAY,OAAO;AAAA;AAAA,YAClE,GACF;AAAA;AAAA,UARI;AAAA,QASN;AAAA,QACC,cACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,SAAS;AAAA,YAGlB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,YAAY,KAAK,mBAAmB,WAAW,OAAO;AAAA;AAAA,YACtE;AAAA;AAAA,UAPI;AAAA,QAQN;AAAA,QAED,cACC,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,gCACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAI,YAAE,aAAa,GAAE;AAAA,YACtB,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QAEF,qBAAC,SAAI,WAAU,oBACZ;AAAA,wBACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,gBAAM;AAAA,gBAAE,EAAE,UAAU;AAAA;AAAA;AAAA,UACtB;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,gBAAM;AAAA,gBAAE,EAAE,uBAAuB;AAAA;AAAA;AAAA,UACnC;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"97b6de35ac4a8f739cf06eabc39facf249622fab"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return dn=function(){return a},a}dn();function pK(n,e){dn().f[0]++;let t;return dn().s[0]++,dn().b[1][0]++,n.value&&(dn().b[1][1]++,n.value.stops)?(dn().b[0][0]++,dn().s[1]++,n.value.stops.forEach((r,i)=>{dn().f[1]++,dn().s[2]++,Object.prototype.hasOwnProperty.call(e.refs,i)?dn().b[2][1]++:(dn().b[2][0]++,dn().s[3]++,t?dn().b[3][1]++:(dn().b[3][0]++,dn().s[4]++,t={...e}),dn().s[5]++,t[i]=Sy("stop-"))})):dn().b[0][1]++,dn().s[6]++,t}class Rce extends rr.Component{constructor(){super(...arguments);kn(this,"state",(dn().s[7]++,{refs:{}}));kn(this,"onChange",(dn().s[32]++,(t,r)=>{if(dn().f[11]++,dn().s[33]++,r.type==="identity")dn().b[9][0]++,dn().s[34]++,r={type:r.type,property:r.property};else{dn().b[9][1]++;const i=(dn().s[35]++,r.type==="categorical"?(dn().b[10][0]++,""):(dn().b[10][1]++,0));dn().s[36]++,r={property:"",type:r.type,stops:[[{zoom:6,value:i},vf(this.props.fieldSpec)],[{zoom:10,value:i},vf(this.props.fieldSpec)]],...r}}dn().s[37]++,this.props.onChange(t,r)}))}componentDidMount(){dn().f[2]++;const t=(dn().s[8]++,pK(this.props,this.state));dn().s[9]++,t?(dn().b[4][0]++,dn().s[10]++,this.setState({refs:t})):dn().b[4][1]++}static getDerivedStateFromProps(t,r){dn().f[3]++;const i=(dn().s[11]++,pK(t,r));return dn().s[12]++,i?(dn().b[5][0]++,dn().s[13]++,{refs:i}):(dn().b[5][1]++,dn().s[14]++,null)}getFieldFunctionType(t){return dn().f[4]++,dn().s[15]++,t.expression.interpolated?(dn().b[6][0]++,dn().s[16]++,"exponential"):(dn().b[6][1]++,dn().s[17]++,t.type==="number"?(dn().b[7][0]++,dn().s[18]++,"interval"):(dn().b[7][1]++,dn().s[19]++,"categorical"))}getDataFunctionTypes(t){return dn().f[5]++,dn().s[20]++,t.expression.interpolated?(dn().b[8][0]++,dn().s[21]++,["interpolate","categorical","interval","exponential","identity"]):(dn().b[8][1]++,dn().s[22]++,["categorical","interval","identity"])}orderStopsByZoom(t){dn().f[6]++;const r=(dn().s[23]++,t.map((s,a)=>(dn().f[7]++,dn().s[24]++,{ref:this.state.refs[a],data:s})).sort((s,a)=>(dn().f[8]++,dn().s[25]++,xW(s.data[0].zoom,a.data[0].zoom)))),i=(dn().s[26]++,{});return dn().s[27]++,r.forEach((s,a)=>{dn().f[9]++,dn().s[28]++,i[a]=s.ref}),dn().s[29]++,this.setState({refs:i}),dn().s[30]++,r.map(s=>(dn().f[10]++,dn().s[31]++,s.data))}changeStop(t,r,i){var d;dn().f[12]++;const s=(dn().s[38]++,dn().b[11][0]++,((d=this.props.value)==null?void 0:d.stops.slice(0))||(dn().b[11][1]++,[]));dn().s[39]++,s[t]=[{value:r.value,zoom:r.zoom===void 0?(dn().b[12][0]++,0):(dn().b[12][1]++,r.zoom)},i];const a=(dn().s[40]++,this.orderStopsByZoom(s)),o=(dn().s[41]++,{...this.props.value,stops:a});dn().s[42]++,this.onChange(this.props.fieldName,o)}changeBase(t){dn().f[13]++;const r=(dn().s[43]++,{...this.props.value,base:t});dn().s[44]++,r.base===void 0?(dn().b[13][0]++,dn().s[45]++,delete r.base):dn().b[13][1]++,dn().s[46]++,this.props.onChange(this.props.fieldName,r)}changeDataType(t){dn().f[14]++,dn().s[47]++,dn().b[15][0]++,t==="interpolate"&&(dn().b[15][1]++,this.props.onChangeToZoomFunction)?(dn().b[14][0]++,dn().s[48]++,this.props.onChangeToZoomFunction()):(dn().b[14][1]++,dn().s[49]++,this.onChange(this.props.fieldName,{...this.props.value,type:t}))}changeDataProperty(t,r){dn().f[15]++,dn().s[50]++,r?(dn().b[16][0]++,dn().s[51]++,this.props.value[t]=r):(dn().b[16][1]++,dn().s[52]++,delete this.props.value[t]),dn().s[53]++,this.onChange(this.props.fieldName,this.props.value)}render(){var i,s,a,o,d,g,b,E;dn().f[16]++;const t=(dn().s[54]++,this.props.t);dn().s[55]++,typeof((i=this.props.value)==null?void 0:i.type)>"u"?(dn().b[17][0]++,dn().s[56]++,this.props.value.type=this.getFieldFunctionType(this.props.fieldSpec)):dn().b[17][1]++;let r;return dn().s[57]++,(s=this.props.value)!=null&&s.stops?(dn().b[18][0]++,dn().s[58]++,r=this.props.value.stops.map((S,O)=>{var ee,N;dn().f[17]++;const k=(dn().s[59]++,typeof S[0]=="object"?(dn().b[19][0]++,S[0].zoom):(dn().b[19][1]++,void 0)),U=(dn().s[60]++,this.state.refs[O]),z=(dn().s[61]++,typeof S[0]=="object"?(dn().b[20][0]++,S[0].value):(dn().b[20][1]++,S[0])),q=(dn().s[62]++,S[1]),Q=(dn().s[63]++,le.jsx(wW,{onClick:(ee=this.props.onDeleteStop)==null?void 0:ee.bind(this,O)})),re=(dn().s[64]++,{"aria-label":t("Input value"),label:t("Data value"),value:z,onChange:ie=>(dn().f[18]++,dn().s[65]++,this.changeStop(O,{zoom:k,value:ie},q))});let X;dn().s[66]++,((N=this.props.value)==null?void 0:N.type)==="categorical"?(dn().b[21][0]++,dn().s[67]++,X=le.jsx(If,{...re})):(dn().b[21][1]++,dn().s[68]++,X=le.jsx(rm,{...re}));let Y=(dn().s[69]++,null);return dn().s[70]++,k!==void 0?(dn().b[22][0]++,dn().s[71]++,Y=le.jsx("div",{children:le.jsx(rm,{"aria-label":"Zoom",value:k,onChange:ie=>(dn().f[19]++,dn().s[72]++,this.changeStop(O,{zoom:ie,value:z},q)),min:0,max:22})})):dn().b[22][1]++,dn().s[73]++,le.jsxs("tr",{children:[le.jsx("td",{children:Y}),le.jsx("td",{children:X}),le.jsx("td",{children:le.jsx(cy,{"aria-label":t("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:q,onChange:(ie,he)=>(dn().f[20]++,dn().s[74]++,this.changeStop(O,{zoom:k,value:z},he))})}),le.jsx("td",{children:Q})]},U)})):dn().b[18][1]++,dn().s[75]++,le.jsx("div",{className:"maputnik-data-spec-block",children:le.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[le.jsx("legend",{children:Zx(this.props.fieldName)}),le.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[le.jsx(ga,{label:t("Function"),children:le.jsx("div",{className:"maputnik-data-spec-property-input",children:le.jsx(Ng,{value:this.props.value.type,onChange:S=>(dn().f[21]++,dn().s[76]++,this.changeDataType(S)),title:t("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})},"function"),(dn().b[23][0]++,((a=this.props.value)==null?void 0:a.type)!=="identity"&&(dn().b[23][1]++,le.jsx(ga,{label:t("Base"),children:le.jsx("div",{className:"maputnik-data-spec-property-input",children:le.jsx(cy,{fieldName:"base",fieldSpec:ts.function.base,value:(o=this.props.value)==null?void 0:o.base,onChange:(S,O)=>(dn().f[22]++,dn().s[77]++,this.changeBase(O))})})},"base"))),le.jsx(ga,{label:"Property",children:le.jsx("div",{className:"maputnik-data-spec-property-input",children:le.jsx(If,{value:(d=this.props.value)==null?void 0:d.property,title:t("Input a data property to base styles off of."),onChange:S=>(dn().f[23]++,dn().s[78]++,this.changeDataProperty("property",S))})})},"property"),(dn().b[24][0]++,r&&(dn().b[24][1]++,le.jsx(ga,{label:t("Default"),children:le.jsx(cy,{fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:(g=this.props.value)==null?void 0:g.default,onChange:(S,O)=>(dn().f[24]++,dn().s[79]++,this.changeDataProperty("default",O))})},"default"))),(dn().b[25][0]++,r&&(dn().b[25][1]++,le.jsx("div",{className:"maputnik-function-stop",children:le.jsxs("table",{className:"maputnik-function-stop-table",children:[le.jsx("caption",{children:t("Stops")}),le.jsx("thead",{children:le.jsxs("tr",{children:[le.jsx("th",{children:t("Zoom")}),le.jsx("th",{children:t("Input value")}),le.jsx("th",{rowSpan:2,children:t("Output value")})]})}),le.jsx("tbody",{children:r})]})}))),le.jsxs("div",{className:"maputnik-toolbox",children:[(dn().b[26][0]++,r&&(dn().b[26][1]++,le.jsxs(Va,{className:"maputnik-add-stop",onClick:(b=this.props.onAddStop)==null?void 0:b.bind(this),children:[le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:x8})})," ",t("Add stop")]}))),le.jsxs(Va,{className:"maputnik-add-stop",onClick:(E=this.props.onExpressionClick)==null?void 0:E.bind(this),children:[le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:SC})})," ",t("Convert to expression")]})]})]})]})})}}const Dce=(dn().s[80]++,$s()(Rce));function Mr(){var n="/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",e="6a4c93b52ca21ec4b555a0d2906ee27fc49f34f8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx",statementMap:{0:{start:{line:16,column:16},end:{line:16,column:18}},1:{start:{line:17,column:2},end:{line:28,column:3}},2:{start:{line:18,column:4},end:{line:27,column:7}},3:{start:{line:19,column:6},end:{line:26,column:7}},4:{start:{line:20,column:8},end:{line:22,column:9}},5:{start:{line:21,column:10},end:{line:21,column:33}},6:{start:{line:23,column:8},end:{line:23,column:39}},7:{start:{line:25,column:8},end:{line:25,column:39}},8:{start:{line:29,column:2},end:{line:29,column:17}},9:{start:{line:32,column:24},end:{line:34,column:3}},10:{start:{line:35,column:10},end:{line:37,column:3}},11:{start:{line:39,column:20},end:{line:39,column:55}},12:{start:{line:40,column:4},end:{line:44,column:5}},13:{start:{line:41,column:6},end:{line:43,column:9}},14:{start:{line:47,column:20},end:{line:47,column:45}},15:{start:{line:48,column:4},end:{line:52,column:5}},16:{start:{line:49,column:6},end:{line:51,column:8}},17:{start:{line:53,column:4},end:{line:53,column:16}},18:{start:{line:57,column:26},end:{line:62,column:60}},19:{start:{line:58,column:6},end:{line:61,column:8}},20:{start:{line:62,column:22},end:{line:62,column:59}},21:{start:{line:63,column:20},end:{line:63,column:22}},22:{start:{line:64,column:4},end:{line:66,column:7}},23:{start:{line:65,column:6},end:{line:65,column:30}},24:{start:{line:67,column:4},end:{line:69,column:7}},25:{start:{line:70,column:4},end:{line:70,column:50}},26:{start:{line:70,column:39},end:{line:70,column:48}},27:{start:{line:73,column:18},end:{line:73,column:49}},28:{start:{line:74,column:4},end:{line:74,column:41}},29:{start:{line:75,column:25},end:{line:75,column:53}},30:{start:{line:76,column:25},end:{line:79,column:5}},31:{start:{line:80,column:4},end:{line:80,column:60}},32:{start:{line:83,column:25},end:{line:86,column:5}},33:{start:{line:87,column:4},end:{line:89,column:5}},34:{start:{line:88,column:6},end:{line:88,column:34}},35:{start:{line:90,column:4},end:{line:90,column:60}},36:{start:{line:92,column:19},end:{line:96,column:3}},37:{start:{line:93,column:4},end:{line:95,column:5}},38:{start:{line:94,column:6},end:{line:94,column:46}},39:{start:{line:98,column:14},end:{line:98,column:26}},40:{start:{line:99,column:23},end:{line:132,column:6}},41:{start:{line:100,column:24},end:{line:100,column:31}},42:{start:{line:101,column:20},end:{line:101,column:27}},43:{start:{line:102,column:44},end:{line:102,column:120}},44:{start:{line:103,column:6},end:{line:131,column:8}},45:{start:{line:112,column:43},end:{line:112,column:87}},46:{start:{line:124,column:43},end:{line:124,column:88}},47:{start:{line:133,column:4},end:{line:201,column:12}},48:{start:{line:144,column:39},end:{line:144,column:67}},49:{start:{line:161,column:43},end:{line:161,column:68}},50:{start:{line:204,column:4},end:{line:208,column:5}},51:{start:{line:205,column:6},end:{line:205,column:83}},52:{start:{line:207,column:6},end:{line:207,column:29}},53:{start:{line:211,column:21},end:{line:211,column:60}}},fnMap:{0:{name:"setStopRefs",decl:{start:{line:15,column:9},end:{line:15,column:20}},loc:{start:{line:15,column:35},end:{line:30,column:1}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:18,column:30},end:{line:18,column:31}},loc:{start:{line:18,column:45},end:{line:27,column:5}},line:18},2:{name:"(anonymous_2)",decl:{start:{line:38,column:2},end:{line:38,column:3}},loc:{start:{line:38,column:22},end:{line:45,column:3}},line:38},3:{name:"(anonymous_3)",decl:{start:{line:46,column:2},end:{line:46,column:3}},loc:{start:{line:46,column:48},end:{line:54,column:3}},line:46},4:{name:"(anonymous_4)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:26},end:{line:71,column:3}},line:56},5:{name:"(anonymous_5)",decl:{start:{line:57,column:36},end:{line:57,column:37}},loc:{start:{line:57,column:51},end:{line:62,column:5}},line:57},6:{name:"(anonymous_6)",decl:{start:{line:62,column:12},end:{line:62,column:13}},loc:{start:{line:62,column:22},end:{line:62,column:59}},line:62},7:{name:"(anonymous_7)",decl:{start:{line:64,column:26},end:{line:64,column:27}},loc:{start:{line:64,column:41},end:{line:66,column:5}},line:64},8:{name:"(anonymous_8)",decl:{start:{line:70,column:29},end:{line:70,column:30}},loc:{start:{line:70,column:39},end:{line:70,column:48}},line:70},9:{name:"(anonymous_9)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:45},end:{line:81,column:3}},line:72},10:{name:"(anonymous_10)",decl:{start:{line:82,column:2},end:{line:82,column:3}},loc:{start:{line:82,column:23},end:{line:91,column:3}},line:82},11:{name:"(anonymous_11)",decl:{start:{line:92,column:19},end:{line:92,column:20}},loc:{start:{line:92,column:29},end:{line:96,column:3}},line:92},12:{name:"(anonymous_12)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:11},end:{line:202,column:3}},line:97},13:{name:"(anonymous_13)",decl:{start:{line:99,column:51},end:{line:99,column:52}},loc:{start:{line:99,column:66},end:{line:132,column:5}},line:99},14:{name:"(anonymous_14)",decl:{start:{line:112,column:26},end:{line:112,column:27}},loc:{start:{line:112,column:43},end:{line:112,column:87}},line:112},15:{name:"(anonymous_15)",decl:{start:{line:124,column:26},end:{line:124,column:27}},loc:{start:{line:124,column:43},end:{line:124,column:88}},line:124},16:{name:"(anonymous_16)",decl:{start:{line:144,column:26},end:{line:144,column:27}},loc:{start:{line:144,column:39},end:{line:144,column:67}},line:144},17:{name:"(anonymous_17)",decl:{start:{line:161,column:26},end:{line:161,column:27}},loc:{start:{line:161,column:43},end:{line:161,column:68}},line:161},18:{name:"(anonymous_18)",decl:{start:{line:203,column:2},end:{line:203,column:3}},loc:{start:{line:203,column:34},end:{line:209,column:3}},line:203}},branchMap:{0:{loc:{start:{line:17,column:2},end:{line:28,column:3}},type:"if",locations:[{start:{line:17,column:2},end:{line:28,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:17},1:{loc:{start:{line:17,column:6},end:{line:17,column:38}},type:"binary-expr",locations:[{start:{line:17,column:6},end:{line:17,column:17}},{start:{line:17,column:21},end:{line:17,column:38}}],line:17},2:{loc:{start:{line:19,column:6},end:{line:26,column:7}},type:"if",locations:[{start:{line:19,column:6},end:{line:26,column:7}},{start:{line:24,column:13},end:{line:26,column:7}}],line:19},3:{loc:{start:{line:20,column:8},end:{line:22,column:9}},type:"if",locations:[{start:{line:20,column:8},end:{line:22,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},4:{loc:{start:{line:40,column:4},end:{line:44,column:5}},type:"if",locations:[{start:{line:40,column:4},end:{line:44,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:40},5:{loc:{start:{line:48,column:4},end:{line:52,column:5}},type:"if",locations:[{start:{line:48,column:4},end:{line:52,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:48},6:{loc:{start:{line:87,column:4},end:{line:89,column:5}},type:"if",locations:[{start:{line:87,column:4},end:{line:89,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:87},7:{loc:{start:{line:93,column:4},end:{line:95,column:5}},type:"if",locations:[{start:{line:93,column:4},end:{line:95,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:93},8:{loc:{start:{line:93,column:8},end:{line:93,column:67}},type:"binary-expr",locations:[{start:{line:93,column:8},end:{line:93,column:30}},{start:{line:93,column:34},end:{line:93,column:67}}],line:93},9:{loc:{start:{line:204,column:4},end:{line:208,column:5}},type:"if",locations:[{start:{line:204,column:4},end:{line:208,column:5}},{start:{line:206,column:11},end:{line:208,column:5}}],line:204}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/_ZoomProperty.tsx"],names:[],mappings:"AA+J4B,cACf,YADe;AA/J5B,OAAO,WAAW;AAClB,SAAQ,oBAAoB,4BAA2B;AACvD,OAAO,YAAY;AACnB,SAA0B,uBAAuB;AAEjD,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAElB,OAAO,sBAAsB;AAC7B,OAAO,wBAAwB;AAE/B,OAAO,YAAY;AACnB,OAAO,qBAAqB;AAQ5B,SAAS,YAAY,OAAkC,OAA0B;AAE/E,MAAI,UAAmC,CAAC;AAExC,MAAG,MAAM,SAAU,MAAM,MAAwB,OAAO;AACtD,IAAC,MAAM,MAAwB,MAAM,QAAQ,CAAC,MAAM,QAAgB;AAClE,UAAG,OAAO,UAAU,eAAe,KAAK,CAAC,MAAM,MAAM,GAAG,GAAG;AACzD,YAAG,CAAC,SAAS;AACX,oBAAU,EAAC,GAAG,MAAK;AAAA,QACrB;AACA,gBAAQ,GAAG,IAAI,OAAO,OAAO;AAAA,MAC/B,OAAO;AACL,gBAAQ,GAAG,IAAI,MAAM,KAAK,GAAG;AAAA,MAC/B;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;AA4BA,MAAM,6BAA6B,MAAM,UAAwD;AAAA,EAC/F,OAAO,eAAe;AAAA,IACpB,QAAQ,CAAC;AAAA,EACX;AAAA,EAEA,QAAQ;AAAA,IACN,MAAM,CAAC;AAAA,EACT;AAAA,EAEA,oBAAoB;AAClB,UAAM,UAAU,YAAY,KAAK,OAAO,KAAK,KAAK;AAElD,QAAG,SAAS;AACV,WAAK,SAAS;AAAA,QACZ,MAAM;AAAA,MACR,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAA4C,OAA0B;AACpG,UAAM,UAAU,YAAY,OAAO,KAAK;AACxC,QAAG,SAAS;AACV,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,iBAAiB,OAA+B;AAC9C,UAAM,gBAAgB,MACnB,IAAI,CAAC,MAAM,QAAQ;AAClB,aAAO;AAAA,QACL,KAAK,KAAK,MAAM,KAAK,GAAG;AAAA,QACxB,MAAM;AAAA,MACR;AAAA,IACF,CAAC,EAEA,KAAK,CAAC,GAAG,MAAM,gBAAgB,EAAE,KAAK,CAAC,GAAI,EAAE,KAAK,CAAC,CAAE,CAAC;AAGzD,UAAM,UAAkC,CAAC;AACzC,kBACG,QAAQ,CAAC,MAAM,QAAO;AACrB,cAAQ,GAAG,IAAI,KAAK;AAAA,IACtB,CAAC;AAEH,SAAK,SAAS;AAAA,MACZ,MAAM;AAAA,IACR,CAAC;AAED,WAAO,cAAc,IAAI,CAAC,SAAS,KAAK,IAAI;AAAA,EAC9C;AAAA,EAEA,eAAe,WAAmB,UAA8B,OAAe;AAC7E,UAAM,QAAS,KAAK,MAAM,MAAwB,MAAM,MAAM,CAAC;AAC/D,UAAM,SAAS,IAAI,CAAC,UAAU,KAAK;AAEnC,UAAM,eAAe,KAAK,iBAAiB,KAAK;AAEhD,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,OAAO;AAAA,IACT;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,WAAW,UAA8B;AACvC,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd,MAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAW;AACnC,aAAO,aAAa,MAAM;AAAA,IAC5B;AACA,SAAK,MAAM,SAAU,KAAK,MAAM,WAAW,YAAY;AAAA,EACzD;AAAA,EAEA,iBAAiB,CAAC,SAAiB;AACjC,QAAI,SAAS,iBAAiB,KAAK,MAAM,wBAAwB;AAC/D,WAAK,MAAM,uBAAuB,IAAI;AAAA,IACxC;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,aAAa,KAAK,MAAM,OAAO,MAAM,IAAI,CAAC,MAAM,QAAQ;AAC5D,YAAM,YAAY,KAAK,CAAC;AACxB,YAAM,QAAQ,KAAK,CAAC;AACpB,YAAM,gBAAgB,oBAAC,oBAAiB,SAAS,KAAK,MAAM,cAAc,KAAK,MAAM,GAAG,GAAG;AAC3F,aAAO;AAAA,QAAC;AAAA;AAAA,UAGN;AAAA,gCAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,MAAM;AAAA,gBACpB,OAAO;AAAA,gBACP,UAAU,iBAAe,KAAK,eAAe,KAAK,aAAa,KAAK;AAAA,gBACpE,KAAK;AAAA,gBACL,KAAK;AAAA;AAAA,YACP,GACF;AAAA,YACA,oBAAC,QACC;AAAA,cAAC;AAAA;AAAA,gBACC,cAAY,EAAE,cAAc;AAAA,gBAC5B,WAAW,KAAK,MAAM;AAAA,gBACtB,WAAW,KAAK,MAAM;AAAA,gBACtB;AAAA,gBACA,UAAU,CAAC,GAAG,aAAa,KAAK,eAAe,KAAK,WAAW,QAAkB;AAAA;AAAA,YACnF,GACF;AAAA,YACA,oBAAC,QACE,yBACH;AAAA;AAAA;AAAA,QAtBK,GAAG,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;AAAA,MAuB5B;AAAA,IACF,CAAC;AAGD,WAAO,oBAAC,SAAI,WAAU,4BACpB,+BAAC,cAAS,WAAU,+BAClB;AAAA,0BAAC,YAAQ,6BAAmB,KAAK,MAAM,SAAS,GAAE;AAAA,MAClD,qBAAC,SAAI,WAAU,gCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,UAAU;AAAA,YAEnB,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO;AAAA,gBACP,UAAU,CAAC,YAAoB,KAAK,eAAe,OAAO;AAAA,gBAC1D,OAAO,EAAE,yDAAyD;AAAA,gBAClE,SAAS,KAAK,qBAAqB,KAAK,MAAM,SAAU;AAAA;AAAA,YAC1D,GACF;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,EAAE,MAAM;AAAA,YAEf,8BAAC,SAAI,WAAU,qCACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,gBACX,WAAW,OAAO,SAAS;AAAA,gBAC3B,OAAO,KAAK,MAAM,OAAO;AAAA,gBACzB,UAAU,CAAC,GAAG,aAAa,KAAK,WAAW,QAA8B;AAAA;AAAA,YAC3E,GACF;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,+BAAC,WAAM,WAAU,mEACf;AAAA,8BAAC,aAAS,YAAE,OAAO,GAAE;AAAA,UACrB,oBAAC,WACC,+BAAC,QACC;AAAA,gCAAC,QAAI,YAAE,MAAM,GAAE;AAAA,YACf,oBAAC,QAAG,SAAS,GAAI,YAAE,cAAc,GAAE;AAAA,aACrC,GACF;AAAA,UACA,oBAAC,WACE,sBACH;AAAA,WACF,GACF;AAAA,QACA,qBAAC,SAAI,WAAU,oBACb;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,WAAW,KAAK,IAAI;AAAA,cAExC;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,sBAAsB,GACrD;AAAA,gBAAM;AAAA,gBAAE,EAAE,UAAU;AAAA;AAAA;AAAA,UACtB;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,SAAS,KAAK,MAAM,mBAAmB,KAAK,IAAI;AAAA,cAEhD;AAAA,oCAAC,SAAI,OAAO,EAAC,OAAM,QAAQ,QAAO,QAAQ,eAAe,cAAa,GAAG,SAAQ,aAC/E,8BAAC,UAAK,MAAK,gBAAe,GAAG,oBAAoB,GACnD;AAAA,gBAAM;AAAA,gBAAE,EAAE,uBAAuB;AAAA;AAAA;AAAA,UACnC;AAAA,WACF;AAAA,SACF;AAAA,OACF,GACF;AAAA,EACF;AAAA,EAEA,qBAAqB,WAGlB;AACD,QAAI,UAAU,eAAe,MAAM,eAAe;AAChD,aAAO,CAAC,eAAe,eAAe,YAAY,eAAe,UAAU;AAAA,IAC7E,OACK;AACH,aAAO,CAAC,aAAa;AAAA,IACvB;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6a4c93b52ca21ec4b555a0d2906ee27fc49f34f8"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Mr=function(){return a},a}Mr();function mK(n,e){Mr().f[0]++;let t=(Mr().s[0]++,{});return Mr().s[1]++,Mr().b[1][0]++,n.value&&(Mr().b[1][1]++,n.value.stops)?(Mr().b[0][0]++,Mr().s[2]++,n.value.stops.forEach((r,i)=>{Mr().f[1]++,Mr().s[3]++,Object.prototype.hasOwnProperty.call(!e.refs,i)?(Mr().b[2][0]++,Mr().s[4]++,t?Mr().b[3][1]++:(Mr().b[3][0]++,Mr().s[5]++,t={...e}),Mr().s[6]++,t[i]=Sy("stop-")):(Mr().b[2][1]++,Mr().s[7]++,t[i]=e.refs[i])})):Mr().b[0][1]++,Mr().s[8]++,t}class MW extends rr.Component{constructor(){super(...arguments);kn(this,"state",(Mr().s[10]++,{refs:{}}));kn(this,"changeDataType",(Mr().s[36]++,t=>{Mr().f[11]++,Mr().s[37]++,Mr().b[8][0]++,t!=="interpolate"&&(Mr().b[8][1]++,this.props.onChangeToDataFunction)?(Mr().b[7][0]++,Mr().s[38]++,this.props.onChangeToDataFunction(t)):Mr().b[7][1]++}))}componentDidMount(){Mr().f[2]++;const t=(Mr().s[11]++,mK(this.props,this.state));Mr().s[12]++,t?(Mr().b[4][0]++,Mr().s[13]++,this.setState({refs:t})):Mr().b[4][1]++}static getDerivedStateFromProps(t,r){Mr().f[3]++;const i=(Mr().s[14]++,mK(t,r));return Mr().s[15]++,i?(Mr().b[5][0]++,Mr().s[16]++,{refs:i}):(Mr().b[5][1]++,Mr().s[17]++,null)}orderStopsByZoom(t){Mr().f[4]++;const r=(Mr().s[18]++,t.map((s,a)=>(Mr().f[5]++,Mr().s[19]++,{ref:this.state.refs[a],data:s})).sort((s,a)=>(Mr().f[6]++,Mr().s[20]++,xW(s.data[0],a.data[0])))),i=(Mr().s[21]++,{});return Mr().s[22]++,r.forEach((s,a)=>{Mr().f[7]++,Mr().s[23]++,i[a]=s.ref}),Mr().s[24]++,this.setState({refs:i}),Mr().s[25]++,r.map(s=>(Mr().f[8]++,Mr().s[26]++,s.data))}changeZoomStop(t,r,i){Mr().f[9]++;const s=(Mr().s[27]++,this.props.value.stops.slice(0));Mr().s[28]++,s[t]=[r,i];const a=(Mr().s[29]++,this.orderStopsByZoom(s)),o=(Mr().s[30]++,{...this.props.value,stops:a});Mr().s[31]++,this.props.onChange(this.props.fieldName,o)}changeBase(t){Mr().f[10]++;const r=(Mr().s[32]++,{...this.props.value,base:t});Mr().s[33]++,r.base===void 0?(Mr().b[6][0]++,Mr().s[34]++,delete r.base):Mr().b[6][1]++,Mr().s[35]++,this.props.onChange(this.props.fieldName,r)}render(){var i,s,a,o;Mr().f[12]++;const t=(Mr().s[39]++,this.props.t),r=(Mr().s[40]++,(i=this.props.value)==null?void 0:i.stops.map((d,g)=>{var O;Mr().f[13]++;const b=(Mr().s[41]++,d[0]),E=(Mr().s[42]++,d[1]),S=(Mr().s[43]++,le.jsx(wW,{onClick:(O=this.props.onDeleteStop)==null?void 0:O.bind(this,g)}));return Mr().s[44]++,le.jsxs("tr",{children:[le.jsx("td",{children:le.jsx(rm,{"aria-label":t("Zoom"),value:b,onChange:k=>(Mr().f[14]++,Mr().s[45]++,this.changeZoomStop(g,k,E)),min:0,max:22})}),le.jsx("td",{children:le.jsx(cy,{"aria-label":t("Output value"),fieldName:this.props.fieldName,fieldSpec:this.props.fieldSpec,value:E,onChange:(k,U)=>(Mr().f[15]++,Mr().s[46]++,this.changeZoomStop(g,b,U))})}),le.jsx("td",{children:S})]},`${d[0]}-${d[1]}`)}));return Mr().s[47]++,le.jsx("div",{className:"maputnik-data-spec-block",children:le.jsxs("fieldset",{className:"maputnik-data-spec-property",children:[le.jsx("legend",{children:Zx(this.props.fieldName)}),le.jsxs("div",{className:"maputnik-data-fieldset-inner",children:[le.jsx(ga,{label:t("Function"),children:le.jsx("div",{className:"maputnik-data-spec-property-input",children:le.jsx(Ng,{value:"interpolate",onChange:d=>(Mr().f[16]++,Mr().s[48]++,this.changeDataType(d)),title:t("Select a type of data scale (default is 'categorical')."),options:this.getDataFunctionTypes(this.props.fieldSpec)})})}),le.jsx(ga,{label:t("Base"),children:le.jsx("div",{className:"maputnik-data-spec-property-input",children:le.jsx(cy,{fieldName:"base",fieldSpec:ts.function.base,value:(s=this.props.value)==null?void 0:s.base,onChange:(d,g)=>(Mr().f[17]++,Mr().s[49]++,this.changeBase(g))})})}),le.jsx("div",{className:"maputnik-function-stop",children:le.jsxs("table",{className:"maputnik-function-stop-table maputnik-function-stop-table--zoom",children:[le.jsx("caption",{children:t("Stops")}),le.jsx("thead",{children:le.jsxs("tr",{children:[le.jsx("th",{children:t("Zoom")}),le.jsx("th",{rowSpan:2,children:t("Output value")})]})}),le.jsx("tbody",{children:r})]})}),le.jsxs("div",{className:"maputnik-toolbox",children:[le.jsxs(Va,{className:"maputnik-add-stop",onClick:(a=this.props.onAddStop)==null?void 0:a.bind(this),children:[le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:x8})})," ",t("Add stop")]}),le.jsxs(Va,{className:"maputnik-add-stop",onClick:(o=this.props.onExpressionClick)==null?void 0:o.bind(this),children:[le.jsx("svg",{style:{width:"14px",height:"14px",verticalAlign:"text-bottom"},viewBox:"0 0 24 24",children:le.jsx("path",{fill:"currentColor",d:SC})})," ",t("Convert to expression")]})]})]})]})})}getDataFunctionTypes(t){return Mr().f[18]++,Mr().s[50]++,t["property-type"]==="data-driven"?(Mr().b[9][0]++,Mr().s[51]++,["interpolate","categorical","interval","exponential","identity"]):(Mr().b[9][1]++,Mr().s[52]++,["interpolate"])}}kn(MW,"defaultProps",(Mr().s[9]++,{errors:{}}));const Kce=(Mr().s[53]++,$s()(MW));function Lt(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",e="36be9049018d9eb4ab6b3a8eeeb8db87a4e7a5ee",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx",statementMap:{0:{start:{line:10,column:2},end:{line:10,column:78}},1:{start:{line:13,column:2},end:{line:13,column:74}},2:{start:{line:16,column:2},end:{line:18,column:5}},3:{start:{line:17,column:4},end:{line:17,column:52}},4:{start:{line:21,column:2},end:{line:21,column:123}},5:{start:{line:24,column:2},end:{line:26,column:5}},6:{start:{line:25,column:4},end:{line:25,column:83}},7:{start:{line:29,column:2},end:{line:29,column:64}},8:{start:{line:32,column:16},end:{line:32,column:47}},9:{start:{line:33,column:2},end:{line:33,column:38}},10:{start:{line:36,column:2},end:{line:38,column:3}},11:{start:{line:37,column:4},end:{line:37,column:37}},12:{start:{line:39,column:2},end:{line:39,column:15}},13:{start:{line:42,column:2},end:{line:54,column:3}},14:{start:{line:43,column:4},end:{line:43,column:19}},15:{start:{line:44,column:9},end:{line:54,column:3}},16:{start:{line:45,column:4},end:{line:45,column:19}},17:{start:{line:46,column:9},end:{line:54,column:3}},18:{start:{line:47,column:4},end:{line:47,column:19}},19:{start:{line:48,column:9},end:{line:54,column:3}},20:{start:{line:49,column:4},end:{line:49,column:27}},21:{start:{line:50,column:9},end:{line:54,column:3}},22:{start:{line:51,column:4},end:{line:51,column:27}},23:{start:{line:53,column:4},end:{line:53,column:24}},24:{start:{line:58,column:4},end:{line:58,column:17}},25:{start:{line:59,column:4},end:{line:62,column:6}},26:{start:{line:65,column:4},end:{line:72,column:5}},27:{start:{line:66,column:6},end:{line:66,column:16}},28:{start:{line:68,column:6},end:{line:71,column:8}},29:{start:{line:75,column:4},end:{line:77,column:5}},30:{start:{line:76,column:6},end:{line:76,column:27}},31:{start:{line:78,column:4},end:{line:80,column:5}},32:{start:{line:79,column:6},end:{line:79,column:24}},33:{start:{line:81,column:4},end:{line:81,column:25}},34:{start:{line:83,column:12},end:{line:99,column:3}},35:{start:{line:84,column:18},end:{line:84,column:49}},36:{start:{line:85,column:21},end:{line:85,column:44}},37:{start:{line:86,column:4},end:{line:93,column:5}},38:{start:{line:87,column:6},end:{line:90,column:9}},39:{start:{line:92,column:6},end:{line:92,column:49}},40:{start:{line:94,column:25},end:{line:97,column:5}},41:{start:{line:98,column:4},end:{line:98,column:60}},42:{start:{line:100,column:21},end:{line:106,column:3}},43:{start:{line:101,column:37},end:{line:101,column:47}},44:{start:{line:102,column:4},end:{line:102,column:54}},45:{start:{line:103,column:4},end:{line:105,column:7}},46:{start:{line:107,column:15},end:{line:118,column:3}},47:{start:{line:108,column:18},end:{line:108,column:49}},48:{start:{line:109,column:4},end:{line:109,column:29}},49:{start:{line:110,column:23},end:{line:113,column:5}},50:{start:{line:114,column:4},end:{line:116,column:5}},51:{start:{line:115,column:6},end:{line:115,column:33}},52:{start:{line:117,column:4},end:{line:117,column:60}},53:{start:{line:119,column:21},end:{line:148,column:3}},54:{start:{line:120,column:22},end:{line:120,column:32}},55:{start:{line:122,column:4},end:{line:146,column:5}},56:{start:{line:123,column:6},end:{line:138,column:7}},57:{start:{line:124,column:8},end:{line:129,column:10}},58:{start:{line:127,column:12},end:{line:127,column:88}},59:{start:{line:131,column:8},end:{line:137,column:10}},60:{start:{line:140,column:6},end:{line:145,column:8}},61:{start:{line:147,column:4},end:{line:147,column:56}},62:{start:{line:149,column:19},end:{line:165,column:3}},63:{start:{line:150,column:33},end:{line:150,column:43}},64:{start:{line:151,column:4},end:{line:164,column:5}},65:{start:{line:152,column:6},end:{line:155,column:9}},66:{start:{line:156,column:6},end:{line:158,column:9}},67:{start:{line:159,column:11},end:{line:164,column:5}},68:{start:{line:160,column:6},end:{line:160,column:47}},69:{start:{line:161,column:6},end:{line:163,column:9}},70:{start:{line:166,column:12},end:{line:169,column:3}},71:{start:{line:167,column:33},end:{line:167,column:43}},72:{start:{line:168,column:4},end:{line:168,column:140}},73:{start:{line:170,column:19},end:{line:181,column:3}},74:{start:{line:171,column:33},end:{line:171,column:43}},75:{start:{line:173,column:4},end:{line:179,column:5}},76:{start:{line:174,column:6},end:{line:174,column:67}},77:{start:{line:175,column:11},end:{line:179,column:5}},78:{start:{line:176,column:6},end:{line:176,column:43}},79:{start:{line:178,column:6},end:{line:178,column:70}},80:{start:{line:180,column:4},end:{line:180,column:58}},81:{start:{line:182,column:21},end:{line:220,column:3}},82:{start:{line:183,column:25},end:{line:183,column:72}},83:{start:{line:184,column:22},end:{line:184,column:61}},84:{start:{line:185,column:22},end:{line:185,column:32}},85:{start:{line:187,column:4},end:{line:218,column:5}},86:{start:{line:188,column:6},end:{line:207,column:7}},87:{start:{line:189,column:8},end:{line:196,column:10}},88:{start:{line:194,column:12},end:{line:194,column:111}},89:{start:{line:198,column:8},end:{line:206,column:10}},90:{start:{line:209,column:6},end:{line:217,column:8}},91:{start:{line:219,column:4},end:{line:219,column:56}},92:{start:{line:221,column:18},end:{line:223,column:3}},93:{start:{line:222,column:4},end:{line:222,column:39}},94:{start:{line:224,column:20},end:{line:226,column:3}},95:{start:{line:225,column:4},end:{line:225,column:40}},96:{start:{line:228,column:25},end:{line:228,column:35}},97:{start:{line:229,column:22},end:{line:229,column:132}},98:{start:{line:231,column:4},end:{line:295,column:5}},99:{start:{line:232,column:6},end:{line:247,column:8}},100:{start:{line:248,column:11},end:{line:295,column:5}},101:{start:{line:249,column:6},end:{line:263,column:8}},102:{start:{line:264,column:11},end:{line:295,column:5}},103:{start:{line:265,column:6},end:{line:279,column:8}},104:{start:{line:281,column:6},end:{line:294,column:8}},105:{start:{line:296,column:4},end:{line:296,column:148}}},fnMap:{0:{name:"isLiteralExpression",decl:{start:{line:9,column:9},end:{line:9,column:28}},loc:{start:{line:9,column:36},end:{line:11,column:1}},line:9},1:{name:"isGetExpression",decl:{start:{line:12,column:9},end:{line:12,column:24}},loc:{start:{line:12,column:32},end:{line:14,column:1}},line:12},2:{name:"isZoomField",decl:{start:{line:15,column:9},end:{line:15,column:20}},loc:{start:{line:15,column:28},end:{line:19,column:1}},line:15},3:{name:"(anonymous_3)",decl:{start:{line:16,column:168},end:{line:16,column:169}},loc:{start:{line:16,column:178},end:{line:18,column:3}},line:16},4:{name:"isIdentityProperty",decl:{start:{line:20,column:9},end:{line:20,column:27}},loc:{start:{line:20,column:35},end:{line:22,column:1}},line:20},5:{name:"isDataStopProperty",decl:{start:{line:23,column:9},end:{line:23,column:27}},loc:{start:{line:23,column:35},end:{line:27,column:1}},line:23},6:{name:"(anonymous_6)",decl:{start:{line:24,column:168},end:{line:24,column:169}},loc:{start:{line:24,column:178},end:{line:26,column:3}},line:24},7:{name:"isDataField",decl:{start:{line:28,column:9},end:{line:28,column:20}},loc:{start:{line:28,column:28},end:{line:30,column:1}},line:28},8:{name:"isPrimative",decl:{start:{line:31,column:9},end:{line:31,column:20}},loc:{start:{line:31,column:28},end:{line:34,column:1}},line:31},9:{name:"isArrayOfPrimatives",decl:{start:{line:35,column:9},end:{line:35,column:28}},loc:{start:{line:35,column:37},end:{line:40,column:1}},line:35},10:{name:"getDataType",decl:{start:{line:41,column:9},end:{line:41,column:20}},loc:{start:{line:41,column:44},end:{line:55,column:1}},line:41},11:{name:"(anonymous_11)",decl:{start:{line:57,column:2},end:{line:57,column:3}},loc:{start:{line:57,column:21},end:{line:63,column:3}},line:57},12:{name:"(anonymous_12)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:48},end:{line:73,column:3}},line:64},13:{name:"(anonymous_13)",decl:{start:{line:74,column:2},end:{line:74,column:3}},loc:{start:{line:74,column:34},end:{line:82,column:3}},line:74},14:{name:"(anonymous_14)",decl:{start:{line:83,column:12},end:{line:83,column:13}},loc:{start:{line:83,column:18},end:{line:99,column:3}},line:83},15:{name:"(anonymous_15)",decl:{start:{line:100,column:21},end:{line:100,column:22}},loc:{start:{line:100,column:27},end:{line:106,column:3}},line:100},16:{name:"(anonymous_16)",decl:{start:{line:107,column:15},end:{line:107,column:16}},loc:{start:{line:107,column:28},end:{line:118,column:3}},line:107},17:{name:"(anonymous_17)",decl:{start:{line:119,column:21},end:{line:119,column:22}},loc:{start:{line:119,column:27},end:{line:148,column:3}},line:119},18:{name:"(anonymous_18)",decl:{start:{line:126,column:33},end:{line:126,column:34}},loc:{start:{line:126,column:43},end:{line:128,column:11}},line:126},19:{name:"(anonymous_19)",decl:{start:{line:149,column:19},end:{line:149,column:20}},loc:{start:{line:149,column:25},end:{line:165,column:3}},line:149},20:{name:"(anonymous_20)",decl:{start:{line:166,column:12},end:{line:166,column:13}},loc:{start:{line:166,column:18},end:{line:169,column:3}},line:166},21:{name:"(anonymous_21)",decl:{start:{line:170,column:19},end:{line:170,column:20}},loc:{start:{line:170,column:25},end:{line:181,column:3}},line:170},22:{name:"(anonymous_22)",decl:{start:{line:182,column:21},end:{line:182,column:22}},loc:{start:{line:182,column:27},end:{line:220,column:3}},line:182},23:{name:"(anonymous_23)",decl:{start:{line:193,column:33},end:{line:193,column:34}},loc:{start:{line:193,column:43},end:{line:195,column:11}},line:193},24:{name:"(anonymous_24)",decl:{start:{line:221,column:18},end:{line:221,column:19}},loc:{start:{line:221,column:24},end:{line:223,column:3}},line:221},25:{name:"(anonymous_25)",decl:{start:{line:224,column:20},end:{line:224,column:21}},loc:{start:{line:224,column:26},end:{line:226,column:3}},line:224},26:{name:"(anonymous_26)",decl:{start:{line:227,column:2},end:{line:227,column:3}},loc:{start:{line:227,column:11},end:{line:297,column:3}},line:227}},branchMap:{0:{loc:{start:{line:10,column:9},end:{line:10,column:77}},type:"binary-expr",locations:[{start:{line:10,column:9},end:{line:10,column:29}},{start:{line:10,column:33},end:{line:10,column:51}},{start:{line:10,column:55},end:{line:10,column:77}}],line:10},1:{loc:{start:{line:13,column:9},end:{line:13,column:73}},type:"binary-expr",locations:[{start:{line:13,column:9},end:{line:13,column:29}},{start:{line:13,column:33},end:{line:13,column:51}},{start:{line:13,column:55},end:{line:13,column:73}}],line:13},2:{loc:{start:{line:16,column:9},end:{line:18,column:4}},type:"binary-expr",locations:[{start:{line:16,column:9},end:{line:16,column:34}},{start:{line:16,column:38},end:{line:16,column:49}},{start:{line:16,column:53},end:{line:16,column:90}},{start:{line:16,column:94},end:{line:16,column:120}},{start:{line:16,column:124},end:{line:16,column:146}},{start:{line:16,column:150},end:{line:18,column:4}}],line:16},3:{loc:{start:{line:17,column:11},end:{line:17,column:51}},type:"binary-expr",locations:[{start:{line:17,column:11},end:{line:17,column:30}},{start:{line:17,column:34},end:{line:17,column:51}}],line:17},4:{loc:{start:{line:21,column:9},end:{line:21,column:122}},type:"binary-expr",locations:[{start:{line:21,column:9},end:{line:21,column:34}},{start:{line:21,column:38},end:{line:21,column:63}},{start:{line:21,column:67},end:{line:21,column:122}}],line:21},5:{loc:{start:{line:24,column:9},end:{line:26,column:4}},type:"binary-expr",locations:[{start:{line:24,column:9},end:{line:24,column:34}},{start:{line:24,column:38},end:{line:24,column:49}},{start:{line:24,column:53},end:{line:24,column:90}},{start:{line:24,column:94},end:{line:24,column:116}},{start:{line:24,column:120},end:{line:24,column:146}},{start:{line:24,column:150},end:{line:26,column:4}}],line:24},6:{loc:{start:{line:25,column:11},end:{line:25,column:82}},type:"binary-expr",locations:[{start:{line:25,column:11},end:{line:25,column:30}},{start:{line:25,column:34},end:{line:25,column:51}},{start:{line:25,column:55},end:{line:25,column:82}}],line:25},7:{loc:{start:{line:29,column:9},end:{line:29,column:63}},type:"binary-expr",locations:[{start:{line:29,column:9},end:{line:29,column:34}},{start:{line:29,column:38},end:{line:29,column:63}}],line:29},8:{loc:{start:{line:36,column:2},end:{line:38,column:3}},type:"if",locations:[{start:{line:36,column:2},end:{line:38,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:36},9:{loc:{start:{line:41,column:28},end:{line:41,column:42}},type:"default-arg",locations:[{start:{line:41,column:40},end:{line:41,column:42}}],line:41},10:{loc:{start:{line:42,column:2},end:{line:54,column:3}},type:"if",locations:[{start:{line:42,column:2},end:{line:54,column:3}},{start:{line:44,column:9},end:{line:54,column:3}}],line:42},11:{loc:{start:{line:44,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:44,column:9},end:{line:54,column:3}},{start:{line:46,column:9},end:{line:54,column:3}}],line:44},12:{loc:{start:{line:46,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:46,column:9},end:{line:54,column:3}},{start:{line:48,column:9},end:{line:54,column:3}}],line:46},13:{loc:{start:{line:46,column:13},end:{line:46,column:69}},type:"binary-expr",locations:[{start:{line:46,column:13},end:{line:46,column:39}},{start:{line:46,column:43},end:{line:46,column:69}}],line:46},14:{loc:{start:{line:48,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:48,column:9},end:{line:54,column:3}},{start:{line:50,column:9},end:{line:54,column:3}}],line:48},15:{loc:{start:{line:50,column:9},end:{line:54,column:3}},type:"if",locations:[{start:{line:50,column:9},end:{line:54,column:3}},{start:{line:52,column:9},end:{line:54,column:3}}],line:50},16:{loc:{start:{line:65,column:4},end:{line:72,column:5}},type:"if",locations:[{start:{line:65,column:4},end:{line:72,column:5}},{start:{line:67,column:11},end:{line:72,column:5}}],line:65},17:{loc:{start:{line:75,column:4},end:{line:77,column:5}},type:"if",locations:[{start:{line:75,column:4},end:{line:77,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:75},18:{loc:{start:{line:78,column:4},end:{line:80,column:5}},type:"if",locations:[{start:{line:78,column:4},end:{line:80,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:78},19:{loc:{start:{line:86,column:4},end:{line:93,column:5}},type:"if",locations:[{start:{line:86,column:4},end:{line:93,column:5}},{start:{line:91,column:11},end:{line:93,column:5}}],line:86},20:{loc:{start:{line:114,column:4},end:{line:116,column:5}},type:"if",locations:[{start:{line:114,column:4},end:{line:116,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:114},21:{loc:{start:{line:122,column:4},end:{line:146,column:5}},type:"if",locations:[{start:{line:122,column:4},end:{line:146,column:5}},{start:{line:139,column:11},end:{line:146,column:5}}],line:122},22:{loc:{start:{line:123,column:6},end:{line:138,column:7}},type:"if",locations:[{start:{line:123,column:6},end:{line:138,column:7}},{start:{line:130,column:13},end:{line:138,column:7}}],line:123},23:{loc:{start:{line:127,column:34},end:{line:127,column:86}},type:"binary-expr",locations:[{start:{line:127,column:34},end:{line:127,column:41}},{start:{line:127,column:45},end:{line:127,column:86}}],line:127},24:{loc:{start:{line:142,column:14},end:{line:142,column:64}},type:"binary-expr",locations:[{start:{line:142,column:14},end:{line:142,column:19}},{start:{line:142,column:23},end:{line:142,column:64}}],line:142},25:{loc:{start:{line:143,column:15},end:{line:143,column:65}},type:"binary-expr",locations:[{start:{line:143,column:15},end:{line:143,column:20}},{start:{line:143,column:24},end:{line:143,column:65}}],line:143},26:{loc:{start:{line:151,column:4},end:{line:164,column:5}},type:"if",locations:[{start:{line:151,column:4},end:{line:164,column:5}},{start:{line:159,column:11},end:{line:164,column:5}}],line:151},27:{loc:{start:{line:159,column:11},end:{line:164,column:5}},type:"if",locations:[{start:{line:159,column:11},end:{line:164,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:159},28:{loc:{start:{line:168,column:11},end:{line:168,column:139}},type:"binary-expr",locations:[{start:{line:168,column:11},end:{line:168,column:33}},{start:{line:168,column:37},end:{line:168,column:63}},{start:{line:168,column:67},end:{line:168,column:85}},{start:{line:168,column:89},end:{line:168,column:109}},{start:{line:168,column:113},end:{line:168,column:139}}],line:168},29:{loc:{start:{line:173,column:4},end:{line:179,column:5}},type:"if",locations:[{start:{line:173,column:4},end:{line:179,column:5}},{start:{line:175,column:11},end:{line:179,column:5}}],line:173},30:{loc:{start:{line:173,column:8},end:{line:173,column:53}},type:"binary-expr",locations:[{start:{line:173,column:8},end:{line:173,column:33}},{start:{line:173,column:37},end:{line:173,column:53}}],line:173},31:{loc:{start:{line:175,column:11},end:{line:179,column:5}},type:"if",locations:[{start:{line:175,column:11},end:{line:179,column:5}},{start:{line:177,column:11},end:{line:179,column:5}}],line:175},32:{loc:{start:{line:178,column:31},end:{line:178,column:68}},type:"binary-expr",locations:[{start:{line:178,column:31},end:{line:178,column:36}},{start:{line:178,column:40},end:{line:178,column:68}}],line:178},33:{loc:{start:{line:184,column:22},end:{line:184,column:61}},type:"cond-expr",locations:[{start:{line:184,column:55},end:{line:184,column:57}},{start:{line:184,column:60},end:{line:184,column:61}}],line:184},34:{loc:{start:{line:187,column:4},end:{line:218,column:5}},type:"if",locations:[{start:{line:187,column:4},end:{line:218,column:5}},{start:{line:208,column:11},end:{line:218,column:5}}],line:187},35:{loc:{start:{line:188,column:6},end:{line:207,column:7}},type:"if",locations:[{start:{line:188,column:6},end:{line:207,column:7}},{start:{line:197,column:13},end:{line:207,column:7}}],line:188},36:{loc:{start:{line:194,column:57},end:{line:194,column:109}},type:"binary-expr",locations:[{start:{line:194,column:57},end:{line:194,column:64}},{start:{line:194,column:68},end:{line:194,column:109}}],line:194},37:{loc:{start:{line:214,column:42},end:{line:214,column:103}},type:"binary-expr",locations:[{start:{line:214,column:42},end:{line:214,column:58}},{start:{line:214,column:62},end:{line:214,column:103}}],line:214},38:{loc:{start:{line:215,column:43},end:{line:215,column:104}},type:"binary-expr",locations:[{start:{line:215,column:43},end:{line:215,column:59}},{start:{line:215,column:63},end:{line:215,column:104}}],line:215},39:{loc:{start:{line:229,column:22},end:{line:229,column:132}},type:"cond-expr",locations:[{start:{line:229,column:74},end:{line:229,column:101}},{start:{line:229,column:104},end:{line:229,column:132}}],line:229},40:{loc:{start:{line:231,column:4},end:{line:295,column:5}},type:"if",locations:[{start:{line:231,column:4},end:{line:295,column:5}},{start:{line:248,column:11},end:{line:295,column:5}}],line:231},41:{loc:{start:{line:248,column:11},end:{line:295,column:5}},type:"if",locations:[{start:{line:248,column:11},end:{line:295,column:5}},{start:{line:264,column:11},end:{line:295,column:5}}],line:248},42:{loc:{start:{line:264,column:11},end:{line:295,column:5}},type:"if",locations:[{start:{line:264,column:11},end:{line:295,column:5}},{start:{line:280,column:11},end:{line:295,column:5}}],line:264}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0},b:{0:[0,0,0],1:[0,0,0],2:[0,0,0,0,0,0],3:[0,0],4:[0,0,0],5:[0,0,0,0,0,0],6:[0,0,0],7:[0,0],8:[0,0],9:[0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0],18:[0,0],19:[0,0],20:[0,0],21:[0,0],22:[0,0],23:[0,0],24:[0,0],25:[0,0],26:[0,0],27:[0,0],28:[0,0,0,0,0],29:[0,0],30:[0,0],31:[0,0],32:[0,0],33:[0,0],34:[0,0],35:[0,0],36:[0,0],37:[0,0],38:[0,0],39:[0,0],40:[0,0],41:[0,0],42:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldFunction.tsx"],names:[],mappings:"AAkVQ;AAlVR,OAAO,WAAW;AAElB,OAAO,kBAAkB;AACzB,OAAO,kBAA4B;AACnC,OAAO,kBAAkB;AACzB,OAAO,wBAAwB;AAC/B,SAAQ,YAAY,qBAAoB;AACxC,SAAQ,2BAA0B;AAGlC,SAAS,oBAAoB,OAAY;AACvC,SAAQ,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,KAAK,MAAM,CAAC,MAAM;AACrE;AAEA,SAAS,gBAAgB,OAAY;AACnC,SACE,MAAM,QAAQ,KAAK,KACnB,MAAM,WAAW,KACjB,MAAM,CAAC,MAAM;AAEjB;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,SAAS,KACrB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW;AAAA,EAEpB,CAAC;AAEL;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SAAS,cACf,OAAO,UAAU,eAAe,KAAK,OAAO,UAAU;AAE1D;AAEA,SAAS,mBAAmB,OAAY;AACtC,SACE,OAAO,UAAW,YAClB,MAAM,SACN,OAAO,MAAM,aAAc,eAC3B,MAAM,MAAM,SAAS,KACrB,MAAM,QAAQ,MAAM,KAAK,KACzB,MAAM,MAAM,MAAM,CAAC,SAAe;AAChC,WACE,MAAM,QAAQ,IAAI,KAClB,KAAK,WAAW,KAChB,OAAO,KAAK,CAAC,MAAO;AAAA,EAExB,CAAC;AAEL;AAEA,SAAS,YAAY,OAAY;AAC/B,SACE,mBAAmB,KAAK,KACxB,mBAAmB,KAAK;AAE5B;AAEA,SAAS,YAAY,OAAgD;AACnE,QAAM,QAAQ,CAAC,UAAU,WAAW,QAAQ;AAC5C,SAAO,MAAM,SAAS,OAAO,KAAM;AACrC;AAEA,SAAS,oBAAoB,QAAyD;AACpF,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,MAAM,WAAW;AAAA,EACjC;AACA,SAAO;AACT;AAEA,SAAS,YAAY,OAAY,YAAU,CAAC,GAAU;AACpD,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,UAAU,SAAS,WAAW,oBAAoB,KAAK,GAAG;AACjE,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,WACS,YAAY,KAAK,GAAG;AAC3B,WAAO;AAAA,EACT,OACK;AACH,WAAO;AAAA,EACT;AACF;AAoBA,qBAAqB,sBAAsB,MAAM,UAAkD;AAAA,EACjG,YAAa,OAA2B;AACtC,UAAM,KAAK;AACX,SAAK,QAAQ;AAAA,MACX,UAAU,YAAY,MAAM,OAAO,MAAM,SAAS;AAAA,MAClD,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,OAAO,yBAAyB,OAAqC,OAA2B;AAE9F,QAAI,MAAM,WAAW;AACnB,aAAO,CAAC;AAAA,IACV,OACK;AACH,aAAO;AAAA,QACL,WAAW;AAAA,QACX,UAAU,YAAY,MAAM,OAAO,MAAM,SAAS;AAAA,MACpD;AAAA,IACF;AAAA,EACF;AAAA,EAEA,qBAAqB,WAAgB;AACnC,QAAI,UAAU,WAAW,cAAc;AACrC,aAAO;AAAA,IACT;AACA,QAAI,UAAU,SAAS,UAAU;AAC/B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AAAA,EAEA,UAAU,MAAM;AACd,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC;AAC5C,UAAM,WAAW,MAAM,MAAM,SAAS,CAAC;AACvC,QAAI,OAAO,SAAS,CAAC,MAAM,UAAU;AACnC,YAAM,KAAK;AAAA,QACT,EAAC,MAAM,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,SAAS,CAAC,EAAE,MAAK;AAAA,QACrD,SAAS,CAAC;AAAA,MACZ,CAAC;AAAA,IACH,OACK;AACH,YAAM,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;AAAA,IAC3C;AAEA,UAAM,eAAe;AAAA,MACnB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EACxD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,EAAC,WAAW,UAAS,IAAI,KAAK;AACpC,SAAK,MAAM,SAAS,WAAW,UAAU,OAAO;AAChD,SAAK,SAAS;AAAA,MACZ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,CAAC,YAAoB;AAChC,UAAM,QAAQ,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC;AAC5C,UAAM,OAAO,SAAS,CAAC;AAEvB,QAAI,eAAe;AAAA,MACjB,GAAG,KAAK,MAAM;AAAA,MACd;AAAA,IACF;AAEA,QAAG,MAAM,WAAW,GAAG;AACrB,qBAAe,MAAM,CAAC,EAAE,CAAC;AAAA,IAC3B;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,YAAY;AAAA,EACxD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,EAAC,MAAK,IAAI,KAAK;AAErB,QAAI;AACJ,QAAI,OAAO,UAAW,UAAU;AAC9B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC5E,CAAC;AAAA,QACH;AAAA,MACF,OACK;AACH,mBAAW;AAAA,UACT,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,YAC7C,CAAC,IAAI,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAChD;AAAA,QACF;AAAA,MACF;AAAA,IACF,OACK;AACH,iBAAW;AAAA,QACT,OAAO;AAAA,UACL,CAAC,GAAG,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UACtD,CAAC,IAAI,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,QACzD;AAAA,MACF;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,QAAQ;AAAA,EACpD;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAEhC,QAAI,gBAAgB,KAAK,GAAG;AAC1B,WAAK,MAAM,SAAS,WAAW;AAAA,QAC7B,QAAQ;AAAA,QACR,YAAY,MAAM,CAAC;AAAA,MACrB,CAAC;AACD,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH,WACS,oBAAoB,KAAK,GAAG;AACnC,WAAK,MAAM,SAAS,WAAW,MAAM,CAAC,CAAC;AACvC,WAAK,SAAS;AAAA,QACZ,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,UAAU,MAAM;AACd,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,WACE,gBAAgB,KAAK,KACrB,oBAAoB,KAAK,KACzB,YAAY,KAAK,KAChB,MAAM,QAAQ,KAAK,KAAK,UAAU,SAAS;AAAA,EAEhD;AAAA,EAEA,iBAAiB,MAAM;AACrB,UAAM,EAAC,OAAO,UAAS,IAAI,KAAK;AAChC,QAAI;AAEJ,QAAI,OAAO,UAAW,YAAY,WAAW,OAAO;AAClD,mBAAa,cAAc,gBAAgB,OAAO,SAAS;AAAA,IAC7D,WACS,mBAAmB,KAAK,GAAG;AAClC,mBAAa,CAAC,OAAO,MAAM,QAAQ;AAAA,IACrC,OACK;AACH,mBAAa,CAAC,WAAW,SAAS,KAAK,MAAM,UAAU,OAAO;AAAA,IAChE;AACA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,UAAU;AAAA,EACtD;AAAA,EAEA,mBAAmB,MAAM;AACvB,UAAM,eAAe,KAAK,qBAAqB,KAAK,MAAM,SAAS;AACnE,UAAM,YAAY,iBAAiB,gBAAgB,KAAK;AACxD,UAAM,EAAC,MAAK,IAAI,KAAK;AACrB,QAAI;AAEJ,QAAI,OAAO,UAAW,UAAU;AAC9B,UAAI,MAAM,OAAO;AACf,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO,MAAM,MAAM,IAAI,CAAC,SAAe;AACrC,mBAAO,CAAC,EAAC,MAAM,KAAK,CAAC,GAAG,OAAO,UAAS,GAAG,KAAK,CAAC,KAAK,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UACjG,CAAC;AAAA,QACH;AAAA,MACF,OACK;AACH,mBAAW;AAAA,UACT,UAAU;AAAA,UACV,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,UACZ,OAAO;AAAA,YACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,YACvE,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC1E;AAAA,QACF;AAAA,MACF;AAAA,IACF,OACK;AACH,iBAAW;AAAA,QACT,UAAU;AAAA,QACV,MAAM;AAAA,QACN,MAAM,MAAM;AAAA,QACZ,OAAO;AAAA,UACL,CAAC,EAAC,MAAM,GAAG,OAAO,UAAS,GAAG,KAAK,MAAM,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,UAC3F,CAAC,EAAC,MAAM,IAAI,OAAO,UAAS,GAAG,KAAK,MAAM,SAAS,oBAAoB,KAAK,MAAM,SAAS,CAAC;AAAA,QAC9F;AAAA,MACF;AAAA,IACF;AAEA,SAAK,MAAM,SAAS,KAAK,MAAM,WAAW,QAAQ;AAAA,EACpD;AAAA,EAEA,gBAAgB,MAAM;AACpB,SAAK,SAAS,EAAC,WAAW,KAAI,CAAC;AAAA,EACjC;AAAA,EAEA,kBAAkB,MAAM;AACtB,SAAK,SAAS,EAAC,WAAW,MAAK,CAAC;AAAA,EAClC;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,SAAQ,IAAI,KAAK;AACxB,UAAM,YAAY,KAAK,MAAM,UAAU,YAAY,KAAK,MAAM,QAAQ,8BAA8B;AACpG,QAAI;AAEJ,QAAI,aAAa,cAAc;AAC7B,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,MAAM,KAAK,MAAM,SAAS;AAAA,UAC7D,SAAS,KAAK;AAAA,UACd,QAAQ,KAAK;AAAA,UACb,UAAU,KAAK;AAAA,UACf,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,SAAS,KAAK;AAAA,UACd,QAAQ,KAAK;AAAA;AAAA,MACf;AAAA,IAEJ,WACS,aAAa,iBAAiB;AACrC,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,cAAc,KAAK;AAAA,UACnB,WAAW,KAAK;AAAA,UAChB,wBAAwB,KAAK;AAAA,UAC7B,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ,WACS,aAAa,iBAAiB;AAErC,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,cAAc,KAAK;AAAA,UACnB,WAAW,KAAK;AAAA,UAChB,wBAAwB,KAAK;AAAA,UAC7B,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ,OACK;AACH,kBACE;AAAA,QAAC;AAAA;AAAA,UACC,QAAQ,KAAK,MAAM;AAAA,UACnB,UAAU,KAAK,MAAM,SAAS,KAAK,IAAI;AAAA,UACvC,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,WAAW,KAAK,MAAM;AAAA,UACtB,OAAO,KAAK,MAAM;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,aAAa,KAAK;AAAA,UAClB,mBAAmB,KAAK;AAAA;AAAA,MAC1B;AAAA,IAEJ;AACA,WAAO,oBAAC,SAAI,WAAW,WAAW,eAAa,0BAAwB,KAAK,MAAM,WAC/E,qBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"36be9049018d9eb4ab6b3a8eeeb8db87a4e7a5ee"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Lt=function(){return a},a}Lt();function gK(n){return Lt().f[0]++,Lt().s[0]++,Lt().b[0][0]++,Array.isArray(n)&&(Lt().b[0][1]++,n.length===2)&&(Lt().b[0][2]++,n[0]==="literal")}function yK(n){return Lt().f[1]++,Lt().s[1]++,Lt().b[1][0]++,Array.isArray(n)&&(Lt().b[1][1]++,n.length===2)&&(Lt().b[1][2]++,n[0]==="get")}function Fce(n){return Lt().f[2]++,Lt().s[2]++,Lt().b[2][0]++,typeof n=="object"&&(Lt().b[2][1]++,n.stops)&&(Lt().b[2][2]++,typeof n.property>"u")&&(Lt().b[2][3]++,Array.isArray(n.stops))&&(Lt().b[2][4]++,n.stops.length>1)&&(Lt().b[2][5]++,n.stops.every(e=>(Lt().f[3]++,Lt().s[3]++,Lt().b[3][0]++,Array.isArray(e)&&(Lt().b[3][1]++,e.length===2))))}function SW(n){return Lt().f[4]++,Lt().s[4]++,Lt().b[4][0]++,typeof n=="object"&&(Lt().b[4][1]++,n.type==="identity")&&(Lt().b[4][2]++,Object.prototype.hasOwnProperty.call(n,"property"))}function Lce(n){return Lt().f[5]++,Lt().s[5]++,Lt().b[5][0]++,typeof n=="object"&&(Lt().b[5][1]++,n.stops)&&(Lt().b[5][2]++,typeof n.property<"u")&&(Lt().b[5][3]++,n.stops.length>1)&&(Lt().b[5][4]++,Array.isArray(n.stops))&&(Lt().b[5][5]++,n.stops.every(e=>(Lt().f[6]++,Lt().s[6]++,Lt().b[6][0]++,Array.isArray(e)&&(Lt().b[6][1]++,e.length===2)&&(Lt().b[6][2]++,typeof e[0]=="object"))))}function Uce(n){return Lt().f[7]++,Lt().s[7]++,Lt().b[7][0]++,SW(n)||(Lt().b[7][1]++,Lce(n))}function q8(n){Lt().f[8]++;const e=(Lt().s[8]++,["string","boolean","number"]);return Lt().s[9]++,e.includes(typeof n)}function zce(n){return Lt().f[9]++,Lt().s[10]++,Array.isArray(n)?(Lt().b[8][0]++,Lt().s[11]++,n.every(q8)):(Lt().b[8][1]++,Lt().s[12]++,!1)}function vK(n,e=(Lt().b[9][0]++,{})){return Lt().f[10]++,Lt().s[13]++,n===void 0?(Lt().b[10][0]++,Lt().s[14]++,"value"):(Lt().b[10][1]++,Lt().s[15]++,q8(n)?(Lt().b[11][0]++,Lt().s[16]++,"value"):(Lt().b[11][1]++,Lt().s[17]++,Lt().b[13][0]++,e.type==="array"&&(Lt().b[13][1]++,zce(n))?(Lt().b[12][0]++,Lt().s[18]++,"value"):(Lt().b[12][1]++,Lt().s[19]++,Fce(n)?(Lt().b[14][0]++,Lt().s[20]++,"zoom_function"):(Lt().b[14][1]++,Lt().s[21]++,Uce(n)?(Lt().b[15][0]++,Lt().s[22]++,"data_function"):(Lt().b[15][1]++,Lt().s[23]++,"expression")))))}class jce extends rr.Component{constructor(t){Lt().f[11]++,Lt().s[24]++;super(t);kn(this,"addStop",(Lt().s[34]++,()=>{Lt().f[14]++;const t=(Lt().s[35]++,this.props.value.stops.slice(0)),r=(Lt().s[36]++,t[t.length-1]);Lt().s[37]++,typeof r[0]=="object"?(Lt().b[19][0]++,Lt().s[38]++,t.push([{zoom:r[0].zoom+1,value:r[0].value},r[1]])):(Lt().b[19][1]++,Lt().s[39]++,t.push([r[0]+1,r[1]]));const i=(Lt().s[40]++,{...this.props.value,stops:t});Lt().s[41]++,this.props.onChange(this.props.fieldName,i)}));kn(this,"deleteExpression",(Lt().s[42]++,()=>{Lt().f[15]++;const{fieldSpec:t,fieldName:r}=(Lt().s[43]++,this.props);Lt().s[44]++,this.props.onChange(r,t.default),Lt().s[45]++,this.setState({dataType:"value"})}));kn(this,"deleteStop",(Lt().s[46]++,t=>{Lt().f[16]++;const r=(Lt().s[47]++,this.props.value.stops.slice(0));Lt().s[48]++,r.splice(t,1);let i=(Lt().s[49]++,{...this.props.value,stops:r});Lt().s[50]++,r.length===1?(Lt().b[20][0]++,Lt().s[51]++,i=r[0][1]):Lt().b[20][1]++,Lt().s[52]++,this.props.onChange(this.props.fieldName,i)}));kn(this,"makeZoomFunction",(Lt().s[53]++,()=>{Lt().f[17]++;const{value:t}=(Lt().s[54]++,this.props);let r;Lt().s[55]++,typeof t=="object"?(Lt().b[21][0]++,Lt().s[56]++,t.stops?(Lt().b[22][0]++,Lt().s[57]++,r={base:t.base,stops:t.stops.map(i=>(Lt().f[18]++,Lt().s[58]++,[i[0].zoom,(Lt().b[23][0]++,i[1]||(Lt().b[23][1]++,vf(this.props.fieldSpec)))]))}):(Lt().b[22][1]++,Lt().s[59]++,r={base:t.base,stops:[[6,vf(this.props.fieldSpec)],[10,vf(this.props.fieldSpec)]]})):(Lt().b[21][1]++,Lt().s[60]++,r={stops:[[6,(Lt().b[24][0]++,t||(Lt().b[24][1]++,vf(this.props.fieldSpec)))],[10,(Lt().b[25][0]++,t||(Lt().b[25][1]++,vf(this.props.fieldSpec)))]]}),Lt().s[61]++,this.props.onChange(this.props.fieldName,r)}));kn(this,"undoExpression",(Lt().s[62]++,()=>{Lt().f[19]++;const{value:t,fieldName:r}=(Lt().s[63]++,this.props);Lt().s[64]++,yK(t)?(Lt().b[26][0]++,Lt().s[65]++,this.props.onChange(r,{type:"identity",property:t[1]}),Lt().s[66]++,this.setState({dataType:"value"})):(Lt().b[26][1]++,Lt().s[67]++,gK(t)?(Lt().b[27][0]++,Lt().s[68]++,this.props.onChange(r,t[1]),Lt().s[69]++,this.setState({dataType:"value"})):Lt().b[27][1]++)}));kn(this,"canUndo",(Lt().s[70]++,()=>{Lt().f[20]++;const{value:t,fieldSpec:r}=(Lt().s[71]++,this.props);return Lt().s[72]++,Lt().b[28][0]++,yK(t)||(Lt().b[28][1]++,gK(t))||(Lt().b[28][2]++,q8(t))||(Lt().b[28][3]++,Array.isArray(t)&&(Lt().b[28][4]++,r.type==="array"))}));kn(this,"makeExpression",(Lt().s[73]++,()=>{Lt().f[21]++;const{value:t,fieldSpec:r}=(Lt().s[74]++,this.props);let i;Lt().s[75]++,Lt().b[30][0]++,typeof t=="object"&&(Lt().b[30][1]++,"stops"in t)?(Lt().b[29][0]++,Lt().s[76]++,i=OV.convertFunction(t,r)):(Lt().b[29][1]++,Lt().s[77]++,SW(t)?(Lt().b[31][0]++,Lt().s[78]++,i=["get",t.property]):(Lt().b[31][1]++,Lt().s[79]++,i=["literal",(Lt().b[32][0]++,t||(Lt().b[32][1]++,this.props.fieldSpec.default))])),Lt().s[80]++,this.props.onChange(this.props.fieldName,i)}));kn(this,"makeDataFunction",(Lt().s[81]++,()=>{Lt().f[22]++;const t=(Lt().s[82]++,this.getFieldFunctionType(this.props.fieldSpec)),r=(Lt().s[83]++,t==="categorical"?(Lt().b[33][0]++,""):(Lt().b[33][1]++,0)),{value:i}=(Lt().s[84]++,this.props);let s;Lt().s[85]++,typeof i=="object"?(Lt().b[34][0]++,Lt().s[86]++,i.stops?(Lt().b[35][0]++,Lt().s[87]++,s={property:"",type:t,base:i.base,stops:i.stops.map(a=>(Lt().f[23]++,Lt().s[88]++,[{zoom:a[0],value:r},(Lt().b[36][0]++,a[1]||(Lt().b[36][1]++,vf(this.props.fieldSpec)))]))}):(Lt().b[35][1]++,Lt().s[89]++,s={property:"",type:t,base:i.base,stops:[[{zoom:6,value:r},vf(this.props.fieldSpec)],[{zoom:10,value:r},vf(this.props.fieldSpec)]]})):(Lt().b[34][1]++,Lt().s[90]++,s={property:"",type:t,base:i.base,stops:[[{zoom:6,value:r},(Lt().b[37][0]++,this.props.value||(Lt().b[37][1]++,vf(this.props.fieldSpec)))],[{zoom:10,value:r},(Lt().b[38][0]++,this.props.value||(Lt().b[38][1]++,vf(this.props.fieldSpec)))]]}),Lt().s[91]++,this.props.onChange(this.props.fieldName,s)}));kn(this,"onMarkEditing",(Lt().s[92]++,()=>{Lt().f[24]++,Lt().s[93]++,this.setState({isEditing:!0})}));kn(this,"onUnmarkEditing",(Lt().s[94]++,()=>{Lt().f[25]++,Lt().s[95]++,this.setState({isEditing:!1})}));Lt().s[25]++,this.state={dataType:vK(t.value,t.fieldSpec),isEditing:!1}}static getDerivedStateFromProps(t,r){return Lt().f[12]++,Lt().s[26]++,r.isEditing?(Lt().b[16][0]++,Lt().s[27]++,{}):(Lt().b[16][1]++,Lt().s[28]++,{isEditing:!1,dataType:vK(t.value,t.fieldSpec)})}getFieldFunctionType(t){return Lt().f[13]++,Lt().s[29]++,t.expression.interpolated?(Lt().b[17][0]++,Lt().s[30]++,"exponential"):(Lt().b[17][1]++,Lt().s[31]++,t.type==="number"?(Lt().b[18][0]++,Lt().s[32]++,"interval"):(Lt().b[18][1]++,Lt().s[33]++,"categorical"))}render(){Lt().f[26]++;const{dataType:t}=(Lt().s[96]++,this.state),r=(Lt().s[97]++,this.props.fieldSpec.default===this.props.value?(Lt().b[39][0]++,"maputnik-default-property"):(Lt().b[39][1]++,"maputnik-modified-property"));let i;return Lt().s[98]++,t==="expression"?(Lt().b[40][0]++,Lt().s[99]++,i=le.jsx(RN,{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})):(Lt().b[40][1]++,Lt().s[100]++,t==="zoom_function"?(Lt().b[41][0]++,Lt().s[101]++,i=le.jsx(Kce,{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})):(Lt().b[41][1]++,Lt().s[102]++,t==="data_function"?(Lt().b[42][0]++,Lt().s[103]++,i=le.jsx(Dce,{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})):(Lt().b[42][1]++,Lt().s[104]++,i=le.jsx(bW,{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})))),Lt().s[105]++,le.jsx("div",{className:r,"data-wd-key":"spec-field-container:"+this.props.fieldName,children:i})}}function Ao(){var n="/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",e="411d3be261f729b266d6cb26884b34616b925c83",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx",statementMap:{0:{start:{line:4,column:23},end:{line:4,column:117}},1:{start:{line:6,column:20},end:{line:6,column:60}},2:{start:{line:7,column:16},end:{line:7,column:49}},3:{start:{line:8,column:20},end:{line:8,column:36}},4:{start:{line:9,column:2},end:{line:14,column:3}},5:{start:{line:10,column:4},end:{line:13,column:6}},6:{start:{line:15,column:2},end:{line:20,column:3}},7:{start:{line:16,column:4},end:{line:19,column:6}},8:{start:{line:21,column:2},end:{line:21,column:19}},9:{start:{line:24,column:16},end:{line:24,column:48}},10:{start:{line:25,column:2},end:{line:29,column:3}},11:{start:{line:26,column:4},end:{line:26,column:19}},12:{start:{line:28,column:4},end:{line:28,column:20}},13:{start:{line:32,column:21},end:{line:35,column:3}},14:{start:{line:33,column:18},end:{line:33,column:80}},15:{start:{line:34,column:4},end:{line:34,column:51}},16:{start:{line:37,column:23},end:{line:37,column:33}},17:{start:{line:38,column:19},end:{line:56,column:6}},18:{start:{line:39,column:24},end:{line:39,column:87}},19:{start:{line:40,column:20},end:{line:40,column:48}},20:{start:{line:41,column:21},end:{line:41,column:50}},21:{start:{line:42,column:25},end:{line:42,column:82}},22:{start:{line:43,column:24},end:{line:43,column:63}},23:{start:{line:44,column:6},end:{line:55,column:8}},24:{start:{line:57,column:4},end:{line:57,column:98}}},fnMap:{0:{name:"getFieldSpec",decl:{start:{line:5,column:9},end:{line:5,column:21}},loc:{start:{line:5,column:50},end:{line:22,column:1}},line:5},1:{name:"getGroupName",decl:{start:{line:23,column:9},end:{line:23,column:21}},loc:{start:{line:23,column:50},end:{line:30,column:1}},line:23},2:{name:"(anonymous_2)",decl:{start:{line:32,column:21},end:{line:32,column:22}},loc:{start:{line:32,column:45},end:{line:35,column:3}},line:32},3:{name:"(anonymous_3)",decl:{start:{line:36,column:2},end:{line:36,column:3}},loc:{start:{line:36,column:11},end:{line:58,column:3}},line:36},4:{name:"(anonymous_4)",decl:{start:{line:38,column:46},end:{line:38,column:47}},loc:{start:{line:38,column:61},end:{line:56,column:5}},line:38}},branchMap:{0:{loc:{start:{line:9,column:2},end:{line:14,column:3}},type:"if",locations:[{start:{line:9,column:2},end:{line:14,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:9},1:{loc:{start:{line:15,column:2},end:{line:20,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:20,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:24,column:16},end:{line:24,column:48}},type:"binary-expr",locations:[{start:{line:24,column:16},end:{line:24,column:42}},{start:{line:24,column:46},end:{line:24,column:48}}],line:24},3:{loc:{start:{line:25,column:2},end:{line:29,column:3}},type:"if",locations:[{start:{line:25,column:2},end:{line:29,column:3}},{start:{line:27,column:9},end:{line:29,column:3}}],line:25},4:{loc:{start:{line:40,column:20},end:{line:40,column:48}},type:"binary-expr",locations:[{start:{line:40,column:20},end:{line:40,column:42}},{start:{line:40,column:46},end:{line:40,column:48}}],line:40},5:{loc:{start:{line:41,column:21},end:{line:41,column:50}},type:"binary-expr",locations:[{start:{line:41,column:21},end:{line:41,column:44}},{start:{line:41,column:48},end:{line:41,column:50}}],line:41},6:{loc:{start:{line:42,column:25},end:{line:42,column:82}},type:"cond-expr",locations:[{start:{line:42,column:46},end:{line:42,column:62}},{start:{line:42,column:65},end:{line:42,column:82}}],line:42},7:{loc:{start:{line:43,column:24},end:{line:43,column:63}},type:"cond-expr",locations:[{start:{line:43,column:45},end:{line:43,column:52}},{start:{line:43,column:55},end:{line:43,column:63}}],line:43}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/PropertyGroup.tsx"],names:[],mappings:"AA+Da;AA/Db,OAAO,WAAW;AAElB,OAAO,mBAAmB;AAG1B,MAAM,iBAAiB,CAAC,sBAAsB,gBAAgB,gBAAgB,0BAA0B,YAAY;AAIpH,SAAS,aAAa,MAAW,WAAuC,WAAmB;AACzF,QAAM,YAAY,aAAa,MAAM,WAAW,SAAS;AACzD,QAAM,QAAQ,KAAK,YAAY,MAAM,SAAS;AAC9C,QAAM,YAAY,MAAM,SAAS;AACjC,MAAG,eAAe,QAAQ,SAAS,KAAK,GAAG;AACzC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,MAAG,cAAc,aAAa;AAC5B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,KAAK,MAAM,OAAO;AAAA,IAC5B;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,aAAa,MAAW,WAAuC,WAAmB;AACzF,QAAM,QAAS,KAAK,WAAW,SAAS,KAAK,CAAC;AAC9C,MAAI,aAAa,OAAO;AACtB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAUA,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,mBAAmB,CAAC,UAAkB,aAAkB;AACtD,UAAM,QAAQ,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,QAAQ;AAC3E,SAAK,MAAM,SAAS,OAAO,UAAU,QAAQ;AAAA,EAC/C;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,OAAM,IAAI,KAAK;AACtB,UAAM,SAAS,KAAK,MAAM,YAAY,IAAI,eAAa;AACrD,YAAM,YAAY,aAAa,KAAK,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,SAAS;AAEhF,YAAM,QAAQ,KAAK,MAAM,MAAM,SAAS,CAAC;AACzC,YAAM,SAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAC3C,YAAM,aAAa,aAAa,QAC5B,MAAM,SAA+B,IACrC,OAAO,SAAgC;AAC3C,YAAM,YAAY,aAAa,QAAQ,UAAU;AAEjD,aAAO;AAAA,QAAC;AAAA;AAAA,UACN;AAAA,UACA,UAAU,KAAK;AAAA,UAEf;AAAA,UACA,OAAO;AAAA,UACP;AAAA,UACA;AAAA;AAAA,QAJK;AAAA,MAKP;AAAA,IACF,CAAC;AAED,WAAO,oBAAC,SAAI,WAAU,2BACnB,kBACH;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"411d3be261f729b266d6cb26884b34616b925c83"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Ao=function(){return a},a}Ao();const Nce=(Ao().s[0]++,["background-pattern","fill-pattern","line-pattern","fill-extrusion-pattern","icon-image"]);function Wce(n,e,t){Ao().f[0]++;const r=(Ao().s[1]++,EW(n,e,t)),i=(Ao().s[2]++,n[r+"_"+e]),s=(Ao().s[3]++,i[t]);return Ao().s[4]++,Nce.indexOf(t)>=0?(Ao().b[0][0]++,Ao().s[5]++,{...s,values:n.$root.sprite.values}):(Ao().b[0][1]++,Ao().s[6]++,t==="text-font"?(Ao().b[1][0]++,Ao().s[7]++,{...s,values:n.$root.glyphs.values}):(Ao().b[1][1]++,Ao().s[8]++,s))}function EW(n,e,t){Ao().f[1]++;const r=(Ao().s[9]++,Ao().b[2][0]++,n["paint_"+e]||(Ao().b[2][1]++,{}));return Ao().s[10]++,t in r?(Ao().b[3][0]++,Ao().s[11]++,"paint"):(Ao().b[3][1]++,Ao().s[12]++,"layout")}class Gce extends rr.Component{constructor(){super(...arguments);kn(this,"onPropertyChange",(Ao().s[13]++,(t,r)=>{Ao().f[2]++;const i=(Ao().s[14]++,EW(this.props.spec,this.props.layer.type,t));Ao().s[15]++,this.props.onChange(i,t,r)}))}render(){Ao().f[3]++;const{errors:t}=(Ao().s[16]++,this.props),r=(Ao().s[17]++,this.props.groupFields.map(i=>{Ao().f[4]++;const s=(Ao().s[18]++,Wce(this.props.spec,this.props.layer.type,i)),a=(Ao().s[19]++,Ao().b[4][0]++,this.props.layer.paint||(Ao().b[4][1]++,{})),o=(Ao().s[20]++,Ao().b[5][0]++,this.props.layer.layout||(Ao().b[5][1]++,{})),d=(Ao().s[21]++,i in a?(Ao().b[6][0]++,a[i]):(Ao().b[6][1]++,o[i])),g=(Ao().s[22]++,i in a?(Ao().b[7][0]++,"paint"):(Ao().b[7][1]++,"layout"));return Ao().s[23]++,le.jsx(jce,{errors:t,onChange:this.onPropertyChange,fieldName:i,value:d,fieldType:g,fieldSpec:s},i)}));return Ao().s[24]++,le.jsx("div",{className:"maputnik-property-group",children:r})}}var tE,CK;function Qce(){return CK||(CK=1,tE=function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(r,i,s){t.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:s})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,i){if(1&i&&(r=t(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)t.d(s,a,(function(o){return r[o]}).bind(null,a));return s},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=2)}([function(n,e){n.exports=dp()},function(n,e){n.exports=Fa()},function(n,e,t){t.r(e);var r=t(1),i=t(0),s=function(){return(s=Object.assign||function(k){for(var U,z=1,q=arguments.length;z<q;z++)for(var Q in U=arguments[z])Object.prototype.hasOwnProperty.call(U,Q)&&(k[Q]=U[Q]);return k}).apply(this,arguments)},a=function(k,U){var z={};for(var q in k)Object.prototype.hasOwnProperty.call(k,q)&&U.indexOf(q)<0&&(z[q]=k[q]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function"){var Q=0;for(q=Object.getOwnPropertySymbols(k);Q<q.length;Q++)U.indexOf(q[Q])<0&&Object.prototype.propertyIsEnumerable.call(k,q[Q])&&(z[q[Q]]=k[q[Q]])}return z},o=0,d=r.forwardRef(function(k,U){var z=k.title,q=z===void 0?null:z,Q=k.description,re=Q===void 0?null:Q,X=k.size,Y=X===void 0?null:X,ee=k.color,N=ee===void 0?"currentColor":ee,ie=k.horizontal,he=ie===void 0?null:ie,de=k.vertical,Me=de===void 0?null:de,fe=k.rotate,xe=fe===void 0?null:fe,De=k.spin,me=De===void 0?null:De,at=k.style,Qe=at===void 0?{}:at,He=k.children,We=a(k,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);o++;var Ce,Te=me!==null&&me,rt=r.Children.map(He,function(Dt){var Pt=Dt;Te!==!0&&(Te=(me===null?Pt.props.spin:me)===!0);var Le=Pt.props.size;typeof Y=="number"&&typeof Pt.props.size=="number"&&(Le=Pt.props.size/Y);var Pe={size:Le,color:N===null?Pt.props.color:N,horizontal:he===null?Pt.props.horizontal:he,vertical:Me===null?Pt.props.vertical:Me,rotate:xe===null?Pt.props.rotate:xe,spin:me===null?Pt.props.spin:me,inStack:!0};return r.cloneElement(Pt,Pe)});Y!==null&&(Qe.width=typeof Y=="string"?Y:1.5*Y+"rem");var yt,bt="stack_labelledby_"+o,gt="stack_describedby_"+o;if(q)Ce=re?bt+" "+gt:bt;else if(yt="presentation",re)throw new Error("title attribute required when description is set");return r.createElement("svg",s({ref:U,viewBox:"0 0 24 24",style:Qe,role:yt,"aria-labelledby":Ce},We),q&&r.createElement("title",{id:bt},q),re&&r.createElement("desc",{id:gt},re),Te&&r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }","@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"),rt)});d.displayName="Stack",d.propTypes={size:i.oneOfType([i.number,i.string]),color:i.string,horizontal:i.bool,vertical:i.bool,rotate:i.number,spin:i.oneOfType([i.bool,i.number]),children:i.oneOfType([i.arrayOf(i.node),i.node]).isRequired,className:i.string,style:i.object},d.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var g=d;t.d(e,"Icon",function(){return O}),t.d(e,"Stack",function(){return g});var b=function(){return(b=Object.assign||function(k){for(var U,z=1,q=arguments.length;z<q;z++)for(var Q in U=arguments[z])Object.prototype.hasOwnProperty.call(U,Q)&&(k[Q]=U[Q]);return k}).apply(this,arguments)},E=function(k,U){var z={};for(var q in k)Object.prototype.hasOwnProperty.call(k,q)&&U.indexOf(q)<0&&(z[q]=k[q]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function"){var Q=0;for(q=Object.getOwnPropertySymbols(k);Q<q.length;Q++)U.indexOf(q[Q])<0&&Object.prototype.propertyIsEnumerable.call(k,q[Q])&&(z[q[Q]]=k[q[Q]])}return z},S=0,O=r.forwardRef(function(k,U){var z=k.path,q=k.id,Q=q===void 0?++S:q,re=k.title,X=re===void 0?null:re,Y=k.description,ee=Y===void 0?null:Y,N=k.size,ie=N===void 0?null:N,he=k.color,de=he===void 0?"currentColor":he,Me=k.horizontal,fe=Me!==void 0&&Me,xe=k.vertical,De=xe!==void 0&&xe,me=k.rotate,at=me===void 0?0:me,Qe=k.spin,He=Qe!==void 0&&Qe,We=k.style,Ce=We===void 0?{}:We,Te=k.inStack,rt=Te!==void 0&&Te,yt=E(k,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),bt={},gt=[];ie!==null&&(rt?gt.push("scale("+ie+")"):(Ce.width=typeof ie=="string"?ie:1.5*ie+"rem",Ce.height=Ce.width)),fe&>.push("scaleX(-1)"),De&>.push("scaleY(-1)"),at!==0&>.push("rotate("+at+"deg)"),de!==null&&(bt.fill=de);var Dt=r.createElement("path",b({d:z,style:bt},rt?yt:{})),Pt=Dt;gt.length>0&&(Ce.transform=gt.join(" "),Ce.transformOrigin="center",rt&&(Pt=r.createElement("g",{style:Ce},Dt,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var Le,Pe=Pt,Ee=He===!0||typeof He!="number"?2:He,nt=!rt&&(fe||De);if(Ee<0&&(nt=!nt),He&&(Pe=r.createElement("g",{style:{animation:"spin"+(nt?"-inverse":"")+" linear "+Math.abs(Ee)+"s infinite",transformOrigin:"center"}},Pt,!(fe||De||at!==0)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),rt)return Pe;var _t,ht="icon_labelledby_"+Q,Ut="icon_describedby_"+Q;if(X)Le=ee?ht+" "+Ut:ht;else if(_t="presentation",ee)throw new Error("title attribute required when description is set");return r.createElement("svg",b({ref:U,viewBox:"0 0 24 24",style:Ce,role:_t,"aria-labelledby":Le},yt),X&&r.createElement("title",{id:ht},X),ee&&r.createElement("desc",{id:Ut},ee),!rt&&He&&(nt?r.createElement("style",null,"@keyframes spin-inverse { from { transform: rotate(0deg) } to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }")),Pe)});O.displayName="Icon",O.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},O.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},e.default=O}])),tE}var qce=Qce();const _K=Ha(qce);function Z1(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",e="2f1dde9b3c8e927b8e8868bcb310eb3d6a65eb08",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx",statementMap:{0:{start:{line:16,column:4},end:{line:45,column:9}},1:{start:{line:22,column:27},end:{line:22,column:74}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:46,column:3}},line:15},1:{name:"(anonymous_1)",decl:{start:{line:22,column:19},end:{line:22,column:20}},loc:{start:{line:22,column:27},end:{line:22,column:74}},line:22}},branchMap:{},s:{0:0,1:0},f:{0:0,1:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditorGroup.tsx"],names:[],mappings:"AA+BQ,SACE,KADF;AA/BR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP,qBAAqB,yBAAyB,MAAM,UAAiC;AAAA,EACnF,SAAS;AACP,WAAO,qBAAC,iBAAc,MAAM,KAAK,MAAM,IACrC;AAAA;AAAA,QAAC;AAAA;AAAA,UAAqB,WAAU;AAAA,UAC9B,eAAa,wBAAsB,KAAK,MAAM,aAAa;AAAA,UAC3D,SAAS,QAAM,KAAK,MAAM,eAAe,CAAC,KAAK,MAAM,QAAQ;AAAA,UAE7D,+BAAC,uBAAoB,WAAU,uCAC7B;AAAA,gCAAC,UAAK,OAAO,EAAC,UAAU,EAAC,GAAI,eAAK,MAAM,OAAM;AAAA,YAC9C;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,WAAU;AAAA;AAAA,YACZ;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,MAAM;AAAA,gBACN,WAAU;AAAA;AAAA,YACZ;AAAA,aACF;AAAA;AAAA,MACF;AAAA,MACA,oBAAC,sBACE,eAAK,MAAM,UACd;AAAA,OACF;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2f1dde9b3c8e927b8e8868bcb310eb3d6a65eb08"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Z1=function(){return a},a}Z1();class Yce extends rr.Component{render(){return Z1().f[0]++,Z1().s[0]++,le.jsxs(MN,{uuid:this.props.id,children:[le.jsx(BN,{className:"maputnik-layer-editor-group","data-wd-key":"layer-editor-group:"+this.props["data-wd-key"],onClick:e=>(Z1().f[1]++,Z1().s[1]++,this.props.onActiveToggle(!this.props.isActive)),children:le.jsxs(dle,{className:"maputnik-layer-editor-group__button",children:[le.jsx("span",{style:{flexGrow:1},children:this.props.title}),le.jsx(_K,{path:Tle,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--up"}),le.jsx(_K,{path:kle,size:1,className:"maputnik-layer-editor-group__button__icon maputnik-layer-editor-group__button__icon--down"})]})}),le.jsx(mle,{children:this.props.children})]})}}function hy(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",e="32f7af2e1a9dc4f673c1fba818006229f9fd6490",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:10,column:4},end:{line:30,column:6}},2:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:31,column:3}},line:8}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMinZoom.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,UAAU;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QAC1D,OAAO,KAAK,MAAM;AAAA,QAClB,eAAY;AAAA,QAEZ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY;AAAA,YACZ,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,YAC9B,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"32f7af2e1a9dc4f673c1fba818006229f9fd6490"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return hy=function(){return a},a}hy();class $ce extends rr.Component{render(){hy().f[0]++;const e=(hy().s[0]++,this.props.t);return hy().s[1]++,le.jsx(ga,{label:e("Min Zoom"),fieldSpec:ts.layer.minzoom,error:this.props.error,"data-wd-key":"min-zoom",children:le.jsx(rm,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:ts.layer.minzoom.minimum,max:ts.layer.minzoom.maximum,default:ts.layer.minzoom.minimum,"data-wd-key":"min-zoom.input"})})}}const Vce=(hy().s[2]++,$s()($ce));function fy(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",e="f706dc673f9397f2919007f4b702470461bf0f7c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx",statementMap:{0:{start:{line:9,column:14},end:{line:9,column:26}},1:{start:{line:10,column:4},end:{line:30,column:6}},2:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:11},end:{line:31,column:3}},line:8}},branchMap:{},s:{0:0,1:0,2:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldMaxZoom.tsx"],names:[],mappings:"AAoBM;AApBN,OAAO,WAAW;AAElB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QAAM,OAAO,EAAE,UAAU;AAAA,QAAG,WAAW,OAAO,MAAM;AAAA,QAC1D,OAAO,KAAK,MAAM;AAAA,QAClB,eAAY;AAAA,QAEZ;AAAA,UAAC;AAAA;AAAA,YACC,YAAY;AAAA,YACZ,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,KAAK,OAAO,MAAM,QAAQ;AAAA,YAC1B,SAAS,OAAO,MAAM,QAAQ;AAAA,YAC9B,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f706dc673f9397f2919007f4b702470461bf0f7c"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return fy=function(){return a},a}fy();class Hce extends rr.Component{render(){fy().f[0]++;const e=(fy().s[0]++,this.props.t);return fy().s[1]++,le.jsx(ga,{label:e("Max Zoom"),fieldSpec:ts.layer.maxzoom,error:this.props.error,"data-wd-key":"max-zoom",children:le.jsx(rm,{allowRange:!0,value:this.props.value,onChange:this.props.onChange,min:ts.layer.maxzoom.minimum,max:ts.layer.maxzoom.maximum,default:ts.layer.maxzoom.maximum,"data-wd-key":"max-zoom.input"})})}}const Zce=(fy().s[2]++,$s()(Hce));function Cg(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",e="875d9bef6002e38aa0b5bf03af99ab4fc2308047",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx",statementMap:{0:{start:{line:8,column:14},end:{line:8,column:26}},1:{start:{line:9,column:22},end:{line:11,column:5}},2:{start:{line:12,column:4},end:{line:30,column:6}},3:{start:{line:33,column:21},end:{line:33,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:11},end:{line:31,column:3}},line:7}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldComment.tsx"],names:[],mappings:"AAyBM;AAzBN,OAAO,WAAW;AAElB,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,SAA0B,uBAAuB;AAQjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,YAAY;AAAA,MAChB,KAAK,EAAE,2EAA2E;AAAA,IACpF;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,OAAO,EAAE,UAAU;AAAA,QACnB;AAAA,QACA,eAAY;AAAA,QACZ,OAAO,KAAK,MAAM;AAAA,QAElB;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,KAAK,MAAM;AAAA,YACrB,SAAS,EAAE,YAAY;AAAA,YACvB,eAAY;AAAA;AAAA,QACd;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"875d9bef6002e38aa0b5bf03af99ab4fc2308047"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Cg=function(){return a},a}Cg();class Xce extends rr.Component{render(){Cg().f[0]++;const e=(Cg().s[0]++,this.props.t),t=(Cg().s[1]++,{doc:e("Comments for the current layer. This is non-standard and not in the spec.")});return Cg().s[2]++,le.jsx(ga,{label:e("Comments"),fieldSpec:t,"data-wd-key":"layer-comment",error:this.props.error,children:le.jsx(If,{multi:!0,value:this.props.value,onChange:this.props.onChange,default:e("Comment..."),"data-wd-key":"layer-comment.input"})})}}const Jce=(Cg().s[3]++,$s()(Xce)),ede={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"]}]},tde={groups:[{title:"Paint properties",type:"properties",fields:["background-color","background-pattern","background-opacity"]}]},nde={groups:[{title:"Paint properties",type:"properties",fields:["fill-opacity","fill-color","fill-antialias","fill-outline-color","fill-pattern","fill-translate","fill-translate-anchor"]}]},rde={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"]}]},ide={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"]}]},ode={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"]}]},sde={groups:[{title:"Paint properties",type:"properties",fields:["hillshade-illumination-direction","hillshade-illumination-anchor","hillshade-exaggeration","hillshade-shadow-color","hillshade-highlight-color","hillshade-accent-color"]}]},ade={groups:[{title:"Paint properties",type:"properties",fields:["heatmap-radius","heatmap-weight","heatmap-intensity","heatmap-opacity"]}]},lde={groups:[]},pb={line:ede,background:tde,fill:nde,"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:rde,symbol:ide,raster:ode,hillshade:sde,heatmap:ade,invalid:lde};function X1(){var n="/home/runner/work/maputnik/maputnik/src/libs/format.ts",e="c45fbfac66e994b59070a295e5a7f219cd5d66ac",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/format.ts",statementMap:{0:{start:{line:2,column:2},end:{line:2,column:50}}},fnMap:{0:{name:"formatLayerId",decl:{start:{line:1,column:16},end:{line:1,column:29}},loc:{start:{line:1,column:34},end:{line:3,column:1}},line:1}},branchMap:{0:{loc:{start:{line:2,column:9},end:{line:2,column:49}},type:"cond-expr",locations:[{start:{line:2,column:21},end:{line:2,column:37}},{start:{line:2,column:40},end:{line:2,column:49}}],line:2}},s:{0:0},f:{0:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/format.ts"],names:[],mappings:"AAAO,gBAAS,cAAe,IAAwB;AACrD,SAAO,OAAO,KAAK,mBAAmB,IAAI,EAAE;AAC9C;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c45fbfac66e994b59070a295e5a7f219cd5d66ac"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return X1=function(){return a},a}X1();function BW(n){return X1().f[0]++,X1().s[0]++,n===""?(X1().b[0][0]++,"[empty_string]"):(X1().b[0][1]++,`'${n}'`)}function Tn(){var n="/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",e="555ef41c8141fe537bdb43523a4ef7ec4c287394",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx",statementMap:{0:{start:{line:23,column:2},end:{line:32,column:21}},1:{start:{line:26,column:6},end:{line:30,column:8}},2:{start:{line:35,column:21},end:{line:39,column:3}},3:{start:{line:40,column:22},end:{line:44,column:3}},4:{start:{line:45,column:22},end:{line:49,column:3}},5:{start:{line:50,column:2},end:{line:50,column:103}},6:{start:{line:53,column:24},end:{line:60,column:3}},7:{start:{line:61,column:29},end:{line:63,column:3}},8:{start:{line:65,column:4},end:{line:65,column:17}},9:{start:{line:66,column:25},end:{line:66,column:27}},10:{start:{line:67,column:4},end:{line:69,column:7}},11:{start:{line:68,column:6},end:{line:68,column:39}},12:{start:{line:70,column:4},end:{line:70,column:34}},13:{start:{line:73,column:29},end:{line:73,column:54}},14:{start:{line:74,column:4},end:{line:78,column:7}},15:{start:{line:75,column:6},end:{line:77,column:7}},16:{start:{line:76,column:8},end:{line:76,column:45}},17:{start:{line:79,column:4},end:{line:81,column:6}},18:{start:{line:84,column:4},end:{line:89,column:6}},19:{start:{line:92,column:4},end:{line:95,column:6}},20:{start:{line:98,column:32},end:{line:101,column:5}},21:{start:{line:102,column:4},end:{line:104,column:7}},22:{start:{line:107,column:18},end:{line:107,column:20}},23:{start:{line:108,column:4},end:{line:110,column:5}},24:{start:{line:109,column:6},end:{line:109,column:62}},25:{start:{line:111,column:35},end:{line:111,column:45}},26:{start:{line:112,column:22},end:{line:112,column:24}},27:{start:{line:113,column:4},end:{line:119,column:7}},28:{start:{line:114,column:6},end:{line:118,column:7}},29:{start:{line:115,column:8},end:{line:117,column:10}},30:{start:{line:121,column:18},end:{line:121,column:34}},31:{start:{line:122,column:4},end:{line:124,column:5}},32:{start:{line:123,column:6},end:{line:123,column:63}},33:{start:{line:125,column:4},end:{line:228,column:5}},34:{start:{line:127,column:8},end:{line:191,column:13}},35:{start:{line:134,column:35},end:{line:134,column:112}},36:{start:{line:143,column:37},end:{line:146,column:15}},37:{start:{line:155,column:31},end:{line:155,column:69}},38:{start:{line:164,column:31},end:{line:164,column:75}},39:{start:{line:172,column:31},end:{line:172,column:70}},40:{start:{line:180,column:31},end:{line:180,column:70}},41:{start:{line:188,column:31},end:{line:188,column:104}},42:{start:{line:193,column:8},end:{line:201,column:16}},43:{start:{line:199,column:29},end:{line:199,column:67}},44:{start:{line:203,column:8},end:{line:212,column:10}},45:{start:{line:214,column:8},end:{line:225,column:10}},46:{start:{line:219,column:14},end:{line:222,column:16}},47:{start:{line:227,column:8},end:{line:227,column:49}},48:{start:{line:231,column:4},end:{line:234,column:7}},49:{start:{line:237,column:14},end:{line:237,column:26}},50:{start:{line:238,column:21},end:{line:238,column:23}},51:{start:{line:239,column:22},end:{line:239,column:43}},52:{start:{line:240,column:19},end:{line:257,column:6}},53:{start:{line:241,column:6},end:{line:241,column:70}},54:{start:{line:243,column:22},end:{line:243,column:30}},55:{start:{line:244,column:6},end:{line:244,column:29}},56:{start:{line:245,column:6},end:{line:256,column:8}},57:{start:{line:258,column:20},end:{line:258,column:49}},58:{start:{line:259,column:18},end:{line:284,column:5}},59:{start:{line:262,column:23},end:{line:262,column:71}},60:{start:{line:266,column:23},end:{line:266,column:68}},61:{start:{line:270,column:23},end:{line:270,column:80}},62:{start:{line:276,column:23},end:{line:276,column:41}},63:{start:{line:282,column:23},end:{line:282,column:40}},64:{start:{line:286,column:6},end:{line:286,column:30}},65:{start:{line:287,column:6},end:{line:287,column:26}},66:{start:{line:289,column:4},end:{line:334,column:6}},67:{start:{line:316,column:33},end:{line:316,column:42}},68:{start:{line:317,column:20},end:{line:317,column:174}},69:{start:{line:337,column:20},end:{line:337,column:58}}},fnMap:{0:{name:"getLayoutForType",decl:{start:{line:22,column:9},end:{line:22,column:25}},loc:{start:{line:22,column:35},end:{line:33,column:1}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:25,column:36},end:{line:25,column:37}},loc:{start:{line:25,column:47},end:{line:31,column:5}},line:25},2:{name:"layoutGroups",decl:{start:{line:34,column:9},end:{line:34,column:21}},loc:{start:{line:34,column:36},end:{line:51,column:1}},line:34},3:{name:"(anonymous_3)",decl:{start:{line:54,column:20},end:{line:54,column:21}},loc:{start:{line:54,column:26},end:{line:55,column:5}},line:54},4:{name:"(anonymous_4)",decl:{start:{line:56,column:21},end:{line:56,column:22}},loc:{start:{line:56,column:27},end:{line:57,column:5}},line:56},5:{name:"(anonymous_5)",decl:{start:{line:58,column:22},end:{line:58,column:23}},loc:{start:{line:58,column:28},end:{line:59,column:5}},line:58},6:{name:"(anonymous_6)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:21},end:{line:71,column:3}},line:64},7:{name:"(anonymous_7)",decl:{start:{line:67,column:57},end:{line:67,column:58}},loc:{start:{line:67,column:68},end:{line:69,column:5}},line:67},8:{name:"(anonymous_8)",decl:{start:{line:72,column:2},end:{line:72,column:3}},loc:{start:{line:72,column:48},end:{line:82,column:3}},line:72},9:{name:"(anonymous_9)",decl:{start:{line:74,column:63},end:{line:74,column:64}},loc:{start:{line:74,column:74},end:{line:78,column:5}},line:74},10:{name:"(anonymous_10)",decl:{start:{line:83,column:2},end:{line:83,column:3}},loc:{start:{line:83,column:20},end:{line:90,column:3}},line:83},11:{name:"(anonymous_11)",decl:{start:{line:91,column:2},end:{line:91,column:3}},loc:{start:{line:91,column:44},end:{line:96,column:3}},line:91},12:{name:"(anonymous_12)",decl:{start:{line:97,column:2},end:{line:97,column:3}},loc:{start:{line:97,column:36},end:{line:105,column:3}},line:97},13:{name:"(anonymous_13)",decl:{start:{line:106,column:2},end:{line:106,column:3}},loc:{start:{line:106,column:32},end:{line:229,column:3}},line:106},14:{name:"(anonymous_14)",decl:{start:{line:113,column:19},end:{line:113,column:20}},loc:{start:{line:113,column:30},end:{line:119,column:5}},line:113},15:{name:"(anonymous_15)",decl:{start:{line:134,column:24},end:{line:134,column:25}},loc:{start:{line:134,column:35},end:{line:134,column:112}},line:134},16:{name:"(anonymous_16)",decl:{start:{line:143,column:24},end:{line:143,column:25}},loc:{start:{line:143,column:37},end:{line:146,column:15}},line:143},17:{name:"(anonymous_17)",decl:{start:{line:155,column:24},end:{line:155,column:25}},loc:{start:{line:155,column:31},end:{line:155,column:69}},line:155},18:{name:"(anonymous_18)",decl:{start:{line:164,column:24},end:{line:164,column:25}},loc:{start:{line:164,column:31},end:{line:164,column:75}},line:164},19:{name:"(anonymous_19)",decl:{start:{line:172,column:24},end:{line:172,column:25}},loc:{start:{line:172,column:31},end:{line:172,column:70}},line:172},20:{name:"(anonymous_20)",decl:{start:{line:180,column:24},end:{line:180,column:25}},loc:{start:{line:180,column:31},end:{line:180,column:70}},line:180},21:{name:"(anonymous_21)",decl:{start:{line:188,column:24},end:{line:188,column:25}},loc:{start:{line:188,column:31},end:{line:188,column:104}},line:188},22:{name:"(anonymous_22)",decl:{start:{line:199,column:22},end:{line:199,column:23}},loc:{start:{line:199,column:29},end:{line:199,column:67}},line:199},23:{name:"(anonymous_23)",decl:{start:{line:218,column:22},end:{line:218,column:23}},loc:{start:{line:218,column:34},end:{line:223,column:13}},line:218},24:{name:"(anonymous_24)",decl:{start:{line:230,column:2},end:{line:230,column:3}},loc:{start:{line:230,column:20},end:{line:235,column:3}},line:230},25:{name:"(anonymous_25)",decl:{start:{line:236,column:2},end:{line:236,column:3}},loc:{start:{line:236,column:11},end:{line:335,column:3}},line:236},26:{name:"(anonymous_26)",decl:{start:{line:240,column:53},end:{line:240,column:54}},loc:{start:{line:240,column:64},end:{line:242,column:5}},line:240},27:{name:"(anonymous_27)",decl:{start:{line:242,column:11},end:{line:242,column:12}},loc:{start:{line:242,column:22},end:{line:257,column:5}},line:242},28:{name:"(anonymous_28)",decl:{start:{line:262,column:17},end:{line:262,column:18}},loc:{start:{line:262,column:23},end:{line:262,column:71}},line:262},29:{name:"(anonymous_29)",decl:{start:{line:266,column:17},end:{line:266,column:18}},loc:{start:{line:266,column:23},end:{line:266,column:68}},line:266},30:{name:"(anonymous_30)",decl:{start:{line:270,column:17},end:{line:270,column:18}},loc:{start:{line:270,column:23},end:{line:270,column:80}},line:270},31:{name:"(anonymous_31)",decl:{start:{line:276,column:17},end:{line:276,column:18}},loc:{start:{line:276,column:23},end:{line:276,column:41}},line:276},32:{name:"(anonymous_32)",decl:{start:{line:282,column:17},end:{line:282,column:18}},loc:{start:{line:282,column:23},end:{line:282,column:40}},line:282},33:{name:"handleSelection",decl:{start:{line:285,column:13},end:{line:285,column:28}},loc:{start:{line:285,column:40},end:{line:288,column:5}},line:285},34:{name:"(anonymous_34)",decl:{start:{line:315,column:147},end:{line:315,column:148}},loc:{start:{line:315,column:155},end:{line:318,column:19}},line:315}},branchMap:{0:{loc:{start:{line:23,column:9},end:{line:32,column:20}},type:"cond-expr",locations:[{start:{line:23,column:24},end:{line:32,column:3}},{start:{line:32,column:6},end:{line:32,column:20}}],line:23},1:{loc:{start:{line:75,column:6},end:{line:77,column:7}},type:"if",locations:[{start:{line:75,column:6},end:{line:77,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:75},2:{loc:{start:{line:108,column:4},end:{line:110,column:5}},type:"if",locations:[{start:{line:108,column:4},end:{line:110,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:108},3:{loc:{start:{line:114,column:6},end:{line:118,column:7}},type:"if",locations:[{start:{line:114,column:6},end:{line:118,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:114},4:{loc:{start:{line:114,column:10},end:{line:114,column:96}},type:"binary-expr",locations:[{start:{line:114,column:10},end:{line:114,column:22}},{start:{line:114,column:26},end:{line:114,column:55}},{start:{line:114,column:59},end:{line:114,column:96}}],line:114},5:{loc:{start:{line:122,column:4},end:{line:124,column:5}},type:"if",locations:[{start:{line:122,column:4},end:{line:124,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:122},6:{loc:{start:{line:125,column:4},end:{line:228,column:5}},type:"switch",locations:[{start:{line:126,column:6},end:{line:191,column:13}},{start:{line:192,column:6},end:{line:201,column:16}},{start:{line:202,column:6},end:{line:212,column:10}},{start:{line:213,column:6},end:{line:225,column:10}},{start:{line:226,column:6},end:{line:227,column:49}}],line:125},7:{loc:{start:{line:149,column:10},end:{line:157,column:11}},type:"binary-expr",locations:[{start:{line:149,column:10},end:{line:149,column:48}},{start:{line:149,column:68},end:{line:157,column:11}}],line:149},8:{loc:{start:{line:158,column:10},end:{line:166,column:11}},type:"binary-expr",locations:[{start:{line:158,column:10},end:{line:158,column:93}},{start:{line:158,column:113},end:{line:166,column:11}}],line:158},9:{loc:{start:{line:188,column:83},end:{line:188,column:103}},type:"cond-expr",locations:[{start:{line:188,column:93},end:{line:188,column:99}},{start:{line:188,column:102},end:{line:188,column:103}}],line:188},10:{loc:{start:{line:241,column:15},end:{line:241,column:68}},type:"binary-expr",locations:[{start:{line:241,column:15},end:{line:241,column:41}},{start:{line:241,column:45},end:{line:241,column:68}}],line:241},11:{loc:{start:{line:258,column:20},end:{line:258,column:49}},type:"binary-expr",locations:[{start:{line:258,column:20},end:{line:258,column:43}},{start:{line:258,column:47},end:{line:258,column:49}}],line:258},12:{loc:{start:{line:269,column:14},end:{line:269,column:67}},type:"cond-expr",locations:[{start:{line:269,column:46},end:{line:269,column:55}},{start:{line:269,column:58},end:{line:269,column:67}}],line:269}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0,0],5:[0,0],6:[0,0,0,0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/LayerEditor.tsx"],names:["layer","layout"],mappings:"AA2KyB,SA2EL,UA1Ed,KADmB;AA3KzB,OAAO,WAAuB;AAC9B,OAAO,eAAe;AACtB,SAAS,SAAS,QAAQ,MAAM,gBAAgB;AAChD,SAAQ,iBAAgB;AACxB,SAAQ,kBAAiB;AAGzB,OAAO,eAAe;AACtB,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,OAAO,sBAAsB;AAC7B,OAAO,eAAe;AACtB,OAAO,aAAa;AACpB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AACzB,OAAO,iBAAiB;AACxB,OAAO,sBAAsB;AAC7B,SAAS,YAAY,sBAAsB;AAC3C,OAAO,YAAY;AACnB,SAAQ,qBAAoB;AAC5B,SAA0B,uBAAuB;AAIjD,SAAS,iBAAiB,MAAkC,GAAc;AACxE,SAAO,OAAO,IAAI,IAAI;AAAA,IACpB,GAAG,OAAO,IAAI;AAAA,IACd,QAAQ,OAAO,IAAI,EAAE,OAAO,IAAI,WAAS;AACvC,aAAO;AAAA,QACL,GAAG;AAAA,QACH,IAAI,MAAM,MAAM,QAAQ,MAAM,GAAG;AAAA,QACjC,OAAO,EAAE,MAAM,KAAK;AAAA,MACtB;AAAA,IACF,CAAC;AAAA,EACH,IAAI,OAAO;AACb;AAEA,SAAS,aAAa,WAAuC,GAA8E;AACzI,QAAM,aAAa;AAAA,IACjB,IAAI;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,QAAQ;AAAA,IACjB,MAAM;AAAA,EACR;AACA,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,OAAO,EAAE,aAAa;AAAA,IACtB,MAAM;AAAA,EACR;AACA,SAAO,CAAC,YAAY,WAAW,EAC5B,OAAO,iBAAiB,WAAW,CAAC,EAAE,MAAM,EAC5C,OAAO,CAAC,WAAW,CAAC;AACzB;AAwBA,MAAM,4BAA4B,MAAM,UAAsD;AAAA,EAC5F,OAAO,eAAe;AAAA,IACpB,gBAAgB,MAAM;AAAA,IAAC;AAAA,IACvB,iBAAiB,MAAM;AAAA,IAAC;AAAA,IACxB,kBAAkB,MAAM;AAAA,IAAC;AAAA,EAC3B;AAAA,EAEA,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,YAAY,OAAiC;AAC3C,UAAM,KAAK;AAGX,UAAM,eAAyC,CAAC;AAChD,iBAAa,KAAK,MAAM,MAAM,MAAM,MAAM,CAAC,EAAE,QAAQ,WAAS;AAC5D,mBAAa,MAAM,KAAK,IAAI;AAAA,IAC9B,CAAC;AAED,SAAK,QAAQ,EAAE,aAAa;AAAA,EAC9B;AAAA,EAEA,OAAO,yBAAyB,OAA2C,OAAyB;AAClG,UAAM,mBAAmB,EAAE,GAAG,MAAM,aAAa;AAEjD,qBAAiB,MAAM,MAAM,MAAM,MAAM,CAAC,EAAE,OAAO,QAAQ,WAAS;AAClE,UAAG,EAAE,MAAM,SAAS,mBAAmB;AACrC,yBAAiB,MAAM,KAAK,IAAI;AAAA,MAClC;AAAA,IACF,CAAC;AAED,WAAO;AAAA,MACL,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EAEA,kBAAmB;AACjB,WAAO;AAAA,MACL,eAAe;AAAA,QACb,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe,OAAwC,UAAkB,UAAe;AACtF,SAAK,MAAM;AAAA,MACT,KAAK,MAAM;AAAA,MACX,eAAe,KAAK,MAAM,OAAO,OAAO,UAAU,QAAQ;AAAA,IAC5D;AAAA,EACF;AAAA,EAEA,cAAc,YAAoB,QAAiB;AACjD,UAAM,sBAAsB;AAAA,MAC1B,GAAG,KAAK,MAAM;AAAA,MACd,CAAC,UAAU,GAAG;AAAA,IAChB;AACA,SAAK,SAAS;AAAA,MACZ,cAAc;AAAA,IAChB,CAAC;AAAA,EACH;AAAA,EAEA,gBAAgB,MAAc,QAAgC;AAC5D,QAAI,UAAU;AACd,QAAG,KAAK,MAAM,MAAM,UAAU;AAC5B,gBAAW,KAAK,MAAM,MAAM,SAAiB,kBAAkB;AAAA,IACjE;AACA,UAAM,EAAC,QAAQ,WAAU,IAAI,KAAK;AAElC,UAAM,YAAwE,CAAC;AAC/E,WAAQ,QAAQ,WAAS;AACvB,UACE,MAAM,UACN,MAAM,OAAO,SAAS,WACtB,MAAM,OAAO,KAAK,SAAS,YAC3B;AACA,kBAAU,MAAM,OAAO,KAAK,GAAG,IAAI;AAAA,UACjC,SAAS,MAAM,OAAO,KAAK;AAAA,QAC7B;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI;AACJ,UAAM,QAAQ,KAAK,MAAM;AACzB,QAAG,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG;AACzE,uBAAkB,KAAK,MAAM,QAAQ,MAAM,MAAM,EAAU;AAAA,IAC7D;AAEA,YAAO,MAAM;AAAA,MACb,KAAK;AAAS,eAAO,qBAAC,SACpB;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,OAAM;AAAA,cACN,OAAO,UAAU;AAAA,cACjB,UAAU,WAAS,KAAK,MAAM,gBAAgB,KAAK,MAAM,YAAY,KAAK,MAAM,MAAM,IAAI,KAAK;AAAA;AAAA,UACjG;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,aAAW,KAAK,MAAM;AAAA,gBAC9B,KAAK,MAAM;AAAA,gBACX,WAAW,KAAK,MAAM,OAAO,OAAO;AAAA,cACtC;AAAA;AAAA,UACF;AAAA,UACC,KAAK,MAAM,MAAM,SAAS,gBAAgB;AAAA,YAAC;AAAA;AAAA,cAC1C,OAAO,UAAU;AAAA,cACjB,WAAW,OAAO,KAAK,KAAK,MAAM,OAAQ;AAAA,cAC1C,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,UACtD;AAAA,UAEC,CAAC,cAAc,UAAU,aAAa,SAAS,EAAE,QAAQ,KAAK,MAAM,MAAM,IAAI,IAAI,KACjF;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU,cAAc;AAAA,cAC/B;AAAA,cACA,OAAQ,KAAK,MAAM,MAAc,cAAc;AAAA,cAC/C,UAAU,OAAK,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAAA;AAAA,UAC5D;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO,KAAK,MAAM,MAAM;AAAA,cACxB,UAAU,OAAK,KAAK,eAAe,MAAM,WAAW,CAAC;AAAA;AAAA,UACvD;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,OAAO,UAAU;AAAA,cACjB,OAAO;AAAA,cACP,UAAU,OAAK,KAAK,eAAe,YAAY,oBAAoB,KAAK,KAAM,SAAY,CAAC;AAAA;AAAA,UAC7F;AAAA,WACF;AAAA,MACA,KAAK;AAAU,eAAO,oBAAC,SACrB,8BAAC,SAAI,WAAU,kCACb;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ;AAAA,YACR,QAAS,KAAK,MAAM,MAAc;AAAA,YAClC,YAAY,KAAK,MAAM,aAAc,KAAK,MAAM,MAAc,cAAc,CAAC;AAAA,YAC7E,UAAU,OAAK,KAAK,eAAe,MAAM,UAAU,CAAC;AAAA;AAAA,QACtD,GACF,GACF;AAAA,MACA,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,QAAQ;AAAA,YACR,OAAO,KAAK,MAAM;AAAA,YAClB,aAAa;AAAA,YACb,MAAM,KAAK,MAAM;AAAA,YACjB,UAAU,KAAK,eAAe,KAAK,IAAI;AAAA;AAAA,QACzC;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UAAC;AAAA;AAAA,YACN,OAAO,KAAK,MAAM;AAAA,YAClB,UAAU,CAACA,WAAU;AACnB,mBAAK,MAAM;AAAA,gBACT,KAAK,MAAM;AAAA,gBACXA;AAAA,cACF;AAAA,YACF;AAAA;AAAA,QACF;AAAA,MACF;AAAS,eAAO,gCAAE;AAAA,IAClB;AAAA,EACF;AAAA,EAEA,UAAU,QAAgB;AACxB,SAAK,MAAM,YAAY;AAAA,MACrB,UAAU,KAAK,MAAM;AAAA,MACrB,UAAU,KAAK,MAAM,aAAW;AAAA,IAClC,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AAErB,UAAM,WAAqB,CAAC;AAC5B,UAAM,YAAY,KAAK,MAAM,MAAM;AACnC,UAAM,SAAS,aAAa,WAAW,CAAC,EAAE,OAAO,WAAS;AACxD,aAAO,EAAE,cAAc,gBAAgB,MAAM,SAAS;AAAA,IACxD,CAAC,EAAE,IAAI,WAAS;AACd,YAAM,UAAU,MAAM;AACtB,eAAS,KAAK,OAAO;AACrB,aAAO;AAAA,QAAC;AAAA;AAAA,UACN,eAAa,MAAM;AAAA,UACnB,IAAI;AAAA,UAEJ,OAAO,MAAM;AAAA,UACb,UAAU,KAAK,MAAM,aAAa,MAAM,KAAK;AAAA,UAC7C,gBAAgB,KAAK,cAAc,KAAK,MAAM,MAAM,KAAK;AAAA,UAExD,eAAK,gBAAgB,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA,QALzC;AAAA,MAMP;AAAA,IACF,CAAC;AAED,UAAMC,UAAS,KAAK,MAAM,MAAM,UAAU,CAAC;AAE3C,UAAM,QAAkF;AAAA,MACtF,QAAQ;AAAA,QACN,MAAM,EAAE,QAAQ;AAAA,QAChB,SAAS,MAAM,KAAK,MAAM,eAAe,KAAK,MAAM,UAAU;AAAA,MAChE;AAAA,MACA,WAAW;AAAA,QACT,MAAM,EAAE,WAAW;AAAA,QACnB,SAAS,MAAM,KAAK,MAAM,YAAY,KAAK,MAAM,UAAU;AAAA,MAC7D;AAAA,MACA,MAAM;AAAA,QACJ,MAAOA,QAAO,eAAe,SAAU,EAAE,MAAM,IAAI,EAAE,MAAM;AAAA,QAC3D,SAAS,MAAM,KAAK,MAAM,wBAAwB,KAAK,MAAM,UAAU;AAAA,MACzE;AAAA,MACA,aAAa;AAAA,QACX,MAAM,EAAE,eAAe;AAAA;AAAA,QAEvB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,EAAE;AAAA,MAClC;AAAA,MACA,eAAe;AAAA,QACb,MAAM,EAAE,iBAAiB;AAAA;AAAA,QAEzB,UAAU,KAAK,MAAM;AAAA,QACrB,SAAS,MAAM,KAAK,UAAU,CAAE;AAAA,MAClC;AAAA,IACF;AAEA,aAAS,gBAAgB,IAAY,OAA6B;AAChE,YAAM,gBAAgB;AACtB,YAAM,EAAE,EAAE,QAAQ;AAAA,IACpB;AAEA,WAAO;AAAA,MAAC;AAAA;AAAA,QAAQ,WAAU;AAAA,QACxB,MAAK;AAAA,QACL,cAAY,EAAE,cAAc;AAAA,QAE5B;AAAA,8BAAC,YACC,+BAAC,SAAI,WAAU,gBACb;AAAA,gCAAC,QAAG,WAAU,uBACX,YAAE,sBAAsB,EAAE,SAAS,cAAc,KAAK,MAAM,MAAM,EAAE,EAAE,CAAC,GAC1E;AAAA,YACA,oBAAC,SAAI,WAAU,sBACb;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,aAAa;AAAA,gBACb,kBAAkB;AAAA,gBAElB;AAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,IAAG;AAAA,sBACH,eAAY;AAAA,sBACZ,WAAU;AAAA,sBACV,OAAO;AAAA,sBACP,8BAAC,cAAW,WAAU,0BAAyB;AAAA;AAAA,kBACjD;AAAA,kBACA,oBAAC,QACC,8BAAC,QAAG,WAAU,mBACX,iBAAO,KAAK,KAAK,EAAE,IAAI,CAAC,OAAO;AAC9B,0BAAM,OAAO,MAAM,EAAE;AACrB,2BAAO,oBAAC,QACN,8BAAC,YAAS,OAAO,IAAI,WAAU,yBAC5B,eAAK,MACR,KAHc,EAIhB;AAAA,kBACF,CAAC,GACH,GACF;AAAA;AAAA;AAAA,YACF,GACF;AAAA,aACF,GAEF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,uBAAuB;AAAA,cACvB,mBAAmB;AAAA,cACnB,aAAa;AAAA,cAEZ;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,cAAc,gBAAgB,EAAE,mBAAmB;AACzD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"555ef41c8141fe537bdb43523a4ef7ec4c287394"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Tn=function(){return a},a}Tn();function OW(n,e){return Tn().f[0]++,Tn().s[0]++,pb[n]?(Tn().b[0][0]++,{...pb[n],groups:pb[n].groups.map(t=>(Tn().f[1]++,Tn().s[1]++,{...t,id:t.title.replace(/ /g,"_"),title:e(t.title)}))}):(Tn().b[0][1]++,pb.invalid)}function bK(n,e){Tn().f[2]++;const t=(Tn().s[2]++,{id:"layer",title:e("Layer"),type:"layer"}),r=(Tn().s[3]++,{id:"filter",title:e("Filter"),type:"filter"}),i=(Tn().s[4]++,{id:"jsoneditor",title:e("JSON Editor"),type:"jsoneditor"});return Tn().s[5]++,[t,r].concat(OW(n,e).groups).concat([i])}class mB extends rr.Component{constructor(e){Tn().f[6]++,Tn().s[8]++,super(e);const t=(Tn().s[9]++,{});Tn().s[10]++,bK(this.props.layer.type,e.t).forEach(r=>{Tn().f[7]++,Tn().s[11]++,t[r.title]=!0}),Tn().s[12]++,this.state={editorGroups:t}}static getDerivedStateFromProps(e,t){Tn().f[8]++;const r=(Tn().s[13]++,{...t.editorGroups});return Tn().s[14]++,OW(e.layer.type,e.t).groups.forEach(i=>{Tn().f[9]++,Tn().s[15]++,i.title in r?Tn().b[1][1]++:(Tn().b[1][0]++,Tn().s[16]++,r[i.title]=!0)}),Tn().s[17]++,{editorGroups:r}}getChildContext(){return Tn().f[10]++,Tn().s[18]++,{reactIconBase:{size:14,color:"#8e8e8e"}}}changeProperty(e,t,r){Tn().f[11]++,Tn().s[19]++,this.props.onLayerChanged(this.props.layerIndex,Eae(this.props.layer,e,t,r))}onGroupToggle(e,t){Tn().f[12]++;const r=(Tn().s[20]++,{...this.state.editorGroups,[e]:t});Tn().s[21]++,this.setState({editorGroups:r})}renderGroupType(e,t){Tn().f[13]++;let r=(Tn().s[22]++,"");Tn().s[23]++,this.props.layer.metadata?(Tn().b[2][0]++,Tn().s[24]++,r=this.props.layer.metadata["maputnik:comment"]):Tn().b[2][1]++;const{errors:i,layerIndex:s}=(Tn().s[25]++,this.props),a=(Tn().s[26]++,{});Tn().s[27]++,i.forEach(g=>{Tn().f[14]++,Tn().s[28]++,Tn().b[4][0]++,g.parsed&&(Tn().b[4][1]++,g.parsed.type==="layer")&&(Tn().b[4][2]++,g.parsed.data.index==s)?(Tn().b[3][0]++,Tn().s[29]++,a[g.parsed.data.key]={message:g.parsed.data.message}):Tn().b[3][1]++});let o;const d=(Tn().s[30]++,this.props.layer);switch(Tn().s[31]++,Object.prototype.hasOwnProperty.call(this.props.sources,d.source)?(Tn().b[5][0]++,Tn().s[32]++,o=this.props.sources[d.source].layers):Tn().b[5][1]++,Tn().s[33]++,e){case"layer":return Tn().b[6][0]++,Tn().s[34]++,le.jsxs("div",{children:[le.jsx(dN,{value:this.props.layer.id,wdKey:"layer-editor.layer-id",error:a.id,onChange:g=>(Tn().f[15]++,Tn().s[35]++,this.props.onLayerIdChange(this.props.layerIndex,this.props.layer.id,g))}),le.jsx(cN,{disabled:!0,error:a.type,value:this.props.layer.type,onChange:g=>(Tn().f[16]++,Tn().s[36]++,this.props.onLayerChanged(this.props.layerIndex,Sae(this.props.layer,g)))}),(Tn().b[7][0]++,this.props.layer.type!=="background"&&(Tn().b[7][1]++,le.jsx(fN,{error:a.source,sourceIds:Object.keys(this.props.sources),value:this.props.layer.source,onChange:g=>(Tn().f[17]++,Tn().s[37]++,this.changeProperty(null,"source",g))}))),(Tn().b[8][0]++,["background","raster","hillshade","heatmap"].indexOf(this.props.layer.type)<0&&(Tn().b[8][1]++,le.jsx(mN,{error:a["source-layer"],sourceLayerIds:o,value:this.props.layer["source-layer"],onChange:g=>(Tn().f[18]++,Tn().s[38]++,this.changeProperty(null,"source-layer",g))}))),le.jsx(Vce,{error:a.minzoom,value:this.props.layer.minzoom,onChange:g=>(Tn().f[19]++,Tn().s[39]++,this.changeProperty(null,"minzoom",g))}),le.jsx(Zce,{error:a.maxzoom,value:this.props.layer.maxzoom,onChange:g=>(Tn().f[20]++,Tn().s[40]++,this.changeProperty(null,"maxzoom",g))}),le.jsx(Jce,{error:a.comment,value:r,onChange:g=>(Tn().f[21]++,Tn().s[41]++,this.changeProperty("metadata","maputnik:comment",g==""?(Tn().b[9][0]++,void 0):(Tn().b[9][1]++,g)))})]});case"filter":return Tn().b[6][1]++,Tn().s[42]++,le.jsx("div",{children:le.jsx("div",{className:"maputnik-filter-editor-wrapper",children:le.jsx(Qle,{errors:a,filter:this.props.layer.filter,properties:this.props.vectorLayers[this.props.layer["source-layer"]],onChange:g=>(Tn().f[22]++,Tn().s[43]++,this.changeProperty(null,"filter",g))})})});case"properties":return Tn().b[6][2]++,Tn().s[44]++,le.jsx(Gce,{errors:a,layer:this.props.layer,groupFields:t,spec:this.props.spec,onChange:this.changeProperty.bind(this)});case"jsoneditor":return Tn().b[6][3]++,Tn().s[45]++,le.jsx(b8,{layer:this.props.layer,onChange:g=>{Tn().f[23]++,Tn().s[46]++,this.props.onLayerChanged(this.props.layerIndex,g)}});default:return Tn().b[6][4]++,Tn().s[47]++,le.jsx(le.Fragment,{})}}moveLayer(e){Tn().f[24]++,Tn().s[48]++,this.props.onMoveLayer({oldIndex:this.props.layerIndex,newIndex:this.props.layerIndex+e})}render(){Tn().f[25]++;const e=(Tn().s[49]++,this.props.t),t=(Tn().s[50]++,[]),r=(Tn().s[51]++,this.props.layer.type),i=(Tn().s[52]++,bK(r,e).filter(d=>(Tn().f[26]++,Tn().s[53]++,Tn().b[10][0]++,!(r==="background"&&(Tn().b[10][1]++,d.type==="source")))).map(d=>{Tn().f[27]++;const g=(Tn().s[54]++,d.id);return Tn().s[55]++,t.push(g),Tn().s[56]++,le.jsx(Yce,{"data-wd-key":d.title,id:g,title:d.title,isActive:this.state.editorGroups[d.title],onActiveToggle:this.onGroupToggle.bind(this,d.title),children:this.renderGroupType(d.type,d.fields)},g)})),s=(Tn().s[57]++,Tn().b[11][0]++,this.props.layer.layout||(Tn().b[11][1]++,{})),a=(Tn().s[58]++,{delete:{text:e("Delete"),handler:()=>(Tn().f[28]++,Tn().s[59]++,this.props.onLayerDestroy(this.props.layerIndex))},duplicate:{text:e("Duplicate"),handler:()=>(Tn().f[29]++,Tn().s[60]++,this.props.onLayerCopy(this.props.layerIndex))},hide:{text:s.visibility==="none"?(Tn().b[12][0]++,e("Show")):(Tn().b[12][1]++,e("Hide")),handler:()=>(Tn().f[30]++,Tn().s[61]++,this.props.onLayerVisibilityToggle(this.props.layerIndex))},moveLayerUp:{text:e("Move layer up"),disabled:this.props.isFirstLayer,handler:()=>(Tn().f[31]++,Tn().s[62]++,this.moveLayer(-1))},moveLayerDown:{text:e("Move layer down"),disabled:this.props.isLastLayer,handler:()=>(Tn().f[32]++,Tn().s[63]++,this.moveLayer(1))}});function o(d,g){Tn().f[33]++,Tn().s[64]++,g.stopPropagation(),Tn().s[65]++,a[d].handler()}return Tn().s[66]++,le.jsxs("section",{className:"maputnik-layer-editor",role:"main","aria-label":e("Layer editor"),children:[le.jsx("header",{children:le.jsxs("div",{className:"layer-header",children:[le.jsx("h2",{className:"layer-header__title",children:e("Layer: {{layerId}}",{layerId:BW(this.props.layer.id)})}),le.jsx("div",{className:"layer-header__info",children:le.jsxs(ub.Wrapper,{className:"more-menu",onSelection:o,closeOnSelection:!1,children:[le.jsx(ub.Button,{id:"skip-target-layer-editor","data-wd-key":"skip-target-layer-editor",className:"more-menu__button",title:"Layer options",children:le.jsx(OH,{className:"more-menu__button__svg"})}),le.jsx(ub.Menu,{children:le.jsx("ul",{className:"more-menu__menu",children:Object.keys(a).map(d=>{Tn().f[34]++;const g=(Tn().s[67]++,a[d]);return Tn().s[68]++,le.jsx("li",{children:le.jsx(ub.MenuItem,{value:d,className:"more-menu__menu__item",children:g.text})},d)})})})]})})]})}),le.jsx(Jae,{allowMultipleExpanded:!0,allowZeroExpanded:!0,preExpanded:t,children:i})]})}}kn(mB,"defaultProps",(Tn().s[6]++,{onLayerChanged:()=>{Tn().f[3]++},onLayerIdChange:()=>{Tn().f[4]++},onLayerDestroyed:()=>{Tn().f[5]++}})),kn(mB,"childContextTypes",(Tn().s[7]++,{reactIconBase:fi.object}));const ude=(Tn().s[69]++,$s()(mB));var xK=function(n,e,t){if(t||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))},Ade=function(){function n(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"}return n}(),cde=function(){function n(e){this.version=e,this.type="node",this.name="node",this.os=process.platform}return n}(),dde=function(){function n(e,t,r,i){this.name=e,this.version=t,this.os=r,this.bot=i,this.type="bot-device"}return n}(),hde=function(){function n(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return n}(),fde=function(){function n(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return n}(),pde=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,mde=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,wK=3,gde=[["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",pde]],MK=[["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 yde(n){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new fde:typeof navigator<"u"?Cde(navigator.userAgent):bde()}function vde(n){return n!==""&&gde.reduce(function(e,t){var r=t[0],i=t[1];if(e)return e;var s=i.exec(n);return!!s&&[r,s]},!1)}function Cde(n){var e=vde(n);if(!e)return null;var t=e[0],r=e[1];if(t==="searchbot")return new hde;var i=r[1]&&r[1].split(".").join("_").split("_").slice(0,3);i?i.length<wK&&(i=xK(xK([],i,!0),xde(wK-i.length),!0)):i=[];var s=i.join("."),a=_de(n),o=mde.exec(n);return o&&o[1]?new dde(t,s,a,o[1]):new Ade(t,s,a)}function _de(n){for(var e=0,t=MK.length;e<t;e++){var r=MK[e],i=r[0],s=r[1],a=s.exec(n);if(a)return i}return null}function bde(){var n=typeof process<"u"&&process.version;return n?new cde(process.version.slice(1)):null}function xde(n){for(var e=[],t=0;t<n;t++)e.push("0");return e}const wde="maputnik",Mde="2.1.1",Sde="A MapLibre GL visual style editor",Ede="module",Bde="''",Ode={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",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"},Ide={type:"git",url:"https://github.com/maplibre/maputnik"},kde="Lukas Martinelli",Tde="MIT",Pde="https://github.com/maplibre/maputnik#readme",Rde={"@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:"^24.2.1","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","@prantlf/jsonlint":"^16.0.0",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:"^10.3.1","ol-mapbox-style":"^12.4.0","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.4.0","react-icon-base":"^2.1.2","react-icons":"^5.4.0","react-sortable-hoc":"^2.0.0","reconnecting-websocket":"^4.4.0",slugify:"^1.6.6","string-hash":"^1.1.3",url:"^0.11.4"},Dde={esversion:6},Kde={extends:"stylelint-config-recommended-scss",rules:{"no-descending-specificity":null,"media-feature-name-no-unknown":[!0,{ignoreMediaFeatureNames:["prefers-reduced-motion"]}]}},Fde={"@cypress/code-coverage":"^3.13.10","@eslint/js":"^9.18.0","@istanbuljs/nyc-config-typescript":"^1.0.2","@rollup/plugin-replace":"^6.0.2","@shellygo/cypress-test-utils":"^4.1.11","@types/codemirror":"^5.60.15","@types/color":"^4.2.0","@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/randomcolor":"^0.5.9","@types/react":"^18.2.67","@types/react-aria-menubutton":"^6.2.14","@types/react-aria-modal":"^5.0.0","@types/react-autocomplete":"^1.8.11","@types/react-collapse":"^5.0.4","@types/react-color":"^3.0.13","@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":"^10.0.0","@types/wicg-file-system-access":"^2023.10.5","@vitejs/plugin-react":"^4.3.4",cors:"^2.8.5",cypress:"^14.0.0","cypress-plugin-tab":"^1.0.5",eslint:"^9.18.0","eslint-plugin-react":"^7.37.4","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-react-refresh":"^0.4.18","i18next-parser":"^9.1.0",istanbul:"^0.4.5","istanbul-lib-coverage":"^3.2.2",postcss:"^8.4.38","react-hot-loader":"^4.13.1",sass:"^1.83.4",stylelint:"^16.13.2","stylelint-config-recommended-scss":"^14.1.0","stylelint-scss":"^6.10.1",typescript:"^5.7.3","typescript-eslint":"^8.21.0",uuid:"^11.0.5",vite:"^6.0.11","vite-plugin-istanbul":"^6.0.2"},SK={name:wde,version:Mde,description:Sde,type:Ede,main:Bde,scripts:Ode,repository:Ide,author:kde,license:Tde,homepage:Pde,dependencies:Rde,jshintConfig:Dde,stylelint:Kde,devDependencies:Fde},Lde="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 Gi(){var n="/home/runner/work/maputnik/maputnik/src/components/AppToolbar.tsx",e="7ffd82d4f3aa9239b1c505abaafac5bdb522b791",t=globalThis,r="__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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Gi=function(){return a},a}Gi();const Ude=(Gi().s[0]++,yde()),mb=(Gi().s[1]++,["chrome","firefox"].indexOf(Ude.name)>-1);class og extends rr.Component{render(){return Gi().f[0]++,Gi().s[2]++,le.jsx("span",{className:"maputnik-icon-text",children:this.props.children})}}class zde extends rr.Component{render(){return Gi().f[1]++,Gi().s[3]++,le.jsx("a",{className:tm("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 EK extends rr.Component{render(){return Gi().f[2]++,Gi().s[4]++,le.jsx("div",{className:"maputnik-toolbar-select","data-wd-key":this.props.wdKey,children:this.props.children})}}class gb extends rr.Component{render(){return Gi().f[3]++,Gi().s[5]++,le.jsx("button",{className:"maputnik-toolbar-action","data-wd-key":this.props.wdKey,onClick:this.props.onClick,children:this.props.children})}}class jde extends rr.Component{constructor(){super(...arguments);kn(this,"state",(Gi().s[6]++,{isOpen:{settings:!1,sources:!1,open:!1,add:!1,export:!1}}));kn(this,"onSkip",(Gi().s[9]++,t=>{if(Gi().f[6]++,Gi().s[10]++,t==="map")Gi().b[0][0]++,Gi().s[11]++,document.querySelector(".maplibregl-canvas").focus();else{Gi().b[0][1]++;const r=(Gi().s[12]++,document.querySelector("#skip-target-"+t));Gi().s[13]++,r.focus()}}))}handleSelection(t){Gi().f[4]++,Gi().s[7]++,this.props.onSetMapState(t)}handleLanguageChange(t){Gi().f[5]++,Gi().s[8]++,this.props.i18n.changeLanguage(t)}render(){Gi().f[7]++;const t=(Gi().s[14]++,this.props.t),r=(Gi().s[15]++,[{id:"map",group:"general",title:t("Map")},{id:"inspect",group:"general",title:t("Inspect"),disabled:this.props.renderer==="ol"},{id:"filter-deuteranopia",group:"color-accessibility",title:t("Deuteranopia filter"),disabled:!mb},{id:"filter-protanopia",group:"color-accessibility",title:t("Protanopia filter"),disabled:!mb},{id:"filter-tritanopia",group:"color-accessibility",title:t("Tritanopia filter"),disabled:!mb},{id:"filter-achromatopsia",group:"color-accessibility",title:t("Achromatopsia filter"),disabled:!mb}]),i=(Gi().s[16]++,r.find(s=>(Gi().f[8]++,Gi().s[17]++,s.id===this.props.mapState)));return Gi().s[18]++,le.jsx("nav",{className:"maputnik-toolbar",children:le.jsxs("div",{className:"maputnik-toolbar__inner",children:[le.jsxs("div",{className:"maputnik-toolbar-logo-container",children:[le.jsx("button",{"data-wd-key":"root:skip:layer-list",className:"maputnik-toolbar-skip",onClick:s=>(Gi().f[9]++,Gi().s[19]++,this.onSkip("layer-list")),children:t("Layers list")}),le.jsx("button",{"data-wd-key":"root:skip:layer-editor",className:"maputnik-toolbar-skip",onClick:s=>(Gi().f[10]++,Gi().s[20]++,this.onSkip("layer-editor")),children:t("Layer editor")}),le.jsx("button",{"data-wd-key":"root:skip:map-view",className:"maputnik-toolbar-skip",onClick:s=>(Gi().f[11]++,Gi().s[21]++,this.onSkip("map")),children:t("Map view")}),le.jsxs("a",{className:"maputnik-toolbar-logo",target:"blank",rel:"noreferrer noopener",href:"https://github.com/maplibre/maputnik",children:[le.jsx("img",{src:Lde,alt:t("Maputnik on GitHub")}),le.jsxs("h1",{children:[le.jsx("span",{className:"maputnik-toolbar-name",children:SK.name}),le.jsxs("span",{className:"maputnik-toolbar-version",children:["v",SK.version]})]})]})]}),le.jsxs("div",{className:"maputnik-toolbar__actions",role:"navigation","aria-label":"Toolbar",children:[le.jsxs(gb,{wdKey:"nav:open",onClick:this.props.onToggleModal.bind(this,"open"),children:[le.jsx(mH,{}),le.jsx(og,{children:t("Open")})]}),le.jsxs(gb,{wdKey:"nav:export",onClick:this.props.onToggleModal.bind(this,"export"),children:[le.jsx(C6,{}),le.jsx(og,{children:t("Save")})]}),le.jsxs(gb,{wdKey:"nav:sources",onClick:this.props.onToggleModal.bind(this,"sources"),children:[le.jsx(wH,{}),le.jsx(og,{children:t("Data Sources")})]}),le.jsxs(gb,{wdKey:"nav:settings",onClick:this.props.onToggleModal.bind(this,"settings"),children:[le.jsx(gH,{}),le.jsx(og,{children:t("Style Settings")})]}),le.jsxs(EK,{wdKey:"nav:inspect",children:[le.jsx(cH,{}),le.jsxs(og,{children:[t("View"),le.jsxs("select",{className:"maputnik-select","data-wd-key":"maputnik-select",onChange:s=>(Gi().f[12]++,Gi().s[22]++,this.handleSelection(s.target.value)),value:i==null?void 0:i.id,children:[r.filter(s=>(Gi().f[13]++,Gi().s[23]++,s.group==="general")).map(s=>(Gi().f[14]++,Gi().s[24]++,le.jsx("option",{value:s.id,disabled:s.disabled,"data-wd-key":s.id,children:s.title},s.id))),le.jsx("optgroup",{label:t("Color accessibility"),children:r.filter(s=>(Gi().f[15]++,Gi().s[25]++,s.group==="color-accessibility")).map(s=>(Gi().f[16]++,Gi().s[26]++,le.jsx("option",{value:s.id,disabled:s.disabled,children:s.title},s.id)))})]})]})]}),le.jsxs(EK,{wdKey:"nav:language",children:[le.jsx(pH,{}),le.jsxs(og,{children:["Language",le.jsx("select",{className:"maputnik-select","data-wd-key":"maputnik-lang-select",onChange:s=>(Gi().f[17]++,Gi().s[27]++,this.handleLanguageChange(s.target.value)),value:this.props.i18n.language,children:Object.entries(JF).map(([s,a])=>(Gi().f[18]++,Gi().s[28]++,le.jsx("option",{value:s,children:a},s)))})]})]}),le.jsxs(zde,{href:"https://github.com/maplibre/maputnik/wiki",children:[le.jsx(dH,{}),le.jsx(og,{children:t("Help")})]})]})]})})}}const Nde=(Gi().s[29]++,$s()(jde));function F2(){var n="/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",e="d17a642b15310eb6111b086bd920c67ec86a8271",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:113}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:11},end:{line:6,column:3}},line:4}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ScrollContainer.tsx"],names:[],mappings:"AAQW;AARX,OAAO,WAAW;AAMlB,qBAAqB,wBAAwB,MAAM,UAAgC;AAAA,EACjF,SAAS;AACP,WAAO,oBAAC,SAAI,WAAU,6BACnB,eAAK,MAAM,UACd;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d17a642b15310eb6111b086bd920c67ec86a8271"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return F2=function(){return a},a}F2();class Wde extends rr.Component{render(){return F2().f[0]++,F2().s[0]++,le.jsx("div",{className:"maputnik-scroll-container",children:this.props.children})}}function np(){var n="/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",e="1ee946cae22aef585acbff88e7256312e8bd0812",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx",statementMap:{0:{start:{line:7,column:29},end:{line:9,column:3}},1:{start:{line:11,column:4},end:{line:13,column:6}},2:{start:{line:16,column:4},end:{line:16,column:46}},3:{start:{line:17,column:4},end:{line:26,column:9}},4:{start:{line:29,column:18},end:{line:29,column:54}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:20},end:{line:14,column:3}},line:10},1:{name:"(anonymous_1)",decl:{start:{line:15,column:2},end:{line:15,column:3}},loc:{start:{line:15,column:11},end:{line:27,column:3}},line:15}},branchMap:{0:{loc:{start:{line:24,column:6},end:{line:24,column:123}},type:"binary-expr",locations:[{start:{line:24,column:6},end:{line:24,column:23}},{start:{line:24,column:43},end:{line:24,column:123}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0},b:{0:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppLayout.tsx"],names:[],mappings:"AA8BM,SACE,KADF;AA9BN,OAAO,WAAW;AAClB,OAAO,eAAe;AACtB,OAAO,qBAAqB;AAC5B,SAA0B,uBAAuB;AAWjD,MAAM,0BAA0B,MAAM,UAAkC;AAAA,EACtE,OAAO,oBAAoB;AAAA,IACzB,eAAe,UAAU;AAAA,EAC3B;AAAA,EAEA,kBAAkB;AAChB,WAAO;AAAA,MACL,eAAe,EAAE,MAAM,GAAG;AAAA,IAC5B;AAAA,EACF;AAAA,EAEA,SAAS;AACP,aAAS,KAAK,MAAM,KAAK,MAAM,KAAK,IAAI;AAExC,WAAO,qBAAC,SAAI,WAAU,mBACnB;AAAA,WAAK,MAAM;AAAA,MACZ,qBAAC,SAAI,WAAU,wBACb;AAAA,4BAAC,SAAI,WAAU,wBACZ,eAAK,MAAM,WACd;AAAA,QACA,oBAAC,SAAI,WAAU,0BACb,8BAAC,mBACE,eAAK,MAAM,aACd,GACF;AAAA,QACC,KAAK,MAAM;AAAA,SACd;AAAA,MACC,KAAK,MAAM,UAAU,oBAAC,SAAI,WAAU,0BAClC,eAAK,MAAM,QACd;AAAA,MAEC,KAAK,MAAM;AAAA,OACd;AAAA,EACF;AACF;AAEA,MAAM,YAAY,gBAAgB,EAAE,iBAAiB;AACrD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1ee946cae22aef585acbff88e7256312e8bd0812"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return np=function(){return a},a}np();class IW extends rr.Component{getChildContext(){return np().f[0]++,np().s[1]++,{reactIconBase:{size:14}}}render(){return np().f[1]++,np().s[2]++,document.body.dir=this.props.i18n.dir(),np().s[3]++,le.jsxs("div",{className:"maputnik-layout",children:[this.props.toolbar,le.jsxs("div",{className:"maputnik-layout-main",children:[le.jsx("div",{className:"maputnik-layout-list",children:this.props.layerList}),le.jsx("div",{className:"maputnik-layout-drawer",children:le.jsx(Wde,{children:this.props.layerEditor})}),this.props.map]}),(np().b[0][0]++,this.props.bottom&&(np().b[0][1]++,le.jsx("div",{className:"maputnik-layout-bottom",children:this.props.bottom}))),this.props.modals]})}}kn(IW,"childContextTypes",(np().s[0]++,{reactIconBase:fi.object}));const Gde=(np().s[4]++,$s()(IW));function ul(){var n="/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",e="79207020c1a6a62db4f3db3338a49c0819045455",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx",statementMap:{0:{start:{line:6,column:24},end:{line:9,column:3}},1:{start:{line:11,column:38},end:{line:11,column:48}},2:{start:{line:12,column:19},end:{line:40,column:6}},3:{start:{line:14,column:6},end:{line:38,column:7}},4:{start:{line:15,column:27},end:{line:15,column:32}},5:{start:{line:16,column:24},end:{line:16,column:73}},6:{start:{line:17,column:8},end:{line:35,column:13}},7:{start:{line:30,column:31},end:{line:30,column:74}},8:{start:{line:37,column:8},end:{line:37,column:32}},9:{start:{line:39,column:6},end:{line:39,column:120}},10:{start:{line:41,column:18},end:{line:43,column:6}},11:{start:{line:42,column:6},end:{line:42,column:68}},12:{start:{line:44,column:4},end:{line:47,column:9}},13:{start:{line:50,column:24},end:{line:50,column:66}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:25},end:{line:8,column:5}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:48,column:3}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:42},end:{line:12,column:43}},loc:{start:{line:12,column:58},end:{line:40,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:30,column:25},end:{line:30,column:26}},loc:{start:{line:30,column:31},end:{line:30,column:74}},line:30},4:{name:"(anonymous_4)",decl:{start:{line:41,column:40},end:{line:41,column:41}},loc:{start:{line:41,column:50},end:{line:43,column:5}},line:41}},branchMap:{0:{loc:{start:{line:14,column:6},end:{line:38,column:7}},type:"if",locations:[{start:{line:14,column:6},end:{line:38,column:7}},{start:{line:36,column:13},end:{line:38,column:7}}],line:14},1:{loc:{start:{line:14,column:10},end:{line:14,column:55}},type:"binary-expr",locations:[{start:{line:14,column:10},end:{line:14,column:22}},{start:{line:14,column:26},end:{line:14,column:55}}],line:14},2:{loc:{start:{line:24,column:10},end:{line:34,column:14}},type:"binary-expr",locations:[{start:{line:24,column:10},end:{line:24,column:50}},{start:{line:24,column:70},end:{line:34,column:14}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/AppMessagePanel.tsx"],names:[],mappings:"AA4BY,SAIE,UAHM,KADR;AA5BZ,OAAO,WAAW;AAClB,SAAQ,qBAAoB;AAE5B,SAAS,OAAwB,uBAAuB;AAWxD,MAAM,gCAAgC,MAAM,UAAwC;AAAA,EAClF,OAAO,eAAe;AAAA,IACpB,eAAe,MAAM;AAAA,IAAC;AAAA,EACxB;AAAA,EAEA,SAAS;AACP,UAAM,EAAC,GAAG,mBAAkB,IAAI,KAAK;AACrC,UAAM,SAAS,KAAK,MAAM,QAAQ,IAAI,CAAC,OAAY,QAAQ;AACzD,UAAI;AACJ,UAAI,MAAM,UAAU,MAAM,OAAO,SAAS,SAAS;AACjD,cAAM,EAAC,OAAM,IAAI;AACjB,cAAM,UAAU,KAAK,MAAM,UAAU,OAAO,OAAO,KAAK,KAAK,EAAE;AAC/D,kBACE,iCACE;AAAA,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAM,wBAAc,OAAO,GAAE;AAAA,YAAO;AAAA,YAAG,OAAO,KAAK;AAAA,aAC5D;AAAA,UACC,uBAAuB,OAAO,KAAK,SAClC,iCAAE;AAAA;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM,KAAK,MAAM,cAAe,OAAO,KAAK,KAAK;AAAA,gBAEzD,YAAE,iBAAiB;AAAA;AAAA,YACtB;AAAA,aACF;AAAA,WAEJ;AAAA,MAEJ,OACK;AACH,kBAAU,MAAM;AAAA,MAClB;AACA,aAAO,oBAAC,OAAqB,WAAU,gCACpC,qBADY,WAAS,GAExB;AAAA,IACF,CAAC;AAED,UAAM,QAAQ,KAAK,MAAM,OAAO,IAAI,CAAC,GAAG,MAAM;AAC5C,aAAO,oBAAC,OAAmB,eAAZ,UAAQ,CAAM;AAAA,IAC/B,CAAC;AAED,WAAO,qBAAC,SAAI,WAAU,0BACnB;AAAA;AAAA,MACA;AAAA,OACH;AAAA,EACF;AACF;AAEA,MAAM,kBAAkB,gBAAgB,EAAE,uBAAuB;AACjE,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"79207020c1a6a62db4f3db3338a49c0819045455"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ul=function(){return a},a}ul();class kW extends rr.Component{render(){var s,a;ul().f[1]++;const{t:e,selectedLayerIndex:t}=(ul().s[1]++,this.props),r=(ul().s[2]++,(s=this.props.errors)==null?void 0:s.map((o,d)=>{var b;ul().f[2]++;let g;if(ul().s[3]++,ul().b[1][0]++,o.parsed&&(ul().b[1][1]++,o.parsed.type==="layer")){ul().b[0][0]++;const{parsed:E}=(ul().s[4]++,o),S=(ul().s[5]++,(b=this.props.mapStyle)==null?void 0:b.layers[E.data.index].id);ul().s[6]++,g=le.jsxs(le.Fragment,{children:[le.jsxs(M0,{t:e,children:["Layer ",le.jsx("span",{children:BW(S)}),": ",E.data.message]}),(ul().b[2][0]++,t!==E.data.index&&(ul().b[2][1]++,le.jsxs(le.Fragment,{children:[" — ",le.jsx("button",{className:"maputnik-message-panel__switch-button",onClick:()=>(ul().f[3]++,ul().s[7]++,this.props.onLayerSelect(E.data.index)),children:e("switch to layer")})]})))]})}else ul().b[0][1]++,ul().s[8]++,g=o.message;return ul().s[9]++,le.jsx("p",{className:"maputnik-message-panel-error",children:g},"error-"+d)})),i=(ul().s[10]++,(a=this.props.infos)==null?void 0:a.map((o,d)=>(ul().f[4]++,ul().s[11]++,le.jsx("p",{children:o},"info-"+d))));return ul().s[12]++,le.jsxs("div",{className:"maputnik-message-panel",children:[r,i]})}}kn(kW,"defaultProps",(ul().s[0]++,{onLayerSelect:()=>{ul().f[0]++}}));const Qde=(ul().s[13]++,$s()(kW));function L2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",e="a416dfabb7eaa48bd0505cf98cb9c66326bca3ec",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:165}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldArray.tsx"],names:[],mappings:"AAcM;AAdN,OAAO,WAAW;AAClB,OAAO,gBAAwD;AAC/D,OAAO,cAAc;AASrB,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC9D,8BAAC,cAAY,GAAG,KAAK,OAAO,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a416dfabb7eaa48bd0505cf98cb9c66326bca3ec"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return L2=function(){return a},a}L2();class U2 extends rr.Component{render(){return L2().f[0]++,L2().s[0]++,le.jsx(EC,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(yW,{...this.props})})}}function z2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",e="4931f85d3ebf1a60a85ac9883e78e028b7a388d8",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldNumber.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAC5C,OAAO,WAAW;AAWlB,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAO,GAC/B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4931f85d3ebf1a60a85ac9883e78e028b7a388d8"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return z2=function(){return a},a}z2();class ip extends rr.Component{render(){return z2().f[0]++,z2().s[0]++,le.jsx(ga,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(rm,{...this.props})})}}function j2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",e="37d7b9547efb8875177dbe7a186e7965cd9eb1c0",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldString.tsx"],names:[],mappings:"AAeM;AAfN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAU5C,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAO,GAC/B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"37d7b9547efb8875177dbe7a186e7965cd9eb1c0"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return j2=function(){return a},a}j2();class Np extends rr.Component{render(){return j2().f[0]++,j2().s[0]++,le.jsx(ga,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(If,{...this.props})})}}function N2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",e="a176a83ddcea7ca7f45b0bf957355a9e0c40a3af",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:160}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldUrl.tsx"],names:[],mappings:"AAiBQ;AAjBR,OAAO,WAAW;AAClB,OAAO,cAAgD;AACvD,OAAO,WAAW;AAWlB,qBAAqB,iBAAiB,MAAM,UAAyB;AAAA,EACnE,SAAU;AACR,WACE,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WACpD,8BAAC,YAAU,GAAG,KAAK,OAAO,GAC5B;AAAA,EAEJ;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a176a83ddcea7ca7f45b0bf957355a9e0c40a3af"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return N2=function(){return a},a}N2();class BC extends rr.Component{render(){return N2().f[0]++,N2().s[0]++,le.jsx(ga,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(Q8,{...this.props})})}}function W2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",e="ed4136288b91381a6bd6755cdb2ea1dcf45e2f6b",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:163}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldSelect.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,iBAAqC;AAW5C,qBAAqB,oBAAoB,MAAM,UAA4B;AAAA,EACzE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,eAAa,GAAG,KAAK,OAAM,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"ed4136288b91381a6bd6755cdb2ea1dcf45e2f6b"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return W2=function(){return a},a}W2();class l3 extends rr.Component{render(){return W2().f[0]++,W2().s[0]++,le.jsx(ga,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(Ng,{...this.props})})}}function G2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",e="5745e67ee75c0f352c022256ef8bf31e8fa7367f",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:164}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldEnum.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,eAAiC;AACxC,OAAO,cAAc;AAWrB,qBAAqB,kBAAkB,MAAM,UAA0B;AAAA,EACrE,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC9D,8BAAC,aAAW,GAAG,KAAK,OAAO,GAC7B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"5745e67ee75c0f352c022256ef8bf31e8fa7367f"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return G2=function(){return a},a}G2();class qde extends rr.Component{render(){return G2().f[0]++,G2().s[0]++,le.jsx(EC,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(G8,{...this.props})})}}function Q2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",e="4d9e98bd5e7819496a7ef6b66981b81e318fe1bf",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:162}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldColor.tsx"],names:[],mappings:"AAgBM;AAhBN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,gBAAmC;AAW1C,qBAAqB,mBAAmB,MAAM,UAA2B;AAAA,EACvE,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAAO,WAAW,KAAK,MAAM,WAC3D,8BAAC,cAAY,GAAG,KAAK,OAAO,GAC9B;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"4d9e98bd5e7819496a7ef6b66981b81e318fe1bf"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Q2=function(){return a},a}Q2();class Yde extends rr.Component{render(){return Q2().f[0]++,Q2().s[0]++,le.jsx(ga,{label:this.props.label,fieldSpec:this.props.fieldSpec,children:le.jsx(gW,{...this.props})})}}function OC(){var n="/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",e="3f2b222219042b3cb4a75b927d846ca17e6201aa",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/field-spec-additional.ts",statementMap:{0:{start:{line:1,column:13},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return OC=function(){return a},a}OC();OC().s[0]++;const TW=n=>(OC().f[0]++,OC().s[1]++,{maputnik:{maptiler_access_token:{label:n("MapTiler Access Token"),doc:n("Public access token for MapTiler Cloud."),docUrl:"https://docs.maptiler.com/cloud/api/authentication-key/",docUrlLinkText:n("Learn More")},thunderforest_access_token:{label:n("Thunderforest Access Token"),doc:n("Public access token for Thunderforest services."),docUrl:"https://www.thunderforest.com/docs/apikeys/",docUrlLinkText:n("Learn More")},stadia_access_token:{label:n("Stadia Maps API Key"),doc:n("API key for Stadia Maps."),docUrl:"https://docs.stadiamaps.com/authentication/",docUrlLinkText:n("Learn More")},style_renderer:{label:n("Style Renderer"),doc:n("Choose the default Maputnik renderer for this style.")}}});function Li(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx",e="2bfcb2bc337b915a29f70f26bbf03f5047260e49",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSettings.tsx",statementMap:{0:{start:{line:16,column:23},end:{line:18,column:5}},1:{start:{line:19,column:4},end:{line:23,column:5}},2:{start:{line:20,column:6},end:{line:20,column:34}},3:{start:{line:22,column:6},end:{line:22,column:35}},4:{start:{line:24,column:4},end:{line:27,column:7}},5:{start:{line:30,column:18},end:{line:32,column:5}},6:{start:{line:33,column:4},end:{line:37,column:5}},7:{start:{line:34,column:6},end:{line:34,column:29}},8:{start:{line:36,column:6},end:{line:36,column:30}},9:{start:{line:38,column:4},end:{line:41,column:7}},10:{start:{line:44,column:20},end:{line:46,column:5}},11:{start:{line:47,column:4},end:{line:51,column:5}},12:{start:{line:48,column:6},end:{line:48,column:31}},13:{start:{line:50,column:6},end:{line:50,column:32}},14:{start:{line:52,column:4},end:{line:55,column:7}},15:{start:{line:58,column:25},end:{line:60,column:5}},16:{start:{line:61,column:4},end:{line:65,column:5}},17:{start:{line:62,column:6},end:{line:62,column:36}},18:{start:{line:64,column:6},end:{line:64,column:37}},19:{start:{line:66,column:4},end:{line:66,column:44}},20:{start:{line:69,column:21},end:{line:69,column:55}},21:{start:{line:70,column:54},end:{line:70,column:64}},22:{start:{line:71,column:16},end:{line:71,column:38}},23:{start:{line:72,column:18},end:{line:72,column:49}},24:{start:{line:73,column:23},end:{line:73,column:59}},25:{start:{line:74,column:20},end:{line:74,column:53}},26:{start:{line:75,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Li=function(){return a},a}Li();class $de extends rr.Component{changeTransitionProperty(e,t){Li().f[0]++;const r=(Li().s[0]++,{...this.props.mapStyle.transition});Li().s[1]++,t===void 0?(Li().b[0][0]++,Li().s[2]++,delete r[e]):(Li().b[0][1]++,Li().s[3]++,r[e]=t),Li().s[4]++,this.props.onStyleChanged({...this.props.mapStyle,transition:r})}changeLightProperty(e,t){Li().f[1]++;const r=(Li().s[5]++,{...this.props.mapStyle.light});Li().s[6]++,t===void 0?(Li().b[1][0]++,Li().s[7]++,delete r[e]):(Li().b[1][1]++,Li().s[8]++,r[e]=t),Li().s[9]++,this.props.onStyleChanged({...this.props.mapStyle,light:r})}changeTerrainProperty(e,t){Li().f[2]++;const r=(Li().s[10]++,{...this.props.mapStyle.terrain});Li().s[11]++,t===void 0?(Li().b[2][0]++,Li().s[12]++,delete r[e]):(Li().b[2][1]++,Li().s[13]++,r[e]=t),Li().s[14]++,this.props.onStyleChanged({...this.props.mapStyle,terrain:r})}changeStyleProperty(e,t){Li().f[3]++;const r=(Li().s[15]++,{...this.props.mapStyle});Li().s[16]++,t===void 0?(Li().b[3][0]++,Li().s[17]++,delete r[e]):(Li().b[3][1]++,Li().s[18]++,r[e]=t),Li().s[19]++,this.props.onStyleChanged(r)}render(){Li().f[4]++;const e=(Li().s[20]++,Li().b[4][0]++,this.props.mapStyle.metadata||(Li().b[4][1]++,{})),{t,onChangeMetadataProperty:r,mapStyle:i}=(Li().s[21]++,this.props),s=(Li().s[22]++,TW(t)),a=(Li().s[23]++,Li().b[5][0]++,this.props.mapStyle.light||(Li().b[5][1]++,{})),o=(Li().s[24]++,Li().b[6][0]++,this.props.mapStyle.transition||(Li().b[6][1]++,{})),d=(Li().s[25]++,Li().b[7][0]++,this.props.mapStyle.terrain||(Li().b[7][1]++,{}));return Li().s[26]++,le.jsx(F0,{"data-wd-key":"modal:settings",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:t("Style Settings"),children:le.jsxs("div",{className:"modal:settings",children:[le.jsx(Np,{label:t("Name"),fieldSpec:ts.$root.name,"data-wd-key":"modal:settings.name",value:this.props.mapStyle.name,onChange:this.changeStyleProperty.bind(this,"name")}),le.jsx(Np,{label:t("Owner"),fieldSpec:{doc:t("Owner ID of the style. Used by Mapbox or future style APIs.")},"data-wd-key":"modal:settings.owner",value:this.props.mapStyle.owner,onChange:this.changeStyleProperty.bind(this,"owner")}),le.jsx(BC,{fieldSpec:ts.$root.sprite,label:t("Sprite URL"),"data-wd-key":"modal:settings.sprite",value:this.props.mapStyle.sprite,onChange:this.changeStyleProperty.bind(this,"sprite")}),le.jsx(BC,{label:t("Glyphs URL"),fieldSpec:ts.$root.glyphs,"data-wd-key":"modal:settings.glyphs",value:this.props.mapStyle.glyphs,onChange:this.changeStyleProperty.bind(this,"glyphs")}),le.jsx(Np,{label:s.maputnik.maptiler_access_token.label,fieldSpec:s.maputnik.maptiler_access_token,"data-wd-key":"modal:settings.maputnik:openmaptiles_access_token",value:e["maputnik:openmaptiles_access_token"],onChange:r.bind(this,"maputnik:openmaptiles_access_token")}),le.jsx(Np,{label:s.maputnik.thunderforest_access_token.label,fieldSpec:s.maputnik.thunderforest_access_token,"data-wd-key":"modal:settings.maputnik:thunderforest_access_token",value:e["maputnik:thunderforest_access_token"],onChange:r.bind(this,"maputnik:thunderforest_access_token")}),le.jsx(Np,{label:s.maputnik.stadia_access_token.label,fieldSpec:s.maputnik.stadia_access_token,"data-wd-key":"modal:settings.maputnik:stadia_access_token",value:e["maputnik:stadia_access_token"],onChange:r.bind(this,"maputnik:stadia_access_token")}),le.jsx(U2,{label:t("Center"),fieldSpec:ts.$root.center,length:2,type:"number",value:(Li().b[8][0]++,i.center||(Li().b[8][1]++,[])),default:[0,0],onChange:this.changeStyleProperty.bind(this,"center")}),le.jsx(ip,{label:t("Zoom"),fieldSpec:ts.$root.zoom,value:i.zoom,default:0,onChange:this.changeStyleProperty.bind(this,"zoom")}),le.jsx(ip,{label:t("Bearing"),fieldSpec:ts.$root.bearing,value:i.bearing,default:ts.$root.bearing.default,onChange:this.changeStyleProperty.bind(this,"bearing")}),le.jsx(ip,{label:t("Pitch"),fieldSpec:ts.$root.pitch,value:i.pitch,default:ts.$root.pitch.default,onChange:this.changeStyleProperty.bind(this,"pitch")}),le.jsx(qde,{label:t("Light anchor"),fieldSpec:ts.light.anchor,name:"light-anchor",value:a.anchor,options:Object.keys(ts.light.anchor.values),default:ts.light.anchor.default,onChange:this.changeLightProperty.bind(this,"anchor")}),le.jsx(Yde,{label:t("Light color"),fieldSpec:ts.light.color,value:a.color,default:ts.light.color.default,onChange:this.changeLightProperty.bind(this,"color")}),le.jsx(ip,{label:t("Light intensity"),fieldSpec:ts.light.intensity,value:a.intensity,default:ts.light.intensity.default,onChange:this.changeLightProperty.bind(this,"intensity")}),le.jsx(U2,{label:t("Light position"),fieldSpec:ts.light.position,type:"number",length:ts.light.position.length,value:a.position,default:ts.light.position.default,onChange:this.changeLightProperty.bind(this,"position")}),le.jsx(Np,{label:t("Terrain source"),fieldSpec:ts.terrain.source,"data-wd-key":"modal:settings.maputnik:terrain_source",value:d.source,onChange:this.changeTerrainProperty.bind(this,"source")}),le.jsx(ip,{label:t("Terrain exaggeration"),fieldSpec:ts.terrain.exaggeration,value:d.exaggeration,default:ts.terrain.exaggeration.default,onChange:this.changeTerrainProperty.bind(this,"exaggeration")}),le.jsx(ip,{label:t("Transition delay"),fieldSpec:ts.transition.delay,value:o.delay,default:ts.transition.delay.default,onChange:this.changeTransitionProperty.bind(this,"delay")}),le.jsx(ip,{label:t("Transition duration"),fieldSpec:ts.transition.duration,value:o.duration,default:ts.transition.duration.default,onChange:this.changeTransitionProperty.bind(this,"duration")}),le.jsx(l3,{label:s.maputnik.style_renderer.label,fieldSpec:s.maputnik.style_renderer,"data-wd-key":"modal:settings.maputnik:renderer",options:[["mlgljs","MapLibreGL JS"],["ol",t("Open Layers (experimental)")]],value:(Li().b[9][0]++,e["maputnik:renderer"]||(Li().b[9][1]++,"mlgljs")),onChange:r.bind(this,"maputnik:renderer")})]})})}}const Vde=(Li().s[27]++,$s()($de));var Pb={exports:{}},Hde=Pb.exports,BK;function Zde(){return BK||(BK=1,function(n,e){(function(t,r,i){n.exports=i(),n.exports.default=i()})("slugify",Hde,function(){var t=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","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"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(s,a){if(typeof s!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var o=r[a.locale]||{},d=a.replacement===void 0?"-":a.replacement,g=a.trim===void 0?!0:a.trim,b=s.normalize().split("").reduce(function(E,S){var O=o[S];return O===void 0&&(O=t[S]),O===void 0&&(O=S),O===d&&(O=" "),E+O.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(b=b.replace(/[^A-Za-z0-9\s]/g,"")),g&&(b=b.trim()),b=b.replace(/\s+/g,d),a.lower&&(b=b.toLowerCase()),b}return i.extend=function(s){Object.assign(t,s)},i})}(Pb)),Pb.exports}var Xde=Zde();const Jde=Ha(Xde);var Rb={exports:{}},ehe=Rb.exports,OK;function the(){return OK||(OK=1,function(n,e){(function(t,r){r()})(ehe,function(){function t(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 r(g,b,E){var S=new XMLHttpRequest;S.open("GET",g),S.responseType="blob",S.onload=function(){d(S.response,b,E)},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 s(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 a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof window=="object"&&window.global===window?window:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(g,b,E){var S=a.URL||a.webkitURL,O=document.createElement("a");b=b||g.name||"download",O.download=b,O.rel="noopener",typeof g=="string"?(O.href=g,O.origin===location.origin?s(O):i(O.href)?r(g,b,E):s(O,O.target="_blank")):(O.href=S.createObjectURL(g),setTimeout(function(){S.revokeObjectURL(O.href)},4e4),setTimeout(function(){s(O)},0))}:"msSaveOrOpenBlob"in navigator?function(g,b,E){if(b=b||g.name||"download",typeof g!="string")navigator.msSaveOrOpenBlob(t(g,E),b);else if(i(g))r(g,b,E);else{var S=document.createElement("a");S.href=g,S.target="_blank",setTimeout(function(){s(S)})}}:function(g,b,E,S){if(S=S||open("","_blank"),S&&(S.document.title=S.document.body.innerText="downloading..."),typeof g=="string")return r(g,b,E);var O=g.type==="application/octet-stream",k=/constructor/i.test(a.HTMLElement)||a.safari,U=/CriOS\/[\d]+/.test(navigator.userAgent);if((U||O&&k||o)&&typeof FileReader<"u"){var z=new FileReader;z.onloadend=function(){var re=z.result;re=U?re:re.replace(/^data:[^;]*;/,"data:attachment/file;"),S?S.location.href=re:location=re,S=null},z.readAsDataURL(g)}else{var q=a.URL||a.webkitURL,Q=q.createObjectURL(g);S?S.location=Q:location.href=Q,S=null,setTimeout(function(){q.revokeObjectURL(Q)},4e4)}});a.saveAs=d.saveAs=d,n.exports=d})}(Rb)),Rb.exports}var IK=the();const nhe="5.0.1",rhe="get_your_own_OpIi9ZULNHzrESv6T2vL",ihe="b71f7f0ba4064f5eb9e903859a9cf5c6",PW={openmaptiles:rhe,thunderforest:ihe};function lr(){var n="/home/runner/work/maputnik/maputnik/src/libs/style.ts",e="c162664fcb147ac7caff0efb860cd8a0c7d435d1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/style.ts",statementMap:{0:{start:{line:3,column:19},end:{line:7,column:2}},1:{start:{line:9,column:2},end:{line:9,column:52}},2:{start:{line:12,column:2},end:{line:15,column:3}},3:{start:{line:13,column:4},end:{line:13,column:28}},4:{start:{line:14,column:4},end:{line:14,column:17}},5:{start:{line:16,column:2},end:{line:16,column:15}},6:{start:{line:19,column:24},end:{line:23,column:4}},7:{start:{line:20,column:25},end:{line:20,column:37}},8:{start:{line:21,column:4},end:{line:21,column:36}},9:{start:{line:22,column:4},end:{line:22,column:24}},10:{start:{line:24,column:2},end:{line:27,column:4}},11:{start:{line:30,column:2},end:{line:33,column:4}},12:{start:{line:36,column:2},end:{line:36,column:69}},13:{start:{line:39,column:2},end:{line:43,column:3}},14:{start:{line:39,column:15},end:{line:39,column:16}},15:{start:{line:40,column:4},end:{line:42,column:5}},16:{start:{line:41,column:6},end:{line:41,column:15}},17:{start:{line:44,column:2},end:{line:44,column:14}},18:{start:{line:47,column: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return lr=function(){return a},a}lr();const ohe=(lr().s[0]++,DW({version:8,sources:{},layers:[]}));function RW(){return lr().f[0]++,lr().s[1]++,Math.random().toString(36).substring(2,9)}function she(n){return lr().f[1]++,lr().s[2]++,lr().b[1][0]++,!("id"in n)||(lr().b[1][1]++,!n.id)?(lr().b[0][0]++,lr().s[3]++,n.id=RW(),lr().s[4]++,n):(lr().b[0][1]++,lr().s[5]++,n)}function ahe(n){lr().f[2]++;const e=(lr().s[6]++,n.layers.map(t=>{lr().f[3]++;const r=(lr().s[7]++,{...t});return lr().s[8]++,delete r.interactive,lr().s[9]++,r}));return lr().s[10]++,{...n,layers:e}}function lhe(n){return lr().f[4]++,lr().s[11]++,{...n,layers:vY(n.layers)}}function DW(n){return lr().f[5]++,lr().s[12]++,ahe(lhe(she(n)))}function uhe(n,e){lr().f[6]++,lr().s[13]++;for(let t=(lr().s[14]++,0);t<n.length;t++){if(lr().s[15]++,n[t].id===e)return lr().b[2][0]++,lr().s[16]++,t;lr().b[2][1]++}return lr().s[17]++,null}function Y8(n,e,t){lr().f[7]++;const r=(lr().s[18]++,lr().b[3][0]++,e.metadata||(lr().b[3][1]++,{}));let i=(lr().s[19]++,r[`maputnik:${n}_access_token`]);return lr().s[20]++,lr().b[5][0]++,t.allowFallback&&(lr().b[5][1]++,!i)?(lr().b[4][0]++,lr().s[21]++,i=PW[n]):lr().b[4][1]++,lr().s[22]++,i}function Ahe(n,e,t=(lr().b[6][0]++,{})){var g;lr().f[8]++;const r=(lr().s[23]++,n.sources[e]);if(lr().s[24]++,r)lr().b[7][1]++;else return lr().b[7][0]++,lr().s[25]++,n;if(lr().s[26]++,lr().b[9][0]++,!("url"in r)||(lr().b[9][1]++,!r.url))return lr().b[8][0]++,lr().s[27]++,n;lr().b[8][1]++;let i=(lr().s[28]++,e);lr().s[29]++,lr().b[11][0]++,e==="thunderforest_transport"||(lr().b[11][1]++,e==="thunderforest_outdoors")?(lr().b[10][0]++,lr().s[30]++,i="thunderforest"):(lr().b[10][1]++,lr().s[31]++,lr().b[13][0]++,"url"in r&&(lr().b[13][1]++,(g=r.url)==null?void 0:g.match(/\.stadiamaps\.com/))?(lr().b[12][0]++,lr().s[32]++,i="stadia"):lr().b[12][1]++);const s=(lr().s[33]++,Y8(i,n,t));if(lr().s[34]++,s)lr().b[14][1]++;else return lr().b[14][0]++,lr().s[35]++,n;let a;lr().s[36]++,i=="stadia"?(lr().b[15][0]++,lr().s[37]++,a=`${r.url}?api_key=${s}`):(lr().b[15][1]++,lr().s[38]++,a=r.url.replace("{key}",s));const o=(lr().s[39]++,{...n.sources,[e]:{...r,url:a}}),d=(lr().s[40]++,{...n,sources:o});return lr().s[41]++,d}function che(n,e=(lr().b[16][0]++,{})){lr().f[9]++;let t=(lr().s[42]++,n);if(lr().s[43]++,Object.keys(n.sources).forEach(r=>{lr().f[10]++,lr().s[44]++,t=Ahe(t,r,e)}),lr().s[45]++,lr().b[18][0]++,n.glyphs&&(lr().b[18][1]++,n.glyphs.match(/\.tilehosting\.com/)||(lr().b[18][2]++,n.glyphs.match(/\.maptiler\.com/)))){lr().b[17][0]++;const r=(lr().s[46]++,Y8("openmaptiles",n,e));lr().s[47]++,r?(lr().b[19][0]++,lr().s[48]++,t={...t,glyphs:n.glyphs.replace("{key}",r)}):lr().b[19][1]++}else lr().b[17][1]++;return lr().s[49]++,t}function dhe(n){lr().f[11]++;const e=(lr().s[50]++,{...n.metadata});return lr().s[51]++,delete e["maputnik:openmaptiles_access_token"],lr().s[52]++,delete e["maputnik:thunderforest_access_token"],lr().s[53]++,delete e["maputnik:stadia_access_token"],lr().s[54]++,{...n,metadata:e}}const cc={ensureStyleValidity:DW,emptyStyle:ohe,indexOfLayer:uhe,generateId:RW,getAccessToken:Y8,replaceAccessTokens:che,stripAccessTokens:dhe};function Vr(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx",e="66cf81ab709608eec5a644a6a17a019c5afe48ce",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalExport.tsx",statementMap:{0:{start:{line:14,column:28},end:{line:14,column:35}},1:{start:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Vr=function(){return a},a}Vr();const kK=(Vr().s[0]++,nhe),TK=(Vr().s[1]++,typeof window.showSaveFilePicker=="function");class hhe extends rr.Component{tokenizedStyle(){return Vr().f[0]++,Vr().s[2]++,aU(cc.stripAccessTokens(cc.replaceAccessTokens(this.props.mapStyle)))}exportName(){return Vr().f[1]++,Vr().s[3]++,this.props.mapStyle.name?(Vr().b[0][0]++,Vr().s[4]++,Jde(this.props.mapStyle.name,{replacement:"_",remove:/[*\-+~.()'"!:]/g,lower:!0})):(Vr().b[0][1]++,Vr().s[5]++,this.props.mapStyle.id)}createHtml(){Vr().f[2]++;const e=(Vr().s[6]++,this.tokenizedStyle()),t=(Vr().s[7]++,Vr().b[1][0]++,this.props.mapStyle.name||(Vr().b[1][1]++,this.props.t("Map"))),r=(Vr().s[8]++,`<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<title>${t}</title>
|
||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||
<script src="https://unpkg.com/maplibre-gl@${kK}/dist/maplibre-gl.js"><\/script>
|
||
<link href="https://unpkg.com/maplibre-gl@${kK}/dist/maplibre-gl.css" rel="stylesheet" />
|
||
<style>
|
||
body { margin: 0; padding: 0; }
|
||
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="map"></div>
|
||
<script>
|
||
const map = new maplibregl.Map({
|
||
container: 'map',
|
||
style: ${e},
|
||
});
|
||
map.addControl(new maplibregl.NavigationControl());
|
||
<\/script>
|
||
</body>
|
||
</html>
|
||
`),i=(Vr().s[9]++,new Blob([r],{type:"text/html;charset=utf-8"})),s=(Vr().s[10]++,this.exportName());Vr().s[11]++,IK.saveAs(i,s+".html")}async saveStyle(){Vr().f[3]++;const e=(Vr().s[12]++,this.tokenizedStyle());if(Vr().s[13]++,TK)Vr().b[2][1]++;else{Vr().b[2][0]++;const i=(Vr().s[14]++,new Blob([e],{type:"application/json;charset=utf-8"})),s=(Vr().s[15]++,this.exportName());Vr().s[16]++,IK.saveAs(i,s+".json"),Vr().s[17]++;return}let t=(Vr().s[18]++,this.props.fileHandle);if(Vr().s[19]++,t==null)if(Vr().b[3][0]++,Vr().s[20]++,t=await this.createFileHandle(),Vr().s[21]++,this.props.onSetFileHandle(t),Vr().s[22]++,t==null){Vr().b[4][0]++,Vr().s[23]++;return}else Vr().b[4][1]++;else Vr().b[3][1]++;const r=(Vr().s[24]++,await t.createWritable());Vr().s[25]++,await r.write(e),Vr().s[26]++,await r.close(),Vr().s[27]++,this.props.onOpenToggle()}async saveStyleAs(){Vr().f[4]++;const e=(Vr().s[28]++,this.tokenizedStyle()),t=(Vr().s[29]++,await this.createFileHandle());if(Vr().s[30]++,this.props.onSetFileHandle(t),Vr().s[31]++,t==null){Vr().b[5][0]++,Vr().s[32]++;return}else Vr().b[5][1]++;const r=(Vr().s[33]++,await t.createWritable());Vr().s[34]++,await r.write(e),Vr().s[35]++,await r.close(),Vr().s[36]++,this.props.onOpenToggle()}async createFileHandle(){Vr().f[5]++;const e=(Vr().s[37]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],suggestedName:this.exportName()}),t=(Vr().s[38]++,await window.showSaveFilePicker(e));return Vr().s[39]++,this.props.onSetFileHandle(t),Vr().s[40]++,t}changeMetadataProperty(e,t){Vr().f[6]++;const r=(Vr().s[41]++,{...this.props.mapStyle,metadata:{...this.props.mapStyle.metadata,[e]:t}});Vr().s[42]++,this.props.onStyleChanged(r)}render(){Vr().f[7]++;const e=(Vr().s[43]++,this.props.t),t=(Vr().s[44]++,TW(e));return Vr().s[45]++,le.jsx(F0,{"data-wd-key":"modal:export",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Save Style"),className:"maputnik-export-modal",children:le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:e("Save Style")}),le.jsx("p",{children:e("Save the JSON style to your computer.")}),le.jsxs("div",{children:[le.jsx(Np,{label:t.maputnik.maptiler_access_token.label,fieldSpec:t.maputnik.maptiler_access_token,value:(Vr().b[6][0]++,this.props.mapStyle.metadata||(Vr().b[6][1]++,{}))["maputnik:openmaptiles_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:openmaptiles_access_token")}),le.jsx(Np,{label:t.maputnik.thunderforest_access_token.label,fieldSpec:t.maputnik.thunderforest_access_token,value:(Vr().b[7][0]++,this.props.mapStyle.metadata||(Vr().b[7][1]++,{}))["maputnik:thunderforest_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:thunderforest_access_token")}),le.jsx(Np,{label:t.maputnik.stadia_access_token.label,fieldSpec:t.maputnik.stadia_access_token,value:(Vr().b[8][0]++,this.props.mapStyle.metadata||(Vr().b[8][1]++,{}))["maputnik:stadia_access_token"],onChange:this.changeMetadataProperty.bind(this,"maputnik:stadia_access_token")})]}),le.jsxs("div",{className:"maputnik-modal-export-buttons",children:[le.jsxs(Va,{onClick:this.saveStyle.bind(this),children:[le.jsx(C6,{}),e("Save")]}),(Vr().b[9][0]++,TK&&(Vr().b[9][1]++,le.jsxs(Va,{onClick:this.saveStyleAs.bind(this),children:[le.jsx(C6,{}),e("Save as")]}))),le.jsxs(Va,{onClick:this.createHtml.bind(this),children:[le.jsx(MH,{}),e("Create HTML")]})]})]})})}}const fhe=(Vr().s[46]++,$s()(hhe));function q2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",e="950dd35e62562a3439b74678b95f406e749c6958",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:139}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldDynamicArray.tsx"],names:[],mappings:"AAWM;AAXN,OAAO,WAAW;AAClB,OAAO,uBAA2E;AAClF,OAAO,cAAc;AAMrB,qBAAqB,0BAA0B,MAAM,UAAkC;AAAA,EACrF,SAAS;AACP,WAAO,oBAAC,YAAS,OAAO,KAAK,MAAM,OACjC,8BAAC,qBAAmB,GAAG,KAAK,OAAO,GACrC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"950dd35e62562a3439b74678b95f406e749c6958"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return q2=function(){return a},a}q2();class KW extends rr.Component{render(){return q2().f[0]++,q2().s[0]++,le.jsx(EC,{label:this.props.label,children:le.jsx(CW,{...this.props})})}}function Y2(){var n="/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",e="a27c35e986d22656fa80c276efb67df518853ac2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx",statementMap:{0:{start:{line:7,column:4},end:{line:7,column:132}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:8,column:3}},line:6}},branchMap:{},s:{0:0},f:{0:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/FieldCheckbox.tsx"],names:[],mappings:"AAaM;AAbN,OAAO,WAAW;AAClB,OAAO,WAAW;AAClB,OAAO,mBAAyC;AAQhD,qBAAqB,sBAAsB,MAAM,UAA8B;AAAA,EAC7E,SAAS;AACP,WAAO,oBAAC,SAAM,OAAO,KAAK,MAAM,OAC9B,8BAAC,iBAAe,GAAG,KAAK,OAAO,GACjC;AAAA,EACF;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a27c35e986d22656fa80c276efb67df518853ac2"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Y2=function(){return a},a}Y2();class phe extends rr.Component{render(){return Y2().f[0]++,Y2().s[0]++,le.jsx(ga,{label:this.props.label,children:le.jsx(W8,{...this.props})})}}function nr(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx",e="d4e14fa2f16e0b2ba5d431eb89d4dbe2e079b40d",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSourcesTypeEditor.tsx",statementMap:{0:{start:{line:15,column:14},end:{line:15,column:26}},1:{start:{line:16,column:4},end:{line:30,column:9}},2:{start:{line:23,column:29},end:{line:26,column:12}},3:{start:{line:35,column:4},end:{line:38,column:7}},4:{start:{line:41,column:18},end:{line:41,column:47}},5:{start:{line:42,column:4},end:{line:51,column:6}},6:{start:{line:54,column:14},end:{line:54,column:26}},7:{start:{line:55,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return nr=function(){return a},a}nr();class nE extends rr.Component{render(){nr().f[0]++;const e=(nr().s[0]++,this.props.t);return nr().s[1]++,le.jsxs("div",{children:[le.jsx(BC,{label:e("TileJSON URL"),fieldSpec:Ys.source_vector.url,value:this.props.source.url,onChange:t=>(nr().f[1]++,nr().s[2]++,this.props.onChange({...this.props.source,url:t}))}),this.props.children]})}}class rE extends rr.Component{changeTileUrls(e){nr().f[2]++,nr().s[3]++,this.props.onChange({...this.props.source,tiles:e})}renderTileUrls(){nr().f[3]++;const e=(nr().s[4]++,nr().b[0][0]++,this.props.source.tiles||(nr().b[0][1]++,[]));return nr().s[5]++,le.jsx(KW,{label:this.props.t("Tile URL"),fieldSpec:Ys.source_vector.tiles,type:"url",value:e,onChange:this.changeTileUrls.bind(this)})}render(){nr().f[4]++;const e=(nr().s[6]++,this.props.t);return nr().s[7]++,le.jsxs("div",{children:[this.renderTileUrls(),le.jsx(l3,{label:e("Scheme Type"),fieldSpec:Ys.source_vector.scheme,options:[["xyz","xyz (Slippy map tilenames scheme)"],["tms","tms (OSGeo spec scheme)"]],onChange:t=>(nr().f[5]++,nr().s[8]++,this.props.onChange({...this.props.source,scheme:t})),value:this.props.source.scheme,"data-wd-key":"modal:sources.add.scheme_type"}),le.jsx(ip,{label:e("Min Zoom"),fieldSpec:Ys.source_vector.minzoom,value:(nr().b[1][0]++,this.props.source.minzoom||(nr().b[1][1]++,0)),onChange:t=>(nr().f[6]++,nr().s[9]++,this.props.onChange({...this.props.source,minzoom:t}))}),le.jsx(ip,{label:e("Max Zoom"),fieldSpec:Ys.source_vector.maxzoom,value:(nr().b[2][0]++,this.props.source.maxzoom||(nr().b[2][1]++,22)),onChange:t=>(nr().f[7]++,nr().s[10]++,this.props.onChange({...this.props.source,maxzoom:t}))}),this.props.children]})}}nr().s[11]++;const FW=n=>(nr().f[8]++,nr().s[12]++,[{label:n("Coord top left"),key:"top left"},{label:n("Coord top right"),key:"top right"},{label:n("Coord bottom right"),key:"bottom right"},{label:n("Coord bottom left"),key:"bottom left"}]);class mhe extends rr.Component{render(){nr().f[9]++;const e=(nr().s[13]++,this.props.t);nr().s[14]++;const t=(r,i)=>{nr().f[10]++;const s=(nr().s[15]++,this.props.source.coordinates.slice(0));nr().s[16]++,s[r]=i,nr().s[17]++,this.props.onChange({...this.props.source,coordinates:s})};return nr().s[18]++,le.jsxs("div",{children:[le.jsx(BC,{label:e("Image URL"),fieldSpec:Ys.source_image.url,value:this.props.source.url,onChange:r=>(nr().f[11]++,nr().s[19]++,this.props.onChange({...this.props.source,url:r}))}),FW(e).map(({label:r,key:i},s)=>(nr().f[12]++,nr().s[20]++,le.jsx(U2,{label:r,length:2,type:"number",value:this.props.source.coordinates[s],default:[0,0],onChange:a=>(nr().f[13]++,nr().s[21]++,t(s,a))},i)))]})}}class ghe extends rr.Component{render(){nr().f[14]++;const e=(nr().s[22]++,this.props.t);nr().s[23]++;const t=(i,s)=>{nr().f[15]++;const a=(nr().s[24]++,this.props.source.coordinates.slice(0));nr().s[25]++,a[i]=s,nr().s[26]++,this.props.onChange({...this.props.source,coordinates:a})};nr().s[27]++;const r=i=>{nr().f[16]++,nr().s[28]++,this.props.onChange({...this.props.source,urls:i})};return nr().s[29]++,le.jsxs("div",{children:[le.jsx(KW,{label:e("Video URL"),fieldSpec:Ys.source_video.urls,type:"string",value:this.props.source.urls,default:[],onChange:r}),FW(e).map(({label:i,key:s},a)=>(nr().f[17]++,nr().s[30]++,le.jsx(U2,{label:i,length:2,type:"number",value:this.props.source.coordinates[a],default:[0,0],onChange:o=>(nr().f[18]++,nr().s[31]++,t(a,o))},s)))]})}}class yhe extends rr.Component{render(){nr().f[19]++;const e=(nr().s[32]++,this.props.t);return nr().s[33]++,le.jsx(BC,{label:e("GeoJSON URL"),fieldSpec:Ys.source_geojson.data,value:this.props.source.data,onChange:t=>(nr().f[20]++,nr().s[34]++,this.props.onChange({...this.props.source,data:t}))})}}class vhe extends rr.Component{render(){nr().f[21]++;const e=(nr().s[35]++,this.props.t);return nr().s[36]++,le.jsxs("div",{children:[le.jsx(ga,{label:e("GeoJSON"),fieldSpec:Ys.source_geojson.data,children:le.jsx(b8,{layer:this.props.source.data,maxHeight:200,mode:{name:"javascript",json:!0},lint:!0,onChange:t=>{nr().f[22]++,nr().s[37]++,this.props.onChange({...this.props.source,data:t})}})}),le.jsx(phe,{label:e("Cluster"),value:this.props.source.cluster,onChange:t=>{nr().f[23]++,nr().s[38]++,this.props.onChange({...this.props.source,cluster:t})}})]})}}class Che extends rr.Component{render(){nr().f[24]++;const e=(nr().s[39]++,this.props.t),t=(nr().s[40]++,{source:this.props.source,onChange:this.props.onChange,t:this.props.t,i18n:this.props.i18n,tReady:this.props.tReady});switch(nr().s[41]++,this.props.mode){case"geojson_url":return nr().b[3][0]++,nr().s[42]++,le.jsx(yhe,{...t});case"geojson_json":return nr().b[3][1]++,nr().s[43]++,le.jsx(vhe,{...t});case"tilejson_vector":return nr().b[3][2]++,nr().s[44]++,le.jsx(nE,{...t});case"tile_vector":return nr().b[3][3]++,nr().s[45]++,le.jsx(rE,{...t});case"tilejson_raster":return nr().b[3][4]++,nr().s[46]++,le.jsx(nE,{...t});case"tile_raster":return nr().b[3][5]++,nr().s[47]++,le.jsx(rE,{...t,children:le.jsx(ip,{label:e("Tile Size"),fieldSpec:Ys.source_raster.tileSize,onChange:r=>(nr().f[25]++,nr().s[48]++,this.props.onChange({...this.props.source,tileSize:r})),value:(nr().b[4][0]++,this.props.source.tileSize||(nr().b[4][1]++,Ys.source_raster.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"})});case"tilejson_raster-dem":return nr().b[3][6]++,nr().s[49]++,le.jsx(nE,{...t});case"tilexyz_raster-dem":return nr().b[3][7]++,nr().s[50]++,le.jsxs(rE,{...t,children:[le.jsx(ip,{label:e("Tile Size"),fieldSpec:Ys.source_raster_dem.tileSize,onChange:r=>(nr().f[26]++,nr().s[51]++,this.props.onChange({...this.props.source,tileSize:r})),value:(nr().b[5][0]++,this.props.source.tileSize||(nr().b[5][1]++,Ys.source_raster_dem.tileSize.default)),"data-wd-key":"modal:sources.add.tile_size"}),le.jsx(l3,{label:e("Encoding"),fieldSpec:Ys.source_raster_dem.encoding,options:Object.keys(Ys.source_raster_dem.encoding.values),onChange:r=>(nr().f[27]++,nr().s[52]++,this.props.onChange({...this.props.source,encoding:r})),value:(nr().b[6][0]++,this.props.source.encoding||(nr().b[6][1]++,Ys.source_raster_dem.encoding.default))})]});case"image":return nr().b[3][8]++,nr().s[53]++,le.jsx(mhe,{...t});case"video":return nr().b[3][9]++,nr().s[54]++,le.jsx(ghe,{...t});default:return nr().b[3][10]++,nr().s[55]++,null}}}const LW=(nr().s[56]++,$s()(Che));function up(){var n="/home/runner/work/maputnik/maputnik/src/libs/source.ts",e="315b9927ffd3b5bf51669bb9e53779783a451930",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/source.ts",statementMap:{0:{start:{line:2,column:27},end:{line:2,column:50}},1:{start:{line:3,column:2},end:{line:3,column:36}},2:{start:{line:4,column:2},end:{line:7,column:4}},3:{start:{line:10,column:2},end:{line:10,column:50}},4:{start:{line:13,column:25},end:{line:16,column:3}},5:{start:{line:17,column:2},end:{line:20,column:4}}},fnMap:{0:{name:"deleteSource",decl:{start:{line:1,column:16},end:{line:1,column:28}},loc:{start:{line:1,column:49},end:{line:8,column:1}},line:1},1:{name:"addSource",decl:{start:{line:9,column:16},end:{line:9,column:25}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},2:{name:"changeSource",decl:{start:{line:12,column:16},end:{line:12,column:28}},loc:{start:{line:12,column:57},end:{line:21,column:1}},line:12}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/source.ts"],names:[],mappings:"AAEO,gBAAS,aAAa,UAA8B,UAAkB;AAC3E,QAAM,mBAAmB,EAAE,GAAG,SAAS,QAAO;AAC9C,SAAO,iBAAiB,QAAQ;AAChC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;AAGO,gBAAS,UAAU,UAA8B,UAAkB,QAA6B;AACrG,SAAO,aAAa,UAAU,UAAU,MAAM;AAChD;AAEO,gBAAS,aAAa,UAA8B,UAAkB,QAA6B;AACxG,QAAM,iBAAiB;AAAA,IACrB,GAAG,SAAS;AAAA,IACZ,CAAC,QAAQ,GAAG;AAAA,EACd;AACA,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,EACX;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"315b9927ffd3b5bf51669bb9e53779783a451930"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return up=function(){return a},a}up();function _he(n,e){up().f[0]++;const t=(up().s[0]++,{...n.sources});return up().s[1]++,delete t[e],up().s[2]++,{...n,sources:t}}function PK(n,e,t){return up().f[1]++,up().s[3]++,UW(n,e,t)}function UW(n,e,t){up().f[2]++;const r=(up().s[4]++,{...n.sources,[e]:t});return up().s[5]++,{...n,sources:r}}const bhe={type:"vector",url:"https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key={key}",title:"OpenMapTiles v3"},xhe={type:"vector",url:"https://tile.thunderforest.com/thunderforest.transport-v2.json?apikey={key}",title:"Thunderforest Transport v2"},whe={type:"vector",url:"https://tile.thunderforest.com/thunderforest.outdoors-v2.json?apikey={key}",title:"Thunderforest Outdoors v2"},Mhe={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"},RK={openmaptiles:bhe,thunderforest_transport:xhe,thunderforest_outdoors:whe,open_zoomstack:Mhe};function hn(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx",e="0667caa48c4612ae19edc85c8f2029433e2c75ea",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalSources.tsx",statementMap:{0:{start:{line:16,column:4},end:{line:33,column:9}},1:{start:{line:20,column:23},end:{line:20,column:57}},2:{start:{line:37,column:2},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return hn=function(){return a},a}hn();class She extends rr.Component{render(){return hn().f[0]++,hn().s[0]++,le.jsx("div",{className:"maputnik-public-source",children:le.jsxs(Va,{className:"maputnik-public-source-select",onClick:()=>(hn().f[1]++,hn().s[1]++,this.props.onSelect(this.props.id)),children:[le.jsxs("div",{className:"maputnik-public-source-info",children:[le.jsx("p",{className:"maputnik-public-source-name",children:this.props.title}),le.jsxs("p",{className:"maputnik-public-source-id",children:["#",this.props.id]})]}),le.jsx("span",{className:"maputnik-space"}),le.jsx(cU,{})]})})}}function Ehe(n){return hn().f[2]++,hn().s[2]++,n.type==="raster"?(hn().b[0][0]++,hn().s[3]++,n.tiles?(hn().b[1][0]++,hn().s[4]++,"tile_raster"):(hn().b[1][1]++,hn().s[5]++,"tilejson_raster")):(hn().b[0][1]++,hn().s[6]++,n.type==="raster-dem"?(hn().b[2][0]++,hn().s[7]++,n.tiles?(hn().b[3][0]++,hn().s[8]++,"tilexyz_raster-dem"):(hn().b[3][1]++,hn().s[9]++,"tilejson_raster-dem")):(hn().b[2][1]++,hn().s[10]++,n.type==="vector"?(hn().b[4][0]++,hn().s[11]++,n.tiles?(hn().b[5][0]++,hn().s[12]++,"tile_vector"):(hn().b[5][1]++,hn().s[13]++,"tilejson_vector")):(hn().b[4][1]++,hn().s[14]++,n.type==="geojson"?(hn().b[6][0]++,hn().s[15]++,typeof n.data=="string"?(hn().b[7][0]++,hn().s[16]++,"geojson_url"):(hn().b[7][1]++,hn().s[17]++,"geojson_json")):(hn().b[6][1]++,hn().s[18]++,n.type==="image"?(hn().b[8][0]++,hn().s[19]++,"image"):(hn().b[8][1]++,hn().s[20]++,n.type==="video"?(hn().b[9][0]++,hn().s[21]++,"video"):(hn().b[9][1]++,hn().s[22]++,null))))))}class Bhe extends rr.Component{render(){hn().f[3]++;const e=(hn().s[23]++,this.props.t);return hn().s[24]++,le.jsxs("div",{className:"maputnik-active-source-type-editor",children:[le.jsxs("div",{className:"maputnik-active-source-type-editor-header",children:[le.jsxs("span",{className:"maputnik-active-source-type-editor-header-id",children:["#",this.props.sourceId]}),le.jsx("span",{className:"maputnik-space"}),le.jsx(Va,{"aria-label":e("Remove '{{sourceId}}' source",{sourceId:this.props.sourceId}),className:"maputnik-active-source-type-editor-header-delete",onClick:()=>(hn().f[4]++,hn().s[25]++,this.props.onDelete(this.props.sourceId)),style:{backgroundColor:"transparent"},children:le.jsx(ky,{})})]}),le.jsx("div",{className:"maputnik-active-source-type-editor-content",children:le.jsx(LW,{onChange:this.props.onChange,mode:Ehe(this.props.source),source:this.props.source})})]})}}class Ohe extends rr.Component{constructor(t){hn().f[5]++,hn().s[26]++;super(t);kn(this,"onAdd",(hn().s[42]++,()=>{hn().f[7]++;const{source:t,sourceId:r}=(hn().s[43]++,this.state);hn().s[44]++,this.props.onAdd(r,t)}));kn(this,"onChangeSource",(hn().s[45]++,t=>{hn().f[8]++,hn().s[46]++,this.setState({source:t})}));hn().s[27]++,this.state={mode:"tilejson_vector",sourceId:cc.generateId(),source:this.defaultSource("tilejson_vector")}}defaultSource(t){hn().f[6]++;const r=(hn().s[28]++,hn().b[10][0]++,(hn().b[11][0]++,this.state||(hn().b[11][1]++,{})).source||(hn().b[10][1]++,{})),{protocol:i}=(hn().s[29]++,window.location);switch(hn().s[30]++,t){case"geojson_url":return hn().b[12][0]++,hn().s[31]++,{type:"geojson",data:`${i}//localhost:3000/geojson.json`};case"geojson_json":return hn().b[12][1]++,hn().s[32]++,{type:"geojson",cluster:(hn().b[13][0]++,r.cluster||(hn().b[13][1]++,!1)),data:""};case"tilejson_vector":return hn().b[12][2]++,hn().s[33]++,{type:"vector",url:(hn().b[14][0]++,r.url||(hn().b[14][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_vector":return hn().b[12][3]++,hn().s[34]++,{type:"vector",tiles:(hn().b[15][0]++,r.tiles||(hn().b[15][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.pbf`])),minzoom:(hn().b[16][0]++,r.minzoom||(hn().b[16][1]++,0)),maxzoom:(hn().b[17][0]++,r.maxzoom||(hn().b[17][1]++,14)),scheme:(hn().b[18][0]++,r.scheme||(hn().b[18][1]++,"xyz"))};case"tilejson_raster":return hn().b[12][4]++,hn().s[35]++,{type:"raster",url:(hn().b[19][0]++,r.url||(hn().b[19][1]++,`${i}//localhost:3000/tilejson.json`))};case"tile_raster":return hn().b[12][5]++,hn().s[36]++,{type:"raster",tiles:(hn().b[20][0]++,r.tiles||(hn().b[20][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(hn().b[21][0]++,r.minzoom||(hn().b[21][1]++,0)),maxzoom:(hn().b[22][0]++,r.maxzoom||(hn().b[22][1]++,14)),scheme:(hn().b[23][0]++,r.scheme||(hn().b[23][1]++,"xyz")),tileSize:(hn().b[24][0]++,r.tileSize||(hn().b[24][1]++,512))};case"tilejson_raster-dem":return hn().b[12][6]++,hn().s[37]++,{type:"raster-dem",url:(hn().b[25][0]++,r.url||(hn().b[25][1]++,`${i}//localhost:3000/tilejson.json`))};case"tilexyz_raster-dem":return hn().b[12][7]++,hn().s[38]++,{type:"raster-dem",tiles:(hn().b[26][0]++,r.tiles||(hn().b[26][1]++,[`${i}//localhost:3000/{x}/{y}/{z}.png`])),minzoom:(hn().b[27][0]++,r.minzoom||(hn().b[27][1]++,0)),maxzoom:(hn().b[28][0]++,r.maxzoom||(hn().b[28][1]++,14)),tileSize:(hn().b[29][0]++,r.tileSize||(hn().b[29][1]++,512))};case"image":return hn().b[12][8]++,hn().s[39]++,{type:"image",url:`${i}//localhost:3000/image.png`,coordinates:[[0,0],[0,0],[0,0],[0,0]]};case"video":return hn().b[12][9]++,hn().s[40]++,{type:"video",urls:[`${i}//localhost:3000/movie.mp4`],coordinates:[[0,0],[0,0],[0,0],[0,0]]};default:return hn().b[12][10]++,hn().s[41]++,{}}}render(){hn().f[9]++;const t=(hn().s[47]++,this.props.t),r=(hn().s[48]++,{doc:ts.source_vector.type.doc});return hn().s[49]++,le.jsxs("div",{className:"maputnik-add-source",children:[le.jsx(Np,{label:t("Source ID"),fieldSpec:{doc:t("Unique ID that identifies the source and is used in the layer to reference the source.")},value:this.state.sourceId,onChange:i=>(hn().f[10]++,hn().s[50]++,this.setState({sourceId:i})),"data-wd-key":"modal:sources.add.source_id"}),le.jsx(l3,{label:t("Source Type"),fieldSpec:r,options:[["geojson_json",t("GeoJSON (JSON)")],["geojson_url",t("GeoJSON (URL)")],["tilejson_vector",t("Vector (TileJSON URL)")],["tile_vector",t("Vector (Tile URLs)")],["tilejson_raster",t("Raster (TileJSON URL)")],["tile_raster",t("Raster (Tile URLs)")],["tilejson_raster-dem",t("Raster DEM (TileJSON URL)")],["tilexyz_raster-dem",t("Raster DEM (XYZ URLs)")],["image",t("Image")],["video",t("Video")]],onChange:i=>(hn().f[11]++,hn().s[51]++,this.setState({mode:i,source:this.defaultSource(i)})),value:this.state.mode,"data-wd-key":"modal:sources.add.source_type"}),le.jsx(LW,{onChange:this.onChangeSource,mode:this.state.mode,source:this.state.source}),le.jsx(Va,{className:"maputnik-add-source-button",onClick:this.onAdd,"data-wd-key":"modal:sources.add.add_source",children:t("Add Source")})]})}}class Ihe extends rr.Component{stripTitle(e){hn().f[12]++;const t=(hn().s[52]++,{...e});return hn().s[53]++,delete t.title,hn().s[54]++,t}render(){hn().f[13]++;const{t:e,mapStyle:t}=(hn().s[55]++,this.props),r=(hn().s[56]++,{t:e,i18n:this.props.i18n,tReady:this.props.tReady}),i=(hn().s[57]++,Object.keys(t.sources).map(a=>{hn().f[14]++;const o=(hn().s[58]++,t.sources[a]);return hn().s[59]++,le.jsx(Bhe,{sourceId:a,source:o,onChange:d=>(hn().f[15]++,hn().s[60]++,this.props.onStyleChanged(UW(t,a,d))),onDelete:()=>(hn().f[16]++,hn().s[61]++,this.props.onStyleChanged(_he(t,a))),...r},a)})),s=(hn().s[62]++,Object.keys(RK).filter(a=>(hn().f[17]++,hn().s[63]++,!(a in t.sources))).map(a=>{hn().f[18]++;const o=(hn().s[64]++,RK[a]);return hn().s[65]++,le.jsx(She,{id:a,type:o.type,title:o.title,onSelect:()=>(hn().f[19]++,hn().s[66]++,this.props.onStyleChanged(PK(t,a,this.stripTitle(o))))},a)}));return hn().s[67]++,le.jsxs(F0,{"data-wd-key":"modal:sources",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Sources"),children:[le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:e("Active Sources")}),i]}),le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:e("Choose Public Source")}),le.jsx("p",{children:e("Add one of the publicly available sources to your style.")}),le.jsx("div",{className:"maputnik-public-sources",style:{maxWidth:500},children:s})]}),le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:e("Add New Source")}),le.jsx("p",{children:e("Add a new source to your style. You can only choose the source type and id at creation time!")}),le.jsx(Ohe,{onAdd:(a,o)=>(hn().f[20]++,hn().s[68]++,this.props.onStyleChanged(PK(t,a,o))),...r})]})]})}}const khe=(hn().s[69]++,$s()(Ihe));var yb={},DK;function The(){if(DK)return yb;DK=1,Object.defineProperty(yb,"__esModule",{value:!0});var n=Object.assign||function(k){for(var U=1;U<arguments.length;U++){var z=arguments[U];for(var q in z)Object.prototype.hasOwnProperty.call(z,q)&&(k[q]=z[q])}return k},e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},t=function(){function k(U,z){for(var q=0;q<z.length;q++){var Q=z[q];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(U,Q.key,Q)}}return function(U,z,q){return z&&k(U.prototype,z),q&&k(U,q),U}}(),r=Fa(),i=d(r),s=kC(),a=o(s);function o(k){return k&&k.__esModule?k:{default:k}}function d(k){if(k&&k.__esModule)return k;var U={};if(k!=null)for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(U[z]=k[z]);return U.default=k,U}function g(k,U){var z={};for(var q in k)U.indexOf(q)>=0||Object.prototype.hasOwnProperty.call(k,q)&&(z[q]=k[q]);return z}function b(k,U){if(!(k instanceof U))throw new TypeError("Cannot call a class as a function")}function E(k,U){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:k}function S(k,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);k.prototype=Object.create(U&&U.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(k,U):k.__proto__=U)}var O=function(k){S(U,k);function U(z){b(this,U);var q=E(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,z));q.handleChange=function(re){var X=Array.prototype.slice.call(re.target.files),Y=(q.props.as||"url").toLowerCase();Promise.all(X.map(function(ee){return new Promise(function(N,ie){var he=new FileReader;switch(he.onload=function(de){N([de,ee])},Y){case"binary":{he.readAsBinaryString(ee);break}case"buffer":{he.readAsArrayBuffer(ee);break}case"text":{he.readAsText(ee);break}case"url":{he.readAsDataURL(ee);break}}})})).then(function(ee){q.props.onChange(re,ee)})},q.triggerInput=function(){var re=a.default.findDOMNode(q._reactFileReaderInput);re&&re.click()};var Q=(typeof window>"u"?"undefined":e(window))==="object"?window:{};return(!Q.File||!Q.FileReader||!Q.FileList||!Q.Blob)&&console.warn("[react-file-reader-input] Some file APIs detected as not supported. File reader functionality may not fully work."),q}return t(U,[{key:"render",value:function(){var q=this,Q=this.props;Q.as;var re=Q.children,X=Q.style,Y=g(Q,["as","children","style"]),ee=re?{position:"absolute",top:"-9999px"}:{};return i.createElement("div",{className:"_react-file-reader-input",onClick:this.triggerInput,style:X},i.createElement("input",n({},Y,{type:"file",ref:function(ie){q._reactFileReaderInput=ie},onChange:this.handleChange,onClick:function(){q._reactFileReaderInput.value=null},style:ee})),re)}}]),U}(i.Component);return yb.default=O,yb}var Phe=The();const Rhe=Ha(Phe);function ph(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx",e="8092b056f21d597f3cd7d476fbebca118ff97879",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx",statementMap:{0:{start:{line:8,column:4},end:{line:8,column:24}},1:{start:{line:11,column:14},end:{line:11,column:26}},2:{start:{line:12,column:4},end:{line:29,column:6}},3:{start:{line:20,column:26},end:{line:20,column:42}},4:{start:{line:23,column:28},end:{line:23,column:49}},5:{start:{line:26,column:137},end:{line:26,column:159}},6:{start:{line:32,column:21},end:{line:32,column:60}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:7,column:2},end:{line:7,column:3}},loc:{start:{line:7,column:21},end:{line:9,column:3}},line:7},1:{name:"(anonymous_1)",decl:{start:{line:10,column:2},end:{line:10,column:3}},loc:{start:{line:10,column:11},end:{line:30,column:3}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:20,column:19},end:{line:20,column:20}},loc:{start:{line:20,column:26},end:{line:20,column:42}},line:20},3:{name:"(anonymous_3)",decl:{start:{line:23,column:22},end:{line:23,column:23}},loc:{start:{line:23,column:28},end:{line:23,column:49}},line:23},4:{name:"(anonymous_4)",decl:{start:{line:26,column:130},end:{line:26,column:131}},loc:{start:{line:26,column:137},end:{line:26,column:159}},line:26}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalLoading.tsx"],names:[],mappings:"AAuBW,SAWL,KAXK;AAvBX,OAAO,WAAW;AAElB,OAAO,iBAAiB;AACxB,OAAO,WAAW;AAClB,SAA0B,uBAAuB;AAWjD,MAAM,6BAA6B,MAAM,UAAqC;AAAA,EAC5E,gBAAgB,GAAU;AAExB,MAAE,gBAAgB;AAAA,EACpB;AAAA,EAEA,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,oBAAoB;AAAA,QACpB,eAAe;AAAA;AAAA,UAEb,SAAS,CAAC,MAAa,cAAc,CAAC;AAAA,QACxC;AAAA,QACA,OAAO,KAAK,MAAM;AAAA,QAClB,cAAc,MAAM,KAAK,MAAM,SAAS;AAAA,QAExC;AAAA,8BAAC,OACE,eAAK,MAAM,SACd;AAAA,UACA,oBAAC,OAAE,WAAU,4BACX,8BAAC,eAAY,SAAS,CAAC,MAAM,KAAK,MAAM,SAAS,CAAC,GAC/C,YAAE,QAAQ,GACb,GACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,eAAe,gBAAgB,EAAE,oBAAoB;AAC3D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8092b056f21d597f3cd7d476fbebca118ff97879"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ph=function(){return a},a}ph();class Dhe extends rr.Component{underlayOnClick(e){ph().f[0]++,ph().s[0]++,e.stopPropagation()}render(){ph().f[1]++;const e=(ph().s[1]++,this.props.t);return ph().s[2]++,le.jsxs(F0,{"data-wd-key":"modal:loading",isOpen:this.props.isOpen,underlayClickExits:!1,underlayProps:{onClick:t=>(ph().f[2]++,ph().s[3]++,underlayProps(t))},title:this.props.title,onOpenToggle:()=>(ph().f[3]++,ph().s[4]++,this.props.onCancel()),children:[le.jsx("p",{children:this.props.message}),le.jsx("p",{className:"maputnik-dialog__buttons",children:le.jsx(Va,{onClick:t=>(ph().f[4]++,ph().s[5]++,this.props.onCancel(t)),children:e("Cancel")})})]})}}const Khe=(ph().s[6]++,$s()(Dhe)),zW=[{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 ar(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx",e="29ff9eb08a4518c25ccd9ea0089ac05d05f682b1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalOpen.tsx",statementMap:{0:{start:{line:15,column:4},end:{line:38,column:9}},1:{start:{line:20,column:23},end:{line:20,column:58}},2:{start:{line:43,column:4},end:{line:43,column:17}},3:{start:{line:44,column:4},end:{line:46,column:6}},4:{start:{line:49,column:4},end:{line:51,column:7}},5:{start:{line:54,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return ar=function(){return a},a}ar();class Fhe extends rr.Component{render(){return ar().f[0]++,ar().s[0]++,le.jsx("div",{className:"maputnik-public-style",children:le.jsxs(Va,{className:"maputnik-public-style-button","aria-label":this.props.title,onClick:()=>(ar().f[1]++,ar().s[1]++,this.props.onSelect(this.props.url)),children:[le.jsxs("div",{className:"maputnik-public-style-header",children:[le.jsx("div",{children:this.props.title}),le.jsx("span",{className:"maputnik-space"}),le.jsx(cU,{})]}),le.jsx("div",{className:"maputnik-public-style-thumbnail",style:{backgroundImage:`url(${this.props.thumbnailUrl})`}})]})})}}class Lhe extends rr.Component{constructor(t){ar().f[2]++,ar().s[2]++;super(t);kn(this,"onStyleSelect",(ar().s[10]++,t=>{ar().f[5]++,ar().s[11]++,this.clearError();let r=(ar().s[12]++,!1);ar().s[13]++,fetch(t,{mode:"cors",credentials:"same-origin"}).then(function(i){return ar().f[6]++,ar().s[14]++,i.json()}).then(i=>{if(ar().f[7]++,ar().s[15]++,r){ar().b[2][0]++,ar().s[16]++;return}else ar().b[2][1]++;ar().s[17]++,this.setState({activeRequest:null,activeRequestUrl:null});const s=(ar().s[18]++,cc.ensureStyleValidity(i));ar().s[19]++,console.log("Loaded style ",s.id),ar().s[20]++,this.props.onStyleOpen(s),ar().s[21]++,this.onOpenToggle()}).catch(i=>{ar().f[8]++,ar().s[22]++,this.setState({error:`Failed to load: '${t}'`,activeRequest:null,activeRequestUrl:null}),ar().s[23]++,console.error(i),ar().s[24]++,console.warn("Could not open the style URL",t)}),ar().s[25]++,this.setState({activeRequest:{abort:function(){ar().f[9]++,ar().s[26]++,r=!0}},activeRequestUrl:t})}));kn(this,"onSubmitUrl",(ar().s[27]++,t=>{ar().f[10]++,ar().s[28]++,t.preventDefault(),ar().s[29]++,this.onStyleSelect(this.state.styleUrl)}));kn(this,"onOpenFile",(ar().s[30]++,async()=>{ar().f[11]++,ar().s[31]++,this.clearError();const t=(ar().s[32]++,{types:[{description:"json",accept:{"application/json":[".json"]}}],multiple:!1}),[r]=(ar().s[33]++,await window.showOpenFilePicker(t)),i=(ar().s[34]++,await r.getFile()),s=(ar().s[35]++,await i.text());let a;ar().s[36]++;try{ar().s[37]++,a=JSON.parse(s)}catch(o){ar().s[38]++,this.setState({error:o.toString()}),ar().s[39]++;return}return ar().s[40]++,a=cc.ensureStyleValidity(a),ar().s[41]++,this.props.onStyleOpen(a,r),ar().s[42]++,this.onOpenToggle(),ar().s[43]++,i}));kn(this,"onFileChanged",(ar().s[44]++,async(t,r)=>{ar().f[12]++;const[,i]=(ar().s[45]++,r[0]),s=(ar().s[46]++,new FileReader);ar().s[47]++,this.clearError(),ar().s[48]++,s.readAsText(i,"UTF-8"),ar().s[49]++,s.onload=a=>{var d;ar().f[13]++;let o;ar().s[50]++;try{ar().s[51]++,o=JSON.parse((d=a.target)==null?void 0:d.result)}catch(g){ar().s[52]++,this.setState({error:g.toString()}),ar().s[53]++;return}ar().s[54]++,o=cc.ensureStyleValidity(o),ar().s[55]++,this.props.onStyleOpen(o),ar().s[56]++,this.onOpenToggle()},ar().s[57]++,s.onerror=a=>(ar().f[14]++,ar().s[58]++,console.log(a.target))}));kn(this,"onChangeUrl",(ar().s[62]++,t=>{ar().f[16]++,ar().s[63]++,this.setState({styleUrl:t})}));ar().s[3]++,this.state={styleUrl:""}}clearError(){ar().f[3]++,ar().s[4]++,this.setState({error:null})}onCancelActiveRequest(t){ar().f[4]++,ar().s[5]++,t?(ar().b[0][0]++,ar().s[6]++,t.stopPropagation()):ar().b[0][1]++,ar().s[7]++,this.state.activeRequest?(ar().b[1][0]++,ar().s[8]++,this.state.activeRequest.abort(),ar().s[9]++,this.setState({activeRequest:null,activeRequestUrl:null})):ar().b[1][1]++}onOpenToggle(){ar().f[15]++,ar().s[59]++,this.setState({styleUrl:""}),ar().s[60]++,this.clearError(),ar().s[61]++,this.props.onOpenToggle()}render(){ar().f[17]++;const t=(ar().s[64]++,this.props.t),r=(ar().s[65]++,zW.map(s=>(ar().f[18]++,ar().s[66]++,le.jsx(Fhe,{url:s.url,title:s.title,thumbnailUrl:s.thumbnail,onSelect:this.onStyleSelect},s.id))));let i;return ar().s[67]++,this.state.error?(ar().b[3][0]++,ar().s[68]++,i=le.jsxs("div",{className:"maputnik-modal-error",children:[this.state.error,le.jsx("a",{href:"#",onClick:()=>(ar().f[19]++,ar().s[69]++,this.clearError()),className:"maputnik-modal-error-close",children:"×"})]})):ar().b[3][1]++,ar().s[70]++,le.jsxs("div",{children:[le.jsxs(F0,{"data-wd-key":"modal:open",isOpen:this.props.isOpen,onOpenToggle:()=>(ar().f[20]++,ar().s[71]++,this.onOpenToggle()),title:t("Open Style"),children:[i,le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:t("Open local Style")}),le.jsx("p",{children:t("Open a local JSON style from your computer.")}),le.jsx("div",{children:typeof window.showOpenFilePicker=="function"?(ar().b[4][0]++,le.jsxs(Va,{className:"maputnik-big-button",onClick:this.onOpenFile,children:[le.jsx(S7,{})," ",t("Open Style")]})):(ar().b[4][1]++,le.jsx(Rhe,{onChange:this.onFileChanged,tabIndex:-1,"aria-label":t("Open Style"),children:le.jsxs(Va,{className:"maputnik-upload-button",children:[le.jsx(S7,{})," ",t("Open Style")]})}))})]}),le.jsx("section",{className:"maputnik-modal-section",children:le.jsxs("form",{onSubmit:this.onSubmitUrl,children:[le.jsx("h1",{children:t("Load from URL")}),le.jsx("p",{children:le.jsxs(M0,{t,children:["Load from a URL. Note that the URL must have ",le.jsx("a",{href:"https://enable-cors.org",target:"_blank",rel:"noopener noreferrer",children:"CORS enabled"}),"."]})}),le.jsx(Q8,{"aria-label":t("Style URL"),"data-wd-key":"modal:open.url.input",type:"text",className:"maputnik-input",default:t("Enter URL..."),value:this.state.styleUrl,onInput:this.onChangeUrl,onChange:this.onChangeUrl}),le.jsx("div",{children:le.jsx(Va,{"data-wd-key":"modal:open.url.button",type:"submit",className:"maputnik-big-button",disabled:this.state.styleUrl.length<1,children:"Load from URL"})})]})}),le.jsxs("section",{className:"maputnik-modal-section maputnik-modal-section--shrink",children:[le.jsx("h1",{children:t("Gallery Styles")}),le.jsx("p",{children:t("Open one of the publicly available styles to start from.")}),le.jsx("div",{className:"maputnik-style-gallery-container",children:r})]})]}),le.jsx(Khe,{isOpen:!!this.state.activeRequest,title:t("Loading style"),onCancel:s=>(ar().f[21]++,ar().s[72]++,this.onCancelActiveRequest(s)),message:t("Loading: {{requestUrl}}",{requestUrl:this.state.activeRequestUrl})})]})}}const Uhe=(ar().s[73]++,$s()(Lhe));function _f(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx",e="2fa0c1760625a188da3b2788fa0924b96bb7f3e1",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx",statementMap:{0:{start:{line:7,column:14},end:{line:7,column:26}},1:{start:{line:8,column:17},end:{line:41,column:5}},2:{start:{line:42,column:25},end:{line:115,column:5}},3:{start:{line:116,column:4},end:{line:145,column:6}},4:{start:{line:130,column:12},end:{line:133,column:22}},5:{start:{line:137,column:12},end:{line:141,column:22}},6:{start:{line:148,column:23},end:{line:148,column:64}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:146,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:129,column:57},end:{line:129,column:58}},loc:{start:{line:129,column:72},end:{line:134,column:11}},line:129},2:{name:"(anonymous_2)",decl:{start:{line:136,column:65},end:{line:136,column:66}},loc:{start:{line:136,column:80},end:{line:142,column:11}},line:136}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalShortcuts.tsx"],names:[],mappings:"AAiBa,SAwCA,UAxCA,KAwCA,YAxCA;AAjBb,OAAO,WAAW;AAClB,SAAS,OAAwB,uBAAuB;AAExD,OAAO,WAAW;AASlB,MAAM,+BAA+B,MAAM,UAAuC;AAAA,EAChF,SAAS;AACP,UAAM,IAAI,KAAK,MAAM;AACrB,UAAM,OAAO;AAAA,MACX;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,YAAY;AAAA,MACtB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,cAAc;AAAA,MACxB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,oBAAoB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,sBAAsB;AAAA,MAChC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,gBAAgB;AAAA,MAC1B;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,WAAW;AAAA,MACrB;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,aAAa;AAAA,MACvB;AAAA,IACF;AAGA,UAAM,eAAe;AAAA,MACnB;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,eAAC;AAAA,QACX,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,eAAC;AAAA,WAAM;AAAA,QACtC,MAAM,EAAE,+BAAgC;AAAA,MAC1C;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,gBAAE;AAAA,QACZ,MAAM,EAAE,uBAAwB;AAAA,MAClC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,kBAAI;AAAA,QACd,MAAM,EAAE,yBAA0B;AAAA,MACpC;AAAA,MACA;AAAA,QACE,KAAK,oBAAC,SAAI,mBAAK;AAAA,QACf,MAAM,EAAE,0BAA2B;AAAA,MACrC;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,mBAAK;AAAA,WAAM;AAAA,QAC1C,MAAM,EAAE,sCAAuC;AAAA,MACjD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,sCAAsC;AAAA,MAChD;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,gBAAE;AAAA,WAAM;AAAA,QACvC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,MACA;AAAA,QACE,KAAK,iCAAE;AAAA,8BAAC,SAAI,mBAAK;AAAA,UAAM;AAAA,UAAG,oBAAC,SAAI,kBAAI;AAAA,WAAM;AAAA,QACzC,MAAM,EAAE,mCAAmC;AAAA,MAC7C;AAAA,IACF;AAGA,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,WAAW;AAAA,QAEpB,+BAAC,aAAQ,WAAU,mDACjB;AAAA,8BAAC,OACC,+BAAC,SAAM,GAAM;AAAA;AAAA,YACL,oBAAC,UAAK,iBAAG;AAAA,YAAO;AAAA,aACxB,GACF;AAAA,UACA,oBAAC,QACE,eAAK,IAAI,CAAC,MAAM,QAAQ;AACvB,mBAAO,qBAAC,SAAc,WAAU,sCAC9B;AAAA,kCAAC,QAAmB,eAAK,OAAhB,OAAK,GAAe;AAAA,cAC7B,oBAAC,QAAmB,eAAK,QAAhB,OAAK,GAAgB;AAAA,iBAFf,GAGjB;AAAA,UACF,CAAC,GACH;AAAA,UACA,oBAAC,OAAG,YAAE,8DAA8D,GAAE;AAAA,UACtE,oBAAC,QACE,uBAAa,IAAI,CAAC,MAAM,QAAQ;AAC/B,mBAAO,qBAAC,QACN;AAAA,kCAAC,UAAM,eAAK,KAAI;AAAA,cAAO;AAAA,cAAE,KAAK;AAAA,iBADhB,GAEhB;AAAA,UACF,CAAC,GACH;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB,gBAAgB,EAAE,sBAAsB;AAC/D,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"2fa0c1760625a188da3b2788fa0924b96bb7f3e1"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return _f=function(){return a},a}_f();class zhe extends rr.Component{render(){_f().f[0]++;const e=(_f().s[0]++,this.props.t),t=(_f().s[1]++,[{key:le.jsx("kbd",{children:"?"}),text:e("Shortcuts menu")},{key:le.jsx("kbd",{children:"o"}),text:e("Open modal")},{key:le.jsx("kbd",{children:"e"}),text:e("Export modal")},{key:le.jsx("kbd",{children:"d"}),text:e("Data Sources modal")},{key:le.jsx("kbd",{children:"s"}),text:e("Style Settings modal")},{key:le.jsx("kbd",{children:"i"}),text:e("Toggle inspect")},{key:le.jsx("kbd",{children:"m"}),text:e("Focus map")},{key:le.jsx("kbd",{children:"!"}),text:e("Debug modal")}]),r=(_f().s[2]++,[{key:le.jsx("kbd",{children:"+"}),text:e("Increase the zoom level by 1.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"+"})]}),text:e("Increase the zoom level by 2.")},{key:le.jsx("kbd",{children:"-"}),text:e("Decrease the zoom level by 1.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"-"})]}),text:e("Decrease the zoom level by 2.")},{key:le.jsx("kbd",{children:"Up"}),text:e("Pan up by 100 pixels.")},{key:le.jsx("kbd",{children:"Down"}),text:e("Pan down by 100 pixels.")},{key:le.jsx("kbd",{children:"Left"}),text:e("Pan left by 100 pixels.")},{key:le.jsx("kbd",{children:"Right"}),text:e("Pan right by 100 pixels.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"Right"})]}),text:e("Increase the rotation by 15 degrees.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"Left"})]}),text:e("Decrease the rotation by 15 degrees.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"Up"})]}),text:e("Increase the pitch by 10 degrees.")},{key:le.jsxs(le.Fragment,{children:[le.jsx("kbd",{children:"Shift"})," + ",le.jsx("kbd",{children:"Down"})]}),text:e("Decrease the pitch by 10 degrees.")}]);return _f().s[3]++,le.jsx(F0,{"data-wd-key":"modal:shortcuts",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Shortcuts"),children:le.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[le.jsx("p",{children:le.jsxs(M0,{t:e,children:["Press ",le.jsx("code",{children:"ESC"})," to lose focus of any active elements, then press one of:"]})}),le.jsx("dl",{children:t.map((i,s)=>(_f().f[1]++,_f().s[4]++,le.jsxs("div",{className:"maputnik-modal-shortcuts__shortcut",children:[le.jsx("dt",{children:i.key},"dt"+s),le.jsx("dd",{children:i.text},"dd"+s)]},s)))}),le.jsx("p",{children:e("If the Map is in focused you can use the following shortcuts")}),le.jsx("ul",{children:r.map((i,s)=>(_f().f[2]++,_f().s[5]++,le.jsxs("li",{children:[le.jsx("span",{children:i.key})," ",i.text]},s)))})]})})}}const jhe=(_f().s[6]++,$s()(zhe));function nA(){var n="/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx",e="a1d210f2dd55b03f0e8aae655258e8184b2d45b3",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx",statementMap:{0:{start:{line:7,column:27},end:{line:7,column:37}},1:{start:{line:8,column:20},end:{line:8,column:48}},2:{start:{line:9,column:19},end:{line:9,column:49}},3:{start:{line:10,column:19},end:{line:10,column:49}},4:{start:{line:11,column:4},end:{line:53,column:6}},5:{start:{line:22,column:14},end:{line:26,column:27}},6:{start:{line:23,column:96},end:{line:23,column:153}},7:{start:{line:29,column:14},end:{line:33,column:27}},8:{start:{line:30,column:96},end:{line:30,column:153}},9:{start:{line:56,column:19},end:{line:56,column:56}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:6,column:2},end:{line:6,column:3}},loc:{start:{line:6,column:11},end:{line:54,column:3}},line:6},1:{name:"(anonymous_1)",decl:{start:{line:21,column:140},end:{line:21,column:141}},loc:{start:{line:21,column:156},end:{line:27,column:13}},line:21},2:{name:"(anonymous_2)",decl:{start:{line:23,column:89},end:{line:23,column:90}},loc:{start:{line:23,column:96},end:{line:23,column:153}},line:23},3:{name:"(anonymous_3)",decl:{start:{line:28,column:136},end:{line:28,column:137}},loc:{start:{line:28,column:152},end:{line:34,column:13}},line:28},4:{name:"(anonymous_4)",decl:{start:{line:30,column:89},end:{line:30,column:90}},loc:{start:{line:30,column:96},end:{line:30,column:153}},line:30}},branchMap:{0:{loc:{start:{line:21,column:12},end:{line:27,column:17}},type:"binary-expr",locations:[{start:{line:21,column:12},end:{line:21,column:44}},{start:{line:21,column:64},end:{line:27,column:17}}],line:21},1:{loc:{start:{line:28,column:12},end:{line:34,column:17}},type:"binary-expr",locations:[{start:{line:28,column:12},end:{line:28,column:40}},{start:{line:28,column:60},end:{line:34,column:17}}],line:28}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/components/ModalDebug.tsx"],names:[],mappings:"AAuCQ,cAKQ,YALR;AAvCR,OAAO,WAAW;AAElB,SAAS,OAAwB,uBAAuB;AACxD,OAAO,WAAW;AAqBlB,MAAM,2BAA2B,MAAM,UAAmC;AAAA,EACxE,SAAS;AACP,UAAM,EAAC,GAAG,QAAO,IAAI,KAAK;AAE1B,UAAM,UAAU,KAAK,MAAM,QAAQ,IAAI,IAAE;AACzC,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAC9C,UAAM,SAAS,CAAE,QAAQ,OAAO,IAAK,QAAQ,CAAC;AAE9C,WAAO;AAAA,MAAC;AAAA;AAAA,QACN,eAAY;AAAA,QACZ,QAAQ,KAAK,MAAM;AAAA,QACnB,cAAc,KAAK,MAAM;AAAA,QACzB,OAAO,EAAE,OAAO;AAAA,QAEhB;AAAA,+BAAC,aAAQ,WAAU,mDACjB;AAAA,gCAAC,QAAI,YAAE,SAAS,GAAE;AAAA,YACjB,KAAK,MAAM,aAAa,YACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,YAED,KAAK,MAAM,aAAa,QACvB,oBAAC,QACE,iBAAO,QAAQ,KAAK,MAAM,sBAAuB,EAAE,IAAI,CAAC,CAAC,KAAK,GAAG,MAAM;AACtE,qBAAO,oBAAC,QACN,+BAAC,WACC;AAAA,oCAAC,WAAM,MAAK,YAAW,SAAS,KAAK,UAAU,CAAC,MAAM,KAAK,MAAM,wBAAwB,KAAK,EAAE,OAAO,OAAO,GAAG;AAAA,gBAAE;AAAA,gBAAE;AAAA,iBACvH,KAHc,GAIhB;AAAA,YACF,CAAC,GACH;AAAA,aAEJ;AAAA,UACA,qBAAC,aAAQ,WAAU,0BACjB;AAAA,gCAAC,QAAG,mBAAK;AAAA,YACT,oBAAC,OACC,+BAAC,SAAM,GACL;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,QAAO;AAAA,kBACP,KAAI;AAAA,kBACJ,MAAM,sCAAsC,OAAO,IAAI,MAAM,IAAI,MAAM;AAAA,kBACxE;AAAA;AAAA,cAED;AAAA,cAAI;AAAA,eACN,GACF;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EACF;AACF;AAEA,MAAM,aAAa,gBAAgB,EAAE,kBAAkB;AACvD,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a1d210f2dd55b03f0e8aae655258e8184b2d45b3"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return nA=function(){return a},a}nA();class Nhe extends rr.Component{render(){nA().f[0]++;const{t:e,mapView:t}=(nA().s[0]++,this.props),r=(nA().s[1]++,Math.round(t.zoom)+1),i=(nA().s[2]++,+t.center.lng.toFixed(5)),s=(nA().s[3]++,+t.center.lat.toFixed(5));return nA().s[4]++,le.jsxs(F0,{"data-wd-key":"modal:debug",isOpen:this.props.isOpen,onOpenToggle:this.props.onOpenToggle,title:e("Debug"),children:[le.jsxs("section",{className:"maputnik-modal-section maputnik-modal-shortcuts",children:[le.jsx("h1",{children:e("Options")}),(nA().b[0][0]++,this.props.renderer==="mlgljs"&&(nA().b[0][1]++,le.jsx("ul",{children:Object.entries(this.props.maplibreGlDebugOptions).map(([a,o])=>(nA().f[1]++,nA().s[5]++,le.jsx("li",{children:le.jsxs("label",{children:[le.jsx("input",{type:"checkbox",checked:o,onChange:d=>(nA().f[2]++,nA().s[6]++,this.props.onChangeMaplibreGlDebug(a,d.target.checked))})," ",a]})},a)))}))),(nA().b[1][0]++,this.props.renderer==="ol"&&(nA().b[1][1]++,le.jsx("ul",{children:Object.entries(this.props.openlayersDebugOptions).map(([a,o])=>(nA().f[3]++,nA().s[7]++,le.jsx("li",{children:le.jsxs("label",{children:[le.jsx("input",{type:"checkbox",checked:o,onChange:d=>(nA().f[4]++,nA().s[8]++,this.props.onChangeOpenlayersDebug(a,d.target.checked))})," ",a]})},a)))})))]}),le.jsxs("section",{className:"maputnik-modal-section",children:[le.jsx("h1",{children:"Links"}),le.jsx("p",{children:le.jsxs(M0,{t:e,children:[le.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:`https://www.openstreetmap.org/#map=${r}/${s}/${i}`,children:"Open in OSM"})," — Opens the current view on openstreetmap.org"]})})]})]})}}const Whe=(nA().s[9]++,$s()(Nhe));var sg={},Kv={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var Ghe=Kv.exports,KK;function Qhe(){return KK||(KK=1,function(n,e){(function(t){var r=e&&!e.nodeType&&e,i=!n.nodeType&&n,s=typeof window=="object"&&window;(s.global===s||s.window===s||s.self===s)&&(t=s);var a,o=2147483647,d=36,g=1,b=26,E=38,S=700,O=72,k=128,U="-",z=/^xn--/,q=/[^\x20-\x7E]/,Q=/[\x2E\u3002\uFF0E\uFF61]/g,re={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=d-g,Y=Math.floor,ee=String.fromCharCode,N;function ie(Ce){throw new RangeError(re[Ce])}function he(Ce,Te){for(var rt=Ce.length,yt=[];rt--;)yt[rt]=Te(Ce[rt]);return yt}function de(Ce,Te){var rt=Ce.split("@"),yt="";rt.length>1&&(yt=rt[0]+"@",Ce=rt[1]),Ce=Ce.replace(Q,".");var bt=Ce.split("."),gt=he(bt,Te).join(".");return yt+gt}function Me(Ce){for(var Te=[],rt=0,yt=Ce.length,bt,gt;rt<yt;)bt=Ce.charCodeAt(rt++),bt>=55296&&bt<=56319&&rt<yt?(gt=Ce.charCodeAt(rt++),(gt&64512)==56320?Te.push(((bt&1023)<<10)+(gt&1023)+65536):(Te.push(bt),rt--)):Te.push(bt);return Te}function fe(Ce){return he(Ce,function(Te){var rt="";return Te>65535&&(Te-=65536,rt+=ee(Te>>>10&1023|55296),Te=56320|Te&1023),rt+=ee(Te),rt}).join("")}function xe(Ce){return Ce-48<10?Ce-22:Ce-65<26?Ce-65:Ce-97<26?Ce-97:d}function De(Ce,Te){return Ce+22+75*(Ce<26)-((Te!=0)<<5)}function me(Ce,Te,rt){var yt=0;for(Ce=rt?Y(Ce/S):Ce>>1,Ce+=Y(Ce/Te);Ce>X*b>>1;yt+=d)Ce=Y(Ce/X);return Y(yt+(X+1)*Ce/(Ce+E))}function at(Ce){var Te=[],rt=Ce.length,yt,bt=0,gt=k,Dt=O,Pt,Le,Pe,Ee,nt,_t,ht,Ut,en;for(Pt=Ce.lastIndexOf(U),Pt<0&&(Pt=0),Le=0;Le<Pt;++Le)Ce.charCodeAt(Le)>=128&&ie("not-basic"),Te.push(Ce.charCodeAt(Le));for(Pe=Pt>0?Pt+1:0;Pe<rt;){for(Ee=bt,nt=1,_t=d;Pe>=rt&&ie("invalid-input"),ht=xe(Ce.charCodeAt(Pe++)),(ht>=d||ht>Y((o-bt)/nt))&&ie("overflow"),bt+=ht*nt,Ut=_t<=Dt?g:_t>=Dt+b?b:_t-Dt,!(ht<Ut);_t+=d)en=d-Ut,nt>Y(o/en)&&ie("overflow"),nt*=en;yt=Te.length+1,Dt=me(bt-Ee,yt,Ee==0),Y(bt/yt)>o-gt&&ie("overflow"),gt+=Y(bt/yt),bt%=yt,Te.splice(bt++,0,gt)}return fe(Te)}function Qe(Ce){var Te,rt,yt,bt,gt,Dt,Pt,Le,Pe,Ee,nt,_t=[],ht,Ut,en,Ft;for(Ce=Me(Ce),ht=Ce.length,Te=k,rt=0,gt=O,Dt=0;Dt<ht;++Dt)nt=Ce[Dt],nt<128&&_t.push(ee(nt));for(yt=bt=_t.length,bt&&_t.push(U);yt<ht;){for(Pt=o,Dt=0;Dt<ht;++Dt)nt=Ce[Dt],nt>=Te&&nt<Pt&&(Pt=nt);for(Ut=yt+1,Pt-Te>Y((o-rt)/Ut)&&ie("overflow"),rt+=(Pt-Te)*Ut,Te=Pt,Dt=0;Dt<ht;++Dt)if(nt=Ce[Dt],nt<Te&&++rt>o&&ie("overflow"),nt==Te){for(Le=rt,Pe=d;Ee=Pe<=gt?g:Pe>=gt+b?b:Pe-gt,!(Le<Ee);Pe+=d)Ft=Le-Ee,en=d-Ee,_t.push(ee(De(Ee+Ft%en,0))),Le=Y(Ft/en);_t.push(ee(De(Le,0))),gt=me(rt,Ut,yt==bt),rt=0,++yt}++rt,++Te}return _t.join("")}function He(Ce){return de(Ce,function(Te){return z.test(Te)?at(Te.slice(4).toLowerCase()):Te})}function We(Ce){return de(Ce,function(Te){return q.test(Te)?"xn--"+Qe(Te):Te})}if(a={version:"1.4.1",ucs2:{decode:Me,encode:fe},decode:at,encode:Qe,toASCII:We,toUnicode:He},r&&i)if(n.exports==r)i.exports=a;else for(N in a)a.hasOwnProperty(N)&&(r[N]=a[N]);else t.punycode=a})(Ghe)}(Kv,Kv.exports)),Kv.exports}var iE,FK;function Ny(){return FK||(FK=1,iE=TypeError),iE}const qhe={},Yhe=Object.freeze(Object.defineProperty({__proto__:null,default:qhe},Symbol.toStringTag,{value:"Module"})),$he=vB(Yhe);var oE,LK;function u3(){if(LK)return oE;LK=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,r=n&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=i&&s&&typeof s.get=="function"?s.get:null,o=i&&Set.prototype.forEach,d=typeof WeakMap=="function"&&WeakMap.prototype,g=d?WeakMap.prototype.has:null,b=typeof WeakSet=="function"&&WeakSet.prototype,E=b?WeakSet.prototype.has:null,S=typeof WeakRef=="function"&&WeakRef.prototype,O=S?WeakRef.prototype.deref:null,k=Boolean.prototype.valueOf,U=Object.prototype.toString,z=Function.prototype.toString,q=String.prototype.match,Q=String.prototype.slice,re=String.prototype.replace,X=String.prototype.toUpperCase,Y=String.prototype.toLowerCase,ee=RegExp.prototype.test,N=Array.prototype.concat,ie=Array.prototype.join,he=Array.prototype.slice,de=Math.floor,Me=typeof BigInt=="function"?BigInt.prototype.valueOf:null,fe=Object.getOwnPropertySymbols,xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,De=typeof Symbol=="function"&&typeof Symbol.iterator=="object",me=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===De||!0)?Symbol.toStringTag:null,at=Object.prototype.propertyIsEnumerable,Qe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Be){return Be.__proto__}:null);function He(Be,oe){if(Be===1/0||Be===-1/0||Be!==Be||Be&&Be>-1e3&&Be<1e3||ee.call(/e/,oe))return oe;var ve=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Be=="number"){var p=Be<0?-de(-Be):de(Be);if(p!==Be){var je=String(p),Ye=Q.call(oe,je.length+1);return re.call(je,ve,"$&_")+"."+re.call(re.call(Ye,/([0-9]{3})/g,"$&_"),/_$/,"")}}return re.call(oe,ve,"$&_")}var We=$he,Ce=We.custom,Te=ht(Ce)?Ce:null,rt={__proto__:null,double:'"',single:"'"},yt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};oE=function Be(oe,ve,p,je){var Ye=ve||{};if(Ft(Ye,"quoteStyle")&&!Ft(rt,Ye.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ft(Ye,"maxStringLength")&&(typeof Ye.maxStringLength=="number"?Ye.maxStringLength<0&&Ye.maxStringLength!==1/0:Ye.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var tt=Ft(Ye,"customInspect")?Ye.customInspect:!0;if(typeof tt!="boolean"&&tt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ft(Ye,"indent")&&Ye.indent!==null&&Ye.indent!==" "&&!(parseInt(Ye.indent,10)===Ye.indent&&Ye.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ft(Ye,"numericSeparator")&&typeof Ye.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ct=Ye.numericSeparator;if(typeof oe>"u")return"undefined";if(oe===null)return"null";if(typeof oe=="boolean")return oe?"true":"false";if(typeof oe=="string")return Xn(oe,Ye);if(typeof oe=="number"){if(oe===0)return 1/0/oe>0?"0":"-0";var At=String(oe);return ct?He(oe,At):At}if(typeof oe=="bigint"){var Gt=String(oe)+"n";return ct?He(oe,Gt):Gt}var $t=typeof Ye.depth>"u"?5:Ye.depth;if(typeof p>"u"&&(p=0),p>=$t&&$t>0&&typeof oe=="object")return Dt(oe)?"[Array]":"[Object]";var jt=Yt(Ye,p);if(typeof je>"u")je=[];else if(nn(je,oe)>=0)return"[Circular]";function xt(Mo,Ti,La){if(Ti&&(je=he.call(je),je.push(Ti)),La){var Ea={depth:Ye.depth};return Ft(Ye,"quoteStyle")&&(Ea.quoteStyle=Ye.quoteStyle),Be(Mo,Ea,p+1,je)}return Be(Mo,Ye,p+1,je)}if(typeof oe=="function"&&!Le(oe)){var Rn=jn(oe),Bn=er(oe,xt);return"[Function"+(Rn?": "+Rn:" (anonymous)")+"]"+(Bn.length>0?" { "+ie.call(Bn,", ")+" }":"")}if(ht(oe)){var fr=De?re.call(String(oe),/^(Symbol\(.*\))_[^)]*$/,"$1"):xe.call(oe);return typeof oe=="object"&&!De?Ae(fr):fr}if(Qn(oe)){for(var Sr="<"+Y.call(String(oe.nodeName)),on=oe.attributes||[],Nn=0;Nn<on.length;Nn++)Sr+=" "+on[Nn].name+"="+bt(gt(on[Nn].value),"double",Ye);return Sr+=">",oe.childNodes&&oe.childNodes.length&&(Sr+="..."),Sr+="</"+Y.call(String(oe.nodeName))+">",Sr}if(Dt(oe)){if(oe.length===0)return"[]";var Fn=er(oe,xt);return jt&&!St(Fn)?"["+rn(Fn,jt)+"]":"[ "+ie.call(Fn,", ")+" ]"}if(Pe(oe)){var Or=er(oe,xt);return!("cause"in Error.prototype)&&"cause"in oe&&!at.call(oe,"cause")?"{ ["+String(oe)+"] "+ie.call(N.call("[cause]: "+xt(oe.cause),Or),", ")+" }":Or.length===0?"["+String(oe)+"]":"{ ["+String(oe)+"] "+ie.call(Or,", ")+" }"}if(typeof oe=="object"&&tt){if(Te&&typeof oe[Te]=="function"&&We)return We(oe,{depth:$t-p});if(tt!=="symbol"&&typeof oe.inspect=="function")return oe.inspect()}if(ir(oe)){var Er=[];return r&&r.call(oe,function(Mo,Ti){Er.push(xt(Ti,oe,!0)+" => "+xt(Mo,oe))}),et("Map",t.call(oe),Er,jt)}if(Hn(oe)){var Dr=[];return o&&o.call(oe,function(Mo){Dr.push(xt(Mo,oe))}),et("Set",a.call(oe),Dr,jt)}if(Dn(oe))return pe("WeakMap");if(wr(oe))return pe("WeakSet");if(fn(oe))return pe("WeakRef");if(nt(oe))return Ae(xt(Number(oe)));if(Ut(oe))return Ae(xt(Me.call(oe)));if(_t(oe))return Ae(k.call(oe));if(Ee(oe))return Ae(xt(String(oe)));if(typeof window<"u"&&oe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&oe===globalThis||typeof window<"u"&&oe===window)return"{ [object globalThis] }";if(!Pt(oe)&&!Le(oe)){var ur=er(oe,xt),co=Qe?Qe(oe)===Object.prototype:oe instanceof Object||oe.constructor===Object,Sa=oe instanceof Object?"":"null prototype",qi=!co&&me&&Object(oe)===oe&&me in oe?Q.call(mn(oe),8,-1):Sa?"Object":"",yi=co||typeof oe.constructor!="function"?"":oe.constructor.name?oe.constructor.name+" ":"",oo=yi+(qi||Sa?"["+ie.call(N.call([],qi||[],Sa||[]),": ")+"] ":"");return ur.length===0?oo+"{}":jt?oo+"{"+rn(ur,jt)+"}":oo+"{ "+ie.call(ur,", ")+" }"}return String(oe)};function bt(Be,oe,ve){var p=ve.quoteStyle||oe,je=rt[p];return je+Be+je}function gt(Be){return re.call(String(Be),/"/g,""")}function Dt(Be){return mn(Be)==="[object Array]"&&(!me||!(typeof Be=="object"&&me in Be))}function Pt(Be){return mn(Be)==="[object Date]"&&(!me||!(typeof Be=="object"&&me in Be))}function Le(Be){return mn(Be)==="[object RegExp]"&&(!me||!(typeof Be=="object"&&me in Be))}function Pe(Be){return mn(Be)==="[object Error]"&&(!me||!(typeof Be=="object"&&me in Be))}function Ee(Be){return mn(Be)==="[object String]"&&(!me||!(typeof Be=="object"&&me in Be))}function nt(Be){return mn(Be)==="[object Number]"&&(!me||!(typeof Be=="object"&&me in Be))}function _t(Be){return mn(Be)==="[object Boolean]"&&(!me||!(typeof Be=="object"&&me in Be))}function ht(Be){if(De)return Be&&typeof Be=="object"&&Be instanceof Symbol;if(typeof Be=="symbol")return!0;if(!Be||typeof Be!="object"||!xe)return!1;try{return xe.call(Be),!0}catch{}return!1}function Ut(Be){if(!Be||typeof Be!="object"||!Me)return!1;try{return Me.call(Be),!0}catch{}return!1}var en=Object.prototype.hasOwnProperty||function(Be){return Be in this};function Ft(Be,oe){return en.call(Be,oe)}function mn(Be){return U.call(Be)}function jn(Be){if(Be.name)return Be.name;var oe=q.call(z.call(Be),/^function\s*([\w$]+)/);return oe?oe[1]:null}function nn(Be,oe){if(Be.indexOf)return Be.indexOf(oe);for(var ve=0,p=Be.length;ve<p;ve++)if(Be[ve]===oe)return ve;return-1}function ir(Be){if(!t||!Be||typeof Be!="object")return!1;try{t.call(Be);try{a.call(Be)}catch{return!0}return Be instanceof Map}catch{}return!1}function Dn(Be){if(!g||!Be||typeof Be!="object")return!1;try{g.call(Be,g);try{E.call(Be,E)}catch{return!0}return Be instanceof WeakMap}catch{}return!1}function fn(Be){if(!O||!Be||typeof Be!="object")return!1;try{return O.call(Be),!0}catch{}return!1}function Hn(Be){if(!a||!Be||typeof Be!="object")return!1;try{a.call(Be);try{t.call(Be)}catch{return!0}return Be instanceof Set}catch{}return!1}function wr(Be){if(!E||!Be||typeof Be!="object")return!1;try{E.call(Be,E);try{g.call(Be,g)}catch{return!0}return Be instanceof WeakSet}catch{}return!1}function Qn(Be){return!Be||typeof Be!="object"?!1:typeof HTMLElement<"u"&&Be instanceof HTMLElement?!0:typeof Be.nodeName=="string"&&typeof Be.getAttribute=="function"}function Xn(Be,oe){if(Be.length>oe.maxStringLength){var ve=Be.length-oe.maxStringLength,p="... "+ve+" more character"+(ve>1?"s":"");return Xn(Q.call(Be,0,oe.maxStringLength),oe)+p}var je=yt[oe.quoteStyle||"single"];je.lastIndex=0;var Ye=re.call(re.call(Be,je,"\\$1"),/[\x00-\x1f]/g,Ge);return bt(Ye,"single",oe)}function Ge(Be){var oe=Be.charCodeAt(0),ve={8:"b",9:"t",10:"n",12:"f",13:"r"}[oe];return ve?"\\"+ve:"\\x"+(oe<16?"0":"")+X.call(oe.toString(16))}function Ae(Be){return"Object("+Be+")"}function pe(Be){return Be+" { ? }"}function et(Be,oe,ve,p){var je=p?rn(ve,p):ie.call(ve,", ");return Be+" ("+oe+") {"+je+"}"}function St(Be){for(var oe=0;oe<Be.length;oe++)if(nn(Be[oe],`
|
||
`)>=0)return!1;return!0}function Yt(Be,oe){var ve;if(Be.indent===" ")ve=" ";else if(typeof Be.indent=="number"&&Be.indent>0)ve=ie.call(Array(Be.indent+1)," ");else return null;return{base:ve,prev:ie.call(Array(oe+1),ve)}}function rn(Be,oe){if(Be.length===0)return"";var ve=`
|
||
`+oe.prev+oe.base;return ve+ie.call(Be,","+ve)+`
|
||
`+oe.prev}function er(Be,oe){var ve=Dt(Be),p=[];if(ve){p.length=Be.length;for(var je=0;je<Be.length;je++)p[je]=Ft(Be,je)?oe(Be[je],Be):""}var Ye=typeof fe=="function"?fe(Be):[],tt;if(De){tt={};for(var ct=0;ct<Ye.length;ct++)tt["$"+Ye[ct]]=Ye[ct]}for(var At in Be)Ft(Be,At)&&(ve&&String(Number(At))===At&&At<Be.length||De&&tt["$"+At]instanceof Symbol||(ee.call(/[^\w$]/,At)?p.push(oe(At,Be)+": "+oe(Be[At],Be)):p.push(At+": "+oe(Be[At],Be))));if(typeof fe=="function")for(var Gt=0;Gt<Ye.length;Gt++)at.call(Be,Ye[Gt])&&p.push("["+oe(Ye[Gt])+"]: "+oe(Be[Ye[Gt]],Be));return p}return oE}var sE,UK;function Vhe(){if(UK)return sE;UK=1;var n=u3(),e=Ny(),t=function(o,d,g){for(var b=o,E;(E=b.next)!=null;b=E)if(E.key===d)return b.next=E.next,g||(E.next=o.next,o.next=E),E},r=function(o,d){if(o){var g=t(o,d);return g&&g.value}},i=function(o,d,g){var b=t(o,d);b?b.value=g:o.next={key:d,next:o.next,value:g}},s=function(o,d){return o?!!t(o,d):!1},a=function(o,d){if(o)return t(o,d,!0)};return sE=function(){var d,g={assert:function(b){if(!g.has(b))throw new e("Side channel does not contain "+n(b))},delete:function(b){var E=d&&d.next,S=a(d,b);return S&&E&&E===S&&(d=void 0),!!S},get:function(b){return r(d,b)},has:function(b){return s(d,b)},set:function(b,E){d||(d={next:void 0}),i(d,b,E)}};return g},sE}var aE,zK;function jW(){return zK||(zK=1,aE=Object),aE}var lE,jK;function Hhe(){return jK||(jK=1,lE=Error),lE}var uE,NK;function Zhe(){return NK||(NK=1,uE=EvalError),uE}var AE,WK;function Xhe(){return WK||(WK=1,AE=RangeError),AE}var cE,GK;function Jhe(){return GK||(GK=1,cE=ReferenceError),cE}var dE,QK;function efe(){return QK||(QK=1,dE=SyntaxError),dE}var hE,qK;function tfe(){return qK||(qK=1,hE=URIError),hE}var fE,YK;function nfe(){return YK||(YK=1,fE=Math.abs),fE}var pE,$K;function rfe(){return $K||($K=1,pE=Math.floor),pE}var mE,VK;function ife(){return VK||(VK=1,mE=Math.max),mE}var gE,HK;function ofe(){return HK||(HK=1,gE=Math.min),gE}var yE,ZK;function sfe(){return ZK||(ZK=1,yE=Math.pow),yE}var vE,XK;function afe(){return XK||(XK=1,vE=Math.round),vE}var CE,JK;function lfe(){return JK||(JK=1,CE=Number.isNaN||function(e){return e!==e}),CE}var _E,eF;function ufe(){if(eF)return _E;eF=1;var n=lfe();return _E=function(t){return n(t)||t===0?t:t<0?-1:1},_E}var bE,tF;function Afe(){return tF||(tF=1,bE=Object.getOwnPropertyDescriptor),bE}var xE,nF;function NW(){if(nF)return xE;nF=1;var n=Afe();if(n)try{n([],"length")}catch{n=null}return xE=n,xE}var wE,rF;function cfe(){if(rF)return wE;rF=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return wE=n,wE}var ME,iF;function dfe(){return iF||(iF=1,ME=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),ME}var SE,oF;function hfe(){if(oF)return SE;oF=1;var n=typeof Symbol<"u"&&Symbol,e=dfe();return SE=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},SE}var EE,sF;function WW(){return sF||(sF=1,EE=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),EE}var BE,aF;function GW(){if(aF)return BE;aF=1;var n=jW();return BE=n.getPrototypeOf||null,BE}var OE,lF;function ffe(){if(lF)return OE;lF=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,r="[object Function]",i=function(d,g){for(var b=[],E=0;E<d.length;E+=1)b[E]=d[E];for(var S=0;S<g.length;S+=1)b[S+d.length]=g[S];return b},s=function(d,g){for(var b=[],E=g,S=0;E<d.length;E+=1,S+=1)b[S]=d[E];return b},a=function(o,d){for(var g="",b=0;b<o.length;b+=1)g+=o[b],b+1<o.length&&(g+=d);return g};return OE=function(d){var g=this;if(typeof g!="function"||e.apply(g)!==r)throw new TypeError(n+g);for(var b=s(arguments,1),E,S=function(){if(this instanceof E){var q=g.apply(this,i(b,arguments));return Object(q)===q?q:this}return g.apply(d,i(b,arguments))},O=t(0,g.length-b.length),k=[],U=0;U<O;U++)k[U]="$"+U;if(E=Function("binder","return function ("+a(k,",")+"){ return binder.apply(this,arguments); }")(S),g.prototype){var z=function(){};z.prototype=g.prototype,E.prototype=new z,z.prototype=null}return E},OE}var IE,uF;function A3(){if(uF)return IE;uF=1;var n=ffe();return IE=Function.prototype.bind||n,IE}var kE,AF;function $8(){return AF||(AF=1,kE=Function.prototype.call),kE}var TE,cF;function QW(){return cF||(cF=1,TE=Function.prototype.apply),TE}var PE,dF;function pfe(){return dF||(dF=1,PE=typeof Reflect<"u"&&Reflect&&Reflect.apply),PE}var RE,hF;function mfe(){if(hF)return RE;hF=1;var n=A3(),e=QW(),t=$8(),r=pfe();return RE=r||n.call(t,e),RE}var DE,fF;function qW(){if(fF)return DE;fF=1;var n=A3(),e=Ny(),t=$8(),r=mfe();return DE=function(s){if(s.length<1||typeof s[0]!="function")throw new e("a function is required");return r(n,t,s)},DE}var KE,pF;function gfe(){if(pF)return KE;pF=1;var n=qW(),e=NW(),t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,s=i.getPrototypeOf;return KE=r&&typeof r.get=="function"?n([r.get]):typeof s=="function"?function(o){return s(o==null?o:i(o))}:!1,KE}var FE,mF;function yfe(){if(mF)return FE;mF=1;var n=WW(),e=GW(),t=gfe();return FE=n?function(i){return n(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,FE}var LE,gF;function vfe(){if(gF)return LE;gF=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=A3();return LE=t.call(n,e),LE}var UE,yF;function V8(){if(yF)return UE;yF=1;var n,e=jW(),t=Hhe(),r=Zhe(),i=Xhe(),s=Jhe(),a=efe(),o=Ny(),d=tfe(),g=nfe(),b=rfe(),E=ife(),S=ofe(),O=sfe(),k=afe(),U=ufe(),z=Function,q=function(Pe){try{return z('"use strict"; return ('+Pe+").constructor;")()}catch{}},Q=NW(),re=cfe(),X=function(){throw new o},Y=Q?function(){try{return arguments.callee,X}catch{try{return Q(arguments,"callee").get}catch{return X}}}():X,ee=hfe()(),N=yfe(),ie=GW(),he=WW(),de=QW(),Me=$8(),fe={},xe=typeof Uint8Array>"u"||!N?n:N(Uint8Array),De={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":ee&&N?N([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":fe,"%AsyncGenerator%":fe,"%AsyncGeneratorFunction%":fe,"%AsyncIteratorPrototype%":fe,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":z,"%GeneratorFunction%":fe,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ee&&N?N(N([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ee||!N?n:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":Q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ee||!N?n:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ee&&N?N(""[Symbol.iterator]()):n,"%Symbol%":ee?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":Y,"%TypedArray%":xe,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":Me,"%Function.prototype.apply%":de,"%Object.defineProperty%":re,"%Object.getPrototypeOf%":ie,"%Math.abs%":g,"%Math.floor%":b,"%Math.max%":E,"%Math.min%":S,"%Math.pow%":O,"%Math.round%":k,"%Math.sign%":U,"%Reflect.getPrototypeOf%":he};if(N)try{null.error}catch(Pe){var me=N(N(Pe));De["%Error.prototype%"]=me}var at=function Pe(Ee){var nt;if(Ee==="%AsyncFunction%")nt=q("async function () {}");else if(Ee==="%GeneratorFunction%")nt=q("function* () {}");else if(Ee==="%AsyncGeneratorFunction%")nt=q("async function* () {}");else if(Ee==="%AsyncGenerator%"){var _t=Pe("%AsyncGeneratorFunction%");_t&&(nt=_t.prototype)}else if(Ee==="%AsyncIteratorPrototype%"){var ht=Pe("%AsyncGenerator%");ht&&N&&(nt=N(ht.prototype))}return De[Ee]=nt,nt},Qe={__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"]},He=A3(),We=vfe(),Ce=He.call(Me,Array.prototype.concat),Te=He.call(de,Array.prototype.splice),rt=He.call(Me,String.prototype.replace),yt=He.call(Me,String.prototype.slice),bt=He.call(Me,RegExp.prototype.exec),gt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dt=/\\(\\)?/g,Pt=function(Ee){var nt=yt(Ee,0,1),_t=yt(Ee,-1);if(nt==="%"&&_t!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(_t==="%"&&nt!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ht=[];return rt(Ee,gt,function(Ut,en,Ft,mn){ht[ht.length]=Ft?rt(mn,Dt,"$1"):en||Ut}),ht},Le=function(Ee,nt){var _t=Ee,ht;if(We(Qe,_t)&&(ht=Qe[_t],_t="%"+ht[0]+"%"),We(De,_t)){var Ut=De[_t];if(Ut===fe&&(Ut=at(_t)),typeof Ut>"u"&&!nt)throw new o("intrinsic "+Ee+" exists, but is not available. Please file an issue!");return{alias:ht,name:_t,value:Ut}}throw new a("intrinsic "+Ee+" does not exist!")};return UE=function(Ee,nt){if(typeof Ee!="string"||Ee.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof nt!="boolean")throw new o('"allowMissing" argument must be a boolean');if(bt(/^%?[^%]*%?$/,Ee)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var _t=Pt(Ee),ht=_t.length>0?_t[0]:"",Ut=Le("%"+ht+"%",nt),en=Ut.name,Ft=Ut.value,mn=!1,jn=Ut.alias;jn&&(ht=jn[0],Te(_t,Ce([0,1],jn)));for(var nn=1,ir=!0;nn<_t.length;nn+=1){var Dn=_t[nn],fn=yt(Dn,0,1),Hn=yt(Dn,-1);if((fn==='"'||fn==="'"||fn==="`"||Hn==='"'||Hn==="'"||Hn==="`")&&fn!==Hn)throw new a("property names with quotes must have matching quotes");if((Dn==="constructor"||!ir)&&(mn=!0),ht+="."+Dn,en="%"+ht+"%",We(De,en))Ft=De[en];else if(Ft!=null){if(!(Dn in Ft)){if(!nt)throw new o("base intrinsic for "+Ee+" exists, but the property is not available.");return}if(Q&&nn+1>=_t.length){var wr=Q(Ft,Dn);ir=!!wr,ir&&"get"in wr&&!("originalValue"in wr.get)?Ft=wr.get:Ft=Ft[Dn]}else ir=We(Ft,Dn),Ft=Ft[Dn];ir&&!mn&&(De[en]=Ft)}}return Ft},UE}var zE,vF;function YW(){if(vF)return zE;vF=1;var n=V8(),e=qW(),t=e([n("%String.prototype.indexOf%")]);return zE=function(i,s){var a=n(i,!!s);return typeof a=="function"&&t(i,".prototype.")>-1?e([a]):a},zE}var jE,CF;function $W(){if(CF)return jE;CF=1;var n=V8(),e=YW(),t=u3(),r=Ny(),i=n("%Map%",!0),s=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),d=e("Map.prototype.delete",!0),g=e("Map.prototype.size",!0);return jE=!!i&&function(){var E,S={assert:function(O){if(!S.has(O))throw new r("Side channel does not contain "+t(O))},delete:function(O){if(E){var k=d(E,O);return g(E)===0&&(E=void 0),k}return!1},get:function(O){if(E)return s(E,O)},has:function(O){return E?o(E,O):!1},set:function(O,k){E||(E=new i),a(E,O,k)}};return S},jE}var NE,_F;function Cfe(){if(_F)return NE;_F=1;var n=V8(),e=YW(),t=u3(),r=$W(),i=Ny(),s=n("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),d=e("WeakMap.prototype.has",!0),g=e("WeakMap.prototype.delete",!0);return NE=s?function(){var E,S,O={assert:function(k){if(!O.has(k))throw new i("Side channel does not contain "+t(k))},delete:function(k){if(s&&k&&(typeof k=="object"||typeof k=="function")){if(E)return g(E,k)}else if(r&&S)return S.delete(k);return!1},get:function(k){return s&&k&&(typeof k=="object"||typeof k=="function")&&E?a(E,k):S&&S.get(k)},has:function(k){return s&&k&&(typeof k=="object"||typeof k=="function")&&E?d(E,k):!!S&&S.has(k)},set:function(k,U){s&&k&&(typeof k=="object"||typeof k=="function")?(E||(E=new s),o(E,k,U)):r&&(S||(S=r()),S.set(k,U))}};return O}:r,NE}var WE,bF;function _fe(){if(bF)return WE;bF=1;var n=Ny(),e=u3(),t=Vhe(),r=$W(),i=Cfe(),s=i||r||t;return WE=function(){var o,d={assert:function(g){if(!d.has(g))throw new n("Side channel does not contain "+e(g))},delete:function(g){return!!o&&o.delete(g)},get:function(g){return o&&o.get(g)},has:function(g){return!!o&&o.has(g)},set:function(g,b){o||(o=s()),o.set(g,b)}};return d},WE}var GE,xF;function H8(){if(xF)return GE;xF=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return GE={default:t.RFC3986,formatters:{RFC1738:function(r){return n.call(r,e,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},GE}var QE,wF;function VW(){if(wF)return QE;wF=1;var n=H8(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r=function(){for(var z=[],q=0;q<256;++q)z.push("%"+((q<16?"0":"")+q.toString(16)).toUpperCase());return z}(),i=function(q){for(;q.length>1;){var Q=q.pop(),re=Q.obj[Q.prop];if(t(re)){for(var X=[],Y=0;Y<re.length;++Y)typeof re[Y]<"u"&&X.push(re[Y]);Q.obj[Q.prop]=X}}},s=function(q,Q){for(var re=Q&&Q.plainObjects?{__proto__:null}:{},X=0;X<q.length;++X)typeof q[X]<"u"&&(re[X]=q[X]);return re},a=function z(q,Q,re){if(!Q)return q;if(typeof Q!="object"&&typeof Q!="function"){if(t(q))q.push(Q);else if(q&&typeof q=="object")(re&&(re.plainObjects||re.allowPrototypes)||!e.call(Object.prototype,Q))&&(q[Q]=!0);else return[q,Q];return q}if(!q||typeof q!="object")return[q].concat(Q);var X=q;return t(q)&&!t(Q)&&(X=s(q,re)),t(q)&&t(Q)?(Q.forEach(function(Y,ee){if(e.call(q,ee)){var N=q[ee];N&&typeof N=="object"&&Y&&typeof Y=="object"?q[ee]=z(N,Y,re):q.push(Y)}else q[ee]=Y}),q):Object.keys(Q).reduce(function(Y,ee){var N=Q[ee];return e.call(Y,ee)?Y[ee]=z(Y[ee],N,re):Y[ee]=N,Y},X)},o=function(q,Q){return Object.keys(Q).reduce(function(re,X){return re[X]=Q[X],re},q)},d=function(z,q,Q){var re=z.replace(/\+/g," ");if(Q==="iso-8859-1")return re.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(re)}catch{return re}},g=1024,b=function(q,Q,re,X,Y){if(q.length===0)return q;var ee=q;if(typeof q=="symbol"?ee=Symbol.prototype.toString.call(q):typeof q!="string"&&(ee=String(q)),re==="iso-8859-1")return escape(ee).replace(/%u[0-9a-f]{4}/gi,function(xe){return"%26%23"+parseInt(xe.slice(2),16)+"%3B"});for(var N="",ie=0;ie<ee.length;ie+=g){for(var he=ee.length>=g?ee.slice(ie,ie+g):ee,de=[],Me=0;Me<he.length;++Me){var fe=he.charCodeAt(Me);if(fe===45||fe===46||fe===95||fe===126||fe>=48&&fe<=57||fe>=65&&fe<=90||fe>=97&&fe<=122||Y===n.RFC1738&&(fe===40||fe===41)){de[de.length]=he.charAt(Me);continue}if(fe<128){de[de.length]=r[fe];continue}if(fe<2048){de[de.length]=r[192|fe>>6]+r[128|fe&63];continue}if(fe<55296||fe>=57344){de[de.length]=r[224|fe>>12]+r[128|fe>>6&63]+r[128|fe&63];continue}Me+=1,fe=65536+((fe&1023)<<10|he.charCodeAt(Me)&1023),de[de.length]=r[240|fe>>18]+r[128|fe>>12&63]+r[128|fe>>6&63]+r[128|fe&63]}N+=de.join("")}return N},E=function(q){for(var Q=[{obj:{o:q},prop:"o"}],re=[],X=0;X<Q.length;++X)for(var Y=Q[X],ee=Y.obj[Y.prop],N=Object.keys(ee),ie=0;ie<N.length;++ie){var he=N[ie],de=ee[he];typeof de=="object"&&de!==null&&re.indexOf(de)===-1&&(Q.push({obj:ee,prop:he}),re.push(de))}return i(Q),q},S=function(q){return Object.prototype.toString.call(q)==="[object RegExp]"},O=function(q){return!q||typeof q!="object"?!1:!!(q.constructor&&q.constructor.isBuffer&&q.constructor.isBuffer(q))},k=function(q,Q){return[].concat(q,Q)},U=function(q,Q){if(t(q)){for(var re=[],X=0;X<q.length;X+=1)re.push(Q(q[X]));return re}return Q(q)};return QE={arrayToObject:s,assign:o,combine:k,compact:E,decode:d,encode:b,isBuffer:O,isRegExp:S,maybeMap:U,merge:a},QE}var qE,MF;function bfe(){if(MF)return qE;MF=1;var n=_fe(),e=VW(),t=H8(),r=Object.prototype.hasOwnProperty,i={brackets:function(z){return z+"[]"},comma:"comma",indices:function(z,q){return z+"["+q+"]"},repeat:function(z){return z}},s=Array.isArray,a=Array.prototype.push,o=function(U,z){a.apply(U,s(z)?z:[z])},d=Date.prototype.toISOString,g=t.default,b={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:g,formatter:t.formatters[g],indices:!1,serializeDate:function(z){return d.call(z)},skipNulls:!1,strictNullHandling:!1},E=function(z){return typeof z=="string"||typeof z=="number"||typeof z=="boolean"||typeof z=="symbol"||typeof z=="bigint"},S={},O=function U(z,q,Q,re,X,Y,ee,N,ie,he,de,Me,fe,xe,De,me,at,Qe){for(var He=z,We=Qe,Ce=0,Te=!1;(We=We.get(S))!==void 0&&!Te;){var rt=We.get(z);if(Ce+=1,typeof rt<"u"){if(rt===Ce)throw new RangeError("Cyclic object value");Te=!0}typeof We.get(S)>"u"&&(Ce=0)}if(typeof he=="function"?He=he(q,He):He instanceof Date?He=fe(He):Q==="comma"&&s(He)&&(He=e.maybeMap(He,function(en){return en instanceof Date?fe(en):en})),He===null){if(Y)return ie&&!me?ie(q,b.encoder,at,"key",xe):q;He=""}if(E(He)||e.isBuffer(He)){if(ie){var yt=me?q:ie(q,b.encoder,at,"key",xe);return[De(yt)+"="+De(ie(He,b.encoder,at,"value",xe))]}return[De(q)+"="+De(String(He))]}var bt=[];if(typeof He>"u")return bt;var gt;if(Q==="comma"&&s(He))me&&ie&&(He=e.maybeMap(He,ie)),gt=[{value:He.length>0?He.join(",")||null:void 0}];else if(s(he))gt=he;else{var Dt=Object.keys(He);gt=de?Dt.sort(de):Dt}var Pt=N?String(q).replace(/\./g,"%2E"):String(q),Le=re&&s(He)&&He.length===1?Pt+"[]":Pt;if(X&&s(He)&&He.length===0)return Le+"[]";for(var Pe=0;Pe<gt.length;++Pe){var Ee=gt[Pe],nt=typeof Ee=="object"&&Ee&&typeof Ee.value<"u"?Ee.value:He[Ee];if(!(ee&&nt===null)){var _t=Me&&N?String(Ee).replace(/\./g,"%2E"):String(Ee),ht=s(He)?typeof Q=="function"?Q(Le,_t):Le:Le+(Me?"."+_t:"["+_t+"]");Qe.set(z,Ce);var Ut=n();Ut.set(S,Qe),o(bt,U(nt,ht,Q,re,X,Y,ee,N,Q==="comma"&&me&&s(He)?null:ie,he,de,Me,fe,xe,De,me,at,Ut))}}return bt},k=function(z){if(!z)return b;if(typeof z.allowEmptyArrays<"u"&&typeof z.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof z.encodeDotInKeys<"u"&&typeof z.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(z.encoder!==null&&typeof z.encoder<"u"&&typeof z.encoder!="function")throw new TypeError("Encoder has to be a function.");var q=z.charset||b.charset;if(typeof z.charset<"u"&&z.charset!=="utf-8"&&z.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var Q=t.default;if(typeof z.format<"u"){if(!r.call(t.formatters,z.format))throw new TypeError("Unknown format option provided.");Q=z.format}var re=t.formatters[Q],X=b.filter;(typeof z.filter=="function"||s(z.filter))&&(X=z.filter);var Y;if(z.arrayFormat in i?Y=z.arrayFormat:"indices"in z?Y=z.indices?"indices":"repeat":Y=b.arrayFormat,"commaRoundTrip"in z&&typeof z.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var ee=typeof z.allowDots>"u"?z.encodeDotInKeys===!0?!0:b.allowDots:!!z.allowDots;return{addQueryPrefix:typeof z.addQueryPrefix=="boolean"?z.addQueryPrefix:b.addQueryPrefix,allowDots:ee,allowEmptyArrays:typeof z.allowEmptyArrays=="boolean"?!!z.allowEmptyArrays:b.allowEmptyArrays,arrayFormat:Y,charset:q,charsetSentinel:typeof z.charsetSentinel=="boolean"?z.charsetSentinel:b.charsetSentinel,commaRoundTrip:!!z.commaRoundTrip,delimiter:typeof z.delimiter>"u"?b.delimiter:z.delimiter,encode:typeof z.encode=="boolean"?z.encode:b.encode,encodeDotInKeys:typeof z.encodeDotInKeys=="boolean"?z.encodeDotInKeys:b.encodeDotInKeys,encoder:typeof z.encoder=="function"?z.encoder:b.encoder,encodeValuesOnly:typeof z.encodeValuesOnly=="boolean"?z.encodeValuesOnly:b.encodeValuesOnly,filter:X,format:Q,formatter:re,serializeDate:typeof z.serializeDate=="function"?z.serializeDate:b.serializeDate,skipNulls:typeof z.skipNulls=="boolean"?z.skipNulls:b.skipNulls,sort:typeof z.sort=="function"?z.sort:null,strictNullHandling:typeof z.strictNullHandling=="boolean"?z.strictNullHandling:b.strictNullHandling}};return qE=function(U,z){var q=U,Q=k(z),re,X;typeof Q.filter=="function"?(X=Q.filter,q=X("",q)):s(Q.filter)&&(X=Q.filter,re=X);var Y=[];if(typeof q!="object"||q===null)return"";var ee=i[Q.arrayFormat],N=ee==="comma"&&Q.commaRoundTrip;re||(re=Object.keys(q)),Q.sort&&re.sort(Q.sort);for(var ie=n(),he=0;he<re.length;++he){var de=re[he],Me=q[de];Q.skipNulls&&Me===null||o(Y,O(Me,de,ee,N,Q.allowEmptyArrays,Q.strictNullHandling,Q.skipNulls,Q.encodeDotInKeys,Q.encode?Q.encoder:null,Q.filter,Q.sort,Q.allowDots,Q.serializeDate,Q.format,Q.formatter,Q.encodeValuesOnly,Q.charset,ie))}var fe=Y.join(Q.delimiter),xe=Q.addQueryPrefix===!0?"?":"";return Q.charsetSentinel&&(Q.charset==="iso-8859-1"?xe+="utf8=%26%2310003%3B&":xe+="utf8=%E2%9C%93&"),fe.length>0?xe+fe:""},qE}var YE,SF;function xfe(){if(SF)return YE;SF=1;var n=VW(),e=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.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(O,k){return String.fromCharCode(parseInt(k,10))})},s=function(S,O){return S&&typeof S=="string"&&O.comma&&S.indexOf(",")>-1?S.split(","):S},a="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",d=function(O,k){var U={__proto__:null},z=k.ignoreQueryPrefix?O.replace(/^\?/,""):O;z=z.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var q=k.parameterLimit===1/0?void 0:k.parameterLimit,Q=z.split(k.delimiter,q),re=-1,X,Y=k.charset;if(k.charsetSentinel)for(X=0;X<Q.length;++X)Q[X].indexOf("utf8=")===0&&(Q[X]===o?Y="utf-8":Q[X]===a&&(Y="iso-8859-1"),re=X,X=Q.length);for(X=0;X<Q.length;++X)if(X!==re){var ee=Q[X],N=ee.indexOf("]="),ie=N===-1?ee.indexOf("="):N+1,he,de;ie===-1?(he=k.decoder(ee,r.decoder,Y,"key"),de=k.strictNullHandling?null:""):(he=k.decoder(ee.slice(0,ie),r.decoder,Y,"key"),de=n.maybeMap(s(ee.slice(ie+1),k),function(fe){return k.decoder(fe,r.decoder,Y,"value")})),de&&k.interpretNumericEntities&&Y==="iso-8859-1"&&(de=i(String(de))),ee.indexOf("[]=")>-1&&(de=t(de)?[de]:de);var Me=e.call(U,he);Me&&k.duplicates==="combine"?U[he]=n.combine(U[he],de):(!Me||k.duplicates==="last")&&(U[he]=de)}return U},g=function(S,O,k,U){for(var z=U?O:s(O,k),q=S.length-1;q>=0;--q){var Q,re=S[q];if(re==="[]"&&k.parseArrays)Q=k.allowEmptyArrays&&(z===""||k.strictNullHandling&&z===null)?[]:[].concat(z);else{Q=k.plainObjects?{__proto__:null}:{};var X=re.charAt(0)==="["&&re.charAt(re.length-1)==="]"?re.slice(1,-1):re,Y=k.decodeDotInKeys?X.replace(/%2E/g,"."):X,ee=parseInt(Y,10);!k.parseArrays&&Y===""?Q={0:z}:!isNaN(ee)&&re!==Y&&String(ee)===Y&&ee>=0&&k.parseArrays&&ee<=k.arrayLimit?(Q=[],Q[ee]=z):Y!=="__proto__"&&(Q[Y]=z)}z=Q}return z},b=function(O,k,U,z){if(O){var q=U.allowDots?O.replace(/\.([^.[]+)/g,"[$1]"):O,Q=/(\[[^[\]]*])/,re=/(\[[^[\]]*])/g,X=U.depth>0&&Q.exec(q),Y=X?q.slice(0,X.index):q,ee=[];if(Y){if(!U.plainObjects&&e.call(Object.prototype,Y)&&!U.allowPrototypes)return;ee.push(Y)}for(var N=0;U.depth>0&&(X=re.exec(q))!==null&&N<U.depth;){if(N+=1,!U.plainObjects&&e.call(Object.prototype,X[1].slice(1,-1))&&!U.allowPrototypes)return;ee.push(X[1])}if(X){if(U.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+U.depth+" and strictDepth is true");ee.push("["+q.slice(X.index)+"]")}return g(ee,k,U,z)}},E=function(O){if(!O)return r;if(typeof O.allowEmptyArrays<"u"&&typeof O.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof O.decodeDotInKeys<"u"&&typeof O.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(O.decoder!==null&&typeof O.decoder<"u"&&typeof O.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof O.charset<"u"&&O.charset!=="utf-8"&&O.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var k=typeof O.charset>"u"?r.charset:O.charset,U=typeof O.duplicates>"u"?r.duplicates:O.duplicates;if(U!=="combine"&&U!=="first"&&U!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var z=typeof O.allowDots>"u"?O.decodeDotInKeys===!0?!0:r.allowDots:!!O.allowDots;return{allowDots:z,allowEmptyArrays:typeof O.allowEmptyArrays=="boolean"?!!O.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof O.allowPrototypes=="boolean"?O.allowPrototypes:r.allowPrototypes,allowSparse:typeof O.allowSparse=="boolean"?O.allowSparse:r.allowSparse,arrayLimit:typeof O.arrayLimit=="number"?O.arrayLimit:r.arrayLimit,charset:k,charsetSentinel:typeof O.charsetSentinel=="boolean"?O.charsetSentinel:r.charsetSentinel,comma:typeof O.comma=="boolean"?O.comma:r.comma,decodeDotInKeys:typeof O.decodeDotInKeys=="boolean"?O.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof O.decoder=="function"?O.decoder:r.decoder,delimiter:typeof O.delimiter=="string"||n.isRegExp(O.delimiter)?O.delimiter:r.delimiter,depth:typeof O.depth=="number"||O.depth===!1?+O.depth:r.depth,duplicates:U,ignoreQueryPrefix:O.ignoreQueryPrefix===!0,interpretNumericEntities:typeof O.interpretNumericEntities=="boolean"?O.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof O.parameterLimit=="number"?O.parameterLimit:r.parameterLimit,parseArrays:O.parseArrays!==!1,plainObjects:typeof O.plainObjects=="boolean"?O.plainObjects:r.plainObjects,strictDepth:typeof O.strictDepth=="boolean"?!!O.strictDepth:r.strictDepth,strictNullHandling:typeof O.strictNullHandling=="boolean"?O.strictNullHandling:r.strictNullHandling}};return YE=function(S,O){var k=E(O);if(S===""||S===null||typeof S>"u")return k.plainObjects?{__proto__:null}:{};for(var U=typeof S=="string"?d(S,k):S,z=k.plainObjects?{__proto__:null}:{},q=Object.keys(U),Q=0;Q<q.length;++Q){var re=q[Q],X=b(re,U[re],k,typeof S=="string");z=n.merge(z,X,k)}return k.allowSparse===!0?z:n.compact(z)},YE}var $E,EF;function wfe(){if(EF)return $E;EF=1;var n=bfe(),e=xfe(),t=H8();return $E={formats:t,parse:e,stringify:n},$E}var BF;function Mfe(){if(BF)return sg;BF=1;var n=Qhe();function e(){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 t=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,s=["<",">",'"',"`"," ","\r",`
|
||
`," "],a=["{","}","|","\\","^","`"].concat(s),o=["'"].concat(a),d=["%","/","?",";","#"].concat(o),g=["/","?","#"],b=255,E=/^[+a-z0-9A-Z_-]{0,63}$/,S=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,O={javascript:!0,"javascript:":!0},k={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},z=wfe();function q(Y,ee,N){if(Y&&typeof Y=="object"&&Y instanceof e)return Y;var ie=new e;return ie.parse(Y,ee,N),ie}e.prototype.parse=function(Y,ee,N){if(typeof Y!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof Y);var ie=Y.indexOf("?"),he=ie!==-1&&ie<Y.indexOf("#")?"?":"#",de=Y.split(he),Me=/\\/g;de[0]=de[0].replace(Me,"/"),Y=de.join(he);var fe=Y;if(fe=fe.trim(),!N&&Y.split("#").length===1){var xe=i.exec(fe);if(xe)return this.path=fe,this.href=fe,this.pathname=xe[1],xe[2]?(this.search=xe[2],ee?this.query=z.parse(this.search.substr(1)):this.query=this.search.substr(1)):ee&&(this.search="",this.query={}),this}var De=t.exec(fe);if(De){De=De[0];var me=De.toLowerCase();this.protocol=me,fe=fe.substr(De.length)}if(N||De||fe.match(/^\/\/[^@/]+@[^@/]+/)){var at=fe.substr(0,2)==="//";at&&!(De&&k[De])&&(fe=fe.substr(2),this.slashes=!0)}if(!k[De]&&(at||De&&!U[De])){for(var Qe=-1,He=0;He<g.length;He++){var We=fe.indexOf(g[He]);We!==-1&&(Qe===-1||We<Qe)&&(Qe=We)}var Ce,Te;Qe===-1?Te=fe.lastIndexOf("@"):Te=fe.lastIndexOf("@",Qe),Te!==-1&&(Ce=fe.slice(0,Te),fe=fe.slice(Te+1),this.auth=decodeURIComponent(Ce)),Qe=-1;for(var He=0;He<d.length;He++){var We=fe.indexOf(d[He]);We!==-1&&(Qe===-1||We<Qe)&&(Qe=We)}Qe===-1&&(Qe=fe.length),this.host=fe.slice(0,Qe),fe=fe.slice(Qe),this.parseHost(),this.hostname=this.hostname||"";var rt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!rt)for(var yt=this.hostname.split(/\./),He=0,bt=yt.length;He<bt;He++){var gt=yt[He];if(gt&&!gt.match(E)){for(var Dt="",Pt=0,Le=gt.length;Pt<Le;Pt++)gt.charCodeAt(Pt)>127?Dt+="x":Dt+=gt[Pt];if(!Dt.match(E)){var Pe=yt.slice(0,He),Ee=yt.slice(He+1),nt=gt.match(S);nt&&(Pe.push(nt[1]),Ee.unshift(nt[2])),Ee.length&&(fe="/"+Ee.join(".")+fe),this.hostname=Pe.join(".");break}}}this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),rt||(this.hostname=n.toASCII(this.hostname));var _t=this.port?":"+this.port:"",ht=this.hostname||"";this.host=ht+_t,this.href+=this.host,rt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),fe[0]!=="/"&&(fe="/"+fe))}if(!O[me])for(var He=0,bt=o.length;He<bt;He++){var Ut=o[He];if(fe.indexOf(Ut)!==-1){var en=encodeURIComponent(Ut);en===Ut&&(en=escape(Ut)),fe=fe.split(Ut).join(en)}}var Ft=fe.indexOf("#");Ft!==-1&&(this.hash=fe.substr(Ft),fe=fe.slice(0,Ft));var mn=fe.indexOf("?");if(mn!==-1?(this.search=fe.substr(mn),this.query=fe.substr(mn+1),ee&&(this.query=z.parse(this.query)),fe=fe.slice(0,mn)):ee&&(this.search="",this.query={}),fe&&(this.pathname=fe),U[me]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _t=this.pathname||"",jn=this.search||"";this.path=_t+jn}return this.href=this.format(),this};function Q(Y){return typeof Y=="string"&&(Y=q(Y)),Y instanceof e?Y.format():e.prototype.format.call(Y)}e.prototype.format=function(){var Y=this.auth||"";Y&&(Y=encodeURIComponent(Y),Y=Y.replace(/%3A/i,":"),Y+="@");var ee=this.protocol||"",N=this.pathname||"",ie=this.hash||"",he=!1,de="";this.host?he=Y+this.host:this.hostname&&(he=Y+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(he+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(de=z.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var Me=this.search||de&&"?"+de||"";return ee&&ee.substr(-1)!==":"&&(ee+=":"),this.slashes||(!ee||U[ee])&&he!==!1?(he="//"+(he||""),N&&N.charAt(0)!=="/"&&(N="/"+N)):he||(he=""),ie&&ie.charAt(0)!=="#"&&(ie="#"+ie),Me&&Me.charAt(0)!=="?"&&(Me="?"+Me),N=N.replace(/[?#]/g,function(fe){return encodeURIComponent(fe)}),Me=Me.replace("#","%23"),ee+he+N+Me+ie};function re(Y,ee){return q(Y,!1,!0).resolve(ee)}e.prototype.resolve=function(Y){return this.resolveObject(q(Y,!1,!0)).format()};function X(Y,ee){return Y?q(Y,!1,!0).resolveObject(ee):ee}return e.prototype.resolveObject=function(Y){if(typeof Y=="string"){var ee=new e;ee.parse(Y,!1,!0),Y=ee}for(var N=new e,ie=Object.keys(this),he=0;he<ie.length;he++){var de=ie[he];N[de]=this[de]}if(N.hash=Y.hash,Y.href==="")return N.href=N.format(),N;if(Y.slashes&&!Y.protocol){for(var Me=Object.keys(Y),fe=0;fe<Me.length;fe++){var xe=Me[fe];xe!=="protocol"&&(N[xe]=Y[xe])}return U[N.protocol]&&N.hostname&&!N.pathname&&(N.pathname="/",N.path=N.pathname),N.href=N.format(),N}if(Y.protocol&&Y.protocol!==N.protocol){if(!U[Y.protocol]){for(var De=Object.keys(Y),me=0;me<De.length;me++){var at=De[me];N[at]=Y[at]}return N.href=N.format(),N}if(N.protocol=Y.protocol,!Y.host&&!k[Y.protocol]){for(var bt=(Y.pathname||"").split("/");bt.length&&!(Y.host=bt.shift()););Y.host||(Y.host=""),Y.hostname||(Y.hostname=""),bt[0]!==""&&bt.unshift(""),bt.length<2&&bt.unshift(""),N.pathname=bt.join("/")}else N.pathname=Y.pathname;if(N.search=Y.search,N.query=Y.query,N.host=Y.host||"",N.auth=Y.auth,N.hostname=Y.hostname||Y.host,N.port=Y.port,N.pathname||N.search){var Qe=N.pathname||"",He=N.search||"";N.path=Qe+He}return N.slashes=N.slashes||Y.slashes,N.href=N.format(),N}var We=N.pathname&&N.pathname.charAt(0)==="/",Ce=Y.host||Y.pathname&&Y.pathname.charAt(0)==="/",Te=Ce||We||N.host&&Y.pathname,rt=Te,yt=N.pathname&&N.pathname.split("/")||[],bt=Y.pathname&&Y.pathname.split("/")||[],gt=N.protocol&&!U[N.protocol];if(gt&&(N.hostname="",N.port=null,N.host&&(yt[0]===""?yt[0]=N.host:yt.unshift(N.host)),N.host="",Y.protocol&&(Y.hostname=null,Y.port=null,Y.host&&(bt[0]===""?bt[0]=Y.host:bt.unshift(Y.host)),Y.host=null),Te=Te&&(bt[0]===""||yt[0]==="")),Ce)N.host=Y.host||Y.host===""?Y.host:N.host,N.hostname=Y.hostname||Y.hostname===""?Y.hostname:N.hostname,N.search=Y.search,N.query=Y.query,yt=bt;else if(bt.length)yt||(yt=[]),yt.pop(),yt=yt.concat(bt),N.search=Y.search,N.query=Y.query;else if(Y.search!=null){if(gt){N.host=yt.shift(),N.hostname=N.host;var Dt=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;Dt&&(N.auth=Dt.shift(),N.hostname=Dt.shift(),N.host=N.hostname)}return N.search=Y.search,N.query=Y.query,(N.pathname!==null||N.search!==null)&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.href=N.format(),N}if(!yt.length)return N.pathname=null,N.search?N.path="/"+N.search:N.path=null,N.href=N.format(),N;for(var Pt=yt.slice(-1)[0],Le=(N.host||Y.host||yt.length>1)&&(Pt==="."||Pt==="..")||Pt==="",Pe=0,Ee=yt.length;Ee>=0;Ee--)Pt=yt[Ee],Pt==="."?yt.splice(Ee,1):Pt===".."?(yt.splice(Ee,1),Pe++):Pe&&(yt.splice(Ee,1),Pe--);if(!Te&&!rt)for(;Pe--;Pe)yt.unshift("..");Te&&yt[0]!==""&&(!yt[0]||yt[0].charAt(0)!=="/")&&yt.unshift(""),Le&&yt.join("/").substr(-1)!=="/"&&yt.push("");var nt=yt[0]===""||yt[0]&&yt[0].charAt(0)==="/";if(gt){N.hostname=nt?"":yt.length?yt.shift():"",N.host=N.hostname;var Dt=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;Dt&&(N.auth=Dt.shift(),N.hostname=Dt.shift(),N.host=N.hostname)}return Te=Te||N.host&&yt.length,Te&&!nt&&yt.unshift(""),yt.length>0?N.pathname=yt.join("/"):(N.pathname=null,N.path=null),(N.pathname!==null||N.search!==null)&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.auth=Y.auth||N.auth,N.slashes=N.slashes||Y.slashes,N.href=N.format(),N},e.prototype.parseHost=function(){var Y=this.host,ee=r.exec(Y);ee&&(ee=ee[0],ee!==":"&&(this.port=ee.substr(1)),Y=Y.substr(0,Y.length-ee.length)),Y&&(this.hostname=Y)},sg.parse=q,sg.resolve=re,sg.resolveObject=X,sg.format=Q,sg.Url=e,sg}var Sfe=Mfe();const OF=Ha(Sfe);function vs(){var n="/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",e="370277aff056c0894d7ae34686219318414cc635",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/metadata.ts",statementMap:{0:{start:{line:3,column:2},end:{line:16,column:5}},1:{start:{line:7,column:4},end:{line:9,column:5}},2:{start:{line:8,column:6},end:{line:8,column:60}},3:{start:{line:10,column:4},end:{line:10,column:27}},4:{start:{line:12,column:4},end:{line:12,column:13}},5:{start:{line:14,column:4},end:{line:14,column:95}},6:{start:{line:15,column:4},end:{line:15,column:21}},7:{start:{line:19,column:2},end:{line:19,column:34}},8:{start:{line:19,column:20},end:{line:19,column:34}},9:{start:{line:20,column:17},end:{line:20,column:42}},10:{start:{line:21,column:23},end:{line:21,column:57}},11:{start:{line:22,column:2},end:{line:26,column:3}},12:{start:{line:23,column:4},end:{line:23,column:41}},13:{start:{line:25,column:4},end:{line:25,column:69}},14:{start:{line:27,column:14},end:{line:27,column:35}},15:{start:{line:28,column:2},end:{line:28,column:24}},16:{start:{line:31,column:2},end:{line:31,column:30}},17:{start:{line:31,column:16},end:{line:31,column:30}},18:{start:{line:32,column:14},end:{line:32,column:31}},19:{start:{line:33,column:2},end:{line:33,column:57}},20:{start:{line:33,column:32},end:{line:33,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:17,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:6,column:10},end:{line:6,column:11}},loc:{start:{line:6,column:24},end:{line:11,column:3}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:11,column:10},end:{line:11,column:11}},loc:{start:{line:11,column:20},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:13,column:11},end:{line:13,column:12}},loc:{start:{line:13,column:17},end:{line:16,column:3}},line:13},4:{name:"downloadGlyphsMetadata",decl:{start:{line:18,column:16},end:{line:18,column:38}},loc:{start:{line:18,column:56},end:{line:29,column:1}},line:18},5:{name:"downloadSpriteMetadata",decl:{start:{line:30,column:16},end:{line:30,column:38}},loc:{start:{line:30,column:52},end:{line:34,column:1}},line:30},6:{name:"(anonymous_6)",decl:{start:{line:33,column:20},end:{line:33,column:21}},loc:{start:{line:33,column:32},end:{line:33,column:55}},line:33}},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:19,column:2},end:{line:19,column:34}},type:"if",locations:[{start:{line:19,column:2},end:{line:19,column:34}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:19},2:{loc:{start:{line:22,column:2},end:{line:26,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:26,column:3}},{start:{line:24,column:9},end:{line:26,column:3}}],line:22},3:{loc:{start:{line:31,column:2},end:{line:31,column:30}},type:"if",locations:[{start:{line:31,column:2},end:{line:31,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:31}},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},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/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,CAAC,aAAa;AAClB,QAAI,CAAC,SAAS,IAAI;AAChB,YAAM,IAAI,MAAM,iCAAiC,GAAG;AAAA,IACtD;AACA,WAAO,SAAS,KAAK;AAAA,EACvB,CAAC,EACA,KAAK,CAAC,SAAS;AACd,OAAG,IAAI;AAAA,EACT,CAAC,EACA,MAAM,MAAM;AACX,YAAQ,KAAK,+BAA+B,MAAM,2BAA2B,YAAY;AACzF,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:"370277aff056c0894d7ae34686219318414cc635"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return vs=function(){return a},a}vs();function HW(n,e,t){vs().f[0]++,vs().s[0]++,fetch(n,{mode:"cors",credentials:"same-origin"}).then(r=>{if(vs().f[1]++,vs().s[1]++,r.ok)vs().b[0][1]++;else throw vs().b[0][0]++,vs().s[2]++,new Error("Failed to load metadata for "+n);return vs().s[3]++,r.json()}).then(r=>{vs().f[2]++,vs().s[4]++,t(r)}).catch(()=>{vs().f[3]++,vs().s[5]++,console.warn("Can not load metadata for "+n+", using default value "+e),vs().s[6]++,t(e)})}function Efe(n,e){if(vs().f[4]++,vs().s[7]++,n)vs().b[1][1]++;else return vs().b[1][0]++,vs().s[8]++,e([]);const t=(vs().s[9]++,OF.parse(n)),r=(vs().s[10]++,"/%7Bfontstack%7D/%7Brange%7D.pbf");vs().s[11]++,t.pathname===r?(vs().b[2][0]++,vs().s[12]++,t.pathname="/fontstacks.json"):(vs().b[2][1]++,vs().s[13]++,t.pathname=t.pathname.replace(r,".json"));const i=(vs().s[14]++,OF.format(t));vs().s[15]++,HW(i,[],e)}function Bfe(n,e){if(vs().f[5]++,vs().s[16]++,n)vs().b[3][1]++;else return vs().b[3][0]++,vs().s[17]++,e([]);const t=(vs().s[18]++,n+".json");vs().s[19]++,HW(t,{},r=>(vs().f[6]++,vs().s[20]++,e(Object.keys(r))))}function jA(){var n="/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",e="16cd8175e865a1f27680600ab24a4fbadf5fb4b2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts",statementMap:{0:{start:{line:3,column:21},end:{line:3,column:50}},1:{start:{line:4,column:2},end:{line:4,column:46}},2:{start:{line:7,column:2},end:{line:7,column:41}},3:{start:{line:8,column:2},end:{line:18,column:5}},4:{start:{line:12,column:4},end:{line:12,column:27}},5:{start:{line:14,column:4},end:{line:14,column:40}},6:{start:{line:16,column:4},end:{line:16,column:60}},7:{start:{line:17,column:4},end:{line:17,column:25}},8:{start:{line:21,column:21},end:{line:21,column:50}},9:{start:{line:22,column:2},end:{line:22,column:42}},10:{start:{line:23,column:2},end:{line:23,column:73}}},fnMap:{0:{name:"initialStyleUrl",decl:{start:{line:2,column:16},end:{line:2,column:31}},loc:{start:{line:2,column:34},end:{line:5,column:1}},line:2},1:{name:"loadStyleUrl",decl:{start:{line:6,column:16},end:{line:6,column:28}},loc:{start:{line:6,column:43},end:{line:19,column:1}},line:6},2:{name:"(anonymous_2)",decl:{start:{line:11,column:10},end:{line:11,column:11}},loc:{start:{line:11,column:29},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:13,column:10},end:{line:13,column:11}},loc:{start:{line:13,column:25},end:{line:15,column:3}},line:13},4:{name:"(anonymous_4)",decl:{start:{line:15,column:11},end:{line:15,column:12}},loc:{start:{line:15,column:22},end:{line:18,column:3}},line:15},5:{name:"removeStyleQuerystring",decl:{start:{line:20,column:16},end:{line:20,column:38}},loc:{start:{line:20,column:41},end:{line:24,column:1}},line:20}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/urlopen.ts"],names:[],mappings:"AAAA,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:"16cd8175e865a1f27680600ab24a4fbadf5fb4b2"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return jA=function(){return a},a}jA();function Ofe(){jA().f[0]++;const n=(jA().s[0]++,new URL(window.location.href));return jA().s[1]++,n.searchParams.get("style")}function ZW(n,e){jA().f[1]++,jA().s[2]++,console.log("Loading style",n),jA().s[3]++,fetch(n,{mode:"cors",credentials:"same-origin"}).then(function(t){return jA().f[2]++,jA().s[4]++,t.json()}).then(function(t){jA().f[3]++,jA().s[5]++,e(cc.ensureStyleValidity(t))}).catch(function(){jA().f[4]++,jA().s[6]++,console.warn("Could not fetch default style",n),jA().s[7]++,e(cc.emptyStyle)})}function IF(){jA().f[5]++;const n=(jA().s[8]++,new URL(window.location.href));jA().s[9]++,n.searchParams.delete("style"),jA().s[10]++,window.history.replaceState({},document.title,n.toString())}function Wd(){var n="/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",e="f92fa2abb31199d99fd3ae02d967dc6702faf862",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts",statementMap:{0:{start:{line:3,column:18},end:{line:3,column:47}},1:{start:{line:4,column:2},end:{line:4,column:70}},2:{start:{line:4,column:30},end:{line:4,column:68}},3:{start:{line:7,column:2},end:{line:7,column:71}},4:{start:{line:7,column:58},end:{line:7,column:69}},5:{start:{line:10,column:2},end:{line:10,column:71}},6:{start:{line:10,column:58},end:{line:10,column:69}}},fnMap:{0:{name:"diffMessages",decl:{start:{line:2,column:9},end:{line:2,column:21}},loc:{start:{line:2,column:47},end:{line:5,column:1}},line:2},1:{name:"(anonymous_1)",decl:{start:{line:4,column:21},end:{line:4,column:22}},loc:{start:{line:4,column:30},end:{line:4,column:68}},line:4},2:{name:"undoMessages",decl:{start:{line:6,column:16},end:{line:6,column:28}},loc:{start:{line:6,column:54},end:{line:8,column:1}},line:6},3:{name:"(anonymous_3)",decl:{start:{line:7,column:51},end:{line:7,column:52}},loc:{start:{line:7,column:58},end:{line:7,column:69}},line:7},4:{name:"redoMessages",decl:{start:{line:9,column:16},end:{line:9,column:28}},loc:{start:{line:9,column:54},end:{line:11,column:1}},line:9},5:{name:"(anonymous_5)",decl:{start:{line:10,column:51},end:{line:10,column:52}},loc:{start:{line:10,column:58},end:{line:10,column:69}},line:10}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/diffmessage.ts"],names:[],mappings:"AAAA,SAAQ,YAAW;AAGnB,SAAS,aAAa,aAAiC,YAAgC;AACrF,QAAM,UAAU,KAAK,aAAa,UAAU;AAC5C,SAAO,QAAQ,IAAI,SAAO,IAAI,UAAU,MAAM,IAAI,KAAK,KAAK,GAAG,CAAC;AAClE;AAEO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;AACO,gBAAS,aAAa,aAAiC,YAAgC;AAC5F,SAAO,aAAa,aAAa,UAAU,EAAE,IAAI,OAAK,UAAU,CAAC;AACnE;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f92fa2abb31199d99fd3ae02d967dc6702faf862"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Wd=function(){return a},a}Wd();function XW(n,e){Wd().f[0]++;const t=(Wd().s[0]++,wY(n,e));return Wd().s[1]++,t.map(r=>(Wd().f[1]++,Wd().s[2]++,r.command+" "+r.args.join(" ")))}function Ife(n,e){return Wd().f[2]++,Wd().s[3]++,XW(n,e).map(t=>(Wd().f[3]++,Wd().s[4]++,"Undo "+t))}function kfe(n,e){return Wd().f[4]++,Wd().s[5]++,XW(n,e).map(t=>(Wd().f[5]++,Wd().s[6]++,"Redo "+t))}function pi(){var n="/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts",e="d0461aebf8a7391762efd074af8c5c2674087e64",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/stylestore.ts",statementMap:{0:{start:{line:4,column:22},end:{line:4,column:32}},1:{start:{line:5,column:20},end:{line:5,column:27}},2:{start:{line:6,column:20},end:{line:9,column:1}},3:{start:{line:10,column:24},end:{line:10,column:44}},4:{start:{line:12,column:2},end:{line:12,column:36}},5:{start:{line:15,column:17},end:{line:15,column:19}},6:{start:{line:16,column:2},end:{line:21,column:3}},7:{start:{line:16,column:15},end:{line:16,column:16}},8:{start:{line:17,column:16},end:{line:17,column:42}},9:{start:{line:18,column:4},end:{line:20,column:5}},10:{start:{line:19,column:6},end:{line:19,column:32}},11:{start:{line:22,column:2},end:{line:22,column:16}},12:{start:{line:25,column:16},end:{line:25,column:30}},13:{start:{line:26,column:2},end:{line:26,column:86}},14:{start:{line:29,column:2},end:{line:31,column:3}},15:{start:{line:30,column:4},end:{line:30,column:41}},16:{start:{line:32,column:16},end:{line:32,column:30}},17:{start:{line:33,column:18},end:{line:33,column:26}},18:{start:{line:34,column:2},end:{line:34,column:17}},19:{start:{line:37,column:2},end:{line:37,column:57}},20:{start:{line:47,column:4},end:{line:47,column:40}},21:{start:{line:50,column:4},end:{line:50,column:13}},22:{start:{line:54,column:4},end:{line:59,column:5}},23:{start:{line:54,column:17},end:{line:54,column:18}},24:{start:{line:55,column:18},end:{line:55,column:44}},25:{start:{line:56,column:6},end:{line:58,column:7}},26:{start:{line:57,column:8},end:{line:57,column:44}},27:{start:{line:63,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return pi=function(){return a},a}pi();const IC=(pi().s[0]++,"maputnik"),JW=(pi().s[1]++,"style"),kF=(pi().s[2]++,{latest:[IC,"latest_style"].join(":"),accessToken:[IC,"access_token"].join(":")}),Tfe=(pi().s[3]++,zW[0].url);function TF(n){pi().f[0]++,pi().s[4]++,ZW(Tfe,n)}function Pfe(){pi().f[1]++;const n=(pi().s[5]++,[]);pi().s[6]++;for(let e=(pi().s[7]++,0);e<window.localStorage.length;e++){const t=(pi().s[8]++,window.localStorage.key(e));pi().s[9]++,eG(t)?(pi().b[0][0]++,pi().s[10]++,n.push(Rfe(t))):pi().b[0][1]++}return pi().s[11]++,n}function eG(n){pi().f[2]++;const e=(pi().s[12]++,n.split(":"));return pi().s[13]++,pi().b[1][0]++,e.length===3&&(pi().b[1][1]++,e[0]===IC)&&(pi().b[1][2]++,e[1]===JW)}function Rfe(n){if(pi().f[3]++,pi().s[14]++,eG(n))pi().b[2][1]++;else throw pi().b[2][0]++,pi().s[15]++,"Key is not a valid style key";const e=(pi().s[16]++,n.split(":")),t=(pi().s[17]++,e[2]);return pi().s[18]++,t}function PF(n){return pi().f[4]++,pi().s[19]++,[IC,JW,n].join(":")}class RF{constructor(){kn(this,"mapStyles");pi().f[5]++,pi().s[20]++,this.mapStyles=Pfe()}init(e){pi().f[6]++,pi().s[21]++,e(null)}purge(){pi().f[7]++,pi().s[22]++;for(let e=(pi().s[23]++,0);e<window.localStorage.length;e++){const t=(pi().s[24]++,window.localStorage.key(e));pi().s[25]++,t.startsWith(IC)?(pi().b[3][0]++,pi().s[26]++,window.localStorage.removeItem(t)):pi().b[3][1]++}}latestStyle(e){if(pi().f[8]++,pi().s[27]++,this.mapStyles.length===0)return pi().b[4][0]++,pi().s[28]++,TF(e);pi().b[4][1]++;const t=(pi().s[29]++,window.localStorage.getItem(kF.latest)),r=(pi().s[30]++,window.localStorage.getItem(PF(t)));if(pi().s[31]++,r)return pi().b[5][0]++,pi().s[32]++,e(JSON.parse(r));pi().b[5][1]++,pi().s[33]++,TF(e)}save(e){pi().f[9]++,pi().s[34]++,e=cc.ensureStyleValidity(e);const t=(pi().s[35]++,PF(e.id));return pi().s[36]++,window.localStorage.setItem(t,JSON.stringify(e)),pi().s[37]++,window.localStorage.setItem(kF.latest,e.id),pi().s[38]++,e}}/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var gB=function(n,e){return gB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},gB(n,e)};function tG(n,e){gB(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Dfe(n){var e=typeof Symbol=="function"&&n[Symbol.iterator],t=0;return e?e.call(n):{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}function Kfe(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(a)throw a.error}}return s}function Ffe(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(Kfe(arguments[e]));return n}var nG=function(){function n(e,t){this.target=t,this.type=e}return n}(),Lfe=function(n){tG(e,n);function e(t,r){var i=n.call(this,"error",r)||this;return i.message=t.message,i.error=t,i}return e}(nG),Ufe=function(n){tG(e,n);function e(t,r,i){t===void 0&&(t=1e3),r===void 0&&(r="");var s=n.call(this,"close",i)||this;return s.wasClean=!0,s.code=t,s.reason=r,s}return e}(nG);/*!
|
||
* Reconnecting WebSocket
|
||
* by Pedro Ladaria <pedro.ladaria@gmail.com>
|
||
* https://github.com/pladaria/reconnecting-websocket
|
||
* License MIT
|
||
*/var zfe=function(){if(typeof WebSocket<"u")return WebSocket},jfe=function(n){return typeof n<"u"&&!!n&&n.CLOSING===2},ag={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},Nfe=function(){function n(e,t,r){var i=this;r===void 0&&(r={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(s){i._debug("open event");var a=i._options.minUptime,o=a===void 0?ag.minUptime:a;clearTimeout(i._connectTimeout),i._uptimeTimeout=setTimeout(function(){return i._acceptOpen()},o),i._ws.binaryType=i._binaryType,i._messageQueue.forEach(function(d){return i._ws.send(d)}),i._messageQueue=[],i.onopen&&i.onopen(s),i._listeners.open.forEach(function(d){return i._callEventListener(s,d)})},this._handleMessage=function(s){i._debug("message event"),i.onmessage&&i.onmessage(s),i._listeners.message.forEach(function(a){return i._callEventListener(s,a)})},this._handleError=function(s){i._debug("error event",s.message),i._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),i.onerror&&i.onerror(s),i._debug("exec error listeners"),i._listeners.error.forEach(function(a){return i._callEventListener(s,a)}),i._connect()},this._handleClose=function(s){i._debug("close event"),i._clearTimeouts(),i._shouldReconnect&&i._connect(),i.onclose&&i.onclose(s),i._listeners.close.forEach(function(a){return i._callEventListener(s,a)})},this._url=e,this._protocols=t,this._options=r,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(n,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(n,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(n,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CONNECTING",{get:function(){return n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"OPEN",{get:function(){return n.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSING",{get:function(){return n.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"CLOSED",{get:function(){return n.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bufferedAmount",{get:function(){var e=this._messageQueue.reduce(function(t,r){return typeof r=="string"?t+=r.length:r instanceof Blob?t+=r.size:t+=r.byteLength,t},0);return e+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?n.CLOSED:n.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),n.prototype.close=function(e,t){if(e===void 0&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(e,t)},n.prototype.reconnect=function(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(e,t),this._connect())},n.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var t=this._options.maxEnqueuedMessages,r=t===void 0?ag.maxEnqueuedMessages:t;this._messageQueue.length<r&&(this._debug("enqueue",e),this._messageQueue.push(e))}},n.prototype.addEventListener=function(e,t){this._listeners[e]&&this._listeners[e].push(t)},n.prototype.dispatchEvent=function(e){var t,r,i=this._listeners[e.type];if(i)try{for(var s=Dfe(i),a=s.next();!a.done;a=s.next()){var o=a.value;this._callEventListener(e,o)}}catch(d){t={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return!0},n.prototype.removeEventListener=function(e,t){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(function(r){return r!==t}))},n.prototype._debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._options.debug&&console.log.apply(console,Ffe(["RWS>"],e))},n.prototype._getNextDelay=function(){var e=this._options,t=e.reconnectionDelayGrowFactor,r=t===void 0?ag.reconnectionDelayGrowFactor:t,i=e.minReconnectionDelay,s=i===void 0?ag.minReconnectionDelay:i,a=e.maxReconnectionDelay,o=a===void 0?ag.maxReconnectionDelay:a,d=0;return this._retryCount>0&&(d=s*Math.pow(r,this._retryCount-1),d>o&&(d=o)),this._debug("next delay",d),d},n.prototype._wait=function(){var e=this;return new Promise(function(t){setTimeout(t,e._getNextDelay())})},n.prototype._getNextUrl=function(e){if(typeof e=="string")return Promise.resolve(e);if(typeof e=="function"){var t=e();if(typeof t=="string")return Promise.resolve(t);if(t.then)return t}throw Error("Invalid URL")},n.prototype._connect=function(){var e=this;if(!(this._connectLock||!this._shouldReconnect)){this._connectLock=!0;var t=this._options,r=t.maxRetries,i=r===void 0?ag.maxRetries:r,s=t.connectionTimeout,a=s===void 0?ag.connectionTimeout:s,o=t.WebSocket,d=o===void 0?zfe():o;if(this._retryCount>=i){this._debug("max retries reached",this._retryCount,">=",i);return}if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),!jfe(d))throw Error("No valid WebSocket class provided");this._wait().then(function(){return e._getNextUrl(e._url)}).then(function(g){e._closeCalled||(e._debug("connect",{url:g,protocols:e._protocols}),e._ws=e._protocols?new d(g,e._protocols):new d(g),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout(function(){return e._handleTimeout()},a))})}},n.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new Lfe(Error("TIMEOUT"),this))},n.prototype._disconnect=function(e,t){if(e===void 0&&(e=1e3),this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new Ufe(e,t,this))}catch{}}},n.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},n.prototype._callEventListener=function(e,t){"handleEvent"in t?t.handleEvent(e):t(e)},n.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},n.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},n.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},n}();function mi(){var n="/home/runner/work/maputnik/maputnik/src/libs/apistore.ts",e="fa2411bec13fe7a0c74835456fb0c60c3fdde9e5",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/apistore.ts",statementMap:{0:{start:{line:7,column:18},end:{line:7,column:24}},1:{start:{line:10,column:4},end:{line:11,column:7}},2:{start:{line:12,column:17},end:{line:12,column:36}},3:{start:{line:13,column:17},end:{line:13,column:41}},4:{start:{line:14,column:4},end:{line:14,column:45}},5:{start:{line:15,column:4},end:{line:15,column:50}},6:{start:{line:16,column:4},end:{line:16,column:37}},7:{start:{line:19,column:4},end:{line:30,column:7}},8:{start:{line:22,column:6},end:{line:22,column:29}},9:{start:{line:24,column:23},end:{line:24,column:27}},10:{start:{line:25,column:6},end:{line:25,column:39}},11:{start:{line:26,column:6},end:{line:26,column:32}},12:{start:{line:27,column:6},end:{line:27,column:15}},13:{start:{line:29,column:6},end:{line:29,column:52}},14:{start:{line:33,column:23},end:{line:33,column:67}},15:{start:{line:34,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return mi=function(){return a},a}mi();class Wfe{constructor(e){kn(this,"localUrl");kn(this,"websocketUrl");kn(this,"latestStyleId",(mi().s[0]++,void 0));kn(this,"onLocalStyleChange");mi().f[0]++,mi().s[1]++,this.onLocalStyleChange=(mi().b[0][0]++,e.onLocalStyleChange||(mi().b[0][1]++,()=>{mi().f[1]++}));const t=(mi().s[2]++,mi().b[1][0]++,e.port||(mi().b[1][1]++,"8000")),r=(mi().s[3]++,mi().b[2][0]++,e.host||(mi().b[2][1]++,"localhost"));mi().s[4]++,this.localUrl=`http://${r}:${t}`,mi().s[5]++,this.websocketUrl=`ws://${r}:${t}/ws`,mi().s[6]++,this.init=this.init.bind(this)}init(e){mi().f[2]++,mi().s[7]++,fetch(this.localUrl+"/styles",{mode:"cors"}).then(t=>(mi().f[3]++,mi().s[8]++,t.json())).then(t=>{mi().f[4]++;const r=(mi().s[9]++,t);mi().s[10]++,this.latestStyleId=r[0],mi().s[11]++,this.notifyLocalChanges(),mi().s[12]++,e(null)}).catch(()=>{mi().f[5]++,mi().s[13]++,e(new Error("Can not connect to style API"))})}notifyLocalChanges(){mi().f[6]++;const e=(mi().s[14]++,new Nfe(this.websocketUrl));mi().s[15]++,e.onmessage=t=>{if(mi().f[7]++,mi().s[16]++,t.data)mi().b[3][1]++;else{mi().b[3][0]++,mi().s[17]++;return}mi().s[18]++,console.log("Received style update from API");let r=(mi().s[19]++,cc.emptyStyle);mi().s[20]++;try{mi().s[21]++,r=JSON.parse(t.data)}catch(s){mi().s[22]++,console.error(s)}const i=(mi().s[23]++,cc.ensureStyleValidity(r));mi().s[24]++,this.onLocalStyleChange(i)}}latestStyle(e){if(mi().f[8]++,mi().s[25]++,this.latestStyleId)mi().b[4][0]++,mi().s[26]++,fetch(this.localUrl+"/styles/"+this.latestStyleId,{mode:"cors"}).then(function(t){return mi().f[9]++,mi().s[27]++,t.json()}).then(function(t){mi().f[10]++,mi().s[28]++,e(cc.ensureStyleValidity(t))});else throw mi().b[4][1]++,mi().s[29]++,new Error("No latest style available. You need to init the api backend first.")}save(e){mi().f[11]++;const t=(mi().s[30]++,aU(cc.stripAccessTokens(cc.replaceAccessTokens(e)))),r=(mi().s[31]++,e.id);return mi().s[32]++,fetch(this.localUrl+"/styles/"+r,{method:"PUT",mode:"cors",headers:{"Content-Type":"application/json; charset=utf-8"},body:t}).catch(function(i){mi().f[12]++,mi().s[33]++,i?(mi().b[5][0]++,mi().s[34]++,console.error(i)):mi().b[5][1]++}),mi().s[35]++,e}}function Ml(){var n="/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",e="9277d165d3b1fd7c235a1faab33cf41596d9966e",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/revisions.ts",statementMap:{0:{start:{line:5,column:4},end:{line:5,column:38}},1:{start:{line:6,column:4},end:{line:6,column:50}},2:{start:{line:9,column:4},end:{line:9,column:53}},3:{start:{line:12,column:4},end:{line:12,column:43}},4:{start:{line:15,column:4},end:{line:15,column:66}},5:{start:{line:16,column:4},end:{line:16,column:34}},6:{start:{line:17,column:4},end:{line:17,column:22}},7:{start:{line:20,column:4},end:{line:22,column:5}},8:{start:{line:21,column:6},end:{line:21,column:24}},9:{start:{line:23,column:4},end:{line:23,column:24}},10:{start:{line:26,column:4},end:{line:28,column:5}},11:{start:{line:27,column:6},end:{line:27,column:24}},12:{start:{line:29,column:4},end:{line:29,column:24}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:4,column:2},end:{line:4,column:3}},loc:{start:{line:4,column:37},end:{line:7,column:3}},line:4},1:{name:"(anonymous_1)",decl:{start:{line:8,column:2},end:{line:8,column:3}},loc:{start:{line:8,column:15},end:{line:10,column:3}},line:8},2:{name:"(anonymous_2)",decl:{start:{line:11,column:2},end:{line:11,column:3}},loc:{start:{line:11,column:16},end:{line:13,column:3}},line:11},3:{name:"(anonymous_3)",decl:{start:{line:14,column:2},end:{line:14,column:3}},loc:{start:{line:14,column:24},end:{line:18,column:3}},line:14},4:{name:"(anonymous_4)",decl:{start:{line:19,column:2},end:{line:19,column:3}},loc:{start:{line:19,column:9},end:{line:24,column:3}},line:19},5:{name:"(anonymous_5)",decl:{start:{line:25,column:2},end:{line:25,column:3}},loc:{start:{line:25,column:9},end:{line:30,column:3}},line:25}},branchMap:{0:{loc:{start:{line:4,column:14},end:{line:4,column:35}},type:"default-arg",locations:[{start:{line:4,column:33},end:{line:4,column:35}}],line:4},1:{loc:{start:{line:20,column:4},end:{line:22,column:5}},type:"if",locations:[{start:{line:20,column:4},end:{line:22,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:20},2:{loc:{start:{line:26,column:4},end:{line:28,column:5}},type:"if",locations:[{start:{line:26,column:4},end:{line:28,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:26}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/revisions.ts"],names:[],mappings:"AAEO,aAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EAGA,YAAY,mBAAiB,CAAC,GAAG;AAC/B,SAAK,YAAY;AACjB,SAAK,aAAa,iBAAiB,SAAS;AAAA,EAC9C;AAAA,EAEA,IAAI,SAAS;AACX,WAAO,KAAK,UAAU,KAAK,UAAU,SAAS,CAAC;AAAA,EACjD;AAAA,EAEA,IAAI,UAAU;AACZ,WAAO,KAAK,UAAU,KAAK,UAAU;AAAA,EACvC;AAAA,EAEA,YAAY,UAA6C;AAGvD,SAAK,YAAY,KAAK,UAAU,MAAM,GAAG,KAAK,aAAa,CAAC;AAE5D,SAAK,UAAU,KAAK,QAAQ;AAC5B,SAAK;AAAA,EAEP;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,GAAG;AACtB,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,OAAO;AACL,QAAG,KAAK,aAAa,KAAK,UAAU,SAAS,GAAG;AAC9C,WAAK;AAAA,IACP;AACA,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"9277d165d3b1fd7c235a1faab33cf41596d9966e"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Ml=function(){return a},a}Ml();class Gfe{constructor(e=(Ml().b[0][0]++,[])){kn(this,"revisions");kn(this,"currentIdx");Ml().f[0]++,Ml().s[0]++,this.revisions=e,Ml().s[1]++,this.currentIdx=e.length-1}get latest(){return Ml().f[1]++,Ml().s[2]++,this.revisions[this.revisions.length-1]}get current(){return Ml().f[2]++,Ml().s[3]++,this.revisions[this.currentIdx]}addRevision(e){Ml().f[3]++,Ml().s[4]++,this.revisions=this.revisions.slice(0,this.currentIdx+1),Ml().s[5]++,this.revisions.push(e),Ml().s[6]++,this.currentIdx++}undo(){return Ml().f[4]++,Ml().s[7]++,this.currentIdx>0?(Ml().b[1][0]++,Ml().s[8]++,this.currentIdx--):Ml().b[1][1]++,Ml().s[9]++,this.current}redo(){return Ml().f[5]++,Ml().s[10]++,this.currentIdx<this.revisions.length-1?(Ml().b[2][0]++,Ml().s[11]++,this.currentIdx++):Ml().b[2][1]++,Ml().s[12]++,this.current}}var VE,DF;function Qfe(){if(DF)return VE;DF=1;var n="Expected a function",e=NaN,t="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,d=typeof window=="object"&&window&&window.Object===Object&&window,g=typeof self=="object"&&self&&self.Object===Object&&self,b=d||g||Function("return this")(),E=Object.prototype,S=E.toString,O=Math.max,k=Math.min,U=function(){return b.Date.now()};function z(ee,N,ie){var he,de,Me,fe,xe,De,me=0,at=!1,Qe=!1,He=!0;if(typeof ee!="function")throw new TypeError(n);N=Y(N)||0,Q(ie)&&(at=!!ie.leading,Qe="maxWait"in ie,Me=Qe?O(Y(ie.maxWait)||0,N):Me,He="trailing"in ie?!!ie.trailing:He);function We(Le){var Pe=he,Ee=de;return he=de=void 0,me=Le,fe=ee.apply(Ee,Pe),fe}function Ce(Le){return me=Le,xe=setTimeout(yt,N),at?We(Le):fe}function Te(Le){var Pe=Le-De,Ee=Le-me,nt=N-Pe;return Qe?k(nt,Me-Ee):nt}function rt(Le){var Pe=Le-De,Ee=Le-me;return De===void 0||Pe>=N||Pe<0||Qe&&Ee>=Me}function yt(){var Le=U();if(rt(Le))return bt(Le);xe=setTimeout(yt,Te(Le))}function bt(Le){return xe=void 0,He&&he?We(Le):(he=de=void 0,fe)}function gt(){xe!==void 0&&clearTimeout(xe),me=0,he=De=de=xe=void 0}function Dt(){return xe===void 0?fe:bt(U())}function Pt(){var Le=U(),Pe=rt(Le);if(he=arguments,de=this,De=Le,Pe){if(xe===void 0)return Ce(De);if(Qe)return xe=setTimeout(yt,N),We(De)}return xe===void 0&&(xe=setTimeout(yt,N)),fe}return Pt.cancel=gt,Pt.flush=Dt,Pt}function q(ee,N,ie){var he=!0,de=!0;if(typeof ee!="function")throw new TypeError(n);return Q(ie)&&(he="leading"in ie?!!ie.leading:he,de="trailing"in ie?!!ie.trailing:de),z(ee,N,{leading:he,maxWait:N,trailing:de})}function Q(ee){var N=typeof ee;return!!ee&&(N=="object"||N=="function")}function re(ee){return!!ee&&typeof ee=="object"}function X(ee){return typeof ee=="symbol"||re(ee)&&S.call(ee)==t}function Y(ee){if(typeof ee=="number")return ee;if(X(ee))return e;if(Q(ee)){var N=typeof ee.valueOf=="function"?ee.valueOf():ee;ee=Q(N)?N+"":N}if(typeof ee!="string")return ee===0?ee:+ee;ee=ee.replace(r,"");var ie=s.test(ee);return ie||a.test(ee)?o(ee.slice(2),ie?2:8):i.test(ee)?e:+ee}return VE=q,VE}var qfe=Qfe();const Yfe=Ha(qfe);var Fv={exports:{}};Fv.exports;var KF;function $fe(){return KF||(KF=1,function(n,e){var t=200,r="__lodash_hash_undefined__",i=1,s=2,a=9007199254740991,o="[object Arguments]",d="[object Array]",g="[object AsyncFunction]",b="[object Boolean]",E="[object Date]",S="[object Error]",O="[object Function]",k="[object GeneratorFunction]",U="[object Map]",z="[object Number]",q="[object Null]",Q="[object Object]",re="[object Promise]",X="[object Proxy]",Y="[object RegExp]",ee="[object Set]",N="[object String]",ie="[object Symbol]",he="[object Undefined]",de="[object WeakMap]",Me="[object ArrayBuffer]",fe="[object DataView]",xe="[object Float32Array]",De="[object Float64Array]",me="[object Int8Array]",at="[object Int16Array]",Qe="[object Int32Array]",He="[object Uint8Array]",We="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Te="[object Uint32Array]",rt=/[\\^$.*+?()[\]{}|]/g,yt=/^\[object .+?Constructor\]$/,bt=/^(?:0|[1-9]\d*)$/,gt={};gt[xe]=gt[De]=gt[me]=gt[at]=gt[Qe]=gt[He]=gt[We]=gt[Ce]=gt[Te]=!0,gt[o]=gt[d]=gt[Me]=gt[b]=gt[fe]=gt[E]=gt[S]=gt[O]=gt[U]=gt[z]=gt[Q]=gt[Y]=gt[ee]=gt[N]=gt[de]=!1;var Dt=typeof window=="object"&&window&&window.Object===Object&&window,Pt=typeof self=="object"&&self&&self.Object===Object&&self,Le=Dt||Pt||Function("return this")(),Pe=e&&!e.nodeType&&e,Ee=Pe&&!0&&n&&!n.nodeType&&n,nt=Ee&&Ee.exports===Pe,_t=nt&&Dt.process,ht=function(){try{return _t&&_t.binding&&_t.binding("util")}catch{}}(),Ut=ht&&ht.isTypedArray;function en(J,Oe){for(var ot=-1,Vt=J==null?0:J.length,Ir=0,Yn=[];++ot<Vt;){var si=J[ot];Oe(si,ot,J)&&(Yn[Ir++]=si)}return Yn}function Ft(J,Oe){for(var ot=-1,Vt=Oe.length,Ir=J.length;++ot<Vt;)J[Ir+ot]=Oe[ot];return J}function mn(J,Oe){for(var ot=-1,Vt=J==null?0:J.length;++ot<Vt;)if(Oe(J[ot],ot,J))return!0;return!1}function jn(J,Oe){for(var ot=-1,Vt=Array(J);++ot<J;)Vt[ot]=Oe(ot);return Vt}function nn(J){return function(Oe){return J(Oe)}}function ir(J,Oe){return J.has(Oe)}function Dn(J,Oe){return J==null?void 0:J[Oe]}function fn(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt,Ir){ot[++Oe]=[Ir,Vt]}),ot}function Hn(J,Oe){return function(ot){return J(Oe(ot))}}function wr(J){var Oe=-1,ot=Array(J.size);return J.forEach(function(Vt){ot[++Oe]=Vt}),ot}var Qn=Array.prototype,Xn=Function.prototype,Ge=Object.prototype,Ae=Le["__core-js_shared__"],pe=Xn.toString,et=Ge.hasOwnProperty,St=function(){var J=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||"");return J?"Symbol(src)_1."+J:""}(),Yt=Ge.toString,rn=RegExp("^"+pe.call(et).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),er=nt?Le.Buffer:void 0,Be=Le.Symbol,oe=Le.Uint8Array,ve=Ge.propertyIsEnumerable,p=Qn.splice,je=Be?Be.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,tt=er?er.isBuffer:void 0,ct=Hn(Object.keys,Object),At=Ei(Le,"DataView"),Gt=Ei(Le,"Map"),$t=Ei(Le,"Promise"),jt=Ei(Le,"Set"),xt=Ei(Le,"WeakMap"),Rn=Ei(Object,"create"),Bn=fo(At),fr=fo(Gt),Sr=fo($t),on=fo(jt),Nn=fo(xt),Fn=Be?Be.prototype:void 0,Or=Fn?Fn.valueOf:void 0;function Er(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Dr(){this.__data__=Rn?Rn(null):{},this.size=0}function ur(J){var Oe=this.has(J)&&delete this.__data__[J];return this.size-=Oe?1:0,Oe}function co(J){var Oe=this.__data__;if(Rn){var ot=Oe[J];return ot===r?void 0:ot}return et.call(Oe,J)?Oe[J]:void 0}function Sa(J){var Oe=this.__data__;return Rn?Oe[J]!==void 0:et.call(Oe,J)}function qi(J,Oe){var ot=this.__data__;return this.size+=this.has(J)?0:1,ot[J]=Rn&&Oe===void 0?r:Oe,this}Er.prototype.clear=Dr,Er.prototype.delete=ur,Er.prototype.get=co,Er.prototype.has=Sa,Er.prototype.set=qi;function yi(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function oo(){this.__data__=[],this.size=0}function Mo(J){var Oe=this.__data__,ot=sr(Oe,J);if(ot<0)return!1;var Vt=Oe.length-1;return ot==Vt?Oe.pop():p.call(Oe,ot,1),--this.size,!0}function Ti(J){var Oe=this.__data__,ot=sr(Oe,J);return ot<0?void 0:Oe[ot][1]}function La(J){return sr(this.__data__,J)>-1}function Ea(J,Oe){var ot=this.__data__,Vt=sr(ot,J);return Vt<0?(++this.size,ot.push([J,Oe])):ot[Vt][1]=Oe,this}yi.prototype.clear=oo,yi.prototype.delete=Mo,yi.prototype.get=Ti,yi.prototype.has=La,yi.prototype.set=Ea;function ns(J){var Oe=-1,ot=J==null?0:J.length;for(this.clear();++Oe<ot;){var Vt=J[Oe];this.set(Vt[0],Vt[1])}}function Aa(){this.size=0,this.__data__={hash:new Er,map:new(Gt||yi),string:new Er}}function Al(J){var Oe=Fr(this,J).delete(J);return this.size-=Oe?1:0,Oe}function ao(J){return Fr(this,J).get(J)}function Pu(J){return Fr(this,J).has(J)}function tu(J,Oe){var ot=Fr(this,J),Vt=ot.size;return ot.set(J,Oe),this.size+=ot.size==Vt?0:1,this}ns.prototype.clear=Aa,ns.prototype.delete=Al,ns.prototype.get=ao,ns.prototype.has=Pu,ns.prototype.set=tu;function so(J){var Oe=-1,ot=J==null?0:J.length;for(this.__data__=new ns;++Oe<ot;)this.add(J[Oe])}function Kr(J){return this.__data__.set(J,r),this}function Za(J){return this.__data__.has(J)}so.prototype.add=so.prototype.push=Kr,so.prototype.has=Za;function Ps(J){var Oe=this.__data__=new yi(J);this.size=Oe.size}function ia(){this.__data__=new yi,this.size=0}function qe(J){var Oe=this.__data__,ot=Oe.delete(J);return this.size=Oe.size,ot}function wt(J){return this.__data__.get(J)}function gn(J){return this.__data__.has(J)}function qn(J,Oe){var ot=this.__data__;if(ot instanceof yi){var Vt=ot.__data__;if(!Gt||Vt.length<t-1)return Vt.push([J,Oe]),this.size=++ot.size,this;ot=this.__data__=new ns(Vt)}return ot.set(J,Oe),this.size=ot.size,this}Ps.prototype.clear=ia,Ps.prototype.delete=qe,Ps.prototype.get=wt,Ps.prototype.has=gn,Ps.prototype.set=qn;function An(J,Oe){var ot=el(J),Vt=!ot&&Ms(J),Ir=!ot&&!Vt&&El(J),Yn=!ot&&!Vt&&!Ir&&ru(J),si=ot||Vt||Ir||Yn,ci=si?jn(J.length,String):[],vr=ci.length;for(var kr in J)et.call(J,kr)&&!(si&&(kr=="length"||Ir&&(kr=="offset"||kr=="parent")||Yn&&(kr=="buffer"||kr=="byteLength"||kr=="byteOffset")||Ws(kr,vr)))&&ci.push(kr);return ci}function sr(J,Oe){for(var ot=J.length;ot--;)if(ms(J[ot][0],Oe))return ot;return-1}function Pi(J,Oe,ot){var Vt=Oe(J);return el(J)?Vt:Ft(Vt,ot(J))}function ho(J){return J==null?J===void 0?he:q:je&&je in Object(J)?Ja(J):Vs(J)}function Cs(J){return Jr(J)&&ho(J)==o}function Ns(J,Oe,ot,Vt,Ir){return J===Oe?!0:J==null||Oe==null||!Jr(J)&&!Jr(Oe)?J!==J&&Oe!==Oe:vA(J,Oe,ot,Vt,Ns,Ir)}function vA(J,Oe,ot,Vt,Ir,Yn){var si=el(J),ci=el(Oe),vr=si?d:So(J),kr=ci?d:So(Oe);vr=vr==o?Q:vr,kr=kr==o?Q:kr;var vi=vr==Q,Eo=kr==Q,ki=vr==kr;if(ki&&El(J)){if(!El(Oe))return!1;si=!0,vi=!1}if(ki&&!vi)return Yn||(Yn=new Ps),si||ru(J)?Ai(J,Oe,ot,Vt,Ir,Yn):ca(J,Oe,vr,ot,Vt,Ir,Yn);if(!(ot&i)){var qr=vi&&et.call(J,"__wrapped__"),Hi=Eo&&et.call(Oe,"__wrapped__");if(qr||Hi){var Zi=qr?J.value():J,us=Hi?Oe.value():Oe;return Yn||(Yn=new Ps),Ir(Zi,us,ot,Vt,Yn)}}return ki?(Yn||(Yn=new Ps),iA(J,Oe,ot,Vt,Ir,Yn)):!1}function ri(J){if(!Ui(J)||zl(J))return!1;var Oe=Vi(J)?rn:yt;return Oe.test(fo(J))}function wi(J){return Jr(J)&&nu(J.length)&&!!gt[ho(J)]}function Xa(J){if(!rs(J))return ct(J);var Oe=[];for(var ot in Object(J))et.call(J,ot)&&ot!="constructor"&&Oe.push(ot);return Oe}function Ai(J,Oe,ot,Vt,Ir,Yn){var si=ot&i,ci=J.length,vr=Oe.length;if(ci!=vr&&!(si&&vr>ci))return!1;var kr=Yn.get(J);if(kr&&Yn.get(Oe))return kr==Oe;var vi=-1,Eo=!0,ki=ot&s?new so:void 0;for(Yn.set(J,Oe),Yn.set(Oe,J);++vi<ci;){var qr=J[vi],Hi=Oe[vi];if(Vt)var Zi=si?Vt(Hi,qr,vi,Oe,J,Yn):Vt(qr,Hi,vi,J,Oe,Yn);if(Zi!==void 0){if(Zi)continue;Eo=!1;break}if(ki){if(!mn(Oe,function(us,ya){if(!ir(ki,ya)&&(qr===us||Ir(qr,us,ot,Vt,Yn)))return ki.push(ya)})){Eo=!1;break}}else if(!(qr===Hi||Ir(qr,Hi,ot,Vt,Yn))){Eo=!1;break}}return Yn.delete(J),Yn.delete(Oe),Eo}function ca(J,Oe,ot,Vt,Ir,Yn,si){switch(ot){case fe:if(J.byteLength!=Oe.byteLength||J.byteOffset!=Oe.byteOffset)return!1;J=J.buffer,Oe=Oe.buffer;case Me:return!(J.byteLength!=Oe.byteLength||!Yn(new oe(J),new oe(Oe)));case b:case E:case z:return ms(+J,+Oe);case S:return J.name==Oe.name&&J.message==Oe.message;case Y:case N:return J==Oe+"";case U:var ci=fn;case ee:var vr=Vt&i;if(ci||(ci=wr),J.size!=Oe.size&&!vr)return!1;var kr=si.get(J);if(kr)return kr==Oe;Vt|=s,si.set(J,Oe);var vi=Ai(ci(J),ci(Oe),Vt,Ir,Yn,si);return si.delete(J),vi;case ie:if(Or)return Or.call(J)==Or.call(Oe)}return!1}function iA(J,Oe,ot,Vt,Ir,Yn){var si=ot&i,ci=ls(J),vr=ci.length,kr=ls(Oe),vi=kr.length;if(vr!=vi&&!si)return!1;for(var Eo=vr;Eo--;){var ki=ci[Eo];if(!(si?ki in Oe:et.call(Oe,ki)))return!1}var qr=Yn.get(J);if(qr&&Yn.get(Oe))return qr==Oe;var Hi=!0;Yn.set(J,Oe),Yn.set(Oe,J);for(var Zi=si;++Eo<vr;){ki=ci[Eo];var us=J[ki],ya=Oe[ki];if(Vt)var Ua=si?Vt(ya,us,ki,Oe,J,Yn):Vt(us,ya,ki,J,Oe,Yn);if(!(Ua===void 0?us===ya||Ir(us,ya,ot,Vt,Yn):Ua)){Hi=!1;break}Zi||(Zi=ki=="constructor")}if(Hi&&!Zi){var fu=J.constructor,Hs=Oe.constructor;fu!=Hs&&"constructor"in J&&"constructor"in Oe&&!(typeof fu=="function"&&fu instanceof fu&&typeof Hs=="function"&&Hs instanceof Hs)&&(Hi=!1)}return Yn.delete(J),Yn.delete(Oe),Hi}function ls(J){return Pi(J,Ni,Rs)}function Fr(J,Oe){var ot=J.__data__;return hu(Oe)?ot[typeof Oe=="string"?"string":"hash"]:ot.map}function Ei(J,Oe){var ot=Dn(J,Oe);return ri(ot)?ot:void 0}function Ja(J){var Oe=et.call(J,je),ot=J[je];try{J[je]=void 0;var Vt=!0}catch{}var Ir=Yt.call(J);return Vt&&(Oe?J[je]=ot:delete J[je]),Ir}var Rs=Ye?function(J){return J==null?[]:(J=Object(J),en(Ye(J),function(Oe){return ve.call(J,Oe)}))}:lo,So=ho;(At&&So(new At(new ArrayBuffer(1)))!=fe||Gt&&So(new Gt)!=U||$t&&So($t.resolve())!=re||jt&&So(new jt)!=ee||xt&&So(new xt)!=de)&&(So=function(J){var Oe=ho(J),ot=Oe==Q?J.constructor:void 0,Vt=ot?fo(ot):"";if(Vt)switch(Vt){case Bn:return fe;case fr:return U;case Sr:return re;case on:return ee;case Nn:return de}return Oe});function Ws(J,Oe){return Oe=Oe??a,!!Oe&&(typeof J=="number"||bt.test(J))&&J>-1&&J%1==0&&J<Oe}function hu(J){var Oe=typeof J;return Oe=="string"||Oe=="number"||Oe=="symbol"||Oe=="boolean"?J!=="__proto__":J===null}function zl(J){return!!St&&St in J}function rs(J){var Oe=J&&J.constructor,ot=typeof Oe=="function"&&Oe.prototype||Ge;return J===ot}function Vs(J){return Yt.call(J)}function fo(J){if(J!=null){try{return pe.call(J)}catch{}try{return J+""}catch{}}return""}function ms(J,Oe){return J===Oe||J!==J&&Oe!==Oe}var Ms=Cs(function(){return arguments}())?Cs:function(J){return Jr(J)&&et.call(J,"callee")&&!ve.call(J,"callee")},el=Array.isArray;function Ds(J){return J!=null&&nu(J.length)&&!Vi(J)}var El=tt||Ri;function oA(J,Oe){return Ns(J,Oe)}function Vi(J){if(!Ui(J))return!1;var Oe=ho(J);return Oe==O||Oe==k||Oe==g||Oe==X}function nu(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=a}function Ui(J){var Oe=typeof J;return J!=null&&(Oe=="object"||Oe=="function")}function Jr(J){return J!=null&&typeof J=="object"}var ru=Ut?nn(Ut):wi;function Ni(J){return Ds(J)?An(J):Xa(J)}function lo(){return[]}function Ri(){return!1}n.exports=oA}(Fv,Fv.exports)),Fv.exports}var Vfe=$fe();const yB=Ha(Vfe);function Fi(){var n="/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",e="77d2098743f5a64765174c6e14fc4dc25f900f6c",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts",statementMap:{0:{start:{line:10,column:4},end:{line:11,column:7}},1:{start:{line:12,column:4},end:{line:13,column:7}},2:{start:{line:14,column:4},end:{line:14,column:23}},3:{start:{line:15,column:4},end:{line:15,column:28}},4:{start:{line:16,column:4},end:{line:16,column:90}},5:{start:{line:19,column:28},end:{line:19,column:48}},6:{start:{line:20,column:4},end:{line:22,column:7}},7:{start:{line:21,column:6},end:{line:21,column:88}},8:{start:{line:23,column:4},end:{line:25,column:5}},9:{start:{line:24,column:6},end:{line:24,column:42}},10:{start:{line:26,column:4},end:{line:26,column:48}},11:{start:{line:29,column:33},end:{line:29,column:58}},12:{start:{line:30,column:4},end:{line:43,column:7}},13:{start:{line:31,column:6},end:{line:42,column:9}},14:{start:{line:32,column:32},end:{line:32,column:71}},15:{start:{line:33,column:23},end:{line:33,column:53}},16:{start:{line:34,column:8},end:{line:40,column:11}},17:{start:{line:35,column:10},end:{line:39,column:13}},18:{start:{line:36,column:40},end:{line:36,column:75}},19:{start:{line:37,column:12},end:{line:37,column:71}},20:{start:{line:38,column:12},end:{line:38,column:64}},21:{start:{line:41,column:8},end:{line:41,column:60}},22:{start:{line:44,column:4},end:{line:46,column:5}},23:{start:{line:45,column:6},end:{line:45,column:52}},24:{start:{line:50,column:4},end:{line:50,column:25}},25:{start:{line:53,column:4},end:{line:53,column:30}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:9,column:2},end:{line:9,column:3}},loc:{start:{line:9,column:25},end:{line:17,column:3}},line:9},1:{name:"(anonymous_1)",decl:{start:{line:10,column:52},end:{line:10,column:53}},loc:{start:{line:10,column:58},end:{line:11,column:5}},line:10},2:{name:"(anonymous_2)",decl:{start:{line:12,column:62},end:{line:12,column:63}},loc:{start:{line:12,column:68},end:{line:13,column:5}},line:12},3:{name:"(anonymous_3)",decl:{start:{line:18,column:2},end:{line:18,column:3}},loc:{start:{line:18,column:18},end:{line:27,column:3}},line:18},4:{name:"(anonymous_4)",decl:{start:{line:20,column:48},end:{line:20,column:49}},loc:{start:{line:20,column:62},end:{line:22,column:5}},line:20},5:{name:"(anonymous_5)",decl:{start:{line:28,column:2},end:{line:28,column:3}},loc:{start:{line:28,column:32},end:{line:47,column:3}},line:28},6:{name:"(anonymous_6)",decl:{start:{line:30,column:39},end:{line:30,column:40}},loc:{start:{line:30,column:53},end:{line:43,column:5}},line:30},7:{name:"(anonymous_7)",decl:{start:{line:31,column:46},end:{line:31,column:47}},loc:{start:{line:31,column:65},end:{line:42,column:7}},line:31},8:{name:"(anonymous_8)",decl:{start:{line:34,column:58},end:{line:34,column:59}},loc:{start:{line:34,column:71},end:{line:40,column:9}},line:34},9:{name:"(anonymous_9)",decl:{start:{line:35,column:50},end:{line:35,column:51}},loc:{start:{line:35,column:68},end:{line:39,column:11}},line:35},10:{name:"(anonymous_10)",decl:{start:{line:49,column:2},end:{line:49,column:3}},loc:{start:{line:49,column:16},end:{line:51,column:3}},line:49},11:{name:"(anonymous_11)",decl:{start:{line:52,column:2},end:{line:52,column:3}},loc:{start:{line:52,column:21},end:{line:54,column:3}},line:52}},branchMap:{0:{loc:{start:{line:9,column:14},end:{line:9,column:23}},type:"default-arg",locations:[{start:{line:9,column:21},end:{line:9,column:23}}],line:9},1:{loc:{start:{line:10,column:27},end:{line:11,column:6}},type:"binary-expr",locations:[{start:{line:10,column:27},end:{line:10,column:47}},{start:{line:10,column:52},end:{line:11,column:5}}],line:10},2:{loc:{start:{line:12,column:32},end:{line:13,column:6}},type:"binary-expr",locations:[{start:{line:12,column:32},end:{line:12,column:57}},{start:{line:12,column:62},end:{line:13,column:5}}],line:12},3:{loc:{start:{line:23,column:4},end:{line:25,column:5}},type:"if",locations:[{start:{line:23,column:4},end:{line:25,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:23},4:{loc:{start:{line:31,column:7},end:{line:31,column:36}},type:"binary-expr",locations:[{start:{line:31,column:7},end:{line:31,column:30}},{start:{line:31,column:34},end:{line:31,column:36}}],line:31},5:{loc:{start:{line:32,column:32},end:{line:32,column:71}},type:"binary-expr",locations:[{start:{line:32,column:32},end:{line:32,column:65}},{start:{line:32,column:69},end:{line:32,column:71}}],line:32},6:{loc:{start:{line:36,column:40},end:{line:36,column:75}},type:"binary-expr",locations:[{start:{line:36,column:40},end:{line:36,column:69}},{start:{line:36,column:73},end:{line:36,column:75}}],line:36},7:{loc:{start:{line:44,column:4},end:{line:46,column:5}},type:"if",locations:[{start:{line:44,column:4},end:{line:46,column:5}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:44}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/layerwatcher.ts"],names:[],mappings:"AAAA,OAAO,cAAc;AACrB,OAAO,aAAa;AAUpB,qBAAqB,aAAa;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,OAA4B,CAAC,GAAG;AAC1C,SAAK,kBAAkB,KAAK,oBAAoB,MAAM;AAAA,IAAC;AACvD,SAAK,uBAAuB,KAAK,yBAAyB,MAAM;AAAA,IAAC;AAEjE,SAAK,WAAW,CAAC;AACjB,SAAK,gBAAgB,CAAC;AAKtB,SAAK,oCAAoC,SAAS,KAAK,0BAA0B,GAAI;AAAA,EACvF;AAAA,EAEA,WAAW,KAAU;AACnB,UAAM,kBAAkB,EAAE,GAAG,KAAK,SAAS;AAE3C,WAAO,KAAK,IAAI,MAAM,YAAY,EAAE,QAAQ,cAAY;AAGtD,WAAK,SAAS,QAAQ,IAAI,IAAI,MAAM,aAAa,QAAQ,EAAE,QAAQ;AAAA,IACrE,CAAC;AAED,QAAG,CAAC,QAAQ,iBAAiB,KAAK,QAAQ,GAAG;AAC3C,WAAK,gBAAgB,KAAK,QAAQ;AAAA,IACpC;AAEA,SAAK,kCAAkC,GAAG;AAAA,EAC5C;AAAA,EAEA,yBAAyB,KAAU;AACjC,UAAM,uBAAuB,EAAE,GAAG,KAAK,cAAc;AAErD,WAAO,KAAK,KAAK,QAAQ,EAAE,QAAQ,cAAY;AAC7C,OAAC,KAAK,SAAS,QAAQ,KAAK,CAAC,GAAG,QAAQ,mBAAiB;AACvD,cAAM,kBAAkB,KAAK,cAAc,aAAa,KAAK,CAAC;AAC9D,cAAM,SAAS,EAAE,aAAa,cAAc;AAC5C,YAAI,oBAAoB,UAAU,MAAa,EAAE,QAAQ,aAAW;AAClE,iBAAO,KAAK,QAAQ,UAAU,EAAE,QAAQ,kBAAgB;AACtD,kBAAM,sBAAsB,gBAAgB,YAAY,KAAK,CAAC;AAC9D,gCAAoB,QAAQ,WAAW,YAAY,CAAC,IAAI,CAAC;AACzD,4BAAgB,YAAY,IAAI;AAAA,UAClC,CAAC;AAAA,QACH,CAAC;AAED,aAAK,cAAc,aAAa,IAAI;AAAA,MACtC,CAAC;AAAA,IACH,CAAC;AAED,QAAG,CAAC,QAAQ,sBAAsB,KAAK,aAAa,GAAG;AACrD,WAAK,qBAAqB,KAAK,aAAa;AAAA,IAC9C;AAAA,EAEF;AAAA;AAAA,EAGA,IAAI,UAAU;AACZ,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,eAAe;AACjB,WAAO,KAAK;AAAA,EACd;AACF;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"77d2098743f5a64765174c6e14fc4dc25f900f6c"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Fi=function(){return a},a}Fi();class Hfe{constructor(e=(Fi().b[0][0]++,{})){kn(this,"onSourcesChange");kn(this,"onVectorLayersChange");kn(this,"throttledAnalyzeVectorLayerFields");kn(this,"_sources");kn(this,"_vectorLayers");Fi().f[0]++,Fi().s[0]++,this.onSourcesChange=(Fi().b[1][0]++,e.onSourcesChange||(Fi().b[1][1]++,()=>{Fi().f[1]++})),Fi().s[1]++,this.onVectorLayersChange=(Fi().b[2][0]++,e.onVectorLayersChange||(Fi().b[2][1]++,()=>{Fi().f[2]++})),Fi().s[2]++,this._sources={},Fi().s[3]++,this._vectorLayers={},Fi().s[4]++,this.throttledAnalyzeVectorLayerFields=Yfe(this.analyzeVectorLayerFields,5e3)}analyzeMap(e){Fi().f[3]++;const t=(Fi().s[5]++,{...this._sources});Fi().s[6]++,Object.keys(e.style.sourceCaches).forEach(r=>{Fi().f[4]++,Fi().s[7]++,this._sources[r]=e.style.sourceCaches[r]._source.vectorLayerIds}),Fi().s[8]++,yB(t,this._sources)?Fi().b[3][1]++:(Fi().b[3][0]++,Fi().s[9]++,this.onSourcesChange(this._sources)),Fi().s[10]++,this.throttledAnalyzeVectorLayerFields(e)}analyzeVectorLayerFields(e){Fi().f[5]++;const t=(Fi().s[11]++,{...this._vectorLayers});Fi().s[12]++,Object.keys(this._sources).forEach(r=>{Fi().f[6]++,Fi().s[13]++,(Fi().b[4][0]++,this._sources[r]||(Fi().b[4][1]++,[])).forEach(i=>{Fi().f[7]++;const s=(Fi().s[14]++,Fi().b[5][0]++,this._vectorLayers[i]||(Fi().b[5][1]++,{})),a=(Fi().s[15]++,{sourceLayer:i});Fi().s[16]++,e.querySourceFeatures(r,a).forEach(o=>{Fi().f[8]++,Fi().s[17]++,Object.keys(o.properties).forEach(d=>{Fi().f[9]++;const g=(Fi().s[18]++,Fi().b[6][0]++,s[d]||(Fi().b[6][1]++,{}));Fi().s[19]++,g[o.properties[d]]={},Fi().s[20]++,s[d]=g})}),Fi().s[21]++,this._vectorLayers[i]=s})}),Fi().s[22]++,yB(t,this._vectorLayers)?Fi().b[7][1]++:(Fi().b[7][0]++,Fi().s[23]++,this.onVectorLayersChange(this._vectorLayers))}get sources(){return Fi().f[10]++,Fi().s[24]++,this._sources}get vectorLayers(){return Fi().f[11]++,Fi().s[25]++,this._vectorLayers}}function na(){var n="/home/runner/work/maputnik/maputnik/src/libs/debug.ts",e="f3fc52390a8e0125df8ac2b3d3c29ba103bd1c39",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/libs/debug.ts",statementMap:{0:{start:{line:1,column:19},end:{line:1,column:21}},1:{start:{line:3,column:13},end:{line:3,column:55}},2:{start:{line:4,column:18},end:{line:4,column:33}},3:{start:{line:5,column:2},end:{line:9,column:3}},4:{start:{line:6,column:4},end:{line:6,column:42}},5:{start:{line:8,column:4},end:{line:8,column:17}},6:{start:{line:12,column:2},end:{line:12,column:91}},7:{start:{line:15,column:2},end:{line:17,column:3}},8:{start:{line:16,column:4},end:{line:16,column:19}},9:{start:{line:18,column:2},end:{line:18,column:54}},10:{start:{line:19,column:2},end:{line:19,column:37}},11:{start:{line:22,column:2},end:{line:24,column:3}},12:{start:{line:23,column:4},end:{line:23,column:19}},13:{start:{line:25,column:2},end:{line:27,column:3}},14:{start:{line:26,column:4},end:{line:26,column:38}},15:{start:{line:29,column:12},end:{line:33,column:1}},16:{start:{line:34,column:0},end:{line:34,column:19}}},fnMap:{0:{name:"enabled",decl:{start:{line:2,column:9},end:{line:2,column:16}},loc:{start:{line:2,column:19},end:{line:10,column:1}},line:2},1:{name:"genErr",decl:{start:{line:11,column:9},end:{line:11,column:15}},loc:{start:{line:11,column:18},end:{line:13,column:1}},line:11},2:{name:"set",decl:{start:{line:14,column:9},end:{line:14,column:12}},loc:{start:{line:14,column:36},end:{line:20,column:1}},line:14},3:{name:"get",decl:{start:{line:21,column:9},end:{line:21,column:12}},loc:{start:{line:21,column:29},end:{line:28,column:1}},line:21}},branchMap:{0:{loc:{start:{line:5,column:2},end:{line:9,column:3}},type:"if",locations:[{start:{line:5,column:2},end:{line:9,column:3}},{start:{line:7,column:9},end:{line:9,column:3}}],line:5},1:{loc:{start:{line:15,column:2},end:{line:17,column:3}},type:"if",locations:[{start:{line:15,column:2},end:{line:17,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:15},2:{loc:{start:{line:18,column:26},end:{line:18,column:53}},type:"binary-expr",locations:[{start:{line:18,column:26},end:{line:18,column:47}},{start:{line:18,column:51},end:{line:18,column:53}}],line:18},3:{loc:{start:{line:22,column:2},end:{line:24,column:3}},type:"if",locations:[{start:{line:22,column:2},end:{line:24,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:22},4:{loc:{start:{line:25,column:2},end:{line:27,column:3}},type:"if",locations:[{start:{line:25,column:2},end:{line:27,column:3}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:25}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,file:null,sources:["/home/runner/work/maputnik/maputnik/src/libs/debug.ts"],names:[],mappings:"AAMA,MAAM,aAAyB,CAAC;AAEhC,SAAS,UAAU;AACjB,QAAM,KAAK,IAAI,IAAI,OAAO,SAAS,IAAI,EAAE;AACzC,QAAM,UAAU,GAAG,IAAI,OAAO;AAC9B,MAAG,SAAS;AACV,WAAO,CAAC,CAAC,QAAQ,MAAM,aAAa;AAAA,EACtC,OACK;AACH,WAAO;AAAA,EACT;AACF;AAEA,SAAS,SAAS;AAChB,SAAO,IAAI,MAAM,sEAAsE;AACzF;AAEA,SAAS,IAAI,WAA6B,KAAa,OAAY;AACjE,MAAG,CAAC,QAAQ,GAAG;AACb,UAAM,OAAO;AAAA,EACf;AACA,aAAW,SAAS,IAAI,WAAW,SAAS,KAAK,CAAC;AAClD,aAAW,SAAS,EAAE,GAAG,IAAI;AAC/B;AAEA,SAAS,IAAI,WAA6B,KAAa;AACrD,MAAG,CAAC,QAAQ,GAAG;AACb,UAAM,OAAO;AAAA,EACf;AACA,MAAG,OAAO,UAAU,eAAe,KAAK,YAAY,SAAS,GAAG;AAC9D,WAAO,WAAW,SAAS,EAAE,GAAG;AAAA,EAClC;AACF;AAEA,MAAM,MAAM;AAAA,EACV;AAAA,EACA;AAAA,EACA;AACF;AAEC,OAAe,QAAQ;AACxB,eAAe;"},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f3fc52390a8e0125df8ac2b3d3c29ba103bd1c39"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return na=function(){return a},a}na();const Vv=(na().s[0]++,{});function Z8(){na().f[0]++;const n=(na().s[1]++,new URL(window.location.href).searchParams),e=(na().s[2]++,n.get("debug"));return na().s[3]++,e?(na().b[0][0]++,na().s[4]++,!!e.match(/^(|1|true)$/)):(na().b[0][1]++,na().s[5]++,!1)}function rG(){return na().f[1]++,na().s[6]++,new Error("Debug not enabled, enable by appending '?debug' to your query string")}function Zfe(n,e,t){if(na().f[2]++,na().s[7]++,Z8())na().b[1][1]++;else throw na().b[1][0]++,na().s[8]++,rG();na().s[9]++,Vv[n]=(na().b[2][0]++,Vv[n]||(na().b[2][1]++,{})),na().s[10]++,Vv[n][e]=t}function Xfe(n,e){if(na().f[3]++,na().s[11]++,Z8())na().b[3][1]++;else throw na().b[3][0]++,na().s[12]++,rG();if(na().s[13]++,Object.prototype.hasOwnProperty.call(Vv,n))return na().b[4][0]++,na().s[14]++,Vv[n][e];na().b[4][1]++}const Ag=(na().s[15]++,{enabled:Z8,get:Xfe,set:Zfe});na().s[16]++;window.debug=Ag;function Se(){var n="/home/runner/work/maputnik/maputnik/src/components/App.tsx",e="b0d5f8ee8537ee2f4707fe123c0c222059f25ad2",t=globalThis,r="__coverage__",i={path:"/home/runner/work/maputnik/maputnik/src/components/App.tsx",statementMap:{0:{start:{line:36,column:0},end:{line:36,column:30}},1:{start:{line:38,column:29},end:{line:38,column:60}},2:{start:{line:39,column:26},end:{line:39,column:54}},3:{start:{line:40,column:31},end:{line:40,column:64}},4:{start:{line:41,column:2},end:{line:53,column:3}},5:{start:{line:42,column:24},end:{line:42,column:95}},6:{start:{line:43,column:4},end:{line:45,column:5}},7:{start:{line:44,column:6},end:{line:44,column:47}},8:{start:{line:46,column:9},end:{line:53,column:3}},9:{start:{line:47,column:24},end:{line:47,column:96}},10:{start:{line:48,column:4},end:{line:50,column:5}},11:{start:{line:49,column:6},end:{line:49,column:47}},12:{start:{line:52,column:4},end:{line:52,column:15}},13:{start:{line:56,column:2},end:{line:65,column:4}},14:{start:{line:72,column:4},end:{line:72,column:17}},15:{start:{line:73,column:4},end:{line:73,column:19}},16:{start:{line:74,column:4},end:{line:74,column:45}},17:{start:{line:75,column:19},end:{line:75,column:75}},18:{start:{line:76,column:15},end:{line:76,column:38}},19:{start:{line:77,column:4},end:{line:79,column:5}},20:{start:{line:78,column:6},end:{line:78,column:34}},21:{start:{line:80,column:4},end:{line:84,column:7}},22:{start:{line:81,column:40},end:{line:81,column:86}},23:{start:{line:85,column:22},end:{line:136,column:5}},24:{start:{line:89,column:10},end:{line:89,column:40}},25:{start:{line:95,column:10},end:{line:95,column:35}},26:{start:{line:101,column:10},end:{line:101,column:37}},27:{start:{line:107,column:10},end:{line:107,column:38}},28:{start:{line:113,column:10},end:{line:113,column:39}},29:{start:{line:119,column:10},end:{line:121,column:12}},30:{start:{line:127,column:10},end:{line:127,column:63}},31:{start:{line:133,column:10},end:{line:133,column:36}},32:{start:{line:137,column:4},end:{line:150,column:7}},33:{start:{line:138,column:6},end:{line:149,column:7}},34:{start:{line:139,column:8},end:{line:139,column:24}},35:{start:{line:140,column:8},end:{line:140,column:30}},36:{start:{line:141,column:13},end:{line:149,column:7}},37:{start:{line:142,column:25},end:{line:144,column:10}},38:{start:{line:143,column:10},end:{line:143,column:41}},39:{start:{line:145,column:8},end:{line:148,column:9}},40:{start:{line:146,column:10},end:{line:146,column:44}},41:{start:{line:147,column:10},end:{line:147,column:29}},42:{start:{line:151,column:21},end:{line:151,column:38}},43:{start:{line:152,column:4},end:{line:171,column:5}},44:{start:{line:153,column:6},end:{line:153,column:41}},45:{start:{line:154,column:6},end:{line:154,column:74}},46:{start:{line:154,column:43},end:{line:154,column:72}},47:{start:{line:155,column:6},end:{line:155,column:31}},48:{start:{line:157,column:6},end:{line:159,column:7}},49:{start:{line:158,column:8},end:{line:158,column:33}},50:{start:{line:160,column:6},end:{line:170,column:9}},51:{start:{line:161,column:8},end:{line:164,column:9}},52:{start:{line:162,column:10},end:{line:162,column:74}},53:{start:{line:163,column:10},end:{line:163,column:45}},54:{start:{line:165,column:8},end:{line:165,column:104}},55:{start:{line:165,column:50},end:{line:165,column:102}},56:{start:{line:166,column:8},end:{line:169,column:9}},57:{start:{line:167,column:10},end:{line:167,column:63}},58:{start:{line:168,column:10},end:{line:168,column:69}},59:{start:{line:172,column:4},end:{line:175,column:5}},60:{start:{line:173,column:6},end:{line:173,column:65}},61:{start:{line:174,column:6},end:{line:174,column:59}},62:{start:{line:176,column:4},end:{line: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"},s=t[r]||(t[r]={});(!s[n]||s[n].hash!==e)&&(s[n]=i);var a=s[n];return Se=function(){return a},a}Se();Se().s[0]++;window.Buffer=bq.Buffer;function Jfe(n,e){Se().f[0]++;const t=(Se().s[1]++,n.match(/\.tilehosting\.com/)),r=(Se().s[2]++,n.match(/\.maptiler\.com/)),i=(Se().s[3]++,n.match(/\.thunderforest\.com/));if(Se().s[4]++,Se().b[1][0]++,t||(Se().b[1][1]++,r)){Se().b[0][0]++;const s=(Se().s[5]++,cc.getAccessToken("openmaptiles",e,{allowFallback:!0}));if(Se().s[6]++,s)return Se().b[2][0]++,Se().s[7]++,n.replace("{key}",s);Se().b[2][1]++}else if(Se().b[0][1]++,Se().s[8]++,i){Se().b[3][0]++;const s=(Se().s[9]++,cc.getAccessToken("thunderforest",e,{allowFallback:!0}));if(Se().s[10]++,s)return Se().b[4][0]++,Se().s[11]++,n.replace("{key}",s);Se().b[4][1]++}else return Se().b[3][1]++,Se().s[12]++,n}function FF(n,e,t){return Se().f[1]++,Se().s[13]++,{...n,$root:{...n.$root,[e]:{...n.$root[e],values:t}}}}class epe extends rr.Component{constructor(t){Se().f[2]++,Se().s[14]++;super(t);kn(this,"revisionStore");kn(this,"styleStore");kn(this,"layerWatcher");kn(this,"handleKeyPress",(Se().s[65]++,t=>{Se().f[18]++,Se().s[66]++,navigator.platform.toUpperCase().indexOf("MAC")>=0?(Se().b[18][0]++,Se().s[67]++,Se().b[20][0]++,t.metaKey&&(Se().b[20][1]++,t.shiftKey)&&(Se().b[20][2]++,t.keyCode===90)?(Se().b[19][0]++,Se().s[68]++,t.preventDefault(),Se().s[69]++,this.onRedo()):(Se().b[19][1]++,Se().s[70]++,Se().b[22][0]++,t.metaKey&&(Se().b[22][1]++,t.keyCode===90)?(Se().b[21][0]++,Se().s[71]++,t.preventDefault(),Se().s[72]++,this.onUndo()):Se().b[21][1]++)):(Se().b[18][1]++,Se().s[73]++,Se().b[24][0]++,t.ctrlKey&&(Se().b[24][1]++,t.keyCode===90)?(Se().b[23][0]++,Se().s[74]++,t.preventDefault(),Se().s[75]++,this.onUndo()):(Se().b[23][1]++,Se().s[76]++,Se().b[26][0]++,t.ctrlKey&&(Se().b[26][1]++,t.keyCode===89)?(Se().b[25][0]++,Se().s[77]++,t.preventDefault(),Se().s[78]++,this.onRedo()):Se().b[25][1]++))}));kn(this,"onChangeMetadataProperty",(Se().s[89]++,(t,r)=>{Se().f[26]++,Se().s[90]++,Se().b[31][0]++,t==="maputnik:renderer"&&(Se().b[31][1]++,r!==Mq(this.state.mapStyle,["metadata","maputnik:renderer"],"mlgljs"))?(Se().b[30][0]++,Se().s[91]++,this.setState({mapState:"map"})):Se().b[30][1]++;const i=(Se().s[92]++,{...this.state.mapStyle,metadata:{...this.state.mapStyle.metadata,[t]:r}});Se().s[93]++,this.onStyleChanged(i)}));kn(this,"onStyleChanged",(Se().s[94]++,(t,r=(Se().b[32][0]++,{}))=>{Se().f[27]++,Se().s[95]++,r={save:!0,addRevision:!0,initialLoad:!1,...r},Se().s[96]++,r.initialLoad?(Se().b[33][0]++,Se().s[97]++,this.getInitialStateFromUrl(t)):Se().b[33][1]++;const i=(Se().s[98]++,Se().b[34][0]++,kf(t)||(Se().b[34][1]++,[])),s=(Se().s[99]++,[]);if(Se().s[100]++,Se().b[36][0]++,t&&(Se().b[36][1]++,t.layers)){Se().b[35][0]++;const d=(Se().s[101]++,new window.Map);Se().s[102]++,t.layers.forEach((g,b)=>{if(Se().f[28]++,Se().s[103]++,Se().b[38][0]++,g.id===""&&(Se().b[38][1]++,d.has(g.id))){Se().b[37][0]++;const E=(Se().s[104]++,new Error(`layers[${b}]: duplicate layer id [empty_string], previously used`));Se().s[105]++,s.push(E)}else Se().b[37][1]++;Se().s[106]++,d.set(g.id,!0)})}else Se().b[35][1]++;const a=(Se().s[107]++,s.concat(i).map(d=>{Se().f[29]++;const g=(Se().s[108]++,d.message.match(/layers\[(\d+)\]: (duplicate layer id "?(.*)"?, previously used)/));if(Se().s[109]++,g){Se().b[39][0]++;const[,S,O]=(Se().s[110]++,g);return Se().s[111]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:"id",message:O}}}}else Se().b[39][1]++;const b=(Se().s[112]++,d.message.match(/layers\[(\d+)\]: (source "(?:.*)" not found)/));if(Se().s[113]++,b){Se().b[40][0]++;const[,S,O]=(Se().s[114]++,b);return Se().s[115]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:"source",message:O}}}}else Se().b[40][1]++;const E=(Se().s[116]++,d.message.match(/layers\[(\d+)\]\.(?:(\S+)\.)?(\S+): (.*)/));if(Se().s[117]++,E){Se().b[41][0]++;const[,S,O,k,U]=(Se().s[118]++,E),z=(Se().s[119]++,Se().b[43][0]++,O&&(Se().b[43][1]++,k)?(Se().b[42][0]++,[O,k].join(".")):(Se().b[42][1]++,k));return Se().s[120]++,{message:d.message,parsed:{type:"layer",data:{index:parseInt(S,10),key:z,message:U}}}}else return Se().b[41][1]++,Se().s[121]++,{message:d.message}}));let o=(Se().s[122]++,void 0);Se().s[123]++,i.length>0?(Se().b[44][0]++,Se().s[124]++,o=RI(t),Se().s[125]++,i.forEach(d=>{Se().f[30]++;const{message:g}=(Se().s[126]++,d);if(Se().s[127]++,g){Se().b[45][0]++,Se().s[128]++;try{const b=(Se().s[129]++,g.split(":")[0]),E=(Se().s[130]++,b.match(/^\S+?\[\d+\]\.[^[]+/)[0]);Se().s[131]++,V2.unset(o,E)}catch(b){Se().s[132]++,console.warn(b)}}else Se().b[45][1]++})):Se().b[44][1]++,Se().s[133]++,t.glyphs!==this.state.mapStyle.glyphs?(Se().b[46][0]++,Se().s[134]++,this.updateFonts(t.glyphs)):Se().b[46][1]++,Se().s[135]++,t.sprite!==this.state.mapStyle.sprite?(Se().b[47][0]++,Se().s[136]++,this.updateIcons(t.sprite)):Se().b[47][1]++,Se().s[137]++,r.addRevision?(Se().b[48][0]++,Se().s[138]++,this.revisionStore.addRevision(t)):Se().b[48][1]++,Se().s[139]++,r.save?(Se().b[49][0]++,Se().s[140]++,this.saveStyle(t)):Se().b[49][1]++,Se().s[141]++,this.setState({mapStyle:t,dirtyMapStyle:o,errors:a},()=>{Se().f[31]++,Se().s[142]++,this.fetchSources(),Se().s[143]++,this.setStateInUrl()})}));kn(this,"onUndo",(Se().s[144]++,()=>{Se().f[32]++;const t=(Se().s[145]++,this.revisionStore.undo()),r=(Se().s[146]++,Ife(this.state.mapStyle,t));Se().s[147]++,this.onStyleChanged(t,{addRevision:!1}),Se().s[148]++,this.setState({infos:r})}));kn(this,"onRedo",(Se().s[149]++,()=>{Se().f[33]++;const t=(Se().s[150]++,this.revisionStore.redo()),r=(Se().s[151]++,kfe(this.state.mapStyle,t));Se().s[152]++,this.onStyleChanged(t,{addRevision:!1}),Se().s[153]++,this.setState({infos:r})}));kn(this,"onMoveLayer",(Se().s[154]++,t=>{Se().f[34]++;let{oldIndex:r,newIndex:i}=(Se().s[155]++,t),s=(Se().s[156]++,this.state.mapStyle.layers);if(Se().s[157]++,r=KI(r,0,s.length-1),Se().s[158]++,i=KI(i,0,s.length-1),Se().s[159]++,r===i){Se().b[50][0]++,Se().s[160]++;return}else Se().b[50][1]++;Se().s[161]++,r===this.state.selectedLayerIndex?(Se().b[51][0]++,Se().s[162]++,this.setState({selectedLayerIndex:i})):Se().b[51][1]++,Se().s[163]++,s=s.slice(0),Se().s[164]++,Bq(s,r,i),Se().s[165]++,this.onLayersChange(s)}));kn(this,"onLayersChange",(Se().s[166]++,t=>{Se().f[35]++;const r=(Se().s[167]++,{...this.state.mapStyle,layers:t});Se().s[168]++,this.onStyleChanged(r)}));kn(this,"onLayerDestroy",(Se().s[169]++,t=>{Se().f[36]++;const r=(Se().s[170]++,this.state.mapStyle.layers),i=(Se().s[171]++,r.slice(0));Se().s[172]++,i.splice(t,1),Se().s[173]++,this.onLayersChange(i)}));kn(this,"onLayerCopy",(Se().s[174]++,t=>{Se().f[37]++;const r=(Se().s[175]++,this.state.mapStyle.layers),i=(Se().s[176]++,r.slice(0)),s=(Se().s[177]++,RI(i[t]));Se().s[178]++,s.id=s.id+"-copy",Se().s[179]++,i.splice(t,0,s),Se().s[180]++,this.onLayersChange(i)}));kn(this,"onLayerVisibilityToggle",(Se().s[181]++,t=>{Se().f[38]++;const r=(Se().s[182]++,this.state.mapStyle.layers),i=(Se().s[183]++,r.slice(0)),s=(Se().s[184]++,{...i[t]}),a=(Se().s[185]++,"layout"in s?(Se().b[52][0]++,{...s.layout}):(Se().b[52][1]++,{}));Se().s[186]++,a.visibility=a.visibility==="none"?(Se().b[53][0]++,"visible"):(Se().b[53][1]++,"none"),Se().s[187]++,s.layout=a,Se().s[188]++,i[t]=s,Se().s[189]++,this.onLayersChange(i)}));kn(this,"onLayerIdChange",(Se().s[190]++,(t,r,i)=>{Se().f[39]++;const s=(Se().s[191]++,this.state.mapStyle.layers.slice(0));Se().s[192]++,s[t]={...s[t],id:i},Se().s[193]++,this.onLayersChange(s)}));kn(this,"onLayerChanged",(Se().s[194]++,(t,r)=>{Se().f[40]++;const i=(Se().s[195]++,this.state.mapStyle.layers.slice(0));Se().s[196]++,i[t]=r,Se().s[197]++,this.onLayersChange(i)}));kn(this,"setMapState",(Se().s[198]++,t=>{Se().f[41]++,Se().s[199]++,this.setState({mapState:t},this.setStateInUrl)}));kn(this,"setDefaultValues",(Se().s[200]++,t=>{Se().f[42]++;const r=(Se().s[201]++,Se().b[54][0]++,t.metadata||(Se().b[54][1]++,{}));if(Se().s[202]++,r["maputnik:renderer"]===void 0){Se().b[55][0]++;const i=(Se().s[203]++,{...t,metadata:{...t.metadata,"maputnik:renderer":"mlgljs"}});return Se().s[204]++,i}else return Se().b[55][1]++,Se().s[205]++,t}));kn(this,"openStyle",(Se().s[206]++,(t,r)=>{Se().f[43]++,Se().s[207]++,this.setState({fileHandle:r}),Se().s[208]++,t=this.setDefaultValues(t),Se().s[209]++,this.onStyleChanged(t)}));kn(this,"onMapChange",(Se().s[234]++,t=>{Se().f[49]++,Se().s[235]++,this.setState({mapView:t})}));kn(this,"setStateInUrl",(Se().s[251]++,()=>{Se().f[53]++;const{mapState:t,mapStyle:r,isOpen:i}=(Se().s[252]++,this.state),{selectedLayerIndex:s}=(Se().s[253]++,this.state),a=(Se().s[254]++,new URL(location.href)),o=(Se().s[255]++,WI(JSON.stringify(r)));Se().s[256]++,a.searchParams.set("layer",`${o}~${s}`);const d=(Se().s[257]++,Object.entries(i).map(([g,b])=>(Se().f[54]++,Se().s[258]++,b===!0?(Se().b[67][0]++,g):(Se().b[67][1]++,null))).filter(g=>(Se().f[55]++,Se().s[259]++,g!==null)));Se().s[260]++,d.length>0?(Se().b[68][0]++,Se().s[261]++,a.searchParams.set("modal",d.join(","))):(Se().b[68][1]++,Se().s[262]++,a.searchParams.delete("modal")),Se().s[263]++,t==="map"?(Se().b[69][0]++,Se().s[264]++,a.searchParams.delete("view")):(Se().b[69][1]++,Se().s[265]++,t==="inspect"?(Se().b[70][0]++,Se().s[266]++,a.searchParams.set("view","inspect")):Se().b[70][1]++),Se().s[267]++,history.replaceState({selectedLayerIndex:s},"Maputnik",a.href)}));kn(this,"getInitialStateFromUrl",(Se().s[268]++,t=>{Se().f[56]++;const r=(Se().s[269]++,new URL(location.href)),i=(Se().s[270]++,r.searchParams.get("modal"));if(Se().s[271]++,Se().b[72][0]++,i&&(Se().b[72][1]++,i!=="")){Se().b[71][0]++;const o=(Se().s[272]++,i.split(",")),d=(Se().s[273]++,{});Se().s[274]++,o.forEach(g=>{Se().f[57]++,Se().s[275]++,d[g]=!0}),Se().s[276]++,this.setState({isOpen:{...this.state.isOpen,...d}})}else Se().b[71][1]++;const s=(Se().s[277]++,r.searchParams.get("view"));Se().s[278]++,Se().b[74][0]++,s&&(Se().b[74][1]++,s!=="")?(Se().b[73][0]++,Se().s[279]++,this.setMapState(s)):Se().b[73][1]++;const a=(Se().s[280]++,r.searchParams.get("layer"));if(Se().s[281]++,a){Se().b[75][0]++,Se().s[282]++;try{const o=(Se().s[283]++,a.split("~")),[d,g]=(Se().s[284]++,[o[0],parseInt(o[1],10)]);let b=(Se().s[285]++,!0);if(Se().s[286]++,d!=="-"){Se().b[76][0]++;const E=(Se().s[287]++,WI(JSON.stringify(t)));Se().s[288]++,E!==parseInt(d,10)?(Se().b[77][0]++,Se().s[289]++,b=!1):Se().b[77][1]++}else Se().b[76][1]++;Se().s[290]++,b?(Se().b[78][0]++,Se().s[291]++,this.setState({selectedLayerIndex:g,selectedLayerOriginalId:t.layers[g].id})):Se().b[78][1]++}catch(o){Se().s[292]++,console.warn(o)}}else Se().b[75][1]++}));kn(this,"onLayerSelect",(Se().s[293]++,t=>{Se().f[58]++,Se().s[294]++,this.setState({selectedLayerIndex:t,selectedLayerOriginalId:this.state.mapStyle.layers[t].id},this.setStateInUrl)}));kn(this,"onChangeOpenlayersDebug",(Se().s[298]++,(t,r)=>{Se().f[62]++,Se().s[299]++,this.setState({openlayersDebugOptions:{...this.state.openlayersDebugOptions,[t]:r}})}));kn(this,"onChangeMaplibreGlDebug",(Se().s[300]++,(t,r)=>{Se().f[63]++,Se().s[301]++,this.setState({maplibreGlDebugOptions:{...this.state.maplibreGlDebugOptions,[t]:r}})}));Se().s[15]++,hq(this),Se().s[16]++,this.revisionStore=new Gfe;const r=(Se().s[17]++,new URLSearchParams(window.location.search.substring(1)));let i=(Se().s[18]++,r.get("localport"));Se().s[19]++,Se().b[6][0]++,i==null&&(Se().b[6][1]++,window.location.port!=="80")&&(Se().b[6][2]++,window.location.port!=="443")?(Se().b[5][0]++,Se().s[20]++,i=window.location.port):Se().b[5][1]++,Se().s[21]++,this.styleStore=new Wfe({onLocalStyleChange:o=>(Se().f[3]++,Se().s[22]++,this.onStyleChanged(o,{save:!1})),port:i,host:r.get("localhost")});const s=(Se().s[23]++,[{key:"?",handler:()=>{Se().f[4]++,Se().s[24]++,this.toggleModal("shortcuts")}},{key:"o",handler:()=>{Se().f[5]++,Se().s[25]++,this.toggleModal("open")}},{key:"e",handler:()=>{Se().f[6]++,Se().s[26]++,this.toggleModal("export")}},{key:"d",handler:()=>{Se().f[7]++,Se().s[27]++,this.toggleModal("sources")}},{key:"s",handler:()=>{Se().f[8]++,Se().s[28]++,this.toggleModal("settings")}},{key:"i",handler:()=>{Se().f[9]++,Se().s[29]++,this.setMapState(this.state.mapState==="map"?(Se().b[7][0]++,"inspect"):(Se().b[7][1]++,"map"))}},{key:"m",handler:()=>{Se().f[10]++,Se().s[30]++,document.querySelector(".maplibregl-canvas").focus()}},{key:"!",handler:()=>{Se().f[11]++,Se().s[31]++,this.toggleModal("debug")}}]);Se().s[32]++,document.body.addEventListener("keyup",o=>{if(Se().f[12]++,Se().s[33]++,o.key==="Escape")Se().b[8][0]++,Se().s[34]++,o.target.blur(),Se().s[35]++,document.body.focus();else if(Se().b[8][1]++,Se().s[36]++,Se().b[10][0]++,this.state.isOpen.shortcuts||(Se().b[10][1]++,document.activeElement===document.body)){Se().b[9][0]++;const d=(Se().s[37]++,s.find(g=>(Se().f[13]++,Se().s[38]++,g.key===o.key)));Se().s[39]++,d?(Se().b[11][0]++,Se().s[40]++,this.setModal("shortcuts",!1),Se().s[41]++,d.handler()):Se().b[11][1]++}else Se().b[9][1]++});const a=(Se().s[42]++,Ofe());Se().s[43]++,Se().b[13][0]++,a&&(Se().b[13][1]++,window.confirm("Load style from URL: "+a+" and discard current changes?"))?(Se().b[12][0]++,Se().s[44]++,this.styleStore=new RF,Se().s[45]++,ZW(a,o=>(Se().f[14]++,Se().s[46]++,this.onStyleChanged(o))),Se().s[47]++,IF()):(Se().b[12][1]++,Se().s[48]++,a?(Se().b[14][0]++,Se().s[49]++,IF()):Se().b[14][1]++,Se().s[50]++,this.styleStore.init(o=>{Se().f[15]++,Se().s[51]++,o?(Se().b[15][0]++,Se().s[52]++,console.log("Falling back to local storage for storing styles"),Se().s[53]++,this.styleStore=new RF):Se().b[15][1]++,Se().s[54]++,this.styleStore.latestStyle(d=>(Se().f[16]++,Se().s[55]++,this.onStyleChanged(d,{initialLoad:!0}))),Se().s[56]++,Ag.enabled()?(Se().b[16][0]++,Se().s[57]++,Ag.set("maputnik","styleStore",this.styleStore),Se().s[58]++,Ag.set("maputnik","revisionStore",this.revisionStore)):Se().b[16][1]++})),Se().s[59]++,Ag.enabled()?(Se().b[17][0]++,Se().s[60]++,Ag.set("maputnik","revisionStore",this.revisionStore),Se().s[61]++,Ag.set("maputnik","styleStore",this.styleStore)):Se().b[17][1]++,Se().s[62]++,this.state={errors:[],infos:[],mapStyle:cc.emptyStyle,selectedLayerIndex:0,sources:{},vectorLayers:{},mapState:"map",spec:Ys,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},Se().s[63]++,this.layerWatcher=new Hfe({onVectorLayersChange:o=>(Se().f[17]++,Se().s[64]++,this.setState({vectorLayers:o}))})}componentDidMount(){Se().f[19]++,Se().s[79]++,window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){Se().f[20]++,Se().s[80]++,window.removeEventListener("keydown",this.handleKeyPress)}saveStyle(t){Se().f[21]++,Se().s[81]++,this.styleStore.save(t)}updateFonts(t){Se().f[22]++;const r=(Se().s[82]++,Se().b[27][0]++,this.state.mapStyle.metadata||(Se().b[27][1]++,{})),i=(Se().s[83]++,Se().b[28][0]++,r["maputnik:openmaptiles_access_token"]||(Se().b[28][1]++,PW.openmaptiles)),s=(Se().s[84]++,typeof t=="string"?(Se().b[29][0]++,t.replace("{key}",i)):(Se().b[29][1]++,t));Se().s[85]++,Efe(s,a=>{Se().f[23]++,Se().s[86]++,this.setState({spec:FF(this.state.spec,"glyphs",a)})})}updateIcons(t){Se().f[24]++,Se().s[87]++,Bfe(t,r=>{Se().f[25]++,Se().s[88]++,this.setState({spec:FF(this.state.spec,"sprite",r)})})}fetchSources(){Se().f[44]++;const t=(Se().s[210]++,{});Se().s[211]++;for(const[r,i]of Object.entries(this.state.mapStyle.sources))if(Se().s[212]++,Se().b[57][0]++,!Object.prototype.hasOwnProperty.call(this.state.sources,r)&&(Se().b[57][1]++,i.type==="vector")&&(Se().b[57][2]++,Object.prototype.hasOwnProperty.call(i,"url"))){Se().b[56][0]++,Se().s[213]++,t[r]={type:i.type,layers:[]};let s=(Se().s[214]++,i.url);Se().s[215]++;try{Se().s[216]++,s=Jfe(s,this.state.mapStyle)}catch(a){Se().s[217]++,console.warn("Failed to setFetchAccessToken: ",a)}Se().s[218]++,fetch(s,{mode:"cors"}).then(a=>(Se().f[45]++,Se().s[219]++,a.json())).then(a=>{if(Se().f[46]++,Se().s[220]++,Object.prototype.hasOwnProperty.call(a,"vector_layers"))Se().b[58][1]++;else{Se().b[58][0]++,Se().s[221]++;return}const o=(Se().s[222]++,Object.assign({},{[r]:this.state.sources[r]}));Se().s[223]++;for(const d of a.vector_layers)Se().s[224]++,o[r].layers.push(d.id);Se().s[225]++,console.debug("Updating source: "+r),Se().s[226]++,this.setState({sources:o})}).catch(a=>{Se().f[47]++,Se().s[227]++,console.error("Failed to process sources for '%s'",s,a)})}else Se().b[56][1]++,Se().s[228]++,t[r]=(Se().b[59][0]++,this.state.sources[r]||(Se().b[59][1]++,this.state.mapStyle.sources[r]));Se().s[229]++,yB(this.state.sources,t)?Se().b[60][1]++:(Se().b[60][0]++,Se().s[230]++,console.debug("Setting sources"),Se().s[231]++,this.setState({sources:t}))}_getRenderer(){Se().f[48]++;const t=(Se().s[232]++,Se().b[61][0]++,this.state.mapStyle.metadata||(Se().b[61][1]++,{}));return Se().s[233]++,Se().b[62][0]++,t["maputnik:renderer"]||(Se().b[62][1]++,"mlgljs")}mapRenderer(){Se().f[50]++;const{mapStyle:t,dirtyMapStyle:r}=(Se().s[236]++,this.state),i=(Se().s[237]++,{mapStyle:(Se().b[63][0]++,r||(Se().b[63][1]++,t)),replaceAccessTokens:g=>(Se().f[51]++,Se().s[238]++,cc.replaceAccessTokens(g,{allowFallback:!0})),onDataChange:g=>{Se().f[52]++,Se().s[239]++,this.layerWatcher.analyzeMap(g.map),Se().s[240]++,this.fetchSources()}}),s=(Se().s[241]++,this._getRenderer());let a;Se().s[242]++,s==="ol"?(Se().b[64][0]++,Se().s[243]++,a=le.jsx(foe,{...i,onChange:this.onMapChange,debugToolbox:this.state.openlayersDebugOptions.debugToolbox,onLayerSelect:this.onLayerSelect})):(Se().b[64][1]++,Se().s[244]++,a=le.jsx(hZ,{...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 o;Se().s[245]++,this.state.mapState.match(/^filter-/)?(Se().b[65][0]++,Se().s[246]++,o=this.state.mapState.replace(/^filter-/,"")):Se().b[65][1]++;const d=(Se().s[247]++,{});return Se().s[248]++,o?(Se().b[66][0]++,Se().s[249]++,d.filter=`url('#${o}')`):Se().b[66][1]++,Se().s[250]++,le.jsx("div",{style:d,className:"maputnik-map__container","data-wd-key":"maplibre:container",children:a})}setModal(t,r){Se().f[59]++,Se().s[295]++,this.setState({isOpen:{...this.state.isOpen,[t]:r}},this.setStateInUrl)}toggleModal(t){Se().f[60]++,Se().s[296]++,this.setModal(t,!this.state.isOpen[t])}onSetFileHandle(t){Se().f[61]++,Se().s[297]++,this.setState({fileHandle:t})}render(){Se().f[64]++;const t=(Se().s[302]++,Se().b[79][0]++,this.state.mapStyle.layers||(Se().b[79][1]++,[])),r=(Se().s[303]++,t.length>0?(Se().b[80][0]++,t[this.state.selectedLayerIndex]):(Se().b[80][1]++,void 0)),i=(Se().s[304]++,le.jsx(Nde,{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)})),s=(Se().s[305]++,le.jsx(kae,{onMoveLayer:this.onMoveLayer,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayersChange:this.onLayersChange,onLayerSelect:this.onLayerSelect,selectedLayerIndex:this.state.selectedLayerIndex,layers:t,sources:this.state.sources,errors:this.state.errors})),a=(Se().s[306]++,r?(Se().b[81][0]++,le.jsx(ude,{layer:r,layerIndex:this.state.selectedLayerIndex,isFirstLayer:this.state.selectedLayerIndex<1,isLastLayer:this.state.selectedLayerIndex===this.state.mapStyle.layers.length-1,sources:this.state.sources,vectorLayers:this.state.vectorLayers,spec:this.state.spec,onMoveLayer:this.onMoveLayer,onLayerChanged:this.onLayerChanged,onLayerDestroy:this.onLayerDestroy,onLayerCopy:this.onLayerCopy,onLayerVisibilityToggle:this.onLayerVisibilityToggle,onLayerIdChange:this.onLayerIdChange,errors:this.state.errors},this.state.selectedLayerOriginalId)):(Se().b[81][1]++,void 0)),o=(Se().s[307]++,this.state.errors.length+this.state.infos.length>0?(Se().b[82][0]++,le.jsx(Qde,{currentLayer:r,selectedLayerIndex:this.state.selectedLayerIndex,onLayerSelect:this.onLayerSelect,mapStyle:this.state.mapStyle,errors:this.state.errors,infos:this.state.infos})):(Se().b[82][1]++,void 0)),d=(Se().s[308]++,le.jsxs("div",{children:[le.jsx(Whe,{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}),le.jsx(jhe,{isOpen:this.state.isOpen.shortcuts,onOpenToggle:this.toggleModal.bind(this,"shortcuts")}),le.jsx(Vde,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,onChangeMetadataProperty:this.onChangeMetadataProperty,isOpen:this.state.isOpen.settings,onOpenToggle:this.toggleModal.bind(this,"settings")}),le.jsx(fhe,{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}),le.jsx(Uhe,{isOpen:this.state.isOpen.open,onStyleOpen:this.openStyle,onOpenToggle:this.toggleModal.bind(this,"open"),fileHandle:this.state.fileHandle}),le.jsx(khe,{mapStyle:this.state.mapStyle,onStyleChanged:this.onStyleChanged,isOpen:this.state.isOpen.sources,onOpenToggle:this.toggleModal.bind(this,"sources")})]}));return Se().s[309]++,le.jsx(Gde,{toolbar:i,layerList:s,layerEditor:a,map:this.mapRenderer(),bottom:o,modals:d})}}const tpe=eQ.createRoot(document.querySelector("#app"));tpe.render(le.jsx(ZE.Provider,{value:{className:"react-icons"},children:le.jsx(epe,{})}));document.querySelector(".loading").style.display="none";
|
||
//# sourceMappingURL=index-DNdo-Inm.js.map
|