@opensystemslab/map 0.3.7 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/map.es.js +12 -8
- package/dist/map.umd.js +12 -8
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/types/my-map.d.ts +5 -1
- package/types/os-layers.d.ts +2 -2
package/dist/map.umd.js
CHANGED
@@ -14,7 +14,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
14
14
|
* Copyright 2017 Google LLC
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
16
16
|
*/
|
17
|
-
var y,g,m,v;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null===(l=(a=globalThis).reactiveElementPlatformSupport)||void 0===l||l.call(a,{ReactiveElement:f}),(null!==(u=(h=globalThis).reactiveElementVersions)&&void 0!==u?u:h.reactiveElementVersions=[]).push("1.0.0-rc.2");const _=globalThis.trustedTypes,x=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,w="?"+b,S=`<${w}>`,C=document,T=(t="")=>C.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,R=/>/g,I=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,F=/'/g,
|
17
|
+
var y,g,m,v;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null===(l=(a=globalThis).reactiveElementPlatformSupport)||void 0===l||l.call(a,{ReactiveElement:f}),(null!==(u=(h=globalThis).reactiveElementVersions)&&void 0!==u?u:h.reactiveElementVersions=[]).push("1.0.0-rc.2");const _=globalThis.trustedTypes,x=_?_.createPolicy("lit-html",{createHTML:t=>t}):void 0,b=`lit$${(Math.random()+"").slice(9)}$`,w="?"+b,S=`<${w}>`,C=document,T=(t="")=>C.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,R=/>/g,I=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,F=/'/g,M=/"/g,j=/^(?:script|style|textarea)$/i,A=(N=1,(t,...e)=>({_$litType$:N,strings:t,values:e})),L=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),z=new WeakMap,G=C.createTreeWalker(C,129,null,!1);var N,B,W,q,V,U,X;class K{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[l,u]=((t,e)=>{const i=t.length-1,n=[];let r,o=2===e?"<svg>":"",s=P;for(let l=0;l<i;l++){const e=t[l];let i,a,u=-1,h=0;for(;h<e.length&&(s.lastIndex=h,a=s.exec(e),null!==a);)h=s.lastIndex,s===P?"!--"===a[1]?s=O:void 0!==a[1]?s=R:void 0!==a[2]?(j.test(a[2])&&(r=RegExp("</"+a[2],"g")),s=I):void 0!==a[3]&&(s=I):s===I?">"===a[0]?(s=null!=r?r:P,u=-1):void 0===a[1]?u=-2:(u=s.lastIndex-a[2].length,i=a[1],s=void 0===a[3]?I:'"'===a[3]?M:F):s===M||s===F?s=I:s===O||s===R?s=P:(s=I,r=void 0);const c=s===I&&t[l+1].startsWith("/>")?" ":"";o+=s===P?e+S:u>=0?(n.push(i),e.slice(0,u)+"$lit$"+e.slice(u)+b+c):e+b+(-2===u?(n.push(void 0),l):c)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");return[void 0!==x?x.createHTML(a):a,n]})(t,e);if(this.el=K.createElement(l,i),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=G.nextNode())&&a.length<s;){if(1===n.nodeType){if(n.hasAttributes()){const t=[];for(const e of n.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(b)){const i=u[o++];if(t.push(e),void 0!==i){const t=n.getAttribute(i.toLowerCase()+"$lit$").split(b),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?J:"?"===e[1]?Q:"@"===e[1]?tt:$})}else a.push({type:6,index:r})}for(const e of t)n.removeAttribute(e)}if(j.test(n.tagName)){const t=n.textContent.split(b),e=t.length-1;if(e>0){n.textContent=_?_.emptyScript:"";for(let i=0;i<e;i++)n.append(t[i],T()),G.nextNode(),a.push({type:2,index:++r});n.append(t[e],T())}}}else if(8===n.nodeType)if(n.data===w)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=n.data.indexOf(b,t+1));)a.push({type:7,index:r}),t+=b.length-1}r++}}static createElement(t,e){const i=C.createElement("template");return i.innerHTML=t,i}}function Y(t,e,i=t,n){var r,o,s,a;if(e===L)return e;let l=void 0!==n?null===(r=i.Σi)||void 0===r?void 0:r[n]:i.Σo;const u=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==u&&(null===(o=null==l?void 0:l.O)||void 0===o||o.call(l,!1),void 0===u?l=void 0:(l=new u(t),l.T(t,i,n)),void 0!==n?(null!==(s=(a=i).Σi)&&void 0!==s?s:a.Σi=[])[n]=l:i.Σo=l),void 0!==l&&(e=Y(t,l.S(t,e.values),l,n)),e}class Z{constructor(t,e){this.l=[],this.N=void 0,this.D=t,this.M=e}u(t){var e;const{el:{content:i},parts:n}=this.D,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:C).importNode(i,!0);G.currentNode=r;let o=G.nextNode(),s=0,a=0,l=n[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new H(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new et(o,this,t)),this.l.push(e),l=n[++a]}s!==(null==l?void 0:l.index)&&(o=G.nextNode(),s++)}return r}v(t){let e=0;for(const i of this.l)void 0!==i&&(void 0!==i.strings?(i.I(t,i,e),e+=i.strings.length-2):i.I(t[e])),e++}}class H{constructor(t,e,i,n){this.type=2,this.N=void 0,this.A=t,this.B=e,this.M=i,this.options=n}setConnected(t){var e;null===(e=this.P)||void 0===e||e.call(this,t)}get parentNode(){return this.A.parentNode}get startNode(){return this.A}get endNode(){return this.B}I(t,e=this){t=Y(this,t,e),E(t)?t===D||null==t||""===t?(this.H!==D&&this.R(),this.H=D):t!==this.H&&t!==L&&this.m(t):void 0!==t._$litType$?this._(t):void 0!==t.nodeType?this.$(t):(t=>{var e;return k(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.g(t):this.m(t)}k(t,e=this.B){return this.A.parentNode.insertBefore(t,e)}$(t){this.H!==t&&(this.R(),this.H=this.k(t))}m(t){const e=this.A.nextSibling;null!==e&&3===e.nodeType&&(null===this.B?null===e.nextSibling:e===this.B.previousSibling)?e.data=t:this.$(C.createTextNode(t)),this.H=t}_(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this.C(t):(void 0===n.el&&(n.el=K.createElement(n.h,this.options)),n);if((null===(e=this.H)||void 0===e?void 0:e.D)===r)this.H.v(i);else{const t=new Z(r,this),e=t.u(this.options);t.v(i),this.$(e),this.H=t}}C(t){let e=z.get(t.strings);return void 0===e&&z.set(t.strings,e=new K(t)),e}g(t){k(this.H)||(this.H=[],this.R());const e=this.H;let i,n=0;for(const r of t)n===e.length?e.push(i=new H(this.k(T()),this.k(T()),this,this.options)):i=e[n],i.I(r),n++;n<e.length&&(this.R(i&&i.B.nextSibling,n),e.length=n)}R(t=this.A.nextSibling,e){var i;for(null===(i=this.P)||void 0===i||i.call(this,!1,!0,e);t&&t!==this.B;){const e=t.nextSibling;t.remove(),t=e}}}class ${constructor(t,e,i,n,r){this.type=1,this.H=D,this.N=void 0,this.V=void 0,this.element=t,this.name=e,this.M=n,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill(D),this.strings=i):this.H=D}get tagName(){return this.element.tagName}I(t,e=this,i,n){const r=this.strings;let o=!1;if(void 0===r)t=Y(this,t,e,0),o=!E(t)||t!==this.H&&t!==L,o&&(this.H=t);else{const n=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=Y(this,n[i+s],e,s),a===L&&(a=this.H[s]),o||(o=!E(a)||a!==this.H[s]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+r[s+1]),this.H[s]=a}o&&!n&&this.W(t)}W(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends ${constructor(){super(...arguments),this.type=3}W(t){this.element[this.name]=t===D?void 0:t}}class Q extends ${constructor(){super(...arguments),this.type=4}W(t){t&&t!==D?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class tt extends ${constructor(){super(...arguments),this.type=5}I(t,e=this){var i;if((t=null!==(i=Y(this,t,e,0))&&void 0!==i?i:D)===L)return;const n=this.H,r=t===D&&n!==D||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this.H=t}handleEvent(t){var e,i;"function"==typeof this.H?this.H.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this.H.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this.N=void 0,this.V=void 0,this.M=e,this.options=i}I(t){Y(this,t)}}null===(g=(y=globalThis).litHtmlPlatformSupport)||void 0===g||g.call(y,K,H),(null!==(m=(v=globalThis).litHtmlVersions)&&void 0!==m?m:v.litHtmlVersions=[]).push("2.0.0-rc.3"),(null!==(B=(X=globalThis).litElementVersions)&&void 0!==B?B:X.litElementVersions=[]).push("3.0.0-rc.2");class it extends f{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=((t,e,i)=>{var n,r;const o=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new H(e.insertBefore(T(),t),t,void 0,i)}return s.I(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return L}}it.finalized=!0,it._$litElement$=!0,null===(q=(W=globalThis).litElementHydrateSupport)||void 0===q||q.call(W,{LitElement:it}),null===(U=(V=globalThis).litElementPlatformSupport)||void 0===U||U.call(V,{LitElement:it});
|
18
18
|
/**
|
19
19
|
* @license
|
20
20
|
* Copyright 2017 Google LLC
|
@@ -25,11 +25,9 @@ const nt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?__spr
|
|
25
25
|
* @license
|
26
26
|
* Copyright 2017 Google LLC
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
28
|
-
*/function rt(t){return(e,i)=>{return void 0!==i?(n=t,r=i,void e.constructor.createProperty(r,n)):nt(t,e);var n,r}}var ot=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),st="propertychange",at=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function lt(t,e){return t>e?1:t<e?-1:0}function ut(t,e,i){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var r=void 0;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof i?i(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return n-1}function ht(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function ct(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,r=0;r<n;r++)t[t.length]=i[r]}function pt(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function dt(){return!0}function ft(){return!1}function yt(){}var gt="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function mt(t){for(var e in t)delete t[e]}var vt="function"==typeof Object.values?Object.values:function(t){var e=[];for(var i in t)e.push(t[i]);return e};function _t(t){var e;for(e in t)return!1;return!e}var xt,bt=(xt=function(t,e){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),wt=function(t){function e(e){var i=t.call(this)||this;return i.eventTarget_=e,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return bt(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new ot(t):t,i=e.type;e.target||(e.target=this.eventTarget_||this);var n,r=this.listeners_&&this.listeners_[i];if(r){var o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,s[i]=0),++o[i];for(var a=0,l=r.length;a<l;++a)if(!1===(n="handleEvent"in r[a]?r[a].handleEvent(e):r[a].call(this,e))||e.propagationStopped){n=!1;break}if(--o[i],0===o[i]){var u=s[i];for(delete s[i];u--;)this.removeEventListener(i,yt);delete o[i]}return n}},e.prototype.disposeInternal=function(){this.listeners_&&mt(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=yt,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(at),St="change",Ct="error",Tt="clear",Et="contextmenu",kt="click",Pt="dblclick",Ot="keydown",Rt="keypress",It="load",Ft="resize",jt="touchmove",Mt="wheel";function At(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var o=i;i=function(){t.removeEventListener(e,i),o.apply(this,arguments)}}var s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function Lt(t,e,i,n){return At(t,e,i,n,!0)}function zt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),mt(t))}var Dt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gt=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return Dt(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(St)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=At(this,t[r],e);return n}return At(this,t,e)},e.prototype.onceInternal=function(t,e){var i;if(Array.isArray(t)){var n=t.length;i=new Array(n);for(var r=0;r<n;++r)i[r]=Lt(this,t[r],e)}else i=Lt(this,t,e);return e.ol_key=i,i},e.prototype.unInternal=function(t,e){var i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)zt(t[e]);else zt(t)}(i);else if(Array.isArray(t))for(var n=0,r=t.length;n<r;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(wt);Gt.prototype.on,Gt.prototype.once,Gt.prototype.un;var Nt=Gt;function Bt(){return function(){throw new Error("Unimplemented abstract method.")}()}var Wt=0;function qt(t){return t.ol_uid||(t.ol_uid=String(++Wt))}var Vt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ut=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.key=i,r.oldValue=n,r}return Vt(e,t),e}(ot),Xt=function(t){function e(e){var i=t.call(this)||this;return i.on,i.once,i.un,qt(i),i.values_=null,void 0!==e&&i.setProperties(e),i}return Vt(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&>({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var i;i="change:"+t,this.dispatchEvent(new Ut(i,t,e)),i=st,this.dispatchEvent(new Ut(i,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,i){var n=this.values_||(this.values_={});if(i)n[t]=e;else{var r=n[t];n[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.applyProperties=function(t){t.values_&>(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],_t(this.values_)&&(this.values_=null),e||this.notify(t,i)}},e}(Nt),Kt="postrender",Yt="movestart",Zt="moveend",Ht="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",$t=-1!==Ht.indexOf("firefox");-1!==Ht.indexOf("safari")&&Ht.indexOf("chrom");var Jt=-1!==Ht.indexOf("webkit")&&-1==Ht.indexOf("edge"),Qt=-1!==Ht.indexOf("macintosh"),te="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,ee="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,ie="undefined"!=typeof Image&&Image.prototype.decode,ne=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(i){}return t}();function re(t,e,i,n){var r=i&&i.length?i.shift():ee?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(r.width=t),e&&(r.height=e),r.getContext("2d",n)}function oe(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function se(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var ae=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),le=function(t){function e(e){var i=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return ae(e,t),e.prototype.disposeInternal=function(){se(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&se(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)zt(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==yt&&this.listenerKeys.push(At(t,Kt,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(Xt),ue="ol-hidden",he="ol-unselectable",ce="ol-control",pe="ol-collapsed",de=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"),fe=["style","variant","weight","size","lineHeight","family"],ye=function(t){var e=t.match(de);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=fe.length;n<r;++n){var o=e[n+1];void 0!==o&&(i[fe[n]]=o)}return i.families=i.family.split(/,\s?/),i},ge="opacity",me="visible",ve="extent",_e="zIndex",xe="maxResolution",be="minResolution",we="maxZoom",Se="minZoom",Ce="source",Te=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ee=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.6.1".split("-")[0])+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return Te(e,t),e}(Error);function ke(t,e){if(!t)throw new Ee(e)}function Pe(t,e,i){return Math.min(Math.max(t,e),i)}var Oe="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Re="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Ie(t,e,i,n,r,o){var s=r-i,a=o-n;if(0!==s||0!==a){var l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return Fe(t,e,i,n)}function Fe(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o}function je(t){return t*Math.PI/180}function Me(t,e){var i=t%e;return i*e<0?i+e:i}function Ae(t,e,i){return t+i*(e-t)}var Le=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ze=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=gt({},e);return"object"==typeof e.properties&&(delete n.properties,gt(n,e.properties)),n[ge]=void 0!==e.opacity?e.opacity:1,ke("number"==typeof n[ge],64),n[me]=void 0===e.visible||e.visible,n[_e]=e.zIndex,n[xe]=void 0!==e.maxResolution?e.maxResolution:1/0,n[be]=void 0!==e.minResolution?e.minResolution:0,n[Se]=void 0!==e.minZoom?e.minZoom:-1/0,n[we]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return Le(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=Pe(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return Bt()},e.prototype.getLayerStatesArray=function(t){return Bt()},e.prototype.getExtent=function(){return this.get(ve)},e.prototype.getMaxResolution=function(){return this.get(xe)},e.prototype.getMinResolution=function(){return this.get(be)},e.prototype.getMinZoom=function(){return this.get(Se)},e.prototype.getMaxZoom=function(){return this.get(we)},e.prototype.getOpacity=function(){return this.get(ge)},e.prototype.getSourceState=function(){return Bt()},e.prototype.getVisible=function(){return this.get(me)},e.prototype.getZIndex=function(){return this.get(_e)},e.prototype.setExtent=function(t){this.set(ve,t)},e.prototype.setMaxResolution=function(t){this.set(xe,t)},e.prototype.setMinResolution=function(t){this.set(be,t)},e.prototype.setMaxZoom=function(t){this.set(we,t)},e.prototype.setMinZoom=function(t){this.set(Se,t)},e.prototype.setOpacity=function(t){ke("number"==typeof t,64),this.set(ge,t)},e.prototype.setVisible=function(t){this.set(me,t)},e.prototype.setZIndex=function(t){this.set(_e,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Xt),De="prerender",Ge="postrender",Ne="precompose",Be="postcompose",We="rendercomplete",qe="undefined",Ve="ready",Ue=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Xe(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Ke=function(t){function e(e){var i=this,n=gt({},e);delete n.source,(i=t.call(this,n)||this).on,i.once,i.un,i.mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addChangeListener(Ce,i.handleSourcePropertyChange_);var r=e.source?e.source:null;return i.setSource(r),i}return Ue(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(Ce)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():qe},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(zt(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=At(t,St,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(zt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(zt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=At(t,Ne,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);ke(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=At(this,St,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Ce,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(ze),Ye=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ze=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.expandClassName?n.expandClassName:r+"-expand",a=void 0!==n.collapseLabel?n.collapseLabel:"»",l=void 0!==n.collapseClassName?n.collapseClassName:r+"-collpase";"string"==typeof a?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=a,i.collapseLabel_.className=l):i.collapseLabel_=a;var u=void 0!==n.label?n.label:"i";"string"==typeof u?(i.label_=document.createElement("span"),i.label_.textContent=u,i.label_.className=s):i.label_=u;var h=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_;i.toggleButton_=document.createElement("button"),i.toggleButton_.setAttribute("type","button"),i.toggleButton_.setAttribute("aria-expanded",String(!i.collapsed_)),i.toggleButton_.title=o,i.toggleButton_.appendChild(h),i.toggleButton_.addEventListener(kt,i.handleClick_.bind(i),!1);var c=r+" "+"ol-unselectable "+ce+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),p=i.element;return p.className=c,p.appendChild(i.toggleButton_),p.appendChild(i.ulElement_),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return Ye(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,r=t.layerStatesArray,o=0,s=r.length;o<s;++o){var a=r[o];if(Xe(a,t.viewState)){var l=a.layer.getSource();if(l){var u=l.getAttributions();if(u){var h=u(t);if(h)if(n=n&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var c=0,p=h.length;c<p;++c)h[c]in e||(i.push(h[c]),e[h[c]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(n),i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!pt(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var n=0,r=e.length;n<r;++n){var o=document.createElement("li");o.innerHTML=e[n],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(pe),this.collapsed_?oe(this.collapseLabel_,this.label_):oe(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(le),He="add",$e="remove",Je=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qe="length",ti=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return Je(e,t),e}(ot),ei=function(t){function e(e,i){var n=t.call(this)||this;n.on,n.once,n.un;var r=i||{};if(n.unique_=!!r.unique,n.array_=e||[],n.unique_)for(var o=0,s=n.array_.length;o<s;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return Je(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(Qe)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new ti(He,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ti($e,e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new ti($e,n,t)),this.dispatchEvent(new ti(He,e,t))}else{for(var r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(Qe,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Ee(58)},e}(Xt);function ii(t){return Math.pow(t,3)}function ni(t){return 1-ii(1-t)}function ri(t){return 3*t*t-2*t*t*t}function oi(t){return t}var si=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ai=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var r=void 0!==n.className?n.className:"ol-rotate",o=void 0!==n.label?n.label:"⇧",s=void 0!==n.compassClassName?n.compassClassName:"ol-compass";i.label_=null,"string"==typeof o?(i.label_=document.createElement("span"),i.label_.className=s,i.label_.textContent=o):(i.label_=o,i.label_.classList.add(s));var a=n.tipLabel?n.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(i.label_),l.addEventListener(kt,i.handleClick_.bind(i),!1);var u=r+" "+"ol-unselectable "+ce,h=i.element;return h.className=u,h.appendChild(l),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add(ue),i}return si(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:ni}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains(ue);r||0!==i?r&&0!==i&&this.element.classList.remove(ue):this.element.classList.add(ue)}this.label_.style.transform=n}this.rotation_=i}},e}(le),li=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ui=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInClassName?n.zoomInClassName:r+"-in",a=void 0!==n.zoomOutClassName?n.zoomOutClassName:r+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",u=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",h=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",c=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=h,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(kt,i.handleClick_.bind(i,o),!1);var d=document.createElement("button");d.className=a,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof u?document.createTextNode(u):u),d.addEventListener(kt,i.handleClick_.bind(i,-o),!1);var f=r+" "+"ol-unselectable "+ce,y=i.element;return y.className=f,y.appendChild(p),y.appendChild(d),i.duration_=void 0!==n.duration?n.duration:250,i}return li(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:ni})):e.setZoom(n)}}},e}(le),hi="pointermove",ci="pointerdown",pi={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},di={};di[pi.DEGREES]=2*Math.PI*6370997/360,di[pi.FEET]=.3048,di[pi.METERS]=1,di[pi.USFEET]=1200/3937;var fi=pi,yi=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||di[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}(),gi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mi=6378137,vi=Math.PI*mi,_i=[-vi,-vi,vi,vi],xi=[-180,-85,180,85],bi=mi*Math.log(Math.tan(Math.PI/2)),wi=function(t){function e(e){return t.call(this,{code:e,units:fi.METERS,extent:_i,global:!0,worldExtent:xi,getPointResolution:function(t,e){return t/Oe(e[1]/mi)}})||this}return gi(e,t),e}(yi),Si=[new wi("EPSG:3857"),new wi("EPSG:102100"),new wi("EPSG:102113"),new wi("EPSG:900913"),new wi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ci(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s<n;s+=r){o[s]=vi*t[s]/180;var a=mi*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>bi?a=bi:a<-bi&&(a=-bi),o[s+1]=a}return o}function Ti(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s<n;s+=r)o[s]=180*t[s]/vi,o[s+1]=360*Math.atan(Math.exp(t[s+1]/mi))/Math.PI-90;return o}var Ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ki=[-180,-90,180,90],Pi=6378137*Math.PI/180,Oi=function(t){function e(e,i){return t.call(this,{code:e,units:fi.DEGREES,extent:ki,axisOrientation:i,global:!0,metersPerUnit:Pi,worldExtent:ki})||this}return Ei(e,t),e}(yi),Ri=[new Oi("CRS:84"),new Oi("EPSG:4326","neu"),new Oi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Oi("urn:ogc:def:crs:OGC:2:84"),new Oi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")],Ii={};var Fi={};function ji(t,e,i){var n=t.getCode(),r=e.getCode();n in Fi||(Fi[n]={}),Fi[n][r]=i}var Mi="bottom-left",Ai="bottom-right",Li="top-left",zi="top-right",Di=0,Gi=1,Ni=2,Bi=4,Wi=8,qi=16;function Vi(t){for(var e=Ji(),i=0,n=t.length;i<n;++i)sn(e,t[i]);return e}function Ui(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Xi(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Ki(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function Yi(t,e){return Hi(t,e[0],e[1])}function Zi(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Hi(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function $i(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],s=e[0],a=e[1],l=Di;return s<i?l|=qi:s>r&&(l|=Bi),a<n?l|=Wi:a>o&&(l|=Ni),l===Di&&(l=Gi),l}function Ji(){return[1/0,1/0,-1/0,-1/0]}function Qi(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function tn(t){return Qi(1/0,1/0,-1/0,-1/0,t)}function en(t,e){var i=t[0],n=t[1];return Qi(i,n,i,n,e)}function nn(t,e,i,n,r){return an(tn(r),t,e,i,n)}function rn(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function on(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function sn(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function an(t,e,i,n,r){for(;i<n;i+=r)ln(t,e[i],e[i+1]);return t}function ln(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function un(t,e){var i;return(i=e(cn(t)))||(i=e(pn(t)))||(i=e(_n(t)))?i:(i=e(vn(t)))||!1}function hn(t){var e=0;return wn(t)||(e=xn(t)*gn(t)),e}function cn(t){return[t[0],t[1]]}function pn(t){return[t[2],t[1]]}function dn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function fn(t,e){var i;return e===Mi?i=cn(t):e===Ai?i=pn(t):e===Li?i=vn(t):e===zi?i=_n(t):ke(!1,13),i}function yn(t,e,i,n,r){var o=e*n[0]/2,s=e*n[1]/2,a=Math.cos(i),l=Math.sin(i),u=o*a,h=o*l,c=s*a,p=s*l,d=t[0],f=t[1],y=d-u+p,g=d-u-p,m=d+u-p,v=d+u+p,_=f-h-c,x=f-h+c,b=f+h+c,w=f+h-c;return Qi(Math.min(y,g,m,v),Math.min(_,x,b,w),Math.max(y,g,m,v),Math.max(_,x,b,w),r)}function gn(t){return t[3]-t[1]}function mn(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return bn(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):tn(n),n}function vn(t){return[t[0],t[3]]}function _n(t){return[t[2],t[3]]}function xn(t){return t[2]-t[0]}function bn(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function wn(t){return t[2]<t[0]||t[3]<t[1]}function Sn(t,e,i,n){var r=[];if(n>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<n;++a)r.push(t[0]+o*a/n,t[1],t[2],t[1]+s*a/n,t[2]-o*a/n,t[3],t[0],t[3]-s*a/n);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],u=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),u.push(r[a+1]);return function(t,e,i){return Qi(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(l,u,i)}var Cn="Point",Tn="LineString",En="LinearRing",kn="Polygon",Pn="MultiPoint",On="MultiLineString",Rn="MultiPolygon",In="GeometryCollection",Fn="Circle",jn=6371008.8;function Mn(t,e,i){var n=i||jn,r=je(t[1]),o=je(e[1]),s=(o-r)/2,a=je(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function An(t,e){for(var i=0,n=t.length,r=t[n-1][0],o=t[n-1][1],s=0;s<n;s++){var a=t[s][0],l=t[s][1];i+=je(a-r)*(2+Math.sin(je(o))+Math.sin(je(l))),r=a,o=l}return i*e*e/2}function Ln(t,e){var i=e||{},n=i.radius||jn,r=i.projection||"EPSG:3857",o=t.getType();o!==In&&(t=t.clone().transform(r,"EPSG:4326"));var s,a,l,u,h,c,p=0;switch(o){case Cn:case Pn:case Tn:case On:case En:break;case kn:for(s=t.getCoordinates(),p=Math.abs(An(s[0],n)),l=1,u=s.length;l<u;++l)p-=Math.abs(An(s[l],n));break;case Rn:for(l=0,u=(s=t.getCoordinates()).length;l<u;++l)for(a=s[l],p+=Math.abs(An(a[0],n)),h=1,c=a.length;h<c;++h)p-=Math.abs(An(a[h],n));break;case In:var d=t.getGeometries();for(l=0,u=d.length;l<u;++l)p+=Ln(d[l],e);break;default:throw new Error("Unsupported geometry type: "+o)}return p}function zn(t,e){var i,n,r=t[0],o=t[1],s=e[0],a=e[1],l=s[0],u=s[1],h=a[0],c=a[1],p=h-l,d=c-u,f=0===p&&0===d?0:(p*(r-l)+d*(o-u))/(p*p+d*d||0);return f<=0?(i=l,n=u):f>=1?(i=h,n=c):(i=l+f*p,n=u+f*d),[i,n]}function Dn(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Gn(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function Nn(t,e){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Bn(t,e){return Math.sqrt(Nn(t,e))}function Wn(t,e){return Nn(t,zn(t,e))}function qn(t,e){if(e.canWrapX()){var i=xn(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var o=i||xn(n);r=Math.floor((t[0]-n[0])/o)}return r}(t,e,i);n&&(t[0]-=n*i)}return t}function Vn(t,e,i){var n;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];n=e}else n=t.slice();return n}function Un(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t}function Xn(t){!function(t,e){Ii[t]=e}(t.getCode(),t),ji(t,t,Vn)}function Kn(t){return"string"==typeof t?Ii[e=t]||Ii[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Yn(t,e,i,n){var r,o=(t=Kn(t)).getPointResolutionFunc();if(o){if(r=o(e,i),n&&n!==t.getUnits())(a=t.getMetersPerUnit())&&(r=r*a/di[n])}else{var s=t.getUnits();if(s==fi.DEGREES&&!n||n==fi.DEGREES)r=e;else{var a,l=Qn(t,Kn("EPSG:4326"));if(l===Un&&s!==fi.DEGREES)r=e*t.getMetersPerUnit();else{var u=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(Mn((u=l(u,u,2)).slice(0,2),u.slice(2,4))+Mn(u.slice(4,6),u.slice(6,8)))/2}void 0!==(a=n?di[n]:t.getMetersPerUnit())&&(r/=a)}}return r}function Zn(t){!function(t){t.forEach(Xn)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&ji(e,t,Vn)}))}))}function Hn(t,e){return t?"string"==typeof t?Kn(t):t:Kn(e)}function $n(t,e){return er(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Jn(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Qn(t,e)===Vn)&&i}function Qn(t,e){var i=function(t,e){var i;return t in Fi&&e in Fi[t]&&(i=Fi[t][e]),i}(t.getCode(),e.getCode());return i||(i=Un),i}function tr(t,e){return Qn(Kn(t),Kn(e))}function er(t,e,i){return tr(e,i)(t,void 0,t.length)}var ir,nr,rr;function or(t,e){return t}function sr(t,e){return t}function ar(t,e){return t}function lr(t,e){return t}Zn(Si),Zn(Ri),ir=Si,nr=Ci,rr=Ti,Ri.forEach((function(t){ir.forEach((function(e){ji(t,e,nr),ji(e,t,rr)}))}));var ur,hr=new Array(6);function cr(t){return dr(t,1,0,0,1,0,0)}function pr(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=e[0],u=e[1],h=e[2],c=e[3],p=e[4],d=e[5];return t[0]=i*l+r*u,t[1]=n*l+o*u,t[2]=i*h+r*c,t[3]=n*h+o*c,t[4]=i*p+r*d+s,t[5]=n*p+o*d+a,t}function dr(t,e,i,n,r,o,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t}function fr(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function yr(t,e,i){return pr(t,dr(hr,e,0,0,i,0,0))}function gr(t,e,i,n,r,o,s,a){var l=Math.sin(o),u=Math.cos(o);return t[0]=n*u,t[1]=r*l,t[2]=-n*l,t[3]=r*u,t[4]=s*n*u-a*n*l+e,t[5]=s*r*l+a*r*u+i,t}function mr(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];ke(0!==n,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*u-a*l)/n,t[5]=-(r*u-o*l)/n,t}function vr(t){var e="matrix("+t.join(", ")+")";if(ee)return e;var i=ur||(ur=document.createElement("div"));return i.style.transform=e,i.style.transform}var _r=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,xr=/^([a-z]*)$|^hsla?\(.*\)$/i;function br(t){return"string"==typeof t?t:kr(t)}var wr,Sr,Cr=(wr={},Sr=0,function(t){var e;if(wr.hasOwnProperty(t))e=wr[t];else{if(Sr>=1024){var i=0;for(var n in wr)0==(3&i++)&&(delete wr[n],--Sr)}e=function(t){var e,i,n,r,o;if(xr.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}(t)),_r.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?Er(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Er(o)):ke(!1,14);return o}(t),wr[t]=e,++Sr}return e});function Tr(t){return Array.isArray(t)?t:Cr(t)}function Er(t){return t[0]=Pe(t[0]+.5|0,0,255),t[1]=Pe(t[1]+.5|0,0,255),t[2]=Pe(t[2]+.5|0,0,255),t[3]=Pe(t[3],0,1),t}function kr(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}function Pr(t,e,i){return e+":"+t+":"+(i?br(i):"null")}var Or=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=Pr(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=Pr(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),Rr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ir(t,e){Or.expire()}var Fr=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return Rr(e,t),e.prototype.dispatchRenderEvent=function(t,e){Bt()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;gr(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),mr(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,s,a){var l,u=e.viewState;function h(t,e,i,n){return r.call(o,e,t?i:null,n)}var c=u.projection,p=qn(t.slice(),c),d=[[0,0]];if(c.canWrapX()&&n){var f=xn(c.getExtent());d.push([-f,0],[f,0])}for(var y=e.layerStatesArray,g=y.length,m=[],v=[],_=0;_<d.length;_++)for(var x=g-1;x>=0;--x){var b=y[x],w=b.layer;if(w.hasRenderer()&&Xe(b,u)&&s.call(a,w)){var S=w.getRenderer(),C=w.getSource();if(S&&C){var T=C.getWrapX()?p:t,E=h.bind(null,b.managed);v[0]=T[0]+d[_][0],v[1]=T[1]+d[_][1],l=S.forEachFeatureAtCoordinate(v,e,i,E,m)}if(l)return l}}if(0!==m.length){var k=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*k})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return Bt()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,dt,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Bt()},e.prototype.scheduleExpireIconCache=function(t){Or.canExpireCache()&&t.postRenderFunctions.push(Ir)},e}(at),jr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mr=function(t){function e(e,i,n,r){var o=t.call(this,e)||this;return o.inversePixelTransform=i,o.frameState=n,o.context=r,o}return jr(e,t),e}(ot),Ar="10px sans-serif",Lr="#000",zr="round",Dr=[],Gr="round",Nr="#000",Br="center",Wr="middle",qr=[0,0,0,0],Vr=new Xt,Ur=new wt;Ur.setSize=function(){console.warn("labelCache is deprecated.")};var Xr,Kr,Yr=null,Zr={},Hr=function(){var t,e,i="32px ",n=["monospace","serif"],r=n.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,u=0;u<r;++u){var h=n[u];if(e=Qr(t+" "+s+" "+i+h,o),a!=h){var c=Qr(t+" "+s+" "+i+a+","+h,o);l=l&&c!=e}}return!!l}function a(){for(var e=!0,i=Vr.getKeys(),n=0,r=i.length;n<r;++n){var o=i[n];Vr.get(o)<100&&(s.apply(this,o.split("\n"))?(mt(Zr),Yr=null,Xr=void 0,Vr.set(o,100)):(Vr.set(o,Vr.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=ye(e);if(i)for(var n=i.families,r=0,o=n.length;r<o;++r){var l=n[r],u=i.style+"\n"+i.weight+"\n"+l;void 0===Vr.get(u)&&(Vr.set(u,100,!0),s(i.style,i.weight,l)||(Vr.set(u,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),$r=function(t){var e=Zr[t];if(null==e){if(ee){var i=ye(t),n=Jr(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else Kr||((Kr=document.createElement("div")).innerHTML="M",Kr.style.minHeight="0",Kr.style.maxHeight="none",Kr.style.height="auto",Kr.style.padding="0",Kr.style.border="none",Kr.style.position="absolute",Kr.style.display="block",Kr.style.left="-99999px"),Kr.style.font=t,document.body.appendChild(Kr),e=Kr.offsetHeight,document.body.removeChild(Kr);Zr[t]=e}return e};function Jr(t,e){return Yr||(Yr=re(1,1)),t!=Xr&&(Yr.font=t,Xr=Yr.font),Yr.measureText(e)}function Qr(t,e){return Jr(t,e).width}function to(t,e,i){if(e in i)return i[e];var n=Qr(t,e);return i[e]=n,n}function eo(t,e,i,n,r,o,s,a,l,u,h){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){for(var i=t.contextInstructions,n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(n,r,o,s,a,0,0,s,a)):t.drawImage(n,r,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}var io=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),no=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=At(Vr,st,e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(i.element_,r.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return io(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new Mr(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){zt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(Ne,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;for(var n=[],r=null,o=0,s=e.length;o<s;++o){var a=e[o];if(t.layerIndex=o,Xe(a,i)&&(a.sourceState==Ve||a.sourceState==qe)){var l=a.layer,u=l.render(t,r);u&&(u!==r&&(this.children_.push(u),r=u),"getDeclutter"in l&&n.push(l))}}for(o=n.length-1;o>=0;--o)n[o].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],o=e[n];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(Be,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],u=l.layer;if(u.hasRenderer()&&Xe(l,o)&&r(u)){var h=u.getRenderer().getDataAtPixel(t,e,i);if(h){var c=n(u,h);if(c)return c}}}},e}(Fr),ro="layergroup",oo="size",so="target",ao="view",lo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),uo="layers",ho=function(t){function e(e){var i=this,n=e||{},r=gt({},n);delete r.layers;var o=n.layers;return(i=t.call(this,r)||this).layersListenerKeys_=[],i.listenerKeys_={},i.addChangeListener(uo,i.handleLayersChanged_),o?Array.isArray(o)?o=new ei(o.slice(),{unique:!0}):ke("function"==typeof o.getArray,43):o=new ei(void 0,{unique:!0}),i.setLayers(o),i}return lo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(zt),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(At(t,He,this.handleLayersAdd_,this),At(t,$e,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(zt);mt(this.listenerKeys_);for(var i=t.getArray(),n=0,r=i.length;n<r;n++){var o=i[n];this.listenerKeys_[qt(o)]=[At(o,st,this.handleLayerChange_,this),At(o,St,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[qt(e)]=[At(e,st,this.handleLayerChange_,this),At(e,St,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=qt(t.element);this.listenerKeys_[e].forEach(zt),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(uo)},e.prototype.setLayers=function(t){this.set(uo,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var n=this.getLayerState(),r=n.zIndex;t||void 0!==n.zIndex||(r=0);for(var o=i,s=e.length;o<s;o++){var a=e[o];a.opacity*=n.opacity,a.visible=a.visible&&n.visible,a.maxResolution=Math.min(a.maxResolution,n.maxResolution),a.minResolution=Math.max(a.minResolution,n.minResolution),a.minZoom=Math.max(a.minZoom,n.minZoom),a.maxZoom=Math.min(a.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==a.extent?a.extent=mn(a.extent,n.extent):a.extent=n.extent),void 0===a.zIndex&&(a.zIndex=r)}return e},e.prototype.getSourceState=function(){return Ve},e}(ze),co=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),po=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.map=i,r.frameState=void 0!==n?n:null,r}return co(e,t),e}(ot),fo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yo=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,o)||this;return s.originalEvent=n,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return fo(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(po),go={SINGLECLICK:"singleclick",CLICK:kt,DBLCLICK:Pt,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},mo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vo=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=void 0===i?1:i,n.down_=null;var r=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=r,n.pointerdownListenerKey_=At(r,ci,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=At(r,hi,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(jt,n.boundHandleTouchMove_,!!ne&&{passive:!1}),n}return mo(e,t),e.prototype.emulateClick_=function(t){var e=new yo(go.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new yo(go.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new yo(go.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==go.POINTERUP||e.type==go.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==go.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new yo(go.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(zt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new yo(go.POINTERDOWN,this.map_,t);for(var i in this.dispatchEvent(e),this.down_={},t){var n=t[i];this.down_[i]="function"==typeof n?yt:n}if(0===this.dragListenerKeys_.length){var r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(At(r,go.POINTERMOVE,this.handlePointerMove_,this),At(r,go.POINTERUP,this.handlePointerUp_,this),At(this.element_,go.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(At(this.element_.getRootNode(),go.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new yo(go.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new yo(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(zt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(jt,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(zt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(zt),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(wt),_o=1/0,xo=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,mt(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){ke(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=_o&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;t<n>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<n&&i[l]<i[a]?l:a;e[t]=e[u],i[t]=i[u],t=u}e[t]=r,i[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],o=n[e];e>t;){var s=this.getParentIndex_(e);if(!(n[s]>o))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=r,n[e]=o},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(i=n(t=r[e]))==_o?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=i,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}(),bo=0,wo=1,So=2,Co=3,To=4,Eo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ko=function(t){function e(e,i){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return Eo(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&e[0].addEventListener(St,this.boundHandleTileChange_);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===So||i===Co||i===To){e.removeEventListener(St,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==bo||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(xo);var Po=0,Oo=1,Ro="center",Io="resolution",Fo="rotation",jo=256;function Mo(t,e,i){return function(n,r,o,s,a){if(n){var l=e?0:o[0]*r,u=e?0:o[1]*r,h=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+h,d=t[2]-l/2+h,f=t[1]+u/2+c,y=t[3]-u/2+c;p>d&&(d=p=(d+p)/2),f>y&&(y=f=(y+f)/2);var g=Pe(n[0],p,d),m=Pe(n[1],f,y),v=30*r;return s&&i&&(g+=-v*Math.log(1+Math.max(0,p-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-d)/v),m+=-v*Math.log(1+Math.max(0,f-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-y)/v)),[g,m]}}}function Ao(t){return t}function Lo(t,e,i,n){var r=xn(e)/i[0],o=gn(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function zo(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Pe(n,i/2,2*e)}function Do(t,e,i,n,r){return function(o,s,a,l){if(void 0!==o){var u=n?Lo(t,n,a,r):t;return(void 0===i||i)&&l?zo(o,u,e):Pe(o,e,u)}}}function Go(t){return void 0!==t?0:void 0}function No(t){return void 0!==t?t:void 0}var Bo="XY",Wo="XYZ",qo="XYM",Vo="XYZM";function Uo(t,e,i,n,r,o){for(var s=o||[],a=0,l=e;l<i;l+=n){var u=t[l],h=t[l+1];s[a++]=r[0]*u+r[2]*h+r[4],s[a++]=r[1]*u+r[3]*h+r[5]}return o&&s.length!=a&&(s.length=a),s}function Xo(t,e,i,n,r,o,s){for(var a=s||[],l=Math.cos(r),u=Math.sin(r),h=o[0],c=o[1],p=0,d=e;d<i;d+=n){var f=t[d]-h,y=t[d+1]-c;a[p++]=h+f*l-y*u,a[p++]=c+f*u+y*l;for(var g=d+2;g<d+n;++g)a[p++]=t[g]}return s&&a.length!=p&&(a.length=p),a}function Ko(t,e,i,n,r,o,s){for(var a=s||[],l=0,u=e;u<i;u+=n){a[l++]=t[u]+r,a[l++]=t[u+1]+o;for(var h=u+2;h<u+n;++h)a[l++]=t[h]}return s&&a.length!=l&&(a.length=l),a}var Yo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zo=[1,0,0,1,0,0],Ho=function(t){function e(){var e,i,n,r,o,s=t.call(this)||this;return s.extent_=[1/0,1/0,-1/0,-1/0],s.extentRevision_=-1,s.simplifiedGeometryMaxMinSquaredTolerance=0,s.simplifiedGeometryRevision=0,s.simplifyTransformedInternal=(e=function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===r&&pt(t,n)||(o=!0,r=this,n=t,i=e.apply(this,arguments)),i}),s}return Yo(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return Bt()},e.prototype.closestPointXY=function(t,e,i,n){return Bt()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Bt()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&tn(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){Bt()},e.prototype.scale=function(t,e,i){Bt()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Bt()},e.prototype.getType=function(){return Bt()},e.prototype.applyTransform=function(t){Bt()},e.prototype.intersectsExtent=function(t){return Bt()},e.prototype.translate=function(t,e){Bt()},e.prototype.transform=function(t,e){var i=Kn(t),n=i.getUnits()==fi.TILE_PIXELS?function(t,n,r){var o=i.getExtent(),s=i.getWorldExtent(),a=gn(s)/gn(o);return gr(Zo,s[0],s[3],a,-a,0,0,0),Uo(t,0,t.length,r,Zo,n),tr(i,e)(t,n,r)}:tr(i,e);return this.applyTransform(n),this},e}(Xt),$o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Jo(t){var e;return t==Bo?e=2:t==Wo||t==qo?e=3:t==Vo&&(e=4),e}var Qo=function(t){function e(){var e=t.call(this)||this;return e.layout=Bo,e.stride=2,e.flatCoordinates=null,e}return $o(e,t),e.prototype.computeExtent=function(t){return nn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Bt()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Jo(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){Bt()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=Jo(t);else{for(var r=0;r<i;++r){if(0===e.length)return this.layout=Bo,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=Bo:3==t?e=Wo:4==t&&(e=Vo);return e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Xo(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=dn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,i,n,r,o,s,a){for(var l=a||[],u=s[0],h=s[1],c=0,p=e;p<i;p+=n){var d=t[p]-u,f=t[p+1]-h;l[c++]=u+r*d,l[c++]=h+o*f;for(var y=p+2;y<p+n;++y)l[c++]=t[y]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,n,r,o),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Ko(i,0,i.length,n,t,e,i),this.changed()}},e}(Ho);function ts(t,e,i,n,r,o,s){var a,l=t[e],u=t[e+1],h=t[i]-l,c=t[i+1]-u;if(0===h&&0===c)a=e;else{var p=((r-l)*h+(o-u)*c)/(h*h+c*c);if(p>1)a=i;else{if(p>0){for(var d=0;d<n;++d)s[d]=Ae(t[e+d],t[i+d],p);return void(s.length=n)}a=e}}for(d=0;d<n;++d)s[d]=t[a+d];s.length=n}function es(t,e,i,n,r){var o=t[e],s=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],l=t[e+1],u=Fe(o,s,a,l);u>r&&(r=u),o=a,s=l}return r}function is(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];r=es(t,e,a,n,r),e=a}return r}function ns(t,e,i,n,r,o,s,a,l,u,h){if(e==i)return u;var c,p;if(0===r){if((p=Fe(s,a,t[e],t[e+1]))<u){for(c=0;c<n;++c)l[c]=t[e+c];return l.length=n,p}return u}for(var d=h||[NaN,NaN],f=e+n;f<i;)if(ts(t,f-n,f,n,s,a,d),(p=Fe(s,a,d[0],d[1]))<u){for(u=p,c=0;c<n;++c)l[c]=d[c];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(p)-Math.sqrt(u))/r|0,1);if(o&&(ts(t,i-n,e,n,s,a,d),(p=Fe(s,a,d[0],d[1]))<u)){for(u=p,c=0;c<n;++c)l[c]=d[c];l.length=n}return u}function rs(t,e,i,n,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];u=ns(t,e,f,n,r,o,s,a,l,u,c),e=f}return u}function os(t,e,i,n){for(var r=0,o=i.length;r<o;++r)t[e++]=i[r];return e}function ss(t,e,i,n){for(var r=0,o=i.length;r<o;++r)for(var s=i[r],a=0;a<n;++a)t[e++]=s[a];return e}function as(t,e,i,n,r){for(var o=r||[],s=0,a=0,l=i.length;a<l;++a){var u=ss(t,e,i[a],n);o[s++]=u,e=u}return o.length=s,o}function ls(t,e,i,n,r,o,s){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var u=[e,i-n],h=0;u.length>0;){for(var c=u.pop(),p=u.pop(),d=0,f=t[p],y=t[p+1],g=t[c],m=t[c+1],v=p+n;v<c;v+=n){var _=Ie(t[v],t[v+1],f,y,g,m);_>d&&(h=v,d=_)}d>r&&(l[(h-e)/n]=1,p+n<h&&u.push(p,h),h+n<c&&u.push(h,c))}for(v=0;v<a;++v)l[v]&&(o[s++]=t[e+v*n],o[s++]=t[e+v*n+1]);return s}function us(t,e){return e*Math.round(t/e)}function hs(t,e,i,n,r,o,s){if(e==i)return s;var a,l,u=us(t[e],r),h=us(t[e+1],r);e+=n,o[s++]=u,o[s++]=h;do{if(a=us(t[e],r),l=us(t[e+1],r),(e+=n)==i)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<i;){var c=us(t[e],r),p=us(t[e+1],r);if(e+=n,c!=a||p!=l){var d=a-u,f=l-h,y=c-u,g=p-h;d*g==f*y&&(d<0&&y<d||d==y||d>0&&y>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=c,l=p):(o[s++]=a,o[s++]=l,u=a,h=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function cs(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l];s=hs(t,e,h,n,r,o,s),a.push(s),e=h}return s}function ps(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=e;a<i;a+=n)o[s++]=t.slice(a,a+n);return o.length=s,o}function ds(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var u=i[a];o[s++]=ps(t,e,u,n,o[s]),e=u}return o.length=s,o}function fs(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var u=i[a];o[s++]=ds(t,e,u,n,o[s]),e=u[u.length-1]}return o.length=s,o}function ys(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}function gs(t,e,i,n){for(var r=0,o=0,s=i.length;o<s;++o){var a=i[o];r+=ys(t,e,a,n),e=a}return r}var ms=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vs=function(t){function e(e,i){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return ms(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<Ki(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(es(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ns(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return ys(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ps(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=ls(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Bo)},e.prototype.getType=function(){return En},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ss(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Qo),_s=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xs=function(t){function e(e,i){var n=t.call(this)||this;return n.setCoordinates(e,i),n}return _s(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=Fe(t,e,r[0],r[1]);if(o<n){for(var s=this.stride,a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return en(this.flatCoordinates,t)},e.prototype.getType=function(){return Cn},e.prototype.intersectsExtent=function(t){return Hi(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=os(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Qo);function bs(t,e,i,n,r){return!un(r,(function(r){return!ws(t,e,i,n,r[0],r[1])}))}function ws(t,e,i,n,r,o){for(var s=0,a=t[i-n],l=t[i-n+1];e<i;e+=n){var u=t[e],h=t[e+1];l<=o?h>o&&(u-a)*(o-l)-(r-a)*(h-l)>0&&s++:h<=o&&(u-a)*(o-l)-(r-a)*(h-l)<0&&s--,a=u,l=h}return 0!==s}function Ss(t,e,i,n,r,o){if(0===i.length)return!1;if(!ws(t,e,i[0],n,r,o))return!1;for(var s=1,a=i.length;s<a;++s)if(ws(t,i[s-1],i[s],n,r,o))return!1;return!0}function Cs(t,e,i,n,r,o,s){for(var a,l,u,h,c,p,d,f=r[o+1],y=[],g=0,m=i.length;g<m;++g){var v=i[g];for(h=t[v-n],p=t[v-n+1],a=e;a<v;a+=n)c=t[a],d=t[a+1],(f<=p&&d<=f||p<=f&&f<=d)&&(u=(f-p)/(d-p)*(c-h)+h,y.push(u)),h=c,p=d}var _=NaN,x=-1/0;for(y.sort(lt),h=y[0],a=1,l=y.length;a<l;++a){c=y[a];var b=Math.abs(c-h);b>x&&Ss(t,e,i,n,u=(h+c)/2,f)&&(_=u,x=b),h=c}return isNaN(_)&&(_=r[o]),s?(s.push(_,f,x),s):[_,f,x]}function Ts(t,e,i,n,r){for(var o=[],s=0,a=i.length;s<a;++s){var l=i[s];o=Cs(t,e,l,n,r,2*s,o),e=l[l.length-1]}return o}function Es(t,e,i,n,r){for(var o,s=[t[e],t[e+1]],a=[];e+n<i;e+=n){if(a[0]=t[e+n],a[1]=t[e+n+1],o=r(s,a))return o;s[0]=a[0],s[1]=a[1]}return!1}function ks(t,e,i,n,r){var o=an([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!bn(r,o)&&(!!Zi(r,o)||(o[0]>=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||Es(t,e,i,n,(function(t,e){return function(t,e,i){var n=!1,r=$i(t,e),o=$i(t,i);if(r===Gi||o===Gi)n=!0;else{var s=t[0],a=t[1],l=t[2],u=t[3],h=e[0],c=e[1],p=i[0],d=i[1],f=(d-c)/(p-h),y=void 0,g=void 0;o&Ni&&!(r&Ni)&&(n=(y=p-(d-u)/f)>=s&&y<=l),n||!(o&Bi)||r&Bi||(n=(g=d-(p-l)*f)>=a&&g<=u),n||!(o&Wi)||r&Wi||(n=(y=p-(d-a)/f)>=s&&y<=l),n||!(o&qi)||r&qi||(n=(g=d-(p-s)*f)>=a&&g<=u)}return n}(r,t,e)})))))}function Ps(t,e,i,n,r){if(!function(t,e,i,n,r){return!!(ks(t,e,i,n,r)||ws(t,e,i,n,r[0],r[1])||ws(t,e,i,n,r[0],r[3])||ws(t,e,i,n,r[2],r[1])||ws(t,e,i,n,r[2],r[3]))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(bs(t,i[o-1],i[o],n,r)&&!ks(t,i[o-1],i[o],n,r))return!1;return!0}function Os(t,e,i,n){for(;e<i-n;){for(var r=0;r<n;++r){var o=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=o}e+=n,i-=n}}function Rs(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return 0===r?void 0:r>0}function Is(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],u=Rs(t,e,l,n);if(0===s){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}function Fs(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],u=Rs(t,e,l,n);(0===s?o&&u||!o&&!u:o&&!u||!o&&u)&&Os(t,e,l,n),e=l}return e}function js(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o)e=Fs(t,e,i[o],n,r);return e}var Ms=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),As=function(t){function e(e,i,n){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==i&&n?(r.setFlatCoordinates(i,e),r.ends_=n):r.setCoordinates(e,i),r}return Ms(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Ki(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(is(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),rs(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return Ss(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return gs(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Fs(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,ds(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=dn(this.getExtent());this.flatInteriorPoint_=Cs(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new xs(this.getFlatInteriorPoint(),qo)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new vs(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],r=0,o=0,s=i.length;o<s;++o){var a=i[o],l=new vs(e.slice(r,a),t);n.push(l),r=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Is(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Fs(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=cs(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,Bo,n)},e.prototype.getType=function(){return kn},e.prototype.intersectsExtent=function(t){return Ps(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=as(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(Qo);function Ls(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=[e,i,e,r,n,r,n,i,e,i];return new As(o,Bo,[o.length])}function zs(t,e,i){for(var n=e||32,r=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=r*(n+1),l=new Array(a),u=0;u<a;u+=r){l[u]=0,l[u+1]=0;for(var h=2;h<r;h++)l[u+h]=s[h]}var c=[l.length],p=new As(l,o,c);return function(t,e,i,n){for(var r=t.getFlatCoordinates(),o=t.getStride(),s=r.length/o-1,a=n||0,l=0;l<=s;++l){var u=l*o,h=a+2*Me(l,s)*Math.PI/s;r[u]=e[0]+i*Math.cos(h),r[u+1]=e[1]+i*Math.sin(h)}t.changed()}(p,s,t.getRadius(),i),p}var Ds=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Gs(t,e){setTimeout((function(){t(e)}),0)}function Ns(t){return!(t.sourceCenter&&t.targetCenter&&!Dn(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Bs(t,e,i,n,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-i[0])*n)*o-(l+=(i[1]-e[1]/2)*n)*(s=-s),l*o+a*s]}var Ws=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=gt({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=Hn(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=sr(n.center,i.projection_)),n.extent&&(n.extent=lr(n.extent,i.projection_)),i.applyOptions_(n),i}return Ds(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,r=28,o=2,s=void 0!==t.minZoom?t.minZoom:0,a=void 0!==t.maxZoom?t.maxZoom:r,l=void 0!==t.zoomFactor?t.zoomFactor:o,u=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,p=Hn(t.projection,"EPSG:3857"),d=p.getExtent(),f=t.constrainOnlyCenter,y=t.extent;u||y||!p.isGlobal()||(f=!1,y=d);if(void 0!==t.resolutions){var g=t.resolutions;i=g[s],n=void 0!==g[a]?g[a]:g[g.length-1],e=t.constrainResolution?function(t,e,i,n){return function(r,o,s,a){if(void 0!==r){var l=t[0],u=t[t.length-1],h=i?Lo(l,i,s,n):l;if(a)return void 0===e||e?zo(r,h,u):Pe(r,u,h);var c=Math.min(h,r),p=Math.floor(ut(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(g,h,!f&&y,c):Do(i,n,h,!f&&y,c)}else{var m=(d?Math.max(xn(d),gn(d)):360*di[fi.DEGREES]/p.getMetersPerUnit())/jo/Math.pow(o,0),v=m/Math.pow(o,r-0);void 0!==(i=t.maxResolution)?s=0:i=m/Math.pow(l,s),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,a):m/Math.pow(l,a):v),a=s+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,a-s),e=t.constrainResolution?function(t,e,i,n,r,o){return function(s,a,l,u){if(void 0!==s){var h=r?Lo(e,r,l,o):e,c=void 0!==i?i:0;if(u)return void 0===n||n?zo(s,h,c):Pe(s,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),d=-a*(.5-1e-9)+.5,f=Math.min(h,s),y=Math.floor(Math.log(e/f)/Math.log(t)+d),g=Math.max(p,y);return Pe(e/Math.pow(t,g),c,h)}}}(l,i,n,h,!f&&y,c):Do(i,n,h,!f&&y,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:l}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=e.minZoom;var i=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Mo(t.extent,t.constrainOnlyCenter,e)}var i=Hn(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var n=i.getExtent().slice();return n[0]=-1/0,n[2]=1/0,Mo(n,!1,!1)}return Ao}(t),n=e.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=r||je(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?No:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}):No}return Go;var i,n;var r,o}(t);this.constraints_={center:i,resolution:n,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var n=t||[0,0,0,0];e=e||[0,0,0,0];var r=this.getResolution(),o=r/2*(n[3]-e[3]+e[1]-n[1]),s=r/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+o,i[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=gt({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),gt({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=gt({},n)).center=sr(n.center,this.getProjection())),n.anchor&&((n=gt({},n)).anchor=sr(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;if(i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&Gs(e,!0))}for(var r=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],u=0;u<i;++u){var h=arguments[u],c={start:r,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||ri,callback:e};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center.slice(),o=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=s,c.targetResolution=this.getResolutionForZoom(h.zoom),s=c.targetResolution):h.resolution&&(c.sourceResolution=s,c.targetResolution=h.resolution,s=c.targetResolution),void 0!==h.rotation){c.sourceRotation=a;var p=Me(h.rotation-a+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=a+p,a=c.targetRotation}Ns(c)?c.complete=!0:r+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(Po,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[Po]>0},e.prototype.getInteracting=function(){return this.hints_[Oo]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Po,-this.hints_[Po]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&Gs(n[0].callback,!1),!t)for(var r=0,o=n.length;r<o;++r){var s=n[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,o=0,s=n.length;o<s;++o){var a=n[o];if(!a.complete){var l=t-a.start,u=a.duration>0?l/a.duration:1;u>=1?(a.complete=!0,u=1):r=!1;var h=a.easing(u);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],d=c+h*(a.targetCenter[0]-c),f=p+h*(a.targetCenter[1]-p);this.targetCenter_=[d,f]}if(a.sourceResolution&&a.targetResolution){var y=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var g=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,g,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var v=1===h?Me(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var _=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(_,a.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(Po,-1);var x=n[0].callback;x&&Gs(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,o=this.getCenterInternal();return void 0!==o&&(Gn(i=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(n=i)[0]+=+r[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?or(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Ro)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return ar(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();ke(i,1);var n=this.getResolution();ke(void 0!==n,2);var r=this.getRotation();return ke(void 0!==r,3),yn(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Io)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(lr(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSizeMinusPadding_(),n=xn(t)/i[0],r=gn(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(Fo)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();n=Bs(n,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=ut(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Pe(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Pe(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if(ke(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))ke(!wn(t),25),i=Ls(n=lr(t,this.getProjection()));else if(t.getType()===Fn){var n;(i=Ls(n=lr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),dn(n))}else{i=t}this.fitInternal(i,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,u=-1/0,h=0,c=r.length;h<c;h+=o){var p=r[h]*i-r[h+1]*n,d=r[h]*n+r[h+1]*i;s=Math.min(s,p),a=Math.min(a,d),l=Math.max(l,p),u=Math.max(u,d)}return[s,a,l,u]},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var r,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[n[0]-o[1]-o[3],n[1]-o[0]-o[2]]);l=isNaN(l)?r:Math.max(l,r),l=this.getConstrainedResolution(l,s?0:1);var u=this.getRotation(),h=Math.sin(u),c=Math.cos(u),p=dn(a);p[0]+=(o[1]-o[3])/2*l,p[1]+=(o[0]-o[2])/2*l;var d=p[0]*c-p[1]*h,f=p[1]*c+p[0]*h,y=this.getConstrainedCenter([d,f],l),g=i.callback?i.callback:yt;void 0!==i.duration?this.animateInternal({resolution:l,center:y,duration:i.duration,easing:i.easing},g):(this.targetResolution_=l,this.targetCenter_=y,this.applyTargetState_(!1,!0),Gs(g,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal(sr(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){this.setCenterInternal(Bs(t,e,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,i,n){var r,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-i),a=Bs(t,n,[s[0]/2+o[3],s[1]/2+o[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=or(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&sr(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=sr(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(sr(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,r,i),s=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,n,r));this.get(Fo)!==n&&this.set(Fo,n),this.get(Io)!==o&&this.set(Io,o),this.get(Ro)&&Dn(this.get(Ro),s)||this.set(Ro,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&Dn(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:n,easing:ni,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Oo,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&sr(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(Oo,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(Xt);function qs(t){return t[0]>0&&t[1]>0}function Vs(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Us=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var Xs=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ho({layers:t.layers});o[ro]=s,o[so]=t.target,o[ao]=void 0!==t.view?t.view:new Ws,void 0!==t.controls&&(Array.isArray(t.controls)?i=new ei(t.controls.slice()):(ke("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new ei(t.interactions.slice()):(ke("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?r=new ei(t.overlays.slice()):(ke("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new ei;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:r,values:o}}(e);return i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:te,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null,i.controls=n.controls||new ei,i.interactions=n.interactions||new ei,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.handleResize_,i.postRenderFunctions_=[],i.tileQueue_=new ko(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addChangeListener(ro,i.handleLayerGroupChanged_),i.addChangeListener(ao,i.handleViewChanged_),i.addChangeListener(oo,i.handleSizeChanged_),i.addChangeListener(so,i.handleTargetChanged_),i.setProperties(n.values),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.controls.addEventListener(He,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener($e,function(t){t.element.setMap(null)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.addEventListener(He,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener($e,function(t){t.element.setMap(null)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i.overlays_.addEventListener(He,function(t){this.addOverlayInternal_(t.element)}.bind(i)),i.overlays_.addEventListener($e,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(i)),i}return Us(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:dt,s=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{},r=void 0!==n.hitTolerance?n.hitTolerance:0,o=n.layerFilter||dt;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:dt,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(so)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return or(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?fr(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(ro)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=sr(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?fr(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(oo)},e.prototype.getView=function(){return this.get(ao)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return _o;if(!t.wantedTiles[i][e.getKey()])return _o;var o=t.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new yo(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,i=e.type;if(i===ci||i===Mt||i===Ot){var n=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():n,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===n?n.documentElement:r).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[Po]||r[Oo]){var o=Date.now()-t.time>8;i=o?0:8,n=o?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener(We)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(We,t);for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)zt(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(Et,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Mt,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(Ft,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,se(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new vo(this,this.moveTolerance_),go)this.mapBrowserEventHandler_.addEventListener(go[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Et,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Mt,this.boundHandleBrowserEvent_,!!ne&&{passive:!1});var r=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[At(r,Ot,this.handleBrowserEvent,this),At(r,Rt,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(Ft,this.handleResize_,!1))}else 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);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(zt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(zt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=At(t,st,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=At(t,St,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(zt),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[At(t,st,this.render,this),At(t,St,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,i=this.getSize(),n=this.getView(),r=this.frameState_,o=null;if(void 0!==i&&qs(i)&&n&&n.isDef()){var s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:yn(a.center,a.resolution,a.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{}}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r)(!this.previousExtent_||!wn(this.previousExtent_)&&!rn(o.extent,this.previousExtent_))&&(this.dispatchEvent(new po(Yt,this,r)),this.previousExtent_=tn(this.previousExtent_));this.previousExtent_&&!o.viewHints[Po]&&!o.viewHints[Oo]&&!rn(o.extent,this.previousExtent_)&&(this.dispatchEvent(new po(Zt,this,o)),Xi(o.extent,this.previousExtent_))}this.dispatchEvent(new po(Kt,this,o)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){this.set(ro,t)},e.prototype.setSize=function(t){this.set(oo,t)},e.prototype.setTarget=function(t){this.set(so,t)},e.prototype.setView=function(t){this.set(ao,t)},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||qs(e=[n,r])||console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(Xt),Ks=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ys="units",Zs="degrees",Hs="imperial",$s="nautical",Js="metric",Qs="us",ta=[1,2,5],ea=25.4/.28,ia=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).on,i.once,i.un,i.innerElement_=document.createElement("div"),i.innerElement_.className=r+"-inner",i.element.className=r+" "+he,i.element.appendChild(i.innerElement_),i.viewState_=null,i.minWidth_=void 0!==n.minWidth?n.minWidth:64,i.renderedVisible_=!1,i.renderedWidth_=void 0,i.renderedHTML_="",i.addChangeListener(Ys,i.handleUnitsChanged_),i.setUnits(n.units||Js),i.scaleBar_=n.bar||!1,i.scaleBarSteps_=n.steps||4,i.scaleBarText_=n.text||!1,i.dpi_=n.dpi||void 0,i}return Ks(e,t),e.prototype.getUnits=function(){return this.get(Ys)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Ys,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,i=t.projection,n=this.getUnits(),r=n==Zs?fi.DEGREES:fi.METERS,o=Yn(i,t.resolution,e,r),s=this.minWidth_*(this.dpi_||ea)/ea,a=s*o,l="";if(n==Zs){var u=di[fi.DEGREES];(a*=u)<u/60?(l="″",o*=3600):a<u?(l="′",o*=60):l="°"}else n==Hs?a<.9144?(l="in",o/=.0254):a<1609.344?(l="ft",o/=.3048):(l="mi",o/=1609.344):n==$s?(o/=1852,l="nm"):n==Js?a<.001?(l="μm",o*=1e6):a<1?(l="mm",o*=1e3):a<1e3?l="m":(l="km",o/=1e3):n==Qs?a<.9144?(l="in",o*=39.37):a<1609.344?(l="ft",o/=.30480061):(l="mi",o/=1609.3472):ke(!1,33);for(var h,c,p,d,f=3*Math.floor(Math.log(s*o)/Math.log(10));;){p=Math.floor(f/3);var y=Math.pow(10,p);if(h=ta[(f%3+3)%3]*y,c=Math.round(h/o),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=s)break;++f}d=this.scaleBar_?this.createScaleBar(c,h,l):h.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a<this.scaleBarSteps_;a++)0===a&&r.push(this.createMarker("absolute",a)),r.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,i):"")+"</div>"),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,i)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+r.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,i,n,r){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(i?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=Yn(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||ea,i=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*i*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(le);function na(t){var e=t||{},i=new ei;return(void 0===e.zoom||e.zoom)&&i.push(new ui(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new ai(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new Ze(e.attributionOptions)),i}var ra=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var oa=function(t){function e(e){var i=t.call(this)||this;if(i.on,i.once,i.un,i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addChangeListener(i.geometryName_,i.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var n=e;i.setGeometry(n)}else{var r=e;i.setProperties(r)}return i}return ra(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(zt(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=At(t,St,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(ke("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Xt),sa=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0}return t.prototype.getReadOptions=function(t,e){var i;if(e){var n=e.dataProjection?Kn(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===fi.TILE_PIXELS&&(n=Kn(n)).setWorldExtent(e.extent),i={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return gt({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return Bt()},t.prototype.readFeature=function(t,e){return Bt()},t.prototype.readFeatures=function(t,e){return Bt()},t.prototype.readGeometry=function(t,e){return Bt()},t.prototype.readProjection=function(t){return Bt()},t.prototype.writeFeature=function(t,e){return Bt()},t.prototype.writeFeatures=function(t,e){return Bt()},t.prototype.writeGeometry=function(t,e){return Bt()},t}();function aa(t,e,i){var n,r=i?Kn(i.featureProjection):null,o=i?Kn(i.dataProjection):null;if(n=r&&o&&!Jn(r,o)?(e?t.clone():t).transform(e?r:o,e?o:r):t,e&&i&&void 0!==i.decimals){var s=Math.pow(10,i.decimals);n===t&&(n=t.clone()),n.applyTransform((function(t){for(var e=0,i=t.length;e<i;++e)t[e]=Math.round(t[e]*s)/s;return t}))}return n}var la="arraybuffer",ua="json",ha="text",ca="xml",pa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function da(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var fa=function(t){function e(){return t.call(this)||this}return pa(e,t),e.prototype.getType=function(){return ua},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(da(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(da(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return Bt()},e.prototype.readFeaturesFromObject=function(t,e){return Bt()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(da(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return Bt()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(da(t))},e.prototype.readProjectionFromObject=function(t){return Bt()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return Bt()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return Bt()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return Bt()},e}(sa);function ya(t,e,i,n,r,o,s){var a,l,u=(i-e)/n;if(1===u)a=e;else if(2===u)a=e,l=r;else if(0!==u){for(var h=t[e],c=t[e+1],p=0,d=[0],f=e+n;f<i;f+=n){var y=t[f],g=t[f+1];p+=Math.sqrt((y-h)*(y-h)+(g-c)*(g-c)),d.push(p),h=y,c=g}var m=r*p,v=function(t,e,i){for(var n,r,o=i||lt,s=0,a=t.length,l=!1;s<a;)(r=+o(t[n=s+(a-s>>1)],e))<0?s=n+1:(a=n,l=!r);return l?s:~s}(d,m);v<0?(l=(m-d[-v-2])/(d[-v-1]-d[-v-2]),a=e+(-v-2)*n):a=e+v*n}var _=s>1?s:2,x=o||new Array(_);for(f=0;f<_;++f)x[f]=void 0===a?NaN:void 0===l?t[a+f]:Ae(t[a+f],t[a+n+f],l);return x}function ga(t,e,i,n,r,o){if(i==e)return null;var s;if(r<t[e+n-1])return o?((s=t.slice(e,e+n))[n-1]=r,s):null;if(t[i-1]<r)return o?((s=t.slice(i-n,i))[n-1]=r,s):null;if(r==t[e+n-1])return t.slice(e,e+n);for(var a=e/n,l=i/n;a<l;){var u=a+l>>1;r<t[(u+1)*n-1]?l=u:a=u+1}var h=t[a*n-1];if(r==h)return t.slice((a-1)*n,(a-1)*n+n);var c=(r-h)/(t[(a+1)*n-1]-h);s=[];for(var p=0;p<n-1;++p)s.push(Ae(t[(a-1)*n+p],t[a*n+p],c));return s.push(r),s}function ma(t,e,i,n){for(var r=t[e],o=t[e+1],s=0,a=e+n;a<i;a+=n){var l=t[a],u=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(u-o)*(u-o)),r=l,o=u}return s}var va=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_a=function(t){function e(e,i){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return va(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?ct(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Ki(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(es(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ns(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.forEachSegment=function(t){return Es(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=qo&&this.layout!=Vo)return null;var i=void 0!==e&&e;return ga(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return ps(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return ya(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return ma(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=ls(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Bo)},e.prototype.getType=function(){return Tn},e.prototype.intersectsExtent=function(t){return ks(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ss(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Qo),xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ba=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.ends_=[],r.maxDelta_=-1,r.maxDeltaRevision_=-1,Array.isArray(e[0]))r.setCoordinates(e,i);else if(void 0!==i&&n)r.setFlatCoordinates(i,e),r.ends_=n;else{for(var o=r.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout()),ct(a,c.getFlatCoordinates()),l.push(a.length)}r.setFlatCoordinates(o,a),r.ends_=l}return r}return xa(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Ki(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(is(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),rs(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.getCoordinateAtM=function(t,e,i){if(this.layout!=qo&&this.layout!=Vo||0===this.flatCoordinates.length)return null;var n=void 0!==e&&e,r=void 0!==i&&i;return function(t,e,i,n,r,o,s){if(s)return ga(t,e,i[i.length-1],n,r,o);var a;if(r<t[n-1])return o?((a=t.slice(0,n))[n-1]=r,a):null;if(t[t.length-1]<r)return o?((a=t.slice(t.length-n))[n-1]=r,a):null;for(var l=0,u=i.length;l<u;++l){var h=i[l];if(e!=h){if(r<t[e+n-1])return null;if(r<=t[h-1])return ga(t,e,h,n,r,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,n,r)},e.prototype.getCoordinates=function(){return ds(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new _a(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[],r=0,o=0,s=e.length;o<s;++o){var a=e[o],l=new _a(t.slice(r,a),i);n.push(l),r=a}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,n=this.ends_,r=this.stride,o=0,s=n.length;o<s;++o){var a=n[o];ct(t,ya(e,i,a,r,.5)),i=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l];s=ls(t,e,h,n,r,o,s),a.push(s),e=h}return s}(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,n),new e(i,Bo,n)},e.prototype.getType=function(){return On},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){if(ks(t,e,i[o],n,r))return!0;e=i[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=as(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(Qo),wa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sa=function(t){function e(e,i){var n=t.call(this)||this;return i&&!Array.isArray(e[0])?n.setFlatCoordinates(i,e):n.setCoordinates(e,i),n}return wa(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<Ki(this.getExtent(),t,e))return n;for(var r=this.flatCoordinates,o=this.stride,s=0,a=r.length;s<a;s+=o){var l=Fe(t,e,r[s],r[s+1]);if(l<n){n=l;for(var u=0;u<o;++u)i[u]=r[s+u];i.length=o}}return n},e.prototype.getCoordinates=function(){return ps(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new xs(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,i=this.stride,n=[],r=0,o=t.length;r<o;r+=i){var s=new xs(t.slice(r,r+i),e);n.push(s)}return n},e.prototype.getType=function(){return Pn},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,i=this.stride,n=0,r=e.length;n<r;n+=i){if(Hi(t,e[n],e[n+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ss(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Qo);function Ca(t,e,i,n){for(var r=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=i.length;s<a;++s){var l=i[s];o=nn(t,e,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=l[l.length-1]}return r}var Ta=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ea=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var o=r.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout());for(var p=a.length,d=c.getEnds(),f=0,y=d.length;f<y;++f)d[f]+=p;ct(a,c.getFlatCoordinates()),l.push(d)}i=o,e=a,n=l}return void 0!==i&&n?(r.setFlatCoordinates(i,e),r.endss_=n):r.setCoordinates(e,i),r}return Ta(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;ct(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,r=(e=t.getEnds().slice()).length;n<r;++n)e[n]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();var r=new e(this.flatCoordinates.slice(),this.layout,i);return r.applyProperties(this),r},e.prototype.closestPointXY=function(t,e,i,n){return n<Ki(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];r=is(t,e,a,n,r),e=a[a.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];u=rs(t,e,f,n,r,o,s,a,l,u,c),e=f[f.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return function(t,e,i,n,r,o){if(0===i.length)return!1;for(var s=0,a=i.length;s<a;++s){var l=i[s];if(Ss(t,e,l,n,r,o))return!0;e=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,i,n){for(var r=0,o=0,s=i.length;o<s;++o){var a=i[o];r+=gs(t,e,a,n),e=a[a.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?js(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,fs(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Ca(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Ts(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new Sa(this.getFlatInteriorPoints().slice(),qo)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(!Is(t,e,a,n,r))return!1;a.length&&(e=a[a.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=js(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l],c=[];s=cs(t,e,h,n,r,o,s,c),a.push(c),e=h[h.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,n),new e(i,Bo,n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var n=this.endss_[t].slice(),r=n[n.length-1];if(0!==e)for(var o=0,s=n.length;o<s;++o)n[o]-=e;return new As(this.flatCoordinates.slice(e,r),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[],r=0,o=0,s=i.length;o<s;++o){var a=i[o].slice(),l=a[a.length-1];if(0!==r)for(var u=0,h=a.length;u<h;++u)a[u]-=r;var c=new As(e.slice(r,l),t,a);n.push(c),r=l}return n},e.prototype.getType=function(){return Rn},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(Ps(t,e,a,n,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=function(t,e,i,n,r){for(var o=r||[],s=0,a=0,l=i.length;a<l;++a){var u=as(t,e,i[a],n,o[s]);o[s++]=u,e=u[u.length-1]}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(Qo),ka=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Pa(t){for(var e=[],i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}var Oa=function(t){function e(e){var i=t.call(this)||this;return i.geometries_=e||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return ka(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(zt),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(At(this.geometries_[t],St,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<Ki(this.getExtent(),t,e))return n;for(var r=this.geometries_,o=0,s=r.length;o<s;++o)n=r[o].closestPointXY(t,e,i,n);return n},e.prototype.containsXY=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){tn(t);for(var e=this.geometries_,i=0,n=e.length;i<n;++i)on(t,e[i].getExtent());return t},e.prototype.getGeometries=function(){return Pa(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],n=this.geometries_,r=!1,o=0,s=n.length;o<s;++o){var a=n[o],l=a.getSimplifiedGeometry(t);i.push(l),l!==a&&(r=!0)}if(r){var u=new e(null);return u.setGeometriesArray(i),u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return In},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,i){var n=i;n||(n=dn(this.getExtent()));for(var r=this.geometries_,o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(Pa(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(Ho),Ra=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ia(t,e){if(!t)return null;var i;switch(t.type){case Cn:i=function(t){return new xs(t.coordinates)}(t);break;case Tn:i=function(t){return new _a(t.coordinates)}(t);break;case kn:i=function(t){return new As(t.coordinates)}(t);break;case Pn:i=function(t){return new Sa(t.coordinates)}(t);break;case On:i=function(t){return new ba(t.coordinates)}(t);break;case Rn:i=function(t){return new Ea(t.coordinates)}(t);break;case In:i=function(t,e){var i=t.geometries.map((function(t){return Ia(t,e)}));return new Oa(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return aa(i,!1,e)}function Fa(t,e){var i,n=(t=aa(t,!0,e)).getType();switch(n){case Cn:i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case Tn:i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case kn:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case Pn:i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case On:i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case Rn:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case In:i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var i=gt({},e);return delete i.featureProjection,Fa(t,i)}))}}(t,e);break;case Fn:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return i}var ja=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this)||this).dataProjection=Kn(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(i.defaultFeatureProjection=Kn(n.featureProjection)),i.geometryName_=n.geometryName,i.extractGeometryName_=n.extractGeometryName,i}return Ra(e,t),e.prototype.readFeatureFromObject=function(t,e){var i=null,n=Ia((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),r=new oa;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(n),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties,!0),r},e.prototype.readFeaturesFromObject=function(t,e){var i=null;if("FeatureCollection"===t.type){i=[];for(var n=t.features,r=0,o=n.length;r<o;++r)i.push(this.readFeatureFromObject(n[r],e))}else i=[this.readFeatureFromObject(t,e)];return i},e.prototype.readGeometryFromObject=function(t,e){return Ia(t,e)},e.prototype.readProjectionFromObject=function(t){var e,i=t.crs;return i?"name"==i.type?e=Kn(i.properties.name):"EPSG"===i.type?e=Kn("EPSG:"+i.properties.code):ke(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;var r=t.getProperties(),o=t.getGeometry();return o&&(i.geometry=Fa(o,e),delete r[t.getGeometryName()]),_t(r)||(i.properties=r),i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,e){return Fa(t,this.adaptOptions(e))},e}(fa),Ma=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Aa="fraction",La="pixels",za="bottom-left",Da="bottom-right",Ga="top-left",Na="top-right",Ba=0,Wa=1,qa=2,Va=3,Ua=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Vs(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return Bt()},t.prototype.getImage=function(t){return Bt()},t.prototype.getHitDetectionImage=function(){return Bt()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return Bt()},t.prototype.getImageSize=function(){return Bt()},t.prototype.getOrigin=function(){return Bt()},t.prototype.getSize=function(){return Bt()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Vs(t)},t.prototype.listenImageChange=function(t){Bt()},t.prototype.load=function(){Bt()},t.prototype.unlistenImageChange=function(t){Bt()},t}(),Xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ka=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=i,o.state=r,o}return Xa(e,t),e.prototype.changed=function(){this.dispatchEvent(St)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Bt()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Bt()},e}(wt),Ya=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Za(t,e,i){var n=t;if(n.src&&ie){var r=n.decode(),o=!0;return r.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())})),function(){o=!1}}var s=[Lt(n,It,e),Lt(n,Ct,i)];return function(){s.forEach(zt)}}!function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,Ba)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=Ba,a.imageLoadFunction_=s,a}Ya(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Va,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=gn(this.extent)/this.image_.height),this.state=qa,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Ba&&this.state!=Va||(this.state=Wa,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Za(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=gn(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(Ka);var Ha=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),$a=null,Ja=function(t){function e(e,i,n,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=n,a.src_=i,a.tainted_,a}return Ha(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===qa){$a||($a=re(1,1)),$a.drawImage(this.image_,0,0);try{$a.getImageData(0,0,1,1),this.tainted_=!1}catch(t){$a=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(St)},e.prototype.handleImageError_=function(){this.imageState_=Va,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=qa,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=re(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Ba){this.imageState_=Wa;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Za(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=br(this.color_),i.fillRect(0,0,e.width/t,e.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),r=n.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],u=0,h=r.length;u<h;u+=4)r[u]*=o,r[u+1]*=s,r[u+2]*=a,r[u+3]*=l;i.putImageData(n,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(wt);var Qa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tl=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.opacity?n.opacity:1,o=void 0!==n.rotation?n.rotation:0,s=void 0!==n.scale?n.scale:1,a=void 0!==n.rotateWithView&&n.rotateWithView;(i=t.call(this,{opacity:r,rotation:o,scale:s,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:Ga,i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:Aa,i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:Aa,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,u=void 0!==n.imgSize?n.imgSize:null,h=n.src;ke(!(void 0!==h&&l),4),ke(!l||l&&u,5),void 0!==h&&0!==h.length||!l||(h=l.src||qt(l)),ke(void 0!==h&&h.length>0,6);var c=void 0!==n.src?Ba:qa;return i.color_=void 0!==n.color?Tr(n.color):null,i.iconImage_=function(t,e,i,n,r,o){var s=Or.get(e,n,o);return s||(s=new Ja(t,e,i,n,r,o),Or.set(e,n,o,s)),s}(l,h,u,i.crossOrigin_,c,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:Ga,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return Qa(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Aa||this.anchorYUnits_==Aa){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Aa&&(t[0]*=e[0]),this.anchorYUnits_==Aa&&(t[1]*=e[1])}if(this.anchorOrigin_!=Ga){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Na&&this.anchorOrigin_!=Da||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=za&&this.anchorOrigin_!=Da||(t[1]=-t[1]+e[1])}var i=this.getDisplacement();return t[0]-=i[0],t[1]+=i[1],this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Ga){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=Na&&this.offsetOrigin_!=Da||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=za&&this.offsetOrigin_!=Da||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(St,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(St,t)},e}(Ua),el=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({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()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();function il(t){return Array.isArray(t)?kr(t):t}var nl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rl=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.renderOptions_=null,i.render(),i}return nl(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var i=this.renderOptions_,n=re(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return qa},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n<r){var o=n;n=r,r=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=r*Math.sin(a),u=n-Math.sqrt(r*r-l*l),h=Math.sqrt(l*l+u*u),c=h/l;if("miter"===t&&c<=i)return c*e;var p=e/2/c,d=e/2*(u/h),f=Math.sqrt((n+p)*(n+p)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;var y=n*Math.sin(a),g=r-Math.sqrt(n*n-y*y),m=Math.sqrt(y*y+g*g)/y;if(m<=i){var v=m*e/2-r-n;return 2*Math.max(f,v)}return 2*f},e.prototype.createRenderOptions=function(){var t,e=Gr,i=0,n=null,r=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=Nr),t=il(t),void 0===(o=this.stroke_.getWidth())&&(o=1),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=Gr),void 0===(i=this.stroke_.getMiterLimit())&&(i=10));var s=this.calculateLineJoinSize_(e,o,i),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:n,lineDashOffset:r,lineJoin:e,miterLimit:i}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size,e=this.getDisplacement();this.canvas_={},this.anchor_=[t/2-e[0],t/2+e[1]],this.size_=[t,t]},e.prototype.draw_=function(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var n=this.fill_.getColor();null===n&&(n=Lr),e.fillStyle=il(n),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Tr(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=re(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{var n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var r=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=r+s*o,l=s%2==0?i:n;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Lr,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(Ua),ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sl=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return ol(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(rl),al=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=cl,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=cl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var ll=null;function ul(t,e){if(!ll){var i=new Ma({color:"rgba(255,255,255,0.4)"}),n=new el({color:"#3399CC",width:1.25});ll=[new al({image:new sl({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return ll}function hl(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t[kn]=[new al({fill:new Ma({color:[255,255,255,.5]})})],t[Rn]=t[kn],t[Tn]=[new al({stroke:new el({color:e,width:5})}),new al({stroke:new el({color:i,width:3})})],t[On]=t[Tn],t[Fn]=t[kn].concat(t[Tn]),t[Cn]=[new al({image:new sl({radius:6,fill:new Ma({color:i}),stroke:new el({color:e,width:1.5})}),zIndex:1/0})],t[Pn]=t[Cn],t[In]=t[kn].concat(t[Tn],t[Cn]),t}function cl(t){return t.getGeometry()}var pl=al,dl="point",fl="line",yl=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Vs(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new Ma({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:dl,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),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()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Vs(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),gl={
|
28
|
+
*/function rt(t){return(e,i)=>{return void 0!==i?(n=t,r=i,void e.constructor.createProperty(r,n)):nt(t,e);var n,r}}var ot=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),st="propertychange",at=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function lt(t,e){return t>e?1:t<e?-1:0}function ut(t,e,i){var n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;var r=void 0;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof i?i(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return n-1}function ht(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function ct(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,r=0;r<n;r++)t[t.length]=i[r]}function pt(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function dt(){return!0}function ft(){return!1}function yt(){}var gt="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function mt(t){for(var e in t)delete t[e]}var vt="function"==typeof Object.values?Object.values:function(t){var e=[];for(var i in t)e.push(t[i]);return e};function _t(t){var e;for(e in t)return!1;return!e}var xt,bt=(xt=function(t,e){return(xt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}xt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),wt=function(t){function e(e){var i=t.call(this)||this;return i.eventTarget_=e,i.pendingRemovals_=null,i.dispatching_=null,i.listeners_=null,i}return bt(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);-1===n.indexOf(e)&&n.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new ot(t):t,i=e.type;e.target||(e.target=this.eventTarget_||this);var n,r=this.listeners_&&this.listeners_[i];if(r){var o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,s[i]=0),++o[i];for(var a=0,l=r.length;a<l;++a)if(!1===(n="handleEvent"in r[a]?r[a].handleEvent(e):r[a].call(this,e))||e.propagationStopped){n=!1;break}if(--o[i],0===o[i]){var u=s[i];for(delete s[i];u--;)this.removeEventListener(i,yt);delete o[i]}return n}},e.prototype.disposeInternal=function(){this.listeners_&&mt(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var i=this.listeners_&&this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=yt,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(at),St="change",Ct="error",Tt="clear",Et="contextmenu",kt="click",Pt="dblclick",Ot="keydown",Rt="keypress",It="load",Ft="resize",Mt="touchmove",jt="wheel";function At(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){var o=i;i=function(){t.removeEventListener(e,i),o.apply(this,arguments)}}var s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function Lt(t,e,i,n){return At(t,e,i,n,!0)}function Dt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),mt(t))}var zt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gt=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return zt(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(St)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=At(this,t[r],e);return n}return At(this,t,e)},e.prototype.onceInternal=function(t,e){var i;if(Array.isArray(t)){var n=t.length;i=new Array(n);for(var r=0;r<n;++r)i[r]=Lt(this,t[r],e)}else i=Lt(this,t,e);return e.ol_key=i,i},e.prototype.unInternal=function(t,e){var i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)Dt(t[e]);else Dt(t)}(i);else if(Array.isArray(t))for(var n=0,r=t.length;n<r;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)},e}(wt);Gt.prototype.on,Gt.prototype.once,Gt.prototype.un;var Nt=Gt;function Bt(){return function(){throw new Error("Unimplemented abstract method.")}()}var Wt=0;function qt(t){return t.ol_uid||(t.ol_uid=String(++Wt))}var Vt=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ut=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.key=i,r.oldValue=n,r}return Vt(e,t),e}(ot),Xt=function(t){function e(e){var i=t.call(this)||this;return i.on,i.once,i.un,qt(i),i.values_=null,void 0!==e&&i.setProperties(e),i}return Vt(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&>({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var i;i="change:"+t,this.dispatchEvent(new Ut(i,t,e)),i=st,this.dispatchEvent(new Ut(i,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,i){var n=this.values_||(this.values_={});if(i)n[t]=e;else{var r=n[t];n[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.applyProperties=function(t){t.values_&>(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],_t(this.values_)&&(this.values_=null),e||this.notify(t,i)}},e}(Nt),Kt="postrender",Yt="movestart",Zt="moveend",Ht="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",$t=-1!==Ht.indexOf("firefox");-1!==Ht.indexOf("safari")&&Ht.indexOf("chrom");var Jt=-1!==Ht.indexOf("webkit")&&-1==Ht.indexOf("edge"),Qt=-1!==Ht.indexOf("macintosh"),te="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,ee="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,ie="undefined"!=typeof Image&&Image.prototype.decode,ne=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(i){}return t}();function re(t,e,i,n){var r;return i&&i.length?r=i.shift():ee?r=new OffscreenCanvas(t||300,e||300):(r=document.createElement("canvas")).style.all="unset",t&&(r.width=t),e&&(r.height=e),r.getContext("2d",n)}function oe(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function se(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var ae=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),le=function(t){function e(e){var i=t.call(this)||this,n=e.element;return!n||e.target||n.style.pointerEvents||(n.style.pointerEvents="auto"),i.element=n||null,i.target_=null,i.map_=null,i.listenerKeys=[],e.render&&(i.render=e.render),e.target&&i.setTarget(e.target),i}return ae(e,t),e.prototype.disposeInternal=function(){se(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&se(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)Dt(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==yt&&this.listenerKeys.push(At(t,Kt,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(Xt),ue="ol-hidden",he="ol-unselectable",ce="ol-control",pe="ol-collapsed",de=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"),fe=["style","variant","weight","size","lineHeight","family"],ye=function(t){var e=t.match(de);if(!e)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=fe.length;n<r;++n){var o=e[n+1];void 0!==o&&(i[fe[n]]=o)}return i.families=i.family.split(/,\s?/),i};function ge(t){return 1===t?"":String(Math.round(100*t)/100)}var me="opacity",ve="visible",_e="extent",xe="zIndex",be="maxResolution",we="minResolution",Se="maxZoom",Ce="minZoom",Te="source",Ee=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ke=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.9.0".split("-")[0])+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return Ee(e,t),e}(Error);function Pe(t,e){if(!t)throw new ke(e)}function Oe(t,e,i){return Math.min(Math.max(t,e),i)}var Re="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Ie="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function Fe(t,e,i,n,r,o){var s=r-i,a=o-n;if(0!==s||0!==a){var l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return Me(t,e,i,n)}function Me(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o}function je(t){return t*Math.PI/180}function Ae(t,e){var i=t%e;return i*e<0?i+e:i}function Le(t,e,i){return t+i*(e-t)}var De=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ze=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=gt({},e);return"object"==typeof e.properties&&(delete n.properties,gt(n,e.properties)),n[me]=void 0!==e.opacity?e.opacity:1,Pe("number"==typeof n[me],64),n[ve]=void 0===e.visible||e.visible,n[xe]=e.zIndex,n[be]=void 0!==e.maxResolution?e.maxResolution:1/0,n[we]=void 0!==e.minResolution?e.minResolution:0,n[Ce]=void 0!==e.minZoom?e.minZoom:-1/0,n[Se]=void 0!==e.maxZoom?e.maxZoom:1/0,i.className_=void 0!==n.className?e.className:"ol-layer",delete n.className,i.setProperties(n),i.state_=null,i}return De(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=Oe(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return Bt()},e.prototype.getLayerStatesArray=function(t){return Bt()},e.prototype.getExtent=function(){return this.get(_e)},e.prototype.getMaxResolution=function(){return this.get(be)},e.prototype.getMinResolution=function(){return this.get(we)},e.prototype.getMinZoom=function(){return this.get(Ce)},e.prototype.getMaxZoom=function(){return this.get(Se)},e.prototype.getOpacity=function(){return this.get(me)},e.prototype.getSourceState=function(){return Bt()},e.prototype.getVisible=function(){return this.get(ve)},e.prototype.getZIndex=function(){return this.get(xe)},e.prototype.setExtent=function(t){this.set(_e,t)},e.prototype.setMaxResolution=function(t){this.set(be,t)},e.prototype.setMinResolution=function(t){this.set(we,t)},e.prototype.setMaxZoom=function(t){this.set(Se,t)},e.prototype.setMinZoom=function(t){this.set(Ce,t)},e.prototype.setOpacity=function(t){Pe("number"==typeof t,64),this.set(me,t)},e.prototype.setVisible=function(t){this.set(ve,t)},e.prototype.setZIndex=function(t){this.set(xe,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Xt),Ge="prerender",Ne="postrender",Be="precompose",We="postcompose",qe="rendercomplete",Ve="undefined",Ue="ready",Xe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ke(t,e){if(!t.visible)return!1;var i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Ye=function(t){function e(e){var i=this,n=gt({},e);delete n.source,(i=t.call(this,n)||this).on,i.once,i.un,i.mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addChangeListener(Te,i.handleSourcePropertyChange_);var r=e.source?e.source:null;return i.setSource(r),i}return Xe(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(Te)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Ve},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Dt(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=At(t,St,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Dt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Dt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=At(t,Be,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);Pe(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=At(this,St,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Te,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(ze),Ze=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),He=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.userCollapsed_=i.collapsed_,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.expandClassName?n.expandClassName:r+"-expand",a=void 0!==n.collapseLabel?n.collapseLabel:"›",l=void 0!==n.collapseClassName?n.collapseClassName:r+"-collpase";"string"==typeof a?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=a,i.collapseLabel_.className=l):i.collapseLabel_=a;var u=void 0!==n.label?n.label:"i";"string"==typeof u?(i.label_=document.createElement("span"),i.label_.textContent=u,i.label_.className=s):i.label_=u;var h=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_;i.toggleButton_=document.createElement("button"),i.toggleButton_.setAttribute("type","button"),i.toggleButton_.setAttribute("aria-expanded",String(!i.collapsed_)),i.toggleButton_.title=o,i.toggleButton_.appendChild(h),i.toggleButton_.addEventListener(kt,i.handleClick_.bind(i),!1);var c=r+" "+"ol-unselectable "+ce+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),p=i.element;return p.className=c,p.appendChild(i.toggleButton_),p.appendChild(i.ulElement_),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return Ze(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=!0,r=t.layerStatesArray,o=0,s=r.length;o<s;++o){var a=r[o];if(Ke(a,t.viewState)){var l=a.layer.getSource();if(l){var u=l.getAttributions();if(u){var h=u(t);if(h)if(n=n&&!1!==l.getAttributionsCollapsible(),Array.isArray(h))for(var c=0,p=h.length;c<p;++c)h[c]in e||(i.push(h[c]),e[h[c]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(n),i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!pt(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var n=0,r=e.length;n<r;++n){var o=document.createElement("li");o.innerHTML=e[n],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(pe),this.collapsed_?oe(this.collapseLabel_,this.label_):oe(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(le),$e="add",Je="remove",Qe=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ti="length",ei=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return Qe(e,t),e}(ot),ii=function(t){function e(e,i){var n=t.call(this)||this;n.on,n.once,n.un;var r=i||{};if(n.unique_=!!r.unique,n.array_=e||[],n.unique_)for(var o=0,s=n.array_.length;o<s;++o)n.assertUnique_(n.array_[o],o);return n.updateLength_(),n}return Qe(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(ti)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new ei($e,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ei(Je,e,t)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new ei(Je,n,t)),this.dispatchEvent(new ei($e,e,t))}else{for(var r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(ti,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new ke(58)},e}(Xt);function ni(t){return Math.pow(t,3)}function ri(t){return 1-ni(1-t)}function oi(t){return 3*t*t-2*t*t*t}function si(t){return t}var ai=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),li=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this;var r=void 0!==n.className?n.className:"ol-rotate",o=void 0!==n.label?n.label:"⇧",s=void 0!==n.compassClassName?n.compassClassName:"ol-compass";i.label_=null,"string"==typeof o?(i.label_=document.createElement("span"),i.label_.className=s,i.label_.textContent=o):(i.label_=o,i.label_.classList.add(s));var a=n.tipLabel?n.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(i.label_),l.addEventListener(kt,i.handleClick_.bind(i),!1);var u=r+" "+"ol-unselectable "+ce,h=i.element;return h.className=u,h.appendChild(l),i.callResetNorth_=n.resetNorth?n.resetNorth:void 0,i.duration_=void 0!==n.duration?n.duration:250,i.autoHide_=void 0===n.autoHide||n.autoHide,i.rotation_=void 0,i.autoHide_&&i.element.classList.add(ue),i}return ai(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:ri}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains(ue);r||0!==i?r&&0!==i&&this.element.classList.remove(ue):this.element.classList.add(ue)}this.label_.style.transform=n}this.rotation_=i}},e}(le),ui=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),hi=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInClassName?n.zoomInClassName:r+"-in",a=void 0!==n.zoomOutClassName?n.zoomOutClassName:r+"-out",l=void 0!==n.zoomInLabel?n.zoomInLabel:"+",u=void 0!==n.zoomOutLabel?n.zoomOutLabel:"–",h=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",c=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=h,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(kt,i.handleClick_.bind(i,o),!1);var d=document.createElement("button");d.className=a,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof u?document.createTextNode(u):u),d.addEventListener(kt,i.handleClick_.bind(i,-o),!1);var f=r+" "+"ol-unselectable "+ce,y=i.element;return y.className=f,y.appendChild(p),y.appendChild(d),i.duration_=void 0!==n.duration?n.duration:250,i}return ui(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:ri})):e.setZoom(n)}}},e}(le),ci="pointermove",pi="pointerdown",di={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},fi={};fi[di.RADIANS]=6370997/(2*Math.PI),fi[di.DEGREES]=2*Math.PI*6370997/360,fi[di.FEET]=.3048,fi[di.METERS]=1,fi[di.USFEET]=1200/3937;var yi=di,gi=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||fi[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}(),mi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vi=6378137,_i=Math.PI*vi,xi=[-_i,-_i,_i,_i],bi=[-180,-85,180,85],wi=vi*Math.log(Math.tan(Math.PI/2)),Si=function(t){function e(e){return t.call(this,{code:e,units:yi.METERS,extent:xi,global:!0,worldExtent:bi,getPointResolution:function(t,e){return t/Re(e[1]/vi)}})||this}return mi(e,t),e}(gi),Ci=[new Si("EPSG:3857"),new Si("EPSG:102100"),new Si("EPSG:102113"),new Si("EPSG:900913"),new Si("http://www.opengis.net/def/crs/EPSG/0/3857"),new Si("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ti(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s<n;s+=r){o[s]=_i*t[s]/180;var a=vi*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>wi?a=wi:a<-wi&&(a=-wi),o[s+1]=a}return o}function Ei(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s<n;s+=r)o[s]=180*t[s]/_i,o[s+1]=360*Math.atan(Math.exp(t[s+1]/vi))/Math.PI-90;return o}var ki=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pi=[-180,-90,180,90],Oi=6378137*Math.PI/180,Ri=function(t){function e(e,i){return t.call(this,{code:e,units:yi.DEGREES,extent:Pi,axisOrientation:i,global:!0,metersPerUnit:Oi,worldExtent:Pi})||this}return ki(e,t),e}(gi),Ii=[new Ri("CRS:84"),new Ri("EPSG:4326","neu"),new Ri("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ri("urn:ogc:def:crs:OGC:2:84"),new Ri("http://www.opengis.net/def/crs/OGC/1.3/CRS84","neu"),new Ri("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ri("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Fi={};var Mi={};function ji(t,e,i){var n=t.getCode(),r=e.getCode();n in Mi||(Mi[n]={}),Mi[n][r]=i}var Ai="bottom-left",Li="bottom-right",Di="top-left",zi="top-right",Gi=0,Ni=1,Bi=2,Wi=4,qi=8,Vi=16;function Ui(t){for(var e=Qi(),i=0,n=t.length;i<n;++i)an(e,t[i]);return e}function Xi(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function Ki(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Yi(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r}function Zi(t,e){return $i(t,e[0],e[1])}function Hi(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function $i(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Ji(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],s=e[0],a=e[1],l=Gi;return s<i?l|=Vi:s>r&&(l|=Wi),a<n?l|=qi:a>o&&(l|=Bi),l===Gi&&(l=Ni),l}function Qi(){return[1/0,1/0,-1/0,-1/0]}function tn(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function en(t){return tn(1/0,1/0,-1/0,-1/0,t)}function nn(t,e){var i=t[0],n=t[1];return tn(i,n,i,n,e)}function rn(t,e,i,n,r){return ln(en(r),t,e,i,n)}function on(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function sn(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function an(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ln(t,e,i,n,r){for(;i<n;i+=r)un(t,e[i],e[i+1]);return t}function un(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function hn(t,e){var i;return(i=e(pn(t)))||(i=e(dn(t)))||(i=e(xn(t)))?i:(i=e(_n(t)))||!1}function cn(t){var e=0;return Sn(t)||(e=bn(t)*mn(t)),e}function pn(t){return[t[0],t[1]]}function dn(t){return[t[2],t[1]]}function fn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function yn(t,e){var i;return e===Ai?i=pn(t):e===Li?i=dn(t):e===Di?i=_n(t):e===zi?i=xn(t):Pe(!1,13),i}function gn(t,e,i,n,r){var o=e*n[0]/2,s=e*n[1]/2,a=Math.cos(i),l=Math.sin(i),u=o*a,h=o*l,c=s*a,p=s*l,d=t[0],f=t[1],y=d-u+p,g=d-u-p,m=d+u-p,v=d+u+p,_=f-h-c,x=f-h+c,b=f+h+c,w=f+h-c;return tn(Math.min(y,g,m,v),Math.min(_,x,b,w),Math.max(y,g,m,v),Math.max(_,x,b,w),r)}function mn(t){return t[3]-t[1]}function vn(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return wn(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):en(n),n}function _n(t){return[t[0],t[3]]}function xn(t){return[t[2],t[3]]}function bn(t){return t[2]-t[0]}function wn(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Sn(t){return t[2]<t[0]||t[3]<t[1]}function Cn(t,e,i,n){var r=[];if(n>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<n;++a)r.push(t[0]+o*a/n,t[1],t[2],t[1]+s*a/n,t[2]-o*a/n,t[3],t[0],t[3]-s*a/n);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],u=[],h=(a=0,r.length);a<h;a+=2)l.push(r[a]),u.push(r[a+1]);return function(t,e,i){return tn(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(l,u,i)}var Tn="Point",En="LineString",kn="LinearRing",Pn="Polygon",On="MultiPoint",Rn="MultiLineString",In="MultiPolygon",Fn="GeometryCollection",Mn="Circle",jn=6371008.8;function An(t,e,i){var n=i||jn,r=je(t[1]),o=je(e[1]),s=(o-r)/2,a=je(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Ln(t,e){for(var i=0,n=t.length,r=t[n-1][0],o=t[n-1][1],s=0;s<n;s++){var a=t[s][0],l=t[s][1];i+=je(a-r)*(2+Math.sin(je(o))+Math.sin(je(l))),r=a,o=l}return i*e*e/2}function Dn(t,e){var i=e||{},n=i.radius||jn,r=i.projection||"EPSG:3857",o=t.getType();o!==Fn&&(t=t.clone().transform(r,"EPSG:4326"));var s,a,l,u,h,c,p=0;switch(o){case Tn:case On:case En:case Rn:case kn:break;case Pn:for(s=t.getCoordinates(),p=Math.abs(Ln(s[0],n)),l=1,u=s.length;l<u;++l)p-=Math.abs(Ln(s[l],n));break;case In:for(l=0,u=(s=t.getCoordinates()).length;l<u;++l)for(a=s[l],p+=Math.abs(Ln(a[0],n)),h=1,c=a.length;h<c;++h)p-=Math.abs(Ln(a[h],n));break;case Fn:var d=t.getGeometries();for(l=0,u=d.length;l<u;++l)p+=Dn(d[l],e);break;default:throw new Error("Unsupported geometry type: "+o)}return p}function zn(t,e){var i,n,r=t[0],o=t[1],s=e[0],a=e[1],l=s[0],u=s[1],h=a[0],c=a[1],p=h-l,d=c-u,f=0===p&&0===d?0:(p*(r-l)+d*(o-u))/(p*p+d*d||0);return f<=0?(i=l,n=u):f>=1?(i=h,n=c):(i=l+f*p,n=u+f*d),[i,n]}function Gn(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Nn(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function Bn(t,e){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Wn(t,e){return Math.sqrt(Bn(t,e))}function qn(t,e){return Bn(t,zn(t,e))}function Vn(t,e){if(e.canWrapX()){var i=bn(e.getExtent()),n=function(t,e,i){var n=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var o=i||bn(n);r=Math.floor((t[0]-n[0])/o)}return r}(t,e,i);n&&(t[0]-=n*i)}return t}function Un(t,e,i){var n;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];n=e}else n=t.slice();return n}function Xn(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t}function Kn(t){!function(t,e){Fi[t]=e}(t.getCode(),t),ji(t,t,Un)}function Yn(t){return"string"==typeof t?Fi[e=t]||Fi[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Zn(t,e,i,n){var r,o=(t=Yn(t)).getPointResolutionFunc();if(o){if(r=o(e,i),n&&n!==t.getUnits())(a=t.getMetersPerUnit())&&(r=r*a/fi[n])}else{var s=t.getUnits();if(s==yi.DEGREES&&!n||n==yi.DEGREES)r=e;else{var a,l=tr(t,Yn("EPSG:4326"));if(l===Xn&&s!==yi.DEGREES)r=e*t.getMetersPerUnit();else{var u=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];r=(An((u=l(u,u,2)).slice(0,2),u.slice(2,4))+An(u.slice(4,6),u.slice(6,8)))/2}void 0!==(a=n?fi[n]:t.getMetersPerUnit())&&(r/=a)}}return r}function Hn(t){!function(t){t.forEach(Kn)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&ji(e,t,Un)}))}))}function $n(t,e){return t?"string"==typeof t?Yn(t):t:Yn(e)}function Jn(t,e){return ir(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Qn(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||tr(t,e)===Un)&&i}function tr(t,e){var i=function(t,e){var i;return t in Mi&&e in Mi[t]&&(i=Mi[t][e]),i}(t.getCode(),e.getCode());return i||(i=Xn),i}function er(t,e){return tr(Yn(t),Yn(e))}function ir(t,e,i){return er(e,i)(t,void 0,t.length)}var nr,rr,or;function sr(t,e){return t}function ar(t,e){return t}function lr(t,e){return t}function ur(t,e){return t}Hn(Ci),Hn(Ii),nr=Ci,rr=Ti,or=Ei,Ii.forEach((function(t){nr.forEach((function(e){ji(t,e,rr),ji(e,t,or)}))}));var hr,cr=new Array(6);function pr(t){return fr(t,1,0,0,1,0,0)}function dr(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=e[0],u=e[1],h=e[2],c=e[3],p=e[4],d=e[5];return t[0]=i*l+r*u,t[1]=n*l+o*u,t[2]=i*h+r*c,t[3]=n*h+o*c,t[4]=i*p+r*d+s,t[5]=n*p+o*d+a,t}function fr(t,e,i,n,r,o,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t}function yr(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function gr(t,e,i){return dr(t,fr(cr,e,0,0,i,0,0))}function mr(t,e,i,n,r,o,s,a){var l=Math.sin(o),u=Math.cos(o);return t[0]=n*u,t[1]=r*l,t[2]=-n*l,t[3]=r*u,t[4]=s*n*u-a*n*l+e,t[5]=s*r*l+a*r*u+i,t}function vr(t,e){var i,n=(i=e)[0]*i[3]-i[1]*i[2];Pe(0!==n,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return t[0]=a/n,t[1]=-o/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*u-a*l)/n,t[5]=-(r*u-o*l)/n,t}function _r(t){var e="matrix("+t.join(", ")+")";if(ee)return e;var i=hr||(hr=document.createElement("div"));return i.style.transform=e,i.style.transform}var xr=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,br=/^([a-z]*)$|^hsla?\(.*\)$/i;function wr(t){return"string"==typeof t?t:Pr(t)}var Sr,Cr,Tr=(Sr={},Cr=0,function(t){var e;if(Sr.hasOwnProperty(t))e=Sr[t];else{if(Cr>=1024){var i=0;for(var n in Sr)0==(3&i++)&&(delete Sr[n],--Cr)}e=function(t){var e,i,n,r,o;if(br.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}(t)),xr.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?kr(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),kr(o)):Pe(!1,14);return o}(t),Sr[t]=e,++Cr}return e});function Er(t){return Array.isArray(t)?t:Tr(t)}function kr(t){return t[0]=Oe(t[0]+.5|0,0,255),t[1]=Oe(t[1]+.5|0,0,255),t[2]=Oe(t[2]+.5|0,0,255),t[3]=Oe(t[3],0,1),t}function Pr(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}function Or(t,e,i){return e+":"+t+":"+(i?wr(i):"null")}var Rr=new(function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=Or(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=Or(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}()),Ir=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Fr(t,e){Rr.expire()}var Mr=function(t){function e(e){var i=t.call(this)||this;return i.map_=e,i}return Ir(e,t),e.prototype.dispatchRenderEvent=function(t,e){Bt()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;mr(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),vr(n,i)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,s,a){var l,u=e.viewState;function h(t,e,i,n){return r.call(o,e,t?i:null,n)}var c=u.projection,p=Vn(t.slice(),c),d=[[0,0]];if(c.canWrapX()&&n){var f=bn(c.getExtent());d.push([-f,0],[f,0])}for(var y=e.layerStatesArray,g=y.length,m=[],v=[],_=0;_<d.length;_++)for(var x=g-1;x>=0;--x){var b=y[x],w=b.layer;if(w.hasRenderer()&&Ke(b,u)&&s.call(a,w)){var S=w.getRenderer(),C=w.getSource();if(S&&C){var T=C.getWrapX()?p:t,E=h.bind(null,b.managed);v[0]=T[0]+d[_][0],v[1]=T[1]+d[_][1],l=S.forEachFeatureAtCoordinate(v,e,i,E,m)}if(l)return l}}if(0!==m.length){var k=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*k})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return Bt()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,dt,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Bt()},e.prototype.scheduleExpireIconCache=function(t){Rr.canExpireCache()&&t.postRenderFunctions.push(Fr)},e}(at),jr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ar=function(t){function e(e,i,n,r){var o=t.call(this,e)||this;return o.inversePixelTransform=i,o.frameState=n,o.context=r,o}return jr(e,t),e}(ot),Lr="10px sans-serif",Dr="#000",zr="round",Gr=[],Nr="round",Br="#000",Wr="center",qr="middle",Vr=[0,0,0,0],Ur=new Xt,Xr=new wt;Xr.setSize=function(){console.warn("labelCache is deprecated.")};var Kr,Yr,Zr=null,Hr={},$r=function(){var t,e,i="32px ",n=["monospace","serif"],r=n.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,u=0;u<r;++u){var h=n[u];if(e=to(t+" "+s+" "+i+h,o),a!=h){var c=to(t+" "+s+" "+i+a+","+h,o);l=l&&c!=e}}return!!l}function a(){for(var e=!0,i=Ur.getKeys(),n=0,r=i.length;n<r;++n){var o=i[n];Ur.get(o)<100&&(s.apply(this,o.split("\n"))?(mt(Hr),Zr=null,Kr=void 0,Ur.set(o,100)):(Ur.set(o,Ur.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var i=ye(e);if(i)for(var n=i.families,r=0,o=n.length;r<o;++r){var l=n[r],u=i.style+"\n"+i.weight+"\n"+l;void 0===Ur.get(u)&&(Ur.set(u,100,!0),s(i.style,i.weight,l)||(Ur.set(u,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),Jr=function(t){var e=Hr[t];if(null==e){if(ee){var i=ye(t),n=Qr(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else Yr||((Yr=document.createElement("div")).innerHTML="M",Yr.style.minHeight="0",Yr.style.maxHeight="none",Yr.style.height="auto",Yr.style.padding="0",Yr.style.border="none",Yr.style.position="absolute",Yr.style.display="block",Yr.style.left="-99999px"),Yr.style.font=t,document.body.appendChild(Yr),e=Yr.offsetHeight,document.body.removeChild(Yr);Hr[t]=e}return e};function Qr(t,e){return Zr||(Zr=re(1,1)),t!=Kr&&(Zr.font=t,Kr=Zr.font),Zr.measureText(e)}function to(t,e){return Qr(t,e).width}function eo(t,e,i){if(e in i)return i[e];var n=to(t,e);return i[e]=n,n}function io(t,e,i,n,r,o,s,a,l,u,h){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,u),t.scale(h[0],h[1]),function(t,e){for(var i=t.contextInstructions,n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}(n,t)):h[0]<0||h[1]<0?(t.translate(l,u),t.scale(h[0],h[1]),t.drawImage(n,r,o,s,a,0,0,s,a)):t.drawImage(n,r,o,s,a,l,u,s*h[0],a*h[1]),t.restore()}var no=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ro=function(t){function e(e){var i=t.call(this,e)||this;i.fontChangeListenerKey_=At(Ur,st,e.redrawText.bind(e)),i.element_=document.createElement("div");var n=i.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",i.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(i.element_,r.firstChild||null),i.children_=[],i.renderedVisible_=!0,i}return no(e,t),e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=new Ar(t,void 0,e);i.dispatchEvent(n)}},e.prototype.disposeInternal=function(){Dt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(Be,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;for(var n=[],r=null,o=0,s=e.length;o<s;++o){var a=e[o];if(t.layerIndex=o,Ke(a,i)&&(a.sourceState==Ue||a.sourceState==Ve)){var l=a.layer,u=l.render(t,r);u&&(u!==r&&(this.children_.push(u),r=u),"getDeclutter"in l&&n.push(l))}}for(o=n.length-1;o>=0;--o)n[o].renderDeclutter(t);!function(t,e){for(var i=t.childNodes,n=0;;++n){var r=i[n],o=e[n];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--n):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent(We,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],u=l.layer;if(u.hasRenderer()&&Ke(l,o)&&r(u)){var h=u.getRenderer().getDataAtPixel(t,e,i);if(h){var c=n(u,h);if(c)return c}}}},e}(Mr),oo="layergroup",so="size",ao="target",lo="view",uo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ho="layers",co=function(t){function e(e){var i=this,n=e||{},r=gt({},n);delete r.layers;var o=n.layers;return(i=t.call(this,r)||this).on,i.once,i.un,i.layersListenerKeys_=[],i.listenerKeys_={},i.addChangeListener(ho,i.handleLayersChanged_),o?Array.isArray(o)?o=new ii(o.slice(),{unique:!0}):Pe("function"==typeof o.getArray,43):o=new ii(void 0,{unique:!0}),i.setLayers(o),i}return uo(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Dt),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(At(t,$e,this.handleLayersAdd_,this),At(t,Je,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(Dt);mt(this.listenerKeys_);for(var i=t.getArray(),n=0,r=i.length;n<r;n++){var o=i[n];this.listenerKeys_[qt(o)]=[At(o,st,this.handleLayerChange_,this),At(o,St,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[qt(e)]=[At(e,st,this.handleLayerChange_,this),At(e,St,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=qt(t.element);this.listenerKeys_[e].forEach(Dt),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(ho)},e.prototype.setLayers=function(t){this.set(ho,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var n=this.getLayerState(),r=n.zIndex;t||void 0!==n.zIndex||(r=0);for(var o=i,s=e.length;o<s;o++){var a=e[o];a.opacity*=n.opacity,a.visible=a.visible&&n.visible,a.maxResolution=Math.min(a.maxResolution,n.maxResolution),a.minResolution=Math.max(a.minResolution,n.minResolution),a.minZoom=Math.max(a.minZoom,n.minZoom),a.maxZoom=Math.min(a.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==a.extent?a.extent=vn(a.extent,n.extent):a.extent=n.extent),void 0===a.zIndex&&(a.zIndex=r)}return e},e.prototype.getSourceState=function(){return Ue},e}(ze),po=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fo=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.map=i,r.frameState=void 0!==n?n:null,r}return po(e,t),e}(ot),yo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),go=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,o)||this;return s.originalEvent=n,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return yo(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(fo),mo={SINGLECLICK:"singleclick",CLICK:kt,DBLCLICK:Pt,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},vo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_o=function(t){function e(e,i){var n=t.call(this,e)||this;n.map_=e,n.clickTimeoutId_,n.emulateClicks_=!1,n.dragging_=!1,n.dragListenerKeys_=[],n.moveTolerance_=void 0===i?1:i,n.down_=null;var r=n.map_.getViewport();return n.activePointers_=0,n.trackedTouches_={},n.element_=r,n.pointerdownListenerKey_=At(r,pi,n.handlePointerDown_,n),n.originalPointerMoveEvent_,n.relayedListenerKey_=At(r,ci,n.relayEvent_,n),n.boundHandleTouchMove_=n.handleTouchMove_.bind(n),n.element_.addEventListener(Mt,n.boundHandleTouchMove_,!!ne&&{passive:!1}),n}return vo(e,t),e.prototype.emulateClick_=function(t){var e=new go(mo.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new go(mo.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new go(mo.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==mo.POINTERUP||e.type==mo.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==mo.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new go(mo.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(Dt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new go(mo.POINTERDOWN,this.map_,t);for(var i in this.dispatchEvent(e),this.down_={},t){var n=t[i];this.down_[i]="function"==typeof n?yt:n}if(0===this.dragListenerKeys_.length){var r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(At(r,mo.POINTERMOVE,this.handlePointerMove_,this),At(r,mo.POINTERUP,this.handlePointerUp_,this),At(this.element_,mo.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(At(this.element_.getRootNode(),mo.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new go(mo.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new go(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Dt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Mt,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Dt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Dt),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(wt),xo=1/0,bo=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,mt(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){Pe(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=xo&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;t<n>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<n&&i[l]<i[a]?l:a;e[t]=e[u],i[t]=i[u],t=u}e[t]=r,i[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],o=n[e];e>t;){var s=this.getParentIndex_(e);if(!(n[s]>o))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=r,n[e]=o},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(i=n(t=r[e]))==xo?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=i,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}(),wo=0,So=1,Co=2,To=3,Eo=4,ko=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Po=function(t){function e(e,i){var n=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return n.boundHandleTileChange_=n.handleTileChange.bind(n),n.tileChangeCallback_=i,n.tilesLoading_=0,n.tilesLoadingKeys_={},n}return ko(e,t),e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&e[0].addEventListener(St,this.boundHandleTileChange_);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===Co||i===To||i===Eo){e.removeEventListener(St,this.boundHandleTileChange_);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==wo||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(bo);var Oo=0,Ro=1,Io="center",Fo="resolution",Mo="rotation",jo=256;function Ao(t,e,i){return function(n,r,o,s,a){if(n){var l=e?0:o[0]*r,u=e?0:o[1]*r,h=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+h,d=t[2]-l/2+h,f=t[1]+u/2+c,y=t[3]-u/2+c;p>d&&(d=p=(d+p)/2),f>y&&(y=f=(y+f)/2);var g=Oe(n[0],p,d),m=Oe(n[1],f,y),v=30*r;return s&&i&&(g+=-v*Math.log(1+Math.max(0,p-n[0])/v)+v*Math.log(1+Math.max(0,n[0]-d)/v),m+=-v*Math.log(1+Math.max(0,f-n[1])/v)+v*Math.log(1+Math.max(0,n[1]-y)/v)),[g,m]}}}function Lo(t){return t}function Do(t,e,i,n){var r=bn(e)/i[0],o=mn(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function zo(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Oe(n,i/2,2*e)}function Go(t,e,i,n,r){return function(o,s,a,l){if(void 0!==o){var u=n?Do(t,n,a,r):t;return(void 0===i||i)&&l?zo(o,u,e):Oe(o,e,u)}}}function No(t){return void 0!==t?0:void 0}function Bo(t){return void 0!==t?t:void 0}var Wo="XY",qo="XYZ",Vo="XYM",Uo="XYZM";function Xo(t,e,i,n,r,o){for(var s=o||[],a=0,l=e;l<i;l+=n){var u=t[l],h=t[l+1];s[a++]=r[0]*u+r[2]*h+r[4],s[a++]=r[1]*u+r[3]*h+r[5]}return o&&s.length!=a&&(s.length=a),s}function Ko(t,e,i,n,r,o,s){for(var a=s||[],l=Math.cos(r),u=Math.sin(r),h=o[0],c=o[1],p=0,d=e;d<i;d+=n){var f=t[d]-h,y=t[d+1]-c;a[p++]=h+f*l-y*u,a[p++]=c+f*u+y*l;for(var g=d+2;g<d+n;++g)a[p++]=t[g]}return s&&a.length!=p&&(a.length=p),a}function Yo(t,e,i,n,r,o,s){for(var a=s||[],l=0,u=e;u<i;u+=n){a[l++]=t[u]+r,a[l++]=t[u+1]+o;for(var h=u+2;h<u+n;++h)a[l++]=t[h]}return s&&a.length!=l&&(a.length=l),a}var Zo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ho=[1,0,0,1,0,0],$o=function(t){function e(){var e,i,n,r,o,s=t.call(this)||this;return s.extent_=[1/0,1/0,-1/0,-1/0],s.extentRevision_=-1,s.simplifiedGeometryMaxMinSquaredTolerance=0,s.simplifiedGeometryRevision=0,s.simplifyTransformedInternal=(e=function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);var n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===r&&pt(t,n)||(o=!0,r=this,n=t,i=e.apply(this,arguments)),i}),s}return Zo(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return Bt()},e.prototype.closestPointXY=function(t,e,i,n){return Bt()},e.prototype.containsXY=function(t,e){var i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Bt()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&en(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){Bt()},e.prototype.scale=function(t,e,i){Bt()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Bt()},e.prototype.getType=function(){return Bt()},e.prototype.applyTransform=function(t){Bt()},e.prototype.intersectsExtent=function(t){return Bt()},e.prototype.translate=function(t,e){Bt()},e.prototype.transform=function(t,e){var i=Yn(t),n=i.getUnits()==yi.TILE_PIXELS?function(t,n,r){var o=i.getExtent(),s=i.getWorldExtent(),a=mn(s)/mn(o);return mr(Ho,s[0],s[3],a,-a,0,0,0),Xo(t,0,t.length,r,Ho,n),er(i,e)(t,n,r)}:er(i,e);return this.applyTransform(n),this},e}(Xt),Jo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Qo(t){var e;return t==Wo?e=2:t==qo||t==Vo?e=3:t==Uo&&(e=4),e}var ts=function(t){function e(){var e=t.call(this)||this;return e.layout=Wo,e.stride=2,e.flatCoordinates=null,e}return Jo(e,t),e.prototype.computeExtent=function(t){return rn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Bt()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Qo(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){Bt()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=Qo(t);else{for(var r=0;r<i;++r){if(0===e.length)return this.layout=Wo,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=Wo:3==t?e=qo:4==t&&(e=Uo);return e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Ko(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=fn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,i,n,r,o,s,a){for(var l=a||[],u=s[0],h=s[1],c=0,p=e;p<i;p+=n){var d=t[p]-u,f=t[p+1]-h;l[c++]=u+r*d,l[c++]=h+o*f;for(var y=p+2;y<p+n;++y)l[c++]=t[y]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,n,r,o),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Yo(i,0,i.length,n,t,e,i),this.changed()}},e}($o);function es(t,e,i,n,r,o,s){var a,l=t[e],u=t[e+1],h=t[i]-l,c=t[i+1]-u;if(0===h&&0===c)a=e;else{var p=((r-l)*h+(o-u)*c)/(h*h+c*c);if(p>1)a=i;else{if(p>0){for(var d=0;d<n;++d)s[d]=Le(t[e+d],t[i+d],p);return void(s.length=n)}a=e}}for(d=0;d<n;++d)s[d]=t[a+d];s.length=n}function is(t,e,i,n,r){var o=t[e],s=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],l=t[e+1],u=Me(o,s,a,l);u>r&&(r=u),o=a,s=l}return r}function ns(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];r=is(t,e,a,n,r),e=a}return r}function rs(t,e,i,n,r,o,s,a,l,u,h){if(e==i)return u;var c,p;if(0===r){if((p=Me(s,a,t[e],t[e+1]))<u){for(c=0;c<n;++c)l[c]=t[e+c];return l.length=n,p}return u}for(var d=h||[NaN,NaN],f=e+n;f<i;)if(es(t,f-n,f,n,s,a,d),(p=Me(s,a,d[0],d[1]))<u){for(u=p,c=0;c<n;++c)l[c]=d[c];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(p)-Math.sqrt(u))/r|0,1);if(o&&(es(t,i-n,e,n,s,a,d),(p=Me(s,a,d[0],d[1]))<u)){for(u=p,c=0;c<n;++c)l[c]=d[c];l.length=n}return u}function os(t,e,i,n,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];u=rs(t,e,f,n,r,o,s,a,l,u,c),e=f}return u}function ss(t,e,i,n){for(var r=0,o=i.length;r<o;++r)t[e++]=i[r];return e}function as(t,e,i,n){for(var r=0,o=i.length;r<o;++r)for(var s=i[r],a=0;a<n;++a)t[e++]=s[a];return e}function ls(t,e,i,n,r){for(var o=r||[],s=0,a=0,l=i.length;a<l;++a){var u=as(t,e,i[a],n);o[s++]=u,e=u}return o.length=s,o}function us(t,e,i,n,r,o,s){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[s++]=t[e],o[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var u=[e,i-n],h=0;u.length>0;){for(var c=u.pop(),p=u.pop(),d=0,f=t[p],y=t[p+1],g=t[c],m=t[c+1],v=p+n;v<c;v+=n){var _=Fe(t[v],t[v+1],f,y,g,m);_>d&&(h=v,d=_)}d>r&&(l[(h-e)/n]=1,p+n<h&&u.push(p,h),h+n<c&&u.push(h,c))}for(v=0;v<a;++v)l[v]&&(o[s++]=t[e+v*n],o[s++]=t[e+v*n+1]);return s}function hs(t,e){return e*Math.round(t/e)}function cs(t,e,i,n,r,o,s){if(e==i)return s;var a,l,u=hs(t[e],r),h=hs(t[e+1],r);e+=n,o[s++]=u,o[s++]=h;do{if(a=hs(t[e],r),l=hs(t[e+1],r),(e+=n)==i)return o[s++]=a,o[s++]=l,s}while(a==u&&l==h);for(;e<i;){var c=hs(t[e],r),p=hs(t[e+1],r);if(e+=n,c!=a||p!=l){var d=a-u,f=l-h,y=c-u,g=p-h;d*g==f*y&&(d<0&&y<d||d==y||d>0&&y>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=c,l=p):(o[s++]=a,o[s++]=l,u=a,h=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function ps(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l];s=cs(t,e,h,n,r,o,s),a.push(s),e=h}return s}function ds(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=e;a<i;a+=n)o[s++]=t.slice(a,a+n);return o.length=s,o}function fs(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var u=i[a];o[s++]=ds(t,e,u,n,o[s]),e=u}return o.length=s,o}function ys(t,e,i,n,r){for(var o=void 0!==r?r:[],s=0,a=0,l=i.length;a<l;++a){var u=i[a];o[s++]=fs(t,e,u,n,o[s]),e=u[u.length-1]}return o.length=s,o}function gs(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}function ms(t,e,i,n){for(var r=0,o=0,s=i.length;o<s;++o){var a=i[o];r+=gs(t,e,a,n),e=a}return r}var vs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_s=function(t){function e(e,i){var n=t.call(this)||this;return n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return vs(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<Yi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(is(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),rs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return gs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ds(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=us(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Wo)},e.prototype.getType=function(){return kn},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=as(this.flatCoordinates,0,t,this.stride),this.changed()},e}(ts),xs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bs=function(t){function e(e,i){var n=t.call(this)||this;return n.setCoordinates(e,i),n}return xs(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=Me(t,e,r[0],r[1]);if(o<n){for(var s=this.stride,a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return nn(this.flatCoordinates,t)},e.prototype.getType=function(){return Tn},e.prototype.intersectsExtent=function(t){return $i(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ss(this.flatCoordinates,0,t,this.stride),this.changed()},e}(ts);function ws(t,e,i,n,r){return!hn(r,(function(r){return!Ss(t,e,i,n,r[0],r[1])}))}function Ss(t,e,i,n,r,o){for(var s=0,a=t[i-n],l=t[i-n+1];e<i;e+=n){var u=t[e],h=t[e+1];l<=o?h>o&&(u-a)*(o-l)-(r-a)*(h-l)>0&&s++:h<=o&&(u-a)*(o-l)-(r-a)*(h-l)<0&&s--,a=u,l=h}return 0!==s}function Cs(t,e,i,n,r,o){if(0===i.length)return!1;if(!Ss(t,e,i[0],n,r,o))return!1;for(var s=1,a=i.length;s<a;++s)if(Ss(t,i[s-1],i[s],n,r,o))return!1;return!0}function Ts(t,e,i,n,r,o,s){for(var a,l,u,h,c,p,d,f=r[o+1],y=[],g=0,m=i.length;g<m;++g){var v=i[g];for(h=t[v-n],p=t[v-n+1],a=e;a<v;a+=n)c=t[a],d=t[a+1],(f<=p&&d<=f||p<=f&&f<=d)&&(u=(f-p)/(d-p)*(c-h)+h,y.push(u)),h=c,p=d}var _=NaN,x=-1/0;for(y.sort(lt),h=y[0],a=1,l=y.length;a<l;++a){c=y[a];var b=Math.abs(c-h);b>x&&Cs(t,e,i,n,u=(h+c)/2,f)&&(_=u,x=b),h=c}return isNaN(_)&&(_=r[o]),s?(s.push(_,f,x),s):[_,f,x]}function Es(t,e,i,n,r){for(var o=[],s=0,a=i.length;s<a;++s){var l=i[s];o=Ts(t,e,l,n,r,2*s,o),e=l[l.length-1]}return o}function ks(t,e,i,n,r){var o;for(e+=n;e<i;e+=n)if(o=r(t.slice(e-n,e),t.slice(e,e+n)))return o;return!1}function Ps(t,e,i,n,r){var o=ln([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!wn(r,o)&&(!!Hi(r,o)||(o[0]>=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||ks(t,e,i,n,(function(t,e){return function(t,e,i){var n=!1,r=Ji(t,e),o=Ji(t,i);if(r===Ni||o===Ni)n=!0;else{var s=t[0],a=t[1],l=t[2],u=t[3],h=e[0],c=e[1],p=i[0],d=i[1],f=(d-c)/(p-h),y=void 0,g=void 0;o&Bi&&!(r&Bi)&&(n=(y=p-(d-u)/f)>=s&&y<=l),n||!(o&Wi)||r&Wi||(n=(g=d-(p-l)*f)>=a&&g<=u),n||!(o&qi)||r&qi||(n=(y=p-(d-a)/f)>=s&&y<=l),n||!(o&Vi)||r&Vi||(n=(g=d-(p-s)*f)>=a&&g<=u)}return n}(r,t,e)})))))}function Os(t,e,i,n,r){if(!function(t,e,i,n,r){return!!(Ps(t,e,i,n,r)||Ss(t,e,i,n,r[0],r[1])||Ss(t,e,i,n,r[0],r[3])||Ss(t,e,i,n,r[2],r[1])||Ss(t,e,i,n,r[2],r[3]))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(ws(t,i[o-1],i[o],n,r)&&!Ps(t,i[o-1],i[o],n,r))return!1;return!0}function Rs(t,e,i,n){for(;e<i-n;){for(var r=0;r<n;++r){var o=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=o}e+=n,i-=n}}function Is(t,e,i,n){for(var r=0,o=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return 0===r?void 0:r>0}function Fs(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],u=Is(t,e,l,n);if(0===s){if(o&&u||!o&&!u)return!1}else if(o&&!u||!o&&u)return!1;e=l}return!0}function Ms(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s<a;++s){var l=i[s],u=Is(t,e,l,n);(0===s?o&&u||!o&&!u:o&&!u||!o&&u)&&Rs(t,e,l,n),e=l}return e}function js(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o)e=Ms(t,e,i[o],n,r);return e}var As=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ls=function(t){function e(e,i,n){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==i&&n?(r.setFlatCoordinates(i,e),r.ends_=n):r.setCoordinates(e,i),r}return As(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Yi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ns(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),os(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return Cs(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return ms(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Ms(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,fs(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=fn(this.getExtent());this.flatInteriorPoint_=Ts(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new bs(this.getFlatInteriorPoint(),Vo)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new _s(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],r=0,o=0,s=i.length;o<s;++o){var a=i[o],l=new _s(e.slice(r,a),t);n.push(l),r=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Fs(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ms(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=ps(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,Wo,n)},e.prototype.getType=function(){return Pn},e.prototype.intersectsExtent=function(t){return Os(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ls(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(ts),Ds=Ls;function zs(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=[e,i,e,r,n,r,n,i,e,i];return new Ls(o,Wo,[o.length])}function Gs(t,e,i){for(var n=e||32,r=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=r*(n+1),l=new Array(a),u=0;u<a;u+=r){l[u]=0,l[u+1]=0;for(var h=2;h<r;h++)l[u+h]=s[h]}var c=[l.length],p=new Ls(l,o,c);return function(t,e,i,n){for(var r=t.getFlatCoordinates(),o=t.getStride(),s=r.length/o-1,a=n||0,l=0;l<=s;++l){var u=l*o,h=a+2*Ae(l,s)*Math.PI/s;r[u]=e[0]+i*Math.cos(h),r[u+1]=e[1]+i*Math.sin(h)}t.changed()}(p,s,t.getRadius(),i),p}var Ns=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Bs(t,e){setTimeout((function(){t(e)}),0)}function Ws(t){return!(t.sourceCenter&&t.targetCenter&&!Gn(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function qs(t,e,i,n,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-i[0])*n)*o-(l+=(i[1]-e[1]/2)*n)*(s=-s),l*o+a*s]}var Vs=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=gt({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=$n(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.nextCenter_=null,i.nextResolution_,i.nextRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=ar(n.center,i.projection_)),n.extent&&(n.extent=ur(n.extent,i.projection_)),i.applyOptions_(n),i}return Ns(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,r=28,o=2,s=void 0!==t.minZoom?t.minZoom:0,a=void 0!==t.maxZoom?t.maxZoom:r,l=void 0!==t.zoomFactor?t.zoomFactor:o,u=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,p=$n(t.projection,"EPSG:3857"),d=p.getExtent(),f=t.constrainOnlyCenter,y=t.extent;u||y||!p.isGlobal()||(f=!1,y=d);if(void 0!==t.resolutions){var g=t.resolutions;i=g[s],n=void 0!==g[a]?g[a]:g[g.length-1],e=t.constrainResolution?function(t,e,i,n){return function(r,o,s,a){if(void 0!==r){var l=t[0],u=t[t.length-1],h=i?Do(l,i,s,n):l;if(a)return void 0===e||e?zo(r,h,u):Oe(r,u,h);var c=Math.min(h,r),p=Math.floor(ut(t,c,o));return t[p]>h&&p<t.length-1?t[p+1]:t[p]}}}(g,h,!f&&y,c):Go(i,n,h,!f&&y,c)}else{var m=(d?Math.max(bn(d),mn(d)):360*fi[yi.DEGREES]/p.getMetersPerUnit())/jo/Math.pow(o,0),v=m/Math.pow(o,r-0);void 0!==(i=t.maxResolution)?s=0:i=m/Math.pow(l,s),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,a):m/Math.pow(l,a):v),a=s+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,a-s),e=t.constrainResolution?function(t,e,i,n,r,o){return function(s,a,l,u){if(void 0!==s){var h=r?Do(e,r,l,o):e,c=void 0!==i?i:0;if(u)return void 0===n||n?zo(s,h,c):Oe(s,c,h);var p=Math.ceil(Math.log(e/h)/Math.log(t)-1e-9),d=-a*(.5-1e-9)+.5,f=Math.min(h,s),y=Math.floor(Math.log(e/f)/Math.log(t)+d),g=Math.max(p,y);return Oe(e/Math.pow(t,g),c,h)}}}(l,i,n,h,!f&&y,c):Go(i,n,h,!f&&y,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:l}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=e.minZoom;var i=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Ao(t.extent,t.constrainOnlyCenter,e)}var i=$n(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var n=i.getExtent().slice();return n[0]=-1/0,n[2]=1/0,Ao(n,!1,!1)}return Lo}(t),n=e.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(o=r||je(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=o?0:t:void 0}):!1===e?Bo:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return e?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}):Bo}return No;var i,n;var r,o}(t);this.constraints_={center:i,resolution:n,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var n=t||[0,0,0,0];e=e||[0,0,0,0];var r=this.getResolution(),o=r/2*(n[3]-e[3]+e[1]-n[1]),s=r/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+o,i[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=gt({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),gt({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),i=0;i<e.length;++i){var n=arguments[i];n.center&&((n=gt({},n)).center=ar(n.center,this.getProjection())),n.anchor&&((n=gt({},n)).anchor=ar(n.anchor,this.getProjection())),e[i]=n}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);for(var n=0;n<i&&!this.isDef();++n){var r=arguments[n];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(n!==i){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,u=[];n<i;++n){var h=arguments[n],c={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||oi,callback:e};if(h.center&&(c.sourceCenter=s,c.targetCenter=h.center.slice(),s=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(h.zoom),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=l;var p=Ae(h.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+p,l=c.targetRotation}Ws(c)?c.complete=!0:o+=c.duration,u.push(c)}this.animations_.push(u),this.setHint(Oo,1),this.updateAnimations_()}else e&&Bs(e,!0)},e.prototype.getAnimating=function(){return this.hints_[Oo]>0},e.prototype.getInteracting=function(){return this.hints_[Ro]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Oo,-this.hints_[Oo]);for(var e=0,i=this.animations_.length;e<i;++e){var n=this.animations_[e];if(n[0].callback&&Bs(n[0].callback,!1),!t)for(var r=0,o=n.length;r<o;++r){var s=n[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,o=0,s=n.length;o<s;++o){var a=n[o];if(!a.complete){var l=t-a.start,u=a.duration>0?l/a.duration:1;u>=1?(a.complete=!0,u=1):r=!1;var h=a.easing(u);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],d=a.targetCenter[0],f=a.targetCenter[1];this.nextCenter_=a.targetCenter;var y=c+h*(d-c),g=p+h*(f-p);this.targetCenter_=[y,g]}if(a.sourceResolution&&a.targetResolution){var m=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var v=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(_,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var x=1===h?Ae(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var b=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(b,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(Oo,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var w=n[0].callback;w&&Bs(w,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,o=this.getCenterInternal();return void 0!==o&&(Nn(i=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(n=i)[0]+=+r[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?sr(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Io)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return lr(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();Pe(i,1);var n=this.getResolution();Pe(void 0!==n,2);var r=this.getRotation();return Pe(void 0!==r,3),gn(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Fo)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(ur(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSizeMinusPadding_(),n=bn(t)/i[0],r=mn(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(Mo)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),i=this.getRotation(),n=this.getCenterInternal(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();n=qs(n,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=ut(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Oe(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Oe(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i;if(Pe(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Pe(!Sn(t),25),i=zs(n=ur(t,this.getProjection()));else if(t.getType()===Mn){var n;(i=zs(n=ur(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),fn(n))}else{i=t}this.fitInternal(i,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,u=-1/0,h=0,c=r.length;h<c;h+=o){var p=r[h]*i-r[h+1]*n,d=r[h]*n+r[h+1]*i;s=Math.min(s,p),a=Math.min(a,d),l=Math.max(l,p),u=Math.max(u,d)}return[s,a,l,u]},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSizeMinusPadding_());var r,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[n[0]-o[1]-o[3],n[1]-o[0]-o[2]]);l=isNaN(l)?r:Math.max(l,r),l=this.getConstrainedResolution(l,s?0:1);var u=this.getRotation(),h=Math.sin(u),c=Math.cos(u),p=fn(a);p[0]+=(o[1]-o[3])/2*l,p[1]+=(o[0]-o[2])/2*l;var d=p[0]*c-p[1]*h,f=p[1]*c+p[0]*h,y=this.getConstrainedCenter([d,f],l),g=i.callback?i.callback:yt;void 0!==i.duration?this.animateInternal({resolution:l,center:y,duration:i.duration,easing:i.easing},g):(this.targetResolution_=l,this.targetCenter_=y,this.applyTargetState_(!1,!0),Bs(g,!0))},e.prototype.centerOn=function(t,e,i){this.centerOnInternal(ar(t,this.getProjection()),e,i)},e.prototype.centerOnInternal=function(t,e,i){this.setCenterInternal(qs(t,e,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,i,n){var r,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-i),a=qs(t,n,[s[0]/2+o[3],s[1]/2+o[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=sr(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var i=e&&ar(e,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=ar(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(ar(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,r,i),s=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,n,r));this.get(Mo)!==n&&this.set(Mo,n),this.get(Fo)!==o&&this.set(Fo,o),this.get(Io)&&Gn(this.get(Io),s)||this.set(Io,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,i){var n=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===n&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=i||(0===n?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&Gn(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:n,easing:ri,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Ro,1)},e.prototype.endInteraction=function(t,e,i){var n=i&&ar(i,this.getProjection());this.endInteractionInternal(t,e,n)},e.prototype.endInteractionInternal=function(t,e,i){this.setHint(Ro,-1),this.resolveConstraints(t,e,i)},e.prototype.getConstrainedCenter=function(t,e){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,e){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))},e.prototype.getConstrainedResolution=function(t,e){var i=e||0,n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,n)},e}(Xt);function Us(t){return t[0]>0&&t[1]>0}function Xs(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var Ks=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var Ys=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new co({layers:t.layers});o[oo]=s,o[ao]=t.target,o[lo]=t.view instanceof Vs?t.view:new Vs,void 0!==t.controls&&(Array.isArray(t.controls)?i=new ii(t.controls.slice()):(Pe("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new ii(t.interactions.slice()):(Pe("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?r=new ii(t.overlays.slice()):(Pe("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new ii;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:r,values:o}}(e);i.boundHandleBrowserEvent_=i.handleBrowserEvent.bind(i),i.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,i.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:te,i.postRenderTimeoutHandle_,i.animationDelayKey_,i.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(i),i.coordinateToPixelTransform_=[1,0,0,1,0,0],i.pixelToCoordinateTransform_=[1,0,0,1,0,0],i.frameIndex_=0,i.frameState_=null,i.previousExtent_=null,i.viewPropertyListenerKey_=null,i.viewChangeListenerKey_=null,i.layerGroupPropertyListenerKeys_=null,i.viewport_=document.createElement("div"),i.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.viewport_.style.position="relative",i.viewport_.style.overflow="hidden",i.viewport_.style.width="100%",i.viewport_.style.height="100%",i.overlayContainer_=document.createElement("div"),i.overlayContainer_.style.position="absolute",i.overlayContainer_.style.zIndex="0",i.overlayContainer_.style.width="100%",i.overlayContainer_.style.height="100%",i.overlayContainer_.style.pointerEvents="none",i.overlayContainer_.className="ol-overlaycontainer",i.viewport_.appendChild(i.overlayContainer_),i.overlayContainerStopEvent_=document.createElement("div"),i.overlayContainerStopEvent_.style.position="absolute",i.overlayContainerStopEvent_.style.zIndex="0",i.overlayContainerStopEvent_.style.width="100%",i.overlayContainerStopEvent_.style.height="100%",i.overlayContainerStopEvent_.style.pointerEvents="none",i.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",i.viewport_.appendChild(i.overlayContainerStopEvent_),i.mapBrowserEventHandler_=null,i.moveTolerance_=e.moveTolerance,i.keyboardEventTarget_=n.keyboardEventTarget,i.keyHandlerKeys_=null,i.controls=n.controls||new ii,i.interactions=n.interactions||new ii,i.overlays_=n.overlays,i.overlayIdIndex_={},i.renderer_=null,i.handleResize_,i.postRenderFunctions_=[],i.tileQueue_=new Po(i.getTilePriority.bind(i),i.handleTileChange_.bind(i)),i.addChangeListener(oo,i.handleLayerGroupChanged_),i.addChangeListener(lo,i.handleViewChanged_),i.addChangeListener(so,i.handleSizeChanged_),i.addChangeListener(ao,i.handleTargetChanged_),i.setProperties(n.values);var r=i;return!e.view||e.view instanceof Vs||e.view.then((function(t){r.setView(new Vs(t))})),i.controls.addEventListener($e,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(Je,function(t){t.element.setMap(null)}.bind(i)),i.interactions.addEventListener($e,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(Je,function(t){t.element.setMap(null)}.bind(i)),i.overlays_.addEventListener($e,function(t){this.addOverlayInternal_(t.element)}.bind(i)),i.overlays_.addEventListener(Je,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(i)),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.overlays_.forEach(i.addOverlayInternal_.bind(i)),i}return Ks(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:dt,s=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var n=i||{},r=void 0!==n.hitTolerance?n.hitTolerance:0,o=n.layerFilter||dt;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:dt,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(ao)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return sr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?yr(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(oo)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof ii)e.setLayers(t);else{var i=e.getLayers();i.clear(),i.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer.getSource();if(n&&n.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=ar(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?yr(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(so)},e.prototype.getView=function(){return this.get(lo)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,i,n){return function(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return xo;if(!t.wantedTiles[i][e.getKey()])return xo;var o=t.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,i,n)},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new go(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,i=e.type;if(i===pi||i===jt||i===Ot){var n=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():n,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===n?n.documentElement:r).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[Oo]||r[Ro]){var o=Date.now()-t.time>8;i=o?0:8,n=o?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener(qe)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(qe,t);for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)Dt(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(Et,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(jt,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(Ft,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,se(this.viewport_)}if(t){for(var n in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new _o(this,this.moveTolerance_),mo)this.mapBrowserEventHandler_.addEventListener(mo[n],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(Et,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(jt,this.boundHandleBrowserEvent_,!!ne&&{passive:!1});var r=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[At(r,Ot,this.handleBrowserEvent,this),At(r,Rt,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(Ft,this.handleResize_,!1))}else 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);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Dt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Dt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=At(t,st,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=At(t,St,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Dt),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[At(t,st,this.render,this),At(t,St,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,i=t.length;e<i;++e){var n=t[e].layer;n.hasRenderer()&&n.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,i=this.getSize(),n=this.getView(),r=this.frameState_,o=null;if(void 0!==i&&Us(i)&&n&&n.isDef()){var s=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=n.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:gn(a.center,a.resolution,a.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{}},a.nextCenter&&a.nextResolution){var l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=gn(a.nextCenter,a.nextResolution,l,i)}}if(this.frameState_=o,this.renderer_.renderFrame(o),o){if(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r)(!this.previousExtent_||!Sn(this.previousExtent_)&&!on(o.extent,this.previousExtent_))&&(this.dispatchEvent(new fo(Yt,this,r)),this.previousExtent_=en(this.previousExtent_));this.previousExtent_&&!o.viewHints[Oo]&&!o.viewHints[Ro]&&!on(o.extent,this.previousExtent_)&&(this.dispatchEvent(new fo(Zt,this,o)),Ki(o.extent,this.previousExtent_))}this.dispatchEvent(new fo(Kt,this,o)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){this.set(oo,t)},e.prototype.setSize=function(t){this.set(so,t)},e.prototype.setTarget=function(t){this.set(ao,t)},e.prototype.setView=function(t){if(!t||t instanceof Vs)this.set(lo,t);else{this.set(lo,new Vs);var e=this;t.then((function(t){e.setView(new Vs(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||!Us(e=[n,r])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(Xt),Zs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hs="units",$s="degrees",Js="imperial",Qs="nautical",ta="metric",ea="us",ia=[1,2,5],na=25.4/.28,ra=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.className?n.className:n.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:n.render,target:n.target})||this).on,i.once,i.un,i.innerElement_=document.createElement("div"),i.innerElement_.className=r+"-inner",i.element.className=r+" "+he,i.element.appendChild(i.innerElement_),i.viewState_=null,i.minWidth_=void 0!==n.minWidth?n.minWidth:64,i.renderedVisible_=!1,i.renderedWidth_=void 0,i.renderedHTML_="",i.addChangeListener(Hs,i.handleUnitsChanged_),i.setUnits(n.units||ta),i.scaleBar_=n.bar||!1,i.scaleBarSteps_=n.steps||4,i.scaleBarText_=n.text||!1,i.dpi_=n.dpi||void 0,i}return Zs(e,t),e.prototype.getUnits=function(){return this.get(Hs)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Hs,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,i=t.projection,n=this.getUnits(),r=n==$s?yi.DEGREES:yi.METERS,o=Zn(i,t.resolution,e,r),s=this.minWidth_*(this.dpi_||na)/na,a=s*o,l="";if(n==$s){var u=fi[yi.DEGREES];(a*=u)<u/60?(l="″",o*=3600):a<u?(l="′",o*=60):l="°"}else n==Js?a<.9144?(l="in",o/=.0254):a<1609.344?(l="ft",o/=.3048):(l="mi",o/=1609.344):n==Qs?(o/=1852,l="nm"):n==ta?a<.001?(l="μm",o*=1e6):a<1?(l="mm",o*=1e3):a<1e3?l="m":(l="km",o/=1e3):n==ea?a<.9144?(l="in",o*=39.37):a<1609.344?(l="ft",o/=.30480061):(l="mi",o/=1609.3472):Pe(!1,33);for(var h,c,p,d,f=3*Math.floor(Math.log(s*o)/Math.log(10));;){p=Math.floor(f/3);var y=Math.pow(10,p);if(h=ia[(f%3+3)%3]*y,c=Math.round(h/o),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=s)break;++f}d=this.scaleBar_?this.createScaleBar(c,h,l):h.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a<this.scaleBarSteps_;a++)0===a&&r.push(this.createMarker("absolute",a)),r.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,i):"")+"</div>"),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,i)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+n+"</div>":"")+r.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,i,n,r){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(i?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=Zn(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||na,i=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*i*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(le);function oa(t){var e=t||{},i=new ii;return(void 0===e.zoom||e.zoom)&&i.push(new hi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new li(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new He(e.attributionOptions)),i}var sa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var aa=function(t){function e(e){var i=t.call(this)||this;if(i.on,i.once,i.un,i.id_=void 0,i.geometryName_="geometry",i.style_=null,i.styleFunction_=void 0,i.geometryChangeKey_=null,i.addChangeListener(i.geometryName_,i.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var n=e;i.setGeometry(n)}else{var r=e;i.setProperties(r)}return i}return sa(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Dt(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=At(t,St,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(Pe("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(Xt),la=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,e){var i;if(e){var n=e.dataProjection?Yn(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()===yi.TILE_PIXELS&&(n=Yn(n)).setWorldExtent(e.extent),i={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return gt({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return Bt()},t.prototype.readFeature=function(t,e){return Bt()},t.prototype.readFeatures=function(t,e){return Bt()},t.prototype.readGeometry=function(t,e){return Bt()},t.prototype.readProjection=function(t){return Bt()},t.prototype.writeFeature=function(t,e){return Bt()},t.prototype.writeFeatures=function(t,e){return Bt()},t.prototype.writeGeometry=function(t,e){return Bt()},t}();function ua(t,e,i){var n,r=i?Yn(i.featureProjection):null,o=i?Yn(i.dataProjection):null;if(n=r&&o&&!Qn(r,o)?(e?t.clone():t).transform(e?r:o,e?o:r):t,e&&i&&void 0!==i.decimals){var s=Math.pow(10,i.decimals);n===t&&(n=t.clone()),n.applyTransform((function(t){for(var e=0,i=t.length;e<i;++e)t[e]=Math.round(t[e]*s)/s;return t}))}return n}var ha="arraybuffer",ca="json",pa="text",da="xml",fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ya(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var ga=function(t){function e(){return t.call(this)||this}return fa(e,t),e.prototype.getType=function(){return ca},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(ya(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(ya(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return Bt()},e.prototype.readFeaturesFromObject=function(t,e){return Bt()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(ya(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return Bt()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(ya(t))},e.prototype.readProjectionFromObject=function(t){return Bt()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return Bt()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return Bt()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return Bt()},e}(la);function ma(t,e,i,n,r,o,s){var a,l,u=(i-e)/n;if(1===u)a=e;else if(2===u)a=e,l=r;else if(0!==u){for(var h=t[e],c=t[e+1],p=0,d=[0],f=e+n;f<i;f+=n){var y=t[f],g=t[f+1];p+=Math.sqrt((y-h)*(y-h)+(g-c)*(g-c)),d.push(p),h=y,c=g}var m=r*p,v=function(t,e,i){for(var n,r,o=i||lt,s=0,a=t.length,l=!1;s<a;)(r=+o(t[n=s+(a-s>>1)],e))<0?s=n+1:(a=n,l=!r);return l?s:~s}(d,m);v<0?(l=(m-d[-v-2])/(d[-v-1]-d[-v-2]),a=e+(-v-2)*n):a=e+v*n}var _=s>1?s:2,x=o||new Array(_);for(f=0;f<_;++f)x[f]=void 0===a?NaN:void 0===l?t[a+f]:Le(t[a+f],t[a+n+f],l);return x}function va(t,e,i,n,r,o){if(i==e)return null;var s;if(r<t[e+n-1])return o?((s=t.slice(e,e+n))[n-1]=r,s):null;if(t[i-1]<r)return o?((s=t.slice(i-n,i))[n-1]=r,s):null;if(r==t[e+n-1])return t.slice(e,e+n);for(var a=e/n,l=i/n;a<l;){var u=a+l>>1;r<t[(u+1)*n-1]?l=u:a=u+1}var h=t[a*n-1];if(r==h)return t.slice((a-1)*n,(a-1)*n+n);var c=(r-h)/(t[(a+1)*n-1]-h);s=[];for(var p=0;p<n-1;++p)s.push(Le(t[(a-1)*n+p],t[a*n+p],c));return s.push(r),s}function _a(t,e,i,n){for(var r=t[e],o=t[e+1],s=0,a=e+n;a<i;a+=n){var l=t[a],u=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(u-o)*(u-o)),r=l,o=u}return s}var xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ba=function(t){function e(e,i){var n=t.call(this)||this;return n.flatMidpoint_=null,n.flatMidpointRevision_=-1,n.maxDelta_=-1,n.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?n.setCoordinates(e,i):n.setFlatCoordinates(i,e),n}return xa(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?ct(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Yi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(is(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),rs(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.forEachSegment=function(t){return ks(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=Vo&&this.layout!=Uo)return null;var i=void 0!==e&&e;return va(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return ds(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return ma(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return _a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=us(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,Wo)},e.prototype.getType=function(){return En},e.prototype.intersectsExtent=function(t){return Ps(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=as(this.flatCoordinates,0,t,this.stride),this.changed()},e}(ts),wa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sa=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.ends_=[],r.maxDelta_=-1,r.maxDeltaRevision_=-1,Array.isArray(e[0]))r.setCoordinates(e,i);else if(void 0!==i&&n)r.setFlatCoordinates(i,e),r.ends_=n;else{for(var o=r.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout()),ct(a,c.getFlatCoordinates()),l.push(a.length)}r.setFlatCoordinates(o,a),r.ends_=l}return r}return wa(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){return n<Yi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ns(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),os(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))},e.prototype.getCoordinateAtM=function(t,e,i){if(this.layout!=Vo&&this.layout!=Uo||0===this.flatCoordinates.length)return null;var n=void 0!==e&&e,r=void 0!==i&&i;return function(t,e,i,n,r,o,s){if(s)return va(t,e,i[i.length-1],n,r,o);var a;if(r<t[n-1])return o?((a=t.slice(0,n))[n-1]=r,a):null;if(t[t.length-1]<r)return o?((a=t.slice(t.length-n))[n-1]=r,a):null;for(var l=0,u=i.length;l<u;++l){var h=i[l];if(e!=h){if(r<t[e+n-1])return null;if(r<=t[h-1])return va(t,e,h,n,r,!1);e=h}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,n,r)},e.prototype.getCoordinates=function(){return fs(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new ba(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[],r=0,o=0,s=e.length;o<s;++o){var a=e[o],l=new ba(t.slice(r,a),i);n.push(l),r=a}return n},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,n=this.ends_,r=this.stride,o=0,s=n.length;o<s;++o){var a=n[o];ct(t,ma(e,i,a,r,.5)),i=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l];s=us(t,e,h,n,r,o,s),a.push(s),e=h}return s}(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,n),new e(i,Wo,n)},e.prototype.getType=function(){return Rn},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){if(Ps(t,e,i[o],n,r))return!0;e=i[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ls(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(ts),Ca=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ta=function(t){function e(e,i){var n=t.call(this)||this;return i&&!Array.isArray(e[0])?n.setFlatCoordinates(i,e):n.setCoordinates(e,i),n}return Ca(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?ct(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<Yi(this.getExtent(),t,e))return n;for(var r=this.flatCoordinates,o=this.stride,s=0,a=r.length;s<a;s+=o){var l=Me(t,e,r[s],r[s+1]);if(l<n){n=l;for(var u=0;u<o;++u)i[u]=r[s+u];i.length=o}}return n},e.prototype.getCoordinates=function(){return ds(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new bs(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,i=this.stride,n=[],r=0,o=t.length;r<o;r+=i){var s=new bs(t.slice(r,r+i),e);n.push(s)}return n},e.prototype.getType=function(){return On},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,i=this.stride,n=0,r=e.length;n<r;n+=i){if($i(t,e[n],e[n+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=as(this.flatCoordinates,0,t,this.stride),this.changed()},e}(ts);function Ea(t,e,i,n){for(var r=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=i.length;s<a;++s){var l=i[s];o=rn(t,e,l[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=l[l.length-1]}return r}var ka=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pa=function(t){function e(e,i,n){var r=t.call(this)||this;if(r.endss_=[],r.flatInteriorPointsRevision_=-1,r.flatInteriorPoints_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,!n&&!Array.isArray(e[0])){for(var o=r.getLayout(),s=e,a=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];0===u&&(o=c.getLayout());for(var p=a.length,d=c.getEnds(),f=0,y=d.length;f<y;++f)d[f]+=p;ct(a,c.getFlatCoordinates()),l.push(d)}i=o,e=a,n=l}return void 0!==i&&n?(r.setFlatCoordinates(i,e),r.endss_=n):r.setCoordinates(e,i),r}return ka(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;ct(this.flatCoordinates,t.getFlatCoordinates());for(var n=0,r=(e=t.getEnds().slice()).length;n<r;++n)e[n]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),n=0;n<t;++n)i[n]=this.endss_[n].slice();var r=new e(this.flatCoordinates.slice(),this.layout,i);return r.applyProperties(this),r},e.prototype.closestPointXY=function(t,e,i,n){return n<Yi(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];r=ns(t,e,a,n,r),e=a[a.length-1]}return r}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,r,o,s,a,l,u,h){for(var c=h||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];u=os(t,e,f,n,r,o,s,a,l,u,c),e=f[f.length-1]}return u}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return function(t,e,i,n,r,o){if(0===i.length)return!1;for(var s=0,a=i.length;s<a;++s){var l=i[s];if(Cs(t,e,l,n,r,o))return!0;e=l[l.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,i,n){for(var r=0,o=0,s=i.length;o<s;++o){var a=i[o];r+=ms(t,e,a,n),e=a[a.length-1]}return r}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?js(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,ys(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=Ea(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Es(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new Ta(this.getFlatInteriorPoints().slice(),Vo)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(!Fs(t,e,a,n,r))return!1;a.length&&(e=a[a.length-1])}return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=js(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=function(t,e,i,n,r,o,s,a){for(var l=0,u=i.length;l<u;++l){var h=i[l],c=[];s=ps(t,e,h,n,r,o,s,c),a.push(c),e=h[h.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,n),new e(i,Wo,n)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var n=this.endss_[t].slice(),r=n[n.length-1];if(0!==e)for(var o=0,s=n.length;o<s;++o)n[o]-=e;return new Ds(this.flatCoordinates.slice(e,r),this.layout,n)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[],r=0,o=0,s=i.length;o<s;++o){var a=i[o].slice(),l=a[a.length-1];if(0!==r)for(var u=0,h=a.length;u<h;++u)a[u]-=r;var c=new Ds(e.slice(r,l),t,a);n.push(c),r=l}return n},e.prototype.getType=function(){return In},e.prototype.intersectsExtent=function(t){return function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(Os(t,e,a,n,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=function(t,e,i,n,r){for(var o=r||[],s=0,a=0,l=i.length;a<l;++a){var u=ls(t,e,i[a],n,o[s]);o[s++]=u,e=u[u.length-1]}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var n=i[i.length-1];this.flatCoordinates.length=0===n.length?0:n[n.length-1]}this.changed()},e}(ts),Oa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ra(t){for(var e=[],i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}var Ia=function(t){function e(e){var i=t.call(this)||this;return i.geometries_=e||null,i.changeEventsKeys_=[],i.listenGeometriesChange_(),i}return Oa(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(Dt),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(At(this.geometries_[t],St,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){if(n<Yi(this.getExtent(),t,e))return n;for(var r=this.geometries_,o=0,s=r.length;o<s;++o)n=r[o].closestPointXY(t,e,i,n);return n},e.prototype.containsXY=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){en(t);for(var e=this.geometries_,i=0,n=e.length;i<n;++i)sn(t,e[i].getExtent());return t},e.prototype.getGeometries=function(){return Ra(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var i=[],n=this.geometries_,r=!1,o=0,s=n.length;o<s;++o){var a=n[o],l=a.getSimplifiedGeometry(t);i.push(l),l!==a&&(r=!0)}if(r){var u=new e(null);return u.setGeometriesArray(i),u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return Fn},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,i){var n=i;n||(n=fn(this.getExtent()));for(var r=this.geometries_,o=0,s=r.length;o<s;++o)r[o].scale(t,e,n);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(Ra(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var i=this.geometries_,n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}($o),Fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ma(t,e){if(!t)return null;var i;switch(t.type){case Tn:i=function(t){return new bs(t.coordinates)}(t);break;case En:i=function(t){return new ba(t.coordinates)}(t);break;case Pn:i=function(t){return new Ds(t.coordinates)}(t);break;case On:i=function(t){return new Ta(t.coordinates)}(t);break;case Rn:i=function(t){return new Sa(t.coordinates)}(t);break;case In:i=function(t){return new Pa(t.coordinates)}(t);break;case Fn:i=function(t,e){var i=t.geometries.map((function(t){return Ma(t,e)}));return new Ia(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return ua(i,!1,e)}function ja(t,e){var i,n=(t=ua(t,!0,e)).getType();switch(n){case Tn:i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case En:i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case Pn:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case On:i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case Rn:i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case In:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case Fn:i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var i=gt({},e);return delete i.featureProjection,ja(t,i)}))}}(t,e);break;case Mn:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+n)}return i}var Aa=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this)||this).dataProjection=Yn(n.dataProjection?n.dataProjection:"EPSG:4326"),n.featureProjection&&(i.defaultFeatureProjection=Yn(n.featureProjection)),i.geometryName_=n.geometryName,i.extractGeometryName_=n.extractGeometryName,i.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],i}return Fa(e,t),e.prototype.readFeatureFromObject=function(t,e){var i=null,n=Ma((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),r=new aa;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(n),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties,!0),r},e.prototype.readFeaturesFromObject=function(t,e){var i=null;if("FeatureCollection"===t.type){i=[];for(var n=t.features,r=0,o=n.length;r<o;++r)i.push(this.readFeatureFromObject(n[r],e))}else i=[this.readFeatureFromObject(t,e)];return i},e.prototype.readGeometryFromObject=function(t,e){return Ma(t,e)},e.prototype.readProjectionFromObject=function(t){var e,i=t.crs;return i?"name"==i.type?e=Yn(i.properties.name):"EPSG"===i.type?e=Yn("EPSG:"+i.properties.code):Pe(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;var r=t.getProperties(),o=t.getGeometry();return o&&(i.geometry=ja(o,e),delete r[t.getGeometryName()]),_t(r)||(i.properties=r),i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,e){return ja(t,this.adaptOptions(e))},e}(ga),La=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}(),Da="fraction",za="pixels",Ga="bottom-left",Na="bottom-right",Ba="top-left",Wa="top-right",qa=0,Va=1,Ua=2,Xa=3,Ka=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Xs(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return Bt()},t.prototype.getImage=function(t){return Bt()},t.prototype.getHitDetectionImage=function(){return Bt()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return Bt()},t.prototype.getImageSize=function(){return Bt()},t.prototype.getOrigin=function(){return Bt()},t.prototype.getSize=function(){return Bt()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Xs(t)},t.prototype.listenImageChange=function(t){Bt()},t.prototype.load=function(){Bt()},t.prototype.unlistenImageChange=function(t){Bt()},t}(),Ya=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Za=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=i,o.state=r,o}return Ya(e,t),e.prototype.changed=function(){this.dispatchEvent(St)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Bt()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Bt()},e}(wt),Ha=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function $a(t,e,i){var n=t;if(n.src&&ie){var r=n.decode(),o=!0;return r.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())})),function(){o=!1}}var s=[Lt(n,It,e),Lt(n,Ct,i)];return function(){s.forEach(Dt)}}!function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,qa)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=qa,a.imageLoadFunction_=s,a}Ha(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Xa,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=mn(this.extent)/this.image_.height),this.state=Ua,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=qa&&this.state!=Xa||(this.state=Va,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=$a(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=mn(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(Za);var Ja=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qa=null,tl=function(t){function e(e,i,n,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=n,a.src_=i,a.tainted_,a}return Ja(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Ua){Qa||(Qa=re(1,1)),Qa.drawImage(this.image_,0,0);try{Qa.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Qa=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(St)},e.prototype.handleImageError_=function(){this.imageState_=Xa,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Ua,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],i=re(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==qa){this.imageState_=Va;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=$a(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===Ua){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var i=e.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.isTainted_())i.fillStyle=wr(this.color_),i.fillRect(0,0,e.width/t,e.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var n=i.getImageData(0,0,e.width,e.height),r=n.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],u=0,h=r.length;u<h;u+=4)r[u]*=o,r[u+1]*=s,r[u+2]*=a,r[u+3]*=l;i.putImageData(n,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(wt);var el=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),il=function(t){function e(e){var i=this,n=e||{},r=void 0!==n.opacity?n.opacity:1,o=void 0!==n.rotation?n.rotation:0,s=void 0!==n.scale?n.scale:1,a=void 0!==n.rotateWithView&&n.rotateWithView;(i=t.call(this,{opacity:r,rotation:o,scale:s,displacement:void 0!==n.displacement?n.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==n.anchor?n.anchor:[.5,.5],i.normalizedAnchor_=null,i.anchorOrigin_=void 0!==n.anchorOrigin?n.anchorOrigin:Ba,i.anchorXUnits_=void 0!==n.anchorXUnits?n.anchorXUnits:Da,i.anchorYUnits_=void 0!==n.anchorYUnits?n.anchorYUnits:Da,i.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:null;var l=void 0!==n.img?n.img:null,u=void 0!==n.imgSize?n.imgSize:null,h=n.src;Pe(!(void 0!==h&&l),4),Pe(!l||l&&u,5),void 0!==h&&0!==h.length||!l||(h=l.src||qt(l)),Pe(void 0!==h&&h.length>0,6);var c=void 0!==n.src?qa:Ua;return i.color_=void 0!==n.color?Er(n.color):null,i.iconImage_=function(t,e,i,n,r,o){var s=Rr.get(e,n,o);return s||(s=new tl(t,e,i,n,r,o),Rr.set(e,n,o,s)),s}(l,h,u,i.crossOrigin_,c,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:Ba,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return el(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Da||this.anchorYUnits_==Da){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Da&&(t[0]*=e[0]),this.anchorYUnits_==Da&&(t[1]*=e[1])}if(this.anchorOrigin_!=Ba){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Wa&&this.anchorOrigin_!=Na||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Ga&&this.anchorOrigin_!=Na||(t[1]=-t[1]+e[1])}var i=this.getDisplacement();return t[0]-=i[0],t[1]+=i[1],this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Ba){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=Wa&&this.offsetOrigin_!=Na||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=Ga&&this.offsetOrigin_!=Na||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(St,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(St,t)},e}(Ka),nl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({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()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}();function rl(t){return Array.isArray(t)?Pr(t):t}var ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sl=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.renderOptions_=null,i.render(),i}return ol(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var i=this.renderOptions_,n=re(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return Ua},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n<r){var o=n;n=r,r=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=r*Math.sin(a),u=n-Math.sqrt(r*r-l*l),h=Math.sqrt(l*l+u*u),c=h/l;if("miter"===t&&c<=i)return c*e;var p=e/2/c,d=e/2*(u/h),f=Math.sqrt((n+p)*(n+p)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;var y=n*Math.sin(a),g=r-Math.sqrt(n*n-y*y),m=Math.sqrt(y*y+g*g)/y;if(m<=i){var v=m*e/2-r-n;return 2*Math.max(f,v)}return 2*f},e.prototype.createRenderOptions=function(){var t,e=Nr,i=0,n=null,r=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=Br),t=rl(t),void 0===(o=this.stroke_.getWidth())&&(o=1),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=Nr),void 0===(i=this.stroke_.getMiterLimit())&&(i=10));var s=this.calculateLineJoinSize_(e,o,i),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:n,lineDashOffset:r,lineJoin:e,miterLimit:i}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size,e=this.getDisplacement();this.canvas_={},this.anchor_=[t/2-e[0],t/2+e[1]],this.size_=[t,t]},e.prototype.draw_=function(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var n=this.fill_.getColor();null===n&&(n=Dr),e.fillStyle=rl(n),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Er(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=re(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{var n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var r=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=r+s*o,l=s%2==0?i:n;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Dr,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}(Ka),al=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ll=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return al(e,t),e.prototype.clone=function(){var t=this.getScale(),i=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(sl),ul=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=dl,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"==typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=dl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var hl=null;function cl(t,e){if(!hl){var i=new La({color:"rgba(255,255,255,0.4)"}),n=new nl({color:"#3399CC",width:1.25});hl=[new ul({image:new ll({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return hl}function pl(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t[Pn]=[new ul({fill:new La({color:[255,255,255,.5]})})],t[In]=t[Pn],t[En]=[new ul({stroke:new nl({color:e,width:5})}),new ul({stroke:new nl({color:i,width:3})})],t[Rn]=t[En],t[Mn]=t[Pn].concat(t[En]),t[Tn]=[new ul({image:new ll({radius:6,fill:new La({color:i}),stroke:new nl({color:e,width:1.5})}),zIndex:1/0})],t[On]=t[Tn],t[Fn]=t[Pn].concat(t[En],t[Tn]),t}function dl(t){return t.getGeometry()}var fl=ul,yl="point",gl="line",ml=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=Xs(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new La({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:yl,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),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()})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Xs(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}(),vl={
|
29
29
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
30
|
-
read:function(t,e,i,n,r){var o,s,a=8*r-n-1,l=(1<<a)-1,u=l>>1,h=-7,c=i?r-1:0,p=i?-1:1,d=t[e+c];for(c+=p,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=p,h-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},write:function(t,e,i,n,r,o){var s,a,l,u=8*o-r-1,h=(1<<u)-1,c=h>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,f=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*l-1)*Math.pow(2,r),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,r),s=0));r>=8;t[i+d]=255&a,d+=f,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;t[i+d]=255&s,d+=f,s/=256,u-=8);t[i+d-f]|=128*y}},ml=_l,vl=gl;function _l(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}_l.Varint=0,_l.Fixed64=1,_l.Bytes=2,_l.Fixed32=5;var xl=4294967296,bl=1/xl,wl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Sl(t){return t.type===_l.Bytes?t.readVarint()+t.pos:t.pos+1}function Cl(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Tl(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function El(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function kl(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Pl(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Ol(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function Rl(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function Il(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function Fl(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function jl(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function Ml(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Al(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Ll(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function zl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}_l.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,t(r,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Al(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=zl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Al(this.buf,this.pos)+Al(this.buf,this.pos+4)*xl;return this.pos+=8,t},readSFixed64:function(){var t=Al(this.buf,this.pos)+zl(this.buf,this.pos+4)*xl;return this.pos+=8,t},readFloat:function(){var t=vl.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=vl.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,o=i.buf;if(r=o[i.pos++],n=(112&r)>>4,r<128)return Cl(t,n,e);if(r=o[i.pos++],n|=(127&r)<<3,r<128)return Cl(t,n,e);if(r=o[i.pos++],n|=(127&r)<<10,r<128)return Cl(t,n,e);if(r=o[i.pos++],n|=(127&r)<<17,r<128)return Cl(t,n,e);if(r=o[i.pos++],n|=(127&r)<<24,r<128)return Cl(t,n,e);if(r=o[i.pos++],n|=(1&r)<<31,r<128)return Cl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&wl?function(t,e,i){return wl.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r<i;){var o,s,a,l=t[r],u=null,h=l>239?4:l>223?3:l>191?2:1;if(r+h>i)break;1===h?l<128&&(u=l):2===h?128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===h?(o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&((u=(15&l)<<12|(63&o)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===h&&(o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,h=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=h}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==_l.Bytes)return t.push(this.readVarint(e));var i=Sl(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==_l.Bytes)return t.push(this.readSVarint());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==_l.Bytes)return t.push(this.readBoolean());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==_l.Bytes)return t.push(this.readFloat());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==_l.Bytes)return t.push(this.readDouble());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==_l.Bytes)return t.push(this.readFixed32());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==_l.Bytes)return t.push(this.readSFixed32());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==_l.Bytes)return t.push(this.readFixed64());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==_l.Bytes)return t.push(this.readSFixed64());var e=Sl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===_l.Varint)for(;this.buf[this.pos++]>127;);else if(e===_l.Bytes)this.pos=this.readVarint()+this.pos;else if(e===_l.Fixed32)this.pos+=4;else{if(e!==_l.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Ll(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Ll(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Ll(this.buf,-1&t,this.pos),Ll(this.buf,Math.floor(t*bl),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Ll(this.buf,-1&t,this.pos),Ll(this.buf,Math.floor(t*bl),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,n;t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&Tl(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),vl.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),vl.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var n=this.pos-i;n>=128&&Tl(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,_l.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,El,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,kl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Rl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Ol,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Il,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Fl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,jl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Ml,e)},writeBytesField:function(t,e){this.writeTag(t,_l.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,_l.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,_l.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,_l.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,_l.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,_l.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,_l.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,_l.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,_l.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,_l.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Dl=[1,0,0,1,0,0],Gl=function(){function t(t,e,i,n,r){this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=n}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===Cn?en(this.flatCoordinates_):nn(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=dn(this.getExtent());this.flatInteriorPoints_=Cs(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Ca(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Ts(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=ya(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,i=this.ends_,n=0,r=i.length;n<r;++n){var o=i[n],s=ya(t,e,o,2,.5);ct(this.flatMidpoints_,s),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t){var e=(t=Kn(t)).getExtent(),i=t.getWorldExtent();if(e&&i){var n=gn(i)/gn(e);gr(Dl,i[0],i[3],n,-n,0,0,0),Uo(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Dl,this.flatCoordinates_)}},t.prototype.getEnds=function(){return this.ends_},t}();Gl.prototype.getEndss=Gl.prototype.getEnds,Gl.prototype.getFlatCoordinates=Gl.prototype.getOrientedFlatCoordinates;var Nl=Gl,Bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Wl(t,e,i){if(3===t){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(ql,n,r),n.length=n.features.length,n.length&&(e[n.name]=n)}}function ql(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function Vl(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=e.layer.keys[i.readVarint()],o=e.layer.values[i.readVarint()];e.properties[r]=o}else 3==t?e.type=i.readVarint():4==t&&(e.geometry=i.pos)}function Ul(t,e,i){t.pos=e.features[i];var n=t.readVarint()+t.pos,r={layer:e,type:0,properties:{}};return t.readFields(Vl,r,n),r}var Xl=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=new yi({code:"",units:fi.TILE_PIXELS}),i.featureClass_=n.featureClass?n.featureClass:Nl,i.geometryName_=n.geometryName,i.layerName_=n.layerName?n.layerName:"layer",i.layers_=n.layers?n.layers:null,i.idProperty_=n.idProperty,i}return Bl(e,t),e.prototype.readRawGeometry_=function(t,e,i,n){t.pos=e.geometry;for(var r=t.readVarint()+t.pos,o=1,s=0,a=0,l=0,u=0,h=0;t.pos<r;){if(!s){var c=t.readVarint();o=7&c,s=c>>3}s--,1===o||2===o?(a+=t.readSVarint(),l+=t.readSVarint(),1===o&&u>h&&(n.push(u),h=u),i.push(a,l),u+=2):7===o?u>h&&(i.push(i[h],i[h+1]),u+=2):ke(!1,59)}u>h&&(n.push(u),h=u)},e.prototype.createFeature_=function(t,e,i){var n,r=e.type;if(0===r)return null;var o,s=e.properties;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;var a=[],l=[];this.readRawGeometry_(t,e,a,l);var u=function(t,e){var i;1===t?i=1===e?Cn:Pn:2===t?i=1===e?Tn:On:3===t&&(i=kn);return i}(r,l.length);if(this.featureClass_===Nl)(n=new this.featureClass_(u,a,l,s,o)).transform(i.dataProjection);else{var h=void 0;if(u==kn){for(var c=[],p=0,d=0,f=0,y=l.length;f<y;++f){var g=l[f];if(Rs(a,p,g,2)){if(0===c.length)continue;c[c.length-1].push(l[d])}else c.push(l.slice(d,f+1));d=f+1,p=g}h=c.length>1?new Ea(a,Bo,c):new As(a,Bo,l)}else h=u===Cn?new xs(a,Bo):u===Tn?new _a(a,Bo):u===kn?new As(a,Bo,l):u===Pn?new Sa(a,Bo):u===On?new ba(a,Bo,l):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var m=aa(h,!1,i);n.setGeometry(m),n.setId(o),n.setProperties(s,!0)}return n},e.prototype.getType=function(){return la},e.prototype.readFeatures=function(t,e){var i=this.layers_,n=this.adaptOptions(e),r=Kn(n.dataProjection);r.setWorldExtent(n.extent),n.dataProjection=r;var o=new ml(t),s=o.readFields(Wl,{}),a=[];for(var l in s)if(!i||-1!=i.indexOf(l)){var u=s[l],h=u?[0,0,u.extent,u.extent]:null;r.setExtent(h);for(var c=0,p=u.length;c<p;++c){var d=Ul(o,u,c);a.push(this.createFeature_(o,d,n))}}return a},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(sa),Kl="active",Yl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Zl(t,e,i,n){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==n?n:250,easing:ni})}}var Hl=function(t){function e(e){var i=t.call(this)||this;return i.on,i.once,i.un,e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return Yl(e,t),e.prototype.getActive=function(){return this.get(Kl)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Kl,t)},e.prototype.setMap=function(t){this.map_=t},e}(Xt),$l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jl=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return $l(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==go.DBLCLICK){var i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;Zl(n.getView(),o,r,this.duration_),i.preventDefault(),e=!0}return!e},e}(Hl),Ql=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function tu(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]}var eu=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return Ql(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==go.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==go.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==go.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==go.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===go.POINTERDOWN||e===go.POINTERDRAG||e===go.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==go.POINTERUP?delete this.trackedPointers_[i]:(t.type==go.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=vt(this.trackedPointers_)}},e}(Hl);function iu(t){var e=arguments;return function(t){for(var i=!0,n=0,r=e.length;n<r&&(i=i&&e[n](t));++n);return i}}var nu=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ru=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},ou=dt,su=function(t){var e=t.originalEvent;return 0==e.button&&!(Jt&&Qt&&e.ctrlKey)},au=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},lu=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},uu=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},hu=function(t){var e=t.originalEvent;return ke(void 0!==e,56),"mouse"==e.pointerType},cu=function(t){var e=t.originalEvent;return ke(void 0!==e,56),e.isPrimary&&0===e.button},pu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),du=function(t){function e(e){var i=t.call(this,{stopDown:ft})||this,n=e||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var r=n.condition?n.condition:iu(au,cu);return i.condition_=n.onFocusOnly?iu(ru,r):r,i.noKinetic_=!1,i}return pu(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=tu(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,i=s.getResolution(),e[0]*=i,e[1]*=i,Gn(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-n*Math.cos(r),s[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:ni})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(eu),fu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yu=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:ft})||this).condition_=n.condition?n.condition:nu,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return fu(e,t),e.prototype.handleDragEvent=function(t){if(hu(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Go){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!hu(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!hu(t)&&(!(!su(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(eu),gu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mu=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return gu(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new As([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(at),vu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_u="boxstart",xu="boxdrag",bu="boxend",wu="boxcancel",Su=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return vu(e,t),e}(ot),Cu=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=e||{};return i.box_=new mu(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:su,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return vu(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Su(xu,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Su(e?bu:wu,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Su(_u,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(eu),Tu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eu=function(t){function e(e){var i=this,n=e||{},r=n.condition?n.condition:lu;return(i=t.call(this,{condition:r,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return Tu(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),i=this.getGeometry();if(this.out_){var n=e.rotatedExtentForGeometry(i),r=e.getResolutionForExtentInternal(n),o=e.getResolution()/r;(i=i.clone()).scale(o*o)}e.fitInternal(i,{duration:this.duration_,easing:ni})},e}(Cu),ku=37,Pu=38,Ou=39,Ru=40,Iu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fu=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return au(t)&&uu(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return Iu(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ot){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==Ru||n==ku||n==Ou||n==Pu)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;n==Ru?a=-o:n==ku?s=-o:n==Ou?s=o:a=o;var l=[s,a];Gn(l,r.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:oi,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Hl),ju=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mu=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:uu,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return ju(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ot||t.type==Rt){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,o=n=="+".charCodeAt(0)?this.delta_:-this.delta_;Zl(r.getView(),o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Hl),Au=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),Lu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zu="trackpad",Du="wheel",Gu=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var r=n.condition?n.condition:ou;return i.condition_=n.onFocusOnly?iu(ru,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return Lu(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==Mt)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==Mt&&(e=n.deltaY,$t&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=te),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?zu:Du);var o=i.getView();if(this.mode_===zu&&!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(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-Pe(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Zl(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Hl),Nu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Bu=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return Nu(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Go){var l=s.getViewport().getBoundingClientRect(),u=tu(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(u),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(eu),Wu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qu=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return Wu(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var u=a.getViewport().getBoundingClientRect(),h=tu(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(eu),Vu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uu=function(t){function e(e,i,n){var r=t.call(this)||this;if(void 0!==n&&void 0===i)r.setFlatCoordinates(n,e);else{var o=i||0;r.setCenterAndRadius(e,o,n)}return r}return Vu(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=t-r[0],s=e-r[1],a=o*o+s*s;if(a<n){if(0===a)for(var l=0;l<this.stride;++l)i[l]=r[l];else{var u=this.getRadius()/Math.sqrt(a);i[0]=r[0]+u*o,i[1]=r[1]+u*s;for(l=2;l<this.stride;++l)i[l]=r[l]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],r=e-i[1];return n*n+r*r<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return Qi(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return Fn},e.prototype.intersectsExtent=function(t){if(bn(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||un(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var r=1;r<e;++r)n[e+r]=t[r];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,r=os(n,0,t,this.stride);n[r++]=n[0]+e;for(var o=1,s=this.stride;o<s;++o)n[r++]=n[o];n.length=r,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(Xo(i,0,i.length,n,t,e,i)),this.changed()},e.prototype.translate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(Ko(i,0,i.length,n,t,e,i)),this.changed()},e}(Qo);Uu.prototype.transform;var Xu=Uu;function Ku(t,e,i,n,r){Yu(t,e,i||0,n||t.length-1,r||Hu)}function Yu(t,e,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,s=e-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1);Yu(t,e,Math.max(i,Math.floor(e-s*l/o+u)),Math.min(n,Math.floor(e+(o-s)*l/o+u)),r)}var h=t[e],c=i,p=n;for(Zu(t,i,e),r(t[n],h)>0&&Zu(t,i,n);c<p;){for(Zu(t,c,p),c++,p--;r(t[c],h)<0;)c++;for(;r(t[p],h)>0;)p--}0===r(t[i],h)?Zu(t,i,p):Zu(t,++p,n),p<=e&&(i=p+1),e<=p&&(n=p-1)}}function Zu(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function Hu(t,e){return t<e?-1:t>e?1:0}class $u{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!lh(t,e))return i;const n=this.toBBox,r=[];for(;e;){for(let o=0;o<e.children.length;o++){const s=e.children[o],a=e.leaf?n(s):s;lh(t,a)&&(e.leaf?i.push(s):ah(t,a)?this._all(s,i):r.push(s))}e=r.pop()}return i}collides(t){let e=this.data;if(!lh(t,e))return!1;const i=[];for(;e;){for(let n=0;n<e.children.length;n++){const r=e.children[n],o=e.leaf?this.toBBox(r):r;if(lh(t,o)){if(e.leaf||ah(t,o))return!0;i.push(r)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=uh([]),this}remove(t,e){if(!t)return this;let i=this.data;const n=this.toBBox(t),r=[],o=[];let s,a,l;for(;i||r.length;){if(i||(i=r.pop(),a=r[r.length-1],s=o.pop(),l=!0),i.leaf){const n=Ju(t,i.children,e);if(-1!==n)return i.children.splice(n,1),r.push(i),this._condense(r),this}l||i.leaf||!ah(i,n)?a?(s++,i=a.children[s],l=!1):i=null:(r.push(i),o.push(s),s=0,a=i,i=i.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,n){const r=i-e+1;let o,s=this._maxEntries;if(r<=s)return o=uh(t.slice(e,i+1)),Qu(o,this.toBBox),o;n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,n-1))),o=uh([]),o.leaf=!1,o.height=n;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));hh(t,e,i,l,this.compareMinX);for(let u=e;u<=i;u+=l){const e=Math.min(u+l-1,i);hh(t,u,e,a,this.compareMinY);for(let i=u;i<=e;i+=a){const r=Math.min(i+a-1,e);o.children.push(this._build(t,i,r,n-1))}}return Qu(o,this.toBBox),o}_chooseSubtree(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let a=0;a<e.children.length;a++){const l=e.children[a],u=rh(l),h=(r=t,o=l,(Math.max(o.maxX,r.maxX)-Math.min(o.minX,r.minX))*(Math.max(o.maxY,r.maxY)-Math.min(o.minY,r.minY))-u);h<s?(s=h,n=u<n?u:n,i=l):h===s&&u<n&&(n=u,i=l)}e=i||e.children[0]}var r,o;return e}_insert(t,e,i){const n=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(n,this.data,e,r);for(o.children.push(t),eh(o,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const o=this._chooseSplitIndex(i,r,n),s=uh(i.children.splice(o,i.children.length-o));s.height=i.height,s.leaf=i.leaf,Qu(i,this.toBBox),Qu(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)}_splitRoot(t,e){this.data=uh([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Qu(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,r=1/0,o=1/0;for(let s=e;s<=i-e;s++){const e=th(t,0,s,this.toBBox),a=th(t,s,i,this.toBBox),l=sh(e,a),u=rh(e)+rh(a);l<r?(r=l,n=s,o=u<o?u:o):l===r&&u<o&&(o=u,n=s)}return n||i-e}_chooseSplitAxis(t,e,i){const n=t.leaf?this.compareMinX:ih,r=t.leaf?this.compareMinY:nh;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);const r=this.toBBox,o=th(t,0,e,r),s=th(t,i-e,i,r);let a=oh(o)+oh(s);for(let l=e;l<i-e;l++){const e=t.children[l];eh(o,t.leaf?r(e):e),a+=oh(o)}for(let l=i-e-1;l>=e;l--){const e=t.children[l];eh(s,t.leaf?r(e):e),a+=oh(s)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)eh(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():Qu(t[i],this.toBBox)}}function Ju(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function Qu(t,e){th(t,0,t.children.length,e,t)}function th(t,e,i,n,r){r||(r=uh(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=e;o<i;o++){const e=t.children[o];eh(r,t.leaf?n(e):e)}return r}function eh(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function ih(t,e){return t.minX-e.minX}function nh(t,e){return t.minY-e.minY}function rh(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function oh(t){return t.maxX-t.minX+(t.maxY-t.minY)}function sh(t,e){const i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function ah(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function lh(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function uh(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function hh(t,e,i,n,r){const o=[e,i];for(;o.length;){if((i=o.pop())-(e=o.pop())<=n)continue;const s=e+Math.ceil((i-e)/n/2)*n;Ku(t,s,e,i,r),o.push(e,s,s,i)}}var ch=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ph="renderOrder",dh=function(t){function e(e){var i=this,n=e||{},r=gt({},n);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return ch(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(ph)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new $u(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(ph,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:ul,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:(ke("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e}(Ke),fh={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},yh=[fh.FILL],gh=[fh.STROKE],mh=[fh.BEGIN_PATH],vh=[fh.CLOSE_PATH],_h=fh,xh=function(){function t(){}return t.prototype.drawCustom=function(t,e,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),bh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wh=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=i,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return bh(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates,o=r.length,s=0,a=t.length;s<a;s+=e)n[0]=t[s],n[1]=t[s+1],Yi(i,n)&&(r[o++]=n[0],r[o++]=n[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,i,n,r,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=n);var u,h,c,p=t[e],d=t[e+1],f=this.tmpCoordinate_,y=!0;for(u=e+n;u<i;u+=n)f[0]=t[u],f[1]=t[u+1],(c=$i(l,f))!==h?(y&&(s[a++]=p,s[a++]=d,y=!1),s[a++]=f[0],s[a++]=f[1]):c===Gi?(s[a++]=f[0],s[a++]=f[1],y=!1):y=!0,p=f[0],d=f[1],h=c;return(r&&y||u===e+n)&&(s[a++]=p,s[a++]=d),a},e.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o],l=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,r,o,s,a,l=t.getType(),u=t.getStride(),h=this.coordinates.length;if(l==Rn){n=t.getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,d=c.length;p<d;++p){var f=[];a=this.drawCustomCoordinates_(n,a,c[p],u,f),s.push(f)}this.instructions.push([_h.CUSTOM,h,s,t,i,fs])}else l==kn||l==On?(o=[],n=l==kn?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),u,o),this.instructions.push([_h.CUSTOM,h,o,t,i,ds])):l==Tn||l==Fn?(n=t.getFlatCoordinates(),r=this.appendFlatLineCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([_h.CUSTOM,h,r,t,i,ps])):l==Pn?(n=t.getFlatCoordinates(),(r=this.appendFlatPointCoordinates(n,u))>h&&this.instructions.push([_h.CUSTOM,h,r,t,i,ps])):l==Cn&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([_h.CUSTOM,h,r,t,i]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[_h.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[_h.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==_h.END_GEOMETRY?o=t:n==_h.BEGIN_GEOMETRY&&(i[2]=t,ht(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=il(n||Lr)}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=il(r||Nr);var o=e.getLineCap();i.lineCap=void 0!==o?o:zr;var s=e.getLineDash();i.lineDash=s?s.slice():Dr;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:Gr;var u=e.getWidth();i.lineWidth=void 0!==u?u:1;var h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[_h.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[_h.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!pt(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[_h.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Xi(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Ui(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(xh),Sh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ch=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return Sh(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([_h.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([_h.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([_h.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([_h.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(wh),Th=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eh=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return Th(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),s=[_h.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([_h.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Dr,0],mh);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(gh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([_h.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],mh);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinates_(s,l,o[u],a);this.hitDetectionInstructions.push(gh),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(gh),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(gh),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(mh)},e}(wh),kh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ph=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return kh(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=i.length;this.instructions.push(mh),this.hitDetectionInstructions.push(mh);for(var l=0;l<a;++l){var u=i[l],h=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,n,!0,!s),p=[_h.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(vh),this.hitDetectionInstructions.push(vh)),e=u}return o&&(this.instructions.push(yh),this.hitDetectionInstructions.push(yh)),s&&(this.instructions.push(gh),this.hitDetectionInstructions.push(gh)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([_h.SET_FILL_STYLE,Lr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([_h.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[_h.CIRCLE,a];this.instructions.push(mh,l),this.hitDetectionInstructions.push(mh,l),void 0!==i.fillStyle&&(this.instructions.push(yh),this.hitDetectionInstructions.push(yh)),void 0!==i.strokeStyle&&(this.instructions.push(gh),this.hitDetectionInstructions.push(gh)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([_h.SET_FILL_STYLE,Lr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([_h.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([_h.SET_FILL_STYLE,Lr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([_h.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinatess_(s,l,o[u],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=us(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(wh);function Oh(t,e,i,n,r){var o,s,a,l,u,h,c,p,d,f=i,y=i,g=0,m=0,v=i;for(o=i;o<n;o+=r){var _=e[o],x=e[o+1];void 0!==l&&(p=_-l,d=x-u,a=Math.sqrt(p*p+d*d),void 0!==h&&(m+=s,Math.acos((h*p+c*d)/(s*a))>t&&(m>g&&(g=m,f=v,y=o),m=0,v=o-r)),s=a,h=p,c=d),l=_,u=x}return(m+=a)>g?[v,o]:[f,y]}var Rh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ih={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Fh={Circle:Ph,Default:wh,Image:Ch,LineString:Eh,Polygon:Ph,Text:function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return Rh(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,u=t.getStride();if(r.placement!==fl||a!=Tn&&a!=On&&a!=kn&&a!=Rn){var h=r.overflow?null:[];switch(a){case Cn:case Pn:l=t.getFlatCoordinates();break;case Tn:l=t.getFlatMidpoint();break;case Fn:l=t.getCenter();break;case On:l=t.getFlatMidpoints(),u=2;break;case kn:l=t.getFlatInteriorPoint(),r.overflow||h.push(l[2]/this.resolution),u=3;break;case Rn:var c=t.getFlatInteriorPoints();l=[];for(w=0,S=c.length;w<S;w+=3)r.overflow||h.push(c[w+2]/this.resolution),l.push(c[w],c[w+1]);if(0===l.length)return;u=2}if((R=this.appendFlatPointCoordinates(l,u))===s)return;if(h&&(R-s)/2!=l.length/u){var p=s/2;h=h.filter((function(t,e){var i=o[2*(p+e)]===l[e*u]&&o[2*(p+e)+1]===l[e*u+1];return i||--p,i}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var d=r.padding;if(d!=qr&&(r.scale[0]<0||r.scale[1]<0)){var f=r.padding[0],y=r.padding[1],g=r.padding[2],m=r.padding[3];r.scale[0]<0&&(y=-y,m=-m),r.scale[1]<0&&(f=-f,g=-g),d=[f,y,g,m]}var v=this.pixelRatio;this.instructions.push([_h.DRAW_IMAGE,s,R,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,d==qr?qr:d.map((function(t){return t*v})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);var _=1/v;this.hitDetectionInstructions.push([_h.DRAW_IMAGE,s,R,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,this.declutterImageWithText_,d,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),this.endGeometry(e)}else{if(!bn(this.getBufferedMaxExtent(),t.getExtent()))return;var x=void 0;if(l=t.getFlatCoordinates(),a==Tn)x=[l.length];else if(a==On)x=t.getEnds();else if(a==kn)x=t.getEnds().slice(0,1);else if(a==Rn){var b=t.getEndss();x=[];for(var w=0,S=b.length;w<S;++w)x.push(b[w][0])}this.beginGeometry(t,e);for(var C=r.textAlign,T=0,E=void 0,k=0,P=x.length;k<P;++k){if(null==C){var O=Oh(r.maxAngle,l,T,x[k],u);T=O[0],E=O[1]}else E=x[k];for(var w=T;w<E;w+=u)o.push(l[w],l[w+1]);var R=o.length;T=x[k],this.drawChars_(s,R),s=R}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Br,textBaseline:e.textBaseline||Wr,scale:e.scale});var o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e){var i=this.textStrokeState_,n=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Ih[n.textBaseline],u=this.textOffsetY_*a,h=this.text_,c=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([_h.DRAW_CHARS,t,e,l,n.overflow,s,n.maxAngle,a,u,r,c*a,h,o,1]),this.hitDetectionInstructions.push([_h.DRAW_CHARS,t,e,l,n.overflow,s,n.maxAngle,1,u,r,c,h,o,1/a])},e.prototype.setTextStyle=function(t,e){var i,n,r;if(t){var o=t.getFill();o?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=il(o.getColor()||Lr)):(n=null,this.textFillState_=n);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),l=s.getLineDashOffset(),u=s.getWidth(),h=s.getMiterLimit();r.lineCap=s.getLineCap()||zr,r.lineDash=a?a.slice():Dr,r.lineDashOffset=void 0===l?0:l,r.lineJoin=s.getLineJoin()||Gr,r.lineWidth=void 0===u?1:u,r.miterLimit=void 0===h?10:h,r.strokeStyle=il(s.getColor()||Nr)}else r=null,this.textStrokeState_=r;i=this.textState_;var c=t.getFont()||Ar;Hr(c);var p=t.getScaleArray();i.overflow=t.getOverflow(),i.font=c,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||Wr,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||qr,i.scale=void 0===p?[1,1]:p;var d=t.getOffsetX(),f=t.getOffsetY(),y=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===f?0:f,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0===g?0:g,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:qt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+qt(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(wh)},jh=function(){function t(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var r=i[n].finish();t[e][n]=r}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);var r=n[e];void 0===r&&(r=new(0,Fh[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r);return r},t}(),Mh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ah=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return Mh(e,t),e.prototype.getFeatures=function(t){return Bt()},e.prototype.prepareFrame=function(t){return Bt()},e.prototype.renderFrame=function(t,e){return Bt()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){var o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return Bt()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===qa&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=qa&&e!=Va&&t.addEventListener(St,this.boundHandleImageChange_),e==Ba&&(t.load(),e=t.getState()),e==qa},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Ve&&t.changed()},e}(Nt),Lh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zh=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return Lh(e,t),e.prototype.useContainer=function(t,e,i){var n,r,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(r=a.getContext("2d")));if(!r||0!==r.canvas.width&&r.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=r,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=o;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var a=(r=re()).canvas;n.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clipUnrotated=function(t,e,i){var n=vn(i),r=_n(i),o=pn(i),s=cn(i);fr(e.coordinateToPixelTransform,n),fr(e.coordinateToPixelTransform,r),fr(e.coordinateToPixelTransform,o),fr(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;fr(a,n),fr(a,r),fr(a,o),fr(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new Mr(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(De,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Ge,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,o,s){var a=r/2,l=o/2,u=n/e,h=-u,c=-t[0]+s,p=-t[1];return gr(this.tempTransform,a,l,u,h,-i,c,p)},e.prototype.getDataAtPixel=function(t,e,i){var n,r=fr(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer().getExtent();if(s&&!Yi(s,fr(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(r[0]),l=Math.round(r[1]),u=document.createElement("canvas"),h=u.getContext("2d");u.width=1,u.height=1,h.clearRect(0,0,1,1),h.drawImage(o.canvas,a,l,1,1,0,0,1,1),n=h.getImageData(0,0,1,1).data}catch(c){return"SecurityError"===c.name?new Uint8Array:n}return 0===n[3]?null:n},e}(Ah),Dh="Circle",Gh="Default",Nh="Image",Bh="LineString",Wh="Polygon",qh="Text";function Vh(t,e,i,n,r,o,s,a,l,u,h,c){var p=t[e],d=t[e+1],f=0,y=0,g=0,m=0;function v(){f=p,y=d,p=t[e+=n],d=t[e+1],m+=g,g=Math.sqrt((p-f)*(p-f)+(d-y)*(d-y))}do{v()}while(e<i-n&&m+g<o);for(var _=(o-m)/g,x=Ae(f,p,_),b=Ae(y,d,_),w=e-n,S=m,C=o+a*l(u,r,h);e<i-n&&m+g<C;)v();var T,E=Ae(f,p,_=(C-m)/g),k=Ae(y,d,_);if(c){var P=[x,b,E,k];Xo(P,0,4,2,c,P,P),T=P[0]>P[2]}else T=x>E;var O,R=Math.PI,I=[],F=w+n===e;if(g=0,m=S,p=t[e=w],d=t[e+1],F){v();var j=Math.atan2(d-y,p-f);T&&(j+=j>0?-R:R);var M=(E+x)/2,A=(k+b)/2;return I[0]=[M,A,(C-o)/2,j,r],I}for(var L=0,z=r.length;L<z;){v();var D=Math.atan2(d-y,p-f);if(T&&(D+=D>0?-R:R),void 0!==O){var G=D-O;if(G+=G>R?-2*R:G<-R?2*R:0,Math.abs(G)>s)return null}O=D;for(var N=L,B=0;L<z;++L){var W=a*l(u,r[T?z-L-1:L],h);if(e+n<i&&m+g<o+B+W/2)break;B+=W}if(L!==N){var q=T?r.substring(z-N,z-L):r.substring(N,L);M=Ae(f,p,_=(o+B/2-m)/g),A=Ae(y,d,_);I.push([M,A,B/2,D,q]),o+=B}}return I}var Uh=[1/0,1/0,-1/0,-1/0],Xh=[],Kh=[],Yh=[],Zh=[];function Hh(t){return t[3].declutterBox}var $h=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Jh(t,e){return"start"!==e&&"end"!==e||$h.test(t)||(e="start"===e?"left":"right"),Ih[e]}var Qh=function(){function t(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var o=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,u=[a.scale[0]*l,a.scale[1]*l],h=Jh(t,a.textAlign||Br),c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),d=p.length,f=[],y=function(t,e,i){for(var n=e.length,r=0,o=0;o<n;++o){var s=Qr(t,e[o]);r=Math.max(r,s),i.push(s)}return r}(a.font,p,f),g=$r(a.font),m=y+c,v=[],_=(m+2)*u[0],x=(g*d+c)*u[1],b={width:_<0?Math.floor(_):Math.ceil(_),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:v};(1==u[0]&&1==u[1]||v.push("scale",u),v.push("font",a.font),n)&&(v.push("strokeStyle",o.strokeStyle),v.push("lineWidth",c),v.push("lineCap",o.lineCap),v.push("lineJoin",o.lineJoin),v.push("miterLimit",o.miterLimit),(ee?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[o.lineDash]),v.push("lineDashOffset",o.lineDashOffset)));i&&v.push("fillStyle",s.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var w,S=.5-h,C=h*m+S*c;if(n)for(w=0;w<d;++w)v.push("strokeText",[p[w],C+S*f[w],.5*(c+g)+w*g]);if(i)for(w=0;w<d;++w)v.push("fillText",[p[w],C+S*f[w],.5*(c+g)+w*g]);return this.labels_[r]=b,b},t.prototype.replayTextBackground_=function(t,e,i,n,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,i,n,r,o,s,a,l,u,h,c,p,d,f,y){var g,m=i-(s*=c[0]),v=n-(a*=c[1]),_=r+l>t?t-l:r,x=o+u>e?e-u:o,b=d[3]+_*c[0]+d[1],w=d[0]+x*c[1]+d[2],S=m-d[3],C=v-d[0];return(f||0!==h)&&(Xh[0]=S,Zh[0]=S,Xh[1]=C,Kh[1]=C,Kh[0]=S+b,Yh[0]=Kh[0],Yh[1]=C+w,Zh[1]=Yh[1]),0!==h?(fr(g=gr([1,0,0,1,0,0],i,n,1,1,h,-i,-n),Xh),fr(g,Kh),fr(g,Yh),fr(g,Zh),Qi(Math.min(Xh[0],Kh[0],Yh[0],Zh[0]),Math.min(Xh[1],Kh[1],Yh[1],Zh[1]),Math.max(Xh[0],Kh[0],Yh[0],Zh[0]),Math.max(Xh[1],Kh[1],Yh[1],Zh[1]),Uh)):Qi(Math.min(S,S+b),Math.min(C,C+w),Math.max(S,S+b),Math.max(C,C+w),Uh),p&&(m=Math.round(m),v=Math.round(v)),{drawImageX:m,drawImageY:v,drawImageW:_,drawImageH:x,originX:l,originY:u,declutterBox:{minX:Uh[0],minY:Uh[1],maxX:Uh[2],maxY:Uh[3],value:y},canvasTransform:g,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,o,s){var a=!(!o&&!s),l=n.declutterBox,u=t.canvas,h=s?s[2]*n.scale[0]/2:0;return l.minX-h<=u.width/e&&l.maxX+h>=0&&l.minY-h<=u.height/e&&l.maxY+h>=0&&(a&&this.replayTextBackground_(t,Xh,Kh,Yh,Zh,o,s),eo(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=fr(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=Jh(t,r.textAlign||Br),u=Ih[r.textBaseline||Wr],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}},t.prototype.execute_=function(t,e,i,n,r,o,s,a){var l;this.pixelCoordinates_&&pt(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Uo(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),function(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]}(this.renderedTransform_,i));for(var u,h,c,p,d,f,y,g,m,v,_,x,b,w,S,C,T=0,E=n.length,k=0,P=0,O=0,R=null,I=null,F=this.coordinateCache_,j=this.viewRotation_,M=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:j},L=this.instructions!=n||this.overlaps?0:200;T<E;){var z=n[T];switch(z[0]){case _h.BEGIN_GEOMETRY:b=z[1],C=z[3],b.getGeometry()?void 0===s||bn(s,C.getExtent())?++T:T=z[2]+1:T=z[2];break;case _h.BEGIN_PATH:P>L&&(this.fill_(t),P=0),O>L&&(t.stroke(),O=0),P||O||(t.beginPath(),p=NaN,d=NaN),++T;break;case _h.CIRCLE:var D=l[k=z[1]],G=l[k+1],N=l[k+2]-D,B=l[k+3]-G,W=Math.sqrt(N*N+B*B);t.moveTo(D+W,G),t.arc(D,G,W,0,2*Math.PI,!0),++T;break;case _h.CLOSE_PATH:t.closePath(),++T;break;case _h.CUSTOM:k=z[1],u=z[2];var q=z[3],V=z[4],U=6==z.length?z[5]:void 0;A.geometry=q,A.feature=b,T in F||(F[T]=[]);var X=F[T];U?U(l,k,u,2,X):(X[0]=l[k],X[1]=l[k+1],X.length=2),V(X,A),++T;break;case _h.DRAW_IMAGE:k=z[1],u=z[2],g=z[3],h=z[4],c=z[5];var K=z[6],Y=z[7],Z=z[8],H=z[9],$=z[10],J=z[11],Q=z[12],tt=z[13],et=z[14];if(!g&&z.length>=19){m=z[18],v=z[19],_=z[20],x=z[21];var it=this.drawLabelWithPointPlacement_(m,v,_,x);g=it.label,z[3]=g;var nt=z[22];h=(it.anchorX-nt)*this.pixelRatio,z[4]=h;var rt=z[23];c=(it.anchorY-rt)*this.pixelRatio,z[5]=c,K=g.height,z[6]=K,tt=g.width,z[13]=tt}var ot=void 0;z.length>24&&(ot=z[24]);var st=void 0,at=void 0,lt=void 0;z.length>16?(st=z[15],at=z[16],lt=z[17]):(st=qr,at=!1,lt=!1),$&&M?J+=j:$||M||(J-=j);for(var ut=0;k<u;k+=2)if(!(ot&&ot[ut++]<tt/this.pixelRatio)){var ht=[t,e,g,Dt=this.calculateImageOrLabelDimensions_(g.width,g.height,l[k],l[k+1],tt,K,h,c,Z,H,J,Q,r,st,at||lt,b),Y,at?R:null,lt?I:null],ct=void 0,dt=void 0;if(a&&et){var ft=u-k;if(!et[ft]){et[ft]=ht;continue}if(ct=et[ft],delete et[ft],dt=Hh(ct),a.collides(dt))continue}a&&a.collides(Dt.declutterBox)||(ct&&(a&&a.insert(dt),this.replayImageOrLabel_.apply(this,ct)),a&&a.insert(Dt.declutterBox),this.replayImageOrLabel_.apply(this,ht))}++T;break;case _h.DRAW_CHARS:var yt=z[1],gt=z[2],mt=z[3],vt=z[4];x=z[5];var _t=z[6],xt=z[7],bt=z[8];_=z[9];var wt=z[10];m=z[11],v=z[12];var St=[z[13],z[13]],Ct=this.textStates[v],Tt=Ct.font,Et=[Ct.scale[0]*xt,Ct.scale[1]*xt],kt=void 0;Tt in this.widths_?kt=this.widths_[Tt]:(kt={},this.widths_[Tt]=kt);var Pt=ma(l,yt,gt,2),Ot=Math.abs(Et[0])*to(Tt,m,kt);if(vt||Ot<=Pt){var Rt=this.textStates[v].textAlign,It=Vh(l,yt,gt,2,m,(Pt-Ot)*Ih[Rt],_t,Math.abs(Et[0]),to,Tt,kt,M?0:this.viewRotation_);t:if(It){var Ft=[],jt=void 0,Mt=void 0,At=void 0,Lt=void 0,zt=void 0;if(_)for(jt=0,Mt=It.length;jt<Mt;++jt){At=(zt=It[jt])[4],Lt=this.createLabel(At,v,"",_),h=zt[2]+(Et[0]<0?-wt:wt),c=mt*Lt.height+2*(.5-mt)*wt*Et[1]/Et[0]-bt;var Dt=this.calculateImageOrLabelDimensions_(Lt.width,Lt.height,zt[0],zt[1],Lt.width,Lt.height,h,c,0,0,zt[3],St,!1,qr,!1,b);if(a&&a.collides(Dt.declutterBox))break t;Ft.push([t,e,Lt,Dt,1,null,null])}if(x)for(jt=0,Mt=It.length;jt<Mt;++jt){At=(zt=It[jt])[4],Lt=this.createLabel(At,v,x,""),h=zt[2],c=mt*Lt.height-bt;Dt=this.calculateImageOrLabelDimensions_(Lt.width,Lt.height,zt[0],zt[1],Lt.width,Lt.height,h,c,0,0,zt[3],St,!1,qr,!1,b);if(a&&a.collides(Dt.declutterBox))break t;Ft.push([t,e,Lt,Dt,1,null,null])}a&&a.load(Ft.map(Hh));for(var Gt=0,Nt=Ft.length;Gt<Nt;++Gt)this.replayImageOrLabel_.apply(this,Ft[Gt])}}++T;break;case _h.END_GEOMETRY:if(void 0!==o){var Bt=o(b=z[1],C);if(Bt)return Bt}++T;break;case _h.FILL:L?P++:this.fill_(t),++T;break;case _h.MOVE_TO_LINE_TO:for(k=z[1],u=z[2],w=l[k],y=(S=l[k+1])+.5|0,(f=w+.5|0)===p&&y===d||(t.moveTo(w,S),p=f,d=y),k+=2;k<u;k+=2)f=(w=l[k])+.5|0,y=(S=l[k+1])+.5|0,k!=u-2&&f===p&&y===d||(t.lineTo(w,S),p=f,d=y);++T;break;case _h.SET_FILL_STYLE:R=z,this.alignFill_=z[2],P&&(this.fill_(t),P=0,O&&(t.stroke(),O=0)),t.fillStyle=z[1],++T;break;case _h.SET_STROKE_STYLE:I=z,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,z),++T;break;case _h.STROKE:L?O++:t.stroke(),++T;break;default:++T}}P&&this.fill_(t),O&&t.stroke()},t.prototype.execute=function(t,e,i,n,r,o){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,r)},t}(),tc=[Wh,Dh,Bh,Nh,qh,Gh],ec=function(){function t(t,e,i,n,r,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);var n=t[e];for(var r in n){var o=n[r];i[r]=new Qh(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o){var s=2*(n=Math.round(n))+1,a=gr(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=re(s,s));var u,h=this.hitDetectionContext_;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):l||h.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(sn(u=[1/0,1/0,-1/0,-1/0],t),Ui(u,e*(this.renderBuffer_+n),u));var c,p=function(t){if(void 0!==ic[t])return ic[t];for(var e=2*t+1,i=t*t,n=new Array(i+1),r=0;r<=t;++r)for(var o=0;o<=t;++o){var s=r*r+o*o;if(s>i)break;var a=n[s];a||(a=[],n[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],u=(r=0,n.length);r<u;++r)n[r]&&l.push.apply(l,n[r]);return ic[t]=l,l}(n);function d(t,e){for(var i=h.getImageData(0,0,s,s).data,a=0,l=p.length;a<l;a++)if(i[p[a]]>0){if(!o||c!==Nh&&c!==qh||-1!==o.indexOf(t)){var u=(p[a]-3)/4,d=n-u%s,f=n-(u/s|0),y=r(t,e,d*d+f*f);if(y)return y}h.clearRect(0,0,s,s);break}}var f,y,g,m,v,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(lt),f=_.length-1;f>=0;--f){var x=_[f].toString();for(g=this.executorsByZIndex_[x],y=tc.length-1;y>=0;--y)if(void 0!==(m=g[c=tc[y]])&&(v=m.executeHitDetection(h,a,i,d,u)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return Uo(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return _t(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(lt),this.maxExtent_&&(t.save(),this.clip(t,i));var l,u,h,c,p,d,f=o||tc;for(s&&a.reverse(),l=0,u=a.length;l<u;++l){var y=a[l].toString();for(p=this.executorsByZIndex_[y],h=0,c=f.length;h<c;++h){void 0!==(d=p[f[h]])&&d.execute(t,e,i,n,r,s)}}this.maxExtent_&&t.restore()},t}(),ic={};var nc=ec,rc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),oc=function(t){function e(e,i,n,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=r,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return rc(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=Uo(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var u=0,h=r.length;u<h;u+=2){var c=r[u]-this.imageAnchorX_,p=r[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=c+this.imageAnchorX_,f=p+this.imageAnchorY_;gr(s,d,f,1,1,l,-d,-f),o.setTransform.apply(o,s),o.translate(d,f),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=Uo(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var u=gr(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,u),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,i,n,r){var o=this.context_,s=Uo(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},e.prototype.drawCircle=function(t){if(bn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return Uo(n,0,n.length,r,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Cn:this.drawPoint(t);break;case Tn:this.drawLineString(t);break;case kn:this.drawPolygon(t);break;case Pn:this.drawMultiPoint(t);break;case On:this.drawMultiLineString(t);break;case Rn:this.drawMultiPolygon(t);break;case In:this.drawGeometryCollection(t);break;case Fn:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&bn(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),bn(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(bn(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(n,r,o[a],s,!1);i.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),bn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),bn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];n=this.drawRings_(i,n,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(pt(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Br;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var i=this;if(t){var n=t.getColor();this.fillState_={fillStyle:il(n||Lr)}}else this.fillState_=null;if(e){var r=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),u=e.getWidth(),h=e.getMiterLimit(),c=s||Dr;this.strokeState_={lineCap:void 0!==o?o:zr,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*i.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:Gr,lineWidth:(void 0!==u?u:1)*this.pixelRatio_,miterLimit:void 0!==h?h:10,strokeStyle:il(r||Nr)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var i=t.getAnchor(),n=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:il(i||Lr)}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),l=n.getLineJoin(),u=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:zr,lineDash:s||Dr,lineDashOffset:a||0,lineJoin:void 0!==l?l:Gr,lineWidth:void 0!==u?u:1,miterLimit:void 0!==h?h:10,strokeStyle:il(r||Nr)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),y=t.getRotation(),g=t.getScaleArray(),m=t.getText(),v=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==c?c:Ar,textAlign:void 0!==v?v:Br,textBaseline:void 0!==_?_:Wr},this.text_=void 0!==m?m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==y?y:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}else this.text_=""},e}(xh),sc=.5;function ac(t,e,i,n,r,o,s){var a=re(t[0]*sc,t[1]*sc);a.imageSmoothingEnabled=!1;for(var l=a.canvas,u=new oc(a,sc,r,null,s),h=i.length,c=Math.floor(16777215/h),p={},d=1;d<=h;++d){var f=i[d-1],y=f.getStyleFunction()||n;if(n){var g=y(f,o);if(g){Array.isArray(g)||(g=[g]);for(var m="#"+("000000"+(d*c).toString(16)).slice(-6),v=0,_=g.length;v<_;++v){var x=g[v],b=x.getGeometryFunction()(f);if(b&&bn(r,b.getExtent())){var w=x.clone(),S=w.getFill();S&&S.setColor(m);var C=w.getStroke();C&&(C.setColor(m),C.setLineDash(null)),w.setText(void 0);var T=x.getImage();if(T&&0!==T.getOpacity()){var E=T.getImageSize();if(!E)continue;var k=re(E[0],E[1],void 0,{alpha:!1}),P=k.canvas;k.fillStyle=m,k.fillRect(0,0,P.width,P.height),w.setImage(new tl({img:P,imgSize:E,anchor:T.getAnchor(),anchorXUnits:La,anchorYUnits:La,offset:T.getOrigin(),opacity:1,size:T.getSize(),scale:T.getScale(),rotation:T.getRotation(),rotateWithView:T.getRotateWithView()}))}var O=w.getZIndex()||0;(F=p[O])||(F={},p[O]=F,F[kn]=[],F[Fn]=[],F[Tn]=[],F[Cn]=[]),F[b.getType().replace("Multi","")].push(b,w)}}}}}for(var R=Object.keys(p).map(Number).sort(lt),I=(d=0,R.length);d<I;++d){var F=p[R[d]];for(var j in F){var M=F[j];for(v=0,_=M.length;v<_;v+=2){u.setStyle(M[v+1]);for(var A=0,L=e.length;A<L;++A)u.setTransform(e[A]),u.drawGeometry(M[v])}}}return a.getImageData(0,0,l.width,l.height)}function lc(t,e,i){var n=[];if(i){var r=Math.floor(Math.round(t[0])*sc),o=Math.floor(Math.round(t[1])*sc),s=4*(Pe(r,0,i.width-1)+Pe(o,0,i.height-1)*i.width),a=i.data[s],l=i.data[s+1],u=i.data[s+2]+256*(l+256*a),h=Math.floor(16777215/e.length);u&&u%h==0&&n.push(e[u/h-1])}return n}var uc={Point:function(t,e,i,n,r){var o,s=i.getImage(),a=i.getText();r&&(t=r,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=qa)return;var l=t.getBuilder(i.getZIndex(),Nh);l.setImageStyle(s,o),l.drawPoint(e,n)}if(a&&a.getText()){var u=t.getBuilder(i.getZIndex(),qh);u.setTextStyle(a,o),u.drawText(e,n)}},LineString:function(t,e,i,n,r){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),Bh);s.setFillStrokeStyle(null,o),s.drawLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),qh);l.setTextStyle(a),l.drawText(e,n)}},Polygon:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Wh);a.setFillStrokeStyle(o,s),a.drawPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),qh);u.setTextStyle(l),u.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){var o,s=i.getImage(),a=i.getText();r&&(t=r,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=qa)return;var l=t.getBuilder(i.getZIndex(),Nh);l.setImageStyle(s,o),l.drawMultiPoint(e,n)}if(a&&a.getText()){var u=(r||t).getBuilder(i.getZIndex(),qh);u.setTextStyle(a,o),u.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),Bh);s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),qh);l.setTextStyle(a),l.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),Wh);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),qh);u.setTextStyle(l),u.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,uc[a[o].getType()])(t,a[o],i,n,r)}},Circle:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Dh);a.setFillStrokeStyle(o,s),a.drawCircle(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),qh);u.setTextStyle(l),u.drawText(e,n)}}};function hc(t,e){return parseInt(qt(t),10)-parseInt(qt(e),10)}function cc(t,e){var i=pc(t,e);return i*i}function pc(t,e){return.5*t/e}function dc(t,e,i,n,r,o,s){var a=!1,l=i.getImage();if(l){var u=l.getImageState();u==qa||u==Va?l.unlistenImageChange(r):(u==Ba&&l.load(),u=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,i,n,r,o){var s=i.getGeometryFunction()(e);if(!s)return;var a=s.simplifyTransformed(n,r);if(i.getRenderer())fc(t,a,i,e);else{(0,uc[a.getType()])(t,a,i,e,o)}}(t,e,i,n,o,s),a}function fc(t,e,i,n){if(e.getType()!=In)t.getBuilder(i.getZIndex(),Gh).drawCustom(e,n,i.getRenderer());else for(var r=e.getGeometries(),o=0,s=r.length;o<s;++o)fc(t,r[o],i,n)}var yc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),gc=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.animatingOrInteracting_,i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return yc(e,t),e.prototype.useContainer=function(e,i,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,i,n)},e.prototype.renderWorlds=function(t,e,i){var n=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,u=a.getExtent(),h=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,d=!(p[Po]||p[Oo]),f=this.context,y=Math.round(e.size[0]*c),g=Math.round(e.size[1]*c),m=h.getWrapX()&&a.canWrapX(),v=m?xn(u):null,_=m?Math.ceil((n[2]-u[2])/v)+1:1,x=m?Math.floor((n[0]-u[0])/v):0;do{var b=this.getRenderTransform(o,s,l,c,y,g,x*v);t.execute(f,1,b,l,d,void 0,i)}while(++x<_)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){dr(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),mr(this.inversePixelTransform,this.pixelTransform);var r=vr(this.pixelTransform);this.useContainer(e,r,n.opacity);var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return!this.containerReused&&s.width>0&&(s.width=0),this.container;var u=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);s.width!=u||s.height!=h?(s.width=u,s.height=h,s.style.transform!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,u,h),this.preRender(o,t);var c=t.viewState;c.projection;var p=!1,d=!0;if(n.extent&&this.clipping){var f=lr(n.extent);(p=(d=bn(f,t.extent))&&!Zi(f,t.extent))&&this.clipUnrotated(o,t,f)}d&&this.renderWorlds(a,t),p&&o.restore(),this.postRender(o,t);var y=n.opacity,g=this.container;return y!==parseFloat(g.style.opacity)&&(g.style.opacity=1===y?"":String(y)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];fr(this.pixelTransform,i);var n=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),u=[],h=i[0]*sc,c=i[1]*sc;u.push(this.getRenderTransform(n,r,o,sc,h,c,0).slice());var p=l.getSource(),d=s.getExtent();if(p.getWrapX()&&s.canWrapX()&&!Zi(d,a)){for(var f=a[0],y=xn(d),g=0,m=void 0;f<d[0];)m=y*--g,u.push(this.getRenderTransform(n,r,o,sc,h,c,m).slice()),f+=y;for(g=0,f=a[2];f>d[2];)m=y*++g,u.push(this.getRenderTransform(n,r,o,sc,h,c,m).slice()),f-=y}this.hitDetectionImageData_=ac(i,u,this.renderedFeatures_,l.getStyleFunction(),a,r,o)}e(lc(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),h={},c=function(t,e,i){var o=qt(t),s=h[o];if(s){if(!0!==s&&i<s.distanceSq){if(0===i)return h[o]=!0,r.splice(r.lastIndexOf(s),1),n(t,u,e);s.geometry=e,s.distanceSq=i}}else{if(0===i)return h[o]=!0,n(t,u,e);r.push(h[o]={feature:t,layer:u,geometry:e,distanceSq:i,callback:n})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(n){return s=n.forEachFeatureAtCoordinate(t,a,l,i,c,n===o.declutterExecutorGroup?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[Po],r=t.viewHints[Oo],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),d=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=hc);var y=l.center.slice(),g=Ui(a,d*h),m=g.slice(),v=[g.slice()],_=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!Zi(_,t.extent)){var x=xn(_),b=Math.max(xn(g)/2,x);g[0]=_[0]-b,g[2]=_[2]+b,qn(y,u);var w=function(t,e){var i=e.getExtent(),n=dn(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){var r=xn(i),o=Math.floor((n[0]-i[0])/r)*r;t[0]-=o,t[2]-=o}return t}(v[0],u);w[0]<_[0]&&w[2]<_[2]?v.push([w[0]+x,w[1],w[2]+x,w[3]]):w[0]>_[0]&&w[2]>_[2]&&v.push([w[0]-x,w[1],w[2]-x,w[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==f&&Zi(this.wrappedRenderedExtent_,g))return pt(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,C=new jh(pc(h,c),g,h,c);this.getLayer().getDeclutter()&&(S=new jh(pc(h,c),g,h,c));for(var T=0,E=v.length;T<E;++T)i.loadFeatures(v[T],h,u);var k=cc(h,c),P=function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,h)),i){var r=this.renderFeature(t,k,i,C,undefined,S);this.dirty_=this.dirty_||r}}.bind(this),O=ar(g),R=i.getFeaturesInExtent(O);f&&R.sort(f);for(T=0,E=R.length;T<E;++T)P(R[T]);this.renderedFeatures_=R;var I=C.finish(),F=new nc(g,h,c,i.getOverlaps(),I,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new nc(g,h,c,i.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=f,this.renderedExtent_=m,this.wrappedRenderedExtent_=g,this.renderedCenter_=y,this.renderedProjection_=u,this.replayGroup_=F,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,r,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var a=0,l=i.length;a<l;++a)s=dc(n,t,i[a],e,this.boundHandleStyleImageChange_,r,o)||s;else s=dc(n,t,i,e,this.boundHandleStyleImageChange_,r,o);return s},e}(zh),mc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vc=function(t){function e(e){return t.call(this,e)||this}return mc(e,t),e.prototype.createRenderer=function(){return new gc(this)},e}(dh),_c=function(){function t(t){this.rbush_=new $u(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[qt(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;n<r;n++){var o=t[n],s=e[n],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};i[n]=a,this.items_[qt(s)]=a}this.rbush_.load(i)},t.prototype.remove=function(t){var e=qt(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[qt(e)];rn([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,r=t.length;n<r;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return _t(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Qi(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),xc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function bc(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var wc=function(t){function e(e){var i=t.call(this)||this;return i.projection=Kn(e.projection),i.attributions_=bc(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:Ve,i.wrapX_=void 0!==e.wrapX&&e.wrapX,i}return xc(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Bt()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=bc(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Xt),Sc="addfeature",Cc="changefeature",Tc="clear",Ec="removefeature",kc="featuresloadstart",Pc="featuresloadend",Oc="featuresloaderror";function Rc(t,e){return[[-1/0,-1/0,1/0,1/0]]}function Ic(t,e,i,n,r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),e.getType()==la&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var n=e.getType(),l=void 0;n==ua||n==ha?l=a.responseText:n==ca?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):n==la&&(l=a.response),l?o(e.readFeatures(l,{extent:i,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}function Fc(t,e){return function(i,n,r,o,s){var a=this;Ic(t,e,i,n,r,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||yt)}}var jc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mc=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.feature=i,r.features=n,r}return jc(e,t),e}(ot),Ac=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:Ve,wrapX:void 0===n.wrapX||n.wrapX})||this).on,i.once,i.un,i.loader_=yt,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(ke(i.format_,7),i.loader_=Fc(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:Rc;var r,o,s=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=s?new _c:null,i.loadedExtentsRtree_=new _c,i.loadingExtentsCount_=0,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(r=n.features).getArray()),s||void 0!==r||(r=new ei(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==r&&i.bindFeaturesCollection_(r),i}return jc(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=qt(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Mc(Sc,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[At(e,St,this.handleFeatureChange_,this),At(e,st,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(ke(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,o=t.length;r<o;r++){var s=qt(l=t[r]);this.addToIndex_(s,l)&&i.push(l)}r=0;for(var a=i.length;r<a;r++){var l;s=qt(l=i[r]);this.setupChangeEvents_(s,l);var u=l.getGeometry();if(u){var h=u.getExtent();e.push(h),n.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n);r=0;for(var c=i.length;r<c;r++)this.dispatchEvent(new Mc(Sc,i[r]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(Sc,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(Ec,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(He,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener($e,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(zt)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new Mc(Tc);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),_t(this.nullGeometryFeatures_)||ct(t,vt(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],r=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||dt;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),u=s;if((s=e.closestPointXY(i,n,o,s))<u){r=t;var h=Math.sqrt(s);a[0]=i-h,a[1]=n-h,a[2]=i+h,a[3]=n+h}}})),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=qt(e),n=e.getGeometry();if(n){var r=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Mc(Cc,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:qt(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&_t(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){for(var n=this.loadedExtentsRtree_,r=this.strategy_(t,e),o=function(t,o){var a=r[t];n.forEachInExtent(a,(function(t){return Zi(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new Mc(kc)),s.loader_.call(s,a,e,i,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Mc(Pc,void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Mc(Oc))}.bind(s)),n.insert(a,{extent:a.slice()}))},s=this,a=0,l=r.length;a<l;++a)o(a);this.loading=this.loader_!==yt&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,(function(i){if(rn(i.extent,t))return e=i,!0})),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=qt(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=qt(t);this.featureChangeKeys_[e].forEach(zt),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Mc(Ec,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){ke(this.format_,7),this.url_=t,this.setLoader(Fc(t,this.format_))},e}(wc),Lc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),zc="Point",Dc="LineString",Gc="Polygon",Nc="Circle",Bc="drawstart",Wc="drawend",qc="drawabort",Vc=function(t){function e(e,i){var n=t.call(this,e)||this;return n.feature=i,n}return Lc(e,t),e}(ot);var Uc=function(t){function e(e){var i=this,n=e;n.stopDown||(n.stopDown=ft),(i=t.call(this,n)||this).on,i.once,i.un,i.shouldHandle_=!1,i.downPx_=null,i.downTimeout_,i.lastDragTime_,i.pointerType_,i.freehand_=!1,i.source_=e.source?e.source:null,i.features_=e.features?e.features:null,i.snapTolerance_=e.snapTolerance?e.snapTolerance:12,i.type_=e.type,i.mode_=function(t){switch(t){case Cn:case Pn:return zc;case Tn:case On:return Dc;case kn:case Rn:return Gc;case Fn:return Nc;default:throw new Error("Invalid type: "+t)}}(i.type_),i.stopClick_=!!e.stopClick,i.minPoints_=e.minPoints?e.minPoints:i.mode_===Gc?3:2,i.maxPoints_=i.mode_===Nc?2:e.maxPoints?e.maxPoints:1/0,i.finishCondition_=e.finishCondition?e.finishCondition:dt;var r,o=e.geometryFunction;if(!o){var s,a=i.mode_;if(a===Nc)o=function(t,e,i){var n=e||new Xu([NaN,NaN]),r=sr(t[0]),o=Nn(r,sr(t[t.length-1]));return n.setCenterAndRadius(r,Math.sqrt(o)),n};else a===zc?s=xs:a===Dc?s=_a:a===Gc&&(s=As),o=function(t,e,i){return e?a===Gc?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])]):e.setCoordinates([]):e.setCoordinates(t):e=new s(t),e}}return i.geometryFunction_=o,i.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,i.finishCoordinate_=null,i.sketchFeature_=null,i.sketchPoint_=null,i.sketchCoords_=null,i.sketchLine_=null,i.sketchLineCoords_=null,i.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,i.overlay_=new vc({source:new Ac({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(r=hl(),function(t,e){return r[t.getGeometry().getType()]}),updateWhileInteracting:!0}),i.geometryName_=e.geometryName,i.condition_=e.condition?e.condition:au,i.freehandCondition_,e.freehand?i.freehandCondition_=ou:i.freehandCondition_=e.freehandCondition?e.freehandCondition:lu,i.addChangeListener(Kl,i.updateState_),i}return Lc(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===Et&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==zc&&this.freehandCondition_(e);var i=e.type===go.POINTERMOVE,n=!0;!this.freehand_&&this.lastDragTime_&&e.type===go.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===go.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===go.POINTERDOWN?n=!1:i&&this.getPointerCount()<2?(n=e.type===go.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===go.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===go.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new yo(go.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():this.freehand_||i&&this.mode_!==zc||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,n=e[0]-i[0],r=e[1]-i[1],o=n*n+r*r;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,n=[this.finishCoordinate_],r=this.mode_;if(r===zc)e=!0;else if(r===Nc)e=2===this.sketchCoords_.length;else if(r===Dc)i=this.sketchCoords_.length>this.minPoints_;else if(r===Gc){var o=this.sketchCoords_;i=o[0].length>this.minPoints_,n=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),a=0,l=n.length;a<l;a++){var u=n[a],h=s.getPixelFromCoordinate(u),c=t[0]-h[0],p=t[1]-h[1],d=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(c*c+p*p)<=d){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new oa(new xs(t)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new oa);var e=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new _a(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===zc?this.sketchCoords_=t.slice():this.mode_===Gc?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new oa(new _a(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new oa,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Vc(Bc,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,i,n=this.getMap(),r=this.sketchFeature_.getGeometry(),o=n.getView().getProjection();(this.mode_===zc?i=this.sketchCoords_:this.mode_===Gc?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=t[0],i[1]=t[1],this.geometryFunction_(this.sketchCoords_,r,o),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(t);if(r.getType()===kn&&this.mode_!==Gc)this.createOrUpdateCustomSketchLine_(r);else if(this.sketchLineCoords_){this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,i,n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),o=this.mode_;o===Dc||o===Nc?(this.finishCoordinate_=t.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),this.geometryFunction_(i,n,r)):o===Gc&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,n,r)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;if(n===Dc||n===Nc){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var r=this.finishCoordinate_.slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(t,e,i),e.getType()===kn&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(n===Gc){(t=this.sketchCoords_[0]).splice(-2,1);var o=this.sketchLine_.getGeometry();if(t.length>=2){r=t[t.length-2].slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}o.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry(),n=this.getMap().getView().getProjection();this.mode_===Dc?(e.pop(),this.geometryFunction_(e,i,n)):this.mode_===Gc&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),this.type_===Pn?t.setGeometry(new Sa([e])):this.type_===On?t.setGeometry(new ba([e])):this.type_===Rn&&t.setGeometry(new Ea([e])),this.dispatchEvent(new Vc(Wc,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Vc(qc,t))},e.prototype.appendCoordinates=function(t){var e,i=this.mode_,n=!this.sketchFeature_;if(n&&this.startDrawing_(t[0]),i===Dc||i===Nc)e=this.sketchCoords_;else{if(i!==Gc)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}n&&e.shift(),e.pop();for(var r=0;r<t.length;r++)this.addToDrawing_(t[r]);var o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new oa(new xs(i)),this.updateSketchFeatures_(),this.dispatchEvent(new Vc(Bc,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(eu),Xc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Kc=[0,0,0,0],Yc=[],Zc="modifystart",Hc="modifyend",$c=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.features=i,r.mapBrowserEvent=n,r}return Xc(e,t),e}(ot);function Jc(t,e){return t.index-e.index}function Qc(t,e,i){var n=e.geometry;if(n.getType()===Fn){var r=n;if(1===e.index){null;var o=Nn(r.getCenter(),sr(t)),s=Math.sqrt(o)-r.getRadius();return s*s}}var a=sr(t);return Yc[0]=sr(e.segment[0]),Yc[1]=sr(e.segment[1]),Wn(a,Yc)}function tp(t,e,i){var n=e.geometry;if(n.getType()===Fn&&1===e.index){var r=n;return or(r.getClosestPoint(sr(t)))}var o=sr(t);return Yc[0]=sr(e.segment[0]),Yc[1]=sr(e.segment[1]),or(zn(o,Yc))}var ep=function(t){function e(e){var i,n,r=t.call(this,e)||this;if(r.on,r.once,r.un,r.boundHandleFeatureChange_=r.handleFeatureChange_.bind(r),r.condition_=e.condition?e.condition:cu,r.defaultDeleteCondition_=function(t){return function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey}(t)&&function(t){return t.type==go.SINGLECLICK}(t)},r.deleteCondition_=e.deleteCondition?e.deleteCondition:r.defaultDeleteCondition_,r.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:ou,r.vertexFeature_=null,r.vertexSegments_=null,r.lastPixel_=[0,0],r.ignoreNextSingleClick_=!1,r.featuresBeingModified_=null,r.rBush_=new _c,r.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.snappedToVertex_=!1,r.changingFeature_=!1,r.dragSegments_=[],r.overlay_=new vc({source:new Ac({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(i=hl(),function(t,e){return i[Cn]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r)},r.source_=null,r.hitDetection_=null,e.features?n=e.features:e.source&&(r.source_=e.source,n=new ei(r.source_.getFeatures()),r.source_.addEventListener(Sc,r.handleSourceAdd_.bind(r)),r.source_.addEventListener(Ec,r.handleSourceRemove_.bind(r))),!n)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(r.hitDetection_=e.hitDetection),r.features_=n,r.features_.forEach(r.addFeature_.bind(r)),r.features_.addEventListener(He,r.handleFeatureAdd_.bind(r)),r.features_.addEventListener($e,r.handleFeatureRemove_.bind(r)),r.lastPointerEvent_=null,r.delta_=[0,0],r.snapToPointer_=void 0===e.snapToPointer?!r.hitDetection_:e.snapToPointer,r}return Xc(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(St,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new ei;for(var i=this.featuresBeingModified_.getArray(),n=0,r=e.length;n<r;++n)for(var o=e[n],s=0,a=o.length;s<a;++s){var l=o[s].feature;l&&-1===i.indexOf(l)&&this.featuresBeingModified_.push(l)}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new $c(Zc,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(St,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,i=[];e.forEach((function(e){t===e.feature&&i.push(e)}));for(var n=i.length-1;n>=0;--n){for(var r=i[n],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);e.remove(r)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var o=i[n],s={feature:t,geometry:e,depth:[n],index:n,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,geometry:e,index:n,segment:o};this.rBush_.insert(Vi(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[n],index:s,segment:l};this.rBush_.insert(Vi(l),u)}},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[n],index:s,segment:l};this.rBush_.insert(Vi(l),u)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,geometry:e,depth:[s,n],index:u,segment:c};this.rBush_.insert(Vi(c),p)}},e.prototype.writeCircleGeometry_=function(t,e){var i=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[i,i]},r={feature:t,geometry:e,index:1,segment:[i,i]},o=[n,r];n.featureSegments=o,r.featureSegments=o,this.rBush_.insert(en(i),n);var s=e;this.rBush_.insert(s.getExtent(),r)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=i[n];(0,this.SEGMENT_WRITERS_[r.getType()])(t,r)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,i){var n=this.vertexFeature_;n?n.getGeometry().setCoordinates(t):(n=new oa(new xs(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n));return n.set("features",e),n.set("geometries",i),n},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=go.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(i=!(e.type!=go.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==go.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!i);var i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[],r=0,o=this.dragSegments_.length;r<o;++r){var s=this.dragSegments_[r],a=s[0],l=a.feature;-1===i.indexOf(l)&&i.push(l);var u=a.geometry;-1===n.indexOf(u)&&n.push(u);for(var h=a.depth,c=void 0,p=a.segment,d=s[1];e.length<u.getStride();)e.push(p[d][e.length]);switch(u.getType()){case Cn:c=e,p[0]=e,p[1]=e;break;case Pn:(c=u.getCoordinates())[a.index]=e,p[0]=e,p[1]=e;break;case Tn:(c=u.getCoordinates())[a.index+d]=e,p[d]=e;break;case On:case kn:(c=u.getCoordinates())[h[0]][a.index+d]=e,p[d]=e;break;case Rn:(c=u.getCoordinates())[h[1]][h[0]][a.index+d]=e,p[d]=e;break;case Fn:if(p[0]=e,p[1]=e,0===a.index)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;t.map.getView().getProjection();var f=Bn(sr(u.getCenter()),sr(e));u.setRadius(f),this.changingFeature_=!1}}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,i,n)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){var n=t.map.getView().getProjection(),r=[],o=i.getGeometry().getCoordinates(),s=Vi([o]),a=this.rBush_.getInExtent(s),l={};a.sort(Jc);for(var u=0,h=a.length;u<h;++u){var c=a[u],p=c.segment,d=qt(c.geometry),f=c.depth;if(f&&(d+="-"+f.join("-")),l[d]||(l[d]=new Array(2)),c.geometry.getType()!==Fn||1!==c.index)if(!Dn(p[0],o)||l[d][0])if(!Dn(p[1],o)||l[d][1])qt(p)in this.vertexSegments_&&!l[d][0]&&!l[d][1]&&this.insertVertexCondition_(t)&&r.push(c);else{if((c.geometry.getType()===Tn||c.geometry.getType()===On)&&l[d][0]&&0===l[d][0].index)continue;this.dragSegments_.push([c,1]),l[d][1]=c}else this.dragSegments_.push([c,0]),l[d][0]=c;else Dn(tp(e,c,n),o)&&!l[d][0]&&(this.dragSegments_.push([c,0]),l[d][0]=c)}r.length&&this.willModifyFeatures_(t,[r]);for(var y=r.length-1;y>=0;--y)this.insertVertex_(r[y],o)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var i=this.dragSegments_[e][0],n=i.geometry;if(n.getType()===Fn){var r=n.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=r,o.segment[1]=r,s.segment[0]=r,s.segment[1]=r,this.rBush_.update(en(r),o);var a=n;this.rBush_.update(a.getExtent(),s)}else this.rBush_.update(Vi(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new $c(Hc,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,i){var n,r,o=this,s=i||e.getCoordinateFromPixel(t),a=e.getView().getProjection();if(this.hitDetection_){var l="object"==typeof this.hitDetection_?function(t){return t===o.hitDetection_}:void 0;e.forEachFeatureAtPixel(t,(function(t,e,i){if((i=i||t.getGeometry()).getType()===Cn&&(a=o.features_.getArray(),l=t,a.indexOf(l)>=0)){r=i;var s=i.getFlatCoordinates().slice(0,2);n=[{feature:t,geometry:i,segment:[s,s]}]}var a,l;return!0}),{layerFilter:l})}if(!n){var u=ar(Ui(lr(en(s,Kc)),e.getView().getResolution()*this.pixelTolerance_,Kc));n=this.rBush_.getInExtent(u)}if(n&&n.length>0){var h=n.sort((function(t,e){return Qc(s,t,a)-Qc(s,e,a)}))[0],c=h.segment,p=tp(s,h,a),d=e.getPixelFromCoordinate(p),f=Bn(t,d);if(r||f<=this.pixelTolerance_){var y={};if(y[qt(c)]=!0,this.snapToPointer_||(this.delta_[0]=p[0]-s[0],this.delta_[1]=p[1]-s[1]),h.geometry.getType()===Fn&&1===h.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(p,[h.feature],[h.geometry]);else{var g=e.getPixelFromCoordinate(c[0]),m=e.getPixelFromCoordinate(c[1]),v=Nn(d,g),_=Nn(d,m);f=Math.sqrt(Math.min(v,_)),this.snappedToVertex_=f<=this.pixelTolerance_,this.snappedToVertex_&&(p=v>_?c[1]:c[0]),this.createOrUpdateVertexFeature_(p,[h.feature],[h.geometry]);var x={};x[qt(h.geometry)]=!0;for(var b=1,w=n.length;b<w;++b){var S=n[b].segment;if(!(Dn(c[0],S[0])&&Dn(c[1],S[1])||Dn(c[0],S[1])&&Dn(c[1],S[0])))break;var C=qt(n[b].geometry);C in x||(x[C]=!0,y[qt(S)]=!0)}}return void(this.vertexSegments_=y)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var i,n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case On:case kn:(i=o.getCoordinates())[s[0]].splice(a+1,0,e);break;case Rn:(i=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,e);break;case Tn:(i=o.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,i);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(o,a,s,1);var u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};l.insert(Vi(u.segment),u),this.dragSegments_.push([u,1]);var h={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};l.insert(Vi(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=go.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.dispatchEvent(new $c(Hc,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,i,n,r,o,s,a,l,u,h,c=this.dragSegments_,p={},d=!1;for(r=c.length-1;r>=0;--r)h=qt((u=(i=c[r])[0]).feature),u.depth&&(h+="-"+u.depth.join("-")),h in p||(p[h]={}),0===i[1]?(p[h].right=u,p[h].index=u.index):1==i[1]&&(p[h].left=u,p[h].index=u.index+1);for(h in p){switch(l=p[h].right,s=p[h].left,(a=(o=p[h].index)-1)<0&&(a=0),t=e=(n=(u=void 0!==s?s:l).geometry).getCoordinates(),d=!1,n.getType()){case On:e[u.depth[0]].length>2&&(e[u.depth[0]].splice(o,1),d=!0);break;case Tn:e.length>2&&(e.splice(o,1),d=!0);break;case Rn:t=t[u.depth[1]];case kn:(t=t[u.depth[0]]).length>4&&(o==t.length-1&&(o=0),t.splice(o,1),d=!0,0===o&&(t.pop(),t.push(t[0]),a=t.length-1))}if(d){this.setGeometryCoordinates_(n,e);var f=[];if(void 0!==s&&(this.rBush_.remove(s),f.push(s.segment[0])),void 0!==l&&(this.rBush_.remove(l),f.push(l.segment[1])),void 0!==s&&void 0!==l){var y={depth:u.depth,feature:u.feature,geometry:u.geometry,index:a,segment:f};this.rBush_.insert(Vi(y.segment),y)}this.updateSegmentIndices_(n,o,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),c.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===i||void 0===r.depth||pt(r.depth,i))&&r.index>e&&(r.index+=n)}))},e}(eu),ip=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function np(t){return t.feature?t.feature:t.element?t.element:void 0}var rp=[],op=function(t){function e(e){var i=this,n=e||{},r=n;return r.handleDownEvent||(r.handleDownEvent=dt),r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).source_=n.source?n.source:null,i.vertex_=void 0===n.vertex||n.vertex,i.edge_=void 0===n.edge||n.edge,i.features_=n.features?n.features:null,i.featuresListenerKeys_=[],i.featureChangeListenerKeys_={},i.indexedFeaturesExtents_={},i.pendingFeatures_={},i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.rBush_=new _c,i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i)},i}return ip(e,t),e.prototype.addFeature=function(t,e){var i=void 0===e||e,n=qt(t),r=t.getGeometry();if(r){var o=this.SEGMENT_WRITERS_[r.getType()];o&&(this.indexedFeaturesExtents_[n]=r.getExtent([1/0,1/0,-1/0,-1/0]),o(t,r))}i&&(this.featureChangeListenerKeys_[n]=At(t,St,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var i=this.snapTo(e.pixel,e.coordinate,e.map);return i.snapped&&(e.coordinate=i.vertex.slice(0,2),e.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=np(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=np(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var i=qt(e);i in this.pendingFeatures_||(this.pendingFeatures_[i]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=vt(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var i=void 0===e||e,n=qt(t),r=this.indexedFeaturesExtents_[n];if(r){var o=this.rBush_,s=[];o.forEachInExtent(r,(function(e){t===e.feature&&s.push(e)}));for(var a=s.length-1;a>=0;--a)o.remove(s[a])}i&&(zt(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var i=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();i&&(n.forEach(zt),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(At(this.features_,He,this.handleFeatureAdd_,this),At(this.features_,$e,this.handleFeatureRemove_,this)):this.source_&&n.push(At(this.source_,Sc,this.handleFeatureAdd_,this),At(this.source_,Ec,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,i){var n=Vi([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),r=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(r=r.filter((function(t){return t.feature.getGeometry().getType()!==Fn})));var o=!1,s=null,a=null;if(0===r.length)return{snapped:o,vertex:s,vertexPixel:a};i.getView().getProjection();for(var l,u=sr(e),h=1/0,c=0;c<r.length;++c){var p=r[c];rp[0]=sr(p.segment[0]),rp[1]=sr(p.segment[1]);var d=Wn(u,rp);d<h&&(l=p,h=d)}var f=l.segment;if(this.vertex_&&!this.edge_){var y=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),m=Nn(t,y),v=Nn(t,g);Math.sqrt(Math.min(m,v))<=this.pixelTolerance_&&(o=!0,s=m>v?f[1]:f[0],a=i.getPixelFromCoordinate(s))}else if(this.edge_){var _=l.feature.getGeometry().getType()===Fn;if(_){var x=l.feature.getGeometry();null,s=or(function(t,e){var i=e.getRadius(),n=e.getCenter(),r=n[0],o=n[1],s=t[0]-r,a=t[1]-o;0===s&&0===a&&(s=1);var l=Math.sqrt(s*s+a*a);return[r+i*s/l,o+i*a/l]}(u,x))}else rp[0]=sr(f[0]),rp[1]=sr(f[1]),s=or(zn(u,rp));if(Bn(t,a=i.getPixelFromCoordinate(s))<=this.pixelTolerance_&&(o=!0,this.vertex_&&!_)){y=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),m=Nn(a,y),v=Nn(a,g);Math.sqrt(Math.min(m,v))<=this.pixelTolerance_&&(s=m>v?f[1]:f[0],a=i.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){this.getMap().getView().getProjection();for(var i=zs(e).getCoordinates()[0],n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,segment:o};this.rBush_.insert(Vi(o),s)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=this.SEGMENT_WRITERS_[i[n].getType()];r&&r(t,i[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,segment:o};this.rBush_.insert(Vi(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Vi(l),u)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var o=i[n],s={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,segment:c};this.rBush_.insert(Vi(c),p)}},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Vi(l),u)}},e}(eu);function sp(t){var e=t||{},i=new ei,n=new Au(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new yu),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new Jl({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new du({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new Bu),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new qu({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new Fu),i.push(new Mu({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new Gu({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new Eu({duration:e.zoomDuration})),i}var ap=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function lp(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new ap(t,e,i,n)}var up=ap,hp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),cp=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new up(0,0,0,0),i}return hp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==So||i==To||i==Co&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,i,r,o);return a.getState()==Co&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(So)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,o=n.resolution,s=n.center,a=n.rotation,l=t.pixelRatio,u=this.getLayer(),h=u.getSource(),c=h.getRevision(),p=h.getTileGridForProjection(r),d=p.getZForResolution(o,h.zDirection),f=p.getResolution(d),y=t.extent,g=i.extent&&lr(i.extent);g&&(y=mn(y,lr(i.extent)));var m=h.getTilePixelRatio(l),v=Math.round(t.size[0]*m),_=Math.round(t.size[1]*m);if(a){var x=Math.round(Math.sqrt(v*v+_*_));v=x,_=x}var b=f*v/2/m,w=f*_/2/m,S=[s[0]-b,s[1]-w,s[0]+b,s[1]+w],C=p.getTileRangeForExtentAndZ(y,d),T={};T[d]={};var E=this.createLoadedTileFinder(h,r,T),k=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var O=C.minX;O<=C.maxX;++O)for(var R=C.minY;R<=C.maxY;++R){var I=this.getTile(d,O,R,t);if(this.isDrawableTile(I)){var F=qt(this);if(I.getState()==So){T[d][I.tileCoord.toString()]=I;var j=I.inTransition(F);this.newTiles_||!j&&-1!==this.renderedTiles.indexOf(I)||(this.newTiles_=!0)}if(1===I.getAlpha(F,t.time))continue}var M=p.getTileCoordChildTileRange(I.tileCoord,P,k),A=!1;M&&(A=E(d+1,M)),A||p.forEachTileCoordParentTileRange(I.tileCoord,E,P,k)}var L=f/o;gr(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,a,-v/2,-_/2);var z=vr(this.pixelTransform);this.useContainer(e,z,i.opacity);var D=this.context,G=D.canvas;mr(this.inversePixelTransform,this.pixelTransform),gr(this.tempTransform,v/2,_/2,L,L,0,-v/2,-_/2),G.width!=v||G.height!=_?(G.width=v,G.height=_):this.containerReused||D.clearRect(0,0,v,_),g&&this.clipUnrotated(D,t,g),gt(D,h.getContextOptions()),this.preRender(D,t),this.renderedTiles.length=0;var N,B,W,q=Object.keys(T).map(Number);q.sort(lt),1!==i.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(N=[],B=[]):q=q.reverse();for(var V=q.length-1;V>=0;--V){var U=q[V],X=h.getTilePixelSize(U,l,r),K=p.getResolution(U)/f,Y=X[0]*K*L,Z=X[1]*K*L,H=p.getTileCoordForCoordAndZ(vn(S),U),$=p.getTileCoordExtent(H),J=fr(this.tempTransform,[m*($[0]-S[0])/f,m*(S[3]-$[3])/f]),Q=m*h.getGutterForProjection(r),tt=T[U];for(var et in tt){var it=(I=tt[et]).tileCoord,nt=H[1]-it[1],rt=Math.round(J[0]-(nt-1)*Y),ot=H[2]-it[2],st=Math.round(J[1]-(ot-1)*Z),at=rt-(O=Math.round(J[0]-nt*Y)),ut=st-(R=Math.round(J[1]-ot*Z)),ht=d===U;if(!(j=ht&&1!==I.getAlpha(qt(this),t.time)))if(N){D.save(),W=[O,R,O+at,R,O+at,R+ut,O,R+ut];for(var ct=0,pt=N.length;ct<pt;++ct)if(d!==U&&U<B[ct]){var dt=N[ct];D.beginPath(),D.moveTo(W[0],W[1]),D.lineTo(W[2],W[3]),D.lineTo(W[4],W[5]),D.lineTo(W[6],W[7]),D.moveTo(dt[6],dt[7]),D.lineTo(dt[4],dt[5]),D.lineTo(dt[2],dt[3]),D.lineTo(dt[0],dt[1]),D.clip()}N.push(W),B.push(U)}else D.clearRect(O,R,at,ut);this.drawTileImage(I,t,O,R,at,ut,Q,ht,i.opacity),N&&!j?(D.restore(),this.renderedTiles.unshift(I)):this.renderedTiles.push(I),this.updateUsedTiles(t.usedTiles,h,I)}}return this.renderedRevision=c,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!rn(this.renderedExtent_,S),this.renderedExtent_=S,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,h,p,l,r,y,d,u.getPreload()),this.scheduleExpireCache(t,h),this.postRender(D,t),i.extent&&D.restore(),z!==G.style.transform&&(G.style.transform=z),this.container},e.prototype.drawTileImage=function(t,e,i,n,r,o,s,a,l){var u=this.getTileImage(t);if(u){var h=qt(this),c=a?t.getAlpha(h,e.time):1,p=l*c,d=p!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=p),this.context.drawImage(u,s,s,u.width-2*s,u.height-2*s,i,n,r,o),d&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=qt(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=qt(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,r,o,s,a,l){var u=qt(e);u in t.wantedTiles||(t.wantedTiles[u]={});var h,c,p,d,f,y,g=t.wantedTiles[u],m=t.tileQueue,v=0;for(y=i.getMinZoom();y<=s;++y)for(c=i.getTileRangeForExtentAndZ(o,y,c),p=i.getResolution(y),d=c.minX;d<=c.maxX;++d)for(f=c.minY;f<=c.maxY;++f)s-y<=a?(++v,(h=e.getTile(y,d,f,n,r)).getState()==bo&&(g[h.getKey()]=!0,m.isKeyQueued(h.getKey())||m.enqueue([h,u,i.getTileCoordCenter(h.tileCoord),p])),void 0!==l&&l(h)):e.useTile(y,d,f,r);e.updateCacheSize(v,r)},e}(zh);cp.prototype.getLayer;var pp=cp,dp="image",fp="hybrid",yp="vector",gp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mp={image:[Wh,Dh,Bh,Nh,qh],hybrid:[Wh,Bh],vector:[]},vp={hybrid:[Nh,qh,Gh],vector:[Wh,Dh,Bh,Nh,qh,Gh]},_p=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.dirty_=!1,i.renderedLayerRevision_,i.renderedPixelToCoordinateTransform_=null,i.renderedRotation_,i.renderTileImageQueue_={},i.tileListenerKeys_={},i.tmpTransform_=[1,0,0,1,0,0],i}return gp(e,t),e.prototype.prepareTile=function(t,e,i,n){var r,o=qt(t),s=t.getState();return s!==So&&s!==Co||!(o in this.tileListenerKeys_)||(zt(this.tileListenerKeys_[o]),delete this.tileListenerKeys_[o]),s!==So&&s!==Co||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(r=!0,n&&(this.renderTileImageQueue_[o]=t))),r},e.prototype.getTile=function(e,i,n,r){var o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,u=this.getLayer(),h=u.getSource().getTile(e,i,n,o,l);if(h.getState()<So){h.wantedResolution=a;var c=qt(h);if(!(c in this.tileListenerKeys_)){var p=At(h,St,this.prepareTile.bind(this,h,o,l,!0));this.tileListenerKeys_[c]=p}}else{var d=r.viewHints;!!(d[Po]||d[Oo])&&h.wantedResolution||(h.wantedResolution=a),this.prepareTile(h,o,l,!1)&&u.getRenderMode()!==yp&&this.renderTileImage_(h,r)}return t.prototype.getTile.call(this,e,i,n,r)},e.prototype.isDrawableTile=function(e){var i=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(i.getRenderMode()===yp?qt(i)in e.executorGroups:e.hasContext(i))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var i=this.getLayer().getRevision();return this.renderedLayerRevision_!=i&&(this.renderedTiles.length=0),this.renderedLayerRevision_=i,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,i){var n=this.getLayer(),r=n.getRevision(),o=n.getRenderOrder()||null,s=t.wantedResolution,a=t.getReplayState(n);if(a.dirty||a.renderedResolution!==s||a.renderedRevision!=r||a.renderedRenderOrder!=o){var l=n.getSource(),u=n.getDeclutter(),h=l.getTileGrid(),c=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),p=l.getSourceTiles(e,i,t),d=qt(n);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],u&&(t.declutterExecutorGroups[d]=[]);for(var f=function(i,r){var f=p[i];if(f.getState()!=So)return"continue";var g=f.tileCoord,m=h.getTileCoordExtent(g),v=mn(c,m),_=Ui(v,n.getRenderBuffer()*s,y.tmpExtent),x=rn(m,v)?null:_;a.dirty=!1;var b=new jh(0,_,s,e),w=u?new jh(0,v,s,e):void 0,S=cc(s,e),C=function(t){var e,i=t.getStyleFunction()||n.getStyleFunction();if(i&&(e=i(t,s)),e){var r=this.renderFeature(t,S,e,b,w);this.dirty_=this.dirty_||r,a.dirty=a.dirty||r}},T=f.getFeatures();o&&o!==a.renderedRenderOrder&&T.sort(o);for(var E=0,k=T.length;E<k;++E){var P=T[E];x&&!bn(x,P.getGeometry().getExtent())||C.call(y,P)}var O=b.finish(),R=n.getRenderMode()!==yp&&u&&1===p.length?null:v,I=new nc(R,s,e,l.getOverlaps(),O,n.getRenderBuffer());if(t.executorGroups[d].push(I),w){var F=new nc(null,s,e,l.getOverlaps(),w.finish(),n.getRenderBuffer());t.declutterExecutorGroups[d].push(F)}},y=this,g=0,m=p.length;g<m;++g)f(g);a.renderedRevision=r,a.renderedRenderOrder=o,a.renderedResolution=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=e.viewState.resolution,s=e.viewState.rotation;i=null==i?0:i;var a=this.getLayer(),l=a.getSource().getTileGridForProjection(e.viewState.projection),u=Vi([t]);Ui(u,o*i,u);for(var h,c={},p=function(t,e,i){var o=t.getId();void 0===o&&(o=qt(t));var s=c[o];if(s){if(!0!==s&&i<s.distanceSq){if(0===i)return c[o]=!0,r.splice(r.lastIndexOf(s),1),n(t,a,e);s.geometry=e,s.distanceSq=i}}else{if(0===i)return c[o]=!0,n(t,a,e);r.push(c[o]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}},d=this.renderedTiles,f=function(n,r){var c=d[n];if(!bn(l.getTileCoordExtent(c.wrappedTileCoord),u))return"continue";var f=qt(a),y=[c.executorGroups[f]],g=c.declutterExecutorGroups[f];g&&y.push(g),y.some((function(n){for(var r=n===g?e.declutterTree.all().map((function(t){return t.value})):null,a=0,l=n.length;a<l;++a){var u=n[a];if(h=u.forEachFeatureAtCoordinate(t,o,s,i,p,r))return!0}}))},y=0,g=d.length;!h&&y<g;++y)f(y);return h},e.prototype.getFeatures=function(t){return new Promise(function(e,i){for(var n,r=this.getLayer(),o=qt(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),u=this.renderedResolution,h=s.getTileGridForProjection(a),c=fr(this.renderedPixelToCoordinateTransform_,t.slice()),p=h.getTileCoordForCoordAndResolution(c,u),d=0,f=this.renderedTiles.length;d<f;++d)if(p.toString()===this.renderedTiles[d].tileCoord.toString()){if((n=this.renderedTiles[d]).getState()===So){var y=h.getTileCoordExtent(n.tileCoord);s.getWrapX()&&a.canWrapX()&&!Zi(l,y)&&qn(c,a);break}n=void 0}if(!n||n.loadingSourceTiles>0)e([]);else{var g=vn(h.getTileCoordExtent(n.wrappedTileCoord)),m=[(c[0]-g[0])/u,(g[1]-c[1])/u],v=n.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),_=n.hitDetectionImageData[o];if(!_&&!this.animatingOrInteracting_){var x=Vs(h.getTileSize(h.getZForResolution(u))),b=this.renderedRotation_;_=ac(x,[this.getRenderTransform(h.getTileCoordCenter(n.wrappedTileCoord),u,0,sc,x[0]*sc,x[1]*sc,0)],v,r.getStyleFunction(),h.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(r).renderedResolution,b),n.hitDetectionImageData[o]=_}e(lc(m,v,_))}}.bind(this))},e.prototype.handleFontsChanged=function(){mt(this.renderTileImageQueue_);var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var n=t.viewHints,r=!(n[Po]||n[Oo]),o=this.renderedTiles,s=0,a=o.length;s<a;++s){var l=o[s],u=l.declutterExecutorGroups[qt(this.getLayer())];if(u)for(var h=u.length-1;h>=0;--h)u[h].execute(this.context,1,this.getTileRenderTransform(l,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,e){var i=e.pixelRatio,n=e.viewState,r=n.center,o=n.resolution,s=n.rotation,a=e.size,l=Math.round(a[0]*i),u=Math.round(a[1]*i),h=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),c=t.tileCoord,p=h.getTileCoordExtent(t.wrappedTileCoord),d=h.getTileCoordExtent(c,this.tmpExtent)[0]-p[0];return pr(yr(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,o,s,i,l,u,d))},e.prototype.renderFrame=function(e,i){var n=e.viewHints,r=!(n[Po]||n[Oo]);this.renderQueuedTileImages_(r,e),t.prototype.renderFrame.call(this,e,i),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),s=o.getRenderMode(),a=o.getSource(),l=e.usedTiles[qt(a)];for(var u in this.renderTileImageQueue_)l&&u in l||delete this.renderTileImageQueue_[u];var h=this.context,c=h.globalAlpha;h.globalAlpha=o.getOpacity();for(var p=vp[s],d=e.viewState.rotation,f=this.renderedTiles,y=[],g=[],m=f.length-1;m>=0;--m)for(var v=f[m],_=this.getTileRenderTransform(v,e),x=v.executorGroups[qt(o)],b=!1,w=0,S=x.length;w<S;++w){var C=x[w];if(C.hasExecutors(p)){var T=v.tileCoord[0],E=void 0;if(!b&&(E=C.getClipCoords(_))){h.save();for(var k=0,P=y.length;k<P;++k){var O=y[k];T<g[k]&&(h.beginPath(),h.moveTo(E[0],E[1]),h.lineTo(E[2],E[3]),h.lineTo(E[4],E[5]),h.lineTo(E[6],E[7]),h.moveTo(O[6],O[7]),h.lineTo(O[4],O[5]),h.lineTo(O[2],O[3]),h.lineTo(O[0],O[1]),h.clip())}}C.execute(h,1,_,d,r,p),!b&&E&&(h.restore(),y.push(E),g.push(T),b=!0)}}return h.globalAlpha=c,this.container},e.prototype.renderQueuedTileImages_=function(t,e){for(var i in this.renderTileImageQueue_){if(!t&&Date.now()-e.time>8){e.animate=!0;break}var n=this.renderTileImageQueue_[i];delete this.renderTileImageQueue_[i],this.renderTileImage_(n,e)}},e.prototype.renderFeature=function(t,e,i,n,r){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var s=0,a=i.length;s<a;++s)o=dc(n,t,i[s],e,this.boundHandleStyleImageChange_,void 0,r)||o;else o=dc(n,t,i,e,this.boundHandleStyleImageChange_,void 0,r);return o},e.prototype.tileImageNeedsRender_=function(t){var e=this.getLayer();if(e.getRenderMode()===yp)return!1;var i=t.getReplayState(e),n=e.getRevision(),r=t.wantedResolution;return i.renderedTileResolution!==r||i.renderedTileRevision!==n},e.prototype.renderTileImage_=function(t,e){var i=this.getLayer(),n=t.getReplayState(i),r=i.getRevision(),o=t.executorGroups[qt(i)];n.renderedTileRevision=r;var s=t.wrappedTileCoord,a=s[0],l=i.getSource(),u=e.pixelRatio,h=e.viewState.projection,c=l.getTileGridForProjection(h),p=c.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*p,f=c.getResolution(a),y=t.getContext(i);u=Math.round(Math.max(u,d/u));var g=l.getTilePixelSize(a,u,h);y.canvas.width=g[0],y.canvas.height=g[1];var m=u/d;if(1!==m){var v=cr(this.tmpTransform_);yr(v,m,m),y.setTransform.apply(y,v)}var _=c.getTileCoordExtent(s,this.tmpExtent),x=d/f,b=cr(this.tmpTransform_);yr(b,x,-x),function(t,e,i){pr(t,dr(hr,1,0,0,1,e,i))}(b,-_[0],-_[3]);for(var w=0,S=o.length;w<S;++w){o[w].execute(y,m,b,0,!0,mp[i.getRenderMode()])}n.renderedTileResolution=t.wantedResolution},e}(pp),xp="preload",bp="useInterimTilesOnError",wp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sp=function(t){function e(e){var i=this,n=e||{},r=gt({},n);delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).on,i.once,i.un,n.renderMode===dp&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),n.renderMode=void 0);var o=n.renderMode||fp;return ke(o==fp||o==yp,28),i.renderMode_=o,i.setPreload(n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return wp(e,t),e.prototype.createRenderer=function(){return new _p(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(xp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(bp)},e.prototype.setPreload=function(t){this.set(xp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(bp,t)},e}(dh),Cp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tp=function(t){function e(e,i,n){var r=t.call(this)||this,o=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r}return Cp(e,t),e.prototype.changed=function(){this.dispatchEvent(St)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==So)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==So){t.interimTile=null;break}t.getState()==wo?e=t:t.getState()==bo?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==Co&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Bt()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:ii(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(wt),Ep=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kp=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.extent=null,a.format_=r,a.features_=null,a.loader_,a.projection=null,a.resolution,a.tileLoadFunction_=o,a.url_=n,a.key=n,a}return Ep(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==bo&&(this.setState(wo),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(Co)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(So)},e.prototype.setLoader=function(t){this.loader_=t},e}(Tp),Pp=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return ke(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},t.prototype.remove=function(t){var e=this.entries_[t];return ke(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){ke(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Op(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Rp(t,e,i){return t+"/"+e+"/"+i}function Ip(t){return Rp(t[0],t[1],t[2])}function Fp(t){return t.split("/").map(Number)}var jp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jp(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Fp(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Ip(e.tileCoord)),e.release())}.bind(this))}},e}(Pp),Ap="tileloadstart",Lp="tileloadend",zp="tileloaderror",Dp=[0,0,0],Gp=function(){function t(t){var e,i,n,r;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,ke((e=this.resolutions_,i=!0,n=function(t,e){return e-t}||lt,e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))),17),!t.origins)for(var o=0,s=this.resolutions_.length-1;o<s;++o)if(r){if(this.resolutions_[o]/this.resolutions_[o+1]!==r){r=void 0;break}}else r=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=r,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,ke(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=vn(a)),ke(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,ke(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:jo,ke(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var i=new up(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(a){var n=this.getTileRangeForExtentAndZ(a,e);i.minX=Math.max(n.minX,i.minX),i.maxX=Math.min(n.maxX,i.maxX),i.minY=Math.max(n.minY,i.minY),i.maxY=Math.min(n.maxY,i.maxY)}return i}),this):a&&this.calculateTileRanges_(a)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,o=n.maxX;r<=o;++r)for(var s=n.minY,a=n.maxY;s<=a;++s)i([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,n);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?lp(r=Math.floor(r/2),r,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return lp(n,n+1,r,r+1,e)}var o=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;var n=t[0],r=t[1],o=t[2];if(e===n)return lp(r,o,r,o,i);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-n),a=Math.floor(r*s),l=Math.floor(o*s);return e<n?lp(a,a,l,l,i):lp(a,Math.floor(s*(r+1))-1,l,Math.floor(s*(o+1))-1,i)}var u=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(u,e,i)},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),r=this.getResolution(t),o=Vs(this.getTileSize(t),this.tmpSize_),s=n[0]+e.minX*o[0]*r,a=n[0]+(e.maxX+1)*o[0]*r;return Qi(s,n[1]+e.minY*o[1]*r,a,n[1]+(e.maxY+1)*o[1]*r,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=Dp;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var r=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),lp(r,n[1],o,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Vs(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Vs(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*r[0]*n,s=i[1]-(t[2]+1)*r[1]*n;return Qi(o,s,o+r[0]*n,s+r[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,r){var o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),l=Vs(this.getTileSize(o),this.tmpSize_),u=n?.5:0,h=n?.5:0,c=Math.floor((t-a[0])/i+u),p=Math.floor((a[1]-e)/i+h),d=s*c/l[0],f=s*p/l[1];return n?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),Op(o,d,f,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,r){var o=this.getOrigin(i),s=this.getResolution(i),a=Vs(this.getTileSize(i),this.tmpSize_),l=n?.5:0,u=n?.5:0,h=Math.floor((t-o[0])/s+l),c=Math.floor((o[1]-e)/s+u),p=h/a[0],d=c/a[1];return n?(p=Math.ceil(p)-1,d=Math.ceil(d)-1):(p=Math.floor(p),d=Math.floor(d)),Op(i,p,d,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return Pe(ut(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();function Np(t){var e=t.getDefaultTileGrid();return e||(e=qp(t),t.setDefaultTileGrid(e)),e}function Bp(t){var e=t||{},i=e.extent||Kn("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Wp(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Gp(n)}function Wp(t,e,i,n){for(var r=void 0!==e?e:42,o=gn(t),s=xn(t),a=Vs(void 0!==i?i:jo),l=n>0?n:Math.max(s/a[0],o/a[1]),u=r+1,h=new Array(u),c=0;c<u;++c)h[c]=l/Math.pow(2,c);return h}function qp(t,e,i,n){return function(t,e,i,n){var r=void 0!==n?n:Li,o=Wp(t,e,i);return new Gp({extent:t,origin:fn(t,r),resolutions:o,tileSize:i})}(Vp(t),e,i,n)}function Vp(t){var e=(t=Kn(t)).getExtent();if(!e){var i=180*di[fi.DEGREES]/t.getMetersPerUnit();e=Qi(-i,-i,i,i)}return e}var Up=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Xp=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;i.on,i.once,i.un,i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&Vs(n.getTileSize(n.getMinZoom()),[256,256]),i.tileCache=new Mp(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition},i.zDirection=e.zDirection?e.zDirection:0,i}return Up(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,u=i.minX;u<=i.maxX;++u)for(var h=i.minY;h<=i.maxY;++h)s=Rp(e,u,h),a=!1,r.containsKey(s)&&(a=(o=r.get(s)).getState()===So)&&(a=!1!==n(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,r){return Bt()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Np(t)},e.prototype.getTileCacheForProjection=function(t){return ke(Jn(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n,r,o,s=this.getTileGridForProjection(i),a=this.getTilePixelRatio(e),l=Vs(s.getTileSize(t),this.tmpSize);return 1==a?l:(n=l,r=a,void 0===(o=this.tmpSize)&&(o=[0,0]),o[0]=n[0]*r+.5|0,o[1]=n[1]*r+.5|0,o)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),o=Vp(i);if(Yi(o,r))return e;var s=xn(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var o=e.getFullTileRange(i);return!o||o.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(wc),Kp=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Up(e,t),e}(ot),Yp=Xp;function Zp(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],i=e.getFullTileRange(t);return ke(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function Hp(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=Zp(t[r],e);return function(t){if(1===t.length)return t[0];return function(e,i,n){if(e){var r=Me(function(t){return(t[1]<<t[0])+t[2]}(e),t.length);return t[r](e,i,n)}}}(n)}var $p=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jp=function(t){function e(i){var n=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(n.tileUrlFunction=i.tileUrlFunction),n.urls=null,i.urls?n.setUrls(i.urls):i.url&&n.setUrl(i.url),n.tileLoadingKeys_={},n}return $p(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=qt(i),r=i.getState();r==wo?(this.tileLoadingKeys_[n]=!0,e=Ap):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=r==Co?zp:r==So?Lp:void 0),null!=e&&this.dispatchEvent(new Kp(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),o=void 0;for(o=n;o<=r;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Hp(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,i){},e.prototype.useTile=function(t,e,i){var n=Rp(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Yp),Qp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),td=[],ed=function(t){function e(e,i,n,r){var o=t.call(this,e,i,{transition:0})||this;return o.context_={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=r.bind(void 0,o),o.wrappedTileCoord=n,o}return Qp(e,t),e.prototype.getContext=function(t){var e=qt(t);return e in this.context_||(this.context_[e]=re(1,1,td)),this.context_[e]},e.prototype.hasContext=function(t){return qt(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=qt(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)td.push(this.context_[e].canvas),delete this.context_[e];t.prototype.release.call(this)},e}(Tp),id=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nd=function(t){function e(e){var i=this,n=e.projection||"EPSG:3857",r=e.extent||Vp(n),o=e.tileGrid||Bp({extent:r,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:n,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:rd,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,i.sourceTileCache=new Mp(i.tileCache.highWaterMark),i.overlaps_=null==e.overlaps||e.overlaps,i.tileClass=e.tileClass?e.tileClass:kp,i.tileGrids_={},i}return id(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],i=this.tileCache;if(0===i.getCount())return e;var n=Fp(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===n&&i.getState()===So)for(var o=i.getSourceTiles(),s=0,a=o.length;s<a;++s){var l=o[s],u=l.tileCoord;if(bn(t,r.getTileCoordExtent(u))){var h=l.getFeatures();if(h)for(var c=0,p=h.length;c<p;++c){var d=h[c],f=d.getGeometry();bn(t,f.getExtent())&&e.push(d)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,i){var n=this.getTileCacheForProjection(e),r=Object.keys(i).reduce((function(t,e){var i,r,o=Rp((r=(i=e).substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number))[0],r[1],r[2]);if(n.containsKey(o))for(var s=n.get(o).sourceTiles,a=0,l=s.length;a<l;++a)t[s[a].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,e,i),this.sourceTileCache.expireCache(r)},e.prototype.getSourceTiles=function(t,e,i){var n=this;if(i.getState()===bo){i.setState(wo);var r=i.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);Ui(s,-l,s);var u=this.tileGrid,h=u.getExtent();h&&mn(s,h,s);var c=u.getZForResolution(l,1);u.forEachTileCoord(s,c,(function(r){var o=n.tileUrlFunction(r,t,e),s=n.sourceTileCache.containsKey(o)?n.sourceTileCache.get(o):new n.tileClass(r,o?bo:To,o,n.format_,n.tileLoadFunction);i.sourceTiles.push(s);var a=s.getState();if(a<So){var l=function(t){n.handleTileChange(t);var e=s.getState();if(e===So||e===Co){var r=s.getKey();r in i.errorTileKeys?s.getState()===So&&delete i.errorTileKeys[r]:i.loadingSourceTiles--,e===Co?i.errorTileKeys[r]=!0:s.removeEventListener(St,l),0===i.loadingSourceTiles&&i.setState(_t(i.errorTileKeys)?So:Co)}};s.addEventListener(St,l),i.loadingSourceTiles++}a===bo&&(s.extent=u.getTileCoordExtent(r),s.projection=e,s.resolution=u.getResolution(r[0]),n.sourceTileCache.set(o,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((function(t){return t.getState()===Co}))?Co:So)}return i.sourceTiles},e.prototype.getTile=function(t,e,i,n,r){var o,s=Rp(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===a)return o;var l=[t,e,i],u=this.getTileCoordForTileUrlFunction(l,r),h=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(r);if(u&&h){var p=c.getTileCoordExtent(u);Ui(p,-c.getResolution(t),p),bn(h,p)||(u=null)}var d=!0;if(null!==u){var f=this.tileGrid,y=c.getResolution(t),g=f.getZForResolution(y,1),m=c.getTileCoordExtent(u);Ui(m,-y,m),f.forEachTileCoord(m,g,function(t){d=d&&!this.tileUrlFunction(t,n,r)}.bind(this))}var v=new ed(l,d?To:bo,u,this.getSourceTiles.bind(this,n,r));return v.key=a,o?(v.interimTile=o,v.refreshInterimChain(),this.tileCache.replace(s,v)):this.tileCache.set(s,v),v},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),i=this.tileGrids_[e];if(!i){var n=this.tileGrid;i=qp(t,void 0,n?n.getTileSize(n.getMinZoom()):void 0),this.tileGrids_[e]=i}return i},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,i){var n=Vs(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e.prototype.updateCacheSize=function(e,i){t.prototype.updateCacheSize.call(this,2*e,i),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(i).highWaterMark},e}(Jp);function rd(t,e){t.setLoader((function(i,n,r){Ic(e,t.getFormat(),i,n,r,t.onLoad.bind(t),t.onError.bind(t))}))}var od=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),sd=function(t){function e(e){return(e=gt({},e)).controls||(e.controls=na()),e.interactions||(e.interactions=sp({onFocusOnly:!0})),t.call(this,e)||this}return od(e,t),e.prototype.createRenderer=function(){return new no(this)},e}(Xs),ad=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var ld,ud=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.crossOrigin_=r,a.src_=n,a.key=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return ad(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=So,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=Co,this.unlistenImage_(),this.image_=((t=re(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=So:this.state=To,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Co&&(this.state=bo,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==bo&&(this.state=wo,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Za(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Tp),hd=function(){function t(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=tr(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&xn(n)==xn(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?xn(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?xn(this.targetProj_.getExtent()):null;var l=vn(i),u=_n(i),h=pn(i),c=cn(i),p=this.transformInv_(l),d=this.transformInv_(u),f=this.transformInv_(h),y=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(Re(hn(i)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,p,d,f,y,g),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,i){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,i,n,r,o){this.triangles_.push({source:[n,r,o],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,r,o,s,a,l){var u=Vi([r,o,s,a]),h=this.sourceWorldWidth_?xn(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=xn(Vi([t,e,i,n]))/this.targetWorldWidth_>.25||d;!p&&this.sourceProj_.isGlobal()&&h&&(d=h>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||bn(u,this.maxSourceExtent_)){var f=0;if(!(d||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)d=!0;else if(1!=(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!d){var y=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(y),m=void 0;if(p)m=(Me(r[0],c)+Me(s[0],c))/2-Me(g[0],c);else m=(r[0]+s[0])/2-g[0];var v=(r[1]+s[1])/2-g[1];d=m*m+v*v>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var _=[(e[0]+i[0])/2,(e[1]+i[1])/2],x=this.transformInv_(_),b=[(n[0]+t[0])/2,(n[1]+t[1])/2],w=this.transformInv_(b);this.addQuad_(t,e,_,b,r,o,x,w,l-1),this.addQuad_(b,_,i,n,w,x,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],C=this.transformInv_(S),T=[(i[0]+n[0])/2,(i[1]+n[1])/2],E=this.transformInv_(T);this.addQuad_(t,S,T,n,r,C,E,a,l-1),this.addQuad_(S,e,i,T,C,o,s,E,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,s,a),0==(14&f)&&this.addTriangle_(t,i,e,r,s,o),f&&(0==(13&f)&&this.addTriangle_(e,n,t,o,a,r),0==(7&f)&&this.addTriangle_(e,n,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){var r=e.source;sn(t,r[0]),sn(t,r[1]),sn(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),cd={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function pd(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function dd(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function fd(t,e,i,n){var r=er(i,e,t),o=Yn(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||Yi(l,r)){var u=Yn(t,o,r)/o;isFinite(u)&&u>0&&(o/=u)}return o}function yd(t,e,i,n,r,o,s,a,l,u,h,c){var p=re(Math.round(i*t),Math.round(i*e));if(gt(p,c),0===l.length)return p.canvas;function d(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";var f=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){on(f,t.extent)}));var y=xn(f),g=gn(f),m=re(Math.round(i*y/n),Math.round(i*g/n));gt(m,c);var v=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),o=xn(t.extent),s=gn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,n*v,r*v,o*v,s*v)}));var _=vn(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],h=s[1][0],y=s[1][1],g=s[2][0],v=s[2][1],x=d((a[0][0]-_[0])/o),b=d(-(a[0][1]-_[1])/o),w=d((a[1][0]-_[0])/o),S=d(-(a[1][1]-_[1])/o),C=d((a[2][0]-_[0])/o),T=d(-(a[2][1]-_[1])/o),E=l,k=u;l=0,u=0;var P=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),o=i+1;o<e;o++){var s=Math.abs(t[o][i]);s>r&&(r=s,n=o)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l<e;l++)for(var u=-t[l][i]/t[i][i],h=i;h<e+1;h++)i==h?t[l][h]=0:t[l][h]+=u*t[i][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*c[p]}return c}([[h-=E,y-=k,0,0,w-x],[g-=E,v-=k,0,0,C-x],[0,0,h,y,S-b],[0,0,g,v,T-b]]);if(P){if(p.save(),p.beginPath(),function(){if(void 0===ld){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",pd(t,4,5,4,0),pd(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;ld=dd(e,0)||dd(e,4)||dd(e,8)}return ld}()||c===cd){p.moveTo(w,S);for(var O=x-w,R=b-S,I=0;I<4;I++)p.lineTo(w+d((I+1)*O/4),S+d(I*R/3)),3!=I&&p.lineTo(w+d((I+1)*O/4),S+d((I+1)*R/3));p.lineTo(C,T)}else p.moveTo(w,S),p.lineTo(x,b),p.lineTo(C,T);p.clip(),p.transform(P[0],P[2],P[1],P[3],x,b),p.translate(f[0]-E,f[3]-k),p.scale(n/i,-n/i),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,i){var n=t.target,r=(n[0][0]-_[0])/o,s=-(n[0][1]-_[1])/o,a=(n[1][0]-_[0])/o,l=-(n[1][1]-_[1])/o,u=(n[2][0]-_[0])/o,h=-(n[2][1]-_[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(u,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var gd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),md=function(t){function e(e,i,n,r,o,s,a,l,u,h,c,p){var d=t.call(this,o,bo)||this;d.renderEdges_=void 0!==c&&c,d.contextOptions_=p,d.pixelRatio_=a,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=i,d.targetTileGrid_=r,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var f=r.getTileCoordExtent(d.wrappedTileCoord_),y=d.targetTileGrid_.getExtent(),g=d.sourceTileGrid_.getExtent(),m=y?mn(f,y):f;if(0===hn(m))return d.state=To,d;var v=e.getExtent();v&&(g=g?mn(g,v):v);var _=r.getResolution(d.wrappedTileCoord_[0]),x=function(t,e,i,n){var r=dn(i),o=fd(t,e,r,n);return(!isFinite(o)||o<=0)&&un(i,(function(i){return o=fd(t,e,i,n),isFinite(o)&&o>0})),o}(e,n,m,_);if(!isFinite(x)||x<=0)return d.state=To,d;var b=void 0!==h?h:.5;if(d.triangulation_=new hd(e,n,m,g,x*b,_),0===d.triangulation_.getTriangles().length)return d.state=To,d;d.sourceZ_=i.getZForResolution(x);var w=d.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(w[1]=Pe(w[1],g[1],g[3]),w[3]=Pe(w[3],g[1],g[3])):w=mn(w,g)),hn(w)){for(var S=i.getTileRangeForExtentAndZ(w,d.sourceZ_),C=S.minX;C<=S.maxX;C++)for(var T=S.minY;T<=S.maxY;T++){var E=u(d.sourceZ_,C,T,a);E&&d.sourceTiles_.push(E)}0===d.sourceTiles_.length&&(d.state=To)}else d.state=To;return d}return gd(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==So&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=Co;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=yd(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=So}this.changed()},e.prototype.load=function(){if(this.state==bo){this.state=wo,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r=e.getState();if(r==bo||r==wo){t++;var o=At(e,St,(function(i){var n=e.getState();n!=So&&n!=Co&&n!=To||(zt(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==bo&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(zt),this.sourcesListenerKeys_=null},e}(Tp),vd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function _d(t,e){t.getImage().src=e}var xd=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:_d,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:ud,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.contextOptions_=!1===e.imageSmoothing?cd:void 0,i.renderReprojectionEdges_=!1,i}return vd(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Jn(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Jn(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Jn(e,t)){var i=qt(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Np(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Jn(e,t))return this.tileCache;var i=qt(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Mp(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,o){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,n,r):void 0,u=new this.tileClass(s,void 0!==l?bo:To,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(St,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,i,n,r){var o=this.getProjection();if(o&&r&&!Jn(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,u=Ip(a);s.containsKey(u)&&(l=s.get(u));var h=this.getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),d=this.getTileCoordForTileUrlFunction(a,r),f=new md(o,c,r,p,a,d,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return f.key=h,l?(f.interimTile=l,f.refreshInterimChain(),s.replace(u,f)):s.set(u,f),f}return this.getTileInternal(t,e,i,n,o||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var o=null,s=Rp(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,i,n,r,a),l.getState()==bo?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,n,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Kn(t);if(i){var n=qt(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(Jp),bd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wd=function(t){function e(e){var i=this,n=e||{},r=gt({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).on,i.once,i.un,i.setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return bd(e,t),e.prototype.getPreload=function(){return this.get(xp)},e.prototype.setPreload=function(t){this.set(xp,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(bp)},e.prototype.setUseInterimTilesOnError=function(t){this.set(bp,t)},e}(Ke),Sd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cd=function(t){function e(e){return t.call(this,e)||this}return Sd(e,t),e.prototype.createRenderer=function(){return new pp(this)},e}(wd),Td={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},Ed=" ",kd=/(italic|oblique)$/i,Pd={},Od={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{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."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{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."}}},source_image:{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."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"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."}},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:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{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."},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:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* 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).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},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"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},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,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{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."}},"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:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},Rd="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Id(t){var e={exports:{}};return t(e,e.exports),e.exports}function Fd(t,e){return Object.prototype.hasOwnProperty.call(t,e)}
|
31
|
-
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
32
|
-
Id((function(t,e){!function(i){var n=e&&!e.nodeType&&e,r=t&&!t.nodeType&&t,o="object"==typeof Rd&&Rd;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,a,l=2147483647,u=36,h=/^xn--/,c=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,y=String.fromCharCode;function g(t){throw RangeError(d[t])}function m(t,e){for(var i=t.length,n=[];i--;)n[i]=e(t[i]);return n}function v(t,e){var i=t.split("@"),n="";return i.length>1&&(n=i[0]+"@",t=i[1]),n+m((t=t.replace(p,".")).split("."),e).join(".")}function _(t){for(var e,i,n=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(i=t.charCodeAt(r++)))?n.push(((1023&e)<<10)+(1023&i)+65536):(n.push(e),r--):n.push(e);return n}function x(t){return m(t,(function(t){var e="";return t>65535&&(e+=y((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=y(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,i){var n=0;for(t=i?f(t/700):t>>1,t+=f(t/e);t>455;n+=u)t=f(t/35);return f(n+36*t/(t+38))}function S(t){var e,i,n,r,o,s,a,h,c,p,d,y=[],m=t.length,v=0,_=128,b=72;for((i=t.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)t.charCodeAt(n)>=128&&g("not-basic"),y.push(t.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=v,s=1,a=u;r>=m&&g("invalid-input"),((h=(d=t.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||h>f((l-v)/s))&&g("overflow"),v+=h*s,!(h<(c=a<=b?1:a>=b+26?26:a-b));a+=u)s>f(l/(p=u-c))&&g("overflow"),s*=p;b=w(v-o,e=y.length+1,0==o),f(v/e)>l-_&&g("overflow"),_+=f(v/e),v%=e,y.splice(v++,0,_)}return x(y)}function C(t){var e,i,n,r,o,s,a,h,c,p,d,m,v,x,S,C=[];for(m=(t=_(t)).length,e=128,i=0,o=72,s=0;s<m;++s)(d=t[s])<128&&C.push(y(d));for(n=r=C.length,r&&C.push("-");n<m;){for(a=l,s=0;s<m;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>f((l-i)/(v=n+1))&&g("overflow"),i+=(a-e)*v,e=a,s=0;s<m;++s)if((d=t[s])<e&&++i>l&&g("overflow"),d==e){for(h=i,c=u;!(h<(p=c<=o?1:c>=o+26?26:c-o));c+=u)S=h-p,x=u-p,C.push(y(b(p+S%x,0))),h=f(S/x);C.push(y(b(h,0))),o=w(i,v,n==r),i=0,++n}++i,++e}return C.join("")}if(s={version:"1.3.2",ucs2:{decode:_,encode:x},decode:S,encode:C,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return v(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&r)if(t.exports==n)r.exports=s;else for(a in s)s.hasOwnProperty(a)&&(n[a]=s[a]);else i.punycode=s}(Rd)}));var jd=function(t,e,i,n){e=e||"&",i=i||"=";var r={};if("string"!=typeof t||0===t.length)return r;var o=/\+/g;t=t.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var l=0;l<a;++l){var u,h,c,p,d=t[l].replace(o,"%20"),f=d.indexOf(i);f>=0?(u=d.substr(0,f),h=d.substr(f+1)):(u=d,h=""),c=decodeURIComponent(u),p=decodeURIComponent(h),Fd(r,c)?Array.isArray(r[c])?r[c].push(p):r[c]=[r[c],p]:r[c]=p}return r},Md=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},Ad=function(t,e,i,n){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var r=encodeURIComponent(Md(n))+i;return Array.isArray(t[n])?t[n].map((function(t){return r+encodeURIComponent(Md(t))})).join(e):r+encodeURIComponent(Md(t[n]))})).join(e):n?encodeURIComponent(Md(n))+i+encodeURIComponent(Md(t)):""};Id((function(t,e){e.decode=e.parse=jd,e.encode=e.stringify=Ad}));class Ld extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class zd{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[i,n]of e)this.bindings[i]=n}concat(t){return new zd(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Dd={kind:"null"},Gd={kind:"number"},Nd={kind:"string"},Bd={kind:"boolean"},Wd={kind:"color"},qd={kind:"object"},Vd={kind:"value"},Ud={kind:"collator"},Xd={kind:"formatted"},Kd={kind:"resolvedImage"};function Yd(t,e){return{kind:"array",itemType:t,N:e}}function Zd(t){if("array"===t.kind){const e=Zd(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const Hd=[Dd,Gd,Nd,Bd,Wd,Xd,qd,Yd(Vd),Kd];function $d(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!$d(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of Hd)if(!$d(t,e))return null}return`Expected ${Zd(t)} but found ${Zd(e)} instead.`}function Jd(t,e){return e.some((e=>e.kind===t.kind))}function Qd(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var tf=Id((function(t,e){var i={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 n(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function s(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function a(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in i)return i[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=r.indexOf("("),u=r.indexOf(")");if(-1!==l&&u+1===r.length){var h=r.substr(0,l),c=r.substr(l+1,u-(l+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=s(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),p];case"hsla":if(4!==c.length)return null;p=s(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,f=s(c[1]),y=s(c[2]),g=y<=.5?y*(f+1):y+f-y*f,m=2*y-g;return[n(255*a(m,g,d+1/3)),n(255*a(m,g,d)),n(255*a(m,g,d-1/3)),p];default:return null}}return null}}catch(l){}}));class ef{constructor(t,e,i,n=1){this.r=t,this.g=e,this.b=i,this.a=n}static parse(t){if(!t)return;if(t instanceof ef)return t;if("string"!=typeof t)return;const e=tf.parseCSSColor(t);return e?new ef(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,i,n]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(i)},${n})`}toArray(){const{r:t,g:e,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*i/n,n]}}ef.black=new ef(0,0,0,1),ef.white=new ef(1,1,1,1),ef.transparent=new ef(0,0,0,0),ef.red=new ef(1,0,0,1),ef.blue=new ef(0,0,1,1);class nf{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class rf{constructor(t,e,i,n,r){this.text=t,this.image=e,this.scale=i,this.fontStack=n,this.textColor=r}}class of{constructor(t){this.sections=t}static fromString(t){return new of([new rf(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof of?t:of.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const i={};e.fontStack&&(i["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(i["font-scale"]=e.scale),e.textColor&&(i["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(i)}return t}}class sf{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new sf({name:t,available:!1}):null}serialize(){return["image",this.name]}}function af(t,e,i,n){if(!("number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255)){return`Invalid rgba value [${("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}return void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,i,n].join(", ")}]: 'a' must be between 0 and 1.`}function lf(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof ef)return!0;if(t instanceof nf)return!0;if(t instanceof of)return!0;if(t instanceof sf)return!0;if(Array.isArray(t)){for(const e of t)if(!lf(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!lf(t[e]))return!1;return!0}return!1}function uf(t){if(null===t)return Dd;if("string"==typeof t)return Nd;if("boolean"==typeof t)return Bd;if("number"==typeof t)return Gd;if(t instanceof ef)return Wd;if(t instanceof nf)return Ud;if(t instanceof of)return Xd;if(t instanceof sf)return Kd;if(Array.isArray(t)){const e=t.length;let i;for(const n of t){const t=uf(n);if(i){if(i===t)continue;i=Vd;break}i=t}return Yd(i||Vd,e)}return qd}function hf(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof ef||t instanceof of||t instanceof sf?t.toString():JSON.stringify(t)}class cf{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!lf(t[1]))return e.error("invalid value");const i=t[1];let n=uf(i);const r=e.expectedType;return"array"!==n.kind||0!==n.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(n=r),new cf(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof ef?["rgba"].concat(this.value.toArray()):this.value instanceof of?this.value.serialize():this.value}}class pf{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const df={string:Nd,number:Gd,boolean:Bd,object:qd};class ff{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i,n=1;const r=t[0];if("array"===r){let r,o;if(t.length>2){const i=t[1];if("string"!=typeof i||!(i in df)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);r=df[i],n++}else r=Vd;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}i=Yd(r,o)}else i=df[r];const o=[];for(;n<t.length;n++){const i=e.parse(t[n],n,Vd);if(!i)return null;o.push(i)}return new ff(i,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const i=this.args[e].evaluate(t);if(!$d(this.type,uf(i)))return i;if(e===this.args.length-1)throw new pf(`Expected value to be of type ${Zd(this.type)}, but found ${Zd(uf(i))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}class yf{constructor(t){this.type=Xd,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const n=[];let r=!1;for(let o=1;o<=t.length-1;++o){const i=t[o];if(r&&"object"==typeof i&&!Array.isArray(i)){r=!1;let t=null;if(i["font-scale"]&&(t=e.parse(i["font-scale"],1,Gd),!t))return null;let o=null;if(i["text-font"]&&(o=e.parse(i["text-font"],1,Yd(Nd)),!o))return null;let s=null;if(i["text-color"]&&(s=e.parse(i["text-color"],1,Wd),!s))return null;const a=n[n.length-1];a.scale=t,a.font=o,a.textColor=s}else{const i=e.parse(t[o],1,Vd);if(!i)return null;const s=i.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:i,scale:null,font:null,textColor:null})}}return new yf(n)}evaluate(t){return new of(this.sections.map((e=>{const i=e.content.evaluate(t);return uf(i)===Kd?new rf("",i,null,null,null):new rf(hf(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const i={};e.scale&&(i["font-scale"]=e.scale.serialize()),e.font&&(i["text-font"]=e.font.serialize()),e.textColor&&(i["text-color"]=e.textColor.serialize()),t.push(i)}return t}}class gf{constructor(t){this.type=Kd,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,Nd);return i?new gf(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=sf.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const mf={"to-boolean":Bd,"to-color":Wd,"to-number":Gd,"to-string":Nd};class vf{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const n=mf[i],r=[];for(let o=1;o<t.length;o++){const i=e.parse(t[o],o,Vd);if(!i)return null;r.push(i)}return new vf(n,r)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,i;for(const n of this.args){if(e=n.evaluate(t),i=null,e instanceof ef)return e;if("string"==typeof e){const i=t.parseColor(e);if(i)return i}else if(Array.isArray(e)&&(i=e.length<3||e.length>4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:af(e[0],e[1],e[2],e[3]),!i))return new ef(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new pf(i||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new pf(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?of.fromString(hf(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?sf.fromString(hf(this.args[0].evaluate(t))):hf(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new yf([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new gf(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}const _f=["Unknown","Point","LineString","Polygon"];class xf{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?"number"==typeof this.feature.type?_f[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=ef.parse(t)),e}}class bf{constructor(t,e,i,n){this.name=t,this.type=e,this._evaluate=i,this.args=n}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const i=t[0],n=bf.definitions[i];if(!n)return e.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const r=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=o.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let a=null;for(const[l,u]of s){a=new Uf(e.registry,e.path,null,e.scope);const n=[];let o=!1;for(let e=1;e<t.length;e++){const i=t[e],r=Array.isArray(l)?l[e-1]:l.type,s=a.parse(i,1+n.length,r);if(!s){o=!0;break}n.push(s)}if(!o)if(Array.isArray(l)&&l.length!==n.length)a.error(`Expected ${l.length} arguments, but found ${n.length} instead.`);else{for(let t=0;t<n.length;t++){const e=Array.isArray(l)?l[t]:l.type,i=n[t];a.concat(t+1).checkSubtype(e,i.type)}if(0===a.errors.length)return new bf(i,r,u,n)}}if(1===s.length)e.errors.push(...a.errors);else{const i=(s.length?s:o).map((([t])=>{return e=t,Array.isArray(e)?`(${e.map(Zd).join(", ")})`:`(${Zd(e.type)}...)`;var e})).join(" | "),n=[];for(let r=1;r<t.length;r++){const i=e.parse(t[r],1+n.length);if(!i)return null;n.push(Zd(i.type))}e.error(`Expected arguments of type ${i}, but found (${n.join(", ")}) instead.`)}return null}static register(t,e){bf.definitions=e;for(const i in e)t[i]=bf}}class wf{constructor(t,e,i){this.type=Ud,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");const n=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,Bd);if(!n)return null;const r=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,Bd);if(!r)return null;let o=null;return i.locale&&(o=e.parse(i.locale,1,Nd),!o)?null:new wf(n,r,o)}evaluate(t){return new nf(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}const Sf=8192;function Cf(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Tf(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Ef(t,e){const i=(180+t[0])/360;const n=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360);var r;const o=Math.pow(2,e.z);return[Math.round(i*o*Sf),Math.round(n*o*Sf)]}function kf(t,e,i){const n=t[0]-e[0],r=t[1]-e[1],o=t[0]-i[0],s=t[1]-i[1];return n*s-o*r==0&&n*o<=0&&r*s<=0}function Pf(t,e){let i=!1;for(let s=0,a=e.length;s<a;s++){const a=e[s];for(let e=0,s=a.length;e<s-1;e++){if(kf(t,a[e],a[e+1]))return!1;n=t,r=a[e],o=a[e+1],r[1]>n[1]!=o[1]>n[1]&&n[0]<(o[0]-r[0])*(n[1]-r[1])/(o[1]-r[1])+r[0]&&(i=!i)}}var n,r,o;return i}function Of(t,e){for(let i=0;i<e.length;i++)if(Pf(t,e[i]))return!0;return!1}function Rf(t,e,i,n){const r=t[0]-i[0],o=t[1]-i[1],s=e[0]-i[0],a=e[1]-i[1],l=n[0]-i[0],u=n[1]-i[1],h=r*u-l*o,c=s*u-l*a;return h>0&&c<0||h<0&&c>0}function If(t,e,i,n){const r=[e[0]-t[0],e[1]-t[1]],o=[n[0]-i[0],n[1]-i[1]];return 0!=(s=o)[0]*(a=r)[1]-s[1]*a[0]&&!(!Rf(t,e,i,n)||!Rf(i,n,t,e));var s,a}function Ff(t,e,i){for(const n of i)for(let i=0;i<n.length-1;++i)if(If(t,e,n[i],n[i+1]))return!0;return!1}function jf(t,e){for(let i=0;i<t.length;++i)if(!Pf(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(Ff(t[i],t[i+1],e))return!1;return!0}function Mf(t,e){for(let i=0;i<e.length;i++)if(jf(t,e[i]))return!0;return!1}function Af(t,e,i){const n=[];for(let r=0;r<t.length;r++){const o=[];for(let n=0;n<t[r].length;n++){const s=Ef(t[r][n],i);Cf(e,s),o.push(s)}n.push(o)}return n}function Lf(t,e,i){const n=[];for(let r=0;r<t.length;r++){const o=Af(t[r],e,i);n.push(o)}return n}function zf(t,e,i,n){if(t[0]<i[0]||t[0]>i[2]){const e=.5*n;let r=t[0]-i[0]>e?-n:i[0]-t[0]>e?n:0;0===r&&(r=t[0]-i[2]>e?-n:i[2]-t[0]>e?n:0),t[0]+=r}Cf(e,t)}function Df(t,e,i,n){const r=Math.pow(2,n.z)*Sf,o=[n.x*Sf,n.y*Sf],s=[];for(const a of t)for(const t of a){const n=[t.x+o[0],t.y+o[1]];zf(n,e,i,r),s.push(n)}return s}function Gf(t,e,i,n){const r=Math.pow(2,n.z)*Sf,o=[n.x*Sf,n.y*Sf],s=[];for(const l of t){const t=[];for(const i of l){const n=[i.x+o[0],i.y+o[1]];Cf(e,n),t.push(n)}s.push(t)}if(e[2]-e[0]<=r/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const t of s)for(const n of t)zf(n,e,i,r)}var a;return s}class Nf{constructor(t,e){this.type=Bd,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(lf(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const i=e.features[t].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new Nf(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new Nf(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new Nf(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if("Polygon"===e.type){const o=Af(e.coordinates,n,r),s=Df(t.geometry(),i,n,r);if(!Tf(i,n))return!1;for(const t of s)if(!Pf(t,o))return!1}if("MultiPolygon"===e.type){const o=Lf(e.coordinates,n,r),s=Df(t.geometry(),i,n,r);if(!Tf(i,n))return!1;for(const t of s)if(!Of(t,o))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if("Polygon"===e.type){const o=Af(e.coordinates,n,r),s=Gf(t.geometry(),i,n,r);if(!Tf(i,n))return!1;for(const t of s)if(!jf(t,o))return!1}if("MultiPolygon"===e.type){const o=Lf(e.coordinates,n,r),s=Gf(t.geometry(),i,n,r);if(!Tf(i,n))return!1;for(const t of s)if(!Mf(t,o))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}function Bf(t){if(t instanceof bf){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Nf)return!1;let e=!0;return t.eachChild((t=>{e&&!Bf(t)&&(e=!1)})),e}function Wf(t){if(t instanceof bf&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!Wf(t)&&(e=!1)})),e}function qf(t,e){if(t instanceof bf&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild((t=>{i&&!qf(t,e)&&(i=!1)})),i}class Vf{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const i=t[1];return e.scope.has(i)?new Vf(i,e.scope.get(i)):e.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class Uf{constructor(t,e=[],i,n=new zd,r=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=r,this.expectedType=i}parse(t,e,i,n,r={}){return e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)}_parse(t,e){function i(t,e,i){return"assert"===i?new ff(e,[t]):"coerce"===i?new vf(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[r];if(o){let r=o.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,n=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else r=i(r,t,e.typeAnnotation||"coerce");else r=i(r,t,e.typeAnnotation||"assert")}if(!(r instanceof cf)&&"resolvedImage"!==r.type.kind&&Xf(r)){const t=new xf;try{r=new cf(r.type,r.evaluate(t))}catch(n){return this.error(n.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,i){const n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new Uf(this.registry,n,e||null,r,this.errors)}error(t,...e){const i=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new Ld(i,t))}checkSubtype(t,e){const i=$d(t,e);return i&&this.error(i),i}}function Xf(t){if(t instanceof Vf)return Xf(t.boundExpression);if(t instanceof bf&&"error"===t.name)return!1;if(t instanceof wf)return!1;if(t instanceof Nf)return!1;const e=t instanceof vf||t instanceof ff;let i=!0;return t.eachChild((t=>{i=e?i&&Xf(t):i&&t instanceof cf})),!!i&&(Bf(t)&&qf(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"]))}function Kf(t,e){const i=t.length-1;let n,r,o=0,s=i,a=0;for(;o<=s;)if(a=Math.floor((o+s)/2),n=t[a],r=t[a+1],n<=e){if(a===i||e<r)return a;o=a+1}else{if(!(n>e))throw new pf("Input is not a number.");s=a-1}return 0}class Yf{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[n,r]of i)this.labels.push(n),this.outputs.push(r)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,Gd);if(!i)return null;const n=[];let r=null;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(let o=1;o<t.length;o+=2){const i=1===o?-1/0:t[o],s=t[o+1],a=o,l=o+1;if("number"!=typeof i)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(n.length&&n[n.length-1][0]>=i)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const u=e.parse(s,l,r);if(!u)return null;r=r||u.type,n.push([i,u])}return new Yf(r,i,n)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);const r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);return i[Kf(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var Zf=Hf;function Hf(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}function $f(t,e,i){return t*(1-i)+e*i}Hf.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Hf.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Hf.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Hf.prototype.solveCurveX=function(t,e){var i,n,r,o,s;for(void 0===e&&(e=1e-6),r=t,s=0;s<8;s++){if(o=this.sampleCurveX(r)-t,Math.abs(o)<e)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r-=o/a}if((r=t)<(i=0))return i;if(r>(n=1))return n;for(;i<n;){if(o=this.sampleCurveX(r),Math.abs(o-t)<e)return r;t>o?i=r:n=r,r=.5*(n-i)+i}return r},Hf.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var Jf=Object.freeze({__proto__:null,number:$f,color:function(t,e,i){return new ef($f(t.r,e.r,i),$f(t.g,e.g,i),$f(t.b,e.b,i),$f(t.a,e.a,i))},array:function(t,e,i){return t.map(((t,n)=>$f(t,e[n],i)))}});const Qf=.95047,ty=1.08883,ey=4/29,iy=6/29,ny=3*iy*iy,ry=Math.PI/180,oy=180/Math.PI;function sy(t){return t>.008856451679035631?Math.pow(t,1/3):t/ny+ey}function ay(t){return t>iy?t*t*t:ny*(t-ey)}function ly(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function uy(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hy(t){const e=uy(t.r),i=uy(t.g),n=uy(t.b),r=sy((.4124564*e+.3575761*i+.1804375*n)/Qf),o=sy((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*o-16,a:500*(r-o),b:200*(o-sy((.0193339*e+.119192*i+.9503041*n)/ty)),alpha:t.a}}function cy(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*ay(e),i=Qf*ay(i),n=ty*ay(n),new ef(ly(3.2404542*i-1.5371385*e-.4985314*n),ly(-.969266*i+1.8760108*e+.041556*n),ly(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}function py(t,e,i){const n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}const dy={forward:hy,reverse:cy,interpolate:function(t,e,i){return{l:$f(t.l,e.l,i),a:$f(t.a,e.a,i),b:$f(t.b,e.b,i),alpha:$f(t.alpha,e.alpha,i)}}},fy={forward:function(t){const{l:e,a:i,b:n}=hy(t),r=Math.atan2(n,i)*oy;return{h:r<0?r+360:r,c:Math.sqrt(i*i+n*n),l:e,alpha:t.a}},reverse:function(t){const e=t.h*ry,i=t.c;return cy({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:py(t.h,e.h,i),c:$f(t.c,e.c,i),l:$f(t.l,e.l,i),alpha:$f(t.alpha,e.alpha,i)}}};class yy{constructor(t,e,i,n,r){this.type=t,this.operator=e,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(const[o,s]of r)this.labels.push(o),this.outputs.push(s)}static interpolationFactor(t,e,i,n){let r=0;if("exponential"===t.name)r=gy(e,t.base,i,n);else if("linear"===t.name)r=gy(e,1,i,n);else if("cubic-bezier"===t.name){const o=t.controlPoints;r=new Zf(o[0],o[1],o[2],o[3]).solve(gy(e,1,i,n))}return r}static parse(t,e){let[i,n,r,...o]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(r=e.parse(r,2,Gd),!r)return null;const s=[];let a=null;"interpolate-hcl"===i||"interpolate-lab"===i?a=Wd:e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType);for(let l=0;l<o.length;l+=2){const t=o[l],i=o[l+1],n=l+3,r=l+4;if("number"!=typeof t)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',n);if(s.length&&s[s.length-1][0]>=t)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);const u=e.parse(i,r,a);if(!u)return null;a=a||u.type,s.push([t,u])}return"number"===a.kind||"color"===a.kind||"array"===a.kind&&"number"===a.itemType.kind&&"number"==typeof a.N?new yy(a,i,n,r,s):e.error(`Type ${Zd(a)} is not interpolatable.`)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);const r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);const o=Kf(e,n),s=e[o],a=e[o+1],l=yy.interpolationFactor(this.interpolation,n,s,a),u=i[o].evaluate(t),h=i[o+1].evaluate(t);return"interpolate"===this.operator?Jf[this.type.kind.toLowerCase()](u,h,l):"interpolate-hcl"===this.operator?fy.reverse(fy.interpolate(fy.forward(u),fy.forward(h),l)):dy.reverse(dy.interpolate(dy.forward(u),dy.forward(h),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let i=0;i<this.labels.length;i++)e.push(this.labels[i],this.outputs[i].serialize());return e}}function gy(t,e,i,n){const r=n-i,o=t-i;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}class my{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let i=null;const n=e.expectedType;n&&"value"!==n.kind&&(i=n);const r=[];for(const s of t.slice(1)){const t=e.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!t)return null;i=i||t.type,r.push(t)}const o=n&&r.some((t=>$d(n,t.type)));return new my(o?Vd:i,r)}evaluate(t){let e,i=null,n=0;for(const r of this.args)if(n++,i=r.evaluate(t),i&&i instanceof sf&&!i.available&&(e||(e=i.name),i=null,n===this.args.length&&(i=e)),null!==i)break;return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class vy{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let r=1;r<t.length-1;r+=2){const n=t[r];if("string"!=typeof n)return e.error(`Expected string, but found ${typeof n} instead.`,r);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);const o=e.parse(t[r+1],r+1);if(!o)return null;i.push([n,o])}const n=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return n?new vy(i,n):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,i]of this.bindings)t.push(e,i.serialize());return t.push(this.result.serialize()),t}}class _y{constructor(t,e,i){this.type=t,this.index=e,this.input=i}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Gd),n=e.parse(t[2],2,Yd(e.expectedType||Vd));if(!i||!n)return null;const r=n.type;return new _y(r.itemType,i,n)}evaluate(t){const e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new pf(`Array index out of bounds: ${e} < 0.`);if(e>=i.length)throw new pf(`Array index out of bounds: ${e} > ${i.length-1}.`);if(e!==Math.floor(e))throw new pf(`Array index must be an integer, but found ${e} instead.`);return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class xy{constructor(t,e){this.type=Bd,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Vd),n=e.parse(t[2],2,Vd);return i&&n?Jd(i.type,[Bd,Nd,Gd,Dd,Vd])?new xy(i,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Zd(i.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!Qd(e,["boolean","string","number","null"]))throw new pf(`Expected first argument to be of type boolean, string, number or null, but found ${Zd(uf(e))} instead.`);if(!Qd(i,["string","array"]))throw new pf(`Expected second argument to be of type array or string, but found ${Zd(uf(i))} instead.`);return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class by{constructor(t,e,i){this.type=Gd,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Vd),n=e.parse(t[2],2,Vd);if(!i||!n)return null;if(!Jd(i.type,[Bd,Nd,Gd,Dd,Vd]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${Zd(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,Gd);return r?new by(i,n,r):null}return new by(i,n)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Qd(e,["boolean","string","number","null"]))throw new pf(`Expected first argument to be of type boolean, string, number or null, but found ${Zd(uf(e))} instead.`);if(!Qd(i,["string","array"]))throw new pf(`Expected second argument to be of type array or string, but found ${Zd(uf(i))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return i.indexOf(e,n)}return i.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class wy{constructor(t,e,i,n,r,o){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const r={},o=[];for(let l=2;l<t.length-1;l+=2){let s=t[l];const a=t[l+1];Array.isArray(s)||(s=[s]);const u=e.concat(l);if(0===s.length)return u.error("Expected at least one branch label.");for(const t of s){if("number"!=typeof t&&"string"!=typeof t)return u.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,uf(t)))return null}else i=uf(t);if(void 0!==r[String(t)])return u.error("Branch labels must be unique.");r[String(t)]=o.length}const h=e.parse(a,l,n);if(!h)return null;n=n||h.type,o.push(h)}const s=e.parse(t[1],1,Vd);if(!s)return null;const a=e.parse(t[t.length-1],t.length-1,n);return a?"value"!==s.type.kind&&e.concat(1).checkSubtype(i,s.type)?null:new wy(i,n,s,r,o,a):null}evaluate(t){const e=this.input.evaluate(t);return(uf(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),i=[],n={};for(const o of e){const t=n[this.cases[o]];void 0===t?(n[this.cases[o]]=i.length,i.push([this.cases[o],[o]])):i[t][1].push(o)}const r=t=>"number"===this.inputType.kind?Number(t):t;for(const[o,s]of i)1===s.length?t.push(r(s[0])):t.push(s.map(r)),t.push(this.outputs[o].serialize());return t.push(this.otherwise.serialize()),t}}class Sy{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const n=[];for(let o=1;o<t.length-1;o+=2){const r=e.parse(t[o],o,Bd);if(!r)return null;const s=e.parse(t[o+1],o+1,i);if(!s)return null;n.push([r,s]),i=i||s.type}const r=e.parse(t[t.length-1],t.length-1,i);return r?new Sy(i,n,r):null}evaluate(t){for(const[e,i]of this.branches)if(e.evaluate(t))return i.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,i]of this.branches)t(e),t(i);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class Cy{constructor(t,e,i,n){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,Vd),n=e.parse(t[2],2,Gd);if(!i||!n)return null;if(!Jd(i.type,[Yd(Vd),Nd,Vd]))return e.error(`Expected first argument to be of type array or string, but found ${Zd(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,Gd);return r?new Cy(i.type,i,n,r):null}return new Cy(i.type,i,n)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!Qd(e,["string","array"]))throw new pf(`Expected first argument to be of type array or string, but found ${Zd(uf(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(i,n)}return e.slice(i)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function Ty(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Ey(t,e,i,n){return 0===n.compare(e,i)}function ky(t,e,i){const n="=="!==t&&"!="!==t;return class r{constructor(t,e,i){this.type=Bd,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let o=e.parse(t[1],1,Vd);if(!o)return null;if(!Ty(i,o.type))return e.concat(1).error(`"${i}" comparisons are not supported for type '${Zd(o.type)}'.`);let s=e.parse(t[2],2,Vd);if(!s)return null;if(!Ty(i,s.type))return e.concat(2).error(`"${i}" comparisons are not supported for type '${Zd(s.type)}'.`);if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error(`Cannot compare types '${Zd(o.type)}' and '${Zd(s.type)}'.`);n&&("value"===o.type.kind&&"value"!==s.type.kind?o=new ff(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new ff(o.type,[s])));let a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error("Cannot use collator to compare non-string types.");if(a=e.parse(t[3],3,Ud),!a)return null}return new r(o,s,a)}evaluate(r){const o=this.lhs.evaluate(r),s=this.rhs.evaluate(r);if(n&&this.hasUntypedArgument){const e=uf(o),i=uf(s);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new pf(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${i.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=uf(o),i=uf(s);if("string"!==t.kind||"string"!==i.kind)return e(r,o,s)}return this.collator?i(r,o,s,this.collator.evaluate(r)):e(r,o,s)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Py=ky("==",(function(t,e,i){return e===i}),Ey),Oy=ky("!=",(function(t,e,i){return e!==i}),(function(t,e,i,n){return!Ey(0,e,i,n)})),Ry=ky("<",(function(t,e,i){return e<i}),(function(t,e,i,n){return n.compare(e,i)<0})),Iy=ky(">",(function(t,e,i){return e>i}),(function(t,e,i,n){return n.compare(e,i)>0})),Fy=ky("<=",(function(t,e,i){return e<=i}),(function(t,e,i,n){return n.compare(e,i)<=0})),jy=ky(">=",(function(t,e,i){return e>=i}),(function(t,e,i,n){return n.compare(e,i)>=0}));class My{constructor(t,e,i,n,r){this.type=Nd,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,Gd);if(!i)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let r=null;if(n.locale&&(r=e.parse(n.locale,1,Nd),!r))return null;let o=null;if(n.currency&&(o=e.parse(n.currency,1,Nd),!o))return null;let s=null;if(n["min-fraction-digits"]&&(s=e.parse(n["min-fraction-digits"],1,Gd),!s))return null;let a=null;return n["max-fraction-digits"]&&(a=e.parse(n["max-fraction-digits"],1,Gd),!a)?null:new My(i,r,o,s,a)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class Ay{constructor(t){this.type=Gd,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error(`Expected argument of type string or array, but found ${Zd(i.type)} instead.`):new Ay(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new pf(`Expected value to be of type string or array, but found ${Zd(uf(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Ly={"==":Py,"!=":Oy,">":Iy,"<":Ry,">=":jy,"<=":Fy,array:ff,at:_y,boolean:ff,case:Sy,coalesce:my,collator:wf,format:yf,image:gf,in:xy,"index-of":by,interpolate:yy,"interpolate-hcl":yy,"interpolate-lab":yy,length:Ay,let:vy,literal:cf,match:wy,number:ff,"number-format":My,object:ff,slice:Cy,step:Yf,string:ff,"to-boolean":vf,"to-color":vf,"to-number":vf,"to-string":vf,var:Vf,within:Nf};function zy(t,[e,i,n,r]){e=e.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);const o=r?r.evaluate(t):1,s=af(e,i,n,o);if(s)throw new pf(s);return new ef(e/255*o,i/255*o,n/255*o,o)}function Dy(t,e){return t in e}function Gy(t,e){const i=e[t];return void 0===i?null:i}function Ny(t){return{type:t}}function By(t){return{result:"success",value:t}}function Wy(t){return{result:"error",value:t}}function qy(t){return!!t.expression&&t.expression.interpolated}function Vy(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}bf.register(Ly,{error:[{kind:"error"},[Nd],(t,[e])=>{throw new pf(e.evaluate(t))}],typeof:[Nd,[Vd],(t,[e])=>Zd(uf(e.evaluate(t)))],"to-rgba":[Yd(Gd,4),[Wd],(t,[e])=>e.evaluate(t).toArray()],rgb:[Wd,[Gd,Gd,Gd],zy],rgba:[Wd,[Gd,Gd,Gd,Gd],zy],has:{type:Bd,overloads:[[[Nd],(t,[e])=>Dy(e.evaluate(t),t.properties())],[[Nd,qd],(t,[e,i])=>Dy(e.evaluate(t),i.evaluate(t))]]},get:{type:Vd,overloads:[[[Nd],(t,[e])=>Gy(e.evaluate(t),t.properties())],[[Nd,qd],(t,[e,i])=>Gy(e.evaluate(t),i.evaluate(t))]]},"feature-state":[Vd,[Nd],(t,[e])=>Gy(e.evaluate(t),t.featureState||{})],properties:[qd,[],t=>t.properties()],"geometry-type":[Nd,[],t=>t.geometryType()],id:[Vd,[],t=>t.id()],zoom:[Gd,[],t=>t.globals.zoom],"heatmap-density":[Gd,[],t=>t.globals.heatmapDensity||0],"line-progress":[Gd,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[Gd,[],t=>t.globals.skyRadialProgress||0],accumulated:[Vd,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[Gd,Ny(Gd),(t,e)=>{let i=0;for(const n of e)i+=n.evaluate(t);return i}],"*":[Gd,Ny(Gd),(t,e)=>{let i=1;for(const n of e)i*=n.evaluate(t);return i}],"-":{type:Gd,overloads:[[[Gd,Gd],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[Gd],(t,[e])=>-e.evaluate(t)]]},"/":[Gd,[Gd,Gd],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[Gd,[Gd,Gd],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[Gd,[],()=>Math.LN2],pi:[Gd,[],()=>Math.PI],e:[Gd,[],()=>Math.E],"^":[Gd,[Gd,Gd],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[Gd,[Gd],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[Gd,[Gd],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[Gd,[Gd],(t,[e])=>Math.log(e.evaluate(t))],log2:[Gd,[Gd],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[Gd,[Gd],(t,[e])=>Math.sin(e.evaluate(t))],cos:[Gd,[Gd],(t,[e])=>Math.cos(e.evaluate(t))],tan:[Gd,[Gd],(t,[e])=>Math.tan(e.evaluate(t))],asin:[Gd,[Gd],(t,[e])=>Math.asin(e.evaluate(t))],acos:[Gd,[Gd],(t,[e])=>Math.acos(e.evaluate(t))],atan:[Gd,[Gd],(t,[e])=>Math.atan(e.evaluate(t))],min:[Gd,Ny(Gd),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[Gd,Ny(Gd),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[Gd,[Gd],(t,[e])=>Math.abs(e.evaluate(t))],round:[Gd,[Gd],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Gd,[Gd],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[Gd,[Gd],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[Bd,[Nd,Vd],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[Bd,[Vd],(t,[e])=>t.id()===e.value],"filter-type-==":[Bd,[Nd],(t,[e])=>t.geometryType()===e.value],"filter-<":[Bd,[Nd,Vd],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n<r}],"filter-id-<":[Bd,[Vd],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i<n}],"filter->":[Bd,[Nd,Vd],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>r}],"filter-id->":[Bd,[Vd],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>n}],"filter-<=":[Bd,[Nd,Vd],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n<=r}],"filter-id-<=":[Bd,[Vd],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i<=n}],"filter->=":[Bd,[Nd,Vd],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>=r}],"filter-id->=":[Bd,[Vd],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>=n}],"filter-has":[Bd,[Vd],(t,[e])=>e.value in t.properties()],"filter-has-id":[Bd,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[Bd,[Yd(Nd)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[Bd,[Yd(Vd)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[Bd,[Nd,Yd(Vd)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[Bd,[Nd,Yd(Vd)],(t,[e,i])=>function(t,e,i,n){for(;i<=n;){const r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:Bd,overloads:[[[Bd,Bd],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[Ny(Bd),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:Bd,overloads:[[[Bd,Bd],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[Ny(Bd),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[Bd,[Bd],(t,[e])=>!e.evaluate(t)],"is-supported-script":[Bd,[Nd],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[Nd,[Nd],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[Nd,[Nd],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[Nd,Ny(Vd),(t,e)=>e.map((e=>hf(e.evaluate(t)))).join("")],"resolved-locale":[Nd,[Ud],(t,[e])=>e.evaluate(t).resolvedLocale()]});class Uy{constructor(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new xf,this._defaultValue=e?"color"===(i=e).type&&Vy(i.default)?new ef(0,0,0,0):"color"===i.type?ef.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,n,r,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new pf(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!=typeof console&&console.warn(s.message)),this._defaultValue}}}function Xy(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ly}function Ky(t,e){const i=new Uf(Ly,[],e?function(t){const e={color:Wd,string:Nd,number:Gd,enum:Nd,boolean:Bd,formatted:Xd,resolvedImage:Kd};if("array"===t.type)return Yd(e[t.value]||Vd,t.length);return e[t.type]}(e):void 0),n=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?By(new Uy(n,e)):Wy(i.errors)}class Yy{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Wf(e.expression)}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,o)}evaluate(t,e,i,n,r,o){return this._styleExpression.evaluate(t,e,i,n,r,o)}}class Zy{constructor(t,e,i,n){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Wf(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,o)}evaluate(t,e,i,n,r,o){return this._styleExpression.evaluate(t,e,i,n,r,o)}interpolationFactor(t,e,i){return this.interpolationType?yy.interpolationFactor(this.interpolationType,t,e,i):0}}function Hy(t,e){if("error"===(t=Ky(t,e)).result)return t;const i=t.value.expression,n=Bf(i);if(!n&&("data-driven"!==(r=e)["property-type"]&&"cross-faded-data-driven"!==r["property-type"]))return Wy([new Ld("","data expressions not supported")]);var r;const o=qf(i,["zoom"]);if(!o&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return Wy([new Ld("","zoom expressions not supported")]);const s=$y(i);if(!s&&!o)return Wy([new Ld("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof Ld)return Wy([s]);if(s instanceof yy&&!qy(e))return Wy([new Ld("",'"interpolate" expressions cannot be used with this property')]);if(!s)return By(new Yy(n?"constant":"source",t.value));const a=s instanceof yy?s.interpolation:void 0;return By(new Zy(n?"camera":"composite",t.value,s.labels,a))}function $y(t){let e=null;if(t instanceof vy)e=$y(t.result);else if(t instanceof my){for(const i of t.args)if(e=$y(i),e)break}else(t instanceof Yf||t instanceof yy)&&t.input instanceof bf&&"zoom"===t.input.name&&(e=t);return e instanceof Ld||t.eachChild((t=>{const i=$y(t);i instanceof Ld?e=i:!e&&i?e=new Ld("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new Ld("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function Jy(t){return"object"==typeof t?["literal",t]:t}function Qy(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function tg(t,e){const i=Jy((n=t.default,r=e.default,void 0!==n?n:void 0!==r?r:void 0));var n,r;return void 0===i&&"resolvedImage"===e.type?"":i}function eg(t,e,i){const n=rg(t,e),r=["get",t.property];if("categorical"===n&&"boolean"==typeof i[0][0]){const n=["case"];for(const t of i)n.push(["==",r,t[0]],t[1]);return n.push(tg(t,e)),n}if("categorical"===n){const n=["match",r];for(const t of i)ng(n,t[0],t[1],!1);return n.push(tg(t,e)),n}if("interval"===n){const e=["step",["number",r]];for(const t of i)ng(e,t[0],t[1],!0);return ig(e),void 0===t.default?e:["case",["==",["typeof",r],"number"],e,Jy(t.default)]}if("exponential"===n){const e=void 0!==t.base?t.base:1,n=[Qy(t),1===e?["linear"]:["exponential",e],["number",r]];for(const t of i)ng(n,t[0],t[1],!1);return void 0===t.default?n:["case",["==",["typeof",r],"number"],n,Jy(t.default)]}throw new Error(`Unknown property function type ${n}`)}function ig(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function ng(t,e,i,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(i))}function rg(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function og(t){const e=["concat"],i=/{([^{}]+)}/g;let n=0;for(let r=i.exec(t);null!==r;r=i.exec(t)){const o=t.slice(n,i.lastIndex-r[0].length);n=i.lastIndex,o.length>0&&e.push(o),e.push(["get",r[1]])}if(1===e.length)return t;if(n<t.length)e.push(t.slice(n));else if(2===e.length)return["to-string",e[1]];return e}function sg(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!sg(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}const ag={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function lg(t){if(null==t)return{filter:()=>!0,needGeometry:!1};sg(t)||(t=cg(t));const e=Ky(t,ag);if("error"===e.result)throw new Error(e.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return{filter:(t,i,n)=>e.value.evaluate(t,i,{},n),needGeometry:hg(t)}}function ug(t,e){return t<e?-1:t>e?1:0}function hg(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e<t.length;e++)if(hg(t[e]))return!0;return!1}function cg(t){if(!t)return!0;const e=t[0];if(t.length<=1)return"any"!==e;var i;return"=="===e?pg(t[1],t[2],"=="):"!="===e?yg(pg(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?pg(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(cg))):"all"===e?["all"].concat(t.slice(1).map(cg)):"none"===e?["all"].concat(t.slice(1).map(cg).map(yg)):"in"===e?dg(t[1],t.slice(2)):"!in"===e?yg(dg(t[1],t.slice(2))):"has"===e?fg(t[1]):"!has"===e?yg(fg(t[1])):"within"!==e||t}function pg(t,e,i){switch(t){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,t,e]}}function dg(t,e){if(0===e.length)return!1;switch(t){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",t,["literal",e.sort(ug)]]:["filter-in-small",t,["literal",e]]}}function fg(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function yg(t){return["!",t]}var gg=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function mg(t,e){const i={};for(const n in t)"ref"!==n&&(i[n]=t[n]);return gg.forEach((t=>{t in e&&(i[t]=e[t])})),i}Id((function(t,e){var i=function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,12],i=[1,13],n=[1,9],r=[1,10],o=[1,11],s=[1,14],a=[1,15],l=[14,18,22,24],u=[18,22],h=[22,24],c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[a-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[a-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,12:1,13:2,15:7,16:8,17:s,23:a},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:23,15:7,16:8,17:s,23:a,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(u,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:30,15:7,16:8,17:s,23:a},t(l,[2,19]),{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:31,15:7,16:8,17:s,23:a},t(u,[2,17]),t(u,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,i=[0],n=[null],r=[],o=this.table,s="",a=0,l=0,u=2,h=1,c=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||h)&&(t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,_,x,b,w,S,C,T,E={};;){if(_=i[i.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==v&&(v=m()),x=o[_]&&o[_][v]),void 0===x||!x.length||!x[0]){var k="";for(w in T=[],o[_])this.terminals_[w]&&w>u&&T.push("'"+this.terminals_[w]+"'");k=p.showPosition?"Parse error on line "+(a+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(a+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(k,{text:p.match,token:this.terminals_[v]||v,line:p.yylineno,loc:y,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+v);switch(x[0]){case 1:i.push(v),n.push(p.yytext),r.push(p.yylloc),i.push(x[1]),v=null,l=p.yyleng,s=p.yytext,a=p.yylineno,y=p.yylloc;break;case 2:if(S=this.productions_[x[1]][1],E.$=n[n.length-S],E._$={first_line:r[r.length-(S||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(S||1)].first_column,last_column:r[r.length-1].last_column},g&&(E._$.range=[r[r.length-(S||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(E,[s,l,a,d.yy,x[1],n,r].concat(c))))return b;S&&(i=i.slice(0,-1*S*2),n=n.slice(0,-1*S),r=r.slice(0,-1*S)),i.push(this.productions_[x[1]][0]),n.push(E.$),r.push(E._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;o<r.length;o++)if((i=this._input.match(this.rules[r[o]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,i,n){switch(i){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return c.lexer=p,d.prototype=c,c.Parser=d,new d}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)}}));const vg=Xy,_g=Hy,xg=function(t,e){let i=t.stops;if(!i)return function(t,e){const i=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",i]:i;if("enum"===e.type)return["match",i,Object.keys(e.values),i,t.default];{const n=["color"===e.type?"to-color":e.type,i,Jy(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}}(t,e);const n=i&&"object"==typeof i[0][0],r=n||void 0!==t.property,o=n||!r;return i=i.map((t=>!r&&e.tokens&&"string"==typeof t[1]?[t[0],og(t[1])]:[t[0],Jy(t[1])])),n?function(t,e,i){const n={},r={},o=[];for(let s=0;s<i.length;s++){const e=i[s],a=e[0].zoom;void 0===n[a]&&(n[a]={zoom:a,type:t.type,property:t.property,default:t.default},r[a]=[],o.push(a)),r[a].push([e[0].value,e[1]])}if("exponential"===rg({},e)){const i=[Qy(t),["linear"],["zoom"]];for(const t of o){ng(i,t,eg(n[t],e,r[t]),!1)}return i}{const t=["step",["zoom"]];for(const i of o){ng(t,i,eg(n[i],e,r[i]),!0)}return ig(t),t}}(t,e,i):o?function(t,e,i,n=["zoom"]){const r=rg(t,e);let o,s=!1;if("interval"===r)o=["step",n],s=!0;else{if("exponential"!==r)throw new Error(`Unknown zoom function type "${r}"`);{const e=void 0!==t.base?t.base:1;o=[Qy(t),1===e?["linear"]:["exponential",e],n]}}for(const a of i)ng(o,a[0],a[1],s);return ig(o),o}(t,e,i):eg(t,e,i)},bg=Vy;function wg(t){return t*Math.PI/180}var Sg=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function Cg(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var i=document.createElement("canvas");return i.width=t,i.height=e,i}var Tg,Eg=Array(256).join(" ");function kg(t,e){if(e>=.05){for(var i="",n=t.split("\n"),r=Eg.slice(0,Math.round(e/.1)),o=0,s=n.length;o<s;++o)o>0&&(i+="\n"),i+=n[o].split("").join(r);return i}return t}function Pg(){return Tg||(Tg=Cg(1,1).getContext("2d")),Tg}function Og(t,e){return Pg().measureText(t).width+(t.length-1)*e}var Rg={};function Ig(t,e,i,n){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),o=[],s=0,a=r.length;s<a;++s)o.push(Ig(r[s],e,i,n));return o.join("\n")}var l=i+","+e+","+t+","+n,u=Rg[l];if(!u){var h=t.split(" ");if(h.length>1){var c=Pg();c.font=e;var p=c.measureText("M").width*i,d="";for(o=[],s=0,a=h.length;s<a;++s){var f=h[s],y=d+(d?" ":"")+f;Og(y,n)<=p?d=y:(d&&o.push(d),d=f)}d&&o.push(d);for(s=0,a=o.length;s<a&&a>1;++s){var g=o[s];if(Og(g,n)<.35*p){var m=s>0?Og(o[s-1],n):1/0,v=s<a-1?Og(o[s+1],n):1/0;o.splice(s,1),a-=1,m<v?(o[s-1]+=" "+g,s-=1):o[s]=g+" "+o[s]}}for(s=0,a=o.length-1;s<a;++s){var _=o[s],x=o[s+1];if(Og(_,n)>.7*p&&Og(x,n)<.6*p){var b=_.split(" "),w=b.pop();Og(w,n)<.2*p&&(o[s]=b.join(" "),o[s+1]=w+" "+x),a-=1}}u=o.join("\n")}else u=t;u=kg(u,n),Rg[l]=u}return u}Ur&&At(Ur,Tt,(function(){Rg={}}));var Fg,jg,Mg=bg,Ag=xg,Lg=vg,zg=_g,Dg={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Gg={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]},Ng={},Bg={zoom:0},Wg={};function qg(t,e,i,n,r){var o=t.id;Wg[o]||(Wg[o]={});var s=Wg[o];if(!s[i]){var a=(t[e]||Ng)[i],l=Od[e+"_"+t.type][i];void 0===a&&(a=l.default);var u=Lg(a);if(!u&&Mg(a)&&(a=Ag(a,l),u=!0),u){var h=function(t,e){var i=zg(t,e);if("error"===i.result)throw new Error(i.value.map((function(t){return t.key+": "+t.message})).join(", "));return i.value}(a,l);s[i]=h.evaluate.bind(h)}else"color"==l.type&&(a=ef.parse(a)),s[i]=function(){return a}}return Bg.zoom=n,s[i](Bg,r)}var Vg={};function Ug(t,e){if(t){if(0===t.a||0===e)return;var i=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*e+")"}return t}var Xg=/^([^]*)\{(.*)\}([^]*)$/;function Kg(t,e){var i;do{if(i=t.match(Xg)){var n=e[i[2]]||"";t=i[1]+n+i[3]}}while(i);return t}function Yg(t,e,i,n,r,o,s){if(void 0===n&&(n=Sg),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var a,l;if(o)if("undefined"!=typeof Image){var u=new Image;u.crossOrigin="anonymous",u.onload=function(){a=u,l=[u.width,u.height],t.changed(),u.onload=null},u.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,l=[a.width,a.height])}))}for(var c,p=function(t){t=t.slice();const e=Object.create(null);for(let i=0;i<t.length;i++)e[t[i].id]=t[i];for(let i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=mg(t[i],e[t[i].ref]));return t}(e.layers),d={},f=[],y=0,g=p.length;y<g;++y){var m=p[y],v=m.id;if("string"==typeof i&&m.source==i||-1!==i.indexOf(v)){var _=m["source-layer"];if(!c){c=m.source;var x=e.sources[c];if(!x)throw new Error('Source "'+c+'" is not defined');var b=x.type;if("vector"!==b&&"geojson"!==b)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+b+'"')}var w=d[_];w||(w=[],d[_]=w),w.push({layer:m,index:y}),f.push(v)}delete Wg[v],delete Vg[v]}var S=new el,C=new Ma,T={},E={},k=[],P=function(t,e){var i=t.getProperties(),o=d[i.layer];if(o){var u=n.indexOf(e);-1==u&&(u=function(t,e){for(var i=0,n=e.length;i<n;++i)if(e[i]<t&&i+1<n){var r=e[i]/e[i+1];return i+Math.log(e[i]/t)/Math.log(r)}return n-1}(e,n));for(var h=Dg[t.getGeometry().getType()],c={properties:i,type:h},p=-1,f=function(n,d){var f=o[n],y=f.layer,g=y.id,m=y.layout||Ng,v=y.paint||Ng;if("none"===m.visibility||"minzoom"in y&&u<y.minzoom||"maxzoom"in y&&u>=y.maxzoom)return"continue";var _=y.filter;if(!_||function(t,e,i,n){return t in Vg||(Vg[t]=lg(e).filter),Bg.zoom=n,Vg[t](Bg,i)}(g,_,c,u)){var x=void 0,b=void 0,w=void 0,P=void 0,O=void 0,R=void 0,I=f.index;if(3==h&&("fill"==y.type||"fill-extrusion"==y.type))if(b=qg(y,"paint",y.type+"-opacity",u,c),y.type+"-pattern"in v){var F=qg(y,"paint",y.type+"-pattern",u,c);if(F){var j="string"==typeof F?Kg(F,i):F.toString();if(a&&r&&r[j]){++p,(R=k[p])&&R.getFill()&&!R.getStroke()&&!R.getText()||(R=new pl({fill:new Ma}),k[p]=R),w=R.getFill(),R.setZIndex(I);var M=E[lt=j+"."+b];if(!M)(ct=(ht=Cg((ut=r[j]).width,ut.height)).getContext("2d")).globalAlpha=b,ct.drawImage(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height),M=ct.createPattern(ht,"repeat"),E[lt]=M;w.setColor(M)}}}else(x=Ug(qg(y,"paint",y.type+"-color",u,c),b))&&(y.type+"-outline-color"in v&&(O=Ug(qg(y,"paint",y.type+"-outline-color",u,c),b)),O||(O=x),++p,(R=k[p])&&R.getFill()&&R.getStroke()&&!R.getText()||(R=new pl({fill:new Ma,stroke:new el}),k[p]=R),(w=R.getFill()).setColor(x),(P=R.getStroke()).setColor(O),P.setWidth(1),R.setZIndex(I));if(1!=h&&"line"==y.type){x=!("line-pattern"in v)&&"line-color"in v?Ug(qg(y,"paint","line-color",u,c),qg(y,"paint","line-opacity",u,c)):void 0;var A=qg(y,"paint","line-width",u,c);x&&A>0&&(++p,(R=k[p])&&R.getStroke()&&!R.getFill()&&!R.getText()||(R=new pl({stroke:new el}),k[p]=R),(P=R.getStroke()).setLineCap(qg(y,"layout","line-cap",u,c)),P.setLineJoin(qg(y,"layout","line-join",u,c)),P.setMiterLimit(qg(y,"layout","line-miter-limit",u,c)),P.setColor(x),P.setWidth(A),P.setLineDash(v["line-dasharray"]?qg(y,"paint","line-dasharray",u,c).map((function(t){return t*A})):null),R.setZIndex(I))}var L=!1,z=null,D=0,G=void 0,N=void 0,B=void 0;if((1==h||2==h)&&"icon-image"in m){var W=qg(y,"layout","icon-image",u,c);if(W){G="string"==typeof W?Kg(W,i):W.toString();var q=void 0;if(a&&r&&r[G]){var V=qg(y,"layout","icon-rotation-alignment",u,c);if(2==h){var U=t.getGeometry();if(U.getFlatMidpoint||U.getFlatMidpoints){var X=U.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/e,2),Math.pow((X[3]-X[1])/e,2)))>150){var K="MultiLineString"===U.getType()?U.getFlatMidpoints():U.getFlatMidpoint();if(jg||(jg=new Nl("Point",Fg=[NaN,NaN],[],{},null)),q=jg,Fg[0]=K[0],Fg[1]=K[1],"line"===(It=qg(y,"layout","symbol-placement",u,c))&&"map"===V)for(var Y=U.getStride(),Z=U.getFlatCoordinates(),H=0,$=Z.length-Y;H<$;H+=Y){var J=Z[H],Q=Z[H+1],tt=Z[H+Y],et=Z[H+Y+1],it=Math.min(J,tt),nt=Math.min(Q,et),rt=Math.max(J,tt),ot=Math.max(Q,et);if(K[0]>=it&&K[0]<=rt&&K[1]>=nt&&K[1]<=ot){D=Math.atan2(Q-et,tt-J);break}}}}}if(2!==h||q){var st=qg(y,"layout","icon-size",u,c),at=void 0!==v["icon-color"]?qg(y,"paint","icon-color",u,c):null;if(!at||0!==at.a){var lt=G+"."+st;if(null!==at&&(lt+="."+at),!(N=T[lt])){var ut=r[G];if(null!==at){var ht,ct;(ct=(ht=Cg(ut.width,ut.height)).getContext("2d")).drawImage(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height);for(var pt=ct.getImageData(0,0,ht.width,ht.height),dt=0,ft=pt.data.length;dt<ft;dt+=4){var yt=at.a;0!==yt&&(pt.data[dt]=255*at.r/yt,pt.data[dt+1]=255*at.g/yt,pt.data[dt+2]=255*at.b/yt),pt.data[dt+3]=yt}ct.putImageData(pt,0,0),N=new tl({img:ht,imgSize:[ht.width,ht.height],scale:st/ut.pixelRatio}),T[lt]=N}else N=new tl({img:a,imgSize:l,size:[ut.width,ut.height],offset:[ut.x,ut.y],rotateWithView:"map"===V,scale:st/ut.pixelRatio}),T[lt]=N}}N&&(++p,(R=k[p])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new pl,k[p]=R),R.setGeometry(q),N.setRotation(D+wg(qg(y,"layout","icon-rotate",u,c))),N.setOpacity(qg(y,"paint","icon-opacity",u,c)),N.setAnchor(Gg[qg(y,"layout","icon-anchor",u,c)]),R.setImage(N),z=R.getText(),R.setText(void 0),R.setZIndex(I),L=!0,B=!1)}else B=!0}}}if(1==h&&"circle-radius"in v){++p,(R=k[p])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new pl,k[p]=R);var gt=qg(y,"paint","circle-radius",u,c),mt=Ug(qg(y,"paint","circle-stroke-color",u,c),qg(y,"paint","circle-stroke-opacity",u,c)),vt=Ug(qg(y,"paint","circle-color",u,c),qg(y,"paint","circle-opacity",u,c)),_t=qg(y,"paint","circle-stroke-width",u,c),xt=gt+"."+mt+"."+vt+"."+_t;(N=T[xt])||(N=new sl({radius:gt,stroke:mt&&_t>0?new el({width:_t,color:mt}):void 0,fill:vt?new Ma({color:vt}):void 0}),T[xt]=N),R.setImage(N),z=R.getText(),R.setText(void 0),R.setGeometry(void 0),R.setZIndex(I),L=!0}var bt=void 0;if("text-field"in m)bt=Kg(qg(y,"layout","text-field",u,c).toString(),i).trim(),b=qg(y,"paint","text-opacity",u,c);if(bt&&b&&!B){L||(++p,(R=k[p])&&R.getText()&&!R.getFill()&&!R.getStroke()||(R=new pl,k[p]=R),R.setImage(void 0),R.setGeometry(void 0)),R.getText()||R.setText(z||new yl({padding:[2,2,2,2]})),z=R.getText();var wt=Math.round(qg(y,"layout","text-size",u,c)),St=qg(y,"layout","text-font",u,c),Ct=qg(y,"layout","text-line-height",u,c),Tt=function(t,e,i){var n=Pd[t];if(!n){Array.isArray(t)||(t=[t]);for(var r=400,o="normal",s=[],a=0,l=t.length;a<l;++a){var u=t[a].split(" "),h=u[u.length-1].toLowerCase();for(var c in"normal"==h||"italic"==h||"oblique"==h?(o=h,u.pop(),h=u[u.length-1].toLowerCase()):kd.test(h)&&(h=h.replace(kd,""),o=u[u.length-1].replace(h,"")),Td)if(h==c||h==c.replace("-","")||h==c.replace("-",Ed)){r=Td[c],u.pop();break}"number"==typeof h&&(r=h);var p=u.join(Ed).replace("Klokantech Noto Sans","Noto Sans");-1!==p.indexOf(Ed)&&(p='"'+p+'"'),s.push(p)}n=Pd[t]=[o,r,s]}return n[0]+Ed+n[1]+Ed+e+"px"+(i?"/"+i:"")+Ed+n[2]}(s?s(St):St,wt,Ct),Et=m["text-transform"];"uppercase"==Et?bt=bt.toUpperCase():"lowercase"==Et&&(bt=bt.toLowerCase());var kt=qg(y,"layout","text-max-width",u,c),Pt=qg(y,"layout","text-letter-spacing",u,c),Ot=2==h?kg(bt,Pt):Ig(bt,Tt,kt,Pt);z.setText(Ot),z.setFont(Tt),z.setRotation(wg(qg(y,"layout","text-rotate",u,c)));var Rt=qg(y,"layout","text-anchor",u,c),It=L||1==h?"point":qg(y,"layout","symbol-placement",u,c);z.setPlacement(It);var Ft=qg(y,"paint","text-halo-width",u,c),jt=qg(y,"layout","text-offset",u,c),Mt=qg(y,"paint","text-translate",u,c),At=0,Lt=0;if("point"==It){var zt="center";-1!==Rt.indexOf("left")?(zt="left",Lt=Ft):-1!==Rt.indexOf("right")&&(zt="right",Lt=-Ft),z.setTextAlign(zt);var Dt=qg(y,"layout","text-rotation-alignment",u,c);z.setRotateWithView("map"==Dt)}else z.setMaxAngle(wg(qg(y,"layout","text-max-angle",u,c))*bt.length/Ot.length),z.setTextAlign(),z.setRotateWithView(!1);var Gt="middle";0==Rt.indexOf("bottom")?(Gt="bottom",At=-Ft-.5*(Ct-1)*wt):0==Rt.indexOf("top")&&(Gt="top",At=Ft+.5*(Ct-1)*wt),z.setTextBaseline(Gt),z.setOffsetX(jt[0]*wt+Lt+Mt[0]),z.setOffsetY(jt[1]*wt+At+Mt[1]),C.setColor(Ug(qg(y,"paint","text-color",u,c),b)),z.setFill(C);var Nt=Ug(qg(y,"paint","text-halo-color",u,c),b);if(Nt){S.setColor(Nt),Ft*=2;var Bt=.5*wt;S.setWidth(Ft<=Bt?Ft:Bt),z.setStroke(S)}else z.setStroke(void 0);var Wt=qg(y,"layout","text-padding",u,c),qt=z.getPadding();Wt!==qt[0]&&(qt[0]=Wt,qt[1]=Wt,qt[2]=Wt,qt[3]=Wt),R.setZIndex(I)}}},y=0,g=o.length;y<g;++y)f(y);return p>-1?(k.length=p+1,k):void 0}};return t.setStyle(P),t.set("mapbox-source",c),t.set("mapbox-layers",f),P}var Zg=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hg=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:Bp({extent:Vp(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return Zg(e,t),e}(xd),$g=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Jg='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',Qg=function(t){function e(e){var i,n=e||{};i=void 0!==n.attributions?n.attributions:[Jg];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:r,imageSmoothing:n.imageSmoothing,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:o,wrapX:n.wrapX,zDirection:n.zDirection})||this}return $g(e,t),e}(Hg);const tm=Array.isArray;function em(t,e){if(1===arguments.length)return e=>em(t,e);if(t<1)throw new Error("First argument to splitEvery must be a positive integer");const i=[];let n=0;for(;n<e.length;)i.push(e.slice(n,n+=t));return i}(function t(e,i=[]){return(...n)=>{return(r=[...i,...n]).length>=e.length?e(...r):t(e,r);var r}})((function(t,e,i){if(!tm(i))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=i.length;for(;n<r;)e=t(e,i[n],n,i),n++;return e}))((function t(e,i){return 1===arguments.length?i=>t(e,i):e*i}),1);const im=new Ac({features:[],wrapX:!1}),nm=new vc({source:im,style:new pl({image:new sl({radius:3,fill:new Ma({color:"grey"})})})});function rm(t,e){return em(2,t.getSource().getFeaturesInExtent(e).filter((t=>"Point"!==t.getGeometry().getType())).flatMap((t=>t.flatCoordinates_))).forEach(((t,e)=>{im.addFeature(new oa({geometry:new xs(t),i:e}))}))}const om={color:"#ff0000",width:3},sm=new el(om),am=new el(__spreadProps(__spreadValues({},om),{lineDash:[2,8]})),lm=new Ma({color:"rgba(255, 0, 0, 0.1)"}),um=new rl({stroke:new el({color:"red",width:2}),points:4,radius1:15,radius2:1}),hm=new sl({radius:6,fill:new Ma({color:"#ff0000"})}),cm=new pl({image:new rl({fill:new Ma({color:"#fff"}),stroke:new el({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(t){const e=t.getGeometry().getCoordinates()[0];return new Sa(e)}}),pm=new Ac,dm=new vc({source:pm,style:[new pl({fill:lm,stroke:sm}),cm]});const fm=new op({source:im,pixelTolerance:15});
|
30
|
+
read:function(t,e,i,n,r){var o,s,a=8*r-n-1,l=(1<<a)-1,u=l>>1,h=-7,c=i?r-1:0,p=i?-1:1,d=t[e+c];for(c+=p,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+t[e+c],c+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+c],c+=p,h-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},write:function(t,e,i,n,r,o){var s,a,l,u=8*o-r-1,h=(1<<u)-1,c=h>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,f=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+c>=1?p/l:p*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(e*l-1)*Math.pow(2,r),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,r),s=0));r>=8;t[i+d]=255&a,d+=f,a/=256,r-=8);for(s=s<<r|a,u+=r;u>0;t[i+d]=255&s,d+=f,s/=256,u-=8);t[i+d-f]|=128*y}},_l=bl,xl=vl;function bl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}bl.Varint=0,bl.Fixed64=1,bl.Bytes=2,bl.Fixed32=5;var wl=4294967296,Sl=1/wl,Cl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Tl(t){return t.type===bl.Bytes?t.readVarint()+t.pos:t.pos+1}function El(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function kl(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function Pl(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function Ol(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function Rl(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function Il(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function Fl(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function Ml(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function jl(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function Al(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function Ll(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function Dl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function zl(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function Gl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}bl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,o=this.pos;this.type=7&n,t(r,e,this),this.pos===o&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Dl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Gl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Dl(this.buf,this.pos)+Dl(this.buf,this.pos+4)*wl;return this.pos+=8,t},readSFixed64:function(){var t=Dl(this.buf,this.pos)+Gl(this.buf,this.pos+4)*wl;return this.pos+=8,t},readFloat:function(){var t=xl.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=xl.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,o=i.buf;if(r=o[i.pos++],n=(112&r)>>4,r<128)return El(t,n,e);if(r=o[i.pos++],n|=(127&r)<<3,r<128)return El(t,n,e);if(r=o[i.pos++],n|=(127&r)<<10,r<128)return El(t,n,e);if(r=o[i.pos++],n|=(127&r)<<17,r<128)return El(t,n,e);if(r=o[i.pos++],n|=(127&r)<<24,r<128)return El(t,n,e);if(r=o[i.pos++],n|=(1&r)<<31,r<128)return El(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Cl?function(t,e,i){return Cl.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r<i;){var o,s,a,l=t[r],u=null,h=l>239?4:l>223?3:l>191?2:1;if(r+h>i)break;1===h?l<128&&(u=l):2===h?128==(192&(o=t[r+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===h?(o=t[r+1],s=t[r+2],128==(192&o)&&128==(192&s)&&((u=(15&l)<<12|(63&o)<<6|63&s)<=2047||u>=55296&&u<=57343)&&(u=null)):4===h&&(o=t[r+1],s=t[r+2],a=t[r+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,h=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),r+=h}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==bl.Bytes)return t.push(this.readVarint(e));var i=Tl(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==bl.Bytes)return t.push(this.readSVarint());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==bl.Bytes)return t.push(this.readBoolean());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==bl.Bytes)return t.push(this.readFloat());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==bl.Bytes)return t.push(this.readDouble());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==bl.Bytes)return t.push(this.readFixed32());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==bl.Bytes)return t.push(this.readSFixed32());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==bl.Bytes)return t.push(this.readFixed64());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==bl.Bytes)return t.push(this.readSFixed64());var e=Tl(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===bl.Varint)for(;this.buf[this.pos++]>127;);else if(e===bl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===bl.Fixed32)this.pos+=4;else{if(e!==bl.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),zl(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),zl(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),zl(this.buf,-1&t,this.pos),zl(this.buf,Math.floor(t*Sl),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),zl(this.buf,-1&t,this.pos),zl(this.buf,Math.floor(t*Sl),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,n;t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,o=0;o<e.length;o++){if((n=e.charCodeAt(o))>55295&&n<57344){if(!r){n>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&kl(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),xl.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),xl.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var n=this.pos-i;n>=128&&kl(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,bl.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Pl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ol,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,Fl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Rl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Il,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Ml,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,jl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Al,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Ll,e)},writeBytesField:function(t,e){this.writeTag(t,bl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,bl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,bl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,bl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,bl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,bl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,bl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,bl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,bl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,bl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var Nl=[1,0,0,1,0,0],Bl=function(){function t(t,e,i,n,r){this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=n}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===Tn?nn(this.flatCoordinates_):rn(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=fn(this.getExtent());this.flatInteriorPoints_=Ts(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Ea(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Es(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=ma(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,i=this.ends_,n=0,r=i.length;n<r;++n){var o=i[n],s=ma(t,e,o,2,.5);ct(this.flatMidpoints_,s),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t){var e=(t=Yn(t)).getExtent(),i=t.getWorldExtent();if(e&&i){var n=mn(i)/mn(e);mr(Nl,i[0],i[3],n,-n,0,0,0),Xo(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Nl,this.flatCoordinates_)}},t.prototype.getEnds=function(){return this.ends_},t}();Bl.prototype.getEndss=Bl.prototype.getEnds,Bl.prototype.getFlatCoordinates=Bl.prototype.getOrientedFlatCoordinates;var Wl=Bl,ql=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Vl(t,e,i){if(3===t){var n={keys:[],values:[],features:[]},r=i.readVarint()+i.pos;i.readFields(Ul,n,r),n.length=n.features.length,n.length&&(e[n.name]=n)}}function Ul(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){for(var n=null,r=i.readVarint()+i.pos;i.pos<r;)n=1===(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function Xl(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t)for(var n=i.readVarint()+i.pos;i.pos<n;){var r=e.layer.keys[i.readVarint()],o=e.layer.values[i.readVarint()];e.properties[r]=o}else 3==t?e.type=i.readVarint():4==t&&(e.geometry=i.pos)}function Kl(t,e,i){t.pos=e.features[i];var n=t.readVarint()+t.pos,r={layer:e,type:0,properties:{}};return t.readFields(Xl,r,n),r}var Yl=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.dataProjection=new gi({code:"",units:yi.TILE_PIXELS}),i.featureClass_=n.featureClass?n.featureClass:Wl,i.geometryName_=n.geometryName,i.layerName_=n.layerName?n.layerName:"layer",i.layers_=n.layers?n.layers:null,i.idProperty_=n.idProperty,i.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],i}return ql(e,t),e.prototype.readRawGeometry_=function(t,e,i,n){t.pos=e.geometry;for(var r=t.readVarint()+t.pos,o=1,s=0,a=0,l=0,u=0,h=0;t.pos<r;){if(!s){var c=t.readVarint();o=7&c,s=c>>3}s--,1===o||2===o?(a+=t.readSVarint(),l+=t.readSVarint(),1===o&&u>h&&(n.push(u),h=u),i.push(a,l),u+=2):7===o?u>h&&(i.push(i[h],i[h+1]),u+=2):Pe(!1,59)}u>h&&(n.push(u),h=u)},e.prototype.createFeature_=function(t,e,i){var n,r=e.type;if(0===r)return null;var o,s=e.properties;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;var a=[],l=[];this.readRawGeometry_(t,e,a,l);var u=function(t,e){var i;1===t?i=1===e?Tn:On:2===t?i=1===e?En:Rn:3===t&&(i=Pn);return i}(r,l.length);if(this.featureClass_===Wl)(n=new this.featureClass_(u,a,l,s,o)).transform(i.dataProjection);else{var h=void 0;if(u==Pn){for(var c=[],p=0,d=0,f=0,y=l.length;f<y;++f){var g=l[f];if(Is(a,p,g,2)){if(0===c.length)continue;c[c.length-1].push(l[d])}else c.push(l.slice(d,f+1));d=f+1,p=g}h=c.length>1?new Pa(a,Wo,c):new Ds(a,Wo,l)}else h=u===Tn?new bs(a,Wo):u===En?new ba(a,Wo):u===Pn?new Ds(a,Wo,l):u===On?new Ta(a,Wo):u===Rn?new Sa(a,Wo,l):null;n=new(0,this.featureClass_),this.geometryName_&&n.setGeometryName(this.geometryName_);var m=ua(h,!1,i);n.setGeometry(m),n.setId(o),n.setProperties(s,!0)}return n},e.prototype.getType=function(){return ha},e.prototype.readFeatures=function(t,e){var i=this.layers_,n=this.adaptOptions(e),r=Yn(n.dataProjection);r.setWorldExtent(n.extent),n.dataProjection=r;var o=new _l(t),s=o.readFields(Vl,{}),a=[];for(var l in s)if(!i||-1!=i.indexOf(l)){var u=s[l],h=u?[0,0,u.extent,u.extent]:null;r.setExtent(h);for(var c=0,p=u.length;c<p;++c){var d=Kl(o,u,c);a.push(this.createFeature_(o,d,n))}}return a},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(la),Zl="active",Hl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function $l(t,e,i,n){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==n?n:250,easing:ri})}}var Jl=function(t){function e(e){var i=t.call(this)||this;return i.on,i.once,i.un,e&&e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return Hl(e,t),e.prototype.getActive=function(){return this.get(Zl)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Zl,t)},e.prototype.setMap=function(t){this.map_=t},e}(Xt),Ql=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),tu=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return Ql(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==mo.DBLCLICK){var i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;$l(n.getView(),o,r,this.duration_),i.preventDefault(),e=!0}return!e},e}(Jl),eu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function iu(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]}var nu=function(t){function e(e){var i=this,n=e||{};return i=t.call(this,n)||this,n.handleDownEvent&&(i.handleDownEvent=n.handleDownEvent),n.handleDragEvent&&(i.handleDragEvent=n.handleDragEvent),n.handleMoveEvent&&(i.handleMoveEvent=n.handleMoveEvent),n.handleUpEvent&&(i.handleUpEvent=n.handleUpEvent),n.stopDown&&(i.stopDown=n.stopDown),i.handlingDownUpSequence=!1,i.trackedPointers_={},i.targetPointers=[],i}return eu(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==mo.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==mo.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==mo.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==mo.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===mo.POINTERDOWN||e===mo.POINTERDRAG||e===mo.POINTERUP}(t)){var e=t.originalEvent,i=e.pointerId.toString();t.type==mo.POINTERUP?delete this.trackedPointers_[i]:(t.type==mo.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=vt(this.trackedPointers_)}},e}(Jl);function ru(t){var e=arguments;return function(t){for(var i=!0,n=0,r=e.length;n<r&&(i=i&&e[n](t));++n);return i}}var ou=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},su=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},au=dt,lu=function(t){var e=t.originalEvent;return 0==e.button&&!(Jt&&Qt&&e.ctrlKey)},uu=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},hu=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},cu=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},pu=function(t){var e=t.originalEvent;return Pe(void 0!==e,56),"mouse"==e.pointerType},du=function(t){var e=t.originalEvent;return Pe(void 0!==e,56),e.isPrimary&&0===e.button},fu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),yu=function(t){function e(e){var i=t.call(this,{stopDown:ft})||this,n=e||{};i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1;var r=n.condition?n.condition:ru(uu,du);return i.condition_=n.onFocusOnly?ru(su,r):r,i.noKinetic_=!1,i}return fu(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=iu(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,i=s.getResolution(),e[0]*=i,e[1]*=i,Nn(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-n*Math.cos(r),s[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:ri})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(nu),gu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),mu=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:ft})||this).condition_=n.condition?n.condition:ou,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return gu(e,t),e.prototype.handleDragEvent=function(t){if(pu(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==No){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!pu(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!pu(t)&&(!(!lu(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(nu),vu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_u=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.style.pointerEvents="auto",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return vu(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Ds([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(at),xu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bu="boxstart",wu="boxdrag",Su="boxend",Cu="boxcancel",Tu=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return xu(e,t),e}(ot),Eu=function(t){function e(e){var i=t.call(this)||this;i.on,i.once,i.un;var n=e||{};return i.box_=new _u(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,n.onBoxEnd&&(i.onBoxEnd=n.onBoxEnd),i.startPixel_=null,i.condition_=n.condition?n.condition:lu,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return xu(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Tu(wu,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Tu(e?Su:Cu,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Tu(bu,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(nu),ku=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pu=function(t){function e(e){var i=this,n=e||{},r=n.condition?n.condition:hu;return(i=t.call(this,{condition:r,className:n.className||"ol-dragzoom",minArea:n.minArea})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return ku(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),i=this.getGeometry();if(this.out_){var n=e.rotatedExtentForGeometry(i),r=e.getResolutionForExtentInternal(n),o=e.getResolution()/r;(i=i.clone()).scale(o*o)}e.fitInternal(i,{duration:this.duration_,easing:ri})},e}(Eu),Ou=37,Ru=38,Iu=39,Fu=40,Mu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ju=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.defaultCondition_=function(t){return uu(t)&&cu(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return Mu(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ot){var i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==Fu||n==Ou||n==Iu||n==Ru)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;n==Fu?a=-o:n==Ou?s=-o:n==Iu?s=o:a=o;var l=[s,a];Nn(l,r.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:si,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Jl),Au=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lu=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.condition_=n.condition?n.condition:cu,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return Au(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Ot||t.type==Rt){var i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){var r=t.map,o=n=="+".charCodeAt(0)?this.delta_:-this.delta_;$l(r.getView(),o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e},e}(Jl),Du=function(){function t(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),zu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gu="trackpad",Nu="wheel",Bu=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.constrainResolution_=void 0!==n.constrainResolution&&n.constrainResolution;var r=n.condition?n.condition:au;return i.condition_=n.onFocusOnly?ru(su,r):r,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return zu(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;if(t.type!==jt)return!0;var e,i=t.map,n=t.originalEvent;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==jt&&(e=n.deltaY,$t&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=te),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Gu:Nu);var o=i.getView();if(this.mode_===Gu&&!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(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-Oe(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),$l(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Jl),Wu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),qu=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return Wu(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==No){var l=s.getViewport().getBoundingClientRect(),u=iu(this.targetPointers);u[0]-=l.left,u[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(u),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(nu),Vu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Uu=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return Vu(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var u=a.getViewport().getBoundingClientRect(),h=iu(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(nu),Xu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ku=function(t){function e(e,i,n){var r=t.call(this)||this;if(void 0!==n&&void 0===i)r.setFlatCoordinates(n,e);else{var o=i||0;r.setCenterAndRadius(e,o,n)}return r}return Xu(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=t-r[0],s=e-r[1],a=o*o+s*s;if(a<n){if(0===a)for(var l=0;l<this.stride;++l)i[l]=r[l];else{var u=this.getRadius()/Math.sqrt(a);i[0]=r[0]+u*o,i[1]=r[1]+u*s;for(l=2;l<this.stride;++l)i[l]=r[l]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],r=e-i[1];return n*n+r*r<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return tn(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return Mn},e.prototype.intersectsExtent=function(t){if(wn(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||hn(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var r=1;r<e;++r)n[e+r]=t[r];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,r=ss(n,0,t,this.stride);n[r++]=n[0]+e;for(var o=1,s=this.stride;o<s;++o)n[r++]=n[o];n.length=r,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(Ko(i,0,i.length,n,t,e,i)),this.changed()},e.prototype.translate=function(t,e){var i=this.getCenter(),n=this.getStride();this.setCenter(Yo(i,0,i.length,n,t,e,i)),this.changed()},e}(ts);Ku.prototype.transform;var Yu=Ku;function Zu(t,e,i,n,r){Hu(t,e,i||0,n||t.length-1,r||Ju)}function Hu(t,e,i,n,r){for(;n>i;){if(n-i>600){var o=n-i+1,s=e-i+1,a=Math.log(o),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1);Hu(t,e,Math.max(i,Math.floor(e-s*l/o+u)),Math.min(n,Math.floor(e+(o-s)*l/o+u)),r)}var h=t[e],c=i,p=n;for($u(t,i,e),r(t[n],h)>0&&$u(t,i,n);c<p;){for($u(t,c,p),c++,p--;r(t[c],h)<0;)c++;for(;r(t[p],h)>0;)p--}0===r(t[i],h)?$u(t,i,p):$u(t,++p,n),p<=e&&(i=p+1),e<=p&&(n=p-1)}}function $u(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function Ju(t,e){return t<e?-1:t>e?1:0}class Qu{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!hh(t,e))return i;const n=this.toBBox,r=[];for(;e;){for(let o=0;o<e.children.length;o++){const s=e.children[o],a=e.leaf?n(s):s;hh(t,a)&&(e.leaf?i.push(s):uh(t,a)?this._all(s,i):r.push(s))}e=r.pop()}return i}collides(t){let e=this.data;if(!hh(t,e))return!1;const i=[];for(;e;){for(let n=0;n<e.children.length;n++){const r=e.children[n],o=e.leaf?this.toBBox(r):r;if(hh(t,o)){if(e.leaf||uh(t,o))return!0;i.push(r)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=ch([]),this}remove(t,e){if(!t)return this;let i=this.data;const n=this.toBBox(t),r=[],o=[];let s,a,l;for(;i||r.length;){if(i||(i=r.pop(),a=r[r.length-1],s=o.pop(),l=!0),i.leaf){const n=th(t,i.children,e);if(-1!==n)return i.children.splice(n,1),r.push(i),this._condense(r),this}l||i.leaf||!uh(i,n)?a?(s++,i=a.children[s],l=!1):i=null:(r.push(i),o.push(s),s=0,a=i,i=i.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,n){const r=i-e+1;let o,s=this._maxEntries;if(r<=s)return o=ch(t.slice(e,i+1)),eh(o,this.toBBox),o;n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,n-1))),o=ch([]),o.leaf=!1,o.height=n;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));ph(t,e,i,l,this.compareMinX);for(let u=e;u<=i;u+=l){const e=Math.min(u+l-1,i);ph(t,u,e,a,this.compareMinY);for(let i=u;i<=e;i+=a){const r=Math.min(i+a-1,e);o.children.push(this._build(t,i,r,n-1))}}return eh(o,this.toBBox),o}_chooseSubtree(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let a=0;a<e.children.length;a++){const l=e.children[a],u=sh(l),h=(r=t,o=l,(Math.max(o.maxX,r.maxX)-Math.min(o.minX,r.minX))*(Math.max(o.maxY,r.maxY)-Math.min(o.minY,r.minY))-u);h<s?(s=h,n=u<n?u:n,i=l):h===s&&u<n&&(n=u,i=l)}e=i||e.children[0]}var r,o;return e}_insert(t,e,i){const n=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(n,this.data,e,r);for(o.children.push(t),nh(o,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const o=this._chooseSplitIndex(i,r,n),s=ch(i.children.splice(o,i.children.length-o));s.height=i.height,s.leaf=i.leaf,eh(i,this.toBBox),eh(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)}_splitRoot(t,e){this.data=ch([t,e]),this.data.height=t.height+1,this.data.leaf=!1,eh(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,r=1/0,o=1/0;for(let s=e;s<=i-e;s++){const e=ih(t,0,s,this.toBBox),a=ih(t,s,i,this.toBBox),l=lh(e,a),u=sh(e)+sh(a);l<r?(r=l,n=s,o=u<o?u:o):l===r&&u<o&&(o=u,n=s)}return n||i-e}_chooseSplitAxis(t,e,i){const n=t.leaf?this.compareMinX:rh,r=t.leaf?this.compareMinY:oh;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);const r=this.toBBox,o=ih(t,0,e,r),s=ih(t,i-e,i,r);let a=ah(o)+ah(s);for(let l=e;l<i-e;l++){const e=t.children[l];nh(o,t.leaf?r(e):e),a+=ah(o)}for(let l=i-e-1;l>=e;l--){const e=t.children[l];nh(s,t.leaf?r(e):e),a+=ah(s)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)nh(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():eh(t[i],this.toBBox)}}function th(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function eh(t,e){ih(t,0,t.children.length,e,t)}function ih(t,e,i,n,r){r||(r=ch(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o=e;o<i;o++){const e=t.children[o];nh(r,t.leaf?n(e):e)}return r}function nh(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function rh(t,e){return t.minX-e.minX}function oh(t,e){return t.minY-e.minY}function sh(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function ah(t){return t.maxX-t.minX+(t.maxY-t.minY)}function lh(t,e){const i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,r-i)*Math.max(0,o-n)}function uh(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function hh(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function ch(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ph(t,e,i,n,r){const o=[e,i];for(;o.length;){if((i=o.pop())-(e=o.pop())<=n)continue;const s=e+Math.ceil((i-e)/n/2)*n;Zu(t,s,e,i,r),o.push(e,s,s,i)}}var dh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fh="renderOrder",yh=function(t){function e(e){var i=this,n=e||{},r=gt({},n);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(i=t.call(this,r)||this).declutter_=void 0!==n.declutter&&n.declutter,i.renderBuffer_=void 0!==n.renderBuffer?n.renderBuffer:100,i.style_=null,i.styleFunction_=void 0,i.setStyle(n.style),i.updateWhileAnimating_=void 0!==n.updateWhileAnimating&&n.updateWhileAnimating,i.updateWhileInteracting_=void 0!==n.updateWhileInteracting&&n.updateWhileInteracting,i}return dh(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(fh)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Qu(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(fh,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:cl,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:(Pe("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e}(Ye),gh={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},mh=[gh.FILL],vh=[gh.STROKE],_h=[gh.BEGIN_PATH],xh=[gh.CLOSE_PATH],bh=gh,wh=function(){function t(){}return t.prototype.drawCustom=function(t,e,i,n){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),Sh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ch=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=i,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=n,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Sh(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates,o=r.length,s=0,a=t.length;s<a;s+=e)n[0]=t[s],n[1]=t[s+1],Zi(i,n)&&(r[o++]=n[0],r[o++]=n[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,i,n,r,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(e+=n);var u,h,c,p=t[e],d=t[e+1],f=this.tmpCoordinate_,y=!0;for(u=e+n;u<i;u+=n)f[0]=t[u],f[1]=t[u+1],(c=Ji(l,f))!==h?(y&&(s[a++]=p,s[a++]=d,y=!1),s[a++]=f[0],s[a++]=f[1]):c===Ni?(s[a++]=f[0],s[a++]=f[1],y=!1):y=!0,p=f[0],d=f[1],h=c;return(r&&y||u===e+n)&&(s[a++]=p,s[a++]=d),a},e.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,s=i.length;o<s;++o){var a=i[o],l=this.appendFlatLineCoordinates(t,e,a,n,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,i,n){this.beginGeometry(t,e);var r,o,s,a,l,u=t.getType(),h=t.getStride(),c=this.coordinates.length;switch(u){case In:r=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var d=0,f=p.length;d<f;++d){var y=[];l=this.drawCustomCoordinates_(r,l,p[d],h,y),a.push(y)}this.instructions.push([bh.CUSTOM,c,a,t,i,ys]),this.hitDetectionInstructions.push([bh.CUSTOM,c,a,t,n||i,ys]);break;case Pn:case Rn:s=[],r=u==Pn?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(r,0,t.getEnds(),h,s),this.instructions.push([bh.CUSTOM,c,s,t,i,fs]),this.hitDetectionInstructions.push([bh.CUSTOM,c,s,t,n||i,fs]);break;case En:case Mn:r=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(r,0,r.length,h,!1,!1),this.instructions.push([bh.CUSTOM,c,o,t,i,ds]),this.hitDetectionInstructions.push([bh.CUSTOM,c,o,t,n||i,ds]);break;case On:r=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(r,h))>c&&(this.instructions.push([bh.CUSTOM,c,o,t,i,ds]),this.hitDetectionInstructions.push([bh.CUSTOM,c,o,t,n||i,ds]));break;case Tn:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([bh.CUSTOM,c,o,t,i]),this.hitDetectionInstructions.push([bh.CUSTOM,c,o,t,n||i])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[bh.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[bh.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==bh.END_GEOMETRY?o=t:n==bh.BEGIN_GEOMETRY&&(i[2]=t,ht(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=rl(n||Dr)}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=rl(r||Br);var o=e.getLineCap();i.lineCap=void 0!==o?o:zr;var s=e.getLineDash();i.lineDash=s?s.slice():Gr;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:Nr;var u=e.getWidth();i.lineWidth=void 0!==u?u:1;var h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[bh.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[bh.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!pt(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[bh.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ki(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Xi(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(wh),Th=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Eh=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return Th(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([bh.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([bh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([bh.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,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.declutterImageWithText_]),this.hitDetectionInstructions.push([bh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0]*this.imagePixelRatio_,this.originY_=s[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterImageWithText_=e},e}(Ch),kh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ph=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return kh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),s=[bh.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([bh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Gr,0],_h);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(vh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([bh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],_h);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinates_(s,l,o[u],a);this.hitDetectionInstructions.push(vh),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(vh),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(vh),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(_h)},e}(Ch),Oh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rh=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return Oh(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=i.length;this.instructions.push(_h),this.hitDetectionInstructions.push(_h);for(var l=0;l<a;++l){var u=i[l],h=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,u,n,!0,!s),p=[bh.MOVE_TO_LINE_TO,h,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(xh),this.hitDetectionInstructions.push(xh)),e=u}return o&&(this.instructions.push(mh),this.hitDetectionInstructions.push(mh)),s&&(this.instructions.push(vh),this.hitDetectionInstructions.push(vh)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([bh.SET_FILL_STYLE,Dr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([bh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[bh.CIRCLE,a];this.instructions.push(_h,l),this.hitDetectionInstructions.push(_h,l),void 0!==i.fillStyle&&(this.instructions.push(mh),this.hitDetectionInstructions.push(mh)),void 0!==i.strokeStyle&&(this.instructions.push(vh),this.hitDetectionInstructions.push(vh)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([bh.SET_FILL_STYLE,Dr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([bh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([bh.SET_FILL_STYLE,Dr]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([bh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,u=0,h=o.length;u<h;++u)l=this.drawFlatCoordinatess_(s,l,o[u],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var i=this.coordinates,n=0,r=i.length;n<r;++n)i[n]=hs(i[n],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(Ch);function Ih(t,e,i,n,r){var o,s,a,l,u,h,c,p,d,f=i,y=i,g=0,m=0,v=i;for(o=i;o<n;o+=r){var _=e[o],x=e[o+1];void 0!==l&&(p=_-l,d=x-u,a=Math.sqrt(p*p+d*d),void 0!==h&&(m+=s,Math.acos((h*p+c*d)/(s*a))>t&&(m>g&&(g=m,f=v,y=o),m=0,v=o-r)),s=a,h=p,c=d),l=_,u=x}return(m+=a)>g?[v,o]:[f,y]}var Fh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},jh={Circle:Rh,Default:Ch,Image:Eh,LineString:Ph,Polygon:Rh,Text:function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return Fh(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,u=t.getStride();if(r.placement!==gl||a!=En&&a!=Rn&&a!=Pn&&a!=In){var h=r.overflow?null:[];switch(a){case Tn:case On:l=t.getFlatCoordinates();break;case En:l=t.getFlatMidpoint();break;case Mn:l=t.getCenter();break;case Rn:l=t.getFlatMidpoints(),u=2;break;case Pn:l=t.getFlatInteriorPoint(),r.overflow||h.push(l[2]/this.resolution),u=3;break;case In:var c=t.getFlatInteriorPoints();l=[];for(w=0,S=c.length;w<S;w+=3)r.overflow||h.push(c[w+2]/this.resolution),l.push(c[w],c[w+1]);if(0===l.length)return;u=2}if((R=this.appendFlatPointCoordinates(l,u))===s)return;if(h&&(R-s)/2!=l.length/u){var p=s/2;h=h.filter((function(t,e){var i=o[2*(p+e)]===l[e*u]&&o[2*(p+e)+1]===l[e*u+1];return i||--p,i}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var d=r.padding;if(d!=Vr&&(r.scale[0]<0||r.scale[1]<0)){var f=r.padding[0],y=r.padding[1],g=r.padding[2],m=r.padding[3];r.scale[0]<0&&(y=-y,m=-m),r.scale[1]<0&&(f=-f,g=-g),d=[f,y,g,m]}var v=this.pixelRatio;this.instructions.push([bh.DRAW_IMAGE,s,R,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,d==Vr?Vr:d.map((function(t){return t*v})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);var _=1/v;this.hitDetectionInstructions.push([bh.DRAW_IMAGE,s,R,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,this.declutterImageWithText_,d,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),this.endGeometry(e)}else{if(!wn(this.getBufferedMaxExtent(),t.getExtent()))return;var x=void 0;if(l=t.getFlatCoordinates(),a==En)x=[l.length];else if(a==Rn)x=t.getEnds();else if(a==Pn)x=t.getEnds().slice(0,1);else if(a==In){var b=t.getEndss();x=[];for(var w=0,S=b.length;w<S;++w)x.push(b[w][0])}this.beginGeometry(t,e);for(var C=r.textAlign,T=0,E=void 0,k=0,P=x.length;k<P;++k){if(null==C){var O=Ih(r.maxAngle,l,T,x[k],u);T=O[0],E=O[1]}else E=x[k];for(var w=T;w<E;w+=u)o.push(l[w],l[w+1]);var R=o.length;T=x[k],this.drawChars_(s,R),s=R}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||Wr,textBaseline:e.textBaseline||qr,scale:e.scale});var o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,e){var i=this.textStrokeState_,n=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Mh[n.textBaseline],u=this.textOffsetY_*a,h=this.text_,c=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([bh.DRAW_CHARS,t,e,l,n.overflow,s,n.maxAngle,a,u,r,c*a,h,o,1]),this.hitDetectionInstructions.push([bh.DRAW_CHARS,t,e,l,n.overflow,s,n.maxAngle,1,u,r,c,h,o,1/a])},e.prototype.setTextStyle=function(t,e){var i,n,r;if(t){var o=t.getFill();o?((n=this.textFillState_)||(n={},this.textFillState_=n),n.fillStyle=rl(o.getColor()||Dr)):(n=null,this.textFillState_=n);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),l=s.getLineDashOffset(),u=s.getWidth(),h=s.getMiterLimit();r.lineCap=s.getLineCap()||zr,r.lineDash=a?a.slice():Gr,r.lineDashOffset=void 0===l?0:l,r.lineJoin=s.getLineJoin()||Nr,r.lineWidth=void 0===u?1:u,r.miterLimit=void 0===h?10:h,r.strokeStyle=rl(s.getColor()||Br)}else r=null,this.textStrokeState_=r;i=this.textState_;var c=t.getFont()||Lr;$r(c);var p=t.getScaleArray();i.overflow=t.getOverflow(),i.font=c,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||qr,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Vr,i.scale=void 0===p?[1,1]:p;var d=t.getOffsetX(),f=t.getOffsetY(),y=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===f?0:f,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0===g?0:g,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:qt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+qt(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(Ch)},Ah=function(){function t(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var i=this.buildersByZIndex_[e];for(var n in i){var r=i[n].finish();t[e][n]=r}}return t},t.prototype.getBuilder=function(t,e){var i=void 0!==t?t.toString():"0",n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);var r=n[e];void 0===r&&(r=new(0,jh[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r);return r},t}(),Lh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Dh=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i.declutterExecutorGroup=null,i}return Lh(e,t),e.prototype.getFeatures=function(t){return Bt()},e.prototype.prepareFrame=function(t){return Bt()},e.prototype.renderFrame=function(t,e){return Bt()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){var o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Ua&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Ua&&e!=Xa&&t.addEventListener(St,this.boundHandleImageChange_),e==qa&&(t.load(),e=t.getState()),e==Ua},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Ue&&t.changed()},e}(Nt),zh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gh=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return zh(e,t),e.prototype.useContainer=function(t,e,i){var n,r,o=this.getLayer().getClassName();t&&t.style.opacity===ge(i)&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(r=a.getContext("2d")));if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(n=document.createElement("div")).className=o;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var a=(r=re()).canvas;n.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clipUnrotated=function(t,e,i){var n=_n(i),r=xn(i),o=dn(i),s=pn(i);yr(e.coordinateToPixelTransform,n),yr(e.coordinateToPixelTransform,r),yr(e.coordinateToPixelTransform,o),yr(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;yr(a,n),yr(a,r),yr(a,o),yr(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new Ar(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(Ge,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Ne,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,o,s){var a=r/2,l=o/2,u=n/e,h=-u,c=-t[0]+s,p=-t[1];return mr(this.tempTransform,a,l,u,h,-i,c,p)},e.prototype.getDataAtPixel=function(t,e,i){var n,r=yr(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer().getExtent();if(s&&!Zi(s,yr(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(r[0]),l=Math.round(r[1]),u=document.createElement("canvas"),h=u.getContext("2d");u.width=1,u.height=1,h.clearRect(0,0,1,1),h.drawImage(o.canvas,a,l,1,1,0,0,1,1),n=h.getImageData(0,0,1,1).data}catch(c){return"SecurityError"===c.name?new Uint8Array:n}return 0===n[3]?null:n},e}(Dh),Nh="Circle",Bh="Default",Wh="Image",qh="LineString",Vh="Polygon",Uh="Text";function Xh(t,e,i,n,r,o,s,a,l,u,h,c){var p=t[e],d=t[e+1],f=0,y=0,g=0,m=0;function v(){f=p,y=d,p=t[e+=n],d=t[e+1],m+=g,g=Math.sqrt((p-f)*(p-f)+(d-y)*(d-y))}do{v()}while(e<i-n&&m+g<o);for(var _=0===g?0:(o-m)/g,x=Le(f,p,_),b=Le(y,d,_),w=e-n,S=m,C=o+a*l(u,r,h);e<i-n&&m+g<C;)v();var T,E=Le(f,p,_=0===g?0:(C-m)/g),k=Le(y,d,_);if(c){var P=[x,b,E,k];Ko(P,0,4,2,c,P,P),T=P[0]>P[2]}else T=x>E;var O,R=Math.PI,I=[],F=w+n===e;if(g=0,m=S,p=t[e=w],d=t[e+1],F){v(),O=Math.atan2(d-y,p-f),T&&(O+=O>0?-R:R);var M=(E+x)/2,j=(k+b)/2;return I[0]=[M,j,(C-o)/2,O,r],I}for(var A=0,L=r.length;A<L;){v();var D=Math.atan2(d-y,p-f);if(T&&(D+=D>0?-R:R),void 0!==O){var z=D-O;if(z+=z>R?-2*R:z<-R?2*R:0,Math.abs(z)>s)return null}O=D;for(var G=A,N=0;A<L;++A){var B=a*l(u,r[T?L-A-1:A],h);if(e+n<i&&m+g<o+N+B/2)break;N+=B}if(A!==G){var W=T?r.substring(L-G,L-A):r.substring(G,A);M=Le(f,p,_=0===g?0:(o+N/2-m)/g),j=Le(y,d,_);I.push([M,j,N/2,D,W]),o+=N}}return I}var Kh=[1/0,1/0,-1/0,-1/0],Yh=[],Zh=[],Hh=[],$h=[];function Jh(t){return t[3].declutterBox}var Qh=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function tc(t,e){return"start"!==e&&"end"!==e||Qh.test(t)||(e="start"===e?"left":"right"),Mh[e]}var ec=function(){function t(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var o=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,u=[a.scale[0]*l,a.scale[1]*l],h=tc(t,a.textAlign||Wr),c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),d=p.length,f=[],y=function(t,e,i){for(var n=e.length,r=0,o=0;o<n;++o){var s=to(t,e[o]);r=Math.max(r,s),i.push(s)}return r}(a.font,p,f),g=Jr(a.font),m=y+c,v=[],_=(m+2)*u[0],x=(g*d+c)*u[1],b={width:_<0?Math.floor(_):Math.ceil(_),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:v};(1==u[0]&&1==u[1]||v.push("scale",u),v.push("font",a.font),n)&&(v.push("strokeStyle",o.strokeStyle),v.push("lineWidth",c),v.push("lineCap",o.lineCap),v.push("lineJoin",o.lineJoin),v.push("miterLimit",o.miterLimit),(ee?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[o.lineDash]),v.push("lineDashOffset",o.lineDashOffset)));i&&v.push("fillStyle",s.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var w,S=.5-h,C=h*m+S*c;if(n)for(w=0;w<d;++w)v.push("strokeText",[p[w],C+S*f[w],.5*(c+g)+w*g]);if(i)for(w=0;w<d;++w)v.push("fillText",[p[w],C+S*f[w],.5*(c+g)+w*g]);return this.labels_[r]=b,b},t.prototype.replayTextBackground_=function(t,e,i,n,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,i,n,r,o,s,a,l,u,h,c,p,d,f,y){var g,m=i-(s*=c[0]),v=n-(a*=c[1]),_=r+l>t?t-l:r,x=o+u>e?e-u:o,b=d[3]+_*c[0]+d[1],w=d[0]+x*c[1]+d[2],S=m-d[3],C=v-d[0];return(f||0!==h)&&(Yh[0]=S,$h[0]=S,Yh[1]=C,Zh[1]=C,Zh[0]=S+b,Hh[0]=Zh[0],Hh[1]=C+w,$h[1]=Hh[1]),0!==h?(yr(g=mr([1,0,0,1,0,0],i,n,1,1,h,-i,-n),Yh),yr(g,Zh),yr(g,Hh),yr(g,$h),tn(Math.min(Yh[0],Zh[0],Hh[0],$h[0]),Math.min(Yh[1],Zh[1],Hh[1],$h[1]),Math.max(Yh[0],Zh[0],Hh[0],$h[0]),Math.max(Yh[1],Zh[1],Hh[1],$h[1]),Kh)):tn(Math.min(S,S+b),Math.min(C,C+w),Math.max(S,S+b),Math.max(C,C+w),Kh),p&&(m=Math.round(m),v=Math.round(v)),{drawImageX:m,drawImageY:v,drawImageW:_,drawImageH:x,originX:l,originY:u,declutterBox:{minX:Kh[0],minY:Kh[1],maxX:Kh[2],maxY:Kh[3],value:y},canvasTransform:g,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,i,n,r,o,s){var a=!(!o&&!s),l=n.declutterBox,u=t.canvas,h=s?s[2]*n.scale[0]/2:0;return l.minX-h<=u.width/e&&l.maxX+h>=0&&l.minY-h<=u.height/e&&l.maxY+h>=0&&(a&&this.replayTextBackground_(t,Yh,Zh,Hh,$h,o,s),io(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=yr(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=tc(t,r.textAlign||Wr),u=Mh[r.textBaseline||qr],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*h,anchorY:u*o.height/a+2*(.5-u)*h}},t.prototype.execute_=function(t,e,i,n,r,o,s,a){var l;this.pixelCoordinates_&&pt(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Xo(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),function(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]}(this.renderedTransform_,i));for(var u,h,c,p,d,f,y,g,m,v,_,x,b,w,S,C,T=0,E=n.length,k=0,P=0,O=0,R=null,I=null,F=this.coordinateCache_,M=this.viewRotation_,j=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:M},L=this.instructions!=n||this.overlaps?0:200;T<E;){var D=n[T];switch(D[0]){case bh.BEGIN_GEOMETRY:b=D[1],C=D[3],b.getGeometry()?void 0===s||wn(s,C.getExtent())?++T:T=D[2]+1:T=D[2];break;case bh.BEGIN_PATH:P>L&&(this.fill_(t),P=0),O>L&&(t.stroke(),O=0),P||O||(t.beginPath(),p=NaN,d=NaN),++T;break;case bh.CIRCLE:var z=l[k=D[1]],G=l[k+1],N=l[k+2]-z,B=l[k+3]-G,W=Math.sqrt(N*N+B*B);t.moveTo(z+W,G),t.arc(z,G,W,0,2*Math.PI,!0),++T;break;case bh.CLOSE_PATH:t.closePath(),++T;break;case bh.CUSTOM:k=D[1],u=D[2];var q=D[3],V=D[4],U=6==D.length?D[5]:void 0;A.geometry=q,A.feature=b,T in F||(F[T]=[]);var X=F[T];U?U(l,k,u,2,X):(X[0]=l[k],X[1]=l[k+1],X.length=2),V(X,A),++T;break;case bh.DRAW_IMAGE:k=D[1],u=D[2],g=D[3],h=D[4],c=D[5];var K=D[6],Y=D[7],Z=D[8],H=D[9],$=D[10],J=D[11],Q=D[12],tt=D[13],et=D[14];if(!g&&D.length>=19){m=D[18],v=D[19],_=D[20],x=D[21];var it=this.drawLabelWithPointPlacement_(m,v,_,x);g=it.label,D[3]=g;var nt=D[22];h=(it.anchorX-nt)*this.pixelRatio,D[4]=h;var rt=D[23];c=(it.anchorY-rt)*this.pixelRatio,D[5]=c,K=g.height,D[6]=K,tt=g.width,D[13]=tt}var ot=void 0;D.length>24&&(ot=D[24]);var st=void 0,at=void 0,lt=void 0;D.length>16?(st=D[15],at=D[16],lt=D[17]):(st=Vr,at=!1,lt=!1),$&&j?J+=M:$||j||(J-=M);for(var ut=0;k<u;k+=2)if(!(ot&&ot[ut++]<tt/this.pixelRatio)){var ht=[t,e,g,zt=this.calculateImageOrLabelDimensions_(g.width,g.height,l[k],l[k+1],tt,K,h,c,Z,H,J,Q,r,st,at||lt,b),Y,at?R:null,lt?I:null],ct=void 0,dt=void 0;if(a&&et){var ft=u-k;if(!et[ft]){et[ft]=ht;continue}if(ct=et[ft],delete et[ft],dt=Jh(ct),a.collides(dt))continue}a&&a.collides(zt.declutterBox)||(ct&&(a&&a.insert(dt),this.replayImageOrLabel_.apply(this,ct)),a&&a.insert(zt.declutterBox),this.replayImageOrLabel_.apply(this,ht))}++T;break;case bh.DRAW_CHARS:var yt=D[1],gt=D[2],mt=D[3],vt=D[4];x=D[5];var _t=D[6],xt=D[7],bt=D[8];_=D[9];var wt=D[10];m=D[11],v=D[12];var St=[D[13],D[13]],Ct=this.textStates[v],Tt=Ct.font,Et=[Ct.scale[0]*xt,Ct.scale[1]*xt],kt=void 0;Tt in this.widths_?kt=this.widths_[Tt]:(kt={},this.widths_[Tt]=kt);var Pt=_a(l,yt,gt,2),Ot=Math.abs(Et[0])*eo(Tt,m,kt);if(vt||Ot<=Pt){var Rt=this.textStates[v].textAlign,It=Xh(l,yt,gt,2,m,(Pt-Ot)*Mh[Rt],_t,Math.abs(Et[0]),eo,Tt,kt,j?0:this.viewRotation_);t:if(It){var Ft=[],Mt=void 0,jt=void 0,At=void 0,Lt=void 0,Dt=void 0;if(_)for(Mt=0,jt=It.length;Mt<jt;++Mt){At=(Dt=It[Mt])[4],Lt=this.createLabel(At,v,"",_),h=Dt[2]+(Et[0]<0?-wt:wt),c=mt*Lt.height+2*(.5-mt)*wt*Et[1]/Et[0]-bt;var zt=this.calculateImageOrLabelDimensions_(Lt.width,Lt.height,Dt[0],Dt[1],Lt.width,Lt.height,h,c,0,0,Dt[3],St,!1,Vr,!1,b);if(a&&a.collides(zt.declutterBox))break t;Ft.push([t,e,Lt,zt,1,null,null])}if(x)for(Mt=0,jt=It.length;Mt<jt;++Mt){At=(Dt=It[Mt])[4],Lt=this.createLabel(At,v,x,""),h=Dt[2],c=mt*Lt.height-bt;zt=this.calculateImageOrLabelDimensions_(Lt.width,Lt.height,Dt[0],Dt[1],Lt.width,Lt.height,h,c,0,0,Dt[3],St,!1,Vr,!1,b);if(a&&a.collides(zt.declutterBox))break t;Ft.push([t,e,Lt,zt,1,null,null])}a&&a.load(Ft.map(Jh));for(var Gt=0,Nt=Ft.length;Gt<Nt;++Gt)this.replayImageOrLabel_.apply(this,Ft[Gt])}}++T;break;case bh.END_GEOMETRY:if(void 0!==o){var Bt=o(b=D[1],C);if(Bt)return Bt}++T;break;case bh.FILL:L?P++:this.fill_(t),++T;break;case bh.MOVE_TO_LINE_TO:for(k=D[1],u=D[2],w=l[k],y=(S=l[k+1])+.5|0,(f=w+.5|0)===p&&y===d||(t.moveTo(w,S),p=f,d=y),k+=2;k<u;k+=2)f=(w=l[k])+.5|0,y=(S=l[k+1])+.5|0,k!=u-2&&f===p&&y===d||(t.lineTo(w,S),p=f,d=y);++T;break;case bh.SET_FILL_STYLE:R=D,this.alignFill_=D[2],P&&(this.fill_(t),P=0,O&&(t.stroke(),O=0)),t.fillStyle=D[1],++T;break;case bh.SET_STROKE_STYLE:I=D,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,D),++T;break;case bh.STROKE:L?O++:t.stroke(),++T;break;default:++T}}P&&this.fill_(t),O&&t.stroke()},t.prototype.execute=function(t,e,i,n,r,o){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,r)},t}(),ic=[Vh,Nh,qh,Wh,Uh,Bh],nc=function(){function t(t,e,i,n,r,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}return t.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);var n=t[e];for(var r in n){var o=n[r];i[r]=new ec(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var i=this.executorsByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o){var s=2*(n=Math.round(n))+1,a=mr(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=re(s,s));var u,h=this.hitDetectionContext_;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):l||h.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(an(u=[1/0,1/0,-1/0,-1/0],t),Xi(u,e*(this.renderBuffer_+n),u));var c,p=function(t){if(void 0!==rc[t])return rc[t];for(var e=2*t+1,i=t*t,n=new Array(i+1),r=0;r<=t;++r)for(var o=0;o<=t;++o){var s=r*r+o*o;if(s>i)break;var a=n[s];a||(a=[],n[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],u=(r=0,n.length);r<u;++r)n[r]&&l.push.apply(l,n[r]);return rc[t]=l,l}(n);function d(t,e){for(var i=h.getImageData(0,0,s,s).data,a=0,l=p.length;a<l;a++)if(i[p[a]]>0){if(!o||c!==Wh&&c!==Uh||-1!==o.indexOf(t)){var u=(p[a]-3)/4,d=n-u%s,f=n-(u/s|0),y=r(t,e,d*d+f*f);if(y)return y}h.clearRect(0,0,s,s);break}}var f,y,g,m,v,_=Object.keys(this.executorsByZIndex_).map(Number);for(_.sort(lt),f=_.length-1;f>=0;--f){var x=_[f].toString();for(g=this.executorsByZIndex_[x],y=ic.length-1;y>=0;--y)if(void 0!==(m=g[c=ic[y]])&&(v=m.executeHitDetection(h,a,i,d,u)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return Xo(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return _t(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,n,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(lt),this.maxExtent_&&(t.save(),this.clip(t,i));var l,u,h,c,p,d,f=o||ic;for(s&&a.reverse(),l=0,u=a.length;l<u;++l){var y=a[l].toString();for(p=this.executorsByZIndex_[y],h=0,c=f.length;h<c;++h){void 0!==(d=p[f[h]])&&d.execute(t,e,i,n,r,s)}}this.maxExtent_&&t.restore()},t}(),rc={};var oc=nc,sc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ac=function(t){function e(e,i,n,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=i,l.extent_=n,l.transform_=r,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return sc(e,t),e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=Xo(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var u=0,h=r.length;u<h;u+=2){var c=r[u]-this.imageAnchorX_,p=r[u+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var d=c+this.imageAnchorX_,f=p+this.imageAnchorY_;mr(s,d,f,1,1,l,-d,-f),o.setTransform.apply(o,s),o.translate(d,f),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=Xo(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var u=mr(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,u),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,i,n,r){var o=this.context_,s=Xo(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},e.prototype.drawCircle=function(t){if(wn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return Xo(n,0,n.length,r,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Tn:this.drawPoint(t);break;case En:this.drawLineString(t);break;case Pn:this.drawPolygon(t);break;case On:this.drawMultiPoint(t);break;case Rn:this.drawMultiLineString(t);break;case In:this.drawMultiPolygon(t);break;case Fn:this.drawGeometryCollection(t);break;case Mn:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&wn(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),wn(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(wn(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(n,r,o[a],s,!1);i.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),wn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),wn(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),n=0,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];n=this.drawRings_(i,n,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(pt(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Wr;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var i=this;if(t){var n=t.getColor();this.fillState_={fillStyle:rl(n||Dr)}}else this.fillState_=null;if(e){var r=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),u=e.getWidth(),h=e.getMiterLimit(),c=s||Gr;this.strokeState_={lineCap:void 0!==o?o:zr,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*i.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:Nr,lineWidth:(void 0!==u?u:1)*this.pixelRatio_,miterLimit:void 0!==h?h:10,strokeStyle:rl(r||Br)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var i=t.getAnchor(),n=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:rl(i||Dr)}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),l=n.getLineJoin(),u=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:zr,lineDash:s||Gr,lineDashOffset:a||0,lineJoin:void 0!==l?l:Nr,lineWidth:void 0!==u?u:1,miterLimit:void 0!==h?h:10,strokeStyle:rl(r||Br)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),y=t.getRotation(),g=t.getScaleArray(),m=t.getText(),v=t.getTextAlign(),_=t.getTextBaseline();this.textState_={font:void 0!==c?c:Lr,textAlign:void 0!==v?v:Wr,textBaseline:void 0!==_?_:qr},this.text_=void 0!==m?m:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==y?y:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}else this.text_=""},e}(wh),lc=.5;function uc(t,e,i,n,r,o,s){var a=re(t[0]*lc,t[1]*lc);a.imageSmoothingEnabled=!1;for(var l=a.canvas,u=new ac(a,lc,r,null,s),h=i.length,c=Math.floor(16777215/h),p={},d=1;d<=h;++d){var f=i[d-1],y=f.getStyleFunction()||n;if(n){var g=y(f,o);if(g){Array.isArray(g)||(g=[g]);for(var m="#"+("000000"+(d*c).toString(16)).slice(-6),v=0,_=g.length;v<_;++v){var x=g[v],b=x.getGeometryFunction()(f);if(b&&wn(r,b.getExtent())){var w=x.clone(),S=w.getFill();S&&S.setColor(m);var C=w.getStroke();C&&(C.setColor(m),C.setLineDash(null)),w.setText(void 0);var T=x.getImage();if(T&&0!==T.getOpacity()){var E=T.getImageSize();if(!E)continue;var k=re(E[0],E[1],void 0,{alpha:!1}),P=k.canvas;k.fillStyle=m,k.fillRect(0,0,P.width,P.height),w.setImage(new il({img:P,imgSize:E,anchor:T.getAnchor(),anchorXUnits:za,anchorYUnits:za,offset:T.getOrigin(),opacity:1,size:T.getSize(),scale:T.getScale(),rotation:T.getRotation(),rotateWithView:T.getRotateWithView()}))}var O=w.getZIndex()||0;(F=p[O])||(F={},p[O]=F,F[Pn]=[],F[Mn]=[],F[En]=[],F[Tn]=[]),F[b.getType().replace("Multi","")].push(b,w)}}}}}for(var R=Object.keys(p).map(Number).sort(lt),I=(d=0,R.length);d<I;++d){var F=p[R[d]];for(var M in F){var j=F[M];for(v=0,_=j.length;v<_;v+=2){u.setStyle(j[v+1]);for(var A=0,L=e.length;A<L;++A)u.setTransform(e[A]),u.drawGeometry(j[v])}}}return a.getImageData(0,0,l.width,l.height)}function hc(t,e,i){var n=[];if(i){var r=Math.floor(Math.round(t[0])*lc),o=Math.floor(Math.round(t[1])*lc),s=4*(Oe(r,0,i.width-1)+Oe(o,0,i.height-1)*i.width),a=i.data[s],l=i.data[s+1],u=i.data[s+2]+256*(l+256*a),h=Math.floor(16777215/e.length);u&&u%h==0&&n.push(e[u/h-1])}return n}var cc={Point:function(t,e,i,n,r){var o,s=i.getImage(),a=i.getText();r&&(t=r,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=Ua)return;var l=t.getBuilder(i.getZIndex(),Wh);l.setImageStyle(s,o),l.drawPoint(e,n)}if(a&&a.getText()){var u=t.getBuilder(i.getZIndex(),Uh);u.setTextStyle(a,o),u.drawText(e,n)}},LineString:function(t,e,i,n,r){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),qh);s.setFillStrokeStyle(null,o),s.drawLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),Uh);l.setTextStyle(a),l.drawText(e,n)}},Polygon:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Vh);a.setFillStrokeStyle(o,s),a.drawPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),Uh);u.setTextStyle(l),u.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){var o,s=i.getImage(),a=i.getText();r&&(t=r,o=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=Ua)return;var l=t.getBuilder(i.getZIndex(),Wh);l.setImageStyle(s,o),l.drawMultiPoint(e,n)}if(a&&a.getText()){var u=(r||t).getBuilder(i.getZIndex(),Uh);u.setTextStyle(a,o),u.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),qh);s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,n)}var a=i.getText();if(a&&a.getText()){var l=(r||t).getBuilder(i.getZIndex(),Uh);l.setTextStyle(a),l.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(s||o){var a=t.getBuilder(i.getZIndex(),Vh);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),Uh);u.setTextStyle(l),u.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o){(0,cc[a[o].getType()])(t,a[o],i,n,r)}},Circle:function(t,e,i,n,r){var o=i.getFill(),s=i.getStroke();if(o||s){var a=t.getBuilder(i.getZIndex(),Nh);a.setFillStrokeStyle(o,s),a.drawCircle(e,n)}var l=i.getText();if(l&&l.getText()){var u=(r||t).getBuilder(i.getZIndex(),Uh);u.setTextStyle(l),u.drawText(e,n)}}};function pc(t,e){return parseInt(qt(t),10)-parseInt(qt(e),10)}function dc(t,e){var i=fc(t,e);return i*i}function fc(t,e){return.5*t/e}function yc(t,e,i,n,r,o,s){var a=!1,l=i.getImage();if(l){var u=l.getImageState();u==Ua||u==Xa?l.unlistenImageChange(r):(u==qa&&l.load(),u=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,i,n,r,o){var s=i.getGeometryFunction()(e);if(!s)return;var a=s.simplifyTransformed(n,r);if(i.getRenderer())gc(t,a,i,e);else{(0,cc[a.getType()])(t,a,i,e,o)}}(t,e,i,n,o,s),a}function gc(t,e,i,n){if(e.getType()!=Fn)t.getBuilder(i.getZIndex(),Bh).drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else for(var r=e.getGeometries(),o=0,s=r.length;o<s;++o)gc(t,r[o],i,n)}var mc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),vc=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.animatingOrInteracting_,i.dirty_=!1,i.hitDetectionImageData_=null,i.renderedFeatures_=null,i.renderedRevision_=-1,i.renderedResolution_=NaN,i.renderedExtent_=[1/0,1/0,-1/0,-1/0],i.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],i.renderedRotation_,i.renderedCenter_=null,i.renderedProjection_=null,i.renderedRenderOrder_=null,i.replayGroup_=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i}return mc(e,t),e.prototype.useContainer=function(e,i,n){n<1&&(e=null),t.prototype.useContainer.call(this,e,i,n)},e.prototype.renderWorlds=function(t,e,i){var n=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,u=a.getExtent(),h=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,d=!(p[Oo]||p[Ro]),f=this.context,y=Math.round(e.size[0]*c),g=Math.round(e.size[1]*c),m=h.getWrapX()&&a.canWrapX(),v=m?bn(u):null,_=m?Math.ceil((n[2]-u[2])/v)+1:1,x=m?Math.floor((n[0]-u[0])/v):0;do{var b=this.getRenderTransform(o,s,l,c,y,g,x*v);t.execute(f,1,b,l,d,void 0,i)}while(++x<_)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){fr(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),vr(this.inversePixelTransform,this.pixelTransform);var r=_r(this.pixelTransform);this.useContainer(e,r,n.opacity);var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;var u=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);s.width!=u||s.height!=h?(s.width=u,s.height=h,s.style.transform!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,u,h),this.preRender(o,t);var c=t.viewState;c.projection;var p=!1,d=!0;if(n.extent&&this.clipping){var f=ur(n.extent);(p=(d=wn(f,t.extent))&&!Hi(f,t.extent))&&this.clipUnrotated(o,t,f)}d&&this.renderWorlds(a,t),p&&o.restore(),this.postRender(o,t);var y=ge(n.opacity),g=this.container;return y!==g.style.opacity&&(g.style.opacity=y),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];yr(this.pixelTransform,i);var n=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,s=this.renderedProjection_,a=this.wrappedRenderedExtent_,l=this.getLayer(),u=[],h=i[0]*lc,c=i[1]*lc;u.push(this.getRenderTransform(n,r,o,lc,h,c,0).slice());var p=l.getSource(),d=s.getExtent();if(p.getWrapX()&&s.canWrapX()&&!Hi(d,a)){for(var f=a[0],y=bn(d),g=0,m=void 0;f<d[0];)m=y*--g,u.push(this.getRenderTransform(n,r,o,lc,h,c,m).slice()),f+=y;for(g=0,f=a[2];f>d[2];)m=y*++g,u.push(this.getRenderTransform(n,r,o,lc,h,c,m).slice()),f-=y}this.hitDetectionImageData_=uc(i,u,this.renderedFeatures_,l.getStyleFunction(),a,r,o)}e(hc(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),h={},c=function(t,e,i){var o=qt(t),s=h[o];if(s){if(!0!==s&&i<s.distanceSq){if(0===i)return h[o]=!0,r.splice(r.lastIndexOf(s),1),n(t,u,e);s.geometry=e,s.distanceSq=i}}else{if(0===i)return h[o]=!0,n(t,u,e);r.push(h[o]={feature:t,layer:u,geometry:e,distanceSq:i,callback:n})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(n){return s=n.forEachFeatureAtCoordinate(t,a,l,i,c,n===o.declutterExecutorGroup?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),i=e.getSource();if(!i)return!1;var n=t.viewHints[Oo],r=t.viewHints[Ro],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&n||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,u=l.projection,h=l.resolution,c=t.pixelRatio,p=e.getRevision(),d=e.getRenderBuffer(),f=e.getRenderOrder();void 0===f&&(f=pc);var y=l.center.slice(),g=Xi(a,d*h),m=g.slice(),v=[g.slice()],_=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!Hi(_,t.extent)){var x=bn(_),b=Math.max(bn(g)/2,x);g[0]=_[0]-b,g[2]=_[2]+b,Vn(y,u);var w=function(t,e){var i=e.getExtent(),n=fn(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){var r=bn(i),o=Math.floor((n[0]-i[0])/r)*r;t[0]-=o,t[2]-=o}return t}(v[0],u);w[0]<_[0]&&w[2]<_[2]?v.push([w[0]+x,w[1],w[2]+x,w[3]]):w[0]>_[0]&&w[2]>_[2]&&v.push([w[0]-x,w[1],w[2]-x,w[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==f&&Hi(this.wrappedRenderedExtent_,g))return pt(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var S,C=new Ah(fc(h,c),g,h,c);this.getLayer().getDeclutter()&&(S=new Ah(fc(h,c),g,h,c));for(var T=0,E=v.length;T<E;++T)i.loadFeatures(v[T],h,u);var k=dc(h,c),P=function(t){var i,n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,h)),i){var r=this.renderFeature(t,k,i,C,undefined,S);this.dirty_=this.dirty_||r}}.bind(this),O=lr(g),R=i.getFeaturesInExtent(O);f&&R.sort(f);for(T=0,E=R.length;T<E;++T)P(R[T]);this.renderedFeatures_=R;var I=C.finish(),F=new oc(g,h,c,i.getOverlaps(),I,e.getRenderBuffer());return S&&(this.declutterExecutorGroup=new oc(g,h,c,i.getOverlaps(),S.finish(),e.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=f,this.renderedExtent_=m,this.wrappedRenderedExtent_=g,this.renderedCenter_=y,this.renderedProjection_=u,this.replayGroup_=F,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,r,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var a=0,l=i.length;a<l;++a)s=yc(n,t,i[a],e,this.boundHandleStyleImageChange_,r,o)||s;else s=yc(n,t,i,e,this.boundHandleStyleImageChange_,r,o);return s},e}(Gh),_c=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),xc=function(t){function e(e){return t.call(this,e)||this}return _c(e,t),e.prototype.createRenderer=function(){return new vc(this)},e}(yh),bc=function(){function t(t){this.rbush_=new Qu(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[qt(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;n<r;n++){var o=t[n],s=e[n],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};i[n]=a,this.items_[qt(s)]=a}this.rbush_.load(i)},t.prototype.remove=function(t){var e=qt(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},t.prototype.update=function(t,e){var i=this.items_[qt(e)];on([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var i,n=0,r=t.length;n<r;n++)if(i=e(t[n]))return i;return i},t.prototype.isEmpty=function(){return _t(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return tn(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),wc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Sc(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Cc=function(t){function e(e){var i=t.call(this)||this;i.projection=Yn(e.projection),i.attributions_=Sc(e.attributions),i.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,i.loading=!1,i.state_=void 0!==e.state?e.state:Ue,i.wrapX_=void 0!==e.wrapX&&e.wrapX,i.viewResolver=null,i.viewRejector=null;var n=i;return i.viewPromise_=new Promise((function(t,e){n.viewResolver=t,n.viewRejector=e})),i}return wc(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Bt()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Sc(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Xt),Tc="addfeature",Ec="changefeature",kc="clear",Pc="removefeature",Oc="featuresloadstart",Rc="featuresloadend",Ic="featuresloaderror";function Fc(t,e){return[[-1/0,-1/0,1/0,1/0]]}function Mc(t,e,i,n,r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),e.getType()==ha&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var n=e.getType(),l=void 0;n==ca||n==pa?l=a.responseText:n==da?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):n==ha&&(l=a.response),l?o(e.readFeatures(l,{extent:i,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}function jc(t,e){return function(i,n,r,o,s){var a=this;Mc(t,e,i,n,r,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||yt)}}var Ac=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lc=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.feature=i,r.features=n,r}return Ac(e,t),e}(ot),Dc=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{attributions:n.attributions,projection:void 0,state:Ue,wrapX:void 0===n.wrapX||n.wrapX})||this).on,i.once,i.un,i.loader_=yt,i.format_=n.format,i.overlaps_=void 0===n.overlaps||n.overlaps,i.url_=n.url,void 0!==n.loader?i.loader_=n.loader:void 0!==i.url_&&(Pe(i.format_,7),i.loader_=jc(i.url_,i.format_)),i.strategy_=void 0!==n.strategy?n.strategy:Fc;var r,o,s=void 0===n.useSpatialIndex||n.useSpatialIndex;return i.featuresRtree_=s?new bc:null,i.loadedExtentsRtree_=new bc,i.loadingExtentsCount_=0,i.nullGeometryFeatures_={},i.idIndex_={},i.uidIndex_={},i.featureChangeKeys_={},i.featuresCollection_=null,Array.isArray(n.features)?o=n.features:n.features&&(o=(r=n.features).getArray()),s||void 0!==r||(r=new ii(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==r&&i.bindFeaturesCollection_(r),i}return Ac(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=qt(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Lc(Tc,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[At(e,St,this.handleFeatureChange_,this),At(e,st,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(Pe(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],r=0,o=t.length;r<o;r++){var s=qt(l=t[r]);this.addToIndex_(s,l)&&i.push(l)}r=0;for(var a=i.length;r<a;r++){var l;s=qt(l=i[r]);this.setupChangeEvents_(s,l);var u=l.getGeometry();if(u){var h=u.getExtent();e.push(h),n.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,n);r=0;for(var c=i.length;r<c;r++)this.dispatchEvent(new Lc(Tc,i[r]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(Tc,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(Pc,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener($e,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(Je,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(Dt)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new Lc(kc);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),_t(this.nullGeometryFeatures_)||ct(t,vt(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],r=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||dt;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),u=s;if((s=e.closestPointXY(i,n,o,s))<u){r=t;var h=Math.sqrt(s);a[0]=i-h,a[1]=n-h,a[2]=i+h,a[3]=n+h}}})),r},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=qt(e),n=e.getGeometry();if(n){var r=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var o=e.getId();if(void 0!==o){var s=o.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Lc(Ec,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:qt(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&_t(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){for(var n=this.loadedExtentsRtree_,r=this.strategy_(t,e,i),o=function(t,o){var a=r[t];n.forEachInExtent(a,(function(t){return Hi(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new Lc(Oc)),s.loader_.call(s,a,e,i,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Lc(Rc,void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Lc(Ic))}.bind(s)),n.insert(a,{extent:a.slice()}))},s=this,a=0,l=r.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,(function(i){if(on(i.extent,t))return e=i,!0})),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=qt(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=qt(t);this.featureChangeKeys_[e].forEach(Dt),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Lc(Pc,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){Pe(this.format_,7),this.url_=t,this.setLoader(jc(t,this.format_))},e}(Cc),zc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Gc="Point",Nc="LineString",Bc="Polygon",Wc="Circle",qc="drawstart",Vc="drawend",Uc="drawabort",Xc=function(t){function e(e,i){var n=t.call(this,e)||this;return n.feature=i,n}return zc(e,t),e}(ot);var Kc=function(t){function e(e){var i=this,n=e;n.stopDown||(n.stopDown=ft),(i=t.call(this,n)||this).on,i.once,i.un,i.shouldHandle_=!1,i.downPx_=null,i.downTimeout_,i.lastDragTime_,i.pointerType_,i.freehand_=!1,i.source_=e.source?e.source:null,i.features_=e.features?e.features:null,i.snapTolerance_=e.snapTolerance?e.snapTolerance:12,i.type_=e.type,i.mode_=function(t){switch(t){case Tn:case On:return Gc;case En:case Rn:return Nc;case Pn:case In:return Bc;case Mn:return Wc;default:throw new Error("Invalid type: "+t)}}(i.type_),i.stopClick_=!!e.stopClick,i.minPoints_=e.minPoints?e.minPoints:i.mode_===Bc?3:2,i.maxPoints_=i.mode_===Wc?2:e.maxPoints?e.maxPoints:1/0,i.finishCondition_=e.finishCondition?e.finishCondition:dt;var r,o=e.geometryFunction;if(!o){var s,a=i.mode_;if(a===Wc)o=function(t,e,i){var n=e||new Yu([NaN,NaN]),r=ar(t[0]),o=Bn(r,ar(t[t.length-1]));return n.setCenterAndRadius(r,Math.sqrt(o)),n};else a===Gc?s=bs:a===Nc?s=ba:a===Bc&&(s=Ds),o=function(t,e,i){return e?a===Bc?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])]):e.setCoordinates([]):e.setCoordinates(t):e=new s(t),e}}return i.geometryFunction_=o,i.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,i.finishCoordinate_=null,i.sketchFeature_=null,i.sketchPoint_=null,i.sketchCoords_=null,i.sketchLine_=null,i.sketchLineCoords_=null,i.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,i.overlay_=new xc({source:new Dc({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(r=pl(),function(t,e){return r[t.getGeometry().getType()]}),updateWhileInteracting:!0}),i.geometryName_=e.geometryName,i.condition_=e.condition?e.condition:uu,i.freehandCondition_,e.freehand?i.freehandCondition_=au:i.freehandCondition_=e.freehandCondition?e.freehandCondition:hu,i.addChangeListener(Zl,i.updateState_),i}return zc(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===Et&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==Gc&&this.freehandCondition_(e);var i=e.type===mo.POINTERMOVE,n=!0;!this.freehand_&&this.lastDragTime_&&e.type===mo.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===mo.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),n=!1):this.freehand_&&e.type===mo.POINTERDOWN?n=!1:i&&this.getPointerCount()<2?(n=e.type===mo.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===mo.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===mo.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,e)&&n},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new go(mo.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():this.freehand_||i&&this.mode_!==Gc||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,n=e[0]-i[0],r=e[1]-i[1],o=n*n+r*r;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,n=[this.finishCoordinate_],r=this.mode_;if(r===Gc)e=!0;else if(r===Wc)e=2===this.sketchCoords_.length;else if(r===Nc)i=this.sketchCoords_.length>this.minPoints_;else if(r===Bc){var o=this.sketchCoords_;i=o[0].length>this.minPoints_,n=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),a=0,l=n.length;a<l;a++){var u=n[a],h=s.getPixelFromCoordinate(u),c=t[0]-h[0],p=t[1]-h[1],d=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(c*c+p*p)<=d){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new aa(new bs(t)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new aa);var e=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new ba(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===Gc?this.sketchCoords_=t.slice():this.mode_===Bc?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new aa(new ba(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new aa,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Xc(qc,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,i,n=this.getMap(),r=this.sketchFeature_.getGeometry(),o=n.getView().getProjection();(this.mode_===Gc?i=this.sketchCoords_:this.mode_===Bc?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=t[0],i[1]=t[1],this.geometryFunction_(this.sketchCoords_,r,o),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(t);if(r.getType()===Pn&&this.mode_!==Bc)this.createOrUpdateCustomSketchLine_(r);else if(this.sketchLineCoords_){this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,i,n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),o=this.mode_;o===Nc||o===Wc?(this.finishCoordinate_=t.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),this.geometryFunction_(i,n,r)):o===Bc&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(t.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,n,r)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;if(n===Nc||n===Wc){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var r=this.finishCoordinate_.slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}this.geometryFunction_(t,e,i),e.getType()===Pn&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(n===Bc){(t=this.sketchCoords_[0]).splice(-2,1);var o=this.sketchLine_.getGeometry();if(t.length>=2){r=t[t.length-2].slice();t[t.length-1]=r,this.createOrUpdateSketchPoint_(r)}o.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry(),n=this.getMap().getView().getProjection();this.mode_===Nc?(e.pop(),this.geometryFunction_(e,i,n)):this.mode_===Bc&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),this.type_===On?t.setGeometry(new Ta([e])):this.type_===Rn?t.setGeometry(new Sa([e])):this.type_===In&&t.setGeometry(new Pa([e])),this.dispatchEvent(new Xc(Vc,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new Xc(Uc,t))},e.prototype.appendCoordinates=function(t){var e,i=this.mode_,n=!this.sketchFeature_;if(n&&this.startDrawing_(t[0]),i===Nc||i===Wc)e=this.sketchCoords_;else{if(i!==Bc)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}n&&e.shift(),e.pop();for(var r=0;r<t.length;r++)this.addToDrawing_(t[r]);var o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new aa(new bs(i)),this.updateSketchFeatures_(),this.dispatchEvent(new Xc(qc,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(nu),Yc=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zc=[0,0,0,0],Hc=[],$c="modifystart",Jc="modifyend",Qc=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.features=i,r.mapBrowserEvent=n,r}return Yc(e,t),e}(ot);function tp(t,e){return t.index-e.index}function ep(t,e,i){var n=e.geometry;if(n.getType()===Mn){var r=n;if(1===e.index){null;var o=Bn(r.getCenter(),ar(t)),s=Math.sqrt(o)-r.getRadius();return s*s}}var a=ar(t);return Hc[0]=ar(e.segment[0]),Hc[1]=ar(e.segment[1]),qn(a,Hc)}function ip(t,e,i){var n=e.geometry;if(n.getType()===Mn&&1===e.index){var r=n;return sr(r.getClosestPoint(ar(t)))}var o=ar(t);return Hc[0]=ar(e.segment[0]),Hc[1]=ar(e.segment[1]),sr(zn(o,Hc))}var np=function(t){function e(e){var i,n,r=t.call(this,e)||this;if(r.on,r.once,r.un,r.boundHandleFeatureChange_=r.handleFeatureChange_.bind(r),r.condition_=e.condition?e.condition:du,r.defaultDeleteCondition_=function(t){return function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey}(t)&&function(t){return t.type==mo.SINGLECLICK}(t)},r.deleteCondition_=e.deleteCondition?e.deleteCondition:r.defaultDeleteCondition_,r.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:au,r.vertexFeature_=null,r.vertexSegments_=null,r.lastPixel_=[0,0],r.ignoreNextSingleClick_=!1,r.featuresBeingModified_=null,r.rBush_=new bc,r.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.snappedToVertex_=!1,r.changingFeature_=!1,r.dragSegments_=[],r.overlay_=new xc({source:new Dc({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(i=pl(),function(t,e){return i[Tn]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.SEGMENT_WRITERS_={Point:r.writePointGeometry_.bind(r),LineString:r.writeLineStringGeometry_.bind(r),LinearRing:r.writeLineStringGeometry_.bind(r),Polygon:r.writePolygonGeometry_.bind(r),MultiPoint:r.writeMultiPointGeometry_.bind(r),MultiLineString:r.writeMultiLineStringGeometry_.bind(r),MultiPolygon:r.writeMultiPolygonGeometry_.bind(r),Circle:r.writeCircleGeometry_.bind(r),GeometryCollection:r.writeGeometryCollectionGeometry_.bind(r)},r.source_=null,r.hitDetection_=null,e.features?n=e.features:e.source&&(r.source_=e.source,n=new ii(r.source_.getFeatures()),r.source_.addEventListener(Tc,r.handleSourceAdd_.bind(r)),r.source_.addEventListener(Pc,r.handleSourceRemove_.bind(r))),!n)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(r.hitDetection_=e.hitDetection),r.features_=n,r.features_.forEach(r.addFeature_.bind(r)),r.features_.addEventListener($e,r.handleFeatureAdd_.bind(r)),r.features_.addEventListener(Je,r.handleFeatureRemove_.bind(r)),r.lastPointerEvent_=null,r.delta_=[0,0],r.snapToPointer_=void 0===e.snapToPointer?!r.hitDetection_:e.snapToPointer,r}return Yc(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}var n=this.getMap();n&&n.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,n),t.addEventListener(St,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new ii;for(var i=this.featuresBeingModified_.getArray(),n=0,r=e.length;n<r;++n)for(var o=e[n],s=0,a=o.length;s<a;++s){var l=o[s].feature;l&&-1===i.indexOf(l)&&this.featuresBeingModified_.push(l)}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new Qc($c,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(St,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,i=[];e.forEach((function(e){t===e.feature&&i.push(e)}));for(var n=i.length-1;n>=0;--n){for(var r=i[n],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===r&&this.dragSegments_.splice(o,1);e.remove(r)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var o=i[n],s={feature:t,geometry:e,depth:[n],index:n,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,geometry:e,index:n,segment:o};this.rBush_.insert(Ui(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[n],index:s,segment:l};this.rBush_.insert(Ui(l),u)}},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,geometry:e,depth:[n],index:s,segment:l};this.rBush_.insert(Ui(l),u)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,geometry:e,depth:[s,n],index:u,segment:c};this.rBush_.insert(Ui(c),p)}},e.prototype.writeCircleGeometry_=function(t,e){var i=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[i,i]},r={feature:t,geometry:e,index:1,segment:[i,i]},o=[n,r];n.featureSegments=o,r.featureSegments=o,this.rBush_.insert(nn(i),n);var s=e;this.rBush_.insert(s.getExtent(),r)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=i[n];(0,this.SEGMENT_WRITERS_[r.getType()])(t,r)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,i){var n=this.vertexFeature_;n?n.getGeometry().setCoordinates(t):(n=new aa(new bs(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n));return n.set("features",e),n.set("geometries",i),n},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=mo.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(i=!(e.type!=mo.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==mo.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!i);var i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[],r=0,o=this.dragSegments_.length;r<o;++r){var s=this.dragSegments_[r],a=s[0],l=a.feature;-1===i.indexOf(l)&&i.push(l);var u=a.geometry;-1===n.indexOf(u)&&n.push(u);for(var h=a.depth,c=void 0,p=a.segment,d=s[1];e.length<u.getStride();)e.push(p[d][e.length]);switch(u.getType()){case Tn:c=e,p[0]=e,p[1]=e;break;case On:(c=u.getCoordinates())[a.index]=e,p[0]=e,p[1]=e;break;case En:(c=u.getCoordinates())[a.index+d]=e,p[d]=e;break;case Rn:case Pn:(c=u.getCoordinates())[h[0]][a.index+d]=e,p[d]=e;break;case In:(c=u.getCoordinates())[h[1]][h[0]][a.index+d]=e,p[d]=e;break;case Mn:if(p[0]=e,p[1]=e,0===a.index)this.changingFeature_=!0,u.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;t.map.getView().getProjection();var f=Wn(ar(u.getCenter()),ar(e));u.setRadius(f),this.changingFeature_=!1}}c&&this.setGeometryCoordinates_(u,c)}this.createOrUpdateVertexFeature_(e,i,n)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){var n=t.map.getView().getProjection(),r=[],o=i.getGeometry().getCoordinates(),s=Ui([o]),a=this.rBush_.getInExtent(s),l={};a.sort(tp);for(var u=0,h=a.length;u<h;++u){var c=a[u],p=c.segment,d=qt(c.geometry),f=c.depth;if(f&&(d+="-"+f.join("-")),l[d]||(l[d]=new Array(2)),c.geometry.getType()!==Mn||1!==c.index)if(!Gn(p[0],o)||l[d][0])if(!Gn(p[1],o)||l[d][1])qt(p)in this.vertexSegments_&&!l[d][0]&&!l[d][1]&&this.insertVertexCondition_(t)&&r.push(c);else{if((c.geometry.getType()===En||c.geometry.getType()===Rn)&&l[d][0]&&0===l[d][0].index)continue;this.dragSegments_.push([c,1]),l[d][1]=c}else this.dragSegments_.push([c,0]),l[d][0]=c;else Gn(ip(e,c,n),o)&&!l[d][0]&&(this.dragSegments_.push([c,0]),l[d][0]=c)}r.length&&this.willModifyFeatures_(t,[r]);for(var y=r.length-1;y>=0;--y)this.insertVertex_(r[y],o)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var i=this.dragSegments_[e][0],n=i.geometry;if(n.getType()===Mn){var r=n.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=r,o.segment[1]=r,s.segment[0]=r,s.segment[1]=r,this.rBush_.update(nn(r),o);var a=n;this.rBush_.update(a.getExtent(),s)}else this.rBush_.update(Ui(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new Qc(Jc,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,i){var n,r,o=this,s=i||e.getCoordinateFromPixel(t),a=e.getView().getProjection();if(this.hitDetection_){var l="object"==typeof this.hitDetection_?function(t){return t===o.hitDetection_}:void 0;e.forEachFeatureAtPixel(t,(function(t,e,i){if((i=i||t.getGeometry()).getType()===Tn&&(a=o.features_.getArray(),l=t,a.indexOf(l)>=0)){r=i;var s=i.getFlatCoordinates().slice(0,2);n=[{feature:t,geometry:i,segment:[s,s]}]}var a,l;return!0}),{layerFilter:l})}if(!n){var u=lr(Xi(ur(nn(s,Zc)),e.getView().getResolution()*this.pixelTolerance_,Zc));n=this.rBush_.getInExtent(u)}if(n&&n.length>0){var h=n.sort((function(t,e){return ep(s,t,a)-ep(s,e,a)}))[0],c=h.segment,p=ip(s,h,a),d=e.getPixelFromCoordinate(p),f=Wn(t,d);if(r||f<=this.pixelTolerance_){var y={};if(y[qt(c)]=!0,this.snapToPointer_||(this.delta_[0]=p[0]-s[0],this.delta_[1]=p[1]-s[1]),h.geometry.getType()===Mn&&1===h.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(p,[h.feature],[h.geometry]);else{var g=e.getPixelFromCoordinate(c[0]),m=e.getPixelFromCoordinate(c[1]),v=Bn(d,g),_=Bn(d,m);f=Math.sqrt(Math.min(v,_)),this.snappedToVertex_=f<=this.pixelTolerance_,this.snappedToVertex_&&(p=v>_?c[1]:c[0]),this.createOrUpdateVertexFeature_(p,[h.feature],[h.geometry]);var x={};x[qt(h.geometry)]=!0;for(var b=1,w=n.length;b<w;++b){var S=n[b].segment;if(!(Gn(c[0],S[0])&&Gn(c[1],S[1])||Gn(c[0],S[1])&&Gn(c[1],S[0])))break;var C=qt(n[b].geometry);C in x||(x[C]=!0,y[qt(S)]=!0)}}return void(this.vertexSegments_=y)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var i,n=t.segment,r=t.feature,o=t.geometry,s=t.depth,a=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case Rn:case Pn:(i=o.getCoordinates())[s[0]].splice(a+1,0,e);break;case In:(i=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,e);break;case En:(i=o.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,i);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(o,a,s,1);var u={segment:[n[0],e],feature:r,geometry:o,depth:s,index:a};l.insert(Ui(u.segment),u),this.dragSegments_.push([u,1]);var h={segment:[e,n[1]],feature:r,geometry:o,depth:s,index:a+1};l.insert(Ui(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=mo.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.dispatchEvent(new Qc(Jc,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,i,n,r,o,s,a,l,u,h,c=this.dragSegments_,p={},d=!1;for(r=c.length-1;r>=0;--r)h=qt((u=(i=c[r])[0]).feature),u.depth&&(h+="-"+u.depth.join("-")),h in p||(p[h]={}),0===i[1]?(p[h].right=u,p[h].index=u.index):1==i[1]&&(p[h].left=u,p[h].index=u.index+1);for(h in p){switch(l=p[h].right,s=p[h].left,(a=(o=p[h].index)-1)<0&&(a=0),t=e=(n=(u=void 0!==s?s:l).geometry).getCoordinates(),d=!1,n.getType()){case Rn:e[u.depth[0]].length>2&&(e[u.depth[0]].splice(o,1),d=!0);break;case En:e.length>2&&(e.splice(o,1),d=!0);break;case In:t=t[u.depth[1]];case Pn:(t=t[u.depth[0]]).length>4&&(o==t.length-1&&(o=0),t.splice(o,1),d=!0,0===o&&(t.pop(),t.push(t[0]),a=t.length-1))}if(d){this.setGeometryCoordinates_(n,e);var f=[];if(void 0!==s&&(this.rBush_.remove(s),f.push(s.segment[0])),void 0!==l&&(this.rBush_.remove(l),f.push(l.segment[1])),void 0!==s&&void 0!==l){var y={depth:u.depth,feature:u.feature,geometry:u.geometry,index:a,segment:f};this.rBush_.insert(Ui(y.segment),y)}this.updateSegmentIndices_(n,o,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),c.length=0}}return d},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===i||void 0===r.depth||pt(r.depth,i))&&r.index>e&&(r.index+=n)}))},e}(nu),rp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function op(t){return t.feature?t.feature:t.element?t.element:void 0}var sp=[],ap=function(t){function e(e){var i=this,n=e||{},r=n;return r.handleDownEvent||(r.handleDownEvent=dt),r.stopDown||(r.stopDown=ft),(i=t.call(this,r)||this).source_=n.source?n.source:null,i.vertex_=void 0===n.vertex||n.vertex,i.edge_=void 0===n.edge||n.edge,i.features_=n.features?n.features:null,i.featuresListenerKeys_=[],i.featureChangeListenerKeys_={},i.indexedFeaturesExtents_={},i.pendingFeatures_={},i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.rBush_=new bc,i.SEGMENT_WRITERS_={Point:i.writePointGeometry_.bind(i),LineString:i.writeLineStringGeometry_.bind(i),LinearRing:i.writeLineStringGeometry_.bind(i),Polygon:i.writePolygonGeometry_.bind(i),MultiPoint:i.writeMultiPointGeometry_.bind(i),MultiLineString:i.writeMultiLineStringGeometry_.bind(i),MultiPolygon:i.writeMultiPolygonGeometry_.bind(i),GeometryCollection:i.writeGeometryCollectionGeometry_.bind(i),Circle:i.writeCircleGeometry_.bind(i)},i}return rp(e,t),e.prototype.addFeature=function(t,e){var i=void 0===e||e,n=qt(t),r=t.getGeometry();if(r){var o=this.SEGMENT_WRITERS_[r.getType()];o&&(this.indexedFeaturesExtents_[n]=r.getExtent([1/0,1/0,-1/0,-1/0]),o(t,r))}i&&(this.featureChangeListenerKeys_[n]=At(t,St,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var i=this.snapTo(e.pixel,e.coordinate,e.map);return i.snapped&&(e.coordinate=i.vertex.slice(0,2),e.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=op(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=op(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var i=qt(e);i in this.pendingFeatures_||(this.pendingFeatures_[i]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=vt(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var i=void 0===e||e,n=qt(t),r=this.indexedFeaturesExtents_[n];if(r){var o=this.rBush_,s=[];o.forEachInExtent(r,(function(e){t===e.feature&&s.push(e)}));for(var a=s.length-1;a>=0;--a)o.remove(s[a])}i&&(Dt(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])},e.prototype.setMap=function(e){var i=this.getMap(),n=this.featuresListenerKeys_,r=this.getFeatures_();i&&(n.forEach(Dt),n.length=0,r.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?n.push(At(this.features_,$e,this.handleFeatureAdd_,this),At(this.features_,Je,this.handleFeatureRemove_,this)):this.source_&&n.push(At(this.source_,Tc,this.handleFeatureAdd_,this),At(this.source_,Pc,this.handleFeatureRemove_,this)),r.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,i){var n=Ui([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),r=this.rBush_.getInExtent(n);this.vertex_&&!this.edge_&&(r=r.filter((function(t){return t.feature.getGeometry().getType()!==Mn})));var o=!1,s=null,a=null;if(0===r.length)return{snapped:o,vertex:s,vertexPixel:a};i.getView().getProjection();for(var l,u=ar(e),h=1/0,c=0;c<r.length;++c){var p=r[c];sp[0]=ar(p.segment[0]),sp[1]=ar(p.segment[1]);var d=qn(u,sp);d<h&&(l=p,h=d)}var f=l.segment;if(this.vertex_&&!this.edge_){var y=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),m=Bn(t,y),v=Bn(t,g);Math.sqrt(Math.min(m,v))<=this.pixelTolerance_&&(o=!0,s=m>v?f[1]:f[0],a=i.getPixelFromCoordinate(s))}else if(this.edge_){var _=l.feature.getGeometry().getType()===Mn;if(_){var x=l.feature.getGeometry();null,s=sr(function(t,e){var i=e.getRadius(),n=e.getCenter(),r=n[0],o=n[1],s=t[0]-r,a=t[1]-o;0===s&&0===a&&(s=1);var l=Math.sqrt(s*s+a*a);return[r+i*s/l,o+i*a/l]}(u,x))}else sp[0]=ar(f[0]),sp[1]=ar(f[1]),s=sr(zn(u,sp));if(Wn(t,a=i.getPixelFromCoordinate(s))<=this.pixelTolerance_&&(o=!0,this.vertex_&&!_)){y=i.getPixelFromCoordinate(f[0]),g=i.getPixelFromCoordinate(f[1]),m=Bn(a,y),v=Bn(a,g);Math.sqrt(Math.min(m,v))<=this.pixelTolerance_&&(s=m>v?f[1]:f[0],a=i.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){this.getMap().getView().getProjection();for(var i=Gs(e).getCoordinates()[0],n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,segment:o};this.rBush_.insert(Ui(o),s)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),n=0;n<i.length;++n){var r=this.SEGMENT_WRITERS_[i[n].getType()];r&&r(t,i[n])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length-1;n<r;++n){var o=i.slice(n,n+2),s={feature:t,segment:o};this.rBush_.insert(Ui(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Ui(l),u)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n){var o=i[n],s={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length;s<a;++s)for(var l=o[s],u=0,h=l.length-1;u<h;++u){var c=l.slice(u,u+2),p={feature:t,segment:c};this.rBush_.insert(Ui(c),p)}},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),n={feature:t,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),n=0,r=i.length;n<r;++n)for(var o=i[n],s=0,a=o.length-1;s<a;++s){var l=o.slice(s,s+2),u={feature:t,segment:l};this.rBush_.insert(Ui(l),u)}},e}(nu);function lp(t){var e=t||{},i=new ii,n=new Du(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new mu),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new tu({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new yu({onFocusOnly:e.onFocusOnly,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new qu),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new Uu({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new ju),i.push(new Lu({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new Bu({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new Pu({duration:e.zoomDuration})),i}var up=function(){function t(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function hp(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new up(t,e,i,n)}var cp=up,pp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),dp=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new cp(0,0,0,0),i}return pp(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Co||i==Eo||i==To&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,i,r,o);return a.getState()==To&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Co)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,o=n.resolution,s=n.center,a=n.rotation,l=t.pixelRatio,u=this.getLayer(),h=u.getSource(),c=h.getRevision(),p=h.getTileGridForProjection(r),d=p.getZForResolution(o,h.zDirection),f=p.getResolution(d),y=t.extent,g=i.extent&&ur(i.extent);g&&(y=vn(y,ur(i.extent)));var m=h.getTilePixelRatio(l),v=Math.round(t.size[0]*m),_=Math.round(t.size[1]*m);if(a){var x=Math.round(Math.sqrt(v*v+_*_));v=x,_=x}var b=f*v/2/m,w=f*_/2/m,S=[s[0]-b,s[1]-w,s[0]+b,s[1]+w],C=p.getTileRangeForExtentAndZ(y,d),T={};T[d]={};var E=this.createLoadedTileFinder(h,r,T),k=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var O=C.minX;O<=C.maxX;++O)for(var R=C.minY;R<=C.maxY;++R){var I=this.getTile(d,O,R,t);if(this.isDrawableTile(I)){var F=qt(this);if(I.getState()==Co){T[d][I.tileCoord.toString()]=I;var M=I.inTransition(F);this.newTiles_||!M&&-1!==this.renderedTiles.indexOf(I)||(this.newTiles_=!0)}if(1===I.getAlpha(F,t.time))continue}var j=p.getTileCoordChildTileRange(I.tileCoord,P,k),A=!1;j&&(A=E(d+1,j)),A||p.forEachTileCoordParentTileRange(I.tileCoord,E,P,k)}var L=f/o;mr(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,a,-v/2,-_/2);var D=_r(this.pixelTransform);this.useContainer(e,D,i.opacity);var z=this.context,G=z.canvas;vr(this.inversePixelTransform,this.pixelTransform),mr(this.tempTransform,v/2,_/2,L,L,0,-v/2,-_/2),G.width!=v||G.height!=_?(G.width=v,G.height=_):this.containerReused||z.clearRect(0,0,v,_),g&&this.clipUnrotated(z,t,g),gt(z,h.getContextOptions()),this.preRender(z,t),this.renderedTiles.length=0;var N,B,W,q=Object.keys(T).map(Number);q.sort(lt),1!==i.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(N=[],B=[]):q=q.reverse();for(var V=q.length-1;V>=0;--V){var U=q[V],X=h.getTilePixelSize(U,l,r),K=p.getResolution(U)/f,Y=X[0]*K*L,Z=X[1]*K*L,H=p.getTileCoordForCoordAndZ(_n(S),U),$=p.getTileCoordExtent(H),J=yr(this.tempTransform,[m*($[0]-S[0])/f,m*(S[3]-$[3])/f]),Q=m*h.getGutterForProjection(r),tt=T[U];for(var et in tt){var it=(I=tt[et]).tileCoord,nt=H[1]-it[1],rt=Math.round(J[0]-(nt-1)*Y),ot=H[2]-it[2],st=Math.round(J[1]-(ot-1)*Z),at=rt-(O=Math.round(J[0]-nt*Y)),ut=st-(R=Math.round(J[1]-ot*Z)),ht=d===U;if(!(M=ht&&1!==I.getAlpha(qt(this),t.time)))if(N){z.save(),W=[O,R,O+at,R,O+at,R+ut,O,R+ut];for(var ct=0,pt=N.length;ct<pt;++ct)if(d!==U&&U<B[ct]){var dt=N[ct];z.beginPath(),z.moveTo(W[0],W[1]),z.lineTo(W[2],W[3]),z.lineTo(W[4],W[5]),z.lineTo(W[6],W[7]),z.moveTo(dt[6],dt[7]),z.lineTo(dt[4],dt[5]),z.lineTo(dt[2],dt[3]),z.lineTo(dt[0],dt[1]),z.clip()}N.push(W),B.push(U)}else z.clearRect(O,R,at,ut);this.drawTileImage(I,t,O,R,at,ut,Q,ht),N&&!M?(z.restore(),this.renderedTiles.unshift(I)):this.renderedTiles.push(I),this.updateUsedTiles(t.usedTiles,h,I)}}this.renderedRevision=c,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!on(this.renderedExtent_,S),this.renderedExtent_=S,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,h,p,l,r,y,d,u.getPreload()),this.scheduleExpireCache(t,h),this.postRender(z,t),i.extent&&z.restore(),D!==G.style.transform&&(G.style.transform=D);var ft=ge(i.opacity),yt=this.container;return ft!==yt.style.opacity&&(yt.style.opacity=ft),this.container},e.prototype.drawTileImage=function(t,e,i,n,r,o,s,a){var l=this.getTileImage(t);if(l){var u=qt(this),h=a?t.getAlpha(u,e.time):1,c=h!==this.context.globalAlpha;c&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,i,n,r,o),c&&this.context.restore(),1!==h?e.animate=!0:a&&t.endTransition(u)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=qt(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i){var n=qt(e);n in t||(t[n]={}),t[n][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,i,n,r,o,s,a,l){var u=qt(e);u in t.wantedTiles||(t.wantedTiles[u]={});var h,c,p,d,f,y,g=t.wantedTiles[u],m=t.tileQueue,v=0;for(y=i.getMinZoom();y<=s;++y)for(c=i.getTileRangeForExtentAndZ(o,y,c),p=i.getResolution(y),d=c.minX;d<=c.maxX;++d)for(f=c.minY;f<=c.maxY;++f)s-y<=a?(++v,(h=e.getTile(y,d,f,n,r)).getState()==wo&&(g[h.getKey()]=!0,m.isKeyQueued(h.getKey())||m.enqueue([h,u,i.getTileCoordCenter(h.tileCoord),p])),void 0!==l&&l(h)):e.useTile(y,d,f,r);e.updateCacheSize(v,r)},e}(Gh);dp.prototype.getLayer;var fp=dp,yp="image",gp="hybrid",mp="vector",vp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_p={image:[Vh,Nh,qh,Wh,Uh],hybrid:[Vh,qh],vector:[]},xp={hybrid:[Wh,Uh,Bh],vector:[Vh,Nh,qh,Wh,Uh,Bh]},bp=function(t){function e(e){var i=t.call(this,e)||this;return i.boundHandleStyleImageChange_=i.handleStyleImageChange_.bind(i),i.dirty_=!1,i.renderedLayerRevision_,i.renderedPixelToCoordinateTransform_=null,i.renderedRotation_,i.tmpTransform_=[1,0,0,1,0,0],i}return vp(e,t),e.prototype.prepareTile=function(t,e,i){var n,r=t.getState();return r!==Co&&r!==To||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n},e.prototype.getTile=function(e,i,n,r){var o=r.pixelRatio,s=r.viewState,a=s.resolution,l=s.projection,u=this.getLayer(),h=u.getSource().getTile(e,i,n,o,l),c=r.viewHints,p=!(c[Oo]||c[Ro]);return!p&&h.wantedResolution||(h.wantedResolution=a),this.prepareTile(h,o,l)&&(p||Date.now()-r.time<8)&&u.getRenderMode()!==mp&&this.renderTileImage_(h,r),t.prototype.getTile.call(this,e,i,n,r)},e.prototype.isDrawableTile=function(e){var i=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(i.getRenderMode()===mp?qt(i)in e.executorGroups:e.hasContext(i))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var i=this.getLayer().getRevision();return this.renderedLayerRevision_!=i&&(this.renderedTiles.length=0),this.renderedLayerRevision_=i,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,i){var n=this.getLayer(),r=n.getRevision(),o=n.getRenderOrder()||null,s=t.wantedResolution,a=t.getReplayState(n);if(a.dirty||a.renderedResolution!==s||a.renderedRevision!=r||a.renderedRenderOrder!=o){var l=n.getSource(),u=n.getDeclutter(),h=l.getTileGrid(),c=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),p=l.getSourceTiles(e,i,t),d=qt(n);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],u&&(t.declutterExecutorGroups[d]=[]);for(var f=function(i,r){var f=p[i];if(f.getState()!=Co)return"continue";var g=f.tileCoord,m=h.getTileCoordExtent(g),v=vn(c,m),_=Xi(v,n.getRenderBuffer()*s,y.tmpExtent),x=on(m,v)?null:_;a.dirty=!1;var b=new Ah(0,_,s,e),w=u?new Ah(0,v,s,e):void 0,S=dc(s,e),C=function(t){var e,i=t.getStyleFunction()||n.getStyleFunction();if(i&&(e=i(t,s)),e){var r=this.renderFeature(t,S,e,b,w);this.dirty_=this.dirty_||r,a.dirty=a.dirty||r}},T=f.getFeatures();o&&o!==a.renderedRenderOrder&&T.sort(o);for(var E=0,k=T.length;E<k;++E){var P=T[E];x&&!wn(x,P.getGeometry().getExtent())||C.call(y,P)}var O=b.finish(),R=n.getRenderMode()!==mp&&u&&1===p.length?null:v,I=new oc(R,s,e,l.getOverlaps(),O,n.getRenderBuffer());if(t.executorGroups[d].push(I),w){var F=new oc(null,s,e,l.getOverlaps(),w.finish(),n.getRenderBuffer());t.declutterExecutorGroups[d].push(F)}},y=this,g=0,m=p.length;g<m;++g)f(g);a.renderedRevision=r,a.renderedRenderOrder=o,a.renderedResolution=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=e.viewState.resolution,s=e.viewState.rotation;i=null==i?0:i;var a=this.getLayer(),l=a.getSource().getTileGridForProjection(e.viewState.projection),u=Ui([t]);Xi(u,o*i,u);for(var h,c={},p=function(t,e,i){var o=t.getId();void 0===o&&(o=qt(t));var s=c[o];if(s){if(!0!==s&&i<s.distanceSq){if(0===i)return c[o]=!0,r.splice(r.lastIndexOf(s),1),n(t,a,e);s.geometry=e,s.distanceSq=i}}else{if(0===i)return c[o]=!0,n(t,a,e);r.push(c[o]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}},d=this.renderedTiles,f=function(n,r){var c=d[n];if(!wn(l.getTileCoordExtent(c.wrappedTileCoord),u))return"continue";var f=qt(a),y=[c.executorGroups[f]],g=c.declutterExecutorGroups[f];g&&y.push(g),y.some((function(n){for(var r=n===g?e.declutterTree.all().map((function(t){return t.value})):null,a=0,l=n.length;a<l;++a){var u=n[a];if(h=u.forEachFeatureAtCoordinate(t,o,s,i,p,r))return!0}}))},y=0,g=d.length;!h&&y<g;++y)f(y);return h},e.prototype.getFeatures=function(t){return new Promise(function(e,i){for(var n,r=this.getLayer(),o=qt(r),s=r.getSource(),a=this.renderedProjection,l=a.getExtent(),u=this.renderedResolution,h=s.getTileGridForProjection(a),c=yr(this.renderedPixelToCoordinateTransform_,t.slice()),p=h.getTileCoordForCoordAndResolution(c,u),d=0,f=this.renderedTiles.length;d<f;++d)if(p.toString()===this.renderedTiles[d].tileCoord.toString()){if((n=this.renderedTiles[d]).getState()===Co){var y=h.getTileCoordExtent(n.tileCoord);s.getWrapX()&&a.canWrapX()&&!Hi(l,y)&&Vn(c,a);break}n=void 0}if(!n||n.loadingSourceTiles>0)e([]);else{var g=_n(h.getTileCoordExtent(n.wrappedTileCoord)),m=[(c[0]-g[0])/u,(g[1]-c[1])/u],v=n.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),_=n.hitDetectionImageData[o];if(!_&&!this.animatingOrInteracting_){var x=Xs(h.getTileSize(h.getZForResolution(u))),b=this.renderedRotation_;_=uc(x,[this.getRenderTransform(h.getTileCoordCenter(n.wrappedTileCoord),u,0,lc,x[0]*lc,x[1]*lc,0)],v,r.getStyleFunction(),h.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(r).renderedResolution,b),n.hitDetectionImageData[o]=_}e(hc(m,v,_))}}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var n=t.viewHints,r=!(n[Oo]||n[Ro]),o=this.renderedTiles,s=0,a=o.length;s<a;++s){var l=o[s],u=l.declutterExecutorGroups[qt(this.getLayer())];if(u)for(var h=u.length-1;h>=0;--h)u[h].execute(this.context,1,this.getTileRenderTransform(l,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,e){var i=e.pixelRatio,n=e.viewState,r=n.center,o=n.resolution,s=n.rotation,a=e.size,l=Math.round(a[0]*i),u=Math.round(a[1]*i),h=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),c=t.tileCoord,p=h.getTileCoordExtent(t.wrappedTileCoord),d=h.getTileCoordExtent(c,this.tmpExtent)[0]-p[0];return dr(gr(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,o,s,i,l,u,d))},e.prototype.renderFrame=function(e,i){var n=e.viewHints,r=!(n[Oo]||n[Ro]);t.prototype.renderFrame.call(this,e,i),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),s=o.getRenderMode(),a=this.context,l=a.globalAlpha;a.globalAlpha=o.getOpacity();for(var u=xp[s],h=e.viewState.rotation,c=this.renderedTiles,p=[],d=[],f=c.length-1;f>=0;--f)for(var y=c[f],g=this.getTileRenderTransform(y,e),m=y.executorGroups[qt(o)],v=!1,_=0,x=m.length;_<x;++_){var b=m[_];if(b.hasExecutors(u)){var w=y.tileCoord[0],S=void 0;if(!v&&(S=b.getClipCoords(g))){a.save();for(var C=0,T=p.length;C<T;++C){var E=p[C];w<d[C]&&(a.beginPath(),a.moveTo(S[0],S[1]),a.lineTo(S[2],S[3]),a.lineTo(S[4],S[5]),a.lineTo(S[6],S[7]),a.moveTo(E[6],E[7]),a.lineTo(E[4],E[5]),a.lineTo(E[2],E[3]),a.lineTo(E[0],E[1]),a.clip())}}b.execute(a,1,g,h,r,u),!v&&S&&(a.restore(),p.push(S),d.push(w),v=!0)}}return a.globalAlpha=l,this.container},e.prototype.renderFeature=function(t,e,i,n,r){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var s=0,a=i.length;s<a;++s)o=yc(n,t,i[s],e,this.boundHandleStyleImageChange_,void 0,r)||o;else o=yc(n,t,i,e,this.boundHandleStyleImageChange_,void 0,r);return o},e.prototype.tileImageNeedsRender_=function(t){var e=this.getLayer();if(e.getRenderMode()===mp)return!1;var i=t.getReplayState(e),n=e.getRevision(),r=t.wantedResolution;return i.renderedTileResolution!==r||i.renderedTileRevision!==n},e.prototype.renderTileImage_=function(t,e){var i=this.getLayer(),n=t.getReplayState(i),r=i.getRevision(),o=t.executorGroups[qt(i)];n.renderedTileRevision=r;var s=t.wrappedTileCoord,a=s[0],l=i.getSource(),u=e.pixelRatio,h=e.viewState.projection,c=l.getTileGridForProjection(h),p=c.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*p,f=c.getResolution(a),y=t.getContext(i);u=Math.round(Math.max(u,d/u));var g=l.getTilePixelSize(a,u,h);y.canvas.width=g[0],y.canvas.height=g[1];var m=u/d;if(1!==m){var v=pr(this.tmpTransform_);gr(v,m,m),y.setTransform.apply(y,v)}var _=c.getTileCoordExtent(s,this.tmpExtent),x=d/f,b=pr(this.tmpTransform_);gr(b,x,-x),function(t,e,i){dr(t,fr(cr,1,0,0,1,e,i))}(b,-_[0],-_[3]);for(var w=0,S=o.length;w<S;++w){o[w].execute(y,m,b,0,!0,_p[i.getRenderMode()])}n.renderedTileResolution=t.wantedResolution},e}(fp),wp="preload",Sp="useInterimTilesOnError",Cp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Tp=function(t){function e(e){var i=this,n=e||{},r=gt({},n);delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).on,i.once,i.un,n.renderMode===yp&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),n.renderMode=void 0);var o=n.renderMode||gp;return Pe(o==gp||o==mp,28),i.renderMode_=o,i.setPreload(n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return Cp(e,t),e.prototype.createRenderer=function(){return new bp(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(wp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Sp)},e.prototype.setPreload=function(t){this.set(wp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Sp,t)},e}(yh),Ep=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kp=function(t){function e(e,i,n){var r=t.call(this)||this,o=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r}return Ep(e,t),e.prototype.changed=function(){this.dispatchEvent(St)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==Co)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==Co){t.interimTile=null;break}t.getState()==So?e=t:t.getState()==wo?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==To&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Bt()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:ni(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(wt),Pp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Op=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.extent=null,a.format_=r,a.features_=null,a.loader_,a.projection=null,a.resolution,a.tileLoadFunction_=o,a.url_=n,a.key=n,a}return Pp(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==wo&&(this.setState(So),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(To)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(Co)},e.prototype.setLoader=function(t){this.loader_=t},e}(kp),Rp=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return Pe(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_},t.prototype.remove=function(t){var e=this.entries_[t];return Pe(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){Pe(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Ip(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Fp(t,e,i){return t+"/"+e+"/"+i}function Mp(t){return Fp(t[0],t[1],t[2])}function jp(t){return t.split("/").map(Number)}var Ap=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Lp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ap(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=jp(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Mp(e.tileCoord)),e.release())}.bind(this))}},e}(Rp),Dp="tileloadstart",zp="tileloadend",Gp="tileloaderror",Np=[0,0,0],Bp=function(){function t(t){var e,i,n,r;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Pe((e=this.resolutions_,i=!0,n=function(t,e){return e-t}||lt,e.every((function(t,r){if(0===r)return!0;var o=n(e[r-1],t);return!(o>0||i&&0===o)}))),17),!t.origins)for(var o=0,s=this.resolutions_.length-1;o<s;++o)if(r){if(this.resolutions_[o]/this.resolutions_[o+1]!==r){r=void 0;break}}else r=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=r,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,Pe(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=_n(a)),Pe(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Pe(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:jo,Pe(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var i=new cp(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(a){var n=this.getTileRangeForExtentAndZ(a,e);i.minX=Math.max(n.minX,i.minX),i.maxX=Math.min(n.maxX,i.maxX),i.minY=Math.max(n.minY,i.minY),i.maxY=Math.min(n.maxY,i.maxY)}return i}),this):a&&this.calculateTileRanges_(a)}return t.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,o=n.maxX;r<=o;++r)for(var s=n.minY,a=n.maxY;s<=a;++s)i([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,i,n){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,n);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?hp(r=Math.floor(r/2),r,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return hp(n,n+1,r,r+1,e)}var o=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;var n=t[0],r=t[1],o=t[2];if(e===n)return hp(r,o,r,o,i);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-n),a=Math.floor(r*s),l=Math.floor(o*s);return e<n?hp(a,a,l,l,i):hp(a,Math.floor(s*(r+1))-1,l,Math.floor(s*(o+1))-1,i)}var u=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(u,e,i)},t.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),r=this.getResolution(t),o=Xs(this.getTileSize(t),this.tmpSize_),s=n[0]+e.minX*o[0]*r,a=n[0]+(e.maxX+1)*o[0]*r;return tn(s,n[1]+e.minY*o[1]*r,a,n[1]+(e.maxY+1)*o[1]*r,i)},t.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=Np;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var r=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),hp(r,n[1],o,n[2],i)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Xs(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]},t.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Xs(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*r[0]*n,s=i[1]-(t[2]+1)*r[1]*n;return tn(o,s,o+r[0]*n,s+r[1]*n,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,r){var o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),l=Xs(this.getTileSize(o),this.tmpSize_),u=n?.5:0,h=n?.5:0,c=Math.floor((t-a[0])/i+u),p=Math.floor((a[1]-e)/i+h),d=s*c/l[0],f=s*p/l[1];return n?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),Ip(o,d,f,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,r){var o=this.getOrigin(i),s=this.getResolution(i),a=Xs(this.getTileSize(i),this.tmpSize_),l=n?.5:0,u=n?.5:0,h=Math.floor((t-o[0])/s+l),c=Math.floor((o[1]-e)/s+u),p=h/a[0],d=c/a[1];return n?(p=Math.ceil(p)-1,d=Math.ceil(d)-1):(p=Math.floor(p),d=Math.floor(d)),Ip(i,p,d,r)},t.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return Oe(ut(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i},t}();function Wp(t){var e=t.getDefaultTileGrid();return e||(e=Up(t),t.setDefaultTileGrid(e)),e}function qp(t){var e=t||{},i=e.extent||Yn("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Vp(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Bp(n)}function Vp(t,e,i,n){for(var r=void 0!==e?e:42,o=mn(t),s=bn(t),a=Xs(void 0!==i?i:jo),l=n>0?n:Math.max(s/a[0],o/a[1]),u=r+1,h=new Array(u),c=0;c<u;++c)h[c]=l/Math.pow(2,c);return h}function Up(t,e,i,n){return function(t,e,i,n){var r=void 0!==n?n:Di,o=Vp(t,e,i);return new Bp({extent:t,origin:yn(t,r),resolutions:o,tileSize:i})}(Xp(t),e,i,n)}function Xp(t){var e=(t=Yn(t)).getExtent();if(!e){var i=180*fi[yi.DEGREES]/t.getMetersPerUnit();e=tn(-i,-i,i,i)}return e}var Kp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yp=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;i.on,i.once,i.un,i.opaque_=void 0!==e.opaque&&e.opaque,i.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,i.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var n=e.tileGrid;return n&&Xs(n.getTileSize(n.getMinZoom()),[256,256]),i.tileCache=new Lp(e.cacheSize||0),i.tmpSize=[0,0],i.key_=e.key||"",i.tileOptions={transition:e.transition},i.zDirection=e.zDirection?e.zDirection:0,i}return Kp(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,u=i.minX;u<=i.maxX;++u)for(var h=i.minY;h<=i.maxY;++h)s=Fp(e,u,h),a=!1,r.containsKey(s)&&(a=(o=r.get(s)).getState()===Co)&&(a=!1!==n(o)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,r){return Bt()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Wp(t)},e.prototype.getTileCacheForProjection=function(t){return Pe(Qn(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n,r,o,s=this.getTileGridForProjection(i),a=this.getTilePixelRatio(e),l=Xs(s.getTileSize(t),this.tmpSize);return 1==a?l:(n=l,r=a,void 0===(o=this.tmpSize)&&(o=[0,0]),o[0]=n[0]*r+.5|0,o[1]=n[1]*r+.5|0,o)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),o=Xp(i);if(Zi(o,r))return e;var s=bn(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var o=e.getFullTileRange(i);return!o||o.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,e,i,n){},e}(Cc),Zp=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Kp(e,t),e}(ot),Hp=Yp;function $p(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],i=e.getFullTileRange(t);return Pe(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function Jp(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=$p(t[r],e);return function(t){if(1===t.length)return t[0];return function(e,i,n){if(e){var r=Ae(function(t){return(t[1]<<t[0])+t[2]}(e),t.length);return t[r](e,i,n)}}}(n)}var Qp=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),td=function(t){function e(i){var n=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(n.tileUrlFunction=i.tileUrlFunction),n.urls=null,i.urls?n.setUrls(i.urls):i.url&&n.setUrl(i.url),n.tileLoadingKeys_={},n}return Qp(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=qt(i),r=i.getState();r==So?(this.tileLoadingKeys_[n]=!0,e=Dp):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=r==To?Gp:r==Co?zp:void 0),null!=e&&this.dispatchEvent(new Zp(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),o=void 0;for(o=n;o<=r;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Jp(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,i){},e.prototype.useTile=function(t,e,i){var n=Fp(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Hp),ed=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),id=[],nd=function(t){function e(e,i,n,r){var o=t.call(this,e,i,{transition:0})||this;return o.context_={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=r.bind(void 0,o),o.wrappedTileCoord=n,o}return ed(e,t),e.prototype.getContext=function(t){var e=qt(t);return e in this.context_||(this.context_[e]=re(1,1,id)),this.context_[e]},e.prototype.hasContext=function(t){return qt(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=qt(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)id.push(this.context_[e].canvas),delete this.context_[e];t.prototype.release.call(this)},e}(kp),rd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),od=function(t){function e(e){var i=this,n=e.projection||"EPSG:3857",r=e.extent||Xp(n),o=e.tileGrid||qp({extent:r,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(i=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,opaque:!1,projection:n,state:e.state,tileGrid:o,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:sd,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,i.sourceTileCache=new Lp(i.tileCache.highWaterMark),i.overlaps_=null==e.overlaps||e.overlaps,i.tileClass=e.tileClass?e.tileClass:Op,i.tileGrids_={},i}return rd(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],i=this.tileCache;if(0===i.getCount())return e;var n=jp(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===n&&i.getState()===Co)for(var o=i.getSourceTiles(),s=0,a=o.length;s<a;++s){var l=o[s],u=l.tileCoord;if(wn(t,r.getTileCoordExtent(u))){var h=l.getFeatures();if(h)for(var c=0,p=h.length;c<p;++c){var d=h[c],f=d.getGeometry();wn(t,f.getExtent())&&e.push(d)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,i){var n=this.getTileCacheForProjection(e),r=Object.keys(i).reduce((function(t,e){var i,r,o=Fp((r=(i=e).substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number))[0],r[1],r[2]);if(n.containsKey(o))for(var s=n.get(o).sourceTiles,a=0,l=s.length;a<l;++a)t[s[a].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,e,i),this.sourceTileCache.expireCache(r)},e.prototype.getSourceTiles=function(t,e,i){var n=this;if(i.getState()===wo){i.setState(So);var r=i.wrappedTileCoord,o=this.getTileGridForProjection(e),s=o.getTileCoordExtent(r),a=r[0],l=o.getResolution(a);Xi(s,-l,s);var u=this.tileGrid,h=u.getExtent();h&&vn(s,h,s);var c=u.getZForResolution(l,1);u.forEachTileCoord(s,c,(function(r){var o=n.tileUrlFunction(r,t,e),s=n.sourceTileCache.containsKey(o)?n.sourceTileCache.get(o):new n.tileClass(r,o?wo:Eo,o,n.format_,n.tileLoadFunction);i.sourceTiles.push(s);var a=s.getState();if(a<Co){var l=function(t){n.handleTileChange(t);var e=s.getState();if(e===Co||e===To){var r=s.getKey();r in i.errorTileKeys?s.getState()===Co&&delete i.errorTileKeys[r]:i.loadingSourceTiles--,e===To?i.errorTileKeys[r]=!0:s.removeEventListener(St,l),0===i.loadingSourceTiles&&i.setState(_t(i.errorTileKeys)?Co:To)}};s.addEventListener(St,l),i.loadingSourceTiles++}a===wo&&(s.extent=u.getTileCoordExtent(r),s.projection=e,s.resolution=u.getResolution(r[0]),n.sourceTileCache.set(o,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((function(t){return t.getState()===To}))?To:Co)}return i.sourceTiles},e.prototype.getTile=function(t,e,i,n,r){var o,s=Fp(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===a)return o;var l=[t,e,i],u=this.getTileCoordForTileUrlFunction(l,r),h=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(r);if(u&&h){var p=c.getTileCoordExtent(u);Xi(p,-c.getResolution(t),p),wn(h,p)||(u=null)}var d=!0;if(null!==u){var f=this.tileGrid,y=c.getResolution(t),g=f.getZForResolution(y,1),m=c.getTileCoordExtent(u);Xi(m,-y,m),f.forEachTileCoord(m,g,function(t){d=d&&!this.tileUrlFunction(t,n,r)}.bind(this))}var v=new nd(l,d?Eo:wo,u,this.getSourceTiles.bind(this,n,r));return v.key=a,o?(v.interimTile=o,v.refreshInterimChain(),this.tileCache.replace(s,v)):this.tileCache.set(s,v),v},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),i=this.tileGrids_[e];if(!i){var n=this.tileGrid;i=Up(t,void 0,n?n.getTileSize(n.getMinZoom()):void 0),this.tileGrids_[e]=i}return i},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,i){var n=Xs(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e.prototype.updateCacheSize=function(e,i){t.prototype.updateCacheSize.call(this,2*e,i),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(i).highWaterMark},e}(td);function sd(t,e){t.setLoader((function(i,n,r){Mc(e,t.getFormat(),i,n,r,t.onLoad.bind(t),t.onError.bind(t))}))}var ad=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ld=function(t){function e(e){return(e=gt({},e)).controls||(e.controls=oa()),e.interactions||(e.interactions=lp({onFocusOnly:!0})),t.call(this,e)||this}return ad(e,t),e.prototype.createRenderer=function(){return new ro(this)},e}(Ys),ud=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var hd,cd=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.crossOrigin_=r,a.src_=n,a.key=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return ud(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=Co,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=To,this.unlistenImage_(),this.image_=((t=re(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Co:this.state=Eo,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==To&&(this.state=wo,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==wo&&(this.state=So,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=$a(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(kp),pd=function(){function t(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=er(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&bn(n)==bn(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?bn(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?bn(this.targetProj_.getExtent()):null;var l=_n(i),u=xn(i),h=dn(i),c=pn(i),p=this.transformInv_(l),d=this.transformInv_(u),f=this.transformInv_(h),y=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(Ie(cn(i)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,p,d,f,y,g),this.wrapsXInSource_){var m=1/0;this.triangles_.forEach((function(t,e,i){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-m>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-m>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-m>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,i,n,r,o){this.triangles_.push({source:[n,r,o],target:[t,e,i]})},t.prototype.addQuad_=function(t,e,i,n,r,o,s,a,l){var u=Ui([r,o,s,a]),h=this.sourceWorldWidth_?bn(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&h>.5&&h<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=bn(Ui([t,e,i,n]))/this.targetWorldWidth_>.25||d;!p&&this.sourceProj_.isGlobal()&&h&&(d=h>.25||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3]))||wn(u,this.maxSourceExtent_)){var f=0;if(!(d||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)d=!0;else if(1!=(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!d){var y=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(y),m=void 0;if(p)m=(Ae(r[0],c)+Ae(s[0],c))/2-Ae(g[0],c);else m=(r[0]+s[0])/2-g[0];var v=(r[1]+s[1])/2-g[1];d=m*m+v*v>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var _=[(e[0]+i[0])/2,(e[1]+i[1])/2],x=this.transformInv_(_),b=[(n[0]+t[0])/2,(n[1]+t[1])/2],w=this.transformInv_(b);this.addQuad_(t,e,_,b,r,o,x,w,l-1),this.addQuad_(b,_,i,n,w,x,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],C=this.transformInv_(S),T=[(i[0]+n[0])/2,(i[1]+n[1])/2],E=this.transformInv_(T);this.addQuad_(t,S,T,n,r,C,E,a,l-1),this.addQuad_(S,e,i,T,C,o,s,E,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,s,a),0==(14&f)&&this.addTriangle_(t,i,e,r,s,o),f&&(0==(13&f)&&this.addTriangle_(e,n,t,o,a,r),0==(7&f)&&this.addTriangle_(e,n,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){var r=e.source;an(t,r[0]),an(t,r[1]),an(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),dd={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function fd(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function yd(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function gd(t,e,i,n){var r=ir(i,e,t),o=Zn(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||Zi(l,r)){var u=Zn(t,o,r)/o;isFinite(u)&&u>0&&(o/=u)}return o}function md(t,e,i,n,r,o,s,a,l,u,h,c){var p=re(Math.round(i*t),Math.round(i*e));if(gt(p,c),0===l.length)return p.canvas;function d(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";var f=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){sn(f,t.extent)}));var y=bn(f),g=mn(f),m=re(Math.round(i*y/n),Math.round(i*g/n));gt(m,c);var v=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),o=bn(t.extent),s=mn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,n*v,r*v,o*v,s*v)}));var _=_n(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],u=s[0][1],h=s[1][0],y=s[1][1],g=s[2][0],v=s[2][1],x=d((a[0][0]-_[0])/o),b=d(-(a[0][1]-_[1])/o),w=d((a[1][0]-_[0])/o),S=d(-(a[1][1]-_[1])/o),C=d((a[2][0]-_[0])/o),T=d(-(a[2][1]-_[1])/o),E=l,k=u;l=0,u=0;var P=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),o=i+1;o<e;o++){var s=Math.abs(t[o][i]);s>r&&(r=s,n=o)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l<e;l++)for(var u=-t[l][i]/t[i][i],h=i;h<e+1;h++)i==h?t[l][h]=0:t[l][h]+=u*t[i][h]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*c[p]}return c}([[h-=E,y-=k,0,0,w-x],[g-=E,v-=k,0,0,C-x],[0,0,h,y,S-b],[0,0,g,v,T-b]]);if(P){if(p.save(),p.beginPath(),function(){if(void 0===hd){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",fd(t,4,5,4,0),fd(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;hd=yd(e,0)||yd(e,4)||yd(e,8)}return hd}()||c===dd){p.moveTo(w,S);for(var O=x-w,R=b-S,I=0;I<4;I++)p.lineTo(w+d((I+1)*O/4),S+d(I*R/3)),3!=I&&p.lineTo(w+d((I+1)*O/4),S+d((I+1)*R/3));p.lineTo(C,T)}else p.moveTo(w,S),p.lineTo(x,b),p.lineTo(C,T);p.clip(),p.transform(P[0],P[2],P[1],P[3],x,b),p.translate(f[0]-E,f[3]-k),p.scale(n/i,-n/i),p.drawImage(m.canvas,0,0),p.restore()}})),h&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,i){var n=t.target,r=(n[0][0]-_[0])/o,s=-(n[0][1]-_[1])/o,a=(n[1][0]-_[0])/o,l=-(n[1][1]-_[1])/o,u=(n[2][0]-_[0])/o,h=-(n[2][1]-_[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(u,h),p.closePath(),p.stroke()})),p.restore()),p.canvas}var vd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),_d=function(t){function e(e,i,n,r,o,s,a,l,u,h,c,p){var d=t.call(this,o,wo)||this;d.renderEdges_=void 0!==c&&c,d.contextOptions_=p,d.pixelRatio_=a,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=i,d.targetTileGrid_=r,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var f=r.getTileCoordExtent(d.wrappedTileCoord_),y=d.targetTileGrid_.getExtent(),g=d.sourceTileGrid_.getExtent(),m=y?vn(f,y):f;if(0===cn(m))return d.state=Eo,d;var v=e.getExtent();v&&(g=g?vn(g,v):v);var _=r.getResolution(d.wrappedTileCoord_[0]),x=function(t,e,i,n){var r=fn(i),o=gd(t,e,r,n);return(!isFinite(o)||o<=0)&&hn(i,(function(i){return o=gd(t,e,i,n),isFinite(o)&&o>0})),o}(e,n,m,_);if(!isFinite(x)||x<=0)return d.state=Eo,d;var b=void 0!==h?h:.5;if(d.triangulation_=new pd(e,n,m,g,x*b,_),0===d.triangulation_.getTriangles().length)return d.state=Eo,d;d.sourceZ_=i.getZForResolution(x);var w=d.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(w[1]=Oe(w[1],g[1],g[3]),w[3]=Oe(w[3],g[1],g[3])):w=vn(w,g)),cn(w)){for(var S=i.getTileRangeForExtentAndZ(w,d.sourceZ_),C=S.minX;C<=S.maxX;C++)for(var T=S.minY;T<=S.maxY;T++){var E=u(d.sourceZ_,C,T,a);E&&d.sourceTiles_.push(E)}0===d.sourceTiles_.length&&(d.state=Eo)}else d.state=Eo;return d}return vd(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==Co&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=To;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=md(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=Co}this.changed()},e.prototype.load=function(){if(this.state==wo){this.state=So,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r=e.getState();if(r==wo||r==So){t++;var o=At(e,St,(function(i){var n=e.getState();n!=Co&&n!=To&&n!=Eo||(Dt(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==wo&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Dt),this.sourcesListenerKeys_=null},e}(kp),xd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function bd(t,e){t.getImage().src=e}var wd=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:bd,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:cd,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.contextOptions_=!1===e.imageSmoothing?dd:void 0,i.renderReprojectionEdges_=!1,i}return xd(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Qn(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Qn(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Qn(e,t)){var i=qt(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Wp(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Qn(e,t))return this.tileCache;var i=qt(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Lp(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,o){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,n,r):void 0,u=new this.tileClass(s,void 0!==l?wo:Eo,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(St,this.handleTileChange.bind(this)),u},e.prototype.getTile=function(t,e,i,n,r){var o=this.getProjection();if(o&&r&&!Qn(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,u=Mp(a);s.containsKey(u)&&(l=s.get(u));var h=this.getKey();if(l&&l.key==h)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),d=this.getTileCoordForTileUrlFunction(a,r),f=new _d(o,c,r,p,a,d,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return f.key=h,l?(f.interimTile=l,f.refreshInterimChain(),s.replace(u,f)):s.set(u,f),f}return this.getTileInternal(t,e,i,n,o||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var o=null,s=Fp(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,i,n,r,a),l.getState()==wo?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,n,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Yn(t);if(i){var n=qt(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(td),Sd=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cd=function(t){function e(e){var i=this,n=e||{},r=gt({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).on,i.once,i.un,i.setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return Sd(e,t),e.prototype.getPreload=function(){return this.get(wp)},e.prototype.setPreload=function(t){this.set(wp,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Sp)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Sp,t)},e}(Ye),Td=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ed=function(t){function e(e){return t.call(this,e)||this}return Td(e,t),e.prototype.createRenderer=function(){return new fp(this)},e}(Cd),kd={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},Pd=" ",Od=/(italic|oblique)$/i,Rd={},Id=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fd=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:qp({extent:Xp(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return Id(e,t),e}(wd),Md=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),jd='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',Ad=function(t){function e(e){var i,n=e||{};i=void 0!==n.attributions?n.attributions:[jd];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:r,imageSmoothing:n.imageSmoothing,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:o,wrapX:n.wrapX,zDirection:n.zDirection})||this}return Md(e,t),e}(Fd);const Ld=Array.isArray;function Dd(t,e){if(1===arguments.length)return e=>Dd(t,e);if(t<1)throw new Error("First argument to splitEvery must be a positive integer");const i=[];let n=0;for(;n<e.length;)i.push(e.slice(n,n+=t));return i}(function t(e,i=[]){return(...n)=>{return(r=[...i,...n]).length>=e.length?e(...r):t(e,r);var r}})((function(t,e,i){if(!Ld(i))throw new TypeError("reduce: list must be array or iterable");let n=0;const r=i.length;for(;n<r;)e=t(e,i[n],n,i),n++;return e}))((function t(e,i){return 1===arguments.length?i=>t(e,i):e*i}),1);const zd=new Dc({features:[],wrapX:!1}),Gd=new xc({source:zd,style:new fl({image:new ll({radius:3,fill:new La({color:"grey"})})})});function Nd(t,e){return Dd(2,t.getSource().getFeaturesInExtent(e).filter((t=>{var e;return"Point"!==(null==(e=t.getGeometry())?void 0:e.getType())})).flatMap((t=>t.flatCoordinates_))).forEach(((t,e)=>{zd.addFeature(new aa({geometry:new bs(t),i:e}))}))}const Bd={color:"#ff0000",width:3},Wd=new nl(Bd),qd=new nl(__spreadProps(__spreadValues({},Bd),{lineDash:[2,8]})),Vd=new La({color:"rgba(255, 0, 0, 0.1)"}),Ud=new sl({stroke:new nl({color:"red",width:2}),points:4,radius1:15,radius2:1}),Xd=new ll({radius:6,fill:new La({color:"#ff0000"})}),Kd=new fl({image:new sl({fill:new La({color:"#fff"}),stroke:new nl({color:"#ff0000",width:2}),points:4,radius:5,angle:Math.PI/4}),geometry:function(t){const e=t.getGeometry();if(e instanceof Ds){const t=e.getCoordinates()[0];return new Ta(t)}}}),Yd=new Dc,Zd=new xc({source:Yd,style:[new fl({fill:Vd,stroke:Wd}),Kd]});const Hd=new ap({source:zd,pixelTolerance:15});
|
33
31
|
/**
|
34
32
|
* splaytree v3.1.0
|
35
33
|
* Fast Splay tree for Node and browser
|
@@ -38,7 +36,9 @@ Id((function(t,e){!function(i){var n=e&&!e.nodeType&&e,r=t&&!t.nodeType&&t,o="ob
|
|
38
36
|
* @license MIT
|
39
37
|
* @preserve
|
40
38
|
*/
|
41
|
-
var ym=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null};function gm(t,e){return t>e?1:t<e?-1:0}function mm(t,e,i){for(var n=new ym(null,null),r=n,o=n;;){var s=i(t,e.key);if(s<0){if(null===e.left)break;if(i(t,e.left.key)<0){var a=e.left;if(e.left=a.right,a.right=e,null===(e=a).left)break}o.left=e,o=e,e=e.left}else{if(!(s>0))break;if(null===e.right)break;if(i(t,e.right.key)>0){a=e.right;if(e.right=a.left,a.left=e,null===(e=a).right)break}r.right=e,r=e,e=e.right}}return r.right=e.left,o.left=e.right,e.left=n.right,e.right=n.left,e}function vm(t,e,i,n){var r=new ym(t,e);if(null===i)return r.left=r.right=null,r;var o=n(t,(i=mm(t,i,n)).key);return o<0?(r.left=i.left,r.right=i,i.left=null):o>=0&&(r.right=i.right,r.left=i,i.right=null),r}function _m(t,e,i){var n=null,r=null;if(e){var o=i((e=mm(t,e,i)).key,t);0===o?(n=e.left,r=e.right):o<0?(r=e.right,e.right=null,n=e):(n=e.left,e.left=null,r=e)}return{left:n,right:r}}function xm(t,e,i,n,r){if(t){n(e+(i?"└── ":"├── ")+r(t)+"\n");var o=e+(i?" ":"│ ");t.left&&xm(t.left,o,!1,n,r),t.right&&xm(t.right,o,!0,n,r)}}var bm=function(){function t(t){void 0===t&&(t=gm),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=vm(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var i=new ym(t,e);null===this._root&&(i.left=i.right=null,this._size++,this._root=i);var n=this._comparator,r=mm(t,this._root,n),o=n(t,r.key);return 0===o?this._root=r:(o<0?(i.left=r.left,i.right=r,r.left=null):o>0&&(i.right=r.right,i.left=r,r.right=null),this._size++,this._root=i),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,i){var n;return null===e?null:0===i(t,(e=mm(t,e,i)).key)?(null===e.left?n=e.right:(n=mm(t,e.left,i)).right=e.right,this._size--,n):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=mm(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,i=this._comparator;e;){var n=i(t,e.key);if(0===n)return e;e=n<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=mm(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,i=this._comparator;e;){var n=i(t,e.key);if(0===n)return!0;e=n<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var i=this._root,n=[],r=!1;!r;)null!==i?(n.push(i),i=i.left):0!==n.length?(i=n.pop(),t.call(e,i),i=i.right):r=!0;return this},t.prototype.range=function(t,e,i,n){for(var r=[],o=this._comparator,s=this._root;0!==r.length||s;)if(s)r.push(s),s=s.left;else{if(o((s=r.pop()).key,e)>0)break;if(o(s.key,t)>=0&&i.call(n,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var i=e.key;return t.push(i)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var i=e.data;return t.push(i)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,i=!1,n=0,r=[];!i;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),n===t)return e;n++,e=e.right}else i=!0;return null},t.prototype.next=function(t){var e=this._root,i=null;if(t.right){for(i=t.right;i.left;)i=i.left;return i}for(var n=this._comparator;e;){var r=n(t.key,e.key);if(0===r)break;r<0?(i=e,e=e.left):e=e.right}return i},t.prototype.prev=function(t){var e=this._root,i=null;if(null!==t.left){for(i=t.left;i.right;)i=i.right;return i}for(var n=this._comparator;e;){var r=n(t.key,e.key);if(0===r)break;r<0?e=e.left:(i=e,e=e.right)}return i},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){var e=t,i=[],n=!1,r=new ym(null,null),o=r;for(;!n;)e?(i.push(e),e=e.left):i.length>0?e=(e=o=o.next=i.pop()).right:n=!0;return o.next=null,r.next}(this._root)},t.prototype.load=function(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=!1);var n=t.length,r=this._comparator;if(i&&Cm(t,e,0,n-1,r),null===this._root)this._root=wm(t,e,0,n),this._size=n;else{var o=function(t,e,i){var n=new ym(null,null),r=n,o=t,s=e;for(;null!==o&&null!==s;)i(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;null!==o?r.next=o:null!==s&&(r.next=s);return n.next}(this.toList(),function(t,e){for(var i=new ym(null,null),n=i,r=0;r<t.length;r++)n=n.next=new ym(t[r],e[r]);return n.next=null,i.next}(t,e),r);n=this._size+n,this._root=Sm({head:o},0,n)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return xm(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,i){var n=this._comparator,r=_m(t,this._root,n),o=r.left,s=r.right;n(t,e)<0?s=vm(e,i,s,n):o=vm(e,i,o,n),this._root=function(t,e,i){return null===e?t:(null===t||((e=mm(t.key,e,i)).left=t),e)}(o,s,n)},t.prototype.split=function(t){return _m(t,this._root,this._comparator)},t}();function wm(t,e,i,n){var r=n-i;if(r>0){var o=i+Math.floor(r/2),s=t[o],a=e[o],l=new ym(s,a);return l.left=wm(t,e,i,o),l.right=wm(t,e,o+1,n),l}return null}function Sm(t,e,i){var n=i-e;if(n>0){var r=e+Math.floor(n/2),o=Sm(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=Sm(t,r+1,i),s}return null}function Cm(t,e,i,n,r){if(!(i>=n)){for(var o=t[i+n>>1],s=i-1,a=n+1;;){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}Cm(t,e,i,a,r),Cm(t,e,a+1,n,r)}}function Tm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Em(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function km(t,e,i){return e&&Em(t.prototype,e),i&&Em(t,i),t}var Pm=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},Om=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var i=t.ll.x<e.ll.x?e.ll.x:t.ll.x,n=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},Rm=Number.EPSILON;void 0===Rm&&(Rm=Math.pow(2,-52));var Im=Rm*Rm,Fm=function(t,e){if(-Rm<t&&t<Rm&&-Rm<e&&e<Rm)return 0;var i=t-e;return i*i<Im*t*e?0:t<e?-1:1},jm=function(){function t(){Tm(this,t),this.reset()}return km(t,[{key:"reset",value:function(){this.xRounder=new Mm,this.yRounder=new Mm}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),t}(),Mm=function(){function t(){Tm(this,t),this.tree=new bm,this.round(0)}return km(t,[{key:"round",value:function(t){var e=this.tree.add(t),i=this.tree.prev(e);if(null!==i&&0===Fm(e.key,i.key))return this.tree.remove(t),i.key;var n=this.tree.next(e);return null!==n&&0===Fm(e.key,n.key)?(this.tree.remove(t),n.key):t}}]),t}(),Am=new jm,Lm=function(t,e){return t.x*e.y-t.y*e.x},zm=function(t,e){return t.x*e.x+t.y*e.y},Dm=function(t,e,i){var n={x:e.x-t.x,y:e.y-t.y},r={x:i.x-t.x,y:i.y-t.y},o=Lm(n,r);return Fm(o,0)},Gm=function(t){return Math.sqrt(zm(t,t))},Nm=function(t,e,i){var n={x:e.x-t.x,y:e.y-t.y},r={x:i.x-t.x,y:i.y-t.y};return zm(r,n)/Gm(r)/Gm(n)},Bm=function(t,e,i){return 0===e.y?null:{x:t.x+e.x/e.y*(i-t.y),y:i}},Wm=function(t,e,i){return 0===e.x?null:{x:i,y:t.y+e.y/e.x*(i-t.x)}},qm=function(){function t(e,i){Tm(this,t),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=i}return km(t,null,[{key:"compare",value:function(e,i){var n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:Um.compare(e.segment,i.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),km(t,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,i=0,n=e.length;i<n;i++){var r=e[i];this.point.events.push(r),r.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var i=this.point.events[e];if(void 0===i.segment.consumedBy)for(var n=e+1;n<t;n++){var r=this.point.events[n];void 0===r.consumedBy&&(i.otherSE.point.events===r.otherSE.point.events&&i.segment.consume(r.segment))}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,i=this.point.events.length;e<i;e++){var n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,i=new Map,n=function(n){var r,o,s,a,l,u=n.otherSE;i.set(n,{sine:(r=e.point,o=t.point,s=u.point,a={x:o.x-r.x,y:o.y-r.y},l={x:s.x-r.x,y:s.y-r.y},Lm(l,a)/Gm(l)/Gm(a)),cosine:Nm(e.point,t.point,u.point)})};return function(t,e){i.has(t)||n(t),i.has(e)||n(e);var r=i.get(t),o=r.sine,s=r.cosine,a=i.get(e),l=a.sine,u=a.cosine;return o>=0&&l>=0?s<u?1:s>u?-1:0:o<0&&l<0?s<u?-1:s>u?1:0:l<o?-1:l>o?1:0}}}]),t}(),Vm=0,Um=function(){function t(e,i,n,r){Tm(this,t),this.id=++Vm,this.leftSE=e,e.segment=this,e.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=e,this.rings=n,this.windings=r}return km(t,null,[{key:"compare",value:function(t,e){var i=t.leftSE.point.x,n=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(o<i)return 1;if(r<n)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,u=e.rightSE.point.y;if(i<n){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;var c=e.comparePoint(t.rightSE.point);return 0!==c?c:-1}if(i>n){if(s<a&&s<u)return-1;if(s>a&&s>u)return 1;var p=e.comparePoint(t.leftSE.point);if(0!==p)return p;var d=t.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(r<o){var f=e.comparePoint(t.rightSE.point);if(0!==f)return f}if(r>o){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(r!==o){var g=l-s,m=r-i,v=u-a,_=o-n;if(g>m&&v<_)return 1;if(g<m&&v>_)return-1}return r>o?1:r<o||l<u?-1:l>u?1:t.id<e.id?-1:t.id>e.id?1:0}}]),km(t,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,i=this.rightSE.point,n=this.vector();if(e.x===i.x)return t.x===e.x?0:t.x<e.x?1:-1;var r=(t.y-e.y)/n.y,o=e.x+r*n.x;if(t.x===o)return 0;var s=(t.x-e.x)/n.x,a=e.y+s*n.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),i=t.bbox(),n=Om(e,i);if(null===n)return null;var r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=Pm(e,s)&&0===this.comparePoint(s),u=Pm(i,r)&&0===t.comparePoint(r),h=Pm(e,a)&&0===this.comparePoint(a),c=Pm(i,o)&&0===t.comparePoint(o);if(u&&l)return c&&!h?o:!c&&h?a:null;if(u)return h&&r.x===a.x&&r.y===a.y?null:r;if(l)return c&&o.x===s.x&&o.y===s.y?null:s;if(c&&h)return null;if(c)return o;if(h)return a;var p=function(t,e,i,n){if(0===e.x)return Wm(i,n,t.x);if(0===n.x)return Wm(t,e,i.x);if(0===e.y)return Bm(i,n,t.y);if(0===n.y)return Bm(t,e,i.y);var r=Lm(e,n);if(0==r)return null;var o={x:i.x-t.x,y:i.y-t.y},s=Lm(o,e)/r,a=Lm(o,n)/r;return{x:(t.x+a*e.x+(i.x+s*n.x))/2,y:(t.y+a*e.y+(i.y+s*n.y))/2}}(r,this.vector(),s,t.vector());return null===p?null:Pm(n,p)?Am.round(p.x,p.y):null}},{key:"split",value:function(e){var i=[],n=void 0!==e.events,r=new qm(e,!0),o=new qm(e,!1),s=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(r);var a=new t(r,s,this.rings.slice(),this.windings.slice());return qm.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),qm.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),i}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,i=this.windings.length;e<i;e++)this.windings[e]*=-1}},{key:"consume",value:function(e){for(var i=this,n=e;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var r=t.compare(i,n);if(0!==r){if(r>0){var o=i;i=n,n=o}if(i.prev===n){var s=i;i=n,n=s}for(var a=0,l=n.rings.length;a<l;a++){var u=n.rings[a],h=n.windings[a],c=i.rings.indexOf(u);-1===c?(i.rings.push(u),i.windings.push(h)):i.windings[c]+=h}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys,r=0,o=this.rings.length;r<o;r++){var s=this.rings[r],a=this.windings[r],l=e.indexOf(s);-1===l?(e.push(s),i.push(a)):i[l]+=a}for(var u=[],h=[],c=0,p=e.length;c<p;c++)if(0!==i[c]){var d=e[c],f=d.poly;if(-1===h.indexOf(f))if(d.isExterior)u.push(f);else{-1===h.indexOf(f)&&h.push(f);var y=u.indexOf(d.poly);-1!==y&&u.splice(y,1)}}for(var g=0,m=u.length;g<m;g++){var v=u[g].multiPoly;-1===n.indexOf(v)&&n.push(v)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(ev.type){case"union":var i=0===t.length,n=0===e.length;this._isInResult=i!==n;break;case"intersection":var r,o;t.length<e.length?(r=t.length,o=e.length):(r=e.length,o=t.length),this._isInResult=o===ev.numMultiPolys&&r<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(ev.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,i,n){var r,o,s,a=qm.comparePoints(e,i);if(a<0)r=e,o=i,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));r=i,o=e,s=-1}return new t(new qm(r,!0),new qm(o,!1),[n],[s])}}]),t}(),Xm=function(){function t(e,i,n){if(Tm(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=n,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=Am.round(e[0][0],e[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=e.length;s<a;s++){if("number"!=typeof e[s][0]||"number"!=typeof e[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=Am.round(e[s][0],e[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Um.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}r.x===o.x&&r.y===o.y||this.segments.push(Um.fromRing(o,r,this))}return km(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,i=this.segments.length;e<i;e++){var n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}}]),t}(),Km=function(){function t(e,i){if(Tm(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Xm(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=e.length;n<r;n++){var o=new Xm(e[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=i}return km(t,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,i=this.interiorRings.length;e<i;e++)for(var n=this.interiorRings[e].getSweepEvents(),r=0,o=n.length;r<o;r++)t.push(n[r]);return t}}]),t}(),Ym=function(){function t(e,i){if(Tm(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch(s){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=e.length;n<r;n++){var o=new Km(e[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=i}return km(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,i=this.polys.length;e<i;e++)for(var n=this.polys[e].getSweepEvents(),r=0,o=n.length;r<o;r++)t.push(n[r]);return t}}]),t}(),Zm=function(){function t(e){Tm(this,t),this.events=e;for(var i=0,n=e.length;i<n;i++)e[i].segment.ringOut=this;this.poly=null}return km(t,null,[{key:"factory",value:function(e){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,l=o.rightSE,u=[a],h=a.point,c=[];s=a,a=l,u.push(a),a.point!==h;)for(;;){var p=a.getAvailableLinkedEvents();if(0===p.length){var d=u[0].point,f=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(f.x,", ").concat(f.y,"]."))}if(1===p.length){l=p[0].otherSE;break}for(var y=null,g=0,m=c.length;g<m;g++)if(c[g].point===a.point){y=g;break}if(null===y){c.push({index:u.length,point:a.point});var v=a.getLeftmostComparator(s);l=p.sort(v)[0].otherSE;break}var _=c.splice(y)[0],x=u.splice(_.index);x.unshift(x[0].otherSE),i.push(new t(x.reverse()))}i.push(new t(u))}}return i}}]),km(t,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],i=1,n=this.events.length-1;i<n;i++){var r=this.events[i].point,o=this.events[i+1].point;0!==Dm(r,t,o)&&(e.push(r),t=r)}if(1===e.length)return null;var s=e[0],a=e[1];0===Dm(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,u=this.isExteriorRing()?0:e.length-1,h=this.isExteriorRing()?e.length:-1,c=[],p=u;p!=h;p+=l)c.push([e[p].x,e[p].y]);return c}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,i=this.events.length;e<i;e++){var n=this.events[e];qm.compare(t,n)>0&&(t=n)}for(var r=t.segment.prevInResult(),o=r?r.prevInResult():null;;){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),t}(),Hm=function(){function t(e){Tm(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return km(t,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,i=this.interiorRings.length;e<i;e++){var n=this.interiorRings[e].getGeom();null!==n&&t.push(n)}return t}}]),t}(),$m=function(){function t(e){Tm(this,t),this.rings=e,this.polys=this._composePolys(e)}return km(t,[{key:"getGeom",value:function(){for(var t=[],e=0,i=this.polys.length;e<i;e++){var n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}},{key:"_composePolys",value:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];if(!r.poly)if(r.isExteriorRing())e.push(new Hm(r));else{var o=r.enclosingRing();o.poly||e.push(new Hm(o)),o.poly.addInterior(r)}}return e}}]),t}(),Jm=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Um.compare;Tm(this,t),this.queue=e,this.tree=new bm(i),this.segments=[]}return km(t,[{key:"process",value:function(t){var e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),i;var n=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!n)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var r=n,o=n,s=void 0,a=void 0;void 0===s;)null===(r=this.tree.prev(r))?s=null:void 0===r.key.consumedBy&&(s=r.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var u=s.getIntersection(e);if(null!==u&&(e.isAnEndpoint(u)||(l=u),!s.isAnEndpoint(u)))for(var h=this._splitSafely(s,u),c=0,p=h.length;c<p;c++)i.push(h[c])}var d=null;if(a){var f=a.getIntersection(e);if(null!==f&&(e.isAnEndpoint(f)||(d=f),!a.isAnEndpoint(f)))for(var y=this._splitSafely(a,f),g=0,m=y.length;g<m;g++)i.push(y[g])}if(null!==l||null!==d){var v=null;if(null===l)v=d;else if(null===d)v=l;else{v=qm.comparePoints(l,d)<=0?l:d}this.queue.remove(e.rightSE),i.push(e.rightSE);for(var _=e.split(v),x=0,b=_.length;x<b;x++)i.push(_[x])}i.length>0?(this.tree.remove(e),i.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var w=s.getIntersection(a);if(null!==w){if(!s.isAnEndpoint(w))for(var S=this._splitSafely(s,w),C=0,T=S.length;C<T;C++)i.push(S[C]);if(!a.isAnEndpoint(w))for(var E=this._splitSafely(a,w),k=0,P=E.length;k<P;k++)i.push(E[k])}}this.tree.remove(e)}return i}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var i=t.rightSE;this.queue.remove(i);var n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.insert(t),n}}]),t}(),Qm="undefined"!=typeof process&&{}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,tv="undefined"!=typeof process&&{}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,ev=new(function(){function t(){Tm(this,t)}return km(t,[{key:"run",value:function(t,e,i){ev.type=t,Am.reset();for(var n=[new Ym(e,!0)],r=0,o=i.length;r<o;r++)n.push(new Ym(i[r],!1));if(ev.numMultiPolys=n.length,"difference"===ev.type)for(var s=n[0],a=1;a<n.length;)null!==Om(n[a].bbox,s.bbox)?a++:n.splice(a,1);if("intersection"===ev.type)for(var l=0,u=n.length;l<u;l++)for(var h=n[l],c=l+1,p=n.length;c<p;c++)if(null===Om(h.bbox,n[c].bbox))return[];for(var d=new bm(qm.compare),f=0,y=n.length;f<y;f++)for(var g=n[f].getSweepEvents(),m=0,v=g.length;m<v;m++)if(d.insert(g[m]),d.size>Qm)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new Jm(d),x=d.size,b=d.pop();b;){var w=b.key;if(d.size===x){var S=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>Qm)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>tv)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var C=_.process(w),T=0,E=C.length;T<E;T++){var k=C[T];void 0===k.consumedBy&&d.insert(k)}x=d.size,b=d.pop()}Am.reset();var P=Zm.factory(_.segments);return new $m(P).getGeom()}}]),t}()),iv=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return ev.run("union",t,i)};function nv(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function rv(t){return"Feature"===t.type?t.geometry:t}function ov(t,e,i){void 0===i&&(i={});var n=rv(t),r=rv(e),o=iv(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?function(t,e,i){void 0===i&&(i={});for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return nv({type:"Polygon",coordinates:t},e,i)}(o[0],i.properties):function(t,e,i){return void 0===i&&(i={}),nv({type:"MultiPolygon",coordinates:t},e,i)}(o,i.properties)}function sv(t,e){const i=Ln(t),n=Math.round(100*i)/100;let r;return"m2"===e?r=n+" m²":"ha"===e&&(r=n/1e4+" ha"),r}function av(t,e,i){const n=e.getExtent();return t.getView().fit(Ui(n,i))}function lv(t,e){const[i,n,r]=Array.from(Tr(t));return br([i,n,r,e])}const uv="https://api.os.uk/features/v1/wfs",hv=new Ac,cv=new Ac;function pv(t,e){const i=`\n <ogc:Filter>\n <ogc:Contains>\n <ogc:PropertyName>SHAPE</ogc:PropertyName>\n <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">\n <gml:coordinates>${(n=t,o=er(n,void 0!==r?r:"EPSG:3857","EPSG:4326"),s=o[0],(s<-180||s>180)&&(o[0]=Me(s+180,360)-180),o).reverse().join(",")}</gml:coordinates>\n </gml:Point>\n </ogc:Contains>\n </ogc:Filter>\n `;var n,r,o,s;fetch(function(t){const e=Object.keys(t).map((e=>e+"="+encodeURI(t[e]))).join("&");return`${uv}?${e}`}({key:e,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:i,count:1})).then((t=>t.json())).then((t=>{if(!t.features.length)return;const e=t.features[0].properties,i=["TOID","DescriptiveGroup"];Object.keys(e).forEach((t=>i.includes(t)||delete e[t]));const n=new ja;n.readFeatures(t,{featureProjection:"EPSG:3857"}).forEach((t=>{const e=t.getProperties().TOID,i=hv.getFeatureById(e);i?hv.removeFeature(i):(t.setId(e),hv.addFeature(t))})),cv.clear(),cv.addFeature(n.readFeature(hv.getFeatures().reduce(((t,e)=>{const i=n.writeFeatureObject(e).geometry;return t?ov(t,i):i}),null)))})).catch((t=>console.log(t)))}const dv="© Crown copyright and database rights 2021 OS (0)100019252";var fv,yv,gv=Object.freeze,mv=Object.defineProperty,vv=Object.getOwnPropertyDescriptor,_v=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?vv(e,i):e,s=t.length-1;s>=0;s--)(r=t[s])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&mv(e,i,o),o};t.MyMap=class extends it{constructor(){super(...arguments),this.latitude=51.507351,this.longitude=-.127758,this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBuffer=40,this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="",this.osFeaturesApiKey="",this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.ariaLabel="Interactive map",this.showScale=!1,this.useScaleBarStyle=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("#map"),i=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),n=(r=this.osVectorTilesApiKey,new Cd({source:r?new Hg({url:"https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key="+r,attributions:[dv],attributionsCollapsible:!1,maxZoom:20}):new Qg({attributions:[Jg]})}));var r;const o=function(t){let e=new Sp({declutter:!0,source:new nd({format:new Xl,url:"https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key="+t,attributions:[dv],attributionsCollapsible:!1})});return t&&fetch("https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key="+t).then((t=>t.json())).then((t=>Yg(e,t,"esri"))).catch((t=>console.log(t))),e}(this.osVectorTilesApiKey),s=new sd({target:e,layers:[i?o:n],view:new Ws({projection:"EPSG:3857",extent:(l=[-10.76418,49.528423,1.9134116,61.331151],u="EPSG:4326",h="EPSG:3857",Sn(l,tr(u,h),void 0,c)),minZoom:this.minZoom,maxZoom:this.maxZoom,center:$n([this.longitude,this.latitude]),zoom:this.zoom,enableRotation:!1}),controls:na({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[(a=this.useScaleBarStyle,new ia({units:"metric",bar:a,steps:4,text:!0,minWidth:140}))]:[]),interactions:sp({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});var a,l,u,h,c;const p=(d=this.drawPointer,new Uc({source:pm,type:"Polygon",style:new pl({stroke:am,fill:lm,image:"crosshair"===d?um:hm})}));var d;const f=function(t){return new ep({source:pm,style:new pl({image:"crosshair"===t?um:hm})})}(this.drawPointer),y=document.createElement("button");y.innerHTML="↻",y.title="Reset map view";y.addEventListener("click",(()=>{this.showFeaturesAtPoint?av(s,cv,this.featureBuffer):v.getFeatures().length>0?av(s,v,this.geojsonBuffer):(s.getView().setCenter($n([this.longitude,this.latitude])),s.getView().setZoom(this.zoom)),this.drawMode&&(pm.clear(),s.addInteraction(p),s.addInteraction(fm))}),!1);const g=document.createElement("div");g.className="reset-control ol-unselectable ol-control",g.appendChild(y);var m=new le({element:g});this.hideResetControl||s.addControl(m),s.on("pointerdrag",(()=>{s.getViewport().style.cursor="grabbing"})),s.on("pointermove",(()=>{s.getViewport().style.cursor="grab"}));const v=new Ac;if("FeatureCollection"===this.geojsonData.type){let t=(new ja).readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});v.addFeatures(t)}else if("Feature"===this.geojsonData.type){let t=(new ja).readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});v.addFeature(t)}const _=new vc({source:v,style:new pl({stroke:new el({color:this.geojsonColor,width:3}),fill:new Ma({color:this.geojsonFill?lv(this.geojsonColor,.2):lv(this.geojsonColor,0)})})});if(s.addLayer(_),v.getFeatures().length>0){av(s,v,this.geojsonBuffer);const t=v.getFeatures()[0].getGeometry();this.dispatch("geojsonDataArea",sv(t,this.areaUnit))}if(this.drawMode){const t=Object.keys(this.drawGeojsonData.geometry).length>0;if(t){let t=(new ja).readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});pm.addFeature(t),av(s,pm,this.drawGeojsonDataBuffer)}else pm.clear();s.addLayer(dm),t||s.addInteraction(p),s.addInteraction(f),s.addInteraction(fm),pm.on("change",(()=>{const t=pm.getFeatures();if(t.length>0){const i=(e=t,"string"==typeof e?e[e.length-1]||"":e[e.length-1]).getGeometry();this.dispatch("geojsonChange",(new ja).writeFeaturesObject(t,{featureProjection:"EPSG:3857"})),this.dispatch("areaChange",sv(i,this.areaUnit)),s.removeInteraction(p)}var e}))}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles&&(s.addLayer(nm),dm.setZIndex(1001),s.on("moveend",(()=>{s.getView().getZoom()<20?im.clear():setTimeout((()=>{im.clear();const t=s.getView().calculateExtent(s.getSize());rm(o,t)}),200)}))),this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){pv($n([this.longitude,this.latitude]),this.osFeaturesApiKey),this.clickFeatures&&s.on("singleclick",(t=>{pv(t.coordinate,this.osFeaturesApiKey)}));const t=(x=this.featureColor,b=this.featureFill,new vc({source:cv,style:new pl({stroke:new el({width:3,color:x}),fill:new Ma({color:lv(x,b?.2:0)})})}));s.addLayer(t),cv.on("change",(()=>{if("ready"===cv.getState()&&cv.getFeatures().length>0){av(s,cv,this.featureBuffer),this.dispatch("featuresGeojsonChange",(new ja).writeFeaturesObject(cv.getFeatures(),{featureProjection:"EPSG:3857"}));const t=cv.getFeatures()[0].getGeometry();this.dispatch("featuresAreaChange",sv(t,this.areaUnit))}}))}var x,b;setTimeout((()=>{window.dispatchEvent(new Event("resize")),e.style.opacity="1",this.dispatch("ready")}),500)}render(){return A(fv||(fv=gv(mv(t=['<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />\n <div id="map" tabindex="0" aria-label='," />"],"raw",{value:gv(e||t.slice())}))),this.ariaLabel);var t,e}},t.MyMap.styles=((t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return o(i)})`
|
39
|
+
var $d=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null};function Jd(t,e){return t>e?1:t<e?-1:0}function Qd(t,e,i){for(var n=new $d(null,null),r=n,o=n;;){var s=i(t,e.key);if(s<0){if(null===e.left)break;if(i(t,e.left.key)<0){var a=e.left;if(e.left=a.right,a.right=e,null===(e=a).left)break}o.left=e,o=e,e=e.left}else{if(!(s>0))break;if(null===e.right)break;if(i(t,e.right.key)>0){a=e.right;if(e.right=a.left,a.left=e,null===(e=a).right)break}r.right=e,r=e,e=e.right}}return r.right=e.left,o.left=e.right,e.left=n.right,e.right=n.left,e}function tf(t,e,i,n){var r=new $d(t,e);if(null===i)return r.left=r.right=null,r;var o=n(t,(i=Qd(t,i,n)).key);return o<0?(r.left=i.left,r.right=i,i.left=null):o>=0&&(r.right=i.right,r.left=i,i.right=null),r}function ef(t,e,i){var n=null,r=null;if(e){var o=i((e=Qd(t,e,i)).key,t);0===o?(n=e.left,r=e.right):o<0?(r=e.right,e.right=null,n=e):(n=e.left,e.left=null,r=e)}return{left:n,right:r}}function nf(t,e,i,n,r){if(t){n(e+(i?"└── ":"├── ")+r(t)+"\n");var o=e+(i?" ":"│ ");t.left&&nf(t.left,o,!1,n,r),t.right&&nf(t.right,o,!0,n,r)}}var rf=function(){function t(t){void 0===t&&(t=Jd),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=tf(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var i=new $d(t,e);null===this._root&&(i.left=i.right=null,this._size++,this._root=i);var n=this._comparator,r=Qd(t,this._root,n),o=n(t,r.key);return 0===o?this._root=r:(o<0?(i.left=r.left,i.right=r,r.left=null):o>0&&(i.right=r.right,i.left=r,r.right=null),this._size++,this._root=i),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,i){var n;return null===e?null:0===i(t,(e=Qd(t,e,i)).key)?(null===e.left?n=e.right:(n=Qd(t,e.left,i)).right=e.right,this._size--,n):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Qd(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,i=this._comparator;e;){var n=i(t,e.key);if(0===n)return e;e=n<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=Qd(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,i=this._comparator;e;){var n=i(t,e.key);if(0===n)return!0;e=n<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var i=this._root,n=[],r=!1;!r;)null!==i?(n.push(i),i=i.left):0!==n.length?(i=n.pop(),t.call(e,i),i=i.right):r=!0;return this},t.prototype.range=function(t,e,i,n){for(var r=[],o=this._comparator,s=this._root;0!==r.length||s;)if(s)r.push(s),s=s.left;else{if(o((s=r.pop()).key,e)>0)break;if(o(s.key,t)>=0&&i.call(n,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var i=e.key;return t.push(i)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var i=e.data;return t.push(i)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,i=!1,n=0,r=[];!i;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),n===t)return e;n++,e=e.right}else i=!0;return null},t.prototype.next=function(t){var e=this._root,i=null;if(t.right){for(i=t.right;i.left;)i=i.left;return i}for(var n=this._comparator;e;){var r=n(t.key,e.key);if(0===r)break;r<0?(i=e,e=e.left):e=e.right}return i},t.prototype.prev=function(t){var e=this._root,i=null;if(null!==t.left){for(i=t.left;i.right;)i=i.right;return i}for(var n=this._comparator;e;){var r=n(t.key,e.key);if(0===r)break;r<0?e=e.left:(i=e,e=e.right)}return i},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){var e=t,i=[],n=!1,r=new $d(null,null),o=r;for(;!n;)e?(i.push(e),e=e.left):i.length>0?e=(e=o=o.next=i.pop()).right:n=!0;return o.next=null,r.next}(this._root)},t.prototype.load=function(t,e,i){void 0===e&&(e=[]),void 0===i&&(i=!1);var n=t.length,r=this._comparator;if(i&&af(t,e,0,n-1,r),null===this._root)this._root=of(t,e,0,n),this._size=n;else{var o=function(t,e,i){var n=new $d(null,null),r=n,o=t,s=e;for(;null!==o&&null!==s;)i(o.key,s.key)<0?(r.next=o,o=o.next):(r.next=s,s=s.next),r=r.next;null!==o?r.next=o:null!==s&&(r.next=s);return n.next}(this.toList(),function(t,e){for(var i=new $d(null,null),n=i,r=0;r<t.length;r++)n=n.next=new $d(t[r],e[r]);return n.next=null,i.next}(t,e),r);n=this._size+n,this._root=sf({head:o},0,n)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return nf(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,i){var n=this._comparator,r=ef(t,this._root,n),o=r.left,s=r.right;n(t,e)<0?s=tf(e,i,s,n):o=tf(e,i,o,n),this._root=function(t,e,i){return null===e?t:(null===t||((e=Qd(t.key,e,i)).left=t),e)}(o,s,n)},t.prototype.split=function(t){return ef(t,this._root,this._comparator)},t}();function of(t,e,i,n){var r=n-i;if(r>0){var o=i+Math.floor(r/2),s=t[o],a=e[o],l=new $d(s,a);return l.left=of(t,e,i,o),l.right=of(t,e,o+1,n),l}return null}function sf(t,e,i){var n=i-e;if(n>0){var r=e+Math.floor(n/2),o=sf(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=sf(t,r+1,i),s}return null}function af(t,e,i,n,r){if(!(i>=n)){for(var o=t[i+n>>1],s=i-1,a=n+1;;){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}af(t,e,i,a,r),af(t,e,a+1,n,r)}}function lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uf(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hf(t,e,i){return e&&uf(t.prototype,e),i&&uf(t,i),t}var cf=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},pf=function(t,e){if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;var i=t.ll.x<e.ll.x?e.ll.x:t.ll.x,n=t.ur.x<e.ur.x?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y<e.ll.y?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y<e.ur.y?t.ur.y:e.ur.y}}},df=Number.EPSILON;void 0===df&&(df=Math.pow(2,-52));var ff=df*df,yf=function(t,e){if(-df<t&&t<df&&-df<e&&e<df)return 0;var i=t-e;return i*i<ff*t*e?0:t<e?-1:1},gf=function(){function t(){lf(this,t),this.reset()}return hf(t,[{key:"reset",value:function(){this.xRounder=new mf,this.yRounder=new mf}},{key:"round",value:function(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}]),t}(),mf=function(){function t(){lf(this,t),this.tree=new rf,this.round(0)}return hf(t,[{key:"round",value:function(t){var e=this.tree.add(t),i=this.tree.prev(e);if(null!==i&&0===yf(e.key,i.key))return this.tree.remove(t),i.key;var n=this.tree.next(e);return null!==n&&0===yf(e.key,n.key)?(this.tree.remove(t),n.key):t}}]),t}(),vf=new gf,_f=function(t,e){return t.x*e.y-t.y*e.x},xf=function(t,e){return t.x*e.x+t.y*e.y},bf=function(t,e,i){var n={x:e.x-t.x,y:e.y-t.y},r={x:i.x-t.x,y:i.y-t.y},o=_f(n,r);return yf(o,0)},wf=function(t){return Math.sqrt(xf(t,t))},Sf=function(t,e,i){var n={x:e.x-t.x,y:e.y-t.y},r={x:i.x-t.x,y:i.y-t.y};return xf(r,n)/wf(r)/wf(n)},Cf=function(t,e,i){return 0===e.y?null:{x:t.x+e.x/e.y*(i-t.y),y:i}},Tf=function(t,e,i){return 0===e.x?null:{x:i,y:t.y+e.y/e.x*(i-t.x)}},Ef=function(){function t(e,i){lf(this,t),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=i}return hf(t,null,[{key:"compare",value:function(e,i){var n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:Pf.compare(e.segment,i.segment))}},{key:"comparePoints",value:function(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}}]),hf(t,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,i=0,n=e.length;i<n;i++){var r=e[i];this.point.events.push(r),r.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var i=this.point.events[e];if(void 0===i.segment.consumedBy)for(var n=e+1;n<t;n++){var r=this.point.events[n];void 0===r.consumedBy&&(i.otherSE.point.events===r.otherSE.point.events&&i.segment.consume(r.segment))}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,i=this.point.events.length;e<i;e++){var n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,i=new Map,n=function(n){var r,o,s,a,l,u=n.otherSE;i.set(n,{sine:(r=e.point,o=t.point,s=u.point,a={x:o.x-r.x,y:o.y-r.y},l={x:s.x-r.x,y:s.y-r.y},_f(l,a)/wf(l)/wf(a)),cosine:Sf(e.point,t.point,u.point)})};return function(t,e){i.has(t)||n(t),i.has(e)||n(e);var r=i.get(t),o=r.sine,s=r.cosine,a=i.get(e),l=a.sine,u=a.cosine;return o>=0&&l>=0?s<u?1:s>u?-1:0:o<0&&l<0?s<u?-1:s>u?1:0:l<o?-1:l>o?1:0}}}]),t}(),kf=0,Pf=function(){function t(e,i,n,r){lf(this,t),this.id=++kf,this.leftSE=e,e.segment=this,e.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=e,this.rings=n,this.windings=r}return hf(t,null,[{key:"compare",value:function(t,e){var i=t.leftSE.point.x,n=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(o<i)return 1;if(r<n)return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,u=e.rightSE.point.y;if(i<n){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;var h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;var c=e.comparePoint(t.rightSE.point);return 0!==c?c:-1}if(i>n){if(s<a&&s<u)return-1;if(s>a&&s>u)return 1;var p=e.comparePoint(t.leftSE.point);if(0!==p)return p;var d=t.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(r<o){var f=e.comparePoint(t.rightSE.point);if(0!==f)return f}if(r>o){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(r!==o){var g=l-s,m=r-i,v=u-a,_=o-n;if(g>m&&v<_)return 1;if(g<m&&v>_)return-1}return r>o?1:r<o||l<u?-1:l>u?1:t.id<e.id?-1:t.id>e.id?1:0}}]),hf(t,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,i=this.rightSE.point,n=this.vector();if(e.x===i.x)return t.x===e.x?0:t.x<e.x?1:-1;var r=(t.y-e.y)/n.y,o=e.x+r*n.x;if(t.x===o)return 0;var s=(t.x-e.x)/n.x,a=e.y+s*n.y;return t.y===a?0:t.y<a?-1:1}},{key:"getIntersection",value:function(t){var e=this.bbox(),i=t.bbox(),n=pf(e,i);if(null===n)return null;var r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=cf(e,s)&&0===this.comparePoint(s),u=cf(i,r)&&0===t.comparePoint(r),h=cf(e,a)&&0===this.comparePoint(a),c=cf(i,o)&&0===t.comparePoint(o);if(u&&l)return c&&!h?o:!c&&h?a:null;if(u)return h&&r.x===a.x&&r.y===a.y?null:r;if(l)return c&&o.x===s.x&&o.y===s.y?null:s;if(c&&h)return null;if(c)return o;if(h)return a;var p=function(t,e,i,n){if(0===e.x)return Tf(i,n,t.x);if(0===n.x)return Tf(t,e,i.x);if(0===e.y)return Cf(i,n,t.y);if(0===n.y)return Cf(t,e,i.y);var r=_f(e,n);if(0==r)return null;var o={x:i.x-t.x,y:i.y-t.y},s=_f(o,e)/r,a=_f(o,n)/r;return{x:(t.x+a*e.x+(i.x+s*n.x))/2,y:(t.y+a*e.y+(i.y+s*n.y))/2}}(r,this.vector(),s,t.vector());return null===p?null:cf(n,p)?vf.round(p.x,p.y):null}},{key:"split",value:function(e){var i=[],n=void 0!==e.events,r=new Ef(e,!0),o=new Ef(e,!1),s=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(r);var a=new t(r,s,this.rings.slice(),this.windings.slice());return Ef.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Ef.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),i}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,i=this.windings.length;e<i;e++)this.windings[e]*=-1}},{key:"consume",value:function(e){for(var i=this,n=e;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var r=t.compare(i,n);if(0!==r){if(r>0){var o=i;i=n,n=o}if(i.prev===n){var s=i;i=n,n=s}for(var a=0,l=n.rings.length;a<l;a++){var u=n.rings[a],h=n.windings[a],c=i.rings.indexOf(u);-1===c?(i.rings.push(u),i.windings.push(h)):i.windings[c]+=h}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,i=this._afterState.windings,n=this._afterState.multiPolys,r=0,o=this.rings.length;r<o;r++){var s=this.rings[r],a=this.windings[r],l=e.indexOf(s);-1===l?(e.push(s),i.push(a)):i[l]+=a}for(var u=[],h=[],c=0,p=e.length;c<p;c++)if(0!==i[c]){var d=e[c],f=d.poly;if(-1===h.indexOf(f))if(d.isExterior)u.push(f);else{-1===h.indexOf(f)&&h.push(f);var y=u.indexOf(d.poly);-1!==y&&u.splice(y,1)}}for(var g=0,m=u.length;g<m;g++){var v=u[g].multiPoly;-1===n.indexOf(v)&&n.push(v)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(zf.type){case"union":var i=0===t.length,n=0===e.length;this._isInResult=i!==n;break;case"intersection":var r,o;t.length<e.length?(r=t.length,o=e.length):(r=e.length,o=t.length),this._isInResult=o===zf.numMultiPolys&&r<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e);break;default:throw new Error("Unrecognized operation type found ".concat(zf.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,i,n){var r,o,s,a=Ef.comparePoints(e,i);if(a<0)r=e,o=i,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));r=i,o=e,s=-1}return new t(new Ef(r,!0),new Ef(o,!1),[n],[s])}}]),t}(),Of=function(){function t(e,i,n){if(lf(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=n,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var r=vf.round(e[0][0],e[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};for(var o=r,s=1,a=e.length;s<a;s++){if("number"!=typeof e[s][0]||"number"!=typeof e[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=vf.round(e[s][0],e[s][1]);l.x===o.x&&l.y===o.y||(this.segments.push(Pf.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}r.x===o.x&&r.y===o.y||this.segments.push(Pf.fromRing(o,r,this))}return hf(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,i=this.segments.length;e<i;e++){var n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}}]),t}(),Rf=function(){function t(e,i){if(lf(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Of(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var n=1,r=e.length;n<r;n++){var o=new Of(e[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=i}return hf(t,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,i=this.interiorRings.length;e<i;e++)for(var n=this.interiorRings[e].getSweepEvents(),r=0,o=n.length;r<o;r++)t.push(n[r]);return t}}]),t}(),If=function(){function t(e,i){if(lf(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch(s){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var n=0,r=e.length;n<r;n++){var o=new Rf(e[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=i}return hf(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,i=this.polys.length;e<i;e++)for(var n=this.polys[e].getSweepEvents(),r=0,o=n.length;r<o;r++)t.push(n[r]);return t}}]),t}(),Ff=function(){function t(e){lf(this,t),this.events=e;for(var i=0,n=e.length;i<n;i++)e[i].segment.ringOut=this;this.poly=null}return hf(t,null,[{key:"factory",value:function(e){for(var i=[],n=0,r=e.length;n<r;n++){var o=e[n];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,l=o.rightSE,u=[a],h=a.point,c=[];s=a,a=l,u.push(a),a.point!==h;)for(;;){var p=a.getAvailableLinkedEvents();if(0===p.length){var d=u[0].point,f=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(d.x,",")+" ".concat(d.y,"]. Last matching segment found ends at")+" [".concat(f.x,", ").concat(f.y,"]."))}if(1===p.length){l=p[0].otherSE;break}for(var y=null,g=0,m=c.length;g<m;g++)if(c[g].point===a.point){y=g;break}if(null===y){c.push({index:u.length,point:a.point});var v=a.getLeftmostComparator(s);l=p.sort(v)[0].otherSE;break}var _=c.splice(y)[0],x=u.splice(_.index);x.unshift(x[0].otherSE),i.push(new t(x.reverse()))}i.push(new t(u))}}return i}}]),hf(t,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],i=1,n=this.events.length-1;i<n;i++){var r=this.events[i].point,o=this.events[i+1].point;0!==bf(r,t,o)&&(e.push(r),t=r)}if(1===e.length)return null;var s=e[0],a=e[1];0===bf(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,u=this.isExteriorRing()?0:e.length-1,h=this.isExteriorRing()?e.length:-1,c=[],p=u;p!=h;p+=l)c.push([e[p].x,e[p].y]);return c}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,i=this.events.length;e<i;e++){var n=this.events[e];Ef.compare(t,n)>0&&(t=n)}for(var r=t.segment.prevInResult(),o=r?r.prevInResult():null;;){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),t}(),Mf=function(){function t(e){lf(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return hf(t,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,i=this.interiorRings.length;e<i;e++){var n=this.interiorRings[e].getGeom();null!==n&&t.push(n)}return t}}]),t}(),jf=function(){function t(e){lf(this,t),this.rings=e,this.polys=this._composePolys(e)}return hf(t,[{key:"getGeom",value:function(){for(var t=[],e=0,i=this.polys.length;e<i;e++){var n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}},{key:"_composePolys",value:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];if(!r.poly)if(r.isExteriorRing())e.push(new Mf(r));else{var o=r.enclosingRing();o.poly||e.push(new Mf(o)),o.poly.addInterior(r)}}return e}}]),t}(),Af=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pf.compare;lf(this,t),this.queue=e,this.tree=new rf(i),this.segments=[]}return hf(t,[{key:"process",value:function(t){var e=t.segment,i=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),i;var n=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!n)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var r=n,o=n,s=void 0,a=void 0;void 0===s;)null===(r=this.tree.prev(r))?s=null:void 0===r.key.consumedBy&&(s=r.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var l=null;if(s){var u=s.getIntersection(e);if(null!==u&&(e.isAnEndpoint(u)||(l=u),!s.isAnEndpoint(u)))for(var h=this._splitSafely(s,u),c=0,p=h.length;c<p;c++)i.push(h[c])}var d=null;if(a){var f=a.getIntersection(e);if(null!==f&&(e.isAnEndpoint(f)||(d=f),!a.isAnEndpoint(f)))for(var y=this._splitSafely(a,f),g=0,m=y.length;g<m;g++)i.push(y[g])}if(null!==l||null!==d){var v=null;if(null===l)v=d;else if(null===d)v=l;else{v=Ef.comparePoints(l,d)<=0?l:d}this.queue.remove(e.rightSE),i.push(e.rightSE);for(var _=e.split(v),x=0,b=_.length;x<b;x++)i.push(_[x])}i.length>0?(this.tree.remove(e),i.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var w=s.getIntersection(a);if(null!==w){if(!s.isAnEndpoint(w))for(var S=this._splitSafely(s,w),C=0,T=S.length;C<T;C++)i.push(S[C]);if(!a.isAnEndpoint(w))for(var E=this._splitSafely(a,w),k=0,P=E.length;k<P;k++)i.push(E[k])}}this.tree.remove(e)}return i}},{key:"_splitSafely",value:function(t,e){this.tree.remove(t);var i=t.rightSE;this.queue.remove(i);var n=t.split(e);return n.push(i),void 0===t.consumedBy&&this.tree.insert(t),n}}]),t}(),Lf="undefined"!=typeof process&&{}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Df="undefined"!=typeof process&&{}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,zf=new(function(){function t(){lf(this,t)}return hf(t,[{key:"run",value:function(t,e,i){zf.type=t,vf.reset();for(var n=[new If(e,!0)],r=0,o=i.length;r<o;r++)n.push(new If(i[r],!1));if(zf.numMultiPolys=n.length,"difference"===zf.type)for(var s=n[0],a=1;a<n.length;)null!==pf(n[a].bbox,s.bbox)?a++:n.splice(a,1);if("intersection"===zf.type)for(var l=0,u=n.length;l<u;l++)for(var h=n[l],c=l+1,p=n.length;c<p;c++)if(null===pf(h.bbox,n[c].bbox))return[];for(var d=new rf(Ef.compare),f=0,y=n.length;f<y;f++)for(var g=n[f].getSweepEvents(),m=0,v=g.length;m<v;m++)if(d.insert(g[m]),d.size>Lf)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var _=new Af(d),x=d.size,b=d.pop();b;){var w=b.key;if(d.size===x){var S=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>Lf)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(_.segments.length>Df)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var C=_.process(w),T=0,E=C.length;T<E;T++){var k=C[T];void 0===k.consumedBy&&d.insert(k)}x=d.size,b=d.pop()}vf.reset();var P=Ff.factory(_.segments);return new jf(P).getGeom()}}]),t}()),Gf=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return zf.run("union",t,i)};function Nf(t,e,i){void 0===i&&(i={});var n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function Bf(t){return"Feature"===t.type?t.geometry:t}function Wf(t,e,i){void 0===i&&(i={});var n=Bf(t),r=Bf(e),o=Gf(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?function(t,e,i){void 0===i&&(i={});for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return Nf({type:"Polygon",coordinates:t},e,i)}(o[0],i.properties):function(t,e,i){return void 0===i&&(i={}),Nf({type:"MultiPolygon",coordinates:t},e,i)}(o,i.properties)}function qf(t,e){const i=Dn(t),n=Math.round(100*i)/100;let r;return"m2"===e?r=n+" m²":"ha"===e&&(r=n/1e4+" ha"),r}function Vf(t,e,i){const n=e.getExtent();return t.getView().fit(Xi(n,i))}function Uf(t,e){const[i,n,r]=Array.from(Er(t));return wr([i,n,r,e])}const Xf="https://api.os.uk/features/v1/wfs",Kf=new Dc,Yf=new Dc;function Zf(t,e){const i=`\n <ogc:Filter>\n <ogc:Contains>\n <ogc:PropertyName>SHAPE</ogc:PropertyName>\n <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">\n <gml:coordinates>${(n=t,o=ir(n,void 0!==r?r:"EPSG:3857","EPSG:4326"),s=o[0],(s<-180||s>180)&&(o[0]=Ae(s+180,360)-180),o).reverse().join(",")}</gml:coordinates>\n </gml:Point>\n </ogc:Contains>\n </ogc:Filter>\n `;var n,r,o,s;fetch(function(t){const e=Object.keys(t).map((e=>e+"="+encodeURI(t[e]))).join("&");return`${Xf}?${e}`}({key:e,service:"WFS",request:"GetFeature",version:"2.0.0",typeNames:"Topography_TopographicArea",propertyName:"TOID,DescriptiveGroup,SHAPE",outputFormat:"GEOJSON",srsName:"urn:ogc:def:crs:EPSG::4326",filter:i,count:1})).then((t=>t.json())).then((t=>{if(!t.features.length)return;const e=t.features[0].properties,i=["TOID","DescriptiveGroup"];Object.keys(e).forEach((t=>i.includes(t)||delete e[t]));const n=new Aa;n.readFeatures(t,{featureProjection:"EPSG:3857"}).forEach((t=>{const e=t.getProperties().TOID,i=Kf.getFeatureById(e);i?Kf.removeFeature(i):(t.setId(e),Kf.addFeature(t))})),Yf.clear(),Yf.addFeature(n.readFeature(Kf.getFeatures().reduce(((t,e)=>{const i=n.writeFeatureObject(e).geometry;return t?Wf(t,i):i}),null)))})).catch((t=>console.log(t)))}var Hf={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{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."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{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."}}},source_image:{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."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"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."}},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:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{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."},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:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* 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).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},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"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},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,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{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."}},"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:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},$f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Jf(t){var e={exports:{}};return t(e,e.exports),e.exports}function Qf(t,e){return Object.prototype.hasOwnProperty.call(t,e)}
|
40
|
+
/*! https://mths.be/punycode v1.3.2 by @mathias */
|
41
|
+
Jf((function(t,e){!function(i){var n=e&&!e.nodeType&&e,r=t&&!t.nodeType&&t,o="object"==typeof $f&&$f;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,a,l=2147483647,u=36,h=/^xn--/,c=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,y=String.fromCharCode;function g(t){throw RangeError(d[t])}function m(t,e){for(var i=t.length,n=[];i--;)n[i]=e(t[i]);return n}function v(t,e){var i=t.split("@"),n="";return i.length>1&&(n=i[0]+"@",t=i[1]),n+m((t=t.replace(p,".")).split("."),e).join(".")}function _(t){for(var e,i,n=[],r=0,o=t.length;r<o;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<o?56320==(64512&(i=t.charCodeAt(r++)))?n.push(((1023&e)<<10)+(1023&i)+65536):(n.push(e),r--):n.push(e);return n}function x(t){return m(t,(function(t){var e="";return t>65535&&(e+=y((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=y(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,i){var n=0;for(t=i?f(t/700):t>>1,t+=f(t/e);t>455;n+=u)t=f(t/35);return f(n+36*t/(t+38))}function S(t){var e,i,n,r,o,s,a,h,c,p,d,y=[],m=t.length,v=0,_=128,b=72;for((i=t.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)t.charCodeAt(n)>=128&&g("not-basic"),y.push(t.charCodeAt(n));for(r=i>0?i+1:0;r<m;){for(o=v,s=1,a=u;r>=m&&g("invalid-input"),((h=(d=t.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||h>f((l-v)/s))&&g("overflow"),v+=h*s,!(h<(c=a<=b?1:a>=b+26?26:a-b));a+=u)s>f(l/(p=u-c))&&g("overflow"),s*=p;b=w(v-o,e=y.length+1,0==o),f(v/e)>l-_&&g("overflow"),_+=f(v/e),v%=e,y.splice(v++,0,_)}return x(y)}function C(t){var e,i,n,r,o,s,a,h,c,p,d,m,v,x,S,C=[];for(m=(t=_(t)).length,e=128,i=0,o=72,s=0;s<m;++s)(d=t[s])<128&&C.push(y(d));for(n=r=C.length,r&&C.push("-");n<m;){for(a=l,s=0;s<m;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>f((l-i)/(v=n+1))&&g("overflow"),i+=(a-e)*v,e=a,s=0;s<m;++s)if((d=t[s])<e&&++i>l&&g("overflow"),d==e){for(h=i,c=u;!(h<(p=c<=o?1:c>=o+26?26:c-o));c+=u)S=h-p,x=u-p,C.push(y(b(p+S%x,0))),h=f(S/x);C.push(y(b(h,0))),o=w(i,v,n==r),i=0,++n}++i,++e}return C.join("")}if(s={version:"1.3.2",ucs2:{decode:_,encode:x},decode:S,encode:C,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+C(t):t}))},toUnicode:function(t){return v(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&r)if(t.exports==n)r.exports=s;else for(a in s)s.hasOwnProperty(a)&&(n[a]=s[a]);else i.punycode=s}($f)}));var ty=function(t,e,i,n){e=e||"&",i=i||"=";var r={};if("string"!=typeof t||0===t.length)return r;var o=/\+/g;t=t.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var l=0;l<a;++l){var u,h,c,p,d=t[l].replace(o,"%20"),f=d.indexOf(i);f>=0?(u=d.substr(0,f),h=d.substr(f+1)):(u=d,h=""),c=decodeURIComponent(u),p=decodeURIComponent(h),Qf(r,c)?Array.isArray(r[c])?r[c].push(p):r[c]=[r[c],p]:r[c]=p}return r},ey=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},iy=function(t,e,i,n){return e=e||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var r=encodeURIComponent(ey(n))+i;return Array.isArray(t[n])?t[n].map((function(t){return r+encodeURIComponent(ey(t))})).join(e):r+encodeURIComponent(ey(t[n]))})).join(e):n?encodeURIComponent(ey(n))+i+encodeURIComponent(ey(t)):""};Jf((function(t,e){e.decode=e.parse=ty,e.encode=e.stringify=iy}));class ny extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class ry{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[i,n]of e)this.bindings[i]=n}concat(t){return new ry(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const oy={kind:"null"},sy={kind:"number"},ay={kind:"string"},ly={kind:"boolean"},uy={kind:"color"},hy={kind:"object"},cy={kind:"value"},py={kind:"collator"},dy={kind:"formatted"},fy={kind:"resolvedImage"};function yy(t,e){return{kind:"array",itemType:t,N:e}}function gy(t){if("array"===t.kind){const e=gy(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const my=[oy,sy,ay,ly,uy,dy,hy,yy(cy),fy];function vy(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!vy(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of my)if(!vy(t,e))return null}return`Expected ${gy(t)} but found ${gy(e)} instead.`}function _y(t,e){return e.some((e=>e.kind===t.kind))}function xy(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var by=Jf((function(t,e){var i={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 n(t){return(t=Math.round(t))<0?0:t>255?255:t}function r(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function s(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function a(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{e.parseCSSColor=function(t){var e,r=t.replace(/ /g,"").toLowerCase();if(r in i)return i[r].slice();if("#"===r[0])return 4===r.length?(e=parseInt(r.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===r.length&&(e=parseInt(r.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=r.indexOf("("),u=r.indexOf(")");if(-1!==l&&u+1===r.length){var h=r.substr(0,l),c=r.substr(l+1,u-(l+1)).split(","),p=1;switch(h){case"rgba":if(4!==c.length)return null;p=s(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),p];case"hsla":if(4!==c.length)return null;p=s(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,f=s(c[1]),y=s(c[2]),g=y<=.5?y*(f+1):y+f-y*f,m=2*y-g;return[n(255*a(m,g,d+1/3)),n(255*a(m,g,d)),n(255*a(m,g,d-1/3)),p];default:return null}}return null}}catch(l){}}));class wy{constructor(t,e,i,n=1){this.r=t,this.g=e,this.b=i,this.a=n}static parse(t){if(!t)return;if(t instanceof wy)return t;if("string"!=typeof t)return;const e=by.parseCSSColor(t);return e?new wy(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,i,n]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(i)},${n})`}toArray(){const{r:t,g:e,b:i,a:n}=this;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*i/n,n]}}wy.black=new wy(0,0,0,1),wy.white=new wy(1,1,1,1),wy.transparent=new wy(0,0,0,0),wy.red=new wy(1,0,0,1),wy.blue=new wy(0,0,1,1);class Sy{constructor(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Cy{constructor(t,e,i,n,r){this.text=t,this.image=e,this.scale=i,this.fontStack=n,this.textColor=r}}class Ty{constructor(t){this.sections=t}static fromString(t){return new Ty([new Cy(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof Ty?t:Ty.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const i={};e.fontStack&&(i["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(i["font-scale"]=e.scale),e.textColor&&(i["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(i)}return t}}class Ey{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new Ey({name:t,available:!1}):null}serialize(){return["image",this.name]}}function ky(t,e,i,n){if(!("number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255)){return`Invalid rgba value [${("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}return void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[t,e,i,n].join(", ")}]: 'a' must be between 0 and 1.`}function Py(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof wy)return!0;if(t instanceof Sy)return!0;if(t instanceof Ty)return!0;if(t instanceof Ey)return!0;if(Array.isArray(t)){for(const e of t)if(!Py(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Py(t[e]))return!1;return!0}return!1}function Oy(t){if(null===t)return oy;if("string"==typeof t)return ay;if("boolean"==typeof t)return ly;if("number"==typeof t)return sy;if(t instanceof wy)return uy;if(t instanceof Sy)return py;if(t instanceof Ty)return dy;if(t instanceof Ey)return fy;if(Array.isArray(t)){const e=t.length;let i;for(const n of t){const t=Oy(n);if(i){if(i===t)continue;i=cy;break}i=t}return yy(i||cy,e)}return hy}function Ry(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof wy||t instanceof Ty||t instanceof Ey?t.toString():JSON.stringify(t)}class Iy{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Py(t[1]))return e.error("invalid value");const i=t[1];let n=Oy(i);const r=e.expectedType;return"array"!==n.kind||0!==n.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(n=r),new Iy(n,i)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof wy?["rgba"].concat(this.value.toArray()):this.value instanceof Ty?this.value.serialize():this.value}}class Fy{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const My={string:ay,number:sy,boolean:ly,object:hy};class jy{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let i,n=1;const r=t[0];if("array"===r){let r,o;if(t.length>2){const i=t[1];if("string"!=typeof i||!(i in My)||"object"===i)return e.error('The item type argument of "array" must be one of string, number, boolean',1);r=My[i],n++}else r=cy;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}i=yy(r,o)}else i=My[r];const o=[];for(;n<t.length;n++){const i=e.parse(t[n],n,cy);if(!i)return null;o.push(i)}return new jy(i,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const i=this.args[e].evaluate(t);if(!vy(this.type,Oy(i)))return i;if(e===this.args.length-1)throw new Fy(`Expected value to be of type ${gy(this.type)}, but found ${gy(Oy(i))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);const n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((t=>t.serialize())))}}class Ay{constructor(t){this.type=dy,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");const n=[];let r=!1;for(let o=1;o<=t.length-1;++o){const i=t[o];if(r&&"object"==typeof i&&!Array.isArray(i)){r=!1;let t=null;if(i["font-scale"]&&(t=e.parse(i["font-scale"],1,sy),!t))return null;let o=null;if(i["text-font"]&&(o=e.parse(i["text-font"],1,yy(ay)),!o))return null;let s=null;if(i["text-color"]&&(s=e.parse(i["text-color"],1,uy),!s))return null;const a=n[n.length-1];a.scale=t,a.font=o,a.textColor=s}else{const i=e.parse(t[o],1,cy);if(!i)return null;const s=i.type.kind;if("string"!==s&&"value"!==s&&"null"!==s&&"resolvedImage"!==s)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:i,scale:null,font:null,textColor:null})}}return new Ay(n)}evaluate(t){return new Ty(this.sections.map((e=>{const i=e.content.evaluate(t);return Oy(i)===fy?new Cy("",i,null,null,null):new Cy(Ry(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const i={};e.scale&&(i["font-scale"]=e.scale.serialize()),e.font&&(i["text-font"]=e.font.serialize()),e.textColor&&(i["text-color"]=e.textColor.serialize()),t.push(i)}return t}}class Ly{constructor(t){this.type=fy,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,ay);return i?new Ly(i):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),i=Ey.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Dy={"to-boolean":ly,"to-color":uy,"to-number":sy,"to-string":ay};class zy{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");const n=Dy[i],r=[];for(let o=1;o<t.length;o++){const i=e.parse(t[o],o,cy);if(!i)return null;r.push(i)}return new zy(n,r)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,i;for(const n of this.args){if(e=n.evaluate(t),i=null,e instanceof wy)return e;if("string"==typeof e){const i=t.parseColor(e);if(i)return i}else if(Array.isArray(e)&&(i=e.length<3||e.length>4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:ky(e[0],e[1],e[2],e[3]),!i))return new wy(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Fy(i||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const i of this.args){if(e=i.evaluate(t),null===e)return 0;const n=Number(e);if(!isNaN(n))return n}throw new Fy(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?Ty.fromString(Ry(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Ey.fromString(Ry(this.args[0].evaluate(t))):Ry(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new Ay([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Ly(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Gy=["Unknown","Point","LineString","Polygon"];class Ny{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?"number"==typeof this.feature.type?Gy[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=wy.parse(t)),e}}class By{constructor(t,e,i,n){this.name=t,this.type=e,this._evaluate=i,this.args=n}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const i=t[0],n=By.definitions[i];if(!n)return e.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0);const r=Array.isArray(n)?n[0]:n.type,o=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=o.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let a=null;for(const[l,u]of s){a=new cg(e.registry,e.path,null,e.scope);const n=[];let o=!1;for(let e=1;e<t.length;e++){const i=t[e],r=Array.isArray(l)?l[e-1]:l.type,s=a.parse(i,1+n.length,r);if(!s){o=!0;break}n.push(s)}if(!o)if(Array.isArray(l)&&l.length!==n.length)a.error(`Expected ${l.length} arguments, but found ${n.length} instead.`);else{for(let t=0;t<n.length;t++){const e=Array.isArray(l)?l[t]:l.type,i=n[t];a.concat(t+1).checkSubtype(e,i.type)}if(0===a.errors.length)return new By(i,r,u,n)}}if(1===s.length)e.errors.push(...a.errors);else{const i=(s.length?s:o).map((([t])=>{return e=t,Array.isArray(e)?`(${e.map(gy).join(", ")})`:`(${gy(e.type)}...)`;var e})).join(" | "),n=[];for(let r=1;r<t.length;r++){const i=e.parse(t[r],1+n.length);if(!i)return null;n.push(gy(i.type))}e.error(`Expected arguments of type ${i}, but found (${n.join(", ")}) instead.`)}return null}static register(t,e){By.definitions=e;for(const i in e)t[i]=By}}class Wy{constructor(t,e,i){this.type=py,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");const n=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,ly);if(!n)return null;const r=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,ly);if(!r)return null;let o=null;return i.locale&&(o=e.parse(i.locale,1,ay),!o)?null:new Wy(n,r,o)}evaluate(t){return new Sy(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}const qy=8192;function Vy(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Uy(t,e){return!(t[0]<=e[0])&&(!(t[2]>=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Xy(t,e){const i=(180+t[0])/360;const n=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360);var r;const o=Math.pow(2,e.z);return[Math.round(i*o*qy),Math.round(n*o*qy)]}function Ky(t,e,i){const n=t[0]-e[0],r=t[1]-e[1],o=t[0]-i[0],s=t[1]-i[1];return n*s-o*r==0&&n*o<=0&&r*s<=0}function Yy(t,e){let i=!1;for(let s=0,a=e.length;s<a;s++){const a=e[s];for(let e=0,s=a.length;e<s-1;e++){if(Ky(t,a[e],a[e+1]))return!1;n=t,r=a[e],o=a[e+1],r[1]>n[1]!=o[1]>n[1]&&n[0]<(o[0]-r[0])*(n[1]-r[1])/(o[1]-r[1])+r[0]&&(i=!i)}}var n,r,o;return i}function Zy(t,e){for(let i=0;i<e.length;i++)if(Yy(t,e[i]))return!0;return!1}function Hy(t,e,i,n){const r=t[0]-i[0],o=t[1]-i[1],s=e[0]-i[0],a=e[1]-i[1],l=n[0]-i[0],u=n[1]-i[1],h=r*u-l*o,c=s*u-l*a;return h>0&&c<0||h<0&&c>0}function $y(t,e,i,n){const r=[e[0]-t[0],e[1]-t[1]],o=[n[0]-i[0],n[1]-i[1]];return 0!=(s=o)[0]*(a=r)[1]-s[1]*a[0]&&!(!Hy(t,e,i,n)||!Hy(i,n,t,e));var s,a}function Jy(t,e,i){for(const n of i)for(let i=0;i<n.length-1;++i)if($y(t,e,n[i],n[i+1]))return!0;return!1}function Qy(t,e){for(let i=0;i<t.length;++i)if(!Yy(t[i],e))return!1;for(let i=0;i<t.length-1;++i)if(Jy(t[i],t[i+1],e))return!1;return!0}function tg(t,e){for(let i=0;i<e.length;i++)if(Qy(t,e[i]))return!0;return!1}function eg(t,e,i){const n=[];for(let r=0;r<t.length;r++){const o=[];for(let n=0;n<t[r].length;n++){const s=Xy(t[r][n],i);Vy(e,s),o.push(s)}n.push(o)}return n}function ig(t,e,i){const n=[];for(let r=0;r<t.length;r++){const o=eg(t[r],e,i);n.push(o)}return n}function ng(t,e,i,n){if(t[0]<i[0]||t[0]>i[2]){const e=.5*n;let r=t[0]-i[0]>e?-n:i[0]-t[0]>e?n:0;0===r&&(r=t[0]-i[2]>e?-n:i[2]-t[0]>e?n:0),t[0]+=r}Vy(e,t)}function rg(t,e,i,n){const r=Math.pow(2,n.z)*qy,o=[n.x*qy,n.y*qy],s=[];for(const a of t)for(const t of a){const n=[t.x+o[0],t.y+o[1]];ng(n,e,i,r),s.push(n)}return s}function og(t,e,i,n){const r=Math.pow(2,n.z)*qy,o=[n.x*qy,n.y*qy],s=[];for(const l of t){const t=[];for(const i of l){const n=[i.x+o[0],i.y+o[1]];Vy(e,n),t.push(n)}s.push(t)}if(e[2]-e[0]<=r/2){(a=e)[0]=a[1]=1/0,a[2]=a[3]=-1/0;for(const t of s)for(const n of t)ng(n,e,i,r)}var a;return s}class sg{constructor(t,e){this.type=ly,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Py(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const i=e.features[t].geometry.type;if("Polygon"===i||"MultiPolygon"===i)return new sg(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new sg(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new sg(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if("Polygon"===e.type){const o=eg(e.coordinates,n,r),s=rg(t.geometry(),i,n,r);if(!Uy(i,n))return!1;for(const t of s)if(!Yy(t,o))return!1}if("MultiPolygon"===e.type){const o=ig(e.coordinates,n,r),s=rg(t.geometry(),i,n,r);if(!Uy(i,n))return!1;for(const t of s)if(!Zy(t,o))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if("Polygon"===e.type){const o=eg(e.coordinates,n,r),s=og(t.geometry(),i,n,r);if(!Uy(i,n))return!1;for(const t of s)if(!Qy(t,o))return!1}if("MultiPolygon"===e.type){const o=ig(e.coordinates,n,r),s=og(t.geometry(),i,n,r);if(!Uy(i,n))return!1;for(const t of s)if(!tg(t,o))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}function ag(t){if(t instanceof By){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof sg)return!1;let e=!0;return t.eachChild((t=>{e&&!ag(t)&&(e=!1)})),e}function lg(t){if(t instanceof By&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!lg(t)&&(e=!1)})),e}function ug(t,e){if(t instanceof By&&e.indexOf(t.name)>=0)return!1;let i=!0;return t.eachChild((t=>{i&&!ug(t,e)&&(i=!1)})),i}class hg{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const i=t[1];return e.scope.has(i)?new hg(i,e.scope.get(i)):e.error(`Unknown variable "${i}". Make sure "${i}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class cg{constructor(t,e=[],i,n=new ry,r=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=n,this.errors=r,this.expectedType=i}parse(t,e,i,n,r={}){return e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)}_parse(t,e){function i(t,e,i){return"assert"===i?new jy(e,[t]):"coerce"===i?new zy(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=t[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const o=this.registry[r];if(o){let r=o.parse(t,this);if(!r)return null;if(this.expectedType){const t=this.expectedType,n=r.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else r=i(r,t,e.typeAnnotation||"coerce");else r=i(r,t,e.typeAnnotation||"assert")}if(!(r instanceof Iy)&&"resolvedImage"!==r.type.kind&&pg(r)){const t=new Ny;try{r=new Iy(r.type,r.evaluate(t))}catch(n){return this.error(n.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,i){const n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new cg(this.registry,n,e||null,r,this.errors)}error(t,...e){const i=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new ny(i,t))}checkSubtype(t,e){const i=vy(t,e);return i&&this.error(i),i}}function pg(t){if(t instanceof hg)return pg(t.boundExpression);if(t instanceof By&&"error"===t.name)return!1;if(t instanceof Wy)return!1;if(t instanceof sg)return!1;const e=t instanceof zy||t instanceof jy;let i=!0;return t.eachChild((t=>{i=e?i&&pg(t):i&&t instanceof Iy})),!!i&&(ag(t)&&ug(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"]))}function dg(t,e){const i=t.length-1;let n,r,o=0,s=i,a=0;for(;o<=s;)if(a=Math.floor((o+s)/2),n=t[a],r=t[a+1],n<=e){if(a===i||e<r)return a;o=a+1}else{if(!(n>e))throw new Fy("Input is not a number.");s=a-1}return 0}class fg{constructor(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[n,r]of i)this.labels.push(n),this.outputs.push(r)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const i=e.parse(t[1],1,sy);if(!i)return null;const n=[];let r=null;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(let o=1;o<t.length;o+=2){const i=1===o?-1/0:t[o],s=t[o+1],a=o,l=o+1;if("number"!=typeof i)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(n.length&&n[n.length-1][0]>=i)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);const u=e.parse(s,l,r);if(!u)return null;r=r||u.type,n.push([i,u])}return new fg(r,i,n)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);const r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);return i[dg(e,n)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var yg=gg;function gg(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}function mg(t,e,i){return t*(1-i)+e*i}gg.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},gg.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},gg.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},gg.prototype.solveCurveX=function(t,e){var i,n,r,o,s;for(void 0===e&&(e=1e-6),r=t,s=0;s<8;s++){if(o=this.sampleCurveX(r)-t,Math.abs(o)<e)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r-=o/a}if((r=t)<(i=0))return i;if(r>(n=1))return n;for(;i<n;){if(o=this.sampleCurveX(r),Math.abs(o-t)<e)return r;t>o?i=r:n=r,r=.5*(n-i)+i}return r},gg.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var vg=Object.freeze({__proto__:null,number:mg,color:function(t,e,i){return new wy(mg(t.r,e.r,i),mg(t.g,e.g,i),mg(t.b,e.b,i),mg(t.a,e.a,i))},array:function(t,e,i){return t.map(((t,n)=>mg(t,e[n],i)))}});const _g=.95047,xg=1.08883,bg=4/29,wg=6/29,Sg=3*wg*wg,Cg=Math.PI/180,Tg=180/Math.PI;function Eg(t){return t>.008856451679035631?Math.pow(t,1/3):t/Sg+bg}function kg(t){return t>wg?t*t*t:Sg*(t-bg)}function Pg(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Og(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Rg(t){const e=Og(t.r),i=Og(t.g),n=Og(t.b),r=Eg((.4124564*e+.3575761*i+.1804375*n)/_g),o=Eg((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*o-16,a:500*(r-o),b:200*(o-Eg((.0193339*e+.119192*i+.9503041*n)/xg)),alpha:t.a}}function Ig(t){let e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*kg(e),i=_g*kg(i),n=xg*kg(n),new wy(Pg(3.2404542*i-1.5371385*e-.4985314*n),Pg(-.969266*i+1.8760108*e+.041556*n),Pg(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}function Fg(t,e,i){const n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}const Mg={forward:Rg,reverse:Ig,interpolate:function(t,e,i){return{l:mg(t.l,e.l,i),a:mg(t.a,e.a,i),b:mg(t.b,e.b,i),alpha:mg(t.alpha,e.alpha,i)}}},jg={forward:function(t){const{l:e,a:i,b:n}=Rg(t),r=Math.atan2(n,i)*Tg;return{h:r<0?r+360:r,c:Math.sqrt(i*i+n*n),l:e,alpha:t.a}},reverse:function(t){const e=t.h*Cg,i=t.c;return Ig({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},interpolate:function(t,e,i){return{h:Fg(t.h,e.h,i),c:mg(t.c,e.c,i),l:mg(t.l,e.l,i),alpha:mg(t.alpha,e.alpha,i)}}};class Ag{constructor(t,e,i,n,r){this.type=t,this.operator=e,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(const[o,s]of r)this.labels.push(o),this.outputs.push(s)}static interpolationFactor(t,e,i,n){let r=0;if("exponential"===t.name)r=Lg(e,t.base,i,n);else if("linear"===t.name)r=Lg(e,1,i,n);else if("cubic-bezier"===t.name){const o=t.controlPoints;r=new yg(o[0],o[1],o[2],o[3]).solve(Lg(e,1,i,n))}return r}static parse(t,e){let[i,n,r,...o]=t;if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){const t=n[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:t}}else{if("cubic-bezier"!==n[0])return e.error(`Unknown interpolation type ${String(n[0])}`,1,0);{const t=n.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(r=e.parse(r,2,sy),!r)return null;const s=[];let a=null;"interpolate-hcl"===i||"interpolate-lab"===i?a=uy:e.expectedType&&"value"!==e.expectedType.kind&&(a=e.expectedType);for(let l=0;l<o.length;l+=2){const t=o[l],i=o[l+1],n=l+3,r=l+4;if("number"!=typeof t)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',n);if(s.length&&s[s.length-1][0]>=t)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);const u=e.parse(i,r,a);if(!u)return null;a=a||u.type,s.push([t,u])}return"number"===a.kind||"color"===a.kind||"array"===a.kind&&"number"===a.itemType.kind&&"number"==typeof a.N?new Ag(a,i,n,r,s):e.error(`Type ${gy(a)} is not interpolatable.`)}evaluate(t){const e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);const n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);const r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);const o=dg(e,n),s=e[o],a=e[o+1],l=Ag.interpolationFactor(this.interpolation,n,s,a),u=i[o].evaluate(t),h=i[o+1].evaluate(t);return"interpolate"===this.operator?vg[this.type.kind.toLowerCase()](u,h,l):"interpolate-hcl"===this.operator?jg.reverse(jg.interpolate(jg.forward(u),jg.forward(h),l)):Mg.reverse(Mg.interpolate(Mg.forward(u),Mg.forward(h),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let i=0;i<this.labels.length;i++)e.push(this.labels[i],this.outputs[i].serialize());return e}}function Lg(t,e,i,n){const r=n-i,o=t-i;return 0===r?0:1===e?o/r:(Math.pow(e,o)-1)/(Math.pow(e,r)-1)}class Dg{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let i=null;const n=e.expectedType;n&&"value"!==n.kind&&(i=n);const r=[];for(const s of t.slice(1)){const t=e.parse(s,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!t)return null;i=i||t.type,r.push(t)}const o=n&&r.some((t=>vy(n,t.type)));return new Dg(o?cy:i,r)}evaluate(t){let e,i=null,n=0;for(const r of this.args)if(n++,i=r.evaluate(t),i&&i instanceof Ey&&!i.available&&(e||(e=i.name),i=null,n===this.args.length&&(i=e)),null!==i)break;return i}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class zg{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const i=[];for(let r=1;r<t.length-1;r+=2){const n=t[r];if("string"!=typeof n)return e.error(`Expected string, but found ${typeof n} instead.`,r);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",r);const o=e.parse(t[r+1],r+1);if(!o)return null;i.push([n,o])}const n=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return n?new zg(i,n):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,i]of this.bindings)t.push(e,i.serialize());return t.push(this.result.serialize()),t}}class Gg{constructor(t,e,i){this.type=t,this.index=e,this.input=i}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,sy),n=e.parse(t[2],2,yy(e.expectedType||cy));if(!i||!n)return null;const r=n.type;return new Gg(r.itemType,i,n)}evaluate(t){const e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new Fy(`Array index out of bounds: ${e} < 0.`);if(e>=i.length)throw new Fy(`Array index out of bounds: ${e} > ${i.length-1}.`);if(e!==Math.floor(e))throw new Fy(`Array index must be an integer, but found ${e} instead.`);return i[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Ng{constructor(t,e){this.type=ly,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,cy),n=e.parse(t[2],2,cy);return i&&n?_y(i.type,[ly,ay,sy,oy,cy])?new Ng(i,n):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${gy(i.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!xy(e,["boolean","string","number","null"]))throw new Fy(`Expected first argument to be of type boolean, string, number or null, but found ${gy(Oy(e))} instead.`);if(!xy(i,["string","array"]))throw new Fy(`Expected second argument to be of type array or string, but found ${gy(Oy(i))} instead.`);return i.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class Bg{constructor(t,e,i){this.type=sy,this.needle=t,this.haystack=e,this.fromIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,cy),n=e.parse(t[2],2,cy);if(!i||!n)return null;if(!_y(i.type,[ly,ay,sy,oy,cy]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${gy(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,sy);return r?new Bg(i,n,r):null}return new Bg(i,n)}evaluate(t){const e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!xy(e,["boolean","string","number","null"]))throw new Fy(`Expected first argument to be of type boolean, string, number or null, but found ${gy(Oy(e))} instead.`);if(!xy(i,["string","array"]))throw new Fy(`Expected second argument to be of type array or string, but found ${gy(Oy(i))} instead.`);if(this.fromIndex){const n=this.fromIndex.evaluate(t);return i.indexOf(e,n)}return i.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class Wg{constructor(t,e,i,n,r,o){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let i,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);const r={},o=[];for(let l=2;l<t.length-1;l+=2){let s=t[l];const a=t[l+1];Array.isArray(s)||(s=[s]);const u=e.concat(l);if(0===s.length)return u.error("Expected at least one branch label.");for(const t of s){if("number"!=typeof t&&"string"!=typeof t)return u.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return u.error("Numeric branch labels must be integer values.");if(i){if(u.checkSubtype(i,Oy(t)))return null}else i=Oy(t);if(void 0!==r[String(t)])return u.error("Branch labels must be unique.");r[String(t)]=o.length}const h=e.parse(a,l,n);if(!h)return null;n=n||h.type,o.push(h)}const s=e.parse(t[1],1,cy);if(!s)return null;const a=e.parse(t[t.length-1],t.length-1,n);return a?"value"!==s.type.kind&&e.concat(1).checkSubtype(i,s.type)?null:new Wg(i,n,s,r,o,a):null}evaluate(t){const e=this.input.evaluate(t);return(Oy(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),i=[],n={};for(const o of e){const t=n[this.cases[o]];void 0===t?(n[this.cases[o]]=i.length,i.push([this.cases[o],[o]])):i[t][1].push(o)}const r=t=>"number"===this.inputType.kind?Number(t):t;for(const[o,s]of i)1===s.length?t.push(r(s[0])):t.push(s.map(r)),t.push(this.outputs[o].serialize());return t.push(this.otherwise.serialize()),t}}class qg{constructor(t,e,i){this.type=t,this.branches=e,this.otherwise=i}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const n=[];for(let o=1;o<t.length-1;o+=2){const r=e.parse(t[o],o,ly);if(!r)return null;const s=e.parse(t[o+1],o+1,i);if(!s)return null;n.push([r,s]),i=i||s.type}const r=e.parse(t[t.length-1],t.length-1,i);return r?new qg(i,n,r):null}evaluate(t){for(const[e,i]of this.branches)if(e.evaluate(t))return i.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,i]of this.branches)t(e),t(i);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class Vg{constructor(t,e,i,n){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=n}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const i=e.parse(t[1],1,cy),n=e.parse(t[2],2,sy);if(!i||!n)return null;if(!_y(i.type,[yy(cy),ay,cy]))return e.error(`Expected first argument to be of type array or string, but found ${gy(i.type)} instead`);if(4===t.length){const r=e.parse(t[3],3,sy);return r?new Vg(i.type,i,n,r):null}return new Vg(i.type,i,n)}evaluate(t){const e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!xy(e,["string","array"]))throw new Fy(`Expected first argument to be of type array or string, but found ${gy(Oy(e))} instead.`);if(this.endIndex){const n=this.endIndex.evaluate(t);return e.slice(i,n)}return e.slice(i)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function Ug(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Xg(t,e,i,n){return 0===n.compare(e,i)}function Kg(t,e,i){const n="=="!==t&&"!="!==t;return class r{constructor(t,e,i){this.type=ly,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const i=t[0];let o=e.parse(t[1],1,cy);if(!o)return null;if(!Ug(i,o.type))return e.concat(1).error(`"${i}" comparisons are not supported for type '${gy(o.type)}'.`);let s=e.parse(t[2],2,cy);if(!s)return null;if(!Ug(i,s.type))return e.concat(2).error(`"${i}" comparisons are not supported for type '${gy(s.type)}'.`);if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error(`Cannot compare types '${gy(o.type)}' and '${gy(s.type)}'.`);n&&("value"===o.type.kind&&"value"!==s.type.kind?o=new jy(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new jy(o.type,[s])));let a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return e.error("Cannot use collator to compare non-string types.");if(a=e.parse(t[3],3,py),!a)return null}return new r(o,s,a)}evaluate(r){const o=this.lhs.evaluate(r),s=this.rhs.evaluate(r);if(n&&this.hasUntypedArgument){const e=Oy(o),i=Oy(s);if(e.kind!==i.kind||"string"!==e.kind&&"number"!==e.kind)throw new Fy(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${i.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){const t=Oy(o),i=Oy(s);if("string"!==t.kind||"string"!==i.kind)return e(r,o,s)}return this.collator?i(r,o,s,this.collator.evaluate(r)):e(r,o,s)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Yg=Kg("==",(function(t,e,i){return e===i}),Xg),Zg=Kg("!=",(function(t,e,i){return e!==i}),(function(t,e,i,n){return!Xg(0,e,i,n)})),Hg=Kg("<",(function(t,e,i){return e<i}),(function(t,e,i,n){return n.compare(e,i)<0})),$g=Kg(">",(function(t,e,i){return e>i}),(function(t,e,i,n){return n.compare(e,i)>0})),Jg=Kg("<=",(function(t,e,i){return e<=i}),(function(t,e,i,n){return n.compare(e,i)<=0})),Qg=Kg(">=",(function(t,e,i){return e>=i}),(function(t,e,i,n){return n.compare(e,i)>=0}));class tm{constructor(t,e,i,n,r){this.type=ay,this.number=t,this.locale=e,this.currency=i,this.minFractionDigits=n,this.maxFractionDigits=r}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const i=e.parse(t[1],1,sy);if(!i)return null;const n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");let r=null;if(n.locale&&(r=e.parse(n.locale,1,ay),!r))return null;let o=null;if(n.currency&&(o=e.parse(n.currency,1,ay),!o))return null;let s=null;if(n["min-fraction-digits"]&&(s=e.parse(n["min-fraction-digits"],1,sy),!s))return null;let a=null;return n["max-fraction-digits"]&&(a=e.parse(n["max-fraction-digits"],1,sy),!a)?null:new tm(i,r,o,s,a)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class em{constructor(t){this.type=sy,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error(`Expected argument of type string or array, but found ${gy(i.type)} instead.`):new em(i):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Fy(`Expected value to be of type string or array, but found ${gy(Oy(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const im={"==":Yg,"!=":Zg,">":$g,"<":Hg,">=":Qg,"<=":Jg,array:jy,at:Gg,boolean:jy,case:qg,coalesce:Dg,collator:Wy,format:Ay,image:Ly,in:Ng,"index-of":Bg,interpolate:Ag,"interpolate-hcl":Ag,"interpolate-lab":Ag,length:em,let:zg,literal:Iy,match:Wg,number:jy,"number-format":tm,object:jy,slice:Vg,step:fg,string:jy,"to-boolean":zy,"to-color":zy,"to-number":zy,"to-string":zy,var:hg,within:sg};function nm(t,[e,i,n,r]){e=e.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);const o=r?r.evaluate(t):1,s=ky(e,i,n,o);if(s)throw new Fy(s);return new wy(e/255*o,i/255*o,n/255*o,o)}function rm(t,e){return t in e}function om(t,e){const i=e[t];return void 0===i?null:i}function sm(t){return{type:t}}function am(t){return{result:"success",value:t}}function lm(t){return{result:"error",value:t}}function um(t){return!!t.expression&&t.expression.interpolated}function hm(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}By.register(im,{error:[{kind:"error"},[ay],(t,[e])=>{throw new Fy(e.evaluate(t))}],typeof:[ay,[cy],(t,[e])=>gy(Oy(e.evaluate(t)))],"to-rgba":[yy(sy,4),[uy],(t,[e])=>e.evaluate(t).toArray()],rgb:[uy,[sy,sy,sy],nm],rgba:[uy,[sy,sy,sy,sy],nm],has:{type:ly,overloads:[[[ay],(t,[e])=>rm(e.evaluate(t),t.properties())],[[ay,hy],(t,[e,i])=>rm(e.evaluate(t),i.evaluate(t))]]},get:{type:cy,overloads:[[[ay],(t,[e])=>om(e.evaluate(t),t.properties())],[[ay,hy],(t,[e,i])=>om(e.evaluate(t),i.evaluate(t))]]},"feature-state":[cy,[ay],(t,[e])=>om(e.evaluate(t),t.featureState||{})],properties:[hy,[],t=>t.properties()],"geometry-type":[ay,[],t=>t.geometryType()],id:[cy,[],t=>t.id()],zoom:[sy,[],t=>t.globals.zoom],"heatmap-density":[sy,[],t=>t.globals.heatmapDensity||0],"line-progress":[sy,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[sy,[],t=>t.globals.skyRadialProgress||0],accumulated:[cy,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[sy,sm(sy),(t,e)=>{let i=0;for(const n of e)i+=n.evaluate(t);return i}],"*":[sy,sm(sy),(t,e)=>{let i=1;for(const n of e)i*=n.evaluate(t);return i}],"-":{type:sy,overloads:[[[sy,sy],(t,[e,i])=>e.evaluate(t)-i.evaluate(t)],[[sy],(t,[e])=>-e.evaluate(t)]]},"/":[sy,[sy,sy],(t,[e,i])=>e.evaluate(t)/i.evaluate(t)],"%":[sy,[sy,sy],(t,[e,i])=>e.evaluate(t)%i.evaluate(t)],ln2:[sy,[],()=>Math.LN2],pi:[sy,[],()=>Math.PI],e:[sy,[],()=>Math.E],"^":[sy,[sy,sy],(t,[e,i])=>Math.pow(e.evaluate(t),i.evaluate(t))],sqrt:[sy,[sy],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[sy,[sy],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[sy,[sy],(t,[e])=>Math.log(e.evaluate(t))],log2:[sy,[sy],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[sy,[sy],(t,[e])=>Math.sin(e.evaluate(t))],cos:[sy,[sy],(t,[e])=>Math.cos(e.evaluate(t))],tan:[sy,[sy],(t,[e])=>Math.tan(e.evaluate(t))],asin:[sy,[sy],(t,[e])=>Math.asin(e.evaluate(t))],acos:[sy,[sy],(t,[e])=>Math.acos(e.evaluate(t))],atan:[sy,[sy],(t,[e])=>Math.atan(e.evaluate(t))],min:[sy,sm(sy),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[sy,sm(sy),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[sy,[sy],(t,[e])=>Math.abs(e.evaluate(t))],round:[sy,[sy],(t,[e])=>{const i=e.evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[sy,[sy],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[sy,[sy],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[ly,[ay,cy],(t,[e,i])=>t.properties()[e.value]===i.value],"filter-id-==":[ly,[cy],(t,[e])=>t.id()===e.value],"filter-type-==":[ly,[ay],(t,[e])=>t.geometryType()===e.value],"filter-<":[ly,[ay,cy],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n<r}],"filter-id-<":[ly,[cy],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i<n}],"filter->":[ly,[ay,cy],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>r}],"filter-id->":[ly,[cy],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>n}],"filter-<=":[ly,[ay,cy],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n<=r}],"filter-id-<=":[ly,[cy],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i<=n}],"filter->=":[ly,[ay,cy],(t,[e,i])=>{const n=t.properties()[e.value],r=i.value;return typeof n==typeof r&&n>=r}],"filter-id->=":[ly,[cy],(t,[e])=>{const i=t.id(),n=e.value;return typeof i==typeof n&&i>=n}],"filter-has":[ly,[cy],(t,[e])=>e.value in t.properties()],"filter-has-id":[ly,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[ly,[yy(ay)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[ly,[yy(cy)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[ly,[ay,yy(cy)],(t,[e,i])=>i.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[ly,[ay,yy(cy)],(t,[e,i])=>function(t,e,i,n){for(;i<=n;){const r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[e.value],i.value,0,i.value.length-1)],all:{type:ly,overloads:[[[ly,ly],(t,[e,i])=>e.evaluate(t)&&i.evaluate(t)],[sm(ly),(t,e)=>{for(const i of e)if(!i.evaluate(t))return!1;return!0}]]},any:{type:ly,overloads:[[[ly,ly],(t,[e,i])=>e.evaluate(t)||i.evaluate(t)],[sm(ly),(t,e)=>{for(const i of e)if(i.evaluate(t))return!0;return!1}]]},"!":[ly,[ly],(t,[e])=>!e.evaluate(t)],"is-supported-script":[ly,[ay],(t,[e])=>{const i=t.globals&&t.globals.isSupportedScript;return!i||i(e.evaluate(t))}],upcase:[ay,[ay],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[ay,[ay],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[ay,sm(cy),(t,e)=>e.map((e=>Ry(e.evaluate(t)))).join("")],"resolved-locale":[ay,[py],(t,[e])=>e.evaluate(t).resolvedLocale()]});class cm{constructor(t,e){var i;this.expression=t,this._warningHistory={},this._evaluator=new Ny,this._defaultValue=e?"color"===(i=e).type&&hm(i.default)?new wy(0,0,0,0):"color"===i.type?wy.parse(i.default)||null:void 0===i.default?null:i.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(t,e,i,n,r,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=o||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Fy(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(s){return this._warningHistory[s.message]||(this._warningHistory[s.message]=!0,"undefined"!=typeof console&&console.warn(s.message)),this._defaultValue}}}function pm(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in im}function dm(t,e){const i=new cg(im,[],e?function(t){const e={color:uy,string:ay,number:sy,enum:ay,boolean:ly,formatted:dy,resolvedImage:fy};if("array"===t.type)return yy(e[t.value]||cy,t.length);return e[t.type]}(e):void 0),n=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?am(new cm(n,e)):lm(i.errors)}class fm{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!lg(e.expression)}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,o)}evaluate(t,e,i,n,r,o){return this._styleExpression.evaluate(t,e,i,n,r,o)}}class ym{constructor(t,e,i,n){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!lg(e.expression),this.interpolationType=n}evaluateWithoutErrorHandling(t,e,i,n,r,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,o)}evaluate(t,e,i,n,r,o){return this._styleExpression.evaluate(t,e,i,n,r,o)}interpolationFactor(t,e,i){return this.interpolationType?Ag.interpolationFactor(this.interpolationType,t,e,i):0}}function gm(t,e){if("error"===(t=dm(t,e)).result)return t;const i=t.value.expression,n=ag(i);if(!n&&("data-driven"!==(r=e)["property-type"]&&"cross-faded-data-driven"!==r["property-type"]))return lm([new ny("","data expressions not supported")]);var r;const o=ug(i,["zoom"]);if(!o&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return lm([new ny("","zoom expressions not supported")]);const s=mm(i);if(!s&&!o)return lm([new ny("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof ny)return lm([s]);if(s instanceof Ag&&!um(e))return lm([new ny("",'"interpolate" expressions cannot be used with this property')]);if(!s)return am(new fm(n?"constant":"source",t.value));const a=s instanceof Ag?s.interpolation:void 0;return am(new ym(n?"camera":"composite",t.value,s.labels,a))}function mm(t){let e=null;if(t instanceof zg)e=mm(t.result);else if(t instanceof Dg){for(const i of t.args)if(e=mm(i),e)break}else(t instanceof fg||t instanceof Ag)&&t.input instanceof By&&"zoom"===t.input.name&&(e=t);return e instanceof ny||t.eachChild((t=>{const i=mm(t);i instanceof ny?e=i:!e&&i?e=new ny("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new ny("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function vm(t){return"object"==typeof t?["literal",t]:t}function _m(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function xm(t,e){const i=vm((n=t.default,r=e.default,void 0!==n?n:void 0!==r?r:void 0));var n,r;return void 0===i&&"resolvedImage"===e.type?"":i}function bm(t,e,i){const n=Cm(t,e),r=["get",t.property];if("categorical"===n&&"boolean"==typeof i[0][0]){const n=["case"];for(const t of i)n.push(["==",r,t[0]],t[1]);return n.push(xm(t,e)),n}if("categorical"===n){const n=["match",r];for(const t of i)Sm(n,t[0],t[1],!1);return n.push(xm(t,e)),n}if("interval"===n){const e=["step",["number",r]];for(const t of i)Sm(e,t[0],t[1],!0);return wm(e),void 0===t.default?e:["case",["==",["typeof",r],"number"],e,vm(t.default)]}if("exponential"===n){const e=void 0!==t.base?t.base:1,n=[_m(t),1===e?["linear"]:["exponential",e],["number",r]];for(const t of i)Sm(n,t[0],t[1],!1);return void 0===t.default?n:["case",["==",["typeof",r],"number"],n,vm(t.default)]}throw new Error(`Unknown property function type ${n}`)}function wm(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function Sm(t,e,i,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(i))}function Cm(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function Tm(t){const e=["concat"],i=/{([^{}]+)}/g;let n=0;for(let r=i.exec(t);null!==r;r=i.exec(t)){const o=t.slice(n,i.lastIndex-r[0].length);n=i.lastIndex,o.length>0&&e.push(o),e.push(["get",r[1]])}if(1===e.length)return t;if(n<t.length)e.push(t.slice(n));else if(2===e.length)return["to-string",e[1]];return e}function Em(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!Em(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}const km={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Pm(t){if(null==t)return{filter:()=>!0,needGeometry:!1};Em(t)||(t=Im(t));const e=dm(t,km);if("error"===e.result)throw new Error(e.value.map((t=>`${t.key}: ${t.message}`)).join(", "));return{filter:(t,i,n)=>e.value.evaluate(t,i,{},n),needGeometry:Rm(t)}}function Om(t,e){return t<e?-1:t>e?1:0}function Rm(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e<t.length;e++)if(Rm(t[e]))return!0;return!1}function Im(t){if(!t)return!0;const e=t[0];if(t.length<=1)return"any"!==e;var i;return"=="===e?Fm(t[1],t[2],"=="):"!="===e?Am(Fm(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?Fm(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(Im))):"all"===e?["all"].concat(t.slice(1).map(Im)):"none"===e?["all"].concat(t.slice(1).map(Im).map(Am)):"in"===e?Mm(t[1],t.slice(2)):"!in"===e?Am(Mm(t[1],t.slice(2))):"has"===e?jm(t[1]):"!has"===e?Am(jm(t[1])):"within"!==e||t}function Fm(t,e,i){switch(t){case"$type":return[`filter-type-${i}`,e];case"$id":return[`filter-id-${i}`,e];default:return[`filter-${i}`,t,e]}}function Mm(t,e){if(0===e.length)return!1;switch(t){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",t,["literal",e.sort(Om)]]:["filter-in-small",t,["literal",e]]}}function jm(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Am(t){return["!",t]}var Lm=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Dm(t,e){const i={};for(const n in t)"ref"!==n&&(i[n]=t[n]);return Lm.forEach((t=>{t in e&&(i[t]=e[t])})),i}Jf((function(t,e){var i=function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,12],i=[1,13],n=[1,9],r=[1,10],o=[1,11],s=[1,14],a=[1,15],l=[14,18,22,24],u=[18,22],h=[22,24],c={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[a-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[a-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,12:1,13:2,15:7,16:8,17:s,23:a},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:23,15:7,16:8,17:s,23:a,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(u,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(h,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:30,15:7,16:8,17:s,23:a},t(l,[2,19]),{3:5,4:e,5:6,6:i,7:3,8:n,9:4,10:r,11:o,13:31,15:7,16:8,17:s,23:a},t(u,[2,17]),t(u,[2,15]),t(h,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,i=[0],n=[null],r=[],o=this.table,s="",a=0,l=0,u=2,h=1,c=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var g=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||h)&&(t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,_,x,b,w,S,C,T,E={};;){if(_=i[i.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==v&&(v=m()),x=o[_]&&o[_][v]),void 0===x||!x.length||!x[0]){var k="";for(w in T=[],o[_])this.terminals_[w]&&w>u&&T.push("'"+this.terminals_[w]+"'");k=p.showPosition?"Parse error on line "+(a+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(a+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(k,{text:p.match,token:this.terminals_[v]||v,line:p.yylineno,loc:y,expected:T})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+v);switch(x[0]){case 1:i.push(v),n.push(p.yytext),r.push(p.yylloc),i.push(x[1]),v=null,l=p.yyleng,s=p.yytext,a=p.yylineno,y=p.yylloc;break;case 2:if(S=this.productions_[x[1]][1],E.$=n[n.length-S],E._$={first_line:r[r.length-(S||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(S||1)].first_column,last_column:r[r.length-1].last_column},g&&(E._$.range=[r[r.length-(S||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(E,[s,l,a,d.yy,x[1],n,r].concat(c))))return b;S&&(i=i.slice(0,-1*S*2),n=n.slice(0,-1*S),r=r.slice(0,-1*S)),i.push(this.productions_[x[1]][0]),n.push(E.$),r.push(E._$),C=o[i[i.length-2]][i[i.length-1]],i.push(C);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;o<r.length;o++)if((i=this._input.match(this.rules[r[o]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,i,n){switch(i){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return c.lexer=p,d.prototype=c,c.Parser=d,new d}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)}}));const zm=pm,Gm=gm,Nm=function(t,e){let i=t.stops;if(!i)return function(t,e){const i=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",i]:i;if("enum"===e.type)return["match",i,Object.keys(e.values),i,t.default];{const n=["color"===e.type?"to-color":e.type,i,vm(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}}(t,e);const n=i&&"object"==typeof i[0][0],r=n||void 0!==t.property,o=n||!r;return i=i.map((t=>!r&&e.tokens&&"string"==typeof t[1]?[t[0],Tm(t[1])]:[t[0],vm(t[1])])),n?function(t,e,i){const n={},r={},o=[];for(let s=0;s<i.length;s++){const e=i[s],a=e[0].zoom;void 0===n[a]&&(n[a]={zoom:a,type:t.type,property:t.property,default:t.default},r[a]=[],o.push(a)),r[a].push([e[0].value,e[1]])}if("exponential"===Cm({},e)){const i=[_m(t),["linear"],["zoom"]];for(const t of o){Sm(i,t,bm(n[t],e,r[t]),!1)}return i}{const t=["step",["zoom"]];for(const i of o){Sm(t,i,bm(n[i],e,r[i]),!0)}return wm(t),t}}(t,e,i):o?function(t,e,i,n=["zoom"]){const r=Cm(t,e);let o,s=!1;if("interval"===r)o=["step",n],s=!0;else{if("exponential"!==r)throw new Error(`Unknown zoom function type "${r}"`);{const e=void 0!==t.base?t.base:1;o=[_m(t),1===e?["linear"]:["exponential",e],n]}}for(const a of i)Sm(o,a[0],a[1],s);return wm(o),o}(t,e,i):bm(t,e,i)},Bm=hm;function Wm(t){return t*Math.PI/180}var qm=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function Vm(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var i=document.createElement("canvas");return i.width=t,i.height=e,i}var Um,Xm=Array(256).join(" ");function Km(t,e){if(e>=.05){for(var i="",n=t.split("\n"),r=Xm.slice(0,Math.round(e/.1)),o=0,s=n.length;o<s;++o)o>0&&(i+="\n"),i+=n[o].split("").join(r);return i}return t}function Ym(){return Um||(Um=Vm(1,1).getContext("2d")),Um}function Zm(t,e){return Ym().measureText(t).width+(t.length-1)*e}var Hm={};function $m(t,e,i,n){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),o=[],s=0,a=r.length;s<a;++s)o.push($m(r[s],e,i,n));return o.join("\n")}var l=i+","+e+","+t+","+n,u=Hm[l];if(!u){var h=t.split(" ");if(h.length>1){var c=Ym();c.font=e;var p=c.measureText("M").width*i,d="";for(o=[],s=0,a=h.length;s<a;++s){var f=h[s],y=d+(d?" ":"")+f;Zm(y,n)<=p?d=y:(d&&o.push(d),d=f)}d&&o.push(d);for(s=0,a=o.length;s<a&&a>1;++s){var g=o[s];if(Zm(g,n)<.35*p){var m=s>0?Zm(o[s-1],n):1/0,v=s<a-1?Zm(o[s+1],n):1/0;o.splice(s,1),a-=1,m<v?(o[s-1]+=" "+g,s-=1):o[s]=g+" "+o[s]}}for(s=0,a=o.length-1;s<a;++s){var _=o[s],x=o[s+1];if(Zm(_,n)>.7*p&&Zm(x,n)<.6*p){var b=_.split(" "),w=b.pop();Zm(w,n)<.2*p&&(o[s]=b.join(" "),o[s+1]=w+" "+x),a-=1}}u=o.join("\n")}else u=t;u=Km(u,n),Hm[l]=u}return u}Xr&&At(Xr,Tt,(function(){Hm={}}));var Jm,Qm,tv=Bm,ev=Nm,iv=zm,nv=Gm,rv={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ov={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]},sv={},av={zoom:0},lv={};function uv(t,e,i,n,r){var o=t.id;lv[o]||(lv[o]={});var s=lv[o];if(!s[i]){var a=(t[e]||sv)[i],l=Hf[e+"_"+t.type][i];void 0===a&&(a=l.default);var u=iv(a);if(!u&&tv(a)&&(a=ev(a,l),u=!0),u){var h=function(t,e){var i=nv(t,e);if("error"===i.result)throw new Error(i.value.map((function(t){return t.key+": "+t.message})).join(", "));return i.value}(a,l);s[i]=h.evaluate.bind(h)}else"color"==l.type&&(a=wy.parse(a)),s[i]=function(){return a}}return av.zoom=n,s[i](av,r)}var hv={};function cv(t,e){if(t){if(0===t.a||0===e)return;var i=t.a;return e=void 0===e?1:e,"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*e+")"}return t}var pv=/^([^]*)\{(.*)\}([^]*)$/;function dv(t,e){var i;do{if(i=t.match(pv)){var n=e[i[2]]||"";t=i[1]+n+i[3]}}while(i);return t}function fv(t,e,i,n,r,o,s){if(void 0===n&&(n=qm),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var a,l;if(o)if("undefined"!=typeof Image){var u=new Image;u.crossOrigin="anonymous",u.onload=function(){a=u,l=[u.width,u.height],t.changed(),u.onload=null},u.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,l=[a.width,a.height])}))}for(var c,p=function(t){t=t.slice();const e=Object.create(null);for(let i=0;i<t.length;i++)e[t[i].id]=t[i];for(let i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=Dm(t[i],e[t[i].ref]));return t}(e.layers),d={},f=[],y=0,g=p.length;y<g;++y){var m=p[y],v=m.id;if("string"==typeof i&&m.source==i||-1!==i.indexOf(v)){var _=m["source-layer"];if(!c){c=m.source;var x=e.sources[c];if(!x)throw new Error('Source "'+c+'" is not defined');var b=x.type;if("vector"!==b&&"geojson"!==b)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+b+'"')}var w=d[_];w||(w=[],d[_]=w),w.push({layer:m,index:y}),f.push(v)}delete lv[v],delete hv[v]}var S=new nl,C=new La,T={},E={},k=[],P=function(t,e){var i=t.getProperties(),o=d[i.layer];if(o){var u=n.indexOf(e);-1==u&&(u=function(t,e){for(var i=0,n=e.length;i<n;++i)if(e[i]<t&&i+1<n){var r=e[i]/e[i+1];return i+Math.log(e[i]/t)/Math.log(r)}return n-1}(e,n));for(var h=rv[t.getGeometry().getType()],c={properties:i,type:h},p=-1,f=function(n,d){var f=o[n],y=f.layer,g=y.id,m=y.layout||sv,v=y.paint||sv;if("none"===m.visibility||"minzoom"in y&&u<y.minzoom||"maxzoom"in y&&u>=y.maxzoom)return"continue";var _=y.filter;if(!_||function(t,e,i,n){return t in hv||(hv[t]=Pm(e).filter),av.zoom=n,hv[t](av,i)}(g,_,c,u)){var x=void 0,b=void 0,w=void 0,P=void 0,O=void 0,R=void 0,I=f.index;if(3==h&&("fill"==y.type||"fill-extrusion"==y.type))if(b=uv(y,"paint",y.type+"-opacity",u,c),y.type+"-pattern"in v){var F=uv(y,"paint",y.type+"-pattern",u,c);if(F){var M="string"==typeof F?dv(F,i):F.toString();if(a&&r&&r[M]){++p,(R=k[p])&&R.getFill()&&!R.getStroke()&&!R.getText()||(R=new fl({fill:new La}),k[p]=R),w=R.getFill(),R.setZIndex(I);var j=E[lt=M+"."+b];if(!j)(ct=(ht=Vm((ut=r[M]).width,ut.height)).getContext("2d")).globalAlpha=b,ct.drawImage(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height),j=ct.createPattern(ht,"repeat"),E[lt]=j;w.setColor(j)}}}else(x=cv(uv(y,"paint",y.type+"-color",u,c),b))&&(y.type+"-outline-color"in v&&(O=cv(uv(y,"paint",y.type+"-outline-color",u,c),b)),O||(O=x),++p,(R=k[p])&&R.getFill()&&R.getStroke()&&!R.getText()||(R=new fl({fill:new La,stroke:new nl}),k[p]=R),(w=R.getFill()).setColor(x),(P=R.getStroke()).setColor(O),P.setWidth(1),R.setZIndex(I));if(1!=h&&"line"==y.type){x=!("line-pattern"in v)&&"line-color"in v?cv(uv(y,"paint","line-color",u,c),uv(y,"paint","line-opacity",u,c)):void 0;var A=uv(y,"paint","line-width",u,c);x&&A>0&&(++p,(R=k[p])&&R.getStroke()&&!R.getFill()&&!R.getText()||(R=new fl({stroke:new nl}),k[p]=R),(P=R.getStroke()).setLineCap(uv(y,"layout","line-cap",u,c)),P.setLineJoin(uv(y,"layout","line-join",u,c)),P.setMiterLimit(uv(y,"layout","line-miter-limit",u,c)),P.setColor(x),P.setWidth(A),P.setLineDash(v["line-dasharray"]?uv(y,"paint","line-dasharray",u,c).map((function(t){return t*A})):null),R.setZIndex(I))}var L=!1,D=null,z=0,G=void 0,N=void 0,B=void 0;if((1==h||2==h)&&"icon-image"in m){var W=uv(y,"layout","icon-image",u,c);if(W){G="string"==typeof W?dv(W,i):W.toString();var q=void 0;if(a&&r&&r[G]){var V=uv(y,"layout","icon-rotation-alignment",u,c);if(2==h){var U=t.getGeometry();if(U.getFlatMidpoint||U.getFlatMidpoints){var X=U.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/e,2),Math.pow((X[3]-X[1])/e,2)))>150){var K="MultiLineString"===U.getType()?U.getFlatMidpoints():U.getFlatMidpoint();if(Qm||(Qm=new Wl("Point",Jm=[NaN,NaN],[],{},null)),q=Qm,Jm[0]=K[0],Jm[1]=K[1],"line"===(It=uv(y,"layout","symbol-placement",u,c))&&"map"===V)for(var Y=U.getStride(),Z=U.getFlatCoordinates(),H=0,$=Z.length-Y;H<$;H+=Y){var J=Z[H],Q=Z[H+1],tt=Z[H+Y],et=Z[H+Y+1],it=Math.min(J,tt),nt=Math.min(Q,et),rt=Math.max(J,tt),ot=Math.max(Q,et);if(K[0]>=it&&K[0]<=rt&&K[1]>=nt&&K[1]<=ot){z=Math.atan2(Q-et,tt-J);break}}}}}if(2!==h||q){var st=uv(y,"layout","icon-size",u,c),at=void 0!==v["icon-color"]?uv(y,"paint","icon-color",u,c):null;if(!at||0!==at.a){var lt=G+"."+st;if(null!==at&&(lt+="."+at),!(N=T[lt])){var ut=r[G];if(null!==at){var ht,ct;(ct=(ht=Vm(ut.width,ut.height)).getContext("2d")).drawImage(a,ut.x,ut.y,ut.width,ut.height,0,0,ut.width,ut.height);for(var pt=ct.getImageData(0,0,ht.width,ht.height),dt=0,ft=pt.data.length;dt<ft;dt+=4){var yt=at.a;0!==yt&&(pt.data[dt]=255*at.r/yt,pt.data[dt+1]=255*at.g/yt,pt.data[dt+2]=255*at.b/yt),pt.data[dt+3]=yt}ct.putImageData(pt,0,0),N=new il({img:ht,imgSize:[ht.width,ht.height],scale:st/ut.pixelRatio}),T[lt]=N}else N=new il({img:a,imgSize:l,size:[ut.width,ut.height],offset:[ut.x,ut.y],rotateWithView:"map"===V,scale:st/ut.pixelRatio}),T[lt]=N}}N&&(++p,(R=k[p])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new fl,k[p]=R),R.setGeometry(q),N.setRotation(z+Wm(uv(y,"layout","icon-rotate",u,c))),N.setOpacity(uv(y,"paint","icon-opacity",u,c)),N.setAnchor(ov[uv(y,"layout","icon-anchor",u,c)]),R.setImage(N),D=R.getText(),R.setText(void 0),R.setZIndex(I),L=!0,B=!1)}else B=!0}}}if(1==h&&"circle-radius"in v){++p,(R=k[p])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new fl,k[p]=R);var gt=uv(y,"paint","circle-radius",u,c),mt=cv(uv(y,"paint","circle-stroke-color",u,c),uv(y,"paint","circle-stroke-opacity",u,c)),vt=cv(uv(y,"paint","circle-color",u,c),uv(y,"paint","circle-opacity",u,c)),_t=uv(y,"paint","circle-stroke-width",u,c),xt=gt+"."+mt+"."+vt+"."+_t;(N=T[xt])||(N=new ll({radius:gt,stroke:mt&&_t>0?new nl({width:_t,color:mt}):void 0,fill:vt?new La({color:vt}):void 0}),T[xt]=N),R.setImage(N),D=R.getText(),R.setText(void 0),R.setGeometry(void 0),R.setZIndex(I),L=!0}var bt=void 0;if("text-field"in m)bt=dv(uv(y,"layout","text-field",u,c).toString(),i).trim(),b=uv(y,"paint","text-opacity",u,c);if(bt&&b&&!B){L||(++p,(R=k[p])&&R.getText()&&!R.getFill()&&!R.getStroke()||(R=new fl,k[p]=R),R.setImage(void 0),R.setGeometry(void 0)),R.getText()||R.setText(D||new ml({padding:[2,2,2,2]})),D=R.getText();var wt=Math.round(uv(y,"layout","text-size",u,c)),St=uv(y,"layout","text-font",u,c),Ct=uv(y,"layout","text-line-height",u,c),Tt=function(t,e,i){var n=Rd[t];if(!n){Array.isArray(t)||(t=[t]);for(var r=400,o="normal",s=[],a=0,l=t.length;a<l;++a){var u=t[a].split(" "),h=u[u.length-1].toLowerCase();for(var c in"normal"==h||"italic"==h||"oblique"==h?(o=h,u.pop(),h=u[u.length-1].toLowerCase()):Od.test(h)&&(h=h.replace(Od,""),o=u[u.length-1].replace(h,"")),kd)if(h==c||h==c.replace("-","")||h==c.replace("-",Pd)){r=kd[c],u.pop();break}"number"==typeof h&&(r=h);var p=u.join(Pd).replace("Klokantech Noto Sans","Noto Sans");-1!==p.indexOf(Pd)&&(p='"'+p+'"'),s.push(p)}n=Rd[t]=[o,r,s]}return n[0]+Pd+n[1]+Pd+e+"px"+(i?"/"+i:"")+Pd+n[2]}(s?s(St):St,wt,Ct),Et=m["text-transform"];"uppercase"==Et?bt=bt.toUpperCase():"lowercase"==Et&&(bt=bt.toLowerCase());var kt=uv(y,"layout","text-max-width",u,c),Pt=uv(y,"layout","text-letter-spacing",u,c),Ot=2==h?Km(bt,Pt):$m(bt,Tt,kt,Pt);D.setText(Ot),D.setFont(Tt),D.setRotation(Wm(uv(y,"layout","text-rotate",u,c)));var Rt=uv(y,"layout","text-anchor",u,c),It=L||1==h?"point":uv(y,"layout","symbol-placement",u,c);D.setPlacement(It);var Ft=uv(y,"paint","text-halo-width",u,c),Mt=uv(y,"layout","text-offset",u,c),jt=uv(y,"paint","text-translate",u,c),At=0,Lt=0;if("point"==It){var Dt="center";-1!==Rt.indexOf("left")?(Dt="left",Lt=Ft):-1!==Rt.indexOf("right")&&(Dt="right",Lt=-Ft),D.setTextAlign(Dt);var zt=uv(y,"layout","text-rotation-alignment",u,c);D.setRotateWithView("map"==zt)}else D.setMaxAngle(Wm(uv(y,"layout","text-max-angle",u,c))*bt.length/Ot.length),D.setTextAlign(),D.setRotateWithView(!1);var Gt="middle";0==Rt.indexOf("bottom")?(Gt="bottom",At=-Ft-.5*(Ct-1)*wt):0==Rt.indexOf("top")&&(Gt="top",At=Ft+.5*(Ct-1)*wt),D.setTextBaseline(Gt),D.setOffsetX(Mt[0]*wt+Lt+jt[0]),D.setOffsetY(Mt[1]*wt+At+jt[1]),C.setColor(cv(uv(y,"paint","text-color",u,c),b)),D.setFill(C);var Nt=cv(uv(y,"paint","text-halo-color",u,c),b);if(Nt){S.setColor(Nt),Ft*=2;var Bt=.5*wt;S.setWidth(Ft<=Bt?Ft:Bt),D.setStroke(S)}else D.setStroke(void 0);var Wt=uv(y,"layout","text-padding",u,c),qt=D.getPadding();Wt!==qt[0]&&(qt[0]=Wt,qt[1]=Wt,qt[2]=Wt,qt[3]=Wt),R.setZIndex(I)}}},y=0,g=o.length;y<g;++y)f(y);return p>-1?(k.length=p+1,k):void 0}};return t.setStyle(P),t.set("mapbox-source",c),t.set("mapbox-layers",f),P}var yv,gv,mv=Object.freeze,vv=Object.defineProperty,_v=Object.getOwnPropertyDescriptor,xv=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?_v(e,i):e,s=t.length-1;s>=0;s--)(r=t[s])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&vv(e,i,o),o};t.MyMap=class extends it{constructor(){super(),this.latitude=51.507351,this.longitude=-.127758,this.zoom=10,this.minZoom=7,this.maxZoom=22,this.drawMode=!1,this.drawGeojsonData={type:"Feature",geometry:{}},this.drawGeojsonDataBuffer=100,this.drawPointer="crosshair",this.showFeaturesAtPoint=!1,this.clickFeatures=!1,this.featureColor="#0000ff",this.featureFill=!1,this.featureBuffer=40,this.geojsonData={type:"FeatureCollection",features:[]},this.geojsonColor="#ff0000",this.geojsonFill=!1,this.geojsonBuffer=12,this.disableVectorTiles=!1,this.osVectorTilesApiKey="",this.osFeaturesApiKey="",this.osCopyright=`© Crown copyright and database rights ${(new Date).getFullYear()} OS (0)100024857`,this.hideResetControl=!1,this.staticMode=!1,this.areaUnit="m2",this.showScale=!1,this.useScaleBarStyle=!1,this.dispatch=(t,e)=>this.dispatchEvent(new CustomEvent(t,{detail:e}))}firstUpdated(){var t;const e=this.renderRoot.querySelector("#map"),i=!this.disableVectorTiles&&Boolean(this.osVectorTilesApiKey),n=(r=this.osCopyright,o=this.osVectorTilesApiKey,new Ed({source:o?new Fd({url:"https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key="+o,attributions:[r],attributionsCollapsible:!1,maxZoom:20}):new Ad({attributions:[jd]})}));var r,o;const s=function(t,e){let i=new Tp({declutter:!0,source:new od({format:new Yl,url:"https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key="+e,attributions:[t],attributionsCollapsible:!1})});return e&&fetch("https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key="+e).then((t=>t.json())).then((t=>fv(i,t,"esri"))).catch((t=>console.log(t))),i}(this.osCopyright,this.osVectorTilesApiKey),a=new ld({target:e,layers:[i?s:n],view:new Vs({projection:"EPSG:3857",extent:(u=[-10.76418,49.528423,1.9134116,61.331151],h="EPSG:4326",c="EPSG:3857",Cn(u,er(h,c),void 0,p)),minZoom:this.minZoom,maxZoom:this.maxZoom,center:Jn([this.longitude,this.latitude]),zoom:this.zoom,enableRotation:!1}),controls:oa({attribution:!0,zoom:!this.staticMode}).extend(this.showScale?[(l=this.useScaleBarStyle,new ra({units:"metric",bar:l,steps:4,text:!0,minWidth:140}))]:[]),interactions:lp({doubleClickZoom:!this.staticMode,dragPan:!this.staticMode,mouseWheelZoom:!this.staticMode})});var l,u,h,c,p;this.map=a;const d=(f=this.drawPointer,new Kc({source:Yd,type:"Polygon",style:new fl({stroke:qd,fill:Vd,image:"crosshair"===f?Ud:Xd})}));var f;const y=function(t){return new np({source:Yd,style:new fl({image:"crosshair"===t?Ud:Xd})})}(this.drawPointer),g=document.createElement("button");g.innerHTML="↻",g.title="Reset map view";g.addEventListener("click",(()=>{this.showFeaturesAtPoint?Vf(a,Yf,this.featureBuffer):x.getFeatures().length>0?Vf(a,x,this.geojsonBuffer):(a.getView().setCenter(Jn([this.longitude,this.latitude])),a.getView().setZoom(this.zoom)),this.drawMode&&(Yd.clear(),a.addInteraction(d),a.addInteraction(Hd))}),!1);const m=document.createElement("div");m.className="reset-control ol-unselectable ol-control",m.appendChild(g);var v=new le({element:m});this.hideResetControl||a.addControl(v);const _=null==(t=this.renderRoot)?void 0:t.querySelectorAll(".ol-control button");null==_||_.forEach((t=>t.setAttribute("aria-label",t.getAttribute("title")||""))),a.on("pointerdrag",(()=>{a.getViewport().style.cursor="grabbing"})),a.on("pointermove",(()=>{a.getViewport().style.cursor="grab"}));const x=new Dc;if("FeatureCollection"===this.geojsonData.type){let t=(new Aa).readFeatures(this.geojsonData,{featureProjection:"EPSG:3857"});x.addFeatures(t)}else if("Feature"===this.geojsonData.type){let t=(new Aa).readFeature(this.geojsonData,{featureProjection:"EPSG:3857"});x.addFeature(t)}const b=new xc({source:x,style:new fl({stroke:new nl({color:this.geojsonColor,width:3}),fill:new La({color:this.geojsonFill?Uf(this.geojsonColor,.2):Uf(this.geojsonColor,0)})})});if(a.addLayer(b),x.getFeatures().length>0){Vf(a,x,this.geojsonBuffer);const t=x.getFeatures()[0].getGeometry();t&&this.dispatch("geojsonDataArea",qf(t,this.areaUnit))}if(this.drawMode){const t=Object.keys(this.drawGeojsonData.geometry).length>0;if(t){let t=(new Aa).readFeature(this.drawGeojsonData,{featureProjection:"EPSG:3857"});Yd.addFeature(t),Vf(a,Yd,this.drawGeojsonDataBuffer)}else Yd.clear();a.addLayer(Zd),t||a.addInteraction(d),a.addInteraction(y),a.addInteraction(Hd),Yd.on("change",(()=>{const t=Yd.getFeatures();if(t.length>0){const i=(e=t,"string"==typeof e?e[e.length-1]||"":e[e.length-1]).getGeometry();this.dispatch("geojsonChange",(new Aa).writeFeaturesObject(t,{featureProjection:"EPSG:3857"})),i&&this.dispatch("areaChange",qf(i,this.areaUnit)),a.removeInteraction(d)}var e}))}if(this.drawMode&&Boolean(this.osVectorTilesApiKey)&&!this.disableVectorTiles&&(a.addLayer(Gd),Zd.setZIndex(1001),a.on("moveend",(()=>{const t=a.getView().getZoom();t&&t<20?zd.clear():setTimeout((()=>{zd.clear();const t=a.getView().calculateExtent(a.getSize());Nd(s,t)}),200)}))),this.showFeaturesAtPoint&&Boolean(this.osFeaturesApiKey)){Zf(Jn([this.longitude,this.latitude]),this.osFeaturesApiKey),this.clickFeatures&&a.on("singleclick",(t=>{Zf(t.coordinate,this.osFeaturesApiKey)}));const t=(w=this.featureColor,S=this.featureFill,new xc({source:Yf,style:new fl({stroke:new nl({width:3,color:w}),fill:new La({color:Uf(w,S?.2:0)})})}));a.addLayer(t),Yf.on("change",(()=>{if("ready"===Yf.getState()&&Yf.getFeatures().length>0){Vf(a,Yf,this.featureBuffer),this.dispatch("featuresGeojsonChange",(new Aa).writeFeaturesObject(Yf.getFeatures(),{featureProjection:"EPSG:3857"}));const t=Yf.getFeatures()[0].getGeometry();t&&this.dispatch("featuresAreaChange",qf(t,this.areaUnit))}}))}var w,S;setTimeout((()=>{window.dispatchEvent(new Event("resize")),e.style.opacity="1",this.dispatch("ready")}),500)}render(){return A(yv||(yv=mv(vv(t=['<script src="https://cdn.polyfill.io/v2/polyfill.min.js"><\/script>\n <link rel="stylesheet" href="https://cdn.skypack.dev/ol@^6.6.1/ol.css" />\n <div id="map" tabindex="0" />'],"raw",{value:mv(e||t.slice())}))));var t,e}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.map)||t.dispose()}},t.MyMap.styles=((t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return o(i)})`
|
42
42
|
:host {
|
43
43
|
display: block;
|
44
44
|
width: 800px;
|
@@ -57,12 +57,16 @@ var ym=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.r
|
|
57
57
|
.ol-control button {
|
58
58
|
border-radius: 0 !important;
|
59
59
|
background-color: #2c2c2c !important;
|
60
|
+
cursor: pointer;
|
61
|
+
min-width: 44px;
|
62
|
+
min-height: 44px;
|
63
|
+
font-size: 1.75rem;
|
60
64
|
}
|
61
65
|
.ol-control button:hover {
|
62
66
|
background-color: rgba(44, 44, 44, 0.85) !important;
|
63
67
|
}
|
64
68
|
.reset-control {
|
65
|
-
top:
|
69
|
+
top: 114px;
|
66
70
|
left: 0.5em;
|
67
71
|
}
|
68
72
|
#area {
|
@@ -72,4 +76,4 @@ var ym=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.r
|
|
72
76
|
z-index: 100;
|
73
77
|
background: white;
|
74
78
|
}
|
75
|
-
`,
|
79
|
+
`,xv([rt({type:Number})],t.MyMap.prototype,"latitude",2),xv([rt({type:Number})],t.MyMap.prototype,"longitude",2),xv([rt({type:Number})],t.MyMap.prototype,"zoom",2),xv([rt({type:Number})],t.MyMap.prototype,"minZoom",2),xv([rt({type:Number})],t.MyMap.prototype,"maxZoom",2),xv([rt({type:Boolean})],t.MyMap.prototype,"drawMode",2),xv([rt({type:Object})],t.MyMap.prototype,"drawGeojsonData",2),xv([rt({type:Number})],t.MyMap.prototype,"drawGeojsonDataBuffer",2),xv([rt({type:String})],t.MyMap.prototype,"drawPointer",2),xv([rt({type:Boolean})],t.MyMap.prototype,"showFeaturesAtPoint",2),xv([rt({type:Boolean})],t.MyMap.prototype,"clickFeatures",2),xv([rt({type:String})],t.MyMap.prototype,"featureColor",2),xv([rt({type:Boolean})],t.MyMap.prototype,"featureFill",2),xv([rt({type:Number})],t.MyMap.prototype,"featureBuffer",2),xv([rt({type:Object})],t.MyMap.prototype,"geojsonData",2),xv([rt({type:String})],t.MyMap.prototype,"geojsonColor",2),xv([rt({type:Boolean})],t.MyMap.prototype,"geojsonFill",2),xv([rt({type:Number})],t.MyMap.prototype,"geojsonBuffer",2),xv([rt({type:Boolean})],t.MyMap.prototype,"disableVectorTiles",2),xv([rt({type:String})],t.MyMap.prototype,"osVectorTilesApiKey",2),xv([rt({type:String})],t.MyMap.prototype,"osFeaturesApiKey",2),xv([rt({type:String})],t.MyMap.prototype,"osCopyright",2),xv([rt({type:Boolean})],t.MyMap.prototype,"hideResetControl",2),xv([rt({type:Boolean})],t.MyMap.prototype,"staticMode",2),xv([rt({type:String})],t.MyMap.prototype,"areaUnit",2),xv([rt({type:Boolean})],t.MyMap.prototype,"showScale",2),xv([rt({type:Boolean})],t.MyMap.prototype,"useScaleBarStyle",2),t.MyMap=xv([(gv="my-map",t=>{return"function"==typeof t?(e=gv,i=t,window.customElements.define(e,i),i):((t,e)=>{const{kind:i,elements:n}=e;return{kind:i,elements:n,finisher(e){window.customElements.define(t,e)}}})(gv,t);var e,i})],t.MyMap),Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"}));
|