2 lines
350 KiB
JavaScript
2 lines
350 KiB
JavaScript
(self["webpackChunkcomplexes"]=self["webpackChunkcomplexes"]||[]).push([[140],{72220:function(t,e,i){i(44114),function(e,i){t.exports=i()}(0,(function(){"use strict";function t(t,n,s,r,o){!function t(i,n,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,h=n-s+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(h-a/2<0?-1:1),d=Math.max(s,Math.floor(n-h*c/a+u)),g=Math.min(r,Math.floor(n+(a-h)*c/a+u));t(i,n,d,g,o)}var f=i[n],_=s,p=r;for(e(i,s,n),o(i[r],f)>0&&e(i,s,r);_<p;){for(e(i,_,p),_++,p--;o(i[_],f)<0;)_++;for(;o(i[p],f)>0;)p--}0===o(i[s],f)?e(i,s,p):e(i,++p,r),p<=n&&(s=p+1),n<=p&&(r=p-1)}}(t,n,s||0,r||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function r(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,s){s||(s=f(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var r=e;r<i;r++){var o=t.children[r];a(s,t.leaf?n(o):o)}return s}function a(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 h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,i,n,s,r){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var r=0;r<e.children.length;r++){var o=e.children[r],a=e.leaf?n(o):o;g(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):s.push(o))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],r=e.leaf?this.toBBox(s):s;if(g(t,r)){if(e.leaf||d(t,r))return!0;i.push(s)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=f([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,r,o=this.data,a=this.toBBox(t),h=[],l=[];o||h.length;){if(o||(o=h.pop(),n=h[h.length-1],i=l.pop(),r=!0),o.leaf){var c=s(t,o.children,e);if(-1!==c)return o.children.splice(c,1),h.push(o),this._condense(h),this}r||o.leaf||!d(o,a)?n?(i++,o=n.children[i],r=!1):o=null:(h.push(o),l.push(i),i=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,o=i-e+1,a=this._maxEntries;if(o<=a)return r(s=f(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(s=f([])).leaf=!1,s.height=n;var h=Math.ceil(o/a),l=h*Math.ceil(Math.sqrt(a));_(t,e,i,l,this.compareMinX);for(var c=e;c<=i;c+=l){var u=Math.min(c+l-1,i);_(t,c,u,h,this.compareMinY);for(var d=c;d<=u;d+=h){var g=Math.min(d+h-1,u);s.children.push(this._build(t,d,g,n-1))}}return r(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,r=1/0,o=void 0,a=0;a<e.children.length;a++){var h=e.children[a],l=c(h),u=(d=t,g=h,(Math.max(g.maxX,d.maxX)-Math.min(g.minX,d.minX))*(Math.max(g.maxY,d.maxY)-Math.min(g.minY,d.minY))-l);u<r?(r=u,s=l<s?l:s,o=h):u===r&&l<s&&(s=l,o=h)}e=o||e.children[0]}var d,g;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],r=this._chooseSubtree(n,this.data,e,s);for(r.children.push(t),a(r,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=f(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,r,a,h,l,u,d=1/0,g=1/0,f=e;f<=i-e;f++){var _=o(t,0,f,this.toBBox),p=o(t,f,i,this.toBBox),m=(s=_,r=p,a=void 0,h=void 0,l=void 0,u=void 0,a=Math.max(s.minX,r.minX),h=Math.max(s.minY,r.minY),l=Math.min(s.maxX,r.maxX),u=Math.min(s.maxY,r.maxY),Math.max(0,l-a)*Math.max(0,u-h)),y=c(_)+c(p);m<d?(d=m,n=f,g=y<g?y:g):m===d&&y<g&&(g=y,n=f)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,r=o(t,0,e,s),h=o(t,i-e,i,s),l=u(r)+u(h),c=e;c<i-e;c++){var d=t.children[c];a(r,t.leaf?s(d):d),l+=u(r)}for(var g=i-e-1;g>=e;g--){var f=t.children[g];a(h,t.leaf?s(f):f),l+=u(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}))},54409:function(t,e,i){"use strict";i.d(e,{j:function(){return o}});var n=i(55234),s=i(90144),r=i(22093);const o=(0,n.nY)("house",(()=>{const t=(0,s.KR)({}),e=(0,s.KR)({dop:{},metro:{}}),i=async(i,n=[])=>r.A.getHouseOne(i,n).then((i=>{var n=i.data;return n.house&&(t.value=n.house),n.complex&&(e.value=n.complex),i})).catch((t=>{console.log(t)}));return{house:t,complex:e,get_house:i}}))},73844:function(t,e,i){"use strict";i(44114);var n=i(41611),s=i(52686),r=i(39078);const o={LENGTH:"length"};class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class h extends n.A{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,n=this.array_.length;i<n;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){while(this.getLength()>0)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(o.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(s.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(s.A.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i)return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(s.A.REMOVE,n,t)),this.dispatchEvent(new a(s.A.ADD,e,t))}updateLength_(){this.set(o.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}}e.A=h},52686:function(t,e){"use strict";e.A={ADD:"add",REMOVE:"remove"}},58646:function(t,e){"use strict";class i{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}e.A=i},20856:function(t,e,i){"use strict";var n=i(41611),s=i(97582),r=i(1097),o=i(8965);class a extends n.A{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"===typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.JH)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.KT)(t,s.A.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?h(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function h(t){if("function"===typeof t)return t;let e;if(Array.isArray(t))e=t;else{(0,r.v)("function"===typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`");const i=t;e=[i]}return function(){return e}}e.A=a},2299:function(t,e,i){"use strict";i.d(e,{D4:function(){return u},RA:function(){return c}});i(44114);var n=i(29357),s=i(97582),r=i(1410),o=i(20502),a=i(69331);class h extends n.A{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"===typeof n?r.A.IDLE:n,this.image_=null,this.loader="function"===typeof n?n:null}changed(){this.dispatchEvent(s.A.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==r.A.IDLE&&this.loader){this.state=r.A.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;(0,a.hq)((()=>this.loader(this.getExtent(),e,this.getPixelRatio()))).then((t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=r.A.LOADED})).catch((t=>{this.state=r.A.ERROR,console.error(t)})).finally((()=>this.changed()))}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function l(t,e){return new Promise(((i,n)=>{function s(){o(),i(t)}function r(){o(),n(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r),e&&(t.src=e)}))}function c(t,e){return e&&(t.src=e),t.src&&o.DT?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):l(t)}function u(t,e){return e&&(t.src=e),t.src&&o.DT&&o.XM?t.decode().then((()=>createImageBitmap(t))).catch((e=>{if(t.complete&&t.width)return t;throw e})):c(t)}e.Ay=h},1410:function(t,e){"use strict";e.A={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},85646:function(t,e,i){"use strict";i.d(e,{A:function(){return ct}});i(44114);var n=i(41611),s=i(73844),r=i(52686),o=i(58646),a=i(69331),h=i(95752),l=i(71194),c=i(37444),u=i(41382),d=i(92425),g=i(18474);class f extends o.A{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,h.b0)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,l.Zz)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,l.T9)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let h;const l=e.viewState;function u(t,e,i,n){return s.call(r,e,t?i:null,n)}const f=l.projection,_=(0,g.Li)(t.slice(),f),p=[[0,0]];if(f.canWrapX()&&n){const t=f.getExtent(),e=(0,c.RG)(t);p.push([-e,0],[e,0])}const m=e.layerStatesArray,y=m.length,v=[],x=[];for(let c=0;c<p.length;c++)for(let n=y-1;n>=0;--n){const s=m[n],r=s.layer;if(r.hasRenderer()&&(0,d.l)(s,l)&&o.call(a,r)){const n=r.getRenderer(),o=r.getSource();if(n&&o){const r=o.getWrapX()?_:t,a=u.bind(null,s.managed);x[0]=r[0]+p[c][0],x[1]=r[1]+p[c][1],h=n.forEachFeatureAtCoordinate(x,e,i,a,v)}if(h)return h}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>h=t.callback(t.feature,t.layer,t.geometry))),h}hasFeatureAtCoordinate(t,e,i,n,s,r){const o=this.forEachFeatureAtCoordinate(t,e,i,n,a.rT,this,s,r);return void 0!==o}getMap(){return this.map_}renderFrame(t){(0,h.b0)()}flushDeclutterItems(t){}scheduleExpireIconCache(t){u.u.canExpireCache()&&t.postRenderFunctions.push(_)}}function _(t,e){u.u.expire()}var p=f,m=i(76555),y=i(16355),v=i(83707),x=i(24109),E=i(78911),C=i(8965),A=i(17334);class w extends p{constructor(t){super(t),this.fontChangeListenerKey_=(0,C.KT)(E.yY,m.A.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=x.XI+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new y.A(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,C.JH)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(v.A.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=this.declutterLayers_;n.length=0;let s=null;for(let r=0,o=e.length;r<o;++r){const o=e[r];t.layerIndex=r;const a=o.layer,h=a.getSourceState();if(!(0,d.l)(o,i)||"ready"!=h&&"undefined"!=h){a.unrender();continue}const l=a.render(t,s);l&&(l!==s&&(this.children_.push(l),s=l),"getDeclutter"in a&&n.push(a))}this.flushDeclutterItems(t),(0,A.WM)(this.element_,this.children_),this.dispatchRenderEvent(v.A.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let i=e.length-1;i>=0;--i)e[i].renderDeclutter(t);e.length=0}}var S=w,R=i(97582),I=i(69855),T=i(39078),M=i(1097),b=i(56811);class P extends T.Ay{constructor(t,e){super(t),this.layer=e}}const L={LAYERS:"layers"};class O extends I.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(L.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new s.A(i.slice(),{unique:!0}):(0,M.v)("function"===typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new s.A(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(C.JH),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,C.KT)(t,r.A.ADD,this.handleLayersAdd_,this),(0,C.KT)(t,r.A.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(C.JH);(0,b.I)(this.listenerKeys_);const e=t.getArray();for(let i=0,n=e.length;i<n;i++){const t=e[i];this.registerLayerListeners_(t),this.dispatchEvent(new P("addlayer",t))}this.changed()}registerLayerListeners_(t){const e=[(0,C.KT)(t,m.A.PROPERTYCHANGE,this.handleLayerChange_,this),(0,C.KT)(t,R.A.CHANGE,this.handleLayerChange_,this)];t instanceof O&&e.push((0,C.KT)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,C.KT)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,h.v6)(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new P("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new P("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new P("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=(0,h.v6)(e);this.listenerKeys_[i].forEach(C.JH),delete this.listenerKeys_[i],this.dispatchEvent(new P("removelayer",e)),this.changed()}getLayers(){return this.get(L.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new P("removelayer",t[e]))}this.set(L.LAYERS,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let r=i,o=e.length;r<o;r++){const t=e[r];t.opacity*=n.opacity,t.visible=t.visible&&n.visible,t.maxResolution=Math.min(t.maxResolution,n.maxResolution),t.minResolution=Math.max(t.minResolution,n.minResolution),t.minZoom=Math.max(t.minZoom,n.minZoom),t.maxZoom=Math.min(t.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==t.extent?t.extent=(0,c._N)(t.extent,n.extent):t.extent=n.extent),void 0===t.zIndex&&(t.zIndex=s)}return e}getSourceState(){return"ready"}}var D=O,F=i(79020),k=i(83156),N=i(92504),G=i(29357),W=i(20502);class B extends G.A{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=(0,C.KT)(i,N.A.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,C.KT)(i,N.A.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_,!!W.FT&&{passive:!1})}emulateClick_(t){let e=new F.A(k.A.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new F.A(k.A.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new F.A(k.A.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==k.A.POINTERUP||e.type==k.A.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=k.A.POINTERDOWN&&e.type!=k.A.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new F.A(k.A.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(C.JH),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new F.A(k.A.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,C.KT)(t,k.A.POINTERMOVE,this.handlePointerMove_,this),(0,C.KT)(t,k.A.POINTERUP,this.handlePointerUp_,this),(0,C.KT)(this.element_,k.A.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,C.KT)(this.element_.getRootNode(),k.A.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new F.A(k.A.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new F.A(k.A.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"===typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,C.JH)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(R.A.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,C.JH)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(C.JH),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}var Y=B,V=i(30014),K=i(2742),X={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};const q=1/0;class z{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,b.I)(this.queuedElements_)}dequeue(){const 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));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,M.v)(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=q&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;while(t<n>>1){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=r<n&&i[r]<i[s]?r:s;e[t]=e[o],i[t]=i[o],t=o}e[t]=s,i[t]=r,this.siftDown_(o,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],r=n[e];while(e>t){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o<s;++o)r=e[o],a=t(r),a==q?delete this.queuedElements_[this.keyFunction_(r)]:(i[n]=a,e[n++]=r);e.length=n,i.length=n,this.heapify_()}}var H=z,U={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class j extends H{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);if(e){const e=t[0];e.addEventListener(R.A.CHANGE,this.boundHandleTileChange_)}return e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===U.LOADED||i===U.ERROR||i===U.EMPTY){i!==U.ERROR&&e.removeEventListener(R.A.CHANGE,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,s,r=0;while(this.tilesLoading_<t&&r<e&&this.getCount()>0)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),i!==U.IDLE||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,n.load())}}var Z=j;function J(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return q;if(!t.wantedTiles[i][e.getKey()])return q;const r=t.viewState.center,o=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}var $=i(70670),Q=i(56940),tt=i(85294),et=i(14190),it=i(3851),nt=i(29094),st=i(55689),rt=i(32155);function ot(t){t instanceof d.A?t.setMapInternal(null):t instanceof D&&t.getLayers().forEach(ot)}function at(t,e){if(t instanceof d.A)t.setMapInternal(e);else if(t instanceof D){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)at(i[t],e)}}class ht extends n.A{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=lt(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:W.cr,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=(0,l.vt)(),this.pixelToCoordinateTransform_=(0,l.vt)(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||(0,tt.N)(),this.interactions=e.interactions||(0,et.N)({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Z(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(X.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(X.VIEW,this.handleViewChanged_),this.addChangeListener(X.SIZE,this.handleSizeChanged_),this.addChangeListener(X.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof $.Ay||t.view.then((function(t){i.setView(new $.Ay(t))})),this.controls.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(r.A.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(r.A.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(r.A.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(r.A.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){const e=this.getLayerGroup().getLayers();e.push(t)}handleLayerAdd_(t){at(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t);i=void 0!==i?i:{};const s=void 0!==i.hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:a.rT,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];function e(i){i.forEach((function(i){i instanceof D?e(i.getLayers()):t.push(i)}))}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=void 0!==e?e:{};const n=void 0!==e.layerFilter?e.layerFilter:a.rT,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_,i=e.getBoundingClientRect(),n=this.getSize(),s=i.width/n[0],r=i.height/n[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-i.left)/s,(o.clientY-i.top)/r]}getTarget(){return this.get(X.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,nt.te)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,l.Bb)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(X.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof s.A)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){const t=this.getLayerGroup().getLayers();return t}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=(0,nt.Ad)(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?(0,l.Bb)(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(X.SIZE)}getView(){return this.get(X.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return J(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new F.A(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===N.A.POINTERDOWN||i===R.A.WHEEL||i===R.A.KEYDOWN){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()!==this||!n.getActive()||!this.getTargetElement())continue;const s=n.handleEvent(t);if(!s||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[Q.A.ANIMATING]||e[Q.A.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(v.A.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(v.A.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new V.A(K.A.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new V.A(K.A.LOADSTART,this,t))));const i=this.postRenderFunctions_;for(let n=0,s=i.length;n<s;++n)i[n](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,C.JH)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(R.A.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(R.A.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,A.bf)(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"===typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new S(this)),this.mapBrowserEventHandler_=new Y(this,this.moveTolerance_);for(const e in k.A)this.mapBrowserEventHandler_.addEventListener(k.A[e],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(R.A.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(R.A.WHEEL,this.boundHandleBrowserEvent_,!!W.FT&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[(0,C.KT)(t,R.A.KEYDOWN,this.handleBrowserEvent,this),(0,C.KT)(t,R.A.KEYPRESS,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}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()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&((0,C.JH)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,C.JH)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=(0,C.KT)(t,m.A.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,C.KT)(t,R.A.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(C.JH),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new P("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,C.KT)(t,m.A.PROPERTYCHANGE,this.render,this),(0,C.KT)(t,R.A.CHANGE,this.render,this),(0,C.KT)(t,"addlayer",this.handleLayerAdd_,this),(0,C.KT)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){const e=this.getLayerGroup().getLayers();return e.remove(t)}handleLayerRemove_(t){ot(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&(0,st.Ie)(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),r=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,c.Bg)(r.center,r.resolution,r.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:r,viewHints:n,wantedTiles:{},mapId:(0,h.v6)(this),renderTargets:{}},r.nextCenter&&r.nextResolution){const t=isNaN(r.nextRotation)?r.rotation:r.nextRotation;s.nextExtent=(0,c.Bg)(r.nextCenter,r.nextResolution,t,e)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n){const t=!this.previousExtent_||!(0,c.Im)(this.previousExtent_)&&!(0,c.aI)(s.extent,this.previousExtent_);t&&(this.dispatchEvent(new V.A(K.A.MOVESTART,this,n)),this.previousExtent_=(0,c.aZ)(this.previousExtent_))}const t=this.previousExtent_&&!s.viewHints[Q.A.ANIMATING]&&!s.viewHints[Q.A.INTERACTING]&&!(0,c.aI)(s.extent,this.previousExtent_);t&&(this.dispatchEvent(new V.A(K.A.MOVEEND,this,s)),(0,c.o8)(s.extent,this.previousExtent_))}this.dispatchEvent(new V.A(K.A.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(K.A.LOADSTART)||this.hasListener(K.A.LOADEND)||this.hasListener(v.A.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new P("removelayer",e)),this.set(X.LAYERGROUP,t)}setSize(t){this.set(X.SIZE,t)}setTarget(t){this.set(X.TARGET,t)}setView(t){if(!t||t instanceof $.Ay)return void this.set(X.VIEW,t);this.set(X.VIEW,new $.Ay);const e=this;t.then((function(t){e.setView(new $.Ay(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i["borderLeftWidth"])-parseFloat(i["paddingLeft"])-parseFloat(i["paddingRight"])-parseFloat(i["borderRightWidth"]),s=t.offsetHeight-parseFloat(i["borderTopWidth"])-parseFloat(i["paddingTop"])-parseFloat(i["paddingBottom"])-parseFloat(i["borderBottomWidth"]);isNaN(n)||isNaN(s)||(e=[n,s],!(0,st.Ie)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,rt.R8)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,it.aI)(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function lt(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"===typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"===typeof t.layers.getLayers?t.layers:new D({layers:t.layers});let r,o,a;return i[X.LAYERGROUP]=n,i[X.TARGET]=t.target,i[X.VIEW]=t.view instanceof $.Ay?t.view:new $.Ay,void 0!==t.controls&&(Array.isArray(t.controls)?r=new s.A(t.controls.slice()):((0,M.v)("function"===typeof t.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),r=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?o=new s.A(t.interactions.slice()):((0,M.v)("function"===typeof t.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),o=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?a=new s.A(t.overlays.slice()):((0,M.v)("function"===typeof t.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),a=t.overlays):a=new s.A,{controls:r,interactions:o,keyboardEventTarget:e,overlays:a,values:i}}var ct=ht},79020:function(t,e,i){"use strict";var n=i(30014);class s extends n.A{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}e.A=s},83156:function(t,e,i){"use strict";var n=i(97582);e.A={SINGLECLICK:"singleclick",CLICK:n.A.CLICK,DBLCLICK:n.A.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},30014:function(t,e,i){"use strict";var n=i(39078);class s extends n.Ay{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}e.A=s},2742:function(t,e){"use strict";e.A={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},41611:function(t,e,i){"use strict";var n=i(39078),s=i(76555),r=i(94549),o=i(95752),a=i(56811);class h extends n.Ay{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class l extends r.A{constructor(t){super(),this.on,this.once,this.un,(0,o.v6)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new h(i,t,e)),i=s.A.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new h(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.p)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}e.A=l},76555:function(t,e){"use strict";e.A={PROPERTYCHANGE:"propertychange"}},94549:function(t,e,i){"use strict";var n=i(29357),s=i(97582),r=i(8965);class o extends n.A{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(s.A.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=(0,r.KT)(this,t[s],e);return n}return(0,r.KT)(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=(0,r.Jz)(this,t[s],e)}else i=(0,r.Jz)(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)a(i);else if(Array.isArray(t))for(let n=0,s=t.length;n<s;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}function a(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)(0,r.JH)(t[e]);else(0,r.JH)(t)}o.prototype.on,o.prototype.once,o.prototype.un,e.A=o},40478:function(t,e,i){"use strict";var n=i(41611),s=i(2742),r=i(24109),o=i(37444),a=i(8965),h=i(17334);const l={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class c extends n.A{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+r.Q5,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(l.ELEMENT,this.handleElementChanged),this.addChangeListener(l.MAP,this.handleMapChanged),this.addChangeListener(l.OFFSET,this.handleOffsetChanged),this.addChangeListener(l.POSITION,this.handlePositionChanged),this.addChangeListener(l.POSITIONING,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(l.ELEMENT)}getId(){return this.id}getMap(){return this.get(l.MAP)||null}getOffset(){return this.get(l.OFFSET)}getPosition(){return this.get(l.POSITION)}getPositioning(){return this.get(l.POSITIONING)}handleElementChanged(){(0,h.gS)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&((0,h.bf)(this.element),(0,a.JH)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.KT)(t,s.A.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(l.ELEMENT,t)}setMap(t){this.set(l.MAP,t)}setOffset(t){this.set(l.OFFSET,t)}setPosition(t){this.set(l.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(l.POSITION))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),s=this.getRect(n,[(0,h.Gq)(n),(0,h.DK)(n)]);t=t||{};const r=void 0===t.margin?20:t.margin;if(!(0,o.ms)(i,s)){const n=s[0]-i[0],o=i[2]-s[2],a=s[1]-i[1],h=i[3]-s[3],l=[0,0];if(n<0?l[0]=n-r:o<0&&(l[0]=Math.abs(o)+r),a<0?l[1]=a-r:h<0&&(l[1]=Math.abs(h)+r),0!==l[0]||0!==l[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const s=[n[0]+l[0],n[1]+l[1]],r=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(s),duration:r.duration,easing:r.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,s=i.top+window.pageYOffset;return[n,s,n+e[0],s+e[1]]}setPositioning(t){this.set(l.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const r=Math.round(t[0]+n[0])+"px",o=Math.round(t[1]+n[1])+"px";let a="0%",h="0%";"bottom-right"==s||"center-right"==s||"top-right"==s?a="-100%":"bottom-center"!=s&&"center-center"!=s&&"top-center"!=s||(a="-50%"),"bottom-left"==s||"bottom-center"==s||"bottom-right"==s?h="-100%":"center-left"!=s&&"center-center"!=s&&"center-right"!=s||(h="-50%");const l=`translate(${a}, ${h}) translate(${r}, ${o})`;this.rendered.transform_!=l&&(this.rendered.transform_=l,i.transform=l)}getOptions(){return this.options}}e.A=c},70670:function(t,e,i){"use strict";i.d(e,{Ay:function(){return L}});i(44114);var n=i(41611),s=i(56940),r={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const o=256;var a=i(29094),h=i(69331),l=i(18474),c=i(1097),u=i(15674);function d(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const h=e?0:r[0]*s,l=e?0:r[1]*s,c=a?a[0]:0,d=a?a[1]:0;let g=t[0]+h/2+c,f=t[2]-h/2+c,_=t[1]+l/2+d,p=t[3]-l/2+d;g>f&&(g=(f+g)/2,f=g),_>p&&(_=(p+_)/2,p=_);let m=(0,u.qE)(n[0],g,f),y=(0,u.qE)(n[1],_,p);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,g-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-f)/t),y+=-t*Math.log(1+Math.max(0,_-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,y]}}function g(t){return t}var f=i(37444),_=i(3851);function p(t,e,i,n){const s=(0,f.RG)(e)/i[0],r=(0,f.Oq)(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function m(t,e,i){let n=Math.min(t,e);const s=50;return n*=Math.log(1+s*Math.max(0,t/e-1))/s+1,i&&(n=Math.max(n,i),n/=Math.log(1+s*Math.max(0,i/t-1))/s+1),(0,u.qE)(n,i/2,2*e)}function y(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const h=t[0],l=t[t.length-1],c=i?p(h,i,o,n):h;if(a)return e?m(s,c,l):(0,u.qE)(s,l,c);const d=Math.min(c,s),g=Math.floor((0,_.FT)(t,d,r));return t[g]>c&&g<t.length-1?t[g+1]:t[g]}}}function v(t,e,i,n,s,r){return n=void 0===n||n,i=void 0!==i?i:0,function(o,a,h,l){if(void 0!==o){const c=s?p(e,s,h,r):e;if(l)return n?m(o,c,i):(0,u.qE)(o,i,c);const d=1e-9,g=Math.ceil(Math.log(e/c)/Math.log(t)-d),f=-a*(.5-d)+.5,_=Math.min(c,o),y=Math.floor(Math.log(e/_)/Math.log(t)+f),v=Math.max(g,y),x=e/Math.pow(t,v);return(0,u.qE)(x,i,c)}}}function x(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,h){if(void 0!==r){const o=n?p(t,n,a,s):t;return i&&h?m(r,o,e):(0,u.qE)(r,e,o)}}}var E=i(95289),C=i(38409),A=i(93754);const w=0;class S extends n.A{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.Av)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.RJ)(),t.center&&(t.center=(0,a.Ad)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.SD)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in r)delete e[a];this.setProperties(e,!0);const i=T(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=I(t),s=i.constraint,o=M(t);this.constraints_={center:n,resolution:s,rotation:o},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)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),r=s/2*(n[3]-e[3]+e[1]-n[1]),o=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let i=0;i<e.length;++i){let t=arguments[i];t.center&&(t=Object.assign({},t),t.center=(0,a.Ad)(t.center,this.getProjection())),t.anchor&&(t=Object.assign({},t),t.anchor=(0,a.Ad)(t.anchor,this.getProjection())),e[i]=t}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"===typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&R(e,!0));let r=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,h=this.targetRotation_;const l=[];for(;n<i;++n){const t=arguments[n],i={start:r,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||C.T9,callback:e};if(t.center&&(i.sourceCenter=o,i.targetCenter=t.center.slice(),o=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=a,i.targetResolution=this.getResolutionForZoom(t.zoom),a=i.targetResolution):t.resolution&&(i.sourceResolution=a,i.targetResolution=t.resolution,a=i.targetResolution),void 0!==t.rotation){i.sourceRotation=h;const e=(0,u.xP)(t.rotation-h+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=h+e,h=i.targetRotation}b(i)?i.complete=!0:r+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(s.A.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[s.A.ANIMATING]>0}getInteracting(){return this.hints_[s.A.INTERACTING]>0}cancelAnimations(){let t;this.setHint(s.A.ANIMATING,-this.hints_[s.A.ANIMATING]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&R(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i<s;++i){const s=n[i];if(s.complete)continue;const o=t-s.start;let a=s.duration>0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const h=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+h*(i-t),o=e+h*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===h?s.targetResolution:s.sourceResolution+h*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===h?(0,u.xP)(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+h*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(s.A.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&R(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,l.e$)(i,t-this.getRotation()),(0,l.WQ)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();if(void 0!==n&&void 0!==s){const r=e[0]-t*(e[0]-n[0])/s,o=e[1]-t*(e[1]-n[1])/s;i=[r,o]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const 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}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.te)(t,this.getProjection()):t}getCenterInternal(){return this.get(r.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.JR)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,c.v)(e,"The view center is not defined");const i=this.getResolution();(0,c.v)(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return(0,c.v)(void 0!==n,"The view rotation is not defined"),(0,f.Bg)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(r.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.SD)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,f.RG)(t)/e[0],n=(0,f.Oq)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){const s=e/Math.pow(t,i*n);return s}}getRotation(){return this.get(r.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){const n=Math.log(i/t)/e/s;return n}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=P(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[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()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=(0,_.FT)(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,u.qE)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,u.qE)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,c.v)(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){(0,c.v)(!(0,f.Im)(t),"Cannot fit empty extent provided as `geometry`");const e=(0,a.SD)(t,this.getProjection());i=(0,A.VY)(e)}else if("Circle"===t.getType()){const e=(0,a.SD)(t.getExtent(),this.getProjection());i=(0,A.VY)(e),i.rotate(this.getRotation(),(0,f.q1)(e))}else{const e=(0,a.Tf)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,h=-1/0,l=-1/0;for(let c=0,u=s.length;c<u;c+=r){const t=s[c]*i-s[c+1]*n,e=s[c]*n+s[c+1]*i;o=Math.min(o,t),a=Math.min(a,e),h=Math.max(h,t),l=Math.max(l,e)}return[o,a,h,l]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let r;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?r:Math.max(a,r),a=this.getConstrainedResolution(a,s?0:1);const l=this.getRotation(),c=Math.sin(l),u=Math.cos(l),d=(0,f.q1)(o);d[0]+=(n[1]-n[3])/2*a,d[1]+=(n[0]-n[2])/2*a;const g=d[0]*u-d[1]*c,_=d[1]*u+d[0]*c,p=this.getConstrainedCenter([g,_],a),m=e.callback?e.callback:h.tV;void 0!==e.duration?this.animateInternal({resolution:a,center:p,duration:e.duration,easing:e.easing},m):(this.targetResolution_=a,this.targetCenter_=p,this.applyTargetState_(!1,!0),R(m,!0))}centerOn(t,e,i){this.centerOnInternal((0,a.Ad)(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(P(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const r=this.padding_;if(r&&t){const o=this.getViewportSizeMinusPadding_(-i),a=P(t,n,[o[0]/2+r[3],o[1]/2+r[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=(0,a.te)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&(0,a.Ad)(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=(0,a.Ad)(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const 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_()}setCenter(t){this.setCenterInternal(t?(0,a.Ad)(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,s,i),a=this.constraints_.center(this.targetCenter_,o,s,i,this.calculateCenterShift(this.targetCenter_,o,n,s));this.get(r.ROTATION)!==n&&this.set(r.ROTATION,n),this.get(r.RESOLUTION)!==o&&(this.set(r.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),a&&this.get(r.CENTER)&&(0,l.aI)(this.get(r.CENTER),a)||this.set(r.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,n,r),a=this.constraints_.center(this.targetCenter_,o,r,!1,this.calculateCenterShift(this.targetCenter_,o,s,r));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===s&&this.getCenterInternal()&&(0,l.aI)(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:o,duration:t,easing:C.vT,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(s.A.INTERACTING,1)}endInteraction(t,e,i){i=i&&(0,a.Ad)(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(s.A.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function R(t,e){setTimeout((function(){t(e)}),0)}function I(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return d(t.extent,t.constrainOnlyCenter,e)}const e=(0,a.Av)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,d(t,!1,!1)}return g}function T(t){let e,i,n;const s=28,r=2;let h=void 0!==t.minZoom?t.minZoom:w,l=void 0!==t.maxZoom?t.maxZoom:s;const c=void 0!==t.zoomFactor?t.zoomFactor:r,u=void 0!==t.multiWorld&&t.multiWorld,d=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,g=void 0!==t.showFullExtent&&t.showFullExtent,_=(0,a.Av)(t.projection,"EPSG:3857"),p=_.getExtent();let m=t.constrainOnlyCenter,E=t.extent;if(u||E||!_.isGlobal()||(m=!1,E=p),void 0!==t.resolutions){const s=t.resolutions;i=s[h],n=void 0!==s[l]?s[l]:s[s.length-1],e=t.constrainResolution?y(s,d,!m&&E,g):x(i,n,d,!m&&E,g)}else{const u=p?Math.max((0,f.RG)(p),(0,f.Oq)(p)):360*a.Ig.degrees/_.getMetersPerUnit(),y=u/o/Math.pow(r,w),C=y/Math.pow(r,s-w);i=t.maxResolution,void 0!==i?h=0:i=y/Math.pow(c,h),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(c,l):y/Math.pow(c,l):C),l=h+Math.floor(Math.log(i/n)/Math.log(c)),n=i/Math.pow(c,l-h),e=t.constrainResolution?v(c,i,n,d,!m&&E,g):x(i,n,d,!m&&E,g)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:h,zoomFactor:c}}function M(t){const e=void 0===t.enableRotation||t.enableRotation;if(e){const e=t.constrainRotation;return void 0===e||!0===e?(0,E.cq)():!1===e?E.dv:"number"===typeof e?(0,E.a$)(e):E.dv}return E.b8}function b(t){return!(t.sourceCenter&&t.targetCenter&&!(0,l.aI)(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function P(t,e,i,n,s){const r=Math.cos(-s);let o=Math.sin(-s),a=t[0]*r-t[1]*o,h=t[1]*r+t[0]*o;a+=(e[0]/2-i[0])*n,h+=(i[1]-e[1]/2)*n,o=-o;const l=a*r-h*o,c=h*r+a*o;return[l,c]}var L=S},56940:function(t,e){"use strict";e.A={ANIMATING:0,INTERACTING:1}},3851:function(t,e,i){"use strict";function n(t,e,i){let n,r;i=i||s;let o=0,a=t.length,h=!1;while(o<a)n=o+(a-o>>1),r=+i(t[n],e),r<0?o=n+1:(a=n,h=!r);return h?o:~o}function s(t,e){return t>e?1:t<e?-1:0}function r(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"===typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let s=1;s<n;++s){if(t[s]==e)return s;if(t[s]<e)return t[s-1]-e<e-t[s]?s-1:s}return n-1}function o(t,e,i){while(e<i){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function a(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let s=0;s<n;s++)t[t.length]=i[s]}function h(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}i.d(e,{El:function(){return n},FT:function(){return r},V_:function(){return s},X$:function(){return a},aI:function(){return h},gI:function(){return o}})},1097:function(t,e,i){"use strict";function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:function(){return n}})},66387:function(t,e,i){"use strict";i.d(e,{_j:function(){return w},oJ:function(){return p},sH:function(){return A},$C:function(){return I},cD:function(){return C},S8:function(){return S},eE:function(){return E},dI:function(){return R},fu:function(){return x}});var n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},s={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};s.max=s.whitepoint[2].D65,s.rgb=function(t,e){e=e||s.whitepoint[2].E;var i,n,r,o=t[0]/e[0],a=t[1]/e[1],h=t[2]/e[2];return i=3.240969941904521*o+-1.537383177570093*a+-.498610760293*h,n=-.96924363628087*o+1.87596750150772*a+.041555057407175*h,r=.055630079696993*o+-.20397695888897*a+1.056971514242878*h,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*i,255*n,255*r]},n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var o=.41239079926595*i+.35758433938387*n+.18048078840183*r,a=.21263900587151*i+.71516867876775*n+.072192315360733*r,h=.019330818715591*i+.11919477979462*n+.95053215224966*r;return e=e||s.whitepoint[2].E,[o*e[0],a*e[1],h*e[2]]};var r=s,o={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,s,o,a,h,l,c,u,d,g,f,_,p;if(o=t[0],a=t[1],h=t[2],0===o)return[0,0,0];var m=.0011070564598794539;return e=e||"D65",i=i||2,d=r.whitepoint[i][e][0],g=r.whitepoint[i][e][1],f=r.whitepoint[i][e][2],_=4*d/(d+15*g+3*f),p=9*g/(d+15*g+3*f),n=a/(13*o)+_||0,s=h/(13*o)+p||0,c=o>8?g*Math.pow((o+16)/116,3):g*o*m,l=9*c*n/(4*s)||0,u=c*(12-3*n-20*s)/(4*s)||0,[l,c,u]}};r.luv=function(t,e,i){var n,s,o,a,h,l,c,u,d,g,f,_,p,m=.008856451679035631,y=903.2962962962961;e=e||"D65",i=i||2,d=r.whitepoint[i][e][0],g=r.whitepoint[i][e][1],f=r.whitepoint[i][e][2],_=4*d/(d+15*g+3*f),p=9*g/(d+15*g+3*f),l=t[0],c=t[1],u=t[2],n=4*l/(l+15*c+3*u)||0,s=9*c/(l+15*c+3*u)||0;var v=c/g;return o=v<=m?y*v:116*Math.pow(v,1/3)-16,a=13*o*(n-_),h=13*o*(s-p),[o,a,h]};var a={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i,n,s=t[0],r=t[1],o=t[2];return n=o/360*2*Math.PI,e=r*Math.cos(n),i=r*Math.sin(n),[s,e,i]},xyz:function(t){return o.xyz(a.luv(t))}},h=a;o.lchuv=function(t){var e=t[0],i=t[1],n=t[2],s=Math.sqrt(i*i+n*n),r=Math.atan2(n,i),o=360*r/2/Math.PI;return o<0&&(o+=360),[e,s,o]},r.lchuv=function(t){return o.lchuv(r.luv(t))};i(44114);var l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c=d,u={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function d(t){var e,i,n=[],s=1;if("number"===typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"===typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),l[t])n=l[t].slice(),i="rgb";else if("transparent"===t)s=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var r=t.slice(1),o=r.length,a=o<=4;s=1,a?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===o&&(s=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===o&&(s=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var h=e[1];i=h.replace(/a$/,"");var c="cmyk"===i?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==u[t])return u[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)})),s=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:s}}var g={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,s,r,o=t[0]/360,a=t[1]/100,h=t[2]/100,l=0;if(0===a)return r=255*h,[r,r,r];for(i=h<.5?h*(1+a):h+a-h*a,e=2*h-i,s=[0,0,0];l<3;)n=o+1/3*-(l-1),n<0?n++:n>1&&n--,r=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,s[l++]=255*r;return s}};function f(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=c(t);if(!i.space)return[];const s="h"===i.space[0]?g.min:n.min,r="h"===i.space[0]?g.max:n.max;return e=Array(3),e[0]=Math.min(Math.max(i.values[0],s[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],s[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],s[2]),r[2]),"h"===i.space[0]&&(e=g.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}n.hsl=function(t){var e,i,n,s=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(s,r,o),h=Math.max(s,r,o),l=h-a;return h===a?e=0:s===h?e=(r-o)/l:r===h?e=2+(o-s)/l:o===h&&(e=4+(s-r)/l),e=Math.min(60*e,360),e<0&&(e+=360),n=(a+h)/2,i=h===a?0:n<=.5?l/(h+a):l/(2-h-a),[e,100*i,100*n]};var _=i(15674);function p(t){return"string"===typeof t?t:R(t)}const m=1024,y={};let v=0;function x(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function E(t){const e=r.lchuv(n.xyz(t));return e[3]=t[3],e}function C(t){const e=r.rgb(h.xyz(t));return e[3]=t[3],e}function A(t){if(y.hasOwnProperty(t))return y[t];if(v>=m){let t=0;for(const e in y)0===(3&t++)&&(delete y[e],--v)}const e=f(t);if(4!==e.length)throw new Error('Failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('Failed to parse "'+t+'" as color');return S(e),y[t]=e,++v,e}function w(t){return Array.isArray(t)?t:A(t)}function S(t){return t[0]=(0,_.qE)(t[0]+.5|0,0,255),t[1]=(0,_.qE)(t[1]+.5|0,0,255),t[2]=(0,_.qE)(t[2]+.5|0,0,255),t[3]=(0,_.qE)(t[3],0,1),t}function R(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);const s=void 0===t[3]?1:Math.round(100*t[3])/100;return"rgba("+e+","+i+","+n+","+s+")"}function I(t){try{return A(t),!0}catch(e){return!1}}},6294:function(t,e,i){"use strict";i.d(e,{F:function(){return s}});var n=i(66387);function s(t){return Array.isArray(t)?(0,n.dI)(t):t}},32155:function(t,e,i){"use strict";i.d(e,{R8:function(){return r}});const n={info:1,warn:2,error:3,none:4};let s=n.info;function r(...t){s>n.warn||console.warn(...t)}},96993:function(t,e,i){"use strict";i(44114);var n=i(41611),s=i(2742),r=i(69331),o=i(8965),a=i(17334);class h extends n.A{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,a.bf)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,a.bf)(this.element);for(let e=0,i=this.listenerKeys.length;e<i;++e)(0,o.JH)(this.listenerKeys[e]);if(this.listenerKeys.length=0,this.map_=t,t){const e=this.target_?this.target_:t.getOverlayContainerStopEvent();e.appendChild(this.element),this.render!==r.tV&&this.listenerKeys.push((0,o.KT)(t,s.A.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"===typeof t?document.getElementById(t):t}}e.A=h},39493:function(t,e,i){"use strict";var n=i(96993),s=i(97582),r=i(24109),o=i(38409);class a extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",h=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",l=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",c=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=n,u.setAttribute("type","button"),u.title=l,u.appendChild("string"===typeof a?document.createTextNode(a):a),u.addEventListener(s.A.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=c,d.appendChild("string"===typeof h?document.createTextNode(h):h),d.addEventListener(s.A.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+r.XI+" "+r.$N,f=this.element;f.className=g,f.appendChild(u),f.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap(),i=e.getView();if(!i)return;const n=i.getZoom();if(void 0!==n){const e=i.getConstrainedZoom(n+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:e,duration:this.duration_,easing:o.vT})):i.setZoom(e)}}}e.A=a},11348:function(t,e,i){"use strict";i(44114);var n=i(96993),s=i(97582),r=i(92504),o=i(24109),a=i(15674),h=i(38409),l=i(8965),c=i(39078);const u={VERTICAL:0,HORIZONTAL:1};class d extends n.A{constructor(t){t=t||{},super({target:t.target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=u.VERTICAL,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+o.XI;const n=this.element;n.className=e+" "+o.XI+" "+o.$N,n.appendChild(i),n.addEventListener(r.A.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(r.A.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(r.A.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.A.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.A.CLICK,c.dG,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n["paddingRight"])+parseFloat(n["paddingLeft"]),i-=parseFloat(n["paddingTop"])+parseFloat(n["paddingBottom"]);const s=t.firstElementChild,r=getComputedStyle(s),o=s.offsetWidth+parseFloat(r["marginRight"])+parseFloat(r["marginLeft"]),a=s.offsetHeight+parseFloat(r["marginTop"])+parseFloat(r["marginBottom"]);return this.thumbSize_=[o,a],e>i?(this.direction_=u.HORIZONTAL,this.widthLimit_=e-o):(this.direction_=u.VERTICAL,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),s=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:s,duration:this.duration_,easing:h.vT})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,l.KT)(i,r.A.POINTERMOVE,t,this),(0,l.KT)(i,r.A.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){if(this.dragging_){const t=this.getMap().getView();t.endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(l.JH),this.dragListenerKeys_.length=0}}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==u.HORIZONTAL?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=this.direction_===u.HORIZONTAL?t/this.widthLimit_:e/this.heightLimit_,(0,a.qE)(i,0,1)}getResolutionForPosition_(t){const e=this.getMap().getView().getResolutionForValueFunction();return e(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,a.qE)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}e.A=d},85294:function(t,e,i){"use strict";i.d(e,{N:function(){return _}});i(44114),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var n=i(96993),s=i(97582),r=i(24109),o=i(3851),a=i(17334);class h extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"===typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const h=void 0!==t.label?t.label:"i";"string"===typeof h?(this.label_=document.createElement("span"),this.label_.textContent=h,this.label_.className=n):this.label_=h;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const c=e+" "+r.XI+" "+r.$N+(this.collapsed_&&this.collapsible_?" "+r.nT:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=c,u.appendChild(this.toggleButton_),u.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.aI)(e,this.renderedAttributions_)){(0,a.gS)(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(r.nT),this.collapsed_?(0,a.fo)(this.collapseLabel_,this.label_):(0,a.fo)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}var l=h,c=i(73844),u=i(38409);class d extends n.A{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"===typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(s.A.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+r.XI+" "+r.$N,l=this.element;l.className=h,l.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(r.Si)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap(),e=t.getView();if(!e)return;const i=e.getRotation();void 0!==i&&(this.duration_>0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:u.vT}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(r.Si);t||0!==i?t&&0!==i&&this.element.classList.remove(r.Si):this.element.classList.add(r.Si)}this.label_.style.transform=t}this.rotation_=i}}var g=d,f=i(39493);function _(t){t=t||{};const e=new c.A,i=void 0===t.zoom||t.zoom;i&&e.push(new f.A(t.zoomOptions));const n=void 0===t.rotate||t.rotate;n&&e.push(new g(t.rotateOptions));const s=void 0===t.attribution||t.attribution;return s&&e.push(new l(t.attributionOptions)),e}},18474:function(t,e,i){"use strict";i.d(e,{$x:function(){return g},Io:function(){return d},KN:function(){return f},Li:function(){return _},WQ:function(){return s},aI:function(){return h},e$:function(){return l},hG:function(){return u},hs:function(){return c},hw:function(){return r},sG:function(){return o}});var n=i(37444);function s(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function r(t,e){const i=e.getRadius(),n=e.getCenter(),s=n[0],r=n[1],o=t[0],a=t[1];let h=o-s;const l=a-r;0===h&&0===l&&(h=1);const c=Math.sqrt(h*h+l*l),u=s+i*h/c,d=r+i*l/c;return[u,d]}function o(t,e){const i=t[0],n=t[1],s=e[0],r=e[1],o=s[0],a=s[1],h=r[0],l=r[1],c=h-o,u=l-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,f;return d<=0?(g=o,f=a):d>=1?(g=h,f=l):(g=o+d*c,f=a+d*u),[g,f]}function a(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function h(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function l(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function c(t,e){return t[0]*=e,t[1]*=e,t}function u(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function d(t,e){return Math.sqrt(u(t,e))}function g(t,e){return u(t,o(t,e))}function f(t,e){return a(t,"{x}, {y}",e)}function _(t,e){if(e.canWrapX()){const i=(0,n.RG)(e.getExtent()),s=p(t,e,i);s&&(t[0]-=s*i)}return t}function p(t,e,i){const s=e.getExtent();let r=0;return e.canWrapX()&&(t[0]<s[0]||t[0]>s[2])&&(i=i||(0,n.RG)(s),r=Math.floor((t[0]-s[0])/i)),r}},24109:function(t,e,i){"use strict";i.d(e,{$N:function(){return o},K5:function(){return c},Q5:function(){return s},Si:function(){return n},XI:function(){return r},nT:function(){return a}});const n="ol-hidden",s="ol-selectable",r="ol-unselectable",o="ol-control",a="ol-collapsed",h=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"),l=["style","variant","weight","size","lineHeight","family"],c=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,s=l.length;n<s;++n){const t=e[n+1];void 0!==t&&(i[l[n]]=t)}return i.families=i.family.split(/,\s?/),i}},17334:function(t,e,i){"use strict";i.d(e,{DK:function(){return a},Gq:function(){return o},WM:function(){return u},Y:function(){return s},Yg:function(){return r},bf:function(){return l},fo:function(){return h},gS:function(){return c}});var n=i(20502);function s(t,e,i,s){let r;return r=i&&i.length?i.shift():n.Wl?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",s)}function r(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function o(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function a(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function h(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function l(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function c(t){while(t.lastChild)t.removeChild(t.lastChild)}function u(t,e){const i=t.childNodes;for(let n=0;1;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}},38409:function(t,e,i){"use strict";function n(t){return Math.pow(t,3)}function s(t){return 1-n(1-t)}function r(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{T9:function(){return r},sn:function(){return o},vT:function(){return s}})},8965:function(t,e,i){"use strict";i.d(e,{JH:function(){return o},Jz:function(){return r},KT:function(){return s}});var n=i(56811);function s(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function r(t,e,i,n){return s(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.I)(t))}},39078:function(t,e,i){"use strict";i.d(e,{dG:function(){return s}});class n{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function s(t){t.stopPropagation()}e.Ay=n},97582:function(t,e){"use strict";e.A={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},29357:function(t,e,i){"use strict";i(44114);var n=i(58646),s=i(39078),r=i(69331),o=i(56811);class a extends n.A{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"===typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new s.Ay(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});let l;i in a||(a[i]=0,h[i]=0),++a[i];for(let s=0,r=n.length;s<r;++s)if(l="handleEvent"in n[s]?n[s].handleEvent(o):n[s].call(this,o),!1===l||o.propagationStopped){l=!1;break}if(0===--a[i]){let t=h[i];delete h[i];while(t--)this.removeEventListener(i,r.tV);delete a[i]}return l}disposeInternal(){this.listeners_&&(0,o.I)(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=r.tV,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}e.A=a},22535:function(t,e,i){"use strict";i.d(e,{A4:function(){return x},GB:function(){return m},Gk:function(){return d},IO:function(){return l},Js:function(){return h},Kg:function(){return y},Q7:function(){return a},TS:function(){return p},Zm:function(){return f},at:function(){return g},eL:function(){return u},fs:function(){return E},t5:function(){return _},tE:function(){return v}});var n=i(83156),s=i(69331),r=i(20502),o=i(1097);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s;++n)if(i=i&&e[n](t),!i)break;return i}}const h=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},l=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},c=function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)},u=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||c(t)},d=s.rT,g=function(t){const e=t.originalEvent;return 0==e.button&&!(r.j&&r.ew&&e.ctrlKey)},f=s.W8,_=function(t){return t.type==n.A.SINGLECLICK},p=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},m=function(t){const e=t.originalEvent;return r.ew?e.metaKey:e.ctrlKey},y=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},v=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},x=function(t){const e=t.originalEvent;return(0,o.v)(void 0!==e,"mapBrowserEvent must originate from a pointer event"),"mouse"==e.pointerType},E=function(t){const e=t.originalEvent;return(0,o.v)(void 0!==e,"mapBrowserEvent must originate from a pointer event"),e.isPrimary&&0===e.button}},37444:function(t,e,i){"use strict";i.d(e,{$C:function(){return x},$u:function(){return N},Bg:function(){return T},HY:function(){return F},Im:function(){return k},Ld:function(){return h},Li:function(){return B},Mx:function(){return G},N:function(){return f},NW:function(){return W},Oq:function(){return b},Py:function(){return L},QJ:function(){return Y},R:function(){return S},R8:function(){return E},RG:function(){return D},Rj:function(){return u},S5:function(){return g},Tr:function(){return s},UG:function(){return w},Vy:function(){return m},WU:function(){return O},X$:function(){return v},Ym:function(){return l},_N:function(){return P},aI:function(){return y},aZ:function(){return _},dP:function(){return p},k_:function(){return R},ms:function(){return c},o8:function(){return a},q1:function(){return I},r:function(){return o},sB:function(){return A},vz:function(){return d}});i(44114);var n=i(91945);function s(t){const e=g();for(let i=0,n=t.length;i<n;++i)x(e,t[i]);return e}function r(t,e,i){const n=Math.min.apply(null,t),s=Math.min.apply(null,e),r=Math.max.apply(null,t),o=Math.max.apply(null,e);return f(n,s,r,o,i)}function o(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 a(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function h(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function l(t,e){return u(t,e[0],e[1])}function c(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function u(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function d(t,e){const i=t[0],s=t[1],r=t[2],o=t[3],a=e[0],h=e[1];let l=n.A.UNKNOWN;return a<i?l|=n.A.LEFT:a>r&&(l|=n.A.RIGHT),h<s?l|=n.A.BELOW:h>o&&(l|=n.A.ABOVE),l===n.A.UNKNOWN&&(l=n.A.INTERSECTING),l}function g(){return[1/0,1/0,-1/0,-1/0]}function f(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function _(t){return f(1/0,1/0,-1/0,-1/0,t)}function p(t,e){const i=t[0],n=t[1];return f(i,n,i,n,e)}function m(t,e,i,n,s){const r=_(s);return E(r,t,e,i,n)}function y(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function v(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 x(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 E(t,e,i,n,s){for(;i<n;i+=s)C(t,e[i],e[i+1]);return t}function C(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 A(t,e){let i;return i=e(S(t)),i||(i=e(R(t)),i||(i=e(O(t)),i||(i=e(L(t)),i||!1)))}function w(t){let e=0;return k(t)||(e=D(t)*b(t)),e}function S(t){return[t[0],t[1]]}function R(t){return[t[2],t[1]]}function I(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function T(t,e,i,n,s){const[r,o,a,h,l,c,u,d]=M(t,e,i,n);return f(Math.min(r,a,l,u),Math.min(o,h,c,d),Math.max(r,a,l,u),Math.max(o,h,c,d),s)}function M(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),h=s*o,l=s*a,c=r*o,u=r*a,d=t[0],g=t[1];return[d-h+u,g-l-c,d-h-u,g-l+c,d+h-u,g+l+c,d+h+u,g+l-c,d-h+u,g-l-c]}function b(t){return t[3]-t[1]}function P(t,e,i){const n=i||g();return F(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]):_(n),n}function L(t){return[t[0],t[3]]}function O(t){return[t[2],t[3]]}function D(t){return t[2]-t[0]}function F(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function k(t){return t[2]<t[0]||t[3]<t[1]}function N(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function G(t,e,i){let s=!1;const r=d(t,e),o=d(t,i);if(r===n.A.INTERSECTING||o===n.A.INTERSECTING)s=!0;else{const a=t[0],h=t[1],l=t[2],c=t[3],u=e[0],d=e[1],g=i[0],f=i[1],_=(f-d)/(g-u);let p,m;o&n.A.ABOVE&&!(r&n.A.ABOVE)&&(p=g-(f-c)/_,s=p>=a&&p<=l),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=f-(g-l)*_,s=m>=h&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(f-h)/_,s=p>=a&&p<=l),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=f-(g-a)*_,s=m>=h&&m<=c)}return s}function W(t,e,i,n){if(k(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r<n;++r)s.push(t[0]+e*r/n,t[1],t[2],t[1]+i*r/n,t[2]-e*r/n,t[3],t[0],t[3]-i*r/n)}else s=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(s,s,2);const o=[],a=[];for(let r=0,h=s.length;r<h;r+=2)o.push(s[r]),a.push(s[r+1]);return r(o,a,i)}function B(t,e){const i=e.getExtent(),n=I(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=D(i),s=Math.floor((n[0]-i[0])/e),r=s*e;t[0]-=r,t[2]-=r}return t}function Y(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];B(t,e);const n=D(i);if(D(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+n,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}},91945:function(t,e){"use strict";e.A={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},69331:function(t,e,i){"use strict";i.d(e,{B4:function(){return a},W8:function(){return r},hq:function(){return h},rT:function(){return s},tV:function(){return o}});var n=i(3851);function s(){return!0}function r(){return!1}function o(){}function a(t){let e,i,s,r=!1;return function(){const o=Array.prototype.slice.call(arguments);return r&&this===s&&(0,n.aI)(o,i)||(r=!0,s=this,i=o,e=t.apply(this,arguments)),e}}function h(t){function e(){let e;try{e=t()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return e()}},3471:function(t,e,i){"use strict";var n=i(41611),s=i(95752),r=i(71194),o=i(37444),a=i(29094),h=i(69331),l=i(53371);const c=(0,r.vt)();class u extends n.A{constructor(){super(),this.extent_=(0,o.S5)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,h.B4)(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,s.b0)()}closestPointXY(t,e,i,n){return(0,s.b0)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,s.b0)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.aZ)(t),this.extentRevision_=this.getRevision()}return(0,o.$u)(this.extent_,t)}rotate(t,e){(0,s.b0)()}scale(t,e,i){(0,s.b0)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,s.b0)()}getType(){return(0,s.b0)()}applyTransform(t){(0,s.b0)()}intersectsExtent(t){return(0,s.b0)()}translate(t,e){(0,s.b0)()}transform(t,e){const i=(0,a.Jt)(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const h=i.getExtent(),u=i.getWorldExtent(),d=(0,o.Oq)(u)/(0,o.Oq)(h);return(0,r.Zz)(c,u[0],u[3],d,-d,0,0,0),(0,l.Rc)(t,0,t.length,s,c,n),(0,a.RG)(i,e)(t,n,s)}:(0,a.RG)(i,e);return this.applyTransform(n),this}}e.A=u},18225:function(t,e,i){"use strict";var n=i(33665),s=i(37444),r=i(56320),o=i(15674);class a extends n.Ay{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=(0,o.hG)(t,e,s[0],s[1]);if(r<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,r}return n}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return(0,s.dP)(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return(0,s.Rj)(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,r._n)(this.flatCoordinates,0,t,this.stride),this.changed()}}e.A=a},93754:function(t,e,i){"use strict";i.d(e,{Ay:function(){return x},nD:function(){return C},VY:function(){return E}});i(44114);var n=i(33665),s=i(86072),r=i(37444),o=i(56320),a=i(53344),h=i(44476),l=i(81522);class c extends n.Ay{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new c(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,l.eN)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,h.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new c(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}var u=c,d=i(18225),g=i(3851),f=i(77689),_=i(69433),p=i(11853),m=i(58330),y=i(15674);class v extends n.Ay{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,g.X$)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new v(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,r.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.zb)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,l.PK)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,p.ug)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,h.cD)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,r.q1)(this.getExtent());this.flatInteriorPoint_=(0,f.J)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new d.A(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new u(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=new u(e.slice(s,o),t);n.push(a),s=o}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;(0,p.PA)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,p.ug)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,a.Hg)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new v(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return(0,_.HT)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,o.KG)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var x=v;function E(t){if((0,r.Im)(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],o=[e,i,e,s,n,s,n,i,e,i];return new v(o,"XY",[o.length])}function C(t,e,i){e=e||32;const n=t.getStride(),s=t.getLayout(),r=t.getCenter(),o=n*(e+1),a=new Array(o);for(let c=0;c<o;c+=n){a[c]=0,a[c+1]=0;for(let t=2;t<n;t++)a[c+t]=r[t]}const h=[a.length],l=new v(a,s,h);return A(l,r,t.getRadius(),i),l}function A(t,e,i,n){const s=t.getFlatCoordinates(),r=t.getStride(),o=s.length/r-1,a=n||0;for(let h=0;h<=o;++h){const t=h*r,n=a+2*(0,y.xP)(h,o)*Math.PI/o;s[t]=e[0]+i*Math.cos(n),s[t+1]=e[1]+i*Math.sin(n)}t.changed()}},33665:function(t,e,i){"use strict";i.d(e,{dn:function(){return l},v7:function(){return c}});var n=i(3471),s=i(95752),r=i(37444),o=i(53371);class a extends n.A{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return(0,r.Vy)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,s.b0)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t),i=e.getFlatCoordinates();return i.length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=l(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){(0,s.b0)()}setLayout(t,e,i){let n;if(t)n=l(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=h(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();(0,o.e$)(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=(0,r.q1)(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();(0,o.hs)(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();(0,o.Tl)(i,0,i.length,n,t,e,i),this.changed()}}}function h(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}function l(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function c(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return(0,o.Rc)(n,0,n.length,s,e,i)}e.Ay=a},81522:function(t,e,i){"use strict";function n(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=o*i-r*n,r=i,o=n}return s/2}function s(t,e,i,s){let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];r+=n(t,e,a,s),e=a}return r}function r(t,e,i,n){let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];r+=s(t,e,a,n),e=a[a.length-1]}return r}i.d(e,{Cs:function(){return r},PK:function(){return s},eN:function(){return n}})},88298:function(t,e,i){"use strict";i.d(e,{C:function(){return s}});i(44114);var n=i(37444);function s(t,e,i,s){const r=[];let o=(0,n.S5)();for(let a=0,h=i.length;a<h;++a){const h=i[a];o=(0,n.Vy)(t,e,h[0],s),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=h[h.length-1]}return r}},86072:function(t,e,i){"use strict";i.d(e,{HX:function(){return o},MD:function(){return r},c:function(){return a},n:function(){return h},oW:function(){return l},te:function(){return c}});var n=i(15674);function s(t,e,i,s,r,o,a){const h=t[e],l=t[e+1],c=t[i]-h,u=t[i+1]-l;let d;if(0===c&&0===u)d=e;else{const g=((r-h)*c+(o-l)*u)/(c*c+u*u);if(g>1)d=i;else{if(g>0){for(let r=0;r<s;++r)a[r]=(0,n.Cc)(t[e+r],t[i+r],g);return void(a.length=s)}d=e}}for(let n=0;n<s;++n)a[n]=t[d+n];a.length=s}function r(t,e,i,s,r){let o=t[e],a=t[e+1];for(e+=s;e<i;e+=s){const i=t[e],s=t[e+1],h=(0,n.hG)(o,a,i,s);h>r&&(r=h),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;o<a;++o){const a=i[o];s=r(t,e,a,n,s),e=a}return s}function a(t,e,i,n,s){for(let r=0,a=i.length;r<a;++r){const a=i[r];s=o(t,e,a,n,s),e=a[a.length-1]}return s}function h(t,e,i,r,o,a,h,l,c,u,d){if(e==i)return u;let g,f;if(0===o){if(f=(0,n.hG)(h,l,t[e],t[e+1]),f<u){for(g=0;g<r;++g)c[g]=t[e+g];return c.length=r,f}return u}d=d||[NaN,NaN];let _=e+r;while(_<i)if(s(t,_-r,_,r,h,l,d),f=(0,n.hG)(h,l,d[0],d[1]),f<u){for(u=f,g=0;g<r;++g)c[g]=d[g];c.length=r,_+=r}else _+=r*Math.max((Math.sqrt(f)-Math.sqrt(u))/o|0,1);if(a&&(s(t,i-r,e,r,h,l,d),f=(0,n.hG)(h,l,d[0],d[1]),f<u)){for(u=f,g=0;g<r;++g)c[g]=d[g];c.length=r}return u}function l(t,e,i,n,s,r,o,a,l,c,u){u=u||[NaN,NaN];for(let d=0,g=i.length;d<g;++d){const g=i[d];c=h(t,e,g,n,s,r,o,a,l,c,u),e=g}return c}function c(t,e,i,n,s,r,o,a,h,c,u){u=u||[NaN,NaN];for(let d=0,g=i.length;d<g;++d){const g=i[d];c=l(t,e,g,n,s,r,o,a,h,c,u),e=g[g.length-1]}return c}},58330:function(t,e,i){"use strict";i.d(e,{Gd:function(){return a},a_:function(){return r},t7:function(){return s},zb:function(){return o}});var n=i(37444);function s(t,e,i,s,o){const a=(0,n.sB)(o,(function(n){return!r(t,e,i,s,n[0],n[1])}));return!a}function r(t,e,i,n,s,r){let o=0,a=t[i-n],h=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];h<=r?n>r&&(i-a)*(r-h)-(s-a)*(n-h)>0&&o++:n<=r&&(i-a)*(r-h)-(s-a)*(n-h)<0&&o--,a=i,h=n}return 0!==o}function o(t,e,i,n,s,o){if(0===i.length)return!1;if(!r(t,e,i[0],n,s,o))return!1;for(let a=1,h=i.length;a<h;++a)if(r(t,i[a-1],i[a],n,s,o))return!1;return!0}function a(t,e,i,n,s,r){if(0===i.length)return!1;for(let a=0,h=i.length;a<h;++a){const h=i[a];if(o(t,e,h,n,s,r))return!0;e=h[h.length-1]}return!1}},56320:function(t,e,i){"use strict";function n(t,e,i,n){for(let s=0,r=i.length;s<r;++s)t[e++]=i[s];return e}function s(t,e,i,n){for(let s=0,r=i.length;s<r;++s){const r=i[s];for(let i=0;i<n;++i)t[e++]=r[i]}return e}function r(t,e,i,n,r){r=r||[];let o=0;for(let a=0,h=i.length;a<h;++a){const h=s(t,e,i[a],n);r[o++]=h,e=h}return r.length=o,r}function o(t,e,i,n,s){s=s||[];let o=0;for(let a=0,h=i.length;a<h;++a){const h=r(t,e,i[a],n,s[o]);0===h.length&&(h[0]=e),s[o++]=h,e=h[h.length-1]}return s.length=o,s}i.d(e,{KG:function(){return r},_n:function(){return n},d6:function(){return o},z2:function(){return s}})},44476:function(t,e,i){"use strict";function n(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;o<i;o+=n)s[r++]=t.slice(o,o+n);return s.length=r,s}function s(t,e,i,s,r){r=void 0!==r?r:[];let o=0;for(let a=0,h=i.length;a<h;++a){const h=i[a];r[o++]=n(t,e,h,s,r[o]),e=h}return r.length=o,r}function r(t,e,i,n,r){r=void 0!==r?r:[];let o=0;for(let a=0,h=i.length;a<h;++a){const h=i[a];r[o++]=1===h.length&&h[0]===e?[]:s(t,e,h,n,r[o]),e=h[h.length-1]}return r.length=o,r}i.d(e,{Dz:function(){return r},cD:function(){return s},n2:function(){return n}})},77689:function(t,e,i){"use strict";i.d(e,{J:function(){return r},p:function(){return o}});i(44114);var n=i(3851),s=i(58330);function r(t,e,i,r,o,a,h){let l,c,u,d,g,f,_;const p=o[a+1],m=[];for(let n=0,s=i.length;n<s;++n){const s=i[n];for(d=t[s-r],f=t[s-r+1],l=e;l<s;l+=r)g=t[l],_=t[l+1],(p<=f&&_<=p||f<=p&&p<=_)&&(u=(p-f)/(_-f)*(g-d)+d,m.push(u)),d=g,f=_}let y=NaN,v=-1/0;for(m.sort(n.V_),d=m[0],l=1,c=m.length;l<c;++l){g=m[l];const n=Math.abs(g-d);n>v&&(u=(d+g)/2,(0,s.zb)(t,e,i,r,u,p)&&(y=u,v=n)),d=g}return isNaN(y)&&(y=o[a]),h?(h.push(y,p,v),h):[y,p,v]}function o(t,e,i,n,s){let o=[];for(let a=0,h=i.length;a<h;++a){const h=i[a];o=r(t,e,h,n,s,2*a,o),e=h[h.length-1]}return o}},75572:function(t,e,i){"use strict";i.d(e,{L8:function(){return a},SH:function(){return r},gr:function(){return o}});i(44114);var n=i(3851),s=i(15674);function r(t,e,i,r,o,a,h){let l,c;const u=(i-e)/r;if(1===u)l=e;else if(2===u)l=e,c=o;else if(0!==u){let s=t[e],a=t[e+1],h=0;const u=[0];for(let n=e+r;n<i;n+=r){const e=t[n],i=t[n+1];h+=Math.sqrt((e-s)*(e-s)+(i-a)*(i-a)),u.push(h),s=e,a=i}const d=o*h,g=(0,n.El)(u,d);g<0?(c=(d-u[-g-2])/(u[-g-1]-u[-g-2]),l=e+(-g-2)*r):l=e+g*r}h=h>1?h:2,a=a||new Array(h);for(let n=0;n<h;++n)a[n]=void 0===l?NaN:void 0===c?t[l+n]:(0,s.Cc)(t[l+n],t[l+r+n],c);return a}function o(t,e,i,n,r,o){if(i==e)return null;let a;if(r<t[e+n-1])return o?(a=t.slice(e,e+n),a[n-1]=r,a):null;if(t[i-1]<r)return o?(a=t.slice(i-n,i),a[n-1]=r,a):null;if(r==t[e+n-1])return t.slice(e,e+n);let h=e/n,l=i/n;while(h<l){const e=h+l>>1;r<t[(e+1)*n-1]?l=e:h=e+1}const c=t[h*n-1];if(r==c)return t.slice((h-1)*n,(h-1)*n+n);const u=t[(h+1)*n-1],d=(r-c)/(u-c);a=[];for(let g=0;g<n-1;++g)a.push((0,s.Cc)(t[(h-1)*n+g],t[h*n+g],d));return a.push(r),a}function a(t,e,i,n,s,r,a){if(a)return o(t,e,i[i.length-1],n,s,r);let h;if(s<t[n-1])return r?(h=t.slice(0,n),h[n-1]=s,h):null;if(t[t.length-1]<s)return r?(h=t.slice(t.length-n),h[n-1]=s,h):null;for(let l=0,c=i.length;l<c;++l){const r=i[l];if(e!=r){if(s<t[e+n-1])return null;if(s<=t[r-1])return o(t,e,r,n,s,!1);e=r}}return null}},69433:function(t,e,i){"use strict";i.d(e,{HT:function(){return l},Wp:function(){return c},fB:function(){return a},gp:function(){return o}});var n=i(37444),s=i(18601),r=i(58330);function o(t,e,i,r,o){const a=(0,n.R8)((0,n.S5)(),t,e,i,r);return!!(0,n.HY)(o,a)&&(!!(0,n.ms)(o,a)||(a[0]>=o[0]&&a[2]<=o[2]||(a[1]>=o[1]&&a[3]<=o[3]||(0,s.j)(t,e,i,r,(function(t,e){return(0,n.Mx)(o,t,e)})))))}function a(t,e,i,n,s){for(let r=0,a=i.length;r<a;++r){if(o(t,e,i[r],n,s))return!0;e=i[r]}return!1}function h(t,e,i,n,s){return!!o(t,e,i,n,s)||(!!(0,r.a_)(t,e,i,n,s[0],s[1])||(!!(0,r.a_)(t,e,i,n,s[0],s[3])||(!!(0,r.a_)(t,e,i,n,s[2],s[1])||!!(0,r.a_)(t,e,i,n,s[2],s[3]))))}function l(t,e,i,n,s){if(!h(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let a=1,h=i.length;a<h;++a)if((0,r.t7)(t,i[a-1],i[a],n,s)&&!o(t,i[a-1],i[a],n,s))return!1;return!0}function c(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];if(l(t,e,o,n,s))return!0;e=o[o.length-1]}return!1}},45907:function(t,e,i){"use strict";function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-s)*(e-s)+(i-r)*(i-r)),s=e,r=i}return o}i.d(e,{k:function(){return n}})},11853:function(t,e,i){"use strict";i.d(e,{yJ:function(){return l},PA:function(){return r},mb:function(){return o},ug:function(){return a},NK:function(){return h}});i(44114);function n(t,e,i,n){while(e<i-n){for(let s=0;s<n;++s){const r=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=r}e+=n,i-=n}}function s(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-r)*(n+o),r=i,o=n}return 0===s?void 0:s>0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;o<a;++o){const a=i[o],h=s(t,e,a,n);if(0===o){if(r&&h||!r&&!h)return!1}else if(r&&!h||!r&&h)return!1;e=a}return!0}function o(t,e,i,n,s){for(let o=0,a=i.length;o<a;++o){const a=i[o];if(!r(t,e,a,n,s))return!1;a.length&&(e=a[a.length-1])}return!0}function a(t,e,i,r,o){o=void 0!==o&&o;for(let a=0,h=i.length;a<h;++a){const h=i[a],l=s(t,e,h,r),c=0===a?o&&l||!o&&!l:o&&!l||!o&&l;c&&n(t,e,h,r),e=h}return e}function h(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r)e=a(t,e,i[r],n,s);return e}function l(t,e){const i=[];let n,r=0,o=0;for(let a=0,h=e.length;a<h;++a){const h=e[a],l=s(t,r,h,2);if(void 0===n&&(n=l),l===n)i.push(e.slice(o,a+1));else{if(0===i.length)continue;i[i.length-1].push(e[o])}o=a+1,r=h}return i}},18601:function(t,e,i){"use strict";function n(t,e,i,n,s){let r;for(e+=n;e<i;e+=n)if(r=s(t.slice(e-n,e),t.slice(e,e+n)),r)return r;return!1}i.d(e,{j:function(){return n}})},53344:function(t,e,i){"use strict";i.d(e,{AL:function(){return r},Hg:function(){return h},P4:function(){return s},n$:function(){return o},sx:function(){return l}});i(44114);var n=i(15674);function s(t,e,i,s,r,o,a){const h=(i-e)/s;if(h<3){for(;e<i;e+=s)o[a++]=t[e],o[a++]=t[e+1];return a}const l=new Array(h);l[0]=1,l[h-1]=1;const c=[e,i-s];let u=0;while(c.length>0){const i=c.pop(),o=c.pop();let a=0;const h=t[o],d=t[o+1],g=t[i],f=t[i+1];for(let e=o+s;e<i;e+=s){const i=t[e],s=t[e+1],r=(0,n.Q1)(i,s,h,d,g,f);r>a&&(u=e,a=r)}a>r&&(l[(u-e)/s]=1,o+s<u&&c.push(o,u),u+s<i&&c.push(u,i))}for(let n=0;n<h;++n)l[n]&&(o[a++]=t[e+n*s],o[a++]=t[e+n*s+1]);return a}function r(t,e,i,n,r,o,a,h){for(let l=0,c=i.length;l<c;++l){const c=i[l];a=s(t,e,c,n,r,o,a),h.push(a),e=c}return a}function o(t,e){return e*Math.round(t/e)}function a(t,e,i,n,s,r,a){if(e==i)return a;let h,l,c=o(t[e],s),u=o(t[e+1],s);e+=n,r[a++]=c,r[a++]=u;do{if(h=o(t[e],s),l=o(t[e+1],s),e+=n,e==i)return r[a++]=h,r[a++]=l,a}while(h==c&&l==u);while(e<i){const i=o(t[e],s),d=o(t[e+1],s);if(e+=n,i==h&&d==l)continue;const g=h-c,f=l-u,_=i-c,p=d-u;g*p==f*_&&(g<0&&_<g||g==_||g>0&&_>g)&&(f<0&&p<f||f==p||f>0&&p>f)?(h=i,l=d):(r[a++]=h,r[a++]=l,c=h,u=l,h=i,l=d)}return r[a++]=h,r[a++]=l,a}function h(t,e,i,n,s,r,o,h){for(let l=0,c=i.length;l<c;++l){const c=i[l];o=a(t,e,c,n,s,r,o),h.push(o),e=c}return o}function l(t,e,i,n,s,r,o,a){for(let l=0,c=i.length;l<c;++l){const c=i[l],u=[];o=h(t,e,c,n,s,r,o,u),a.push(u),e=c[c.length-1]}return o}},53371:function(t,e,i){"use strict";function n(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];r[o++]=s[0]*e+s[2]*i+s[4],r[o++]=s[1]*e+s[3]*i+s[5]}return r&&r.length!=o&&(r.length=o),r}function s(t,e,i,n,s,r,o){o=o||[];const a=Math.cos(s),h=Math.sin(s),l=r[0],c=r[1];let u=0;for(let d=e;d<i;d+=n){const e=t[d]-l,i=t[d+1]-c;o[u++]=l+e*a-i*h,o[u++]=c+e*h+i*a;for(let s=d+2;s<d+n;++s)o[u++]=t[s]}return o&&o.length!=u&&(o.length=u),o}function r(t,e,i,n,s,r,o,a){a=a||[];const h=o[0],l=o[1];let c=0;for(let u=e;u<i;u+=n){const e=t[u]-h,i=t[u+1]-l;a[c++]=h+s*e,a[c++]=l+r*i;for(let s=u+2;s<u+n;++s)a[c++]=t[s]}return a&&a.length!=c&&(a.length=c),a}function o(t,e,i,n,s,r,o){o=o||[];let a=0;for(let h=e;h<i;h+=n){o[a++]=t[h]+s,o[a++]=t[h+1]+r;for(let e=h+2;e<h+n;++e)o[a++]=t[e]}return o&&o.length!=a&&(o.length=a),o}i.d(e,{Rc:function(){return n},Tl:function(){return o},e$:function(){return s},hs:function(){return r}})},20502:function(t,e,i){"use strict";i.d(e,{DT:function(){return c},FT:function(){return d},Wl:function(){return l},XM:function(){return u},_p:function(){return s},cr:function(){return h},ew:function(){return a},j:function(){return o}});const n="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",s=n.includes("firefox"),r=n.includes("safari")&&!n.includes("chrom"),o=(r&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),n.includes("webkit")&&!n.includes("edge")),a=n.includes("macintosh"),h="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!==typeof Image&&Image.prototype.decode,u="function"===typeof createImageBitmap,d=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(e){}return t}()},6268:function(t,e,i){"use strict";i.d(e,{Ay:function(){return ft}});i(44114);var n=i(33665),s=i(37444),r=i(56320),o=i(53371);class a extends n.Ay{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=t-s[0],o=e-s[1],a=r*r+o*o;if(a<n){if(0===a)for(let t=0;t<this.stride;++t)i[t]=s[t];else{const t=this.getRadius()/Math.sqrt(a);i[0]=s[0]+t*r,i[1]=s[1]+t*o;for(let e=2;e<this.stride;++e)i[e]=s[e]}return i.length=this.stride,a}return n}containsXY(t,e){const i=this.flatCoordinates,n=t-i[0],s=e-i[1];return n*n+s*s<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,i=e[this.stride]-e[0];return(0,s.N)(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if((0,s.HY)(t,e)){const e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||(0,s.sB)(t,this.intersectsCoordinate.bind(this)))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let s=1;s<e;++s)n[e+s]=t[s];this.setFlatCoordinates(this.layout,n),this.changed()}setCenterAndRadius(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const n=this.flatCoordinates;let s=(0,r._n)(n,0,t,this.stride);n[s++]=n[0]+e;for(let r=1,o=this.stride;r<o;++r)n[s++]=n[r];n.length=s,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const i=this.getCenter(),n=this.getStride();this.setCenter((0,o.e$)(i,0,i.length,n,t,e,i)),this.changed()}}a.prototype.transform;var h=a,l=i(39078),c=i(97582),u=i(20856),d=i(3471),g=i(8965);class f extends d.A{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(g.JH),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push((0,g.KT)(this.geometries_[t],c.A.CHANGE,this.changed,this))}clone(){const t=new f(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.Ld)(this.getExtent(),t,e))return n;const r=this.geometries_;for(let s=0,o=r.length;s<o;++s)n=r[s].closestPointXY(t,e,i,n);return n}containsXY(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)if(i[n].containsXY(t,e))return!0;return!1}computeExtent(t){(0,s.aZ)(t);const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)(0,s.X$)(t,e[i].getExtent());return t}getGeometries(){return _(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let 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}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],i=this.geometries_;let n=!1;for(let s=0,r=i.length;s<r;++s){const r=i[s],o=r.getSimplifiedGeometry(t);e.push(o),o!==r&&(n=!0)}if(n){const t=new f(null);return t.setGeometriesArray(e),t}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)i[n].rotate(t,e);this.changed()}scale(t,e,i){i||(i=(0,s.q1)(this.getExtent()));const n=this.geometries_;for(let s=0,r=n.length;s<r;++s)n[s].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(_(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()}translate(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)i[n].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function _(t){const e=[];for(let i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}var p=f,m=i(70776),y=i(86072),v=i(53344),x=i(3851),E=i(18601),C=i(44476),A=i(75572),w=i(69433),S=i(45907);class R extends n.Ay{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){(0,x.X$)(this.flatCoordinates,t),this.changed()}clone(){const t=new R(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,s.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,y.MD)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,y.n)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,E.j)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,A.gr)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,C.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,A.SH)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,S.k)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,v.P4)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new R(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,w.gp)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,r.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}var I=R,T=i(79020),M=i(83156);class b extends n.Ay{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,r=e.length;t<r;++t){const s=e[t];(0,x.X$)(i,s.getFlatCoordinates()),n.push(i.length)}const s=0===e.length?this.getLayout():e[0].getLayout();this.setFlatCoordinates(s,i),this.ends_=n}}appendLineString(t){(0,x.X$)(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new b(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,s.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,y.HX)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,y.oW)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))}getCoordinateAtM(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(e=void 0!==e&&e,i=void 0!==i&&i,(0,A.L8)(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return(0,C.cD)(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new I(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[];let s=0;for(let r=0,o=e.length;r<o;++r){const o=e[r],a=new I(t.slice(s,o),i);n.push(a),s=o}return n}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let i=0;const n=this.ends_,s=this.stride;for(let r=0,o=n.length;r<o;++r){const o=n[r],a=(0,A.SH)(e,i,o,s,.5);(0,x.X$)(t,a),i=o}return t}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,v.AL)(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new b(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return(0,w.fB)(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,r.KG)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var P=b,L=i(18225),O=i(15674);class D extends n.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,x.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new D(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.Ld)(this.getExtent(),t,e))return n;const r=this.flatCoordinates,o=this.stride;for(let s=0,a=r.length;s<a;s+=o){const a=(0,O.hG)(t,e,r[s],r[s+1]);if(a<n){n=a;for(let t=0;t<o;++t)i[t]=r[s+t];i.length=o}}return n}getCoordinates(){return(0,C.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new L.A(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,n=[];for(let s=0,r=t.length;s<r;s+=i){const r=new L.A(t.slice(s,s+i),e);n.push(r)}return n}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let n=0,r=e.length;n<r;n+=i){const i=e[n],r=e[n+1];if((0,s.Rj)(t,i,r))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,r.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}var F=D,k=i(93754),N=i(77689),G=i(11853),W=i(81522),B=i(88298),Y=i(58330);class V extends n.Ay{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t<e;++t){const e=n[t],i=s.length,o=e.getEnds();for(let t=0,n=o.length;t<n;++t)o[t]+=i;(0,x.X$)(s,e.getFlatCoordinates()),r.push(o)}e=0===n.length?this.getLayout():n[0].getLayout(),t=s,i=r}void 0!==e&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){const i=this.flatCoordinates.length;(0,x.X$)(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,n=e.length;t<n;++t)e[t]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let n=0;n<t;++n)e[n]=this.endss_[n].slice();const i=new V(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,n){return n<(0,s.Ld)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,y.c)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,y.te)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,Y.Gd)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return(0,W.Cs)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,G.NK)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,(0,C.Dz)(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=(0,B.C)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=(0,N.p)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new F(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;(0,G.mb)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,G.NK)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,v.sx)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new V(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(0===t)e=0;else{const i=this.endss_[t-1];e=i[i.length-1]}const i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(let s=0,r=i.length;s<r;++s)i[s]-=e;return new k.Ay(this.flatCoordinates.slice(e,n),this.layout,i)}getPolygons(){const t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r].slice(),a=o[o.length-1];if(0!==s)for(let t=0,e=o.length;t<e;++t)o[t]-=s;const h=new k.Ay(e.slice(s,a),t,o);n.push(h),s=a}return n}getType(){return"MultiPolygon"}intersectsExtent(t){return(0,w.Wp)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,r.d6)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{const t=i[i.length-1];this.flatCoordinates.length=0===t.length?0:t[t.length-1]}this.changed()}}var K=V,X=i(5596),q=i(71272),z=i(57404),H=i(69331),U=i(22535),j=i(86505),Z=i(18474),J=i(29094);const $={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class Q extends l.Ay{constructor(t,e){super(t),this.feature=e}}function tt(t,e){const i=[];for(let n=0;n<e.length;++n){const s=e[n],r=s.getGeometry();st(t,r,i)}return i}function et(t,e){return(0,O.hG)(t[0],t[1],e[0],e[1])}function it(t,e){const i=t.length;return e<0?t[e+i]:e>=i?t[e-i]:t[e]}function nt(t,e,i){let n,s;e<i?(n=e,s=i):(n=i,s=e);const r=Math.ceil(n),o=Math.floor(s);if(r>o){const e=ct(t,n),i=ct(t,s);return et(e,i)}let a=0;if(n<r){const e=ct(t,n),i=it(t,r);a+=et(e,i)}if(o<s){const e=it(t,o),i=ct(t,s);a+=et(e,i)}for(let h=r;h<o-1;++h){const e=it(t,h),i=it(t,h+1);a+=et(e,i)}return a}function st(t,e,i){if(e instanceof I)at(t,e.getCoordinates(),!1,i);else if(e instanceof P){const n=e.getCoordinates();for(let e=0,s=n.length;e<s;++e)at(t,n[e],!1,i)}else if(e instanceof k.Ay){const n=e.getCoordinates();for(let e=0,s=n.length;e<s;++e)at(t,n[e],!0,i)}else if(e instanceof K){const n=e.getCoordinates();for(let e=0,s=n.length;e<s;++e){const s=n[e];for(let e=0,n=s.length;e<n;++e)at(t,s[e],!0,i)}}else if(e instanceof p){const n=e.getGeometries();for(let e=0;e<n.length;++e)st(t,n[e],i)}else;}const rt={index:-1,endIndex:NaN};function ot(t,e,i,n){const s=t[0],r=t[1];let o=1/0,a=-1,h=NaN;for(let u=0;u<e.targets.length;++u){const t=e.targets[u],i=t.coordinates;let n,l=1/0;for(let e=0;e<i.length-1;++e){const t=i[e],o=i[e+1],a=lt(s,r,t,o);a.squaredDistance<l&&(l=a.squaredDistance,n=e+a.along)}l<o&&(o=l,t.ring&&e.targetIndex===u&&(t.endIndex>t.startIndex?n<t.startIndex&&(n+=i.length):t.endIndex<t.startIndex&&n>t.startIndex&&(n-=i.length)),h=n,a=u)}const l=e.targets[a];let c=l.ring;if(e.targetIndex===a&&c){const t=ct(l.coordinates,h),s=i.getPixelFromCoordinate(t);(0,Z.Io)(s,e.startPx)>n&&(c=!1)}if(c){const t=l.coordinates,e=t.length,i=l.startIndex,n=h;if(i<n){const s=nt(t,i,n),r=nt(t,i,n-e);r<s&&(h-=e)}else{const s=nt(t,i,n),r=nt(t,i,n+e);r<s&&(h+=e)}}return rt.index=a,rt.endIndex=h,rt}function at(t,e,i,n){const s=t[0],r=t[1];for(let o=0,a=e.length-1;o<a;++o){const t=e[o],a=e[o+1],h=lt(s,r,t,a);if(0===h.squaredDistance){const t=o+h.along;return void n.push({coordinates:e,ring:i,startIndex:t,endIndex:t})}}}const ht={along:0,squaredDistance:0};function lt(t,e,i,n){const s=i[0],r=i[1],o=n[0],a=n[1],h=o-s,l=a-r;let c=0,u=s,d=r;return 0===h&&0===l||(c=(0,O.qE)(((t-s)*h+(e-r)*l)/(h*h+l*l),0,1),u+=h*c,d+=l*c),ht.along=c,ht.squaredDistance=(0,O.Mg)((0,O.hG)(t,e,u,d),10),ht}function ct(t,e){const i=t.length;let n=Math.floor(e);const s=e-n;n>=i?n-=i:n<0&&(n+=i);let r=n+1;r>=i&&(r-=i);const o=t[n],a=o[0],h=o[1],l=t[r],c=l[0]-a,u=l[1]-h;return[a+c*s,h+u*s]}class ut extends X.A{constructor(t){const e=t;e.stopDown||(e.stopDown=H.W8),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=gt(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:H.rT,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new h([NaN,NaN]),s=(0,J.Ad)(t[0],i),r=(0,Z.hG)(s,(0,J.Ad)(t[t.length-1],i));n.setCenterAndRadius(s,Math.sqrt(r),this.geometryLayout_);const o=(0,J.Tf)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=L.A:"LineString"===t?e=I:"Polygon"===t&&(e=k.Ay),i=function(i,n,s){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new q.A({source:new z.A({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:dt(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:U.TS,this.freehandCondition_,t.freehand?this.freehandCondition_=U.Gk:this.freehandCondition_=t.freehandCondition?t.freehandCondition:U.Kg,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(m.A.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?U.Gk:t:U.Zm,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===c.A.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===M.A.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===M.A.POINTERDRAG){const i=Date.now();i-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===M.A.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===M.A.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===M.A.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===M.A.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===M.A.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(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((()=>{this.handlePointerMove_(new T.A(M.A.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,s.Tr)([i,n]),o=this.traceSource_.getFeaturesInExtent(r);if(0===o.length)return;const a=tt(t.coordinate,o);a.length&&(this.traceState_={active:!0,startPx:t.pixel.slice(),targets:a,targetIndex:-1})}addOrRemoveTracedCoordinates_(t,e){const i=t.startIndex<=t.endIndex,n=t.startIndex<=e;i===n?i&&e>t.endIndex||!i&&e<t.endIndex?this.addTracedCoordinates_(t,t.endIndex,e):(i&&e<t.endIndex||!i&&e>t.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t<e){const n=Math.ceil(t);let s=Math.floor(e);s===e&&(s-=1),i=s-n+1}else{const n=Math.floor(t);let s=Math.ceil(e);s===e&&(s+=1),i=n-s+1}i>0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e<i){const s=Math.ceil(e);let r=Math.floor(i);r===i&&(r-=1);for(let e=s;e<=r;++e)n.push(it(t.coordinates,e))}else{const s=Math.floor(e);let r=Math.ceil(i);r===i&&(r+=1);for(let e=s;e>=r;--e)n.push(it(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,Z.Io)(e.startPx,t.pixel)<this.snapTolerance_)return;const i=ot(t.coordinate,e,this.getMap(),this.snapTolerance_);if(e.targetIndex!==i.index){if(-1!==e.targetIndex){const t=e.targets[e.targetIndex];this.removeTracedCoordinates_(t.startIndex,t.endIndex)}const t=e.targets[i.index];this.addTracedCoordinates_(t,t.startIndex,i.endIndex)}else{const t=e.targets[e.targetIndex];this.addOrRemoveTracedCoordinates_(t,i.endIndex)}e.targetIndex=i.index;const n=e.targets[e.targetIndex];n.endIndex=i.endIndex;const s=ct(n.coordinates,n.endIndex),r=this.getMap().getPixelFromCoordinate(s);t.coordinate=s,t.pixel=[Math.round(r[0]),Math.round(r[1])]}handleUpEvent(t){let e=!0;if(0===this.getPointerCount()){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);const i=this.traceState_.active;if(this.toggleTraceState_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&"Point"!==this.mode_||(this.atFinish_(t.pixel,i)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing()}return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,i=t.pixel,n=e[0]-i[0],s=e[1]-i[1],r=n*n+s*s;if(this.shouldHandle_=this.freehand_?r>this.squaredClickTolerance_:r<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,s=[this.finishCoordinate_];const r=this.mode_;if("Point"===r)i=!0;else if("Circle"===r)i=2===this.sketchCoords_.length;else if("LineString"===r)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===r){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,s=[t[0][0],t[0][t[0].length-2]],s=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,r=s.length;n<r;n++){const r=s[n],o=e.getPixelFromCoordinate(r),a=t[0]-o[0],h=t[1]-o[1],l=this.freehand_?1:this.snapTolerance_;if(i=Math.sqrt(a*a+h*h)<=l,i){this.finishCoordinate_=r;break}}}}return i}createOrUpdateSketchPoint_(t){if(this.sketchPoint_){const e=this.sketchPoint_.getGeometry();e.setCoordinates(t)}else this.sketchPoint_=new u.A(new L.A(t)),this.updateSketchFeatures_()}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new u.A);const e=t.getLinearRing(0);let i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new I(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))}startDrawing_(t){const e=this.getMap().getView().getProjection(),i=(0,n.dn)(this.geometryLayout_);while(t.length<i)t.push(0);this.finishCoordinate_=t,"Point"===this.mode_?this.sketchCoords_=t.slice():"Polygon"===this.mode_?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new u.A(new I(this.sketchLineCoords_)));const s=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new u.A,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(s),this.updateSketchFeatures_(),this.dispatchEvent(new Q($.DRAWSTART,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),i=this.sketchFeature_.getGeometry(),s=e.getView().getProjection(),r=(0,n.dn)(this.geometryLayout_);let o,a;while(t.length<r)t.push(0);if("Point"===this.mode_?a=this.sketchCoords_:"Polygon"===this.mode_?(o=this.sketchCoords_[0],a=o[o.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(o=this.sketchCoords_,a=o[o.length-1]),a[0]=t[0],a[1]=t[1],this.geometryFunction_(this.sketchCoords_,i,s),this.sketchPoint_){const e=this.sketchPoint_.getGeometry();e.setCoordinates(t)}if("Polygon"===i.getType()&&"Polygon"!==this.mode_)this.createOrUpdateCustomSketchLine_(i);else if(this.sketchLineCoords_){const t=this.sketchLine_.getGeometry();t.setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();let n,s;const r=this.mode_;"LineString"===r||"Circle"===r?(this.finishCoordinate_=t.slice(),s=this.sketchCoords_,s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),this.geometryFunction_(s,e,i)):"Polygon"===r&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():n=!0),s.push(t.slice()),n&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let s=0;s<t;++s){let t;if("LineString"===n||"Circle"===n){if(t=this.sketchCoords_,t.splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new F([e])):"MultiLineString"===this.type_?t.setGeometry(new P([e])):"MultiPolygon"===this.type_&&t.setGeometry(new K([e])),this.dispatchEvent(new Q($.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new Q($.DRAWABORT,t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let r=0;r<t.length;r++)this.addToDrawing_(t[r]);const s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)}extend(t){const e=t.getGeometry(),i=e;this.sketchFeature_=t,this.sketchCoords_=i.getCoordinates();const n=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=n.slice(),this.sketchCoords_.push(n.slice()),this.sketchPoint_=new u.A(new L.A(n)),this.updateSketchFeatures_(),this.dispatchEvent(new Q($.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function dt(){const t=(0,j.mY)();return function(e,i){return t[e.getGeometry().getType()]}}function gt(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}var ft=ut},16425:function(t,e,i){"use strict";i.d(e,{D2:function(){return h},e4:function(){return a}});var n=i(41611),s=i(70776),r=i(38409);class o extends n.A{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(s.A.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(s.A.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:r.sn,center:t.getConstrainedCenter(s)})}}function h(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const o=t.getConstrainedZoom(s+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:r.vT})}e.Ay=o},77739:function(t,e,i){"use strict";i(44114);var n=i(73844),s=i(52686),r=i(39078),o=i(97582),a=i(20856),h=i(83156),l=i(18225),c=i(5596),u=i(41127),d=i(50299),g=i(71272),f=i(57404),_=i(22535),p=i(37444),m=i(18474),y=i(86505),v=i(3851),x=i(93754),E=i(29094),C=i(95752);const A=0,w=1,S=[0,0,0,0],R=[],I={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};class T extends r.Ay{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class M extends c.A{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:_.fs,this.defaultDeleteCondition_=function(t){return(0,_.Js)(t)&&(0,_.t5)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:_.Gk,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new u.A,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new g.A({source:new f.A({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:O(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new n.A(this.source_.getFeatures()),this.source_.addEventListener(d.A.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(d.A.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(s.A.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(s.A.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.A;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t<n;++t){const n=e[t];for(let t=0,e=n.length;t<e;++t){const e=n[t].feature;e&&!i.includes(e)&&this.featuresBeingModified_.push(e)}}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new T(I.MODIFYSTART,this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(o.A.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,i=[];e.forEach((function(e){t===e.feature&&i.push(e)}));for(let n=i.length-1;n>=0;--n){const t=i[n];for(let e=this.dragSegments_.length-1;e>=0;--e)this.dragSegments_[e][0]===t&&this.dragSegments_.splice(e,1);e.remove(t)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const s=i[n],r={feature:t,geometry:e,depth:[n],index:n,segment:[s,s]};this.rBush_.insert(e.getExtent(),r)}}writeLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length-1;n<s;++n){const s=i.slice(n,n+2),r={feature:t,geometry:e,index:n,segment:s};this.rBush_.insert((0,p.Tr)(s),r)}}writeMultiLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const s=i[n];for(let i=0,r=s.length-1;i<r;++i){const r=s.slice(i,i+2),o={feature:t,geometry:e,depth:[n],index:i,segment:r};this.rBush_.insert((0,p.Tr)(r),o)}}}writePolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const s=i[n];for(let i=0,r=s.length-1;i<r;++i){const r=s.slice(i,i+2),o={feature:t,geometry:e,depth:[n],index:i,segment:r};this.rBush_.insert((0,p.Tr)(r),o)}}}writeMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const s=i[n];for(let i=0,r=s.length;i<r;++i){const r=s[i];for(let s=0,o=r.length-1;s<o;++s){const o=r.slice(s,s+2),a={feature:t,geometry:e,depth:[i,n],index:s,segment:o};this.rBush_.insert((0,p.Tr)(o),a)}}}}writeCircleGeometry_(t,e){const i=e.getCenter(),n={feature:t,geometry:e,index:A,segment:[i,i]},s={feature:t,geometry:e,index:w,segment:[i,i]},r=[n,s];n.featureSegments=r,s.featureSegments=r,this.rBush_.insert((0,p.dP)(i),n);let o=e;const a=(0,E.Tf)();if(a&&this.getMap()){const t=this.getMap().getView().getProjection();o=o.clone().transform(a,t),o=(0,x.nD)(o).transform(t,a)}this.rBush_.insert(o.getExtent(),s)}writeGeometryCollectionGeometry_(t,e){const i=e.getGeometriesArray();for(let n=0;n<i.length;++n){const e=i[n],s=this.SEGMENT_WRITERS_[e.getType()];s(t,e)}}createOrUpdateVertexFeature_(t,e,i){let n=this.vertexFeature_;if(n){const e=n.getGeometry();e.setCoordinates(t)}else n=new a.A(new l.A(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n);return n.set("features",e),n.set("geometries",i),n}handleEvent(t){if(!t.originalEvent)return!0;let e;return this.lastPointerEvent_=t,t.map.getView().getInteracting()||t.type!=h.A.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(e=!(t.type!=h.A.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),t.type==h.A.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[];for(let s=0,r=this.dragSegments_.length;s<r;++s){const r=this.dragSegments_[s],o=r[0],a=o.feature;i.includes(a)||i.push(a);const h=o.geometry;n.includes(h)||n.push(h);const l=o.depth;let c;const u=o.segment,d=r[1];while(e.length<h.getStride())e.push(u[d][e.length]);switch(h.getType()){case"Point":c=e,u[0]=e,u[1]=e;break;case"MultiPoint":c=h.getCoordinates(),c[o.index]=e,u[0]=e,u[1]=e;break;case"LineString":c=h.getCoordinates(),c[o.index+d]=e,u[d]=e;break;case"MultiLineString":c=h.getCoordinates(),c[l[0]][o.index+d]=e,u[d]=e;break;case"Polygon":c=h.getCoordinates(),c[l[0]][o.index+d]=e,u[d]=e;break;case"MultiPolygon":c=h.getCoordinates(),c[l[1]][l[0]][o.index+d]=e,u[d]=e;break;case"Circle":if(u[0]=e,u[1]=e,o.index===A)this.changingFeature_=!0,h.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;const i=t.map.getView().getProjection();let n=(0,m.Io)((0,E.Ad)(h.getCenter(),i),(0,E.Ad)(e,i));const s=(0,E.Tf)();if(s){const t=h.clone().transform(s,i);t.setRadius(n),n=t.transform(i,s).getRadius()}h.setRadius(n),this.changingFeature_=!1}break;default:}c&&this.setGeometryCoordinates_(h,c)}this.createOrUpdateVertexFeature_(e,i,n)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const i=this.vertexFeature_;if(i){const n=t.map.getView().getProjection(),s=[],r=i.getGeometry().getCoordinates(),o=(0,p.Tr)([r]),a=this.rBush_.getInExtent(o),h={};a.sort(b);for(let i=0,l=a.length;i<l;++i){const o=a[i],l=o.segment;let c=(0,C.v6)(o.geometry);const u=o.depth;if(u&&(c+="-"+u.join("-")),h[c]||(h[c]=new Array(2)),"Circle"!==o.geometry.getType()||o.index!==w)if(!(0,m.aI)(l[0],r)||h[c][0])if(!(0,m.aI)(l[1],r)||h[c][1])(0,C.v6)(l)in this.vertexSegments_&&!h[c][0]&&!h[c][1]&&this.insertVertexCondition_(t)&&s.push(o);else{if(h[c][0]&&0===h[c][0].index){let t=o.geometry.getCoordinates();switch(o.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":t=t[u[1]];case"Polygon":if(o.index!==t[u[0]].length-2)continue;break;default:}}this.dragSegments_.push([o,1]),h[c][1]=o}else this.dragSegments_.push([o,0]),h[c][0]=o;else{const t=L(e,o,n);(0,m.aI)(t,r)&&!h[c][0]&&(this.dragSegments_.push([o,0]),h[c][0]=o)}}s.length&&this.willModifyFeatures_(t,[s]);for(let t=s.length-1;t>=0;--t)this.insertVertex_(s[t],r)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),s=i.featureSegments[0],r=i.featureSegments[1];s.segment[0]=e,s.segment[1]=e,r.segment[0]=e,r.segment[1]=e,this.rBush_.update((0,p.dP)(e),s);let o=n;const a=(0,E.Tf)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,x.nD)(o).transform(e,a)}this.rBush_.update(o.getExtent(),r)}else this.rBush_.update((0,p.Tr)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new T(I.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),s=e.getView().getProjection(),r=function(t,e){return P(n,t,s)-P(n,e,s)};let o,h;if(this.hitDetection_){const i="object"===typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&"Point"===i.getType()&&(i=new l.A((0,E.te)(i.getCoordinates(),s)));const n=i||t.getGeometry();if(t instanceof a.A&&this.features_.getArray().includes(t)){h=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:h,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,E.SD)((0,p.dP)(n,S),s),i=e.getView().getResolution()*this.pixelTolerance_,r=(0,E.JR)((0,p.r)(t,i,S),s);o=this.rBush_.getInExtent(r)}if(o&&o.length>0){const i=o.sort(r)[0],a=i.segment;let l=L(n,i,s);const c=e.getPixelFromCoordinate(l);let u=(0,m.Io)(t,c);if(h||u<=this.pixelTolerance_){const t={};if(t[(0,C.v6)(a)]=!0,this.snapToPointer_||(this.delta_[0]=l[0]-n[0],this.delta_[1]=l[1]-n[1]),"Circle"===i.geometry.getType()&&i.index===w)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(l,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(a[0]),s=e.getPixelFromCoordinate(a[1]),r=(0,m.hG)(c,n),h=(0,m.hG)(c,s);u=Math.sqrt(Math.min(r,h)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(l=r>h?a[1]:a[0]),this.createOrUpdateVertexFeature_(l,[i.feature],[i.geometry]);const d={};d[(0,C.v6)(i.geometry)]=!0;for(let e=1,i=o.length;e<i;++e){const i=o[e].segment;if(!((0,m.aI)(a[0],i[0])&&(0,m.aI)(a[1],i[1])||(0,m.aI)(a[0],i[1])&&(0,m.aI)(a[1],i[0])))break;{const n=(0,C.v6)(o[e].geometry);n in d||(d[n]=!0,t[(0,C.v6)(i)]=!0)}}}return void(this.vertexSegments_=t)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const i=t.segment,n=t.feature,s=t.geometry,r=t.depth,o=t.index;let a;while(e.length<s.getStride())e.push(0);switch(s.getType()){case"MultiLineString":a=s.getCoordinates(),a[r[0]].splice(o+1,0,e);break;case"Polygon":a=s.getCoordinates(),a[r[0]].splice(o+1,0,e);break;case"MultiPolygon":a=s.getCoordinates(),a[r[1]][r[0]].splice(o+1,0,e);break;case"LineString":a=s.getCoordinates(),a.splice(o+1,0,e);break;default:return}this.setGeometryCoordinates_(s,a);const h=this.rBush_;h.remove(t),this.updateSegmentIndices_(s,o,r,1);const l={segment:[i[0],e],feature:n,geometry:s,depth:r,index:o};h.insert((0,p.Tr)(l.segment),l),this.dragSegments_.push([l,1]);const c={segment:[e,i[1]],feature:n,geometry:s,depth:r,index:o+1};h.insert((0,p.Tr)(c.segment),c),this.dragSegments_.push([c,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=h.A.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new T(I.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let i,n,s,r,o,a,h,l,c,u,d,g=!1;for(o=t.length-1;o>=0;--o)s=t[o],u=s[0],d=(0,C.v6)(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===s[1]?(e[d].right=u,e[d].index=u.index):1==s[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,h=e[d].left,a=e[d].index,l=a-1,u=void 0!==h?h:c,l<0&&(l=0),r=u.geometry,n=r.getCoordinates(),i=n,g=!1,r.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),l=i.length-1));break;default:}if(g){this.setGeometryCoordinates_(r,n);const e=[];if(void 0!==h&&(this.rBush_.remove(h),e.push(h.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==h&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:l,segment:e};this.rBush_.insert((0,p.Tr)(t.segment),t)}this.updateSegmentIndices_(r,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(s){s.geometry===t&&(void 0===i||void 0===s.depth||(0,v.aI)(s.depth,i))&&s.index>e&&(s.index+=n)}))}}function b(t,e){return t.index-e.index}function P(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let s=n;if(e.index===w){const e=(0,E.Tf)();e&&(s=s.clone().transform(e,i));const n=(0,m.hG)(s.getCenter(),(0,E.Ad)(t,i)),r=Math.sqrt(n)-s.getRadius();return r*r}}const s=(0,E.Ad)(t,i);return R[0]=(0,E.Ad)(e.segment[0],i),R[1]=(0,E.Ad)(e.segment[1],i),(0,m.$x)(s,R)}function L(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&e.index===w){let e=n;const s=(0,E.Tf)();return s&&(e=e.clone().transform(s,i)),(0,E.te)(e.getClosestPoint((0,E.Ad)(t,i)),i)}const s=(0,E.Ad)(t,i);return R[0]=(0,E.Ad)(e.segment[0],i),R[1]=(0,E.Ad)(e.segment[1],i),(0,E.te)((0,m.sG)(s,R),i)}function O(){const t=(0,y.mY)();return function(e,i){return t["Point"]}}e.A=M},5596:function(t,e,i){"use strict";i.d(e,{v:function(){return o}});var n=i(16425),s=i(83156);class r extends n.Ay{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==s.A.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.A.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==s.A.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==s.A.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}e.A=r},70776:function(t,e){"use strict";e.A={ACTIVE:"active"}},17425:function(t,e,i){"use strict";i(44114);var n=i(73844),s=i(52686),r=i(39078),o=i(20856),a=i(16425),h=i(71272),l=i(69331),c=i(56811),u=i(86505),d=i(3851),g=i(95752),f=i(22535);const _={SELECT:"select"};class p extends r.Ay{constructor(t,e,i,n){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=n}}const m={};class y extends a.Ay{constructor(t){let e;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:f.t5,this.addCondition_=t.addCondition?t.addCondition:f.Zm,this.removeCondition_=t.removeCondition?t.removeCondition:f.Zm,this.toggleCondition_=t.toggleCondition?t.toggleCondition:f.Kg,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:l.rT,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:v(),this.features_=t.features||new n.A,t.layers)if("function"===typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=l.rT;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[(0,g.v6)(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[(0,g.v6)(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();e&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(s.A.ADD,this.boundAddFeature_),this.features_.addEventListener(s.A.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(s.A.ADD,this.boundAddFeature_),this.features_.removeEventListener(s.A.REMOVE,this.boundRemoveFeature_))}addFeature_(t){const e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){const t=this.getMap().getAllLayers().find((function(t){if(t instanceof h.A&&t.getSource()&&t.getSource().hasFeature(e))return t}));t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element)}getStyle(){return this.style_}applySelectedStyle_(t){const e=(0,g.v6)(t);e in m||(m[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){const e=this.getMap().getInteractions().getArray();for(let n=e.length-1;n>=0;--n){const i=e[n];if(i!==this&&i instanceof y&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}const i=(0,g.v6)(t);t.setStyle(m[i]),delete m[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[(0,g.v6)(t)]}handleEvent(t){if(!this.condition_(t))return!0;const e=this.addCondition_(t),i=this.removeCondition_(t),n=this.toggleCondition_(t),s=!e&&!i&&!n,r=t.map,a=this.getFeatures(),h=[],l=[];if(s){(0,c.I)(this.featureLayerAssociation_),r.forEachFeatureAtPixel(t.pixel,((t,e)=>{if(t instanceof o.A&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.getLength()-1;t>=0;--t){const e=a.item(t),i=l.indexOf(e);i>-1?l.splice(i,1):(a.remove(e),h.push(e))}0!==l.length&&a.extend(l)}else{r.forEachFeatureAtPixel(t.pixel,((t,s)=>{if(t instanceof o.A&&this.filter_(t,s))return!e&&!n||a.getArray().includes(t)?(i||n)&&a.getArray().includes(t)&&(h.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,s),l.push(t)),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=h.length-1;t>=0;--t)a.remove(h[t]);a.extend(l)}return(l.length>0||h.length>0)&&this.dispatchEvent(new p(_.SELECT,l,h,t)),!0}}function v(){const t=(0,u.mY)();return(0,d.X$)(t["Polygon"],t["LineString"]),(0,d.X$)(t["GeometryCollection"],t["LineString"]),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}e.A=y},65502:function(t,e,i){"use strict";i.d(e,{A:function(){return E}});i(44114);var n=i(52686),s=i(97582),r=i(5596),o=i(41127),a=i(50299),h=i(69331),l=i(39078);const c={SNAP:"snap"};class u extends l.Ay{constructor(t,e){super(t),this.vertex=e.vertex,this.vertexPixel=e.vertexPixel,this.feature=e.feature,this.segment=e.segment}}var d=i(37444),g=i(18474),f=i(93754),_=i(29094),p=i(95752),m=i(8965);function y(t){return t.feature?t.feature:t.element?t.element:null}const v=[];class x extends r.A{constructor(t){t=t||{};const e=t;e.handleDownEvent||(e.handleDownEvent=h.rT),e.stopDown||(e.stopDown=h.W8),super(e),this.on,this.once,this.un,this.source_=t.source?t.source:null,this.vertex_=void 0===t.vertex||t.vertex,this.edge_=void 0===t.edge||t.edge,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.rBush_=new o.A,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=void 0===e||e;const i=(0,p.v6)(t),n=t.getGeometry();if(n){const e=this.GEOMETRY_SEGMENTERS_[n.getType()];if(e){this.indexedFeaturesExtents_[i]=n.getExtent((0,d.S5)());const s=[];if(e(s,n),1===s.length)this.rBush_.insert((0,d.Tr)(s[0]),{feature:t,segment:s[0]});else if(s.length>1){const e=s.map((t=>(0,d.Tr)(t))),i=s.map((e=>({feature:t,segment:e})));this.rBush_.load(e,i)}}}e&&(this.featureChangeListenerKeys_[i]=(0,m.KT)(t,s.A.CHANGE,this.handleFeatureChange_,this))}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel,this.dispatchEvent(new u(c.SNAP,{vertex:t.coordinate,vertexPixel:t.pixel,feature:e.feature,segment:e.segment}))),super.handleEvent(t)}handleFeatureAdd_(t){const e=y(t);e&&this.addFeature(e)}handleFeatureRemove_(t){const e=y(t);e&&this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const t=(0,p.v6)(e);t in this.pendingFeatures_||(this.pendingFeatures_[t]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const i=void 0===e||e,n=(0,p.v6)(t),s=this.indexedFeaturesExtents_[n];if(s){const e=this.rBush_,i=[];e.forEachInExtent(s,(function(e){t===e.feature&&i.push(e)}));for(let t=i.length-1;t>=0;--t)e.remove(i[t])}i&&((0,m.JH)(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])}setMap(t){const e=this.getMap(),i=this.featuresListenerKeys_,s=this.getFeatures_();e&&(i.forEach(m.JH),i.length=0,this.rBush_.clear(),Object.values(this.featureChangeListenerKeys_).forEach(m.JH),this.featureChangeListenerKeys_={}),super.setMap(t),t&&(this.features_?i.push((0,m.KT)(this.features_,n.A.ADD,this.handleFeatureAdd_,this),(0,m.KT)(this.features_,n.A.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push((0,m.KT)(this.source_,a.A.ADDFEATURE,this.handleFeatureAdd_,this),(0,m.KT)(this.source_,a.A.REMOVEFEATURE,this.handleFeatureRemove_,this)),s.forEach((t=>this.addFeature(t))))}snapTo(t,e,i){const n=i.getView().getProjection(),s=(0,_.Ad)(e,n),r=(0,_.JR)((0,d.r)((0,d.Tr)([s]),i.getView().getResolution()*this.pixelTolerance_),n),o=this.rBush_.getInExtent(r),a=o.length;if(0===a)return null;let h,l,c=1/0,u=null;const f=this.pixelTolerance_*this.pixelTolerance_,p=()=>{if(h){const e=i.getPixelFromCoordinate(h),n=(0,g.hG)(t,e);if(n<=f)return{vertex:h,vertexPixel:[Math.round(e[0]),Math.round(e[1])],feature:l,segment:u}}return null};if(this.vertex_){for(let e=0;e<a;++e){const t=o[e];"Circle"!==t.feature.getGeometry().getType()&&t.segment.forEach((e=>{const i=(0,_.Ad)(e,n),r=(0,g.hG)(s,i);r<c&&(h=e,c=r,l=t.feature)}))}const t=p();if(t)return t}if(this.edge_){for(let e=0;e<a;++e){let t=null;const i=o[e];if("Circle"===i.feature.getGeometry().getType()){let e=i.feature.getGeometry();const r=(0,_.Tf)();r&&(e=e.clone().transform(r,n)),t=(0,g.hw)(s,e)}else{const[e,r]=i.segment;r&&(v[0]=(0,_.Ad)(e,n),v[1]=(0,_.Ad)(r,n),t=(0,g.sG)(s,v))}if(t){const e=(0,g.hG)(s,t);e<c&&(h=(0,_.te)(t,n),u="Circle"===i.feature.getGeometry().getType()?null:i.segment,c=e)}}const t=p();if(t)return t}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){const i=this.getMap().getView().getProjection();let n=e;const s=(0,_.Tf)();s&&(n=n.clone().transform(s,i));const r=(0,f.nD)(n);s&&r.transform(i,s);const o=r.getCoordinates()[0];for(let a=0,h=o.length-1;a<h;++a)t.push(o.slice(a,a+2))}segmentGeometryCollectionGeometry_(t,e){const i=e.getGeometriesArray();for(let n=0;n<i.length;++n){const e=this.GEOMETRY_SEGMENTERS_[i[n].getType()];e&&e(t,i[n])}}segmentLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length-1;n<s;++n)t.push(i.slice(n,n+2))}segmentMultiLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const e=i[n];for(let i=0,n=e.length-1;i<n;++i)t.push(e.slice(i,i+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach((e=>{t.push([e])}))}segmentMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const e=i[n];for(let i=0,n=e.length;i<n;++i){const n=e[i];for(let e=0,i=n.length-1;e<i;++e)t.push(n.slice(e,e+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n<s;++n){const e=i[n];for(let i=0,n=e.length-1;i<n;++i)t.push(e.slice(i,i+2))}}}var E=x},14190:function(t,e,i){"use strict";i.d(e,{N:function(){return q}});i(44114);var n=i(73844),s=i(16425),r=i(83156);class o extends s.Ay{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==r.A.DBLCLICK){const i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=n.getView();(0,s.D2)(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}var a=o,h=i(5596),l=i(69331),c=i(22535),u=i(38409),d=i(18474);class g extends h.A{constructor(t){super({stopDown:l.W8}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,c.Q7)(c.TS,c.fs);this.condition_=t.onFocusOnly?(0,c.Q7)(c.eL,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel((0,h.v)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map,s=i.getView();(0,d.hs)(e,s.getResolution()),(0,d.e$)(e,s.getRotation()),s.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),o=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(o),duration:500,easing:u.vT})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map,i=e.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}var f=g,_=i(95289);class p extends h.A{constructor(t){t=t||{},super({stopDown:l.W8}),this.condition_=t.condition?t.condition:c.IO,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,c.A4)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===_.b8)return;const n=e.getSize(),s=t.pixel,r=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=r}handleUpEvent(t){if(!(0,c.A4)(t))return!0;const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}handleDownEvent(t){if(!(0,c.A4)(t))return!1;if((0,c.at)(t)&&this.condition_(t)){const e=t.map;return e.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}var m=p,y=i(39078),v=i(58646),x=i(93754);class E extends v.A{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const 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}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]],n=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new x.Ay([n])}getGeometry(){return this.geometry_}}var C=E;const A={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class w extends y.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class S extends h.A{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new C(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:c.at,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new w(A.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new w(e?A.BOXEND:A.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new w(A.BOXSTART,t.coordinate,t)),!0)}onBoxEnd(t){}}var R=S;class I extends R{constructor(t){t=t||{};const e=t.condition?t.condition:c.Kg;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap(),i=e.getView();let n=this.getGeometry();if(this.out_){const t=i.rotatedExtentForGeometry(n),e=i.getResolutionForExtentInternal(t),s=i.getResolution()/e;n=n.clone(),n.scale(s*s)}i.fitInternal(n,{duration:this.duration_,easing:u.vT})}}var T=I,M=i(97582),b={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class P extends s.Ay{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,c.TS)(t)&&(0,c.tE)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==M.A.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==b.DOWN||n==b.LEFT||n==b.RIGHT||n==b.UP)){const r=t.map,o=r.getView(),a=o.getResolution()*this.pixelDelta_;let h=0,l=0;n==b.DOWN?l=-a:n==b.LEFT?h=-a:n==b.RIGHT?h=a:l=a;const c=[h,l];(0,d.e$)(c,o.getRotation()),(0,s.e4)(o,c,this.duration_),i.preventDefault(),e=!0}}return!e}}var L=P;class O extends s.Ay{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,c.GB)(t)&&(0,c.tE)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==M.A.KEYDOWN||t.type==M.A.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,a=r.getView();(0,s.D2)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}var D=O;class F{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;while(i>0&&this.points_[i+2]>t)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}var k=F,N=i(20502),G=i(15674);class W extends s.Ay{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:c.Gk;this.condition_=t.onFocusOnly?(0,c.Q7)(c.eL,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;const e=t.getView();e.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;const e=t.type;if(e!==M.A.WHEEL)return!0;const i=t.map,n=t.originalEvent;let s;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M.A.WHEEL&&(s=n.deltaY,N._p&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=N.cr),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),0===s)return!1;this.lastDelta_=s;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const o=i.getView();if("trackpad"===this.mode_&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=s;const a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),a),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,G.qE)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,s.D2)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}var B=W;class Y extends h.A{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=l.W8),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const r=t.map,o=r.getView();o.getConstraints().rotation!==_.b8&&(this.anchor_=r.getCoordinateFromPixelInternal(r.getEventPixel((0,h.v)(this.targetPointers))),this.rotating_&&(r.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const 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}}var V=Y;class K extends h.A{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=l.W8),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,r=i.clientY-n.clientY,o=Math.sqrt(s*s+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,h.v)(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView(),n=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,n),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}var X=K;function q(t){t=t||{};const e=new n.A,i=new k(-.005,.05,100),s=void 0===t.altShiftDragRotate||t.altShiftDragRotate;s&&e.push(new m);const r=void 0===t.doubleClickZoom||t.doubleClickZoom;r&&e.push(new a({delta:t.zoomDelta,duration:t.zoomDuration}));const o=void 0===t.dragPan||t.dragPan;o&&e.push(new f({onFocusOnly:t.onFocusOnly,kinetic:i}));const h=void 0===t.pinchRotate||t.pinchRotate;h&&e.push(new V);const l=void 0===t.pinchZoom||t.pinchZoom;l&&e.push(new X({duration:t.zoomDuration}));const c=void 0===t.keyboard||t.keyboard;c&&(e.push(new L),e.push(new D({delta:t.zoomDelta,duration:t.zoomDuration})));const u=void 0===t.mouseWheelZoom||t.mouseWheelZoom;u&&e.push(new B({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));const d=void 0===t.shiftDragZoom||t.shiftDragZoom;return d&&e.push(new T({duration:t.zoomDuration})),e}},69855:function(t,e,i){"use strict";var n=i(41611),s=i(54543),r=i(95752),o=i(1097),a=i(15674);class h extends n.A{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"===typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[s.A.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.v)("number"===typeof e[s.A.OPACITY],"Layer opacity must be a number"),e[s.A.VISIBLE]=void 0===t.visible||t.visible,e[s.A.Z_INDEX]=t.zIndex,e[s.A.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[s.A.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[s.A.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[s.A.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.qE)(Math.round(100*this.getOpacity())/100,0,1),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}getLayersArray(t){return(0,r.b0)()}getLayerStatesArray(t){return(0,r.b0)()}getExtent(){return this.get(s.A.EXTENT)}getMaxResolution(){return this.get(s.A.MAX_RESOLUTION)}getMinResolution(){return this.get(s.A.MIN_RESOLUTION)}getMinZoom(){return this.get(s.A.MIN_ZOOM)}getMaxZoom(){return this.get(s.A.MAX_ZOOM)}getOpacity(){return this.get(s.A.OPACITY)}getSourceState(){return(0,r.b0)()}getVisible(){return this.get(s.A.VISIBLE)}getZIndex(){return this.get(s.A.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(s.A.EXTENT,t)}setMaxResolution(t){this.set(s.A.MAX_RESOLUTION,t)}setMinResolution(t){this.set(s.A.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(s.A.MAX_ZOOM,t)}setMinZoom(t){this.set(s.A.MIN_ZOOM,t)}setOpacity(t){(0,o.v)("number"===typeof t,"Layer opacity must be a number"),this.set(s.A.OPACITY,t)}setVisible(t){this.set(s.A.VISIBLE,t)}setZIndex(t){this.set(s.A.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}e.A=h},43535:function(t,e,i){"use strict";i.d(e,{A:function(){return _}});var n=i(92425);class s extends n.A{constructor(t){t=t||{},super(t)}}var r=s,o=i(3525),a=i(1410),h=i(56940),l=i(71194),c=i(37444),u=i(29094);class d extends o.A{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let l=t.extent;if(void 0!==e.extent&&(l=(0,c._N)(l,(0,u.SD)(e.extent,n.projection))),!o[h.A.ANIMATING]&&!o[h.A.INTERACTING]&&!(0,c.Im)(l))if(r){const t=n.projection,e=r.getImage(l,s,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===a.A.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.Bb)(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!(0,c.Ym)(s,n))return null;const r=this.image_.getExtent(),o=this.image_.getImage(),a=(0,c.RG)(r),h=Math.floor(o.width*((n[0]-r[0])/a));if(h<0||h>=o.width)return null;const u=(0,c.Oq)(r),d=Math.floor(o.height*((r[3]-n[1])/u));return d<0||d>=o.height?null:this.getImageData(o,h,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),h=t.layerStatesArray[t.layerIndex],d=t.pixelRatio,g=t.viewState,f=g.center,_=g.resolution,p=d*r/(_*a),m=d*o/(_*a),y=t.extent,v=g.resolution,x=g.rotation,E=Math.round((0,c.RG)(y)/v*d),C=Math.round((0,c.Oq)(y)/v*d);(0,l.Zz)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/d,1/d,x,-E/2,-C/2),(0,l.T9)(this.inversePixelTransform,this.pixelTransform);const A=(0,l.dI)(this.pixelTransform);this.useContainer(e,A,this.getBackground(t));const w=this.context,S=w.canvas;S.width!=E||S.height!=C?(S.width=E,S.height=C):this.containerReused||w.clearRect(0,0,E,C);let R=!1,I=!0;if(h.extent){const e=(0,u.SD)(h.extent,g.projection);I=(0,c.HY)(e,t.extent),R=I&&!(0,c.ms)(e,t.extent),R&&this.clipUnrotated(w,t,e)}const T=i.getImage(),M=(0,l.Zz)(this.tempTransform,E/2,C/2,p,m,0,a*(n[0]-f[0])/r,a*(f[1]-n[3])/o);this.renderedResolution=o*d/a;const b=T.width*M[0],P=T.height*M[3];if(this.getLayer().getSource().getInterpolate()||(w.imageSmoothingEnabled=!1),this.preRender(w,t),I&&b>=.5&&P>=.5){const t=M[4],e=M[5],i=h.opacity;let n;1!==i&&(n=w.globalAlpha,w.globalAlpha=i),w.drawImage(T,0,0,+T.width,+T.height,t,e,b,P),1!==i&&(w.globalAlpha=n)}return this.postRender(w,t),R&&w.restore(),w.imageSmoothingEnabled=!0,A!==S.style.transform&&(S.style.transform=A),this.container}}var g=d;class f extends r{constructor(t){super(t)}createRenderer(){return new g(this)}getData(t){return super.getData(t)}}var _=f},92425:function(t,e,i){"use strict";i.d(e,{l:function(){return d}});i(44114);var n=i(69855),s=i(97582),r=i(54543),o=i(83707),a=i(70670),h=i(1097),l=i(37444),c=i(8965);class u extends n.A{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(r.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(r.A.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,c.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,c.KT)(t,s.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return d(n,e.viewState)&&(!s||(0,l.HY)(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const n=t instanceof a.Ay?t.getViewStateAndExtent():t;let s=e(n);return Array.isArray(s)||(s=[s]),s}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(r.A.MAP,t)}getMapInternal(){return this.get(r.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,c.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,c.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,c.KT)(t,o.A.PRECOMPOSE,(function(t){const e=t,i=e.frameState.layerStatesArray,n=this.getLayerState(!1);(0,h.v)(!i.some((function(t){return t.layer===n.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),i.push(n)}),this),this.mapRenderKey_=(0,c.KT)(this,s.A.CHANGE,t.render,t),this.changed())}setSource(t){this.set(r.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}e.A=u},54543:function(t,e){"use strict";e.A={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},71272:function(t,e,i){"use strict";i.d(e,{A:function(){return ki}});var n=i(92425),s=i(72220),r=i(86505),o=(i(44114),i(5274)),a=i(38343),h=i(97582),l=i(1410),c=i(27749),u=i(66387),d=i(1097),g=i(29357),f=i(17334),_=i(2299),p=i(41382);let m=null;class y extends g.A{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=s,this.imageState_=void 0===n?l.A.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===l.A.LOADED){m||(m=(0,f.Y)(1,1,void 0,{willReadFrequently:!0})),m.drawImage(this.image_,0,0);try{m.getImageData(0,0,1,1),this.tainted_=!1}catch(t){m=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(h.A.CHANGE)}handleImageError_(){this.imageState_=l.A.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=l.A.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,f.Y)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===l.A.IDLE){this.image_||this.initializeImage_(),this.imageState_=l.A.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(0,_.RA)(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==l.A.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,u.oJ)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}}function v(t,e,i,n,s){let r=void 0===e?void 0:p.u.get(e,i,s);return r||(r=new y(t,t instanceof HTMLImageElement?t.src||void 0:e,i,n,s),p.u.set(e,i,s,r)),r}var x=i(95752);function E(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class C extends c.A{constructor(t){t=t||{};const e=void 0!==t.opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const r=void 0!==t.img?t.img:null;let o,a=t.src;if((0,d.v)(!(void 0!==a&&r),"`image` and `src` cannot be provided at the same time"),void 0!==a&&0!==a.length||!r||(a=r.src||(0,x.v6)(r)),(0,d.v)(void 0!==a&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),(0,d.v)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?o=l.A.IDLE:void 0!==r&&(o=r instanceof HTMLImageElement?r.complete?r.src?l.A.LOADED:l.A.IDLE:l.A.LOADING:l.A.LOADED),this.color_=void 0!==t.color?(0,u._j)(t.color):null,this.iconImage_=v(r,a,this.crossOrigin_,o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(E(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(E(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new C({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==l.A.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==l.A.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(h.A.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(h.A.CHANGE,t)}}var A=C,w=i(95023),S=i(35782),R=i(55689);const I="#333";class T{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,R.xq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new a.A({color:I}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new T({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,R.xq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}var M=T,b=(i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(3851));let P=0;const L=0,O=1<<P++,D=1<<P++,F=1<<P++,k=1<<P++,N=1<<P++,G=Math.pow(2,P)-1,W={[O]:"boolean",[D]:"number",[F]:"string",[k]:"color",[N]:"number[]"},B=Object.keys(W).map(Number).sort(b.V_);function Y(t){const e=[];for(const i of B)V(t,i)&&e.push(W[i]);return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function V(t,e){return(t&e)===e}function K(t,e){return!!(t&e)}function X(t,e){return t===e}class q{constructor(t,e){this.type=t,this.value=e}}class z{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function H(){return{variables:new Set,properties:new Set,featureId:!1,style:{}}}function U(t){switch(t){case"string":return F;case"color":return k;case"number":return D;case"boolean":return O;case"number[]":return N;default:throw new Error(`Unrecognized type hint: ${t}`)}}function j(t,e,i){switch(typeof t){case"boolean":return new q(O,t);case"number":return new q(D,t);case"string":{let e=F;return(0,u.$C)(t)&&(e|=k),X(e&i,L)||(e&=i),new q(e,t)}default:}if(!Array.isArray(t))throw new Error("Expression must be an array or a primitive value");if(0===t.length)throw new Error("Empty expression");if("string"===typeof t[0])return gt(t,e,i);for(const s of t)if("number"!==typeof s)throw new Error("Expected an array of numbers");let n=N;return 3!==t.length&&4!==t.length||(n|=k),i&&(n&=i),new q(n,t)}const Z={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette"},J={[Z.Get]:dt((([t,e])=>void 0!==e?U(e.value):G),it(1,2),$),[Z.Var]:dt((([t])=>t.type),it(1,1),Q),[Z.Id]:dt(D|F,et,tt),[Z.Concat]:dt(F,it(2,1/0),nt(G)),[Z.GeometryType]:dt(F,et),[Z.Resolution]:dt(D,et),[Z.Zoom]:dt(D,et),[Z.Time]:dt(D,et),[Z.Any]:dt(O,it(2,1/0),nt(O)),[Z.All]:dt(O,it(2,1/0),nt(O)),[Z.Not]:dt(O,it(1,1),nt(O)),[Z.Equal]:dt(O,it(2,2),nt(G),st),[Z.NotEqual]:dt(O,it(2,2),nt(G),st),[Z.GreaterThan]:dt(O,it(2,2),nt(G),st),[Z.GreaterThanOrEqualTo]:dt(O,it(2,2),nt(G),st),[Z.LessThan]:dt(O,it(2,2),nt(G),st),[Z.LessThanOrEqualTo]:dt(O,it(2,2),nt(G),st),[Z.Multiply]:dt((t=>{let e=D|k;for(let i=0;i<t.length;i++)e&=t[i].type;return e}),it(2,1/0),nt(D|k),st),[Z.Divide]:dt(D,it(2,2),nt(D)),[Z.Add]:dt(D,it(2,1/0),nt(D)),[Z.Subtract]:dt(D,it(2,2),nt(D)),[Z.Clamp]:dt(D,it(3,3),nt(D)),[Z.Mod]:dt(D,it(2,2),nt(D)),[Z.Pow]:dt(D,it(2,2),nt(D)),[Z.Abs]:dt(D,it(1,1),nt(D)),[Z.Floor]:dt(D,it(1,1),nt(D)),[Z.Ceil]:dt(D,it(1,1),nt(D)),[Z.Round]:dt(D,it(1,1),nt(D)),[Z.Sin]:dt(D,it(1,1),nt(D)),[Z.Cos]:dt(D,it(1,1),nt(D)),[Z.Atan]:dt(D,it(1,2),nt(D)),[Z.Sqrt]:dt(D,it(1,1),nt(D)),[Z.Match]:dt((t=>{let e=G;for(let i=2;i<t.length;i+=2)e&=t[i].type;return e&=t[t.length-1].type,e}),it(4,1/0),ot,at),[Z.Between]:dt(O,it(3,3),nt(D)),[Z.Interpolate]:dt((t=>{let e=k|D;for(let i=3;i<t.length;i+=2)e&=t[i].type;return e}),it(6,1/0),ot,ht),[Z.Case]:dt((t=>{let e=G;for(let i=1;i<t.length;i+=2)e&=t[i].type;return e&=t[t.length-1].type,e}),it(3,1/0),rt,lt),[Z.In]:dt(O,it(2,2),ct),[Z.Number]:dt(D,it(1,1/0),nt(G)),[Z.String]:dt(F,it(1,1/0),nt(G)),[Z.Array]:dt((t=>3===t.length||4===t.length?N|k:N),it(1,1/0),nt(D)),[Z.Color]:dt(k,it(3,4),nt(D)),[Z.Band]:dt(D,it(1,3),nt(D)),[Z.Palette]:dt(k,it(2,2),ut)};function $(t,e){const i=j(t[1],e);if(!(i instanceof q))throw new Error("Expected a literal argument for get operation");if("string"!==typeof i.value)throw new Error("Expected a string argument for get operation");if(e.properties.add(i.value),3===t.length){const n=j(t[2],e);return[i,n]}return[i]}function Q(t,e,i,n){const s=t[1];if("string"!==typeof s)throw new Error("Expected a string argument for var operation");if(e.variables.add(s),!("variables"in e.style)||void 0===e.style.variables[s])return[new q(G,s)];const r=e.style.variables[s],o=j(r,e);if(o.value=s,n&&!K(n,o.type))throw new Error(`The variable ${s} has type ${Y(o.type)} but the following type was expected: ${Y(n)}`);return[o]}function tt(t,e){e.featureId=!0}function et(t,e){const i=t[0];if(1!==t.length)throw new Error(`Expected no arguments for ${i} operation`);return[]}function it(t,e){return function(i,n){const s=i[0],r=i.length-1;if(t===e){if(r!==t){const e=1===t?"":"s";throw new Error(`Expected ${t} argument${e} for ${s}, got ${r}`)}}else if(r<t||r>e){const i=e===1/0?`${t} or more`:`${t} to ${e}`;throw new Error(`Expected ${i} arguments for ${s}, got ${r}`)}}}function nt(t){return function(e,i){const n=e[0],s=e.length-1,r=new Array(s);for(let o=0;o<s;++o){const s=j(e[o+1],i);if(!K(t,s.type)){const e=Y(t),i=Y(s.type);throw new Error(`Unexpected type for argument ${o} of ${n} operation, got ${e} but expected ${i}`)}s.type&=t,r[o]=s}return r}}function st(t,e,i){const n=t[0],s=t.length-1;let r=G;for(let a=0;a<i.length;++a)r&=i[a].type;if(r===L)throw new Error(`No common type could be found for arguments of ${n} operation`);const o=new Array(s);for(let a=0;a<s;++a)o[a]=j(t[a+1],e,r);return o}function rt(t,e){const i=t[0],n=t.length-1;if(n%2===0)throw new Error(`An odd amount of arguments was expected for operation ${i}, got ${JSON.stringify(n)} instead`)}function ot(t,e){const i=t[0],n=t.length-1;if(n%2===1)throw new Error(`An even amount of arguments was expected for operation ${i}, got ${JSON.stringify(n)} instead`)}function at(t,e,i,n){const s=t.length-1,r=j(t[1],e);let o=r.type;const a=j(t[t.length-1],e);let h=void 0!==n?n&a.type:a.type;const l=new Array(s-2);for(let u=0;u<s-2;u+=2){const i=j(t[u+2],e),n=j(t[u+3],e);o&=i.type,h&=n.type,l[u]=i,l[u+1]=n}const c=F|D|O;if(!K(c,o))throw new Error(`Expected an input of type ${Y(c)} for the interpolate operation, got ${Y(o)} instead`);if(X(h,L))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(t));for(let u=0;u<s-2;u+=2){const i=j(t[u+2],e,o),n=j(t[u+3],e,h);l[u]=i,l[u+1]=n}return[j(t[1],e,o),...l,j(t[t.length-1],e,h)]}function ht(t,e,i,n){const s=t[1];let r;switch(s[0]){case"linear":r=1;break;case"exponential":if(r=s[1],"number"!==typeof r)throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(r)} instead`);break;default:r=null}if(!r)throw new Error(`Invalid interpolation type: ${JSON.stringify(s)}`);r=j(r,e);let o=j(t[2],e);if(!K(D,o.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${Y(o.type)} instead`);o=j(t[2],e,D);const a=new Array(t.length-3);for(let h=0;h<a.length;h+=2){let i=j(t[h+3],e);if(!K(D,i.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${Y(i.type)} at position ${h+2} instead`);let n=j(t[h+4],e);if(!K(D|k,n.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${Y(n.type)} at position ${h+3} instead`);i=j(t[h+3],e,D),n=j(t[h+4],e,D|k),a[h]=i,a[h+1]=n}return[r,o,...a]}function lt(t,e,i,n){const s=j(t[t.length-1],e);let r=void 0!==n?n&s.type:s.type;const o=new Array(t.length-1);for(let a=0;a<o.length-1;a+=2){const i=j(t[a+1],e),n=j(t[a+2],e);if(!K(O,i.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${Y(i.type)} at position ${a} instead`);r&=n.type,o[a]=i,o[a+1]=n}if(X(r,L))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(t));for(let a=0;a<o.length-1;a+=2)o[a+1]=j(t[a+2],e,r);return o[o.length-1]=j(t[t.length-1],e,r),o}function ct(t,e){let i=t[2];if(!Array.isArray(i))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if("string"===typeof i[0]){if("literal"!==i[0])throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(i[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');i=i[1]}let n=F|D;const s=new Array(i.length);for(let o=0;o<s.length;o++){const t=j(i[o],e);n&=t.type,s[o]=t}if(X(n,L))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(t));const r=j(t[1],e,n);return[r,...s]}function ut(t,e){const i=j(t[1],e,D);if(i.type!==D)throw new Error(`The first argument of palette must be an number, got ${Y(i.type)} instead`);const n=t[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const s=new Array(n.length);for(let r=0;r<s.length;r++){const t=j(n[r],e,k);if(!(t instanceof q))throw new Error(`The palette color at index ${r} must be a literal value`);if(!K(t.type,k))throw new Error(`The palette color at index ${r} should be of type color, got ${Y(t.type)} instead`);s[r]=t}return[i,...s]}function dt(t,...e){return function(i,n,s){const r=i[0];let o=[];for(let t=0;t<e.length;t++)o=e[t](i,n,o,s)||o;let a="function"===typeof t?t(o):t;if(void 0!==s){if(!K(a,s))throw new Error(`The following expression was expected to return ${Y(s)}, but returns ${Y(a)} instead: ${JSON.stringify(i)}`);a&=s}if(a===L)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(i)}`);return new z(a,r,...o)}}function gt(t,e,i){const n=t[0],s=J[n];if(!s)throw new Error(`Unknown operator: ${n}`);return s(t,e,i)}function ft(){return{variables:{},properties:{},resolution:NaN,featureId:null}}function _t(t,e,i){const n=j(t,i);if(!K(e,n.type)){const t=Y(e),i=Y(n.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return pt(n,i)}function pt(t,e){if(t instanceof q){if(t.type===k&&"string"===typeof t.value){const e=(0,u.sH)(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case Z.Number:case Z.String:return mt(t,e);case Z.Get:case Z.Var:return yt(t,e);case Z.Id:return t=>t.featureId;case Z.Concat:{const i=t.args.map((t=>pt(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case Z.Resolution:return t=>t.resolution;case Z.Any:case Z.All:case Z.Not:return xt(t,e);case Z.Equal:case Z.NotEqual:case Z.LessThan:case Z.LessThanOrEqualTo:case Z.GreaterThan:case Z.GreaterThanOrEqualTo:return vt(t,e);case Z.Multiply:case Z.Divide:case Z.Add:case Z.Subtract:case Z.Clamp:case Z.Mod:case Z.Pow:case Z.Abs:case Z.Floor:case Z.Ceil:case Z.Round:case Z.Sin:case Z.Cos:case Z.Atan:case Z.Sqrt:return Et(t,e);case Z.Match:return Ct(t,e);case Z.Interpolate:return At(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function mt(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=pt(t.args[r],e);switch(i){case Z.Number:case Z.String:return t=>{for(let e=0;e<n;++e){const n=s[e](t);if(typeof n===i)return n}throw new Error(`Expected one of the values to be a ${i}`)};default:throw new Error(`Unsupported assertion operator ${i}`)}}function yt(t,e){const i=t.args[0],n=i.value;switch(t.operator){case Z.Get:return t=>t.properties[n];case Z.Var:return t=>t.variables[n];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}function vt(t,e){const i=t.operator,n=pt(t.args[0],e),s=pt(t.args[1],e);switch(i){case Z.Equal:return t=>n(t)===s(t);case Z.NotEqual:return t=>n(t)!==s(t);case Z.LessThan:return t=>n(t)<s(t);case Z.LessThanOrEqualTo:return t=>n(t)<=s(t);case Z.GreaterThan:return t=>n(t)>s(t);case Z.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}function xt(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=pt(t.args[r],e);switch(i){case Z.Any:return t=>{for(let e=0;e<n;++e)if(s[e](t))return!0;return!1};case Z.All:return t=>{for(let e=0;e<n;++e)if(!s[e](t))return!1;return!0};case Z.Not:return t=>!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}function Et(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=pt(t.args[r],e);switch(i){case Z.Multiply:return t=>{let e=1;for(let i=0;i<n;++i)e*=s[i](t);return e};case Z.Divide:return t=>s[0](t)/s[1](t);case Z.Add:return t=>{let e=0;for(let i=0;i<n;++i)e+=s[i](t);return e};case Z.Subtract:return t=>s[0](t)-s[1](t);case Z.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(e<i)return i;const n=s[2](t);return e>n?n:e};case Z.Mod:return t=>s[0](t)%s[1](t);case Z.Pow:return t=>Math.pow(s[0](t),s[1](t));case Z.Abs:return t=>Math.abs(s[0](t));case Z.Floor:return t=>Math.floor(s[0](t));case Z.Ceil:return t=>Math.ceil(s[0](t));case Z.Round:return t=>Math.round(s[0](t));case Z.Sin:return t=>Math.sin(s[0](t));case Z.Cos:return t=>Math.cos(s[0](t));case Z.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case Z.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}function Ct(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=pt(t.args[s],e);return t=>{const e=n[0](t);for(let s=1;s<i;s+=2)if(e===n[s](t))return n[s+1](t);return n[i-1](t)}}function At(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=pt(t.args[s],e);return t=>{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a<i;a+=2){const i=n[a](t);let h=n[a+1](t);const l=Array.isArray(h);if(l&&(h=(0,u.fu)(h)),i>=s)return 2===a?h:l?St(e,s,r,o,i,h):wt(e,s,r,o,i,h);r=i,o=h}return o}}function wt(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i,h=1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1);return n+h*(r-n)}function St(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=(0,u.eE)(n),h=(0,u.eE)(r);let l=h[2]-a[2];l>180?l-=360:l<-180&&(l+=360);const c=[wt(t,e,i,a[0],s,h[0]),wt(t,e,i,a[1],s,h[1]),a[2]+wt(t,e,i,0,s,l),wt(t,e,i,n[3],s,r[3])];return(0,u.S8)((0,u.cD)(c))}var Rt=i(56811);function It(t){return!0}function Tt(t){const e=H(),i=bt(t,e),n=ft();return function(t,s){if(n.properties=t.getPropertiesInternal(),n.resolution=s,e.featureId){const e=t.getId();n.featureId=void 0!==e?e:null}return i(n)}}function Mt(t){const e=H(),i=t.length,n=new Array(i);for(let o=0;o<i;++o)n[o]=Pt(t[o],e);const s=ft(),r=new Array(i);return function(t,o){if(s.properties=t.getPropertiesInternal(),s.resolution=o,e.featureId){const e=t.getId();s.featureId=void 0!==e?e:null}let a=0;for(let e=0;e<i;++e){const t=n[e](s);t&&(r[a]=t,a+=1)}return r.length=a,r}}function bt(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s){const i=t[s],r="filter"in i?_t(i.filter,O,e):It;let o;if(Array.isArray(i.style)){const t=i.style.length;o=new Array(t);for(let n=0;n<t;++n)o[n]=Pt(i.style[n],e)}else o=[Pt(i.style,e)];n[s]={filter:r,styles:o}}return function(e){const s=[];let r=!1;for(let o=0;o<i;++o){const i=n[o].filter;if(i(e)&&(!t[o].else||!r)){r=!0;for(const t of n[o].styles){const i=t(e);i&&s.push(i)}}}return s}}function Pt(t,e){const i=Lt(t,"",e),n=Ot(t,"",e),s=Dt(t,e),o=Ft(t,e),a=Wt(t,"z-index",e);if(!i&&!n&&!s&&!o&&!(0,Rt.p)(t))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const h=new r.Ay;return function(t){let e=!0;if(i){const n=i(t);n&&(e=!1),h.setFill(n)}if(n){const i=n(t);i&&(e=!1),h.setStroke(i)}if(s){const i=s(t);i&&(e=!1),h.setText(i)}if(o){const i=o(t);i&&(e=!1),h.setImage(i)}return a&&h.setZIndex(a(t)),e?null:h}}function Lt(t,e,i){const n=Vt(t,e+"fill-color",i);if(!n)return null;const s=new a.A;return function(t){const e=n(t);return"none"===e?null:(s.setColor(e),s)}}function Ot(t,e,i){const n=Wt(t,e+"stroke-width",i),s=Vt(t,e+"stroke-color",i);if(!n&&!s)return null;const r=Bt(t,e+"stroke-line-cap",i),o=Bt(t,e+"stroke-line-join",i),a=Kt(t,e+"stroke-line-dash",i),h=Wt(t,e+"stroke-line-dash-offset",i),l=Wt(t,e+"stroke-miter-limit",i),c=new S.A;return function(t){if(s){const e=s(t);if("none"===e)return null;c.setColor(e)}if(n&&c.setWidth(n(t)),r){const e=r(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");c.setLineCap(e)}if(o){const e=o(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");c.setLineJoin(e)}return a&&c.setLineDash(a(t)),h&&c.setLineDashOffset(h(t)),l&&c.setMiterLimit(l(t)),c}}function Dt(t,e){const i="text-",n=Bt(t,i+"value",e);if(!n)return null;const s=Lt(t,i,e),r=Lt(t,i+"background-",e),o=Ot(t,i,e),a=Ot(t,i+"background-",e),h=Bt(t,i+"font",e),l=Wt(t,i+"max-angle",e),c=Wt(t,i+"offset-x",e),u=Wt(t,i+"offset-y",e),d=Yt(t,i+"overflow",e),g=Bt(t,i+"placement",e),f=Wt(t,i+"repeat",e),_=qt(t,i+"scale",e),p=Yt(t,i+"rotate-with-view",e),m=Wt(t,i+"rotation",e),y=Bt(t,i+"align",e),v=Bt(t,i+"justify",e),x=Bt(t,i+"baseline",e),E=Kt(t,i+"padding",e),C=new M({});return function(t){if(C.setText(n(t)),s&&C.setFill(s(t)),r&&C.setBackgroundFill(r(t)),o&&C.setStroke(o(t)),a&&C.setBackgroundStroke(a(t)),h&&C.setFont(h(t)),l&&C.setMaxAngle(l(t)),c&&C.setOffsetX(c(t)),u&&C.setOffsetY(u(t)),d&&C.setOverflow(d(t)),g){const e=g(t);if("point"!==e&&"line"!==e)throw new Error("Expected point or line for text-placement");C.setPlacement(e)}if(f&&C.setRepeat(f(t)),_&&C.setScale(_(t)),p&&C.setRotateWithView(p(t)),m&&C.setRotation(m(t)),y){const e=y(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw new Error("Expected left, right, center, start, or end for text-align");C.setTextAlign(e)}if(v){const e=v(t);if("left"!==e&&"right"!==e&&"center"!==e)throw new Error("Expected left, right, or center for text-justify");C.setJustify(e)}if(x){const e=x(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");C.setTextBaseline(e)}return E&&C.setPadding(E(t)),C}}function Ft(t,e){return"icon-src"in t?kt(t,e):"shape-points"in t?Nt(t,e):"circle-radius"in t?Gt(t,e):null}function kt(t,e){const i="icon-",n=i+"src",s=ee(t[n],n),r=Xt(t,i+"anchor",e),o=qt(t,i+"scale",e),a=Wt(t,i+"opacity",e),h=Xt(t,i+"displacement",e),l=Wt(t,i+"rotation",e),c=Yt(t,i+"rotate-with-view",e),u=jt(t,i+"anchor-origin"),d=Zt(t,i+"anchor-x-units"),g=Zt(t,i+"anchor-y-units"),f=Qt(t,i+"color"),_=Ut(t,i+"cross-origin"),p=Jt(t,i+"offset"),m=jt(t,i+"offset-origin"),y=zt(t,i+"width"),v=zt(t,i+"height"),x=Ht(t,i+"size"),E=$t(t,i+"declutter"),C=new A({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:g,color:f,crossOrigin:_,offset:p,offsetOrigin:m,height:v,width:y,size:x,declutterMode:E});return function(t){return a&&C.setOpacity(a(t)),h&&C.setDisplacement(h(t)),l&&C.setRotation(l(t)),c&&C.setRotateWithView(c(t)),o&&C.setScale(o(t)),r&&C.setAnchor(r(t)),C}}function Nt(t,e){const i="shape-",n=i+"points",s=ie(t[n],n),r=Lt(t,i,e),o=Ot(t,i,e),a=qt(t,i+"scale",e),h=Xt(t,i+"displacement",e),l=Wt(t,i+"rotation",e),c=Yt(t,i+"rotate-with-view",e),u=zt(t,i+"radius"),d=zt(t,i+"radius1"),g=zt(t,i+"radius2"),f=zt(t,i+"angle"),_=$t(t,i+"declutter-mode"),p=new w.A({points:s,radius:u,radius1:d,radius2:g,angle:f,declutterMode:_});return function(t){return r&&p.setFill(r(t)),o&&p.setStroke(o(t)),h&&p.setDisplacement(h(t)),l&&p.setRotation(l(t)),c&&p.setRotateWithView(c(t)),a&&p.setScale(a(t)),p}}function Gt(t,e){const i="circle-",n=Lt(t,i,e),s=Ot(t,i,e),r=Wt(t,i+"radius",e),a=qt(t,i+"scale",e),h=Xt(t,i+"displacement",e),l=Wt(t,i+"rotation",e),c=Yt(t,i+"rotate-with-view",e),u=$t(t,i+"declutter-mode"),d=new o.A({radius:5,declutterMode:u});return function(t){return r&&d.setRadius(r(t)),n&&d.setFill(n(t)),s&&d.setStroke(s(t)),h&&d.setDisplacement(h(t)),l&&d.setRotation(l(t)),c&&d.setRotateWithView(c(t)),a&&d.setScale(a(t)),d}}function Wt(t,e,i){if(!(e in t))return;const n=_t(t[e],D,i);return function(t){return ie(n(t),e)}}function Bt(t,e,i){if(!(e in t))return null;const n=_t(t[e],F,i);return function(t){return ee(n(t),e)}}function Yt(t,e,i){if(!(e in t))return null;const n=_t(t[e],O,i);return function(t){const i=n(t);if("boolean"!==typeof i)throw new Error(`Expected a boolean for ${e}`);return i}}function Vt(t,e,i){if(!(e in t))return null;const n=_t(t[e],k|F,i);return function(t){return ne(n(t),e)}}function Kt(t,e,i){if(!(e in t))return null;const n=_t(t[e],N,i);return function(t){return te(n(t),e)}}function Xt(t,e,i){if(!(e in t))return null;const n=_t(t[e],N,i);return function(t){const i=te(n(t),e);if(2!==i.length)throw new Error(`Expected two numbers for ${e}`);return i}}function qt(t,e,i){if(!(e in t))return null;const n=_t(t[e],N|D,i);return function(t){return se(n(t),e)}}function zt(t,e){const i=t[e];if(void 0!==i){if("number"!==typeof i)throw new Error(`Expected a number for ${e}`);return i}}function Ht(t,e){const i=t[e];if(void 0!==i){if("number"===typeof i)return(0,R.xq)(i);if(!Array.isArray(i))throw new Error(`Expected a number or size array for ${e}`);if(2!==i.length||"number"!==typeof i[0]||"number"!==typeof i[1])throw new Error(`Expected a number or size array for ${e}`);return i}}function Ut(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error(`Expected a string for ${e}`);return i}}function jt(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function Zt(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error(`Expected pixels or fraction for ${e}`);return i}}function Jt(t,e){const i=t[e];if(void 0!==i)return te(i,e)}function $t(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function Qt(t,e){const i=t[e];if(void 0!==i)return ne(i,e)}function te(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const i=t.length;for(let n=0;n<i;++n)if("number"!==typeof t[n])throw new Error(`Expected an array of numbers for ${e}`);return t}function ee(t,e){if("string"!==typeof t)throw new Error(`Expected a string for ${e}`);return t}function ie(t,e){if("number"!==typeof t)throw new Error(`Expected a number for ${e}`);return t}function ne(t,e){if("string"===typeof t)return t;const i=te(t,e),n=i.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function se(t,e){if("number"===typeof t)return t;const i=te(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const re={RENDER_ORDER:"renderOrder"};class oe extends n.A{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(re.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new s(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(re.RENDER_ORDER,t)}setStyle(t){this.style_=ae(t),this.styleFunction_=null===t?void 0:(0,r.mC)(this.style_),this.changed()}}function ae(t){if(void 0===t)return r.d1;if(!t)return null;if("function"===typeof t)return t;if(t instanceof r.Ay)return t;if(!Array.isArray(t))return Mt([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof r.Ay){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!(e instanceof r.Ay))throw new Error("Expected a list of style instances");i[n]=e}return i}if("style"in i){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!("style"in e))throw new Error("Expected a list of rules with a style property");i[n]=e}return Tt(i)}const n=t;return Mt(n)}var he=oe;const le={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},ce=[le.FILL],ue=[le.STROKE],de=[le.BEGIN_PATH],ge=[le.CLOSE_PATH];var fe=le,_e=i(91945);class pe{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}var me=pe,ye=i(6294),ve=i(37444),xe=i(78911),Ee=i(44476);class Ce extends me{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],(0,ve.Ym)(i,n)&&(s[r++]=n[0],s[r++]=n[1]);return r}appendFlatLineCoordinates(t,e,i,n,s,r){const o=this.coordinates;let a=o.length;const h=this.getBufferedMaxExtent();r&&(e+=n);let l=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,g,f,_=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],f=(0,ve.vz)(h,u),f!==g?(_&&(o[a++]=l,o[a++]=c,_=!1),o[a++]=u[0],o[a++]=u[1]):f===_e.A.INTERSECTING?(o[a++]=u[0],o[a++]=u[1],_=!1):_=!0,l=u[0],c=u[1],g=f;return(s&&_||d===e+n)&&(o[a++]=l,o[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r],a=this.appendFlatLineCoordinates(t,e,o,n,!1,!1);s.push(a),e=o}return e}drawCustom(t,e,i,n){this.beginGeometry(t,e);const s=t.getType(),r=t.getStride(),o=this.coordinates.length;let a,h,l,c,u;switch(s){case"MultiPolygon":a=t.getOrientedFlatCoordinates(),c=[];const e=t.getEndss();u=0;for(let t=0,i=e.length;t<i;++t){const i=[];u=this.drawCustomCoordinates_(a,u,e[t],r,i),c.push(i)}this.instructions.push([fe.CUSTOM,o,c,t,i,Ee.Dz]),this.hitDetectionInstructions.push([fe.CUSTOM,o,c,t,n||i,Ee.Dz]);break;case"Polygon":case"MultiLineString":l=[],a="Polygon"==s?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.drawCustomCoordinates_(a,0,t.getEnds(),r,l),this.instructions.push([fe.CUSTOM,o,l,t,i,Ee.cD]),this.hitDetectionInstructions.push([fe.CUSTOM,o,l,t,n||i,Ee.cD]);break;case"LineString":case"Circle":a=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(a,0,a.length,r,!1,!1),this.instructions.push([fe.CUSTOM,o,h,t,i,Ee.n2]),this.hitDetectionInstructions.push([fe.CUSTOM,o,h,t,n||i,Ee.n2]);break;case"MultiPoint":a=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(a,r),h>o&&(this.instructions.push([fe.CUSTOM,o,h,t,i,Ee.n2]),this.hitDetectionInstructions.push([fe.CUSTOM,o,h,t,n||i,Ee.n2]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),h=this.coordinates.length,this.instructions.push([fe.CUSTOM,o,h,t,i]),this.hitDetectionInstructions.push([fe.CUSTOM,o,h,t,n||i]);break;default:}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[fe.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[fe.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,r=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==fe.END_GEOMETRY?r=e:s==fe.BEGIN_GEOMETRY&&(n[2]=e,(0,b.gI)(this.hitDetectionInstructions,r,e),r=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillStyle=(0,ye.F)(e||xe.qY)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=(0,ye.F)(t||xe.NT);const n=e.getLineCap();i.lineCap=void 0!==n?n:xe._m;const s=e.getLineDash();i.lineDash=s?s.slice():xe.Oq;const r=e.getLineDashOffset();i.lineDashOffset=r||xe.vk;const o=e.getLineJoin();i.lineJoin=void 0!==o?o:xe._K;const a=e.getWidth();i.lineWidth=void 0!==a?a:xe.aq;const h=e.getMiterLimit();i.miterLimit=void 0!==h?h:xe.eL,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}createFill(t){const e=t.fillStyle,i=[fe.SET_FILL_STYLE,e];return"string"!==typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[fe.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"===typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!(0,b.aI)(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[fe.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,ve.o8)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,ve.r)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}var Ae=Ce;class we extends Ae{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([fe.DRAW_IMAGE,s,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([fe.DRAW_IMAGE,s,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([fe.DRAW_IMAGE,s,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([fe.DRAW_IMAGE,s,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=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.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}var Se=we;class Re extends Ae{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[fe.MOVE_TO_LINE_TO,s,r];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,xe.Oq,xe.vk],de);const r=t.getFlatCoordinates(),o=t.getStride();this.drawFlatCoordinates_(r,0,r.length,o),this.hitDetectionInstructions.push(ue),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([fe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,xe.Oq,xe.vk],de);const r=t.getEnds(),o=t.getFlatCoordinates(),a=t.getStride();let h=0;for(let l=0,c=r.length;l<c;++l)h=this.drawFlatCoordinates_(o,h,r[l],a);this.hitDetectionInstructions.push(ue),this.endGeometry(e)}finish(){const t=this.state;return void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(ue),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(ue),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(de)}}var Ie=Re,Te=i(53344);class Me extends Ae{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,r=void 0!==s.fillStyle,o=void 0!==s.strokeStyle,a=i.length;this.instructions.push(de),this.hitDetectionInstructions.push(de);for(let h=0;h<a;++h){const s=i[h],r=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,s,n,!0,!o),l=[fe.MOVE_TO_LINE_TO,r,a];this.instructions.push(l),this.hitDetectionInstructions.push(l),o&&(this.instructions.push(ge),this.hitDetectionInstructions.push(ge)),e=s}return r&&(this.instructions.push(ce),this.hitDetectionInstructions.push(ce)),o&&(this.instructions.push(ue),this.hitDetectionInstructions.push(ue)),e}drawCircle(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fe.SET_FILL_STYLE,xe.qY]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,xe.Oq,xe.vk]);const r=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(r,0,r.length,o,!1,!1);const h=[fe.CIRCLE,a];this.instructions.push(de,h),this.hitDetectionInstructions.push(de,h),void 0!==i.fillStyle&&(this.instructions.push(ce),this.hitDetectionInstructions.push(ce)),void 0!==i.strokeStyle&&(this.instructions.push(ue),this.hitDetectionInstructions.push(ue)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fe.SET_FILL_STYLE,xe.qY]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,xe.Oq,xe.vk]);const r=t.getEnds(),o=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(o,0,r,a),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([fe.SET_FILL_STYLE,xe.qY]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([fe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,xe.Oq,xe.vk]);const r=t.getEndss(),o=t.getOrientedFlatCoordinates(),a=t.getStride();let h=0;for(let l=0,c=r.length;l<c;++l)h=this.drawFlatCoordinatess_(o,h,r[l],a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=(0,Te.n$)(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state,e=t.fillStyle;void 0!==e&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}}var be=Me,Pe=i(15674);function Le(t,e,i,n,s){const r=[];let o=i,a=0,h=e.slice(i,2);while(a<t&&o+s<n){const[i,n]=h.slice(-2),l=e[o+s],c=e[o+s+1],u=Math.sqrt((l-i)*(l-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=(0,Pe.Cc)(i,l,e),g=(0,Pe.Cc)(n,c,e);h.push(d,g),r.push(h),h=[d,g],a==t&&(o+=s),a=0}else if(a<t)h.push(e[o+s],e[o+s+1]),o+=s;else{const t=u-a,e=(0,Pe.Cc)(i,l,t/u),d=(0,Pe.Cc)(n,c,t/u);h.push(e,d),r.push(h),h=[e,d],a=0,o+=s}}return a>0&&r.push(h),r}function Oe(t,e,i,n,s){let r,o,a,h,l,c,u,d,g,f,_=i,p=i,m=0,y=0,v=i;for(o=i;o<n;o+=s){const i=e[o],n=e[o+1];void 0!==l&&(g=i-l,f=n-c,h=Math.sqrt(g*g+f*f),void 0!==u&&(y+=a,r=Math.acos((u*g+d*f)/(a*h)),r>t&&(y>m&&(m=y,_=v,p=o),y=0,v=o-s)),a=h,u=g,d=f),l=i,c=n}return y+=h,y>m?[v,o]:[_,p]}const De={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Fe extends Ae{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[xe.qY]={fillStyle:xe.qY},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const r=this.coordinates;let o=r.length;const a=t.getType();let h=null,l=t.getStride();if("line"!==s.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=s.overflow?null:[];switch(a){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),l=2;break;case"Polygon":h=t.getFlatInteriorPoint(),s.overflow||i.push(h[2]/this.resolution),l=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();h=[];for(let t=0,n=e.length;t<n;t+=3)s.overflow||i.push(e[t+2]/this.resolution),h.push(e[t],e[t+1]);if(0===h.length)return;l=2;break;default:}const n=this.appendFlatPointCoordinates(h,l);if(n===o)return;if(i&&(n-o)/2!==h.length/l){let t=o/2;i=i.filter(((e,i)=>{const n=r[2*(t+i)]===h[i*l]&&r[2*(t+i)+1]===h[i*l+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=s.padding;if(c!=xe.Tq&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([fe.DRAW_IMAGE,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==xe.Tq?xe.Tq:c.map((function(t){return t*u})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u,g=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=xe.qY,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([fe.DRAW_IMAGE,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?xe.qY:this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),s.backgroundFill&&(this.state.fillStyle=g,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,ve.HY)(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(h=t.getFlatCoordinates(),"LineString"==a)i=[h.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;t<n;++t)i.push(e[t][0])}this.beginGeometry(t,e);const n=s.repeat,c=n?void 0:s.textAlign;let u=0;for(let t=0,e=i.length;t<e;++t){let e;e=n?Le(n*this.resolution,h,u,i[t],l):[h.slice(u,i[t])];for(let n=0,a=e.length;n<a;++n){const a=e[n];let h=0,d=a.length;if(void 0==c){const t=Oe(s.maxAngle,a,0,a.length,2);h=t[0],d=t[1]}for(let t=h;t<d;t+=l)r.push(a[t],a[t+1]);const g=r.length;u=i[t],this.drawChars_(o,g),o=g}}this.endGeometry(e)}}saveTextStates_(){const 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}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||xe.MY,justify:e.justify,textBaseline:e.textBaseline||xe.M8,scale:e.scale});const r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,r=this.textKey_,o=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,h=De[n.textBaseline],l=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([fe.DRAW_CHARS,t,e,h,n.overflow,o,n.maxAngle,a,l,s,u*a,c,r,1]),this.hitDetectionInstructions.push([fe.DRAW_CHARS,t,e,h,n.overflow,o?xe.qY:o,n.maxAngle,a,l,s,u*a,c,r,1/a])}setTextStyle(t,e){let i,n,s;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=(0,ye.F)(e.getColor()||xe.qY)):(n=null,this.textFillState_=n);const r=t.getStroke();if(r){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=r.getLineDash(),e=r.getLineDashOffset(),i=r.getWidth(),n=r.getMiterLimit();s.lineCap=r.getLineCap()||xe._m,s.lineDash=t?t.slice():xe.Oq,s.lineDashOffset=void 0===e?xe.vk:e,s.lineJoin=r.getLineJoin()||xe._K,s.lineWidth=void 0===i?xe.aq:i,s.miterLimit=void 0===n?xe.eL:n,s.strokeStyle=(0,ye.F)(r.getColor()||xe.NT)}else s=null,this.textStrokeState_=s;i=this.textState_;const o=t.getFont()||xe.ZV;(0,xe.fZ)(o);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=o,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||xe.M8,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||xe.Tq,i.scale=void 0===a?[1,1]:a;const h=t.getOffsetX(),l=t.getOffsetY(),c=t.getRotateWithView(),u=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===h?0:h,this.textOffsetY_=void 0===l?0:l,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===u?0:u,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:(0,x.v6)(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+(0,x.v6)(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e}}var ke=Fe;const Ne={Circle:be,Default:Ae,Image:Se,LineString:Ie,Polygon:be,Text:ke};class Ge{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];if(void 0===s){const t=Ne[e];s=new t(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s}return s}}var We=Ge,Be=i(3525),Ye=i(71194),Ve=i(53371);function Ke(t,e,i,n,s,r,o,a,h,l,c,u){let d=t[e],g=t[e+1],f=0,_=0,p=0,m=0;function y(){f=d,_=g,e+=n,d=t[e],g=t[e+1],m+=p,p=Math.sqrt((d-f)*(d-f)+(g-_)*(g-_))}do{y()}while(e<i-n&&m+p<r);let v=0===p?0:(r-m)/p;const x=(0,Pe.Cc)(f,d,v),E=(0,Pe.Cc)(_,g,v),C=e-n,A=m,w=r+a*h(l,s,c);while(e<i-n&&m+p<w)y();v=0===p?0:(w-m)/p;const S=(0,Pe.Cc)(f,d,v),R=(0,Pe.Cc)(_,g,v);let I;if(u){const t=[x,E,S,R];(0,Ve.e$)(t,0,4,2,u,t,t),I=t[0]>t[2]}else I=x>S;const T=Math.PI,M=[],b=C+n===e;let P;if(e=C,p=0,m=A,d=t[e],g=t[e+1],b){y(),P=Math.atan2(g-_,d-f),I&&(P+=P>0?-T:T);const t=(S+x)/2,e=(R+E)/2;return M[0]=[t,e,(w-r)/2,P,s],M}s=s.replace(/\n/g," ");for(let L=0,O=s.length;L<O;){y();let t=Math.atan2(g-_,d-f);if(I&&(t+=t>0?-T:T),void 0!==P){let e=t-P;if(e+=e>T?-2*T:e<-T?2*T:0,Math.abs(e)>o)return null}P=t;const u=L;let x=0;for(;L<O;++L){const t=I?O-L-1:L,o=a*h(l,s[t],c);if(e+n<i&&m+p<r+x+o/2)break;x+=o}if(L===u)continue;const E=I?s.substring(O-u,O-L):s.substring(u,L);v=0===p?0:(r+x/2-m)/p;const C=(0,Pe.Cc)(f,d,v),A=(0,Pe.Cc)(_,g,v);M.push([C,A,x/2,t,E]),r+=x}return M}var Xe=i(45907);const qe=(0,ve.S5)(),ze=[],He=[],Ue=[],je=[];function Ze(t){return t[3].declutterBox}const Je=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 $e(t,e){return"start"===e?e=Je.test(t)?"right":"left":"end"===e&&(e=Je.test(t)?"left":"right"),De[e]}function Qe(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}class ti{constructor(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_=(0,Ye.vt)(),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_={}}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const r=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],h=this.pixelRatio,l=[a.scale[0]*h,a.scale[1]*h],c=Array.isArray(t),u=a.justify?De[a.justify]:$e(Array.isArray(t)?t[0]:t,a.textAlign||xe.MY),d=n&&r.lineWidth?r.lineWidth:0,g=c?t:t.split("\n").reduce(Qe,[]),{width:f,height:_,widths:p,heights:m,lineWidths:y}=(0,xe.jT)(a,g),v=f+d,x=[],E=(v+2)*l[0],C=(_+d)*l[1],A={width:E<0?Math.floor(E):Math.ceil(E),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:x};1==l[0]&&1==l[1]||x.push("scale",l),n&&(x.push("strokeStyle",r.strokeStyle),x.push("lineWidth",d),x.push("lineCap",r.lineCap),x.push("lineJoin",r.lineJoin),x.push("miterLimit",r.miterLimit),x.push("setLineDash",[r.lineDash]),x.push("lineDashOffset",r.lineDashOffset)),i&&x.push("fillStyle",o.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const w=.5-u;let S=u*v+w*d;const R=[],I=[];let T,M=0,b=0,P=0,L=0;for(let O=0,D=g.length;O<D;O+=2){const t=g[O];if("\n"===t){b+=M,M=0,S=u*v+w*d,++L;continue}const e=g[O+1]||a.font;e!==T&&(n&&R.push("font",e),i&&I.push("font",e),T=e),M=Math.max(M,m[P]);const s=[t,S+w*p[P]+u*(p[P]-y[L]),.5*(d+M)+b];S+=p[P],n&&R.push("strokeText",s),i&&I.push("fillText",s),++P}return Array.prototype.push.apply(x,R),Array.prototype.push.apply(x,I),this.labels_[s]=A,A}replayTextBackground_(t,e,i,n,s,r,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,r,o,a,h,l,c,u,d,g,f,_){o*=u[0],a*=u[1];let p=i-o,m=n-a;const y=s+h>t?t-h:s,v=r+l>e?e-l:r,x=g[3]+y*u[0]+g[1],E=g[0]+v*u[1]+g[2],C=p-g[3],A=m-g[0];let w;return(f||0!==c)&&(ze[0]=C,je[0]=C,ze[1]=A,He[1]=A,He[0]=C+x,Ue[0]=He[0],Ue[1]=A+E,je[1]=Ue[1]),0!==c?(w=(0,Ye.Zz)((0,Ye.vt)(),i,n,1,1,c,-i,-n),(0,Ye.Bb)(w,ze),(0,Ye.Bb)(w,He),(0,Ye.Bb)(w,Ue),(0,Ye.Bb)(w,je),(0,ve.N)(Math.min(ze[0],He[0],Ue[0],je[0]),Math.min(ze[1],He[1],Ue[1],je[1]),Math.max(ze[0],He[0],Ue[0],je[0]),Math.max(ze[1],He[1],Ue[1],je[1]),qe)):(0,ve.N)(Math.min(C,C+x),Math.min(A,A+E),Math.max(C,C+x),Math.max(A,A+E),qe),d&&(p=Math.round(p),m=Math.round(m)),{drawImageX:p,drawImageY:m,drawImageW:y,drawImageH:v,originX:h,originY:l,declutterBox:{minX:qe[0],minY:qe[1],maxX:qe[2],maxY:qe[3],value:_},canvasTransform:w,scale:u}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,l=t.canvas,c=o?o[2]*n.scale[0]/2:0,u=h.minX-c<=l.width/e&&h.maxX+c>=0&&h.minY-c<=l.height/e&&h.maxY+c>=0;return u&&(a&&this.replayTextBackground_(t,ze,He,Ue,je,r,o),(0,xe.Jw)(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=(0,Ye.Bb)(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()}setStrokeStyle_(t,e){t["strokeStyle"]=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],r=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,h=$e(Array.isArray(t)?t[0]:t,s.textAlign||xe.MY),l=De[s.textBaseline||xe.M8],c=o&&o.lineWidth?o.lineWidth:0,u=r.width/a-2*s.scale[0],d=h*u+2*(.5-h)*c,g=l*r.height/a+2*(.5-l)*c;return{label:r,anchorX:d,anchorY:g}}execute_(t,e,i,n,s,r,o,a){let h;this.pixelCoordinates_&&(0,b.aI)(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=(0,Ve.Rc)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,Ye.k3)(this.renderedTransform_,i));let l=0;const c=n.length;let u,d,g,f,_,p,m,y,v,x,E,C,A=0,w=0,S=0,R=null,I=null;const T=this.coordinateCache_,M=this.viewRotation_,P=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,L={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:M},O=this.instructions!=n||this.overlaps?0:200;let D,F,k,N;while(l<c){const i=n[l],c=i[0];switch(c){case fe.BEGIN_GEOMETRY:D=i[1],N=i[3],D.getGeometry()?void 0===o||(0,ve.HY)(o,N.getExtent())?++l:l=i[2]+1:l=i[2];break;case fe.BEGIN_PATH:w>O&&(this.fill_(t),w=0),S>O&&(t.stroke(),S=0),w||S||(t.beginPath(),f=NaN,_=NaN),++l;break;case fe.CIRCLE:A=i[1];const n=h[A],c=h[A+1],b=h[A+2],G=h[A+3],W=b-n,B=G-c,Y=Math.sqrt(W*W+B*B);t.moveTo(n+Y,c),t.arc(n,c,Y,0,2*Math.PI,!0),++l;break;case fe.CLOSE_PATH:t.closePath(),++l;break;case fe.CUSTOM:A=i[1],u=i[2];const V=i[3],K=i[4],X=6==i.length?i[5]:void 0;L.geometry=V,L.feature=D,l in T||(T[l]=[]);const q=T[l];X?X(h,A,u,2,q):(q[0]=h[A],q[1]=h[A+1],q.length=2),K(q,L),++l;break;case fe.DRAW_IMAGE:A=i[1],u=i[2],y=i[3],d=i[4],g=i[5];let z=i[6];const H=i[7],U=i[8],j=i[9],Z=i[10];let J=i[11];const $=i[12];let Q=i[13];const tt=i[14],et=i[15];if(!y&&i.length>=20){v=i[19],x=i[20],E=i[21],C=i[22];const t=this.drawLabelWithPointPlacement_(v,x,E,C);y=t.label,i[3]=y;const e=i[23];d=(t.anchorX-e)*this.pixelRatio,i[4]=d;const n=i[24];g=(t.anchorY-n)*this.pixelRatio,i[5]=g,z=y.height,i[6]=z,Q=y.width,i[13]=Q}let it,nt,st,rt;i.length>25&&(it=i[25]),i.length>17?(nt=i[16],st=i[17],rt=i[18]):(nt=xe.Tq,st=!1,rt=!1),Z&&P?J+=M:Z||P||(J-=M);let ot=0;for(;A<u;A+=2){if(it&&it[ot++]<Q/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(y.width,y.height,h[A],h[A+1],Q,z,d,g,U,j,J,$,s,nt,st||rt,D),n=[t,e,y,i,H,st?R:null,rt?I:null];if(a){if("none"===tt)continue;if("obstacle"===tt){a.insert(i.declutterBox);continue}{let t,e;if(et){const i=u-A;if(!et[i]){et[i]=n;continue}if(t=et[i],delete et[i],e=Ze(t),a.collides(e))continue}if(a.collides(i.declutterBox))continue;t&&(a.insert(e),this.replayImageOrLabel_.apply(this,t)),a.insert(i.declutterBox)}}this.replayImageOrLabel_.apply(this,n)}++l;break;case fe.DRAW_CHARS:const at=i[1],ht=i[2],lt=i[3],ct=i[4];C=i[5];const ut=i[6],dt=i[7],gt=i[8];E=i[9];const ft=i[10];v=i[11],x=i[12];const _t=[i[13],i[13]],pt=this.textStates[x],mt=pt.font,yt=[pt.scale[0]*dt,pt.scale[1]*dt];let vt;mt in this.widths_?vt=this.widths_[mt]:(vt={},this.widths_[mt]=vt);const xt=(0,Xe.k)(h,at,ht,2),Et=Math.abs(yt[0])*(0,xe.TA)(mt,v,vt);if(ct||Et<=xt){const i=this.textStates[x].textAlign,n=(xt-Et)*$e(v,i),s=Ke(h,at,ht,2,v,n,ut,Math.abs(yt[0]),xe.TA,mt,vt,P?0:this.viewRotation_);t:if(s){const i=[];let n,r,o,h,l;if(E)for(n=0,r=s.length;n<r;++n){l=s[n],o=l[4],h=this.createLabel(o,x,"",E),d=l[2]+(yt[0]<0?-ft:ft),g=lt*h.height+2*(.5-lt)*ft*yt[1]/yt[0]-gt;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,d,g,0,0,l[3],_t,!1,xe.Tq,!1,D);if(a&&a.collides(r.declutterBox))break t;i.push([t,e,h,r,1,null,null])}if(C)for(n=0,r=s.length;n<r;++n){l=s[n],o=l[4],h=this.createLabel(o,x,C,""),d=l[2],g=lt*h.height-gt;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,d,g,0,0,l[3],_t,!1,xe.Tq,!1,D);if(a&&a.collides(r.declutterBox))break t;i.push([t,e,h,r,1,null,null])}a&&a.load(i.map(Ze));for(let t=0,e=i.length;t<e;++t)this.replayImageOrLabel_.apply(this,i[t])}}++l;break;case fe.END_GEOMETRY:if(void 0!==r){D=i[1];const t=r(D,N);if(t)return t}++l;break;case fe.FILL:O?w++:this.fill_(t),++l;break;case fe.MOVE_TO_LINE_TO:for(A=i[1],u=i[2],F=h[A],k=h[A+1],p=F+.5|0,m=k+.5|0,p===f&&m===_||(t.moveTo(F,k),f=p,_=m),A+=2;A<u;A+=2)F=h[A],k=h[A+1],p=F+.5|0,m=k+.5|0,A!=u-2&&p===f&&m===_||(t.lineTo(F,k),f=p,_=m);++l;break;case fe.SET_FILL_STYLE:R=i,this.alignFill_=i[2],w&&(this.fill_(t),w=0,S&&(t.stroke(),S=0)),t.fillStyle=i[1],++l;break;case fe.SET_STROKE_STYLE:I=i,S&&(t.stroke(),S=0),this.setStrokeStyle_(t,i),++l;break;case fe.STROKE:O?S++:t.stroke(),++l;break;default:++l;break}}w&&this.fill_(t),S&&t.stroke()}execute(t,e,i,n,s,r){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,r)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,s)}}var ei=ti;const ii=["Polygon","Circle","LineString","Image","Text","Default"];class ni{constructor(t,e,i,n,s,r){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,Ye.vt)(),this.createExecutors_(s)}clip(t,e){const 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()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);const n=t[e];for(const t in n){const e=n[t];i[t]=new ei(this.resolution_,this.pixelRatio_,this.overlaps_,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,s,r){n=Math.round(n);const o=2*n+1,a=(0,Ye.Zz)(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=(0,f.Y)(o,o,void 0,{willReadFrequently:!0}));const l=this.hitDetectionContext_;let c;l.canvas.width!==o||l.canvas.height!==o?(l.canvas.width=o,l.canvas.height=o):h||l.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(c=(0,ve.S5)(),(0,ve.$C)(c,t),(0,ve.r)(c,e*(this.renderBuffer_+n),c));const u=ri(n);let d;function g(t,e){const i=l.getImageData(0,0,o,o).data;for(let a=0,h=u.length;a<h;a++)if(i[u[a]]>0){if(!r||"Image"!==d&&"Text"!==d||r.includes(t)){const i=(u[a]-3)/4,r=n-i%o,h=n-(i/o|0),l=s(t,e,r*r+h*h);if(l)return l}l.clearRect(0,0,o,o);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);let p,m,y,v,x;for(_.sort(b.V_),p=_.length-1;p>=0;--p){const t=_[p].toString();for(y=this.executorsByZIndex_[t],m=ii.length-1;m>=0;--m)if(d=ii[m],v=y[d],void 0!==v&&(x=v.executeHitDetection(l,a,i,g,c),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return(0,Ve.Rc)(o,0,8,2,t,o),o}isEmpty(){return(0,Rt.p)(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);let h,l,c,u,d,g;for(a.sort(b.V_),this.maxExtent_&&(t.save(),this.clip(t,i)),r=r||ii,o&&a.reverse(),h=0,l=a.length;h<l;++h){const l=a[h].toString();for(d=this.executorsByZIndex_[l],c=0,u=r.length;c<u;++c){const a=r[c];g=d[a],void 0!==g&&g.execute(t,e,i,n,s,o)}}this.maxExtent_&&t.restore()}}const si={};function ri(t){if(void 0!==si[t])return si[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let r=0;r<=t;++r)for(let s=0;s<=t;++s){const o=r*r+s*s;if(o>i)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const s=[];for(let r=0,o=n.length;r<o;++r)n[r]&&s.push(...n[r]);return si[t]=s,s}var oi=ni,ai=i(83707),hi=i(56940),li=i(33665);class ci extends me{constructor(t,e,i,n,s,r,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,Pe.Mg)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=r,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,Ye.vt)()}drawImages_(t,e,i,n){if(!this.image_)return;const s=(0,Ve.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,o=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let l=0,c=s.length;l<c;l+=2){const t=s[l]-this.imageAnchorX_,e=s[l+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const i=t+this.imageAnchorX_,n=e+this.imageAnchorY_;(0,Ye.Zz)(o,i,n,1,1,h,-i,-n),r.save(),r.transform.apply(r,o),r.translate(i,n),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.restore()}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,e,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=(0,Ve.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_;let o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(r.save(),r.translate(t-this.textOffsetX_,i-this.textOffsetY_),r.rotate(o),r.translate(this.textOffsetX_,this.textOffsetY_),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.restore()):(this.textStrokeState_&&r.strokeText(this.text_,t,i),this.textFillState_&&r.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s){const r=this.context_,o=(0,Ve.Rc)(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(o[0],o[1]);let a=o.length;s&&(a-=2);for(let h=2;h<a;h+=2)r.lineTo(o[h],o[h+1]);return s&&r.closePath(),i}drawRings_(t,e,i,n){for(let s=0,r=i.length;s<r;++s)e=this.moveToLineTo_(t,e,i[s],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,ve.HY)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=(0,li.v7)(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){const e=t.getType();switch(e){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break;default:}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,ve.HY)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if((0,ve.HY)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),r=t.getStride();e.beginPath();for(let t=0,o=s.length;t<o;++t)n=this.moveToLineTo_(i,n,s[t],r,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,ve.HY)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const 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_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,ve.HY)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),r=t.getStride();e.beginPath();for(let t=0,o=s.length;t<o;++t){const e=s[t];n=this.drawRings_(i,n,e,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const 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})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),(0,b.aI)(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(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})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:xe.MY;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})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:(0,ye.F)(e||xe.qY)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),r=e.getLineJoin(),o=e.getWidth(),a=e.getMiterLimit(),h=n||xe.Oq;this.strokeState_={lineCap:void 0!==i?i:xe._m,lineDash:1===this.pixelRatio_?h:h.map((t=>t*this.pixelRatio_)),lineDashOffset:(s||xe.vk)*this.pixelRatio_,lineJoin:void 0!==r?r:xe._K,lineWidth:(void 0!==o?o:xe.aq)*this.pixelRatio_,miterLimit:void 0!==a?a:xe.eL,strokeStyle:(0,ye.F)(t||xe.NT)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,ye.F)(t||xe.qY)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),r=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:xe._m,lineDash:n||xe.Oq,lineDashOffset:s||xe.vk,lineJoin:void 0!==r?r:xe._K,lineWidth:void 0!==o?o:xe.aq,miterLimit:void 0!==a?a:xe.eL,strokeStyle:(0,ye.F)(t||xe.NT)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),r=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),h=t.getScaleArray(),l=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:xe.ZV,textAlign:void 0!==c?c:xe.MY,textBaseline:void 0!==u?u:xe.M8},this.text_=void 0!==l?Array.isArray(l)?l.reduce(((t,e,i)=>t+(i%2?" ":e)),""):l:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==r?this.pixelRatio_*r:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}else this.text_=""}}var ui=ci;const di=.5;function gi(t,e,i,n,s,r,o){const a=t[0]*di,h=t[1]*di,l=(0,f.Y)(a,h);l.imageSmoothingEnabled=!1;const c=l.canvas,u=new ui(l,di,s,null,o),d=i.length,g=Math.floor(16777215/d),_={};for(let m=1;m<=d;++m){const t=i[m-1],e=t.getStyleFunction()||n;if(!e)continue;let o=e(t,r);if(!o)continue;Array.isArray(o)||(o=[o]);const a=m*g,h=a.toString(16).padStart(7,"#00000");for(let i=0,n=o.length;i<n;++i){const e=o[i],n=e.getGeometryFunction()(t);if(!n||!(0,ve.HY)(s,n.getExtent()))continue;const r=e.clone(),a=r.getFill();a&&a.setColor(h);const l=r.getStroke();l&&(l.setColor(h),l.setLineDash(null)),r.setText(void 0);const c=e.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=(0,f.Y)(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=h,e.fillRect(0,0,i.width,i.height),r.setImage(new A({img:i,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=r.getZIndex()||0;let d=_[u];d||(d={},_[u]=d,d["Polygon"]=[],d["Circle"]=[],d["LineString"]=[],d["Point"]=[]);const g=n.getType();if("GeometryCollection"===g){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,r)}}else d[g.replace("Multi","")].push(n,r)}}const p=Object.keys(_).map(Number).sort(b.V_);for(let f=0,m=p.length;f<m;++f){const t=_[p[f]];for(const i in t){const n=t[i];for(let t=0,i=n.length;t<i;t+=2){u.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)u.setTransform(e[i]),u.drawGeometry(n[t])}}}return l.getImageData(0,0,c.width,c.height)}function fi(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*di),r=Math.floor(Math.round(t[1])*di),o=4*((0,Pe.qE)(s,0,i.width-1)+(0,Pe.qE)(r,0,i.height-1)*i.width),a=i.data[o],h=i.data[o+1],l=i.data[o+2],c=l+256*(h+256*a),u=Math.floor(16777215/e.length);c&&c%u===0&&n.push(e[c/u-1])}return n}const _i=.5,pi={Point:Ti,LineString:Si,Polygon:bi,MultiPoint:Mi,MultiLineString:Ri,MultiPolygon:Ii,GeometryCollection:wi,Circle:xi};function mi(t,e){return parseInt((0,x.v6)(t),10)-parseInt((0,x.v6)(e),10)}function yi(t,e){const i=vi(t,e);return i*i}function vi(t,e){return _i*t/e}function xi(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Circle");s.setFillStrokeStyle(r,o),s.drawCircle(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}}function Ei(t,e,i,n,s,r,o){let a=!1;const h=i.getImage();if(h){const t=h.getImageState();t==l.A.LOADED||t==l.A.ERROR?h.unlistenImageChange(s):(t==l.A.IDLE&&h.load(),h.listenImageChange(s),a=!0)}return Ci(t,e,i,n,r,o),a}function Ci(t,e,i,n,s,r){const o=i.getGeometryFunction()(e);if(!o)return;const a=o.simplifyTransformed(n,s),h=i.getRenderer();if(h)Ai(t,a,i,e);else{const n=pi[a.getType()];n(t,a,i,e,r)}}function Ai(t,e,i,n){if("GeometryCollection"==e.getType()){const s=e.getGeometries();for(let e=0,r=s.length;e<r;++e)Ai(t,s[e],i,n);return}const s=t.getBuilder(i.getZIndex(),"Default");s.drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer())}function wi(t,e,i,n,s){const r=e.getGeometriesArray();let o,a;for(o=0,a=r.length;o<a;++o){const e=pi[r[o].getType()];e(t,r[o],i,n,s)}}function Si(t,e,i,n,s){const r=i.getStroke();if(r){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n)}}function Ri(t,e,i,n,s){const r=i.getStroke();if(r){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n)}}function Ii(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(r,o),s.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}}function Ti(t,e,i,n,s){const r=i.getImage(),o=i.getText();let a;if(r){if(r.getImageState()!=l.A.LOADED)return;let h=t;if(s){const l=r.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(r,a),s.drawPoint(e,n)}else o&&o.getText()&&(a={})}const c=h.getBuilder(i.getZIndex(),"Image");c.setImageStyle(r,a),c.drawPoint(e,n)}if(o&&o.getText()){let r=t;s&&(r=s);const h=r.getBuilder(i.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,n)}}function Mi(t,e,i,n,s){const r=i.getImage(),o=i.getText();let a;if(r){if(r.getImageState()!=l.A.LOADED)return;let h=t;if(s){const l=r.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(r,a),s.drawMultiPoint(e,n)}else o&&o.getText()&&(a={})}const c=h.getBuilder(i.getZIndex(),"Image");c.setImageStyle(r,a),c.drawMultiPoint(e,n)}if(o&&o.getText()){let r=t;s&&(r=s);const h=r.getBuilder(i.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,n)}}function bi(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(r,o),s.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}}var Pi=i(29094),Li=i(18474);class Oi extends Be.A{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,ve.S5)(),this.wrappedRenderedExtent_=(0,ve.S5)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,o=s.resolution,a=s.projection,h=s.rotation,l=a.getExtent(),c=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,g=!(d[hi.A.ANIMATING]||d[hi.A.INTERACTING]),f=this.compositionContext_,_=Math.round(e.size[0]*u),p=Math.round(e.size[1]*u),m=c.getWrapX()&&a.canWrapX(),y=m?(0,ve.RG)(l):null,v=m?Math.ceil((n[2]-l[2])/y)+1:1;let x=m?Math.floor((n[0]-l[0])/y):0;do{const e=this.getRenderTransform(r,o,h,u,_,p,x*y);t.execute(f,1,e,h,g,void 0,i)}while(++x<v)}setupCompositionContext_(){if(1!==this.opacity_){const t=(0,f.Y)(this.context.canvas.width,this.context.canvas.height,Be.B);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,(0,f.Yg)(this.compositionContext_),Be.B.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];(0,Ye.rQ)(this.pixelTransform,1/i,1/i),(0,Ye.T9)(this.inversePixelTransform,this.pixelTransform);const s=(0,Ye.dI)(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const r=this.context,o=r.canvas,a=this.replayGroup_,h=this.declutterExecutorGroup;let l=a&&!a.isEmpty()||h&&!h.isEmpty();if(!l){const t=this.getLayer().hasListener(ai.A.PRERENDER)||this.getLayer().hasListener(ai.A.POSTRENDER);if(!t)return null}const c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);o.width!=c||o.height!=u?(o.width=c,o.height=u,o.style.transform!==s&&(o.style.transform=s)):this.containerReused||r.clearRect(0,0,c,u),this.preRender(r,t);const d=t.viewState,g=d.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let f=!1;if(l&&n.extent&&this.clipping){const e=(0,Pi.SD)(n.extent,g);l=(0,ve.HY)(e,t.extent),f=l&&!(0,ve.ms)(e,t.extent),f&&this.clipUnrotated(this.compositionContext_,t,e)}return l&&this.renderWorlds(a,t),f&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(r,t),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise((e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];(0,Ye.Bb)(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],h=t[0]*di,l=t[1]*di;a.push(this.getRenderTransform(e,i,n,di,h,l,0).slice());const c=o.getSource(),u=s.getExtent();if(c.getWrapX()&&s.canWrapX()&&!(0,ve.ms)(u,r)){let t=r[0];const s=(0,ve.RG)(u);let o,c=0;while(t<u[0])--c,o=s*c,a.push(this.getRenderTransform(e,i,n,di,h,l,o).slice()),t+=s;c=0,t=r[2];while(t>u[2])++c,o=s*c,a.push(this.getRenderTransform(e,i,n,di,h,l,o).slice()),t-=s}this.hitDetectionImageData_=gi(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n)}e(fi(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),h={},l=function(t,e,i){const r=(0,x.v6)(t),o=h[r];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return h[r]=!0,s.splice(s.lastIndexOf(o),1),n(t,a,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return h[r]=!0,n(t,a,e);s.push(h[r]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let c;const u=[this.replayGroup_];return this.declutterExecutorGroup&&u.push(this.declutterExecutorGroup),u.some((n=>c=n.forEachFeatureAtCoordinate(t,r,o,i,l,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[hi.A.ANIMATING],s=t.viewHints[hi.A.INTERACTING],r=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!r&&n||!o&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,h=t.viewState,l=h.projection,c=h.resolution,u=t.pixelRatio,d=e.getRevision(),g=e.getRenderBuffer();let f=e.getRenderOrder();void 0===f&&(f=mi);const _=h.center.slice(),p=(0,ve.r)(a,g*c),m=p.slice(),y=[p.slice()],v=l.getExtent();if(i.getWrapX()&&l.canWrapX()&&!(0,ve.ms)(v,t.extent)){const t=(0,ve.RG)(v),e=Math.max((0,ve.RG)(p)/2,t);p[0]=v[0]-e,p[2]=v[2]+e,(0,Li.Li)(_,l);const i=(0,ve.Li)(y[0],l);i[0]<v[0]&&i[2]<v[2]?y.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>v[0]&&i[2]>v[2]&&y.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==f&&(0,ve.ms)(this.wrappedRenderedExtent_,p))return(0,b.aI)(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=_,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const x=new We(vi(c,u),p,c,u);let E;this.getLayer().getDeclutter()&&(E=new We(vi(c,u),p,c,u));const C=(0,Pi.Tf)();let A;if(C){for(let t=0,e=y.length;t<e;++t){const e=y[t],n=(0,Pi.JR)(e,l);i.loadFeatures(n,(0,Pi.vN)(c,l),C)}A=(0,Pi.FO)(C,l)}else for(let b=0,L=y.length;b<L;++b)i.loadFeatures(y[b],c,l);const w=yi(c,u);let S=!0;const R=t=>{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,c)),i){const e=this.renderFeature(t,w,i,x,A,E);S=S&&!e}},I=(0,Pi.JR)(p,l),T=i.getFeaturesInExtent(I);f&&T.sort(f);for(let b=0,L=T.length;b<L;++b)R(T[b]);this.renderedFeatures_=T,this.ready=S;const M=x.finish(),P=new oi(p,c,u,i.getOverlaps(),M,e.getRenderBuffer());return E&&(this.declutterExecutorGroup=new oi(p,c,u,i.getOverlaps(),E.finish(),e.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=f,this.renderedExtent_=m,this.wrappedRenderedExtent_=p,this.renderedCenter_=_,this.renderedProjection_=l,this.replayGroup_=P,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,r){if(!i)return!1;let o=!1;if(Array.isArray(i))for(let a=0,h=i.length;a<h;++a)o=Ei(n,t,i[a],e,this.boundHandleStyleImageChange_,s,r)||o;else o=Ei(n,t,i,e,this.boundHandleStyleImageChange_,s,r);return o}}var Di=Oi;class Fi extends he{constructor(t){super(t)}createRenderer(){return new Di(this)}}var ki=Fi},15674:function(t,e,i){"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function s(t,e,i,n,s,o){const a=s-i,h=o-n;if(0!==a||0!==h){const r=((t-i)*a+(e-n)*h)/(a*a+h*h);r>1?(i=s,n=o):r>0&&(i+=a*r,n+=h*r)}return r(t,e,i,n)}function r(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function o(t){const e=t.length;for(let n=0;n<e;n++){let i=n,s=Math.abs(t[n][n]);for(let o=n+1;o<e;o++){const e=Math.abs(t[o][n]);e>s&&(s=e,i=o)}if(0===s)return null;const r=t[i];t[i]=t[n],t[n]=r;for(let o=n+1;o<e;o++){const i=-t[o][n]/t[n][n];for(let s=n;s<e+1;s++)n==s?t[o][s]=0:t[o][s]+=i*t[n][s]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function a(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function l(t,e,i){return t+i*(e-t)}function c(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function u(t,e){return Math.ceil(c(t,e))}i.d(e,{Cc:function(){return l},KU:function(){return o},Mg:function(){return c},Q1:function(){return s},eh:function(){return a},hG:function(){return r},mk:function(){return u},qE:function(){return n},xP:function(){return h}})},56811:function(t,e,i){"use strict";function n(t){for(const e in t)delete t[e]}function s(t){let e;for(e in t)return!1;return!e}i.d(e,{I:function(){return n},p:function(){return s}})},92504:function(t,e){"use strict";e.A={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},29094:function(t,e,i){"use strict";i.d(e,{Ig:function(){return y.I},MF:function(){return n.A},Av:function(){return Y},RJ:function(){return L},tI:function(){return V},Ad:function(){return Z},SD:function(){return $},Jt:function(){return N},hO:function(){return G},RG:function(){return X},FO:function(){return K},Tf:function(){return U},te:function(){return j},JR:function(){return J},vN:function(){return Q},pd:function(){return q}});var n=i(7083);const s=6378137,r=Math.PI*s,o=[-r,-r,r,r],a=[-180,-85,180,85],h=s*Math.log(Math.tan(Math.PI/2));class l extends n.A{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/s)}})}}const c=[new l("EPSG:3857"),new l("EPSG:102100"),new l("EPSG:102113"),new l("EPSG:900913"),new l("http://www.opengis.net/def/crs/EPSG/0/3857"),new l("http://www.opengis.net/gml/srs/epsg.xml#3857")];function u(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o<n;o+=i){e[o]=r*t[o]/180;let i=s*Math.log(Math.tan(Math.PI*(+t[o+1]+90)/360));i>h?i=h:i<-h&&(i=-h),e[o+1]=i}return e}function d(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o<n;o+=i)e[o]=180*t[o]/r,e[o+1]=360*Math.atan(Math.exp(t[o+1]/s))/Math.PI-90;return e}const g=6378137,f=[-180,-90,180,90],_=Math.PI*g/180;class p extends n.A{constructor(t,e){super({code:t,units:"degrees",extent:f,axisOrientation:e,global:!0,metersPerUnit:_,worldExtent:f})}}const m=[new p("CRS:84"),new p("EPSG:4326","neu"),new p("urn:ogc:def:crs:OGC:1.3:CRS84"),new p("urn:ogc:def:crs:OGC:2:84"),new p("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new p("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new p("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var y=i(93311);let v={};function x(t){return v[t]||v[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function E(t,e){v[t]=e}let C={};function A(t,e,i){const n=t.getCode(),s=e.getCode();n in C||(C[n]={}),C[n][s]=i}function w(t,e){let i;return t in C&&e in C[t]&&(i=C[t][e]),i}var S=i(37444),R=i(18474),I=i(15674);const T=6371008.8;function M(t,e,i){i=i||T;const n=(0,I.eh)(t[1]),s=(0,I.eh)(e[1]),r=(s-n)/2,o=(0,I.eh)(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}var b=i(32155);let P=!0;function L(t){const e=void 0===t||t;P=!e}function O(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function D(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function F(t){E(t.getCode(),t),A(t,t,O)}function k(t){t.forEach(F)}function N(t){return"string"===typeof t?x(t):t||null}function G(t,e,i,n){let s;t=N(t);const r=t.getPointResolutionFunc();if(r){if(s=r(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/y.I[n])}}else{const r=t.getUnits();if("degrees"==r&&!n||"degrees"==n)s=e;else{const o=K(t,N("EPSG:4326"));if(o===D&&"degrees"!==r)s=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=o(t,t,2);const n=M(t.slice(0,2),t.slice(2,4)),r=M(t.slice(4,6),t.slice(6,8));s=(n+r)/2}const a=n?y.I[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function W(t){k(t),t.forEach((function(e){t.forEach((function(t){e!==t&&A(e,t,O)}))}))}function B(t,e,i,n){t.forEach((function(t){e.forEach((function(e){A(t,e,i),A(e,t,n)}))}))}function Y(t,e){return t?"string"===typeof t?N(t):t:N(e)}function V(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return i;const n=K(t,e);return n===O&&i}function K(t,e){const i=t.getCode(),n=e.getCode();let s=w(i,n);return s||(s=D),s}function X(t,e){const i=N(t),n=N(e);return K(i,n)}function q(t,e,i){const n=X(e,i);return n(t,void 0,t.length)}function z(t,e,i,n){const s=X(e,i);return(0,S.NW)(t,s,void 0,n)}let H=null;function U(){return H}function j(t,e){return H?q(t,e,H):t}function Z(t,e){return H?q(t,H,e):(P&&!(0,R.aI)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(P=!1,(0,b.R8)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function J(t,e){return H?z(t,e,H):t}function $(t,e){return H?z(t,H,e):t}function Q(t,e){if(!H)return t;const i=N(e).getMetersPerUnit(),n=H.getMetersPerUnit();return i&&n?t*i/n:t}function tt(){W(c),W(m),B(m,c,u,d)}tt()},7083:function(t,e,i){"use strict";var n=i(93311);class s{constructor(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}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.I[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}e.A=s},93311:function(t,e,i){"use strict";i.d(e,{I:function(){return n}});const n={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},16355:function(t,e,i){"use strict";var n=i(39078);class s extends n.Ay{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}e.A=s},83707:function(t,e){"use strict";e.A={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},78911:function(t,e,i){"use strict";i.d(e,{Jw:function(){return b},M8:function(){return m},MY:function(){return p},NT:function(){return _},Oq:function(){return u},TA:function(){return T},Tq:function(){return y},ZV:function(){return h},_K:function(){return g},_m:function(){return c},aq:function(){return v},eL:function(){return f},fZ:function(){return w},jT:function(){return M},qY:function(){return l},vk:function(){return d},yY:function(){return x}});i(44114);var n=i(41611),s=i(20502),r=i(56811),o=i(17334),a=i(24109);const h="10px sans-serif",l="#000",c="round",u=[],d=0,g="round",f=10,_="#000",p="center",m="middle",y=[0,0,0,0],v=1,x=new n.A;let E,C=null;const A={},w=function(){const t=100,e="32px ",i=["monospace","serif"],n=i.length,s="wmytzilWMYTZIL@#/&?$%10";let o,h;function l(t,r,o){let a=!0;for(let l=0;l<n;++l){const n=i[l];if(h=I(t+" "+r+" "+e+n,s),o!=n){const i=I(t+" "+r+" "+e+o+","+n,s);a=a&&i!=h}}return!!a}function c(){let e=!0;const i=x.getKeys();for(let n=0,s=i.length;n<s;++n){const s=i[n];x.get(s)<t&&(l.apply(this,s.split("\n"))?((0,r.I)(A),C=null,E=void 0,x.set(s,t)):(x.set(s,x.get(s)+1,!0),e=!1))}e&&(clearInterval(o),o=void 0)}return function(e){const i=(0,a.K5)(e);if(!i)return;const n=i.families;for(let s=0,r=n.length;s<r;++s){const e=n[s],r=i.style+"\n"+i.weight+"\n"+e;void 0===x.get(r)&&(x.set(r,t,!0),l(i.style,i.weight,e)||(x.set(r,0,!0),void 0===o&&(o=setInterval(c,32))))}}}(),S=function(){let t;return function(e){let i=A[e];if(void 0==i){if(s.Wl){const t=(0,a.K5)(e),n=R(e,"Žg"),s=isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight);i=s*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);A[e]=i}return i}}();function R(t,e){return C||(C=(0,o.Y)(1,1)),t!=E&&(C.font=t,E=C.font),C.measureText(e)}function I(t,e){return R(t,e).width}function T(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,I(t,i))),0);return i[e]=n,n}function M(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,h=0;for(let l=0,c=e.length;l<=c;l+=2){const u=e[l];if("\n"===u||l===c){r=Math.max(r,o),s.push(o),o=0,a+=h;continue}const d=e[l+1]||t.font,g=I(d,u);i.push(g),o+=g;const f=S(d);n.push(f),h=Math.max(h,f)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}function b(t,e,i,n,s,r,o,a,h,l,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(h,l),t.scale(c[0],c[1]),P(n,t)):c[0]<0||c[1]<0?(t.translate(h,l),t.scale(c[0],c[1]),t.drawImage(n,s,r,o,a,0,0,o,a)):t.drawImage(n,s,r,o,a,h,l,o*c[0],a*c[1]),t.restore()}function P(t,e){const i=t.contextInstructions;for(let n=0,s=i.length;n<s;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}},3525:function(t,e,i){"use strict";i.d(e,{B:function(){return p},A:function(){return x}});var n=i(97582),s=i(1410),r=i(94549),o=i(95752);class a extends r.A{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return(0,o.b0)()}getData(t){return null}prepareFrame(t){return(0,o.b0)()}renderFrame(t,e){return(0,o.b0)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,r)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==s.A.LOADED&&e.getState()!==s.A.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=s.A.LOADED&&e!=s.A.ERROR&&t.addEventListener(n.A.CHANGE,this.boundHandleImageChange_),e==s.A.IDLE&&(t.load(),e=t.getState()),e==s.A.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}var h=a,l=i(16355),c=i(83707),u=i(71194),d=i(66387),g=i(17334),f=i(3851),_=i(37444);const p=[];let m=null;function y(){m=(0,g.Y)(1,1,void 0,{willReadFrequently:!0})}class v extends h{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,u.vt)(),this.pixelTransform=(0,u.vt)(),this.inversePixelTransform=(0,u.vt)(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;m||y(),m.clearRect(0,0,1,1);try{m.drawImage(t,e,i,1,1,0,0,1,1),n=m.getImageData(0,0,1,1).data}catch(s){return m=null,null}return n}getBackground(t){const e=this.getLayer();let i=e.getBackground();return"function"===typeof i&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,f.aI)((0,d._j)(t.style.backgroundColor),(0,d._j)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.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&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=(0,g.Y)();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,_.Py)(i),s=(0,_.WU)(i),r=(0,_.k_)(i),o=(0,_.R)(i);(0,u.Bb)(e.coordinateToPixelTransform,n),(0,u.Bb)(e.coordinateToPixelTransform,s),(0,u.Bb)(e.coordinateToPixelTransform,r),(0,u.Bb)(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;(0,u.Bb)(a,n),(0,u.Bb)(a,s),(0,u.Bb)(a,r),(0,u.Bb)(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new l.A(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(c.A.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(c.A.POSTRENDER,t,e)}getRenderTransform(t,e,i,n,s,r,o){const a=s/2,h=r/2,l=n/e,c=-l,d=-t[0]+o,g=-t[1];return(0,u.Zz)(this.tempTransform,a,h,l,c,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}var x=v},95289:function(t,e,i){"use strict";i.d(e,{a$:function(){return o},b8:function(){return s},cq:function(){return a},dv:function(){return r}});var n=i(15674);function s(t){if(void 0!==t)return 0}function r(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?(t=Math.floor(t/e+.5)*e,t):void 0}}function a(t){const e=void 0===t?(0,n.eh)(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}},55689:function(t,e,i){"use strict";function n(t){return t[0]>0&&t[1]>0}function s(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Ie:function(){return n},xq:function(){return s}})},56325:function(t,e,i){"use strict";i.d(e,{A:function(){return G}});var n=i(97582),s=i(39078),r=i(1410),o=i(2299);const a=.5;i(44114);var h=i(37444),l=i(29094),c=i(15674);const u=10,d=.25;class g{constructor(t,e,i,n,s,r){this.sourceProj_=t,this.targetProj_=e;let o={};const a=(0,l.RG)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return o[e]||(o[e]=a(t)),o[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&(0,h.RG)(n)>=(0,h.RG)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,h.RG)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,h.RG)(this.targetProj_.getExtent()):null;const c=(0,h.Py)(i),d=(0,h.WU)(i),g=(0,h.k_)(i),f=(0,h.R)(i),_=this.transformInv_(c),p=this.transformInv_(d),m=this.transformInv_(g),y=this.transformInv_(f),v=u+(r?Math.max(0,Math.ceil(Math.log2((0,h.UG)(i)/(r*r*256*256)))):0);if(this.addQuad_(c,d,g,f,_,p,m,y,v),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]),s=Math.max(i[0][0],i[1][0],i[2][0]);s-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}o={}}addTriangle_(t,e,i,n,s,r){this.triangles_.push({source:[n,s,r],target:[t,e,i]})}addQuad_(t,e,i,n,s,r,o,a,l){const u=(0,h.Tr)([s,r,o,a]),g=this.sourceWorldWidth_?(0,h.RG)(u)/this.sourceWorldWidth_:null,f=this.sourceWorldWidth_,_=this.sourceProj_.canWrapX()&&g>.5&&g<1;let p=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const s=(0,h.Tr)([t,e,i,n]),r=(0,h.RG)(s)/this.targetWorldWidth_;p=r>d||p}!_&&this.sourceProj_.isGlobal()&&g&&(p=g>d||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!(0,h.HY)(u,this.maxSourceExtent_))return;let m=0;if(!p&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])))if(l>0)p=!0;else if(m=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=m&&2!=m&&4!=m&&8!=m)return;if(l>0){if(!p){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;if(_){const t=((0,c.xP)(s[0],f)+(0,c.xP)(o[0],f))/2;r=t-(0,c.xP)(n[0],f)}else r=(s[0]+o[0])/2-n[0];const a=(s[1]+o[1])/2-n[1],h=r*r+a*a;p=h>this.errorThresholdSquared_}if(p){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,s,r,c,d,l-1),this.addQuad_(u,h,i,n,d,c,o,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,s,c,d,a,l-1),this.addQuad_(h,e,i,u,c,r,o,d,l-1)}return}}if(_){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,i,n,s,o,a),0==(14&m)&&this.addTriangle_(t,i,e,s,o,r),m&&(0==(13&m)&&this.addTriangle_(e,n,t,r,a,s),0==(7&m)&&this.addTriangle_(e,n,i,r,a,o))}calculateSourceExtent(){const t=(0,h.S5)();return this.triangles_.forEach((function(e,i,n){const s=e.source;(0,h.$C)(t,s[0]),(0,h.$C)(t,s[1]),(0,h.$C)(t,s[2])})),t}getTriangles(){return this.triangles_}}var f=g,_=i(17334);let p;const m=[];function y(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function v(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function x(){if(void 0===p){const t=(0,_.Y)(6,6,m);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",y(t,4,5,4,0),y(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;p=v(e,0)||v(e,4)||v(e,8),(0,_.Yg)(t),m.push(t.canvas)}return p}function E(t,e,i,n){const s=(0,l.pd)(i,e,t);let r=(0,l.hO)(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(r*=o);const a=t.getMetersPerUnit();void 0!==a&&(r/=a);const c=t.getExtent();if(!c||(0,h.Ym)(c,s)){const e=(0,l.hO)(t,r,s)/r;isFinite(e)&&e>0&&(r/=e)}return r}function C(t,e,i,n,s,r,o,a,l,u,d,g,f){const p=(0,_.Y)(Math.round(i*t),Math.round(i*e),m);if(g||(p.imageSmoothingEnabled=!1),0===l.length)return p.canvas;function y(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";const v=(0,h.S5)();let E;if(l.forEach((function(t,e,i){(0,h.X$)(v,t.extent)})),!f||1!==l.length||0!==u){const t=(0,h.RG)(v),e=(0,h.Oq)(v);E=(0,_.Y)(Math.round(i*t/n),Math.round(i*e/n),m),g||(E.imageSmoothingEnabled=!1);const s=i/n;l.forEach((function(t,e,i){const n=t.extent[0]-v[0],r=-(t.extent[3]-v[3]),o=(0,h.RG)(t.extent),a=(0,h.Oq)(t.extent);t.image.width>0&&t.image.height>0&&E.drawImage(t.image,u,u,t.image.width-2*u,t.image.height-2*u,n*s,r*s,o*s,a*s)}))}const C=(0,h.Py)(o);return a.getTriangles().forEach((function(t,e,s){const o=t.source,a=t.target;let u=o[0][0],d=o[0][1],f=o[1][0],_=o[1][1],m=o[2][0],A=o[2][1];const w=y((a[0][0]-C[0])/r),S=y(-(a[0][1]-C[1])/r),R=y((a[1][0]-C[0])/r),I=y(-(a[1][1]-C[1])/r),T=y((a[2][0]-C[0])/r),M=y(-(a[2][1]-C[1])/r),b=u,P=d;u=0,d=0,f-=b,_-=P,m-=b,A-=P;const L=[[f,_,0,0,R-w],[m,A,0,0,T-w],[0,0,f,_,I-S],[0,0,m,A,M-S]],O=(0,c.KU)(L);if(!O)return;if(p.save(),p.beginPath(),x()||!g){p.moveTo(R,I);const t=4,e=w-R,i=S-I;for(let n=0;n<t;n++)p.lineTo(R+y((n+1)*e/t),I+y(n*i/(t-1))),n!=t-1&&p.lineTo(R+y((n+1)*e/t),I+y((n+1)*i/(t-1)));p.lineTo(T,M)}else p.moveTo(R,I),p.lineTo(w,S),p.lineTo(T,M);let D;if(p.clip(),p.transform(O[0],O[2],O[1],O[3],w,S),p.translate(v[0]-b,v[3]-P),E)D=E.canvas,p.scale(n/i,-n/i);else{const t=l[0],e=t.extent;D=t.image,p.scale((0,h.RG)(e)/D.width,-(0,h.Oq)(e)/D.height)}p.drawImage(D,0,0),p.restore()})),E&&((0,_.Yg)(E),m.push(E.canvas)),d&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,s=(n[0][0]-C[0])/r,o=-(n[0][1]-C[1])/r,a=(n[1][0]-C[0])/r,h=-(n[1][1]-C[1])/r,l=(n[2][0]-C[0])/r,c=-(n[2][1]-C[1])/r;p.beginPath(),p.moveTo(a,h),p.lineTo(s,o),p.lineTo(l,c),p.closePath(),p.stroke()})),p.restore()),p.canvas}function A(t){return Array.isArray(t)?Math.min(...t):t}var w=i(8965);class S extends o.Ay{constructor(t,e,i,n,s,o,l){let c=t.getExtent();c&&t.canWrapX()&&(c=c.slice(),c[0]=-1/0,c[2]=1/0);let u=e.getExtent();u&&e.canWrapX()&&(u=u.slice(),u[0]=-1/0,u[2]=1/0);const d=u?(0,h._N)(i,u):i,g=(0,h.q1)(d),_=E(t,e,g,n),p=a,m=new f(t,e,d,c,_*p,n),y=m.calculateSourceExtent(),v=(0,h.Im)(y)?null:o(y,_,s),x=v?r.A.IDLE:r.A.EMPTY,C=v?v.getPixelRatio():1;super(i,n,C,x),this.targetProj_=e,this.maxSourceExtent_=c,this.triangulation_=m,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=v,this.sourcePixelRatio_=C,this.interpolate_=l,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==r.A.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==r.A.LOADED){const t=(0,h.RG)(this.targetExtent_)/this.targetResolution_,e=(0,h.Oq)(this.targetExtent_)/this.targetResolution_;this.canvas_=C(t,e,this.sourcePixelRatio_,A(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==r.A.IDLE){this.state=r.A.LOADING,this.changed();const t=this.sourceImage_.getState();t==r.A.LOADED||t==r.A.ERROR?this.reproject_():(this.sourceListenerKey_=(0,w.KT)(this.sourceImage_,n.A.CHANGE,(function(t){const e=this.sourceImage_.getState();e!=r.A.LOADED&&e!=r.A.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){(0,w.JH)(this.sourceListenerKey_),this.sourceListenerKey_=null}}var R=S,I=i(23437);const T=4;var M=i(3851);const b={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class P extends s.Ay{constructor(t,e){super(t),this.image=e}}class L extends I.A{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();if(e){const i=(0,M.FT)(e,t,0);t=e[i]}return t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,l.tI)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,l.tI)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,h.aI)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new R(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,s){if(this.loader){const r=D(t,e,i,1),a=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===s&&(this.wantedExtent_&&(0,h.ms)(this.wantedExtent_,r)||(0,h.ms)(this.image.getExtent(),r))&&(this.wantedResolution_&&A(this.wantedResolution_)===a||A(this.image.getResolution())===a)))return this.image;this.wantedProjection_=s,this.wantedExtent_=r,this.wantedResolution_=a,this.image=new o.Ay(r,a,i,this.loader),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case r.A.LOADING:this.loading=!0,i=b.IMAGELOADSTART;break;case r.A.LOADED:this.loading=!1,i=b.IMAGELOADEND;break;case r.A.ERROR:this.loading=!1,i=b.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new P(i,e))}}function O(t,e){t.getImage().src=e}function D(t,e,i,n){const s=e/i,r=(0,h.q1)(t),o=(0,c.mk)((0,h.RG)(t)/s,T),a=(0,c.mk)((0,h.Oq)(t)/s,T),l=(0,c.mk)((n-1)*o/2,T),u=o+2*l,d=(0,c.mk)((n-1)*a/2,T),g=a+2*d;return(0,h.Bg)(r,s,0,[u,g])}var F=L;function k(t){const e=t.load||o.D4,i=t.imageExtent,n=new Image;return null!==t.crossOrigin&&(n.crossOrigin=t.crossOrigin),()=>e(n,t.url).then((t=>{const e=(0,h.RG)(i)/t.width,n=(0,h.Oq)(i)/t.height,s=e!==n?[e,n]:n;return{image:t,extent:i,resolution:s,pixelRatio:1}}))}class N extends F{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:O;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,l.Jt)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new o.Ay(this.imageExtent_,void 0,1,k({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(t,e)=>(this.image.setImage(t),i(this.image,e),(0,o.D4)(t))})),this.image.addEventListener(n.A.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,h.HY)(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}var G=N},23437:function(t,e,i){"use strict";var n=i(41611),s=i(29094);class r extends n.A{constructor(t){super(),this.projection=(0,s.Jt)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}e.A=r},57404:function(t,e,i){"use strict";i.d(e,{A:function(){return F}});i(44114);var n=i(73844),s=i(52686),r=i(39078),o=i(97582),a=i(76555),h=i(41127),l=i(71194),c=i(37444),u=i(53344),d=i(3851),g=i(77689),f=i(29094),_=i(11853),p=i(75572),m=i(88298),y=i(69331),v=i(53371);const x=(0,l.vt)();class E{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,c.dP)(this.flatCoordinates_):(0,c.Vy)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,c.q1)(this.getExtent());this.flatInteriorPoints_=(0,g.J)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,_.yJ)(this.flatCoordinates_,this.ends_),e=(0,m.C)(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=(0,g.p)(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,p.SH)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n<s;++n){const s=i[n],r=(0,p.SH)(t,e,s,2,.5);(0,d.X$)(this.flatMidpoints_,r),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=(0,f.Jt)(t);const e=t.getExtent(),i=t.getWorldExtent();if(e&&i){const t=(0,c.Oq)(i)/(0,c.Oq)(e);(0,l.Zz)(x,i[0],i[3],t,-t,0,0,0),(0,v.Rc)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,x,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new E(this.type_,this.flatCoordinates_.slice(),this.ends_.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=(0,y.B4)(((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=(0,u.P4)(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=(0,u.AL)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=(0,u.Hg)(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n);break;default:}return n&&(this.simplifiedGeometry_=new E(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}E.prototype.getFlatCoordinates=E.prototype.getOrientedFlatCoordinates;var C=E,A=i(23437),w=i(50299);function S(t,e){return[[-1/0,-1/0,1/0,1/0]]}var R=i(1097),I=i(95752),T=i(56811),M=i(8965);let b=!1;function P(t,e,i,n,s,r,o){const a=new XMLHttpRequest;a.open("GET","function"===typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=b,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t?n=JSON.parse(a.responseText):"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?r(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):o()}else o()},a.onerror=o,a.send()}function L(t,e){return function(i,n,s,r,o){const a=this;P(t,e,i,n,s,(function(t,e){a.addFeatures(t),void 0!==r&&r(t)}),o||y.tV)}}class O extends r.Ay{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class D extends A.A{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=y.tV,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,R.v)(this.format_,"`format` must be set when `url` is set"),this.loader_=L(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:S;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,s;this.featuresRtree_=e?new h.A:null,this.loadedExtentsRtree_=new h.A,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),e||void 0!==i||(i=new n.A(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,I.v6)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new O(w.A.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof C||(this.featureChangeKeys_[t]=[(0,M.KT)(e,o.A.CHANGE,this.handleFeatureChange_,this),(0,M.KT)(e,a.A.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof C){const n=this.idIndex_[t];n instanceof C?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&((0,R.v)(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let s=0,r=t.length;s<r;s++){const e=t[s],n=(0,I.v6)(e);this.addToIndex_(n,e)&&i.push(e)}for(let s=0,r=i.length;s<r;s++){const t=i[s],r=(0,I.v6)(t);this.setupChangeEvents_(r,t);const o=t.getGeometry();if(o){const i=o.getExtent();e.push(i),n.push(t)}else this.nullGeometryFeatures_[r]=t}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(w.A.ADDFEATURE))for(let s=0,r=i.length;s<r;s++)this.dispatchEvent(new O(w.A.ADDFEATURE,i[s]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(w.A.ADDFEATURE,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(w.A.REMOVEFEATURE,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(s.A.ADD,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(s.A.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_){const e=this.featureChangeKeys_[t];e.forEach(M.JH)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const e in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[e])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new O(w.A.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof C||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof C||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,T.p)(this.nullGeometryFeatures_)||(0,d.X$)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){const i=e&&e.canWrapX()&&this.getWrapX();if(!i)return this.featuresRtree_.getInExtent(t);const n=(0,c.QJ)(t,e);return[].concat(...n.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||y.rT,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),h=o;if(o=e instanceof C?0:e.closestPointXY(i,n,r,o),o<h){s=t;const e=Math.sqrt(o);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=(0,I.v6)(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new O(w.A.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:(0,I.v6)(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,T.p)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let r=0,o=s.length;r<o;++r){const t=s[r],o=n.forEachInExtent(t,(function(e){return(0,c.ms)(e.extent,t)}));o||(++this.loadingExtentsCount_,this.dispatchEvent(new O(w.A.FEATURESLOADSTART)),this.loader_.call(this,t,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new O(w.A.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new O(w.A.FEATURESLOADERROR))})),n.insert(t,{extent:t.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,c.aI)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=(0,I.v6)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.removeFeatureInternal(t);i&&this.changed()}removeFeatureInternal(t){const e=(0,I.v6)(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(M.JH),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new O(w.A.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const n=this.idIndex_[i];if(t instanceof C&&Array.isArray(n)&&n.includes(t))n.splice(n.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){(0,R.v)(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(L(t,this.format_))}}var F=D},50299:function(t,e){"use strict";e.A={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},41127:function(t,e,i){"use strict";var n=i(72220),s=i(37444),r=i(95752),o=i(56811);class a{constructor(t){this.rbush_=new n(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,r.v6)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],o=e[n],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:o};i[n]=a,this.items_[(0,r.v6)(o)]=a}this.rbush_.load(i)}remove(t){const e=(0,r.v6)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[(0,r.v6)(e)],n=[i.minX,i.minY,i.maxX,i.maxY];(0,s.aI)(n,t)||(this.remove(e),this.insert(t,e))}getAll(){const t=this.rbush_.all();return t.map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]},i=this.rbush_.search(e);return i.map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return(0,o.p)(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return(0,s.N)(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}e.A=a},5274:function(t,e,i){"use strict";var n=i(95023);class s extends n.A{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new s({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}e.A=s},38343:function(t,e){"use strict";class i{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new i({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}e.A=i},41382:function(t,e,i){"use strict";i.d(e,{u:function(){return o}});var n=i(66387);class s{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!==(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=r(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=r(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function r(t,e,i){const s=i?(0,n.oJ)(i):"null";return e+":"+t+":"+s}const o=new s},27749:function(t,e,i){"use strict";var n=i(95752),s=i(55689);class r{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,s.xq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.b0)()}getImage(t){return(0,n.b0)()}getHitDetectionImage(){return(0,n.b0)()}getPixelRatio(t){return 1}getImageState(){return(0,n.b0)()}getImageSize(){return(0,n.b0)()}getOrigin(){return(0,n.b0)()}getSize(){return(0,n.b0)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,s.xq)(t)}listenImageChange(t){(0,n.b0)()}load(){(0,n.b0)()}unlistenImageChange(t){(0,n.b0)()}}e.A=r},95023:function(t,e,i){"use strict";var n=i(1410),s=i(27749),r=i(66387),o=i(6294),a=i(17334),h=i(78911);class l extends s.A{constructor(t){const e=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:1,rotateWithView:e,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.render()}clone(){const t=this.getScale(),e=new l({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=(0,a.Y)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return n.A.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const r=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/r,a=s*Math.sin(o),h=Math.sqrt(s*s-a*a),l=n-h,c=Math.sqrt(a*a+l*l),u=c/a;if("miter"===t&&u<=i)return u*e;const d=e/2/u,g=e/2*(l/c),f=Math.sqrt((n+d)*(n+d)+g*g),_=f-n;if(void 0===this.radius2_||"bevel"===t)return 2*_;const p=n*Math.sin(o),m=Math.sqrt(n*n-p*p),y=s-m,v=Math.sqrt(p*p+y*y),x=v/p;if(x<=i){const t=x*e/2-s-n;return 2*Math.max(_,t)}return 2*_}createRenderOptions(){let t,e=h._m,i=h._K,n=0,s=null,r=0,a=0;this.stroke_&&(t=(0,o.F)(this.stroke_.getColor()??h.NT),a=this.stroke_.getWidth()??h.aq,s=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset()??0,i=this.stroke_.getLineJoin()??h._K,e=this.stroke_.getLineCap()??h._m,n=this.stroke_.getMiterLimit()??h.eL);const l=this.calculateLineJoinSize_(i,a,n),c=Math.max(this.radius_,this.radius2_||0),u=Math.ceil(2*c+l);return{strokeStyle:t,strokeWidth:a,size:u,lineCap:e,lineDash:s,lineDashOffset:r,lineJoin:i,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=h.qY),e.fillStyle=(0,o.F)(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),n=0;"string"===typeof i&&(i=(0,r._j)(i)),null===i?n=1:Array.isArray(i)&&(n=4===i.length?i[3]:1),0===n&&(e=(0,a.Y)(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,r=2*Math.PI/e;for(let o=0;o<e;o++){const e=s+o*r,a=o%2===0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=h.qY,e.fill(),t.strokeStyle&&(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.A=l},35782:function(t,e){"use strict";class i{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new i({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}e.A=i},86505:function(t,e,i){"use strict";i.d(e,{d1:function(){return c},mC:function(){return h},mY:function(){return u}});var n=i(5274),s=i(38343),r=i(35782),o=i(1097);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"===typeof t&&(t=t.clone()),new a({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(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_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function h(t){let e;if("function"===typeof t)e=t;else{let i;if(Array.isArray(t))i=t;else{(0,o.v)("function"===typeof t.getZIndex,"Expected an `Style` or an array of `Style`");const e=t;i=[e]}e=function(){return i}}return e}let l=null;function c(t,e){if(!l){const t=new s.A({color:"rgba(255,255,255,0.4)"}),e=new r.A({color:"#3399CC",width:1.25});l=[new a({image:new n.A({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return l}function u(){const t={},e=[255,255,255,1],i=[0,153,255,1],o=3;return t["Polygon"]=[new a({fill:new s.A({color:[255,255,255,.5]})})],t["MultiPolygon"]=t["Polygon"],t["LineString"]=[new a({stroke:new r.A({color:e,width:o+2})}),new a({stroke:new r.A({color:i,width:o})})],t["MultiLineString"]=t["LineString"],t["Circle"]=t["Polygon"].concat(t["LineString"]),t["Point"]=[new a({image:new n.A({radius:2*o,fill:new s.A({color:i}),stroke:new r.A({color:e,width:o/2})}),zIndex:1/0})],t["MultiPoint"]=t["Point"],t["GeometryCollection"]=t["Polygon"].concat(t["LineString"],t["Point"]),t}function d(t){return t.getGeometry()}e.Ay=a},71194:function(t,e,i){"use strict";i.d(e,{Bb:function(){return h},T9:function(){return u},Zz:function(){return c},dI:function(){return f},k3:function(){return a},rQ:function(){return l},vt:function(){return r}});var n=i(20502),s=i(1097);new Array(6);function r(){return[1,0,0,1,0,0]}function o(t,e,i,n,s,r,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o,t}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function h(t,e){const 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 l(t,e,i){return o(t,e,0,0,i,0,0)}function c(t,e,i,n,s,r,o,a){const h=Math.sin(r),l=Math.cos(r);return t[0]=n*l,t[1]=s*h,t[2]=-n*h,t[3]=s*l,t[4]=o*n*l-a*n*h+e,t[5]=o*s*h+a*s*l+i,t}function u(t,e){const i=d(e);(0,s.v)(0!==i,"Transformation matrix cannot be inverted");const n=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-o/i,t[3]=n/i,t[4]=(o*l-a*h)/i,t[5]=-(n*l-r*h)/i,t}function d(t){return t[0]*t[3]-t[1]*t[2]}let g;function f(t){const e="matrix("+t.join(", ")+")";if(n.Wl)return e;const i=g||(g=document.createElement("div"));return i.style.transform=e,i.style.transform}},95752:function(t,e,i){"use strict";function n(){throw new Error("Unimplemented abstract method.")}i.d(e,{b0:function(){return n},v6:function(){return r}});let s=0;function r(t){return t.ol_uid||(t.ol_uid=String(++s))}}}]);
|
||
//# sourceMappingURL=b0a3acb8b4d3f09f.js.map
|