(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);_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 te?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=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=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=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;i0)this.pop()}extend(t){for(let e=0,i=t.length;ethis.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=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;ithis.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=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=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{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>1){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=rt){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;o0)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;tthis.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=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(){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;sf&&(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&&g1&&"function"===typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}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=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?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>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:t0?s-1:s}return n-1}if(i>0){for(let i=1;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;e0?(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;t0&&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[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;n0)}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;nr&&(l|=n.A.RIGHT),ho&&(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[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function x(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function k(t){return t[2]=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=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[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(r1)d=i;else{if(g>0){for(let r=0;rr&&(r=h),o=i,a=s}return r}function o(t,e,i,n,s){for(let o=0,a=i.length;or&&(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;av&&(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;a1?h:2,a=a||new Array(h);for(let n=0;n>1;r=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;r0}function r(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,a=i.length;o0){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;ea&&(u=e,a=r)}a>r&&(l[(u-e)/s]=1,o+s0&&_>g)&&(f<0&&p0&&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=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=i?t[e-i]:t[e]}function nt(t,e,i){let n,s;eo){const e=ct(t,n),i=ct(t,s);return et(e,i)}let a=0;if(nt.startIndex?nt.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=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&&et.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(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(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.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=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=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=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=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=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=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{const i=(0,_.Ad)(e,n),r=(0,g.hG)(s,i);r{t.push([e])}))}segmentMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,s=i.length;n0&&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]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.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<",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{let e=G;for(let i=2;i{let e=k|D;for(let i=3;i{let e=G;for(let i=1;i3===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(re){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;ot.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{for(let e=0;et.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)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{for(let e=0;e{for(let e=0;e!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{let e=1;for(let i=0;is[0](t)/s[1](t);case Z.Add:return t=>{let e=0;for(let i=0;is[0](t)-s[1](t);case Z.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(en?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{const e=n[0](t);for(let s=1;s{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a=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;o4)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;no&&(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;ethis.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=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(a0&&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;ot&&(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{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;tt[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;L0?-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(;L0&&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;Ot?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(lO&&(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(;A0){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;hi)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;rt*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{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(tu[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&&ic=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]])}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{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;b1?(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;ns&&(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=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;oh?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=-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;lMath.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{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.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;nthis.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{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{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{--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;nthis.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