rlayers
Version:
React Components for OpenLayers
1 lines • 592 kB
JavaScript
"use strict";(self.webpackChunkrlayers=self.webpackChunkrlayers||[]).push([[7158],{25:(t,e,i)=>{i.d(e,{A:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},71:(t,e,i)=>{i.d(e,{A:()=>h});var n=i(2135),s=i(4120),r=i(1685);const o="length";class a extends r.Ay{constructor(t,e,i){super(t),this.element=e,this.index=i}}class l extends s.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 t=0,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(o)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new a(n.A.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new a(n.A.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new a(n.A.REMOVE,i,t)),this.dispatchEvent(new a(n.A.ADD,e,t))}updateLength_(){this.set(o,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}}const h=l},114:(t,e,i)=>{i.d(e,{A:()=>u});var n=i(9825),s=i(5516),r=i(5332),o=i(2323);function a(t,e,i){const r=(0,n.SR)();return(0,s.nR)(e,i,r,t)}var l=i(2808);function h(t,e){const i=`\n attribute vec2 ${o.eS.TEXTURE_COORD};\n uniform mat4 ${o.gF.TILE_TRANSFORM};\n uniform float ${o.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${o.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${o.gF.TEXTURE_RESOLUTION};\n uniform float ${o.gF.TEXTURE_ORIGIN_X};\n uniform float ${o.gF.TEXTURE_ORIGIN_Y};\n uniform float ${o.gF.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${o.eS.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${o.gF.TEXTURE_ORIGIN_X} + ${o.gF.TEXTURE_RESOLUTION} * ${o.gF.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${o.gF.TEXTURE_ORIGIN_Y} - ${o.gF.TEXTURE_RESOLUTION} * ${o.gF.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${o.gF.TILE_TRANSFORM} * vec4(${o.eS.TEXTURE_COORD}, ${o.gF.DEPTH}, 1.0);\n }\n `,r={...(0,s.z0)(),inFragmentShader:!0,bandCount:e},l=[];if(void 0!==t.color){const e=a(r,t.color,n.mE);l.push(`color = ${e};`)}if(void 0!==t.contrast){const e=a(r,t.contrast,n.wl);l.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=a(r,t.exposure,n.wl);l.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=a(r,t.saturation,n.wl);l.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=a(r,t.gamma,n.wl);l.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=a(r,t.brightness,n.wl);l.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const h={},c=Object.keys(r.variables).length;if(c>1&&!t.variables)throw new Error(`Missing variables in style (expected ${r.variables})`);for(let e=0;e<c;++e){const i=r.variables[Object.keys(r.variables)[e]];if(!(i.name in t.variables))throw new Error(`Missing '${i.name}' in style variables`);h[(0,s.Sl)(i.name)]=function(){let e=t.variables[i.name];return"string"==typeof e&&(e=(0,s.Lm)(e)),void 0!==e?e:-9999999}}const u=Object.keys(h).map((function(t){return`uniform float ${t};`})),d=Math.ceil(e/4);u.push(`uniform sampler2D ${o.gF.TILE_TEXTURE_ARRAY}[${d}];`),r.paletteTextures&&u.push(`uniform sampler2D ${s.uZ}[${r.paletteTextures.length}];`);const g=Object.keys(r.functions).map((function(t){return r.functions[t]}));return{vertexShader:i,fragmentShader:`\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n uniform vec4 ${o.gF.RENDER_EXTENT};\n uniform float ${o.gF.TRANSITION_ALPHA};\n uniform float ${o.gF.TEXTURE_PIXEL_WIDTH};\n uniform float ${o.gF.TEXTURE_PIXEL_HEIGHT};\n uniform float ${o.gF.RESOLUTION};\n uniform float ${o.gF.ZOOM};\n\n ${u.join("\n")}\n\n ${g.join("\n")}\n\n void main() {\n if (\n v_mapCoord[0] < ${o.gF.RENDER_EXTENT}[0] ||\n v_mapCoord[1] < ${o.gF.RENDER_EXTENT}[1] ||\n v_mapCoord[0] > ${o.gF.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${o.gF.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${o.gF.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${l.join("\n")}\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${o.gF.TRANSITION_ALPHA};\n }`,uniforms:h,paletteTextures:r.paletteTextures}}class c extends l.A{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.styleVariables_=this.style_.variables||{},this.handleSourceUpdate_(),this.addChangeListener(r.A.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache();const t=this.getSource();if(t)if("loading"===t.getState()){const e=()=>{"ready"===t.getState()&&(t.removeEventListener("change",e),this.setStyle(this.style_))};t.addEventListener("change",e)}else this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=h(this.style_,this.getSourceBandCount_());return new o.Ay(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.getCacheSize(),paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let s=0,r=e.length;s<r;++s)this.renderedSource_=e[s],i.prepareFrame(t)&&(n=i.renderFrame(t));return n}render(t,e){this.rendered=!0;const i=t.viewState,n=this.getSources(t.extent,i.resolution);let s=!0;for(let t=0,e=n.length;t<e;++t){const e=n[t],i=e.getState();if("loading"==i){const t=()=>{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}s=s&&"ready"==i}const r=this.renderSources(t,n);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=i.resolution,r;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return r}setStyle(t){if(this.styleVariables_=t.variables||{},this.style_=t,this.hasRenderer()){const t=h(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,paletteTextures:t.paletteTextures}),this.changed()}}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}c.prototype.dispose;const u=c},130:(t,e,i)=>{i.d(e,{Be:()=>l,Ek:()=>a,H7:()=>s,IP:()=>r,JL:()=>c,SD:()=>_,Ss:()=>o,UD:()=>u,l4:()=>h,zH:()=>d});var n=i(7771);const s=34962,r=34963,o=35040,a=35044,l=35048,h=5121,c=5123,u=5125,d=5126,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function _(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!n.oF},e);const i=g.length;for(let n=0;n<i;++n)try{const i=t.getContext(g[n],e);if(i)return i}catch{}return null}},136:(t,e,i)=>{i.d(e,{A:()=>p});var n=i(8130),s=i(915),r=i(6429);class o extends n.A{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,i){if(!this.image_||this.maxExtent&&!(0,s.Ym)(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length,l=this.appendFlatPointCoordinates(n,o);this.instructions.push([r.Ay.DRAW_IMAGE,a,l,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([r.Ay.DRAW_IMAGE,a,l,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,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),o=[];for(let e=0,i=n.length;e<i;e+=t.getStride())this.maxExtent&&!(0,s.Ym)(this.maxExtent,n.slice(e,e+2))||o.push(n[e],n[e+1]);const a=this.coordinates.length,l=this.appendFlatPointCoordinates(o,2);this.instructions.push([r.Ay.DRAW_IMAGE,a,l,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([r.Ay.DRAW_IMAGE,a,l,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}}const a=o;var l=i(8774);class h extends n.A{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),a=[r.Ay.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(t,e,i){const n=this.state,s=n.strokeStyle,o=n.lineWidth;if(void 0===s||void 0===o)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([r.Ay.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,l.Oq,l.vk],r.th);const a=t.getFlatCoordinates(),h=t.getStride();this.drawFlatCoordinates_(a,0,a.length,h),this.hitDetectionInstructions.push(r.VD),this.endGeometry(e)}drawMultiLineString(t,e,i){const n=this.state,s=n.strokeStyle,o=n.lineWidth;if(void 0===s||void 0===o)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([r.Ay.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,l.Oq,l.vk],r.th);const a=t.getEnds(),h=t.getFlatCoordinates(),c=t.getStride();let u=0;for(let t=0,e=a.length;t<e;++t)u=this.drawFlatCoordinates_(h,u,a[t],c);this.hitDetectionInstructions.push(r.VD),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(r.VD),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(r.VD),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(r.th)}}const c=h;var u=i(3671);class d extends n.A{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,o=void 0!==s.fillStyle,a=void 0!==s.strokeStyle,l=i.length;this.instructions.push(r.th),this.hitDetectionInstructions.push(r.th);for(let s=0;s<l;++s){const o=i[s],l=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,o,n,!0,!a),c=[r.Ay.MOVE_TO_LINE_TO,l,h];this.instructions.push(c),this.hitDetectionInstructions.push(c),a&&(this.instructions.push(r.kx),this.hitDetectionInstructions.push(r.kx)),e=o}return o&&(this.instructions.push(r.I5),this.hitDetectionInstructions.push(r.I5)),a&&(this.instructions.push(r.VD),this.hitDetectionInstructions.push(r.VD)),e}drawCircle(t,e,i){const n=this.state,s=n.fillStyle,o=n.strokeStyle;if(void 0===s&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([r.Ay.SET_FILL_STYLE,l.qY]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([r.Ay.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,l.Oq,l.vk]);const a=t.getFlatCoordinates(),h=t.getStride(),c=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,h,!1,!1);const u=[r.Ay.CIRCLE,c];this.instructions.push(r.th,u),this.hitDetectionInstructions.push(r.th,u),void 0!==n.fillStyle&&(this.instructions.push(r.I5),this.hitDetectionInstructions.push(r.I5)),void 0!==n.strokeStyle&&(this.instructions.push(r.VD),this.hitDetectionInstructions.push(r.VD)),this.endGeometry(e)}drawPolygon(t,e,i){const n=this.state,s=n.fillStyle,o=n.strokeStyle;if(void 0===s&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([r.Ay.SET_FILL_STYLE,l.qY]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([r.Ay.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,l.Oq,l.vk]);const a=t.getEnds(),h=t.getOrientedFlatCoordinates(),c=t.getStride();this.drawFlatCoordinatess_(h,0,a,c),this.endGeometry(e)}drawMultiPolygon(t,e,i){const n=this.state,s=n.fillStyle,o=n.strokeStyle;if(void 0===s&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([r.Ay.SET_FILL_STYLE,l.qY]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([r.Ay.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,l.Oq,l.vk]);const a=t.getEndss(),h=t.getOrientedFlatCoordinates(),c=t.getStride();let u=0;for(let t=0,e=a.length;t<e;++t)u=this.drawFlatCoordinatess_(h,u,a[t],c);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=(0,u.n$)(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}}const g=d;var _=i(3624);const f={Circle:g,Default:n.A,Image:a,LineString:c,Polygon:g,Text:_.A},p=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];return void 0===s&&(s=new(0,f[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s),s}}},186:(t,e,i)=>{function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function s(t,e,i){return t+"/"+e+"/"+i}function r(t){return s(t[0],t[1],t[2])}function o(t){return a(t[0],t[1],t[2])}function a(t,e,i){return(e<<t)+i}function l(t,e){const i=t[0],n=t[1],s=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}i.d(e,{N:()=>n,N5:()=>l,_T:()=>a,dp:()=>s,i7:()=>r,tW:()=>o})},190:(t,e,i)=>{i.d(e,{A:()=>l});var n=i(3938),s=i(8143),r=i(1078),o=i(8711);class a extends s.A{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=r.A.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=r.A.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,o.Y)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=r.A.LOADED:this.state=r.A.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==r.A.ERROR&&(this.state=r.A.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==r.A.IDLE&&(this.state=r.A.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,n.f6)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}const l=a},259:(t,e,i)=>{i.d(e,{Ay:()=>a});var n=i(588),s=i(130);const r={STATIC_DRAW:s.Ek,STREAM_DRAW:s.Ss,DYNAMIC_DRAW:s.Be};function o(t){switch(t){case s.H7:return Float32Array;case s.IP:return Uint32Array;default:return Float32Array}}const a=class{constructor(t,e){this.array_=null,this.type_=t,(0,n.v)(t===s.H7||t===s.IP,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==e?e:r.STATIC_DRAW}ofSize(t){return this.array_=new(o(this.type_))(t),this}fromArray(t){return this.array_=o(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(o(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}setArray(t){const e=o(this.type_);if(!(t instanceof e))throw new Error(`Expected ${e}`);this.array_=t}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}},277:(t,e,i)=>{i.d(e,{A:()=>r});var n=i(5801);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()}}const r=s},422:(t,e,i)=>{i.d(e,{A:()=>g});var n=i(1685),s=i(8704),r=i(25),o=i(1064);class a extends r.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(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new o.Ay([i])}getGeometry(){return this.geometry_}}const l=a;var h=i(1409);const c="boxcancel";class u extends n.Ay{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class d extends h.A{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new l(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??s.at,this.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.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new u("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new u(e?"boxend":c,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!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 u("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new u(c,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new u(c,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}const g=d},492:(t,e,i)=>{i.d(e,{A:()=>c});var n=i(5332),s=i(9960),r=i(3984),o=i(9703),a=i(9777),l=i(5986);class h extends l.A{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,o.vt)(),this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,this.onMapChanged_=()=>{this.clearCache(),this.removeHelper()},t.addChangeListener(n.A.MAP,this.onMapChanged_),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(r.A.PRECOMPOSE)){const n=new s.A(r.A.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(r.A.POSTCOMPOSE)){const n=new s.A(r.A.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let s=0,r=t.layerStatesArray.length;s<r;s++){const r=t.layerStatesArray[s].layer,o=r.getRenderer();if(!(o instanceof h)){i=!0;continue}const a=r.getClassName();if((i||a!==e)&&(n+=1,i=!1),e=a,o===this)break}const s="map/"+t.mapId+"/group/"+n;this.helper&&this.helper.canvasCacheKeyMatches(s)&&!this.helper.needsToBeRecreated()||(this.removeHelper(),this.helper=new a.Ay({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),e&&(this.helper.getCanvas().className=e),this.afterHelperCreated())}return this.prepareFrameInternal(t)}afterHelperCreated(){}prepareFrameInternal(t){return!0}clearCache(){}disposeInternal(){this.clearCache(),this.removeHelper(),this.getLayer()?.removeChangeListener(n.A.MAP,this.onMapChanged_),super.disposeInternal()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){(0,o.Zz)(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);const r=new s.A(t,this.inversePixelTransform_,i,e);n.dispatchEvent(r)}}preRender(t,e){this.dispatchRenderEvent_(r.A.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(r.A.POSTRENDER,t,e)}}const c=h},503:(t,e,i)=>{i.d(e,{A:()=>u});var n=i(6514),s=i(915),r=i(1597),o=i(4294),a=i(2096),l=i(2497),h=i(6361);class c extends a.Ay{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){(0,n.X$)(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new c(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.Ld)(this.getExtent(),t,e))return n;const o=this.flatCoordinates,a=this.stride;for(let s=0,l=o.length;s<l;s+=a){const l=(0,r.hG)(t,e,o[s],o[s+1]);if(l<n){n=l;for(let t=0;t<a;++t)i[t]=o[s+t];i.length=a}}return n}getCoordinates(){return(0,h.n2)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new o.A(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,n=[];for(let s=0,r=t.length;s<r;s+=i){const r=new o.A(t.slice(s,s+i),e);n.push(r)}return n}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let n=0,r=e.length;n<r;n+=i){const i=e[n],r=e[n+1];if((0,s.Rj)(t,i,r))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,l.z2)(this.flatCoordinates,0,t,this.stride),this.changed()}}const u=c},517:(t,e,i)=>{i.d(e,{A:()=>A});var n=i(71),s=i(6717),r=i(6933),o=i(915),a=i(1217),l=i(4294),h=i(1597),c=i(6391);function u(t,e,i){const n=[];let s=t(0),r=t(1),o=e(s),a=e(r);const l=[r,s],c=[a,o],u=[1,0],d={};let g,_,f,p,m,x,v=1e5;for(;--v>0&&u.length>0;)f=u.pop(),s=l.pop(),o=c.pop(),x=f.toString(),x in d||(n.push(o[0],o[1]),d[x]=!0),p=u.pop(),r=l.pop(),a=c.pop(),m=(f+p)/2,g=t(m),_=e(g),(0,h.Q1)(_[0],_[1],o[0],o[1],a[0],a[1])<i?(n.push(a[0],a[1]),x=p.toString(),d[x]=!0):(u.push(p,m,m,f),c.push(a,_,_,o),l.push(r,g,g,s));return n}var d=i(3984),g=i(7331),_=i(4602),f=i(3628),p=i(953),m=i(9276),x=i(1426),v=i(2757);const y=new p.A({color:"rgba(0,0,0,0.2)"}),E=[90,45,30,20,10,5,2,1,.5,20/60,10/60,5/60,2/60,1/60,30/3600,20/3600,10/3600,5/3600,2/3600,1/3600];class T extends v.A{constructor(t){t=t||{};const e=Object.assign({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},t);delete e.maxLines,delete e.strokeStyle,delete e.targetSize,delete e.showLabels,delete e.lonLabelFormatter,delete e.latLabelFormatter,delete e.lonLabelPosition,delete e.latLabelPosition,delete e.lonLabelStyle,delete e.latLabelStyle,delete e.intervals,super(e),this.projection_=null,this.maxLat_=1/0,this.maxLon_=1/0,this.minLat_=-1/0,this.minLon_=-1/0,this.maxX_=1/0,this.maxY_=1/0,this.minX_=-1/0,this.minY_=-1/0,this.targetSize_=void 0!==t.targetSize?t.targetSize:100,this.maxLines_=void 0!==t.maxLines?t.maxLines:100,this.meridians_=[],this.parallels_=[],this.strokeStyle_=void 0!==t.strokeStyle?t.strokeStyle:y,this.fromLonLatTransform_=void 0,this.toLonLatTransform_=void 0,this.projectionCenterLonLat_=null,this.bottomLeft_=null,this.bottomRight_=null,this.topLeft_=null,this.topRight_=null,this.meridiansLabels_=null,this.parallelsLabels_=null,t.showLabels&&(this.lonLabelFormatter_=null==t.lonLabelFormatter?r.aP.bind(this,"EW"):t.lonLabelFormatter,this.latLabelFormatter_=null==t.latLabelFormatter?r.aP.bind(this,"NS"):t.latLabelFormatter,this.lonLabelPosition_=null==t.lonLabelPosition?0:t.lonLabelPosition,this.latLabelPosition_=null==t.latLabelPosition?1:t.latLabelPosition,this.lonLabelStyleBase_=new m.Ay({text:void 0!==t.lonLabelStyle?t.lonLabelStyle.clone():new x.A({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new f.A({color:"rgba(0,0,0,1)"}),stroke:new p.A({color:"rgba(255,255,255,1)",width:3})})}),this.lonLabelStyle_=t=>{const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new m.Ay({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new x.A({font:"12px Calibri,sans-serif",textAlign:"right",fill:new f.A({color:"rgba(0,0,0,1)"}),stroke:new p.A({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(d.A.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:E,this.setSource(new _.A({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.A,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new m.Ay({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,o.Li)(i,this.projection_),this.loadedExtent_&&((0,o.bE)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),r=this.getExtent()||[-1/0,-1/0,1/0,1/0],a=(0,o._N)(r,t);if(this.renderedExtent_&&(0,o.aI)(this.renderedExtent_,a)&&this.renderedResolution_===e)return;if(this.renderedExtent_=a,this.renderedResolution_=e,(0,o.Im)(a))return;const l=(0,o.q1)(a),h=e*e/4;(!this.projection_||!(0,c.tI)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(a,l,e,h);let u,d=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(d+=this.meridians_.length),this.parallelsLabels_&&(d+=this.parallels_.length);d>this.featurePool_.length;)u=new s.A,this.featurePool_.push(u);const g=n.getFeaturesCollection();g.clear();let _,f,p=0;for(_=0,f=this.meridians_.length;_<f;++_)u=this.featurePool_[p++],u.setGeometry(this.meridians_[_]),u.setStyle(this.lineStyle_),g.push(u);for(_=0,f=this.parallels_.length;_<f;++_)u=this.featurePool_[p++],u.setGeometry(this.parallels_[_]),u.setStyle(this.lineStyle_),g.push(u)}addMeridian_(t,e,i,n,s,r){const a=this.getMeridian_(t,e,i,n,r);if((0,o.HY)(a.getExtent(),s)){if(this.meridiansLabels_){const e=this.lonLabelFormatter_(t);r in this.meridiansLabels_?this.meridiansLabels_[r].text=e:this.meridiansLabels_[r]={geom:new l.A([]),text:e}}this.meridians_[r++]=a}return r}addParallel_(t,e,i,n,s,r){const a=this.getParallel_(t,e,i,n,r);if((0,o.HY)(a.getExtent(),s)){if(this.parallelsLabels_){const e=this.latLabelFormatter_(t);r in this.parallelsLabels_?this.parallelsLabels_[r].text=e:this.parallelsLabels_[r]={geom:new l.A([]),text:e}}this.parallels_[r++]=a}return r}drawLabels_(t){const e=t.frameState.viewState.rotation,i=t.frameState.viewState.resolution,n=t.frameState.size,s=t.frameState.extent,r=(0,o.q1)(s);let a=s;if(e){const t=n[0]*i,e=n[1]*i;a=[r[0]-t/2,r[1]-e/2,r[0]+t/2,r[1]+e/2]}let l=0,h=0,c=this.latLabelPosition_<.5;const u=this.projection_.getExtent(),d=(0,o.RG)(u);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,o.ms)(u,s)&&(l=Math.floor((s[0]-u[0])/d),h=Math.ceil((s[2]-u[2])/d),c=c!==Math.abs(e)>Math.PI/2);const _=(0,g.r2)(t);for(let t=l;t<=h;++t){let i,n,o,u,g=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,o=this.meridiansLabels_.length;n<o;++n){const o=this.meridians_[n];if(e||0!==t){const i=o.clone();i.translate(t*d,0),i.rotate(-e,r),u=this.getMeridianPoint_(i,a,n),u.rotate(e,r)}else u=this.getMeridianPoint_(o,s,n);i=this.featurePool_[g++],i.setGeometry(u),i.set("graticule_label",this.meridiansLabels_[n].text),_.drawFeature(i,this.lonLabelStyle_(i))}if(this.parallelsLabels_&&(t===l&&c||t===h&&!c))for(n=0,o=this.parallels_.length;n<o;++n){const o=this.parallels_[n];if(e||0!==t){const i=o.clone();i.translate(t*d,0),i.rotate(-e,r),u=this.getParallelPoint_(i,a,n),u.rotate(e,r)}else u=this.getParallelPoint_(o,s,n);i=this.featurePool_[g++],i.setGeometry(u),i.set("graticule_label",this.parallelsLabels_[n].text),_.drawFeature(i,this.latLabelStyle_(i))}}}createGraticule_(t,e,i,n){const s=this.getInterval_(i);if(-1==s)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));let r=!1;const a=this.projection_.getExtent(),l=(0,o.RG)(a);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,o.ms)(a,t)&&((0,o.RG)(t)>=l?(t[0]=a[0],t[2]=a[2]):r=!0);const c=[(0,h.qE)(e[0],this.minX_,this.maxX_),(0,h.qE)(e[1],this.minY_,this.maxY_)],u=this.toLonLatTransform_(c);isNaN(u[1])&&(u[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let d=(0,h.qE)(u[0],this.minLon_,this.maxLon_),g=(0,h.qE)(u[1],this.minLat_,this.maxLat_);const _=this.maxLines_;let f,p,m,x,v=t;r||(v=[(0,h.qE)(t[0],this.minX_,this.maxX_),(0,h.qE)(t[1],this.minY_,this.maxY_),(0,h.qE)(t[2],this.minX_,this.maxX_),(0,h.qE)(t[3],this.minY_,this.maxY_)]);const y=(0,o.NW)(v,this.toLonLatTransform_,void 0,8);let E=y[3],T=y[2],A=y[1],S=y[0];if(r||((0,o.Ym)(v,this.bottomLeft_)&&(S=this.minLon_,A=this.minLat_),(0,o.Ym)(v,this.bottomRight_)&&(T=this.maxLon_,A=this.minLat_),(0,o.Ym)(v,this.topLeft_)&&(S=this.minLon_,E=this.maxLat_),(0,o.Ym)(v,this.topRight_)&&(T=this.maxLon_,E=this.maxLat_),E=(0,h.qE)(E,g,this.maxLat_),T=(0,h.qE)(T,d,this.maxLon_),A=(0,h.qE)(A,this.minLat_,g),S=(0,h.qE)(S,this.minLon_,d)),d=Math.floor(d/s)*s,x=(0,h.qE)(d,this.minLon_,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,0),f=0,r)for(;(x-=s)>=S&&f++<_;)p=this.addMeridian_(x,A,E,n,t,p);else for(;x!=this.minLon_&&f++<_;)x=Math.max(x-s,this.minLon_),p=this.addMeridian_(x,A,E,n,t,p);if(x=(0,h.qE)(d,this.minLon_,this.maxLon_),f=0,r)for(;(x+=s)<=T&&f++<_;)p=this.addMeridian_(x,A,E,n,t,p);else for(;x!=this.maxLon_&&f++<_;)x=Math.min(x+s,this.maxLon_),p=this.addMeridian_(x,A,E,n,t,p);for(this.meridians_.length=p,this.meridiansLabels_&&(this.meridiansLabels_.length=p),g=Math.floor(g/s)*s,m=(0,h.qE)(g,this.minLat_,this.maxLat_),p=this.addParallel_(m,S,T,n,t,0),f=0;m!=this.minLat_&&f++<_;)m=Math.max(m-s,this.minLat_),p=this.addParallel_(m,S,T,n,t,p);for(m=(0,h.qE)(g,this.minLat_,this.maxLat_),f=0;m!=this.maxLat_&&f++<_;)m=Math.min(m+s,this.maxLat_),p=this.addParallel_(m,S,T,n,t,p);this.parallels_.length=p,this.parallelsLabels_&&(this.parallelsLabels_.length=p)}getInterval_(t){const e=this.projectionCenterLonLat_[0],i=this.projectionCenterLonLat_[1];let n=-1;const s=Math.pow(this.targetSize_*t,2),r=[],o=[];for(let t=0,a=this.intervals_.length;t<a;++t){const a=(0,h.qE)(this.intervals_[t]/2,0,90),l=(0,h.qE)(i,-90+a,90-a);if(r[0]=e-a,r[1]=l-a,o[0]=e+a,o[1]=l+a,this.fromLonLatTransform_(r,r),this.fromLonLatTransform_(o,o),Math.pow(o[0]-r[0],2)+Math.pow(o[1]-r[1],2)<=s)break;n=this.intervals_[t]}return n}getMeridian_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,c.Jt)("EPSG:4326");return u((function(n){return[t,e+(i-e)*n]}),(0,c.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.meridians_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):(o=new a.A(r,"XY"),this.meridians_[s]=o),o}getMeridianPoint_(t,e,i){const n=t.getFlatCoordinates();let s=1,r=n.length-1;n[s]>n[r]&&(s=r,r=1);const o=Math.max(e[1],n[s]),a=Math.min(e[3],n[r]),l=(0,h.qE)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),c=[n[s-1]+(n[r-1]-n[s-1])*(l-n[s])/(n[r]-n[s]),l],u=this.meridiansLabels_[i].geom;return u.setCoordinates(c),u}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,s){const r=function(t,e,i,n,s){const r=(0,c.Jt)("EPSG:4326");return u((function(n){return[e+(i-e)*n,t]}),(0,c.RG)(r,n),s)}(t,e,i,this.projection_,n);let o=this.parallels_[s];return o?(o.setFlatCoordinates("XY",r),o.changed()):o=new a.A(r,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let s=0,r=n.length-2;n[s]>n[r]&&(s=r,r=0);const o=Math.max(e[0],n[s]),a=Math.min(e[2],n[r]),l=(0,h.qE)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),c=[l,n[s+1]+(n[r+1]-n[s+1])*(l-n[s])/(n[r]-n[s])],u=this.parallelsLabels_[i].geom;return u.setCoordinates(c),u}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,c.Jt)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,c.RG)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=n;else{const t=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(e,i,s){const r=n(e,i,s=s||2);for(let e=0,i=r.length;e<i;e+=s)r[e]<t&&(r[e]+=360);return r}}this.fromLonLatTransform_=(0,c.RG)(e,t);const s=(0,o.NW)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=s[0],this.maxX_=s[2],this.minY_=s[1],this.maxY_=s[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_((0,o.q1)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const A=T},588:(t,e,i)=>{function n(t,e){if(!t)throw new Error(e)}i.d(e,{v:()=>n})},613:(t,e,i)=>{i.d(e,{A:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},702:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(4863),s=i(8512);class r extends s.A{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,n.EN)({extent:(0,n.kZ)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const o=r},764:(t,e,i)=>{i.d(e,{A:()=>g,l:()=>d});var n=i(3568),s=i(588),r=i(6837),o=i(9438),a=i(915),l=i(3984),h=i(8620),c=i(5332);class u extends h.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(c.A.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(c.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,o.JH)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,o.KT)(t,r.A.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0)),this.clearRenderer()),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 s;if(!t&&i&&(t=i.getView()),e=t instanceof n.Ay?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),e.layerStatesArray){if(s=e.layerStatesArray.find((t=>t.layer===this)),!s)return!1}else s=this.getLayerState();const r=this.getExtent();return d(s,e.viewState)&&(!r||(0,a.HY)(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];let i=e(t instanceof n.Ay?t.getViewStateAndExtent():t);return Array.isArray(i)||(i=[i]),i}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(c.A.MAP,t)}getMapInternal(){return this.get(c.A.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,o.JH)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,o.JH)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,o.KT)(t,l.A.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=(0,o.KT)(this,r.A.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,s.v)(!e.some((t=>t.layer===i.layer)),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(c.A.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=u},808:(t,e,i)=>{i.d(e,{A:()=>s});var n=i(8711);const s=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy((0,n.lr)(),{get:(t,e)=>{if("function"==typeof(0,n.lr)()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i<n;++i){const n=e[i];if("function"==typeof n){n(t);continue}const s=e[++i];if("function"==typeof t[n])t[n](...s);else{if("function"==typeof s){t[n]=s(t);continue}t[n]=s}}}))}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}},904:(t,e,i)=>{function n(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-s)*(e-s)+(i-r)*(i-r)),s=e,r=i}return o}i.d(e,{k:()=>n})},915:(t,e,i)=>{i.d(e,{$C:()=>y,$u:()=>k,Af:()=>z,Bg:()=>I,HY:()=>N,Im:()=>G,Ld:()=>a,Li:()=>j,Mx:()=>U,N:()=>g,NW:()=>B,Oq:()=>P,Py:()=>F,QJ:()=>X,R:()=>R,R8:()=>E,RG:()=>O,Rj:()=>c,S5:()=>d,Tr:()=>s,UG:()=>S,Vy:()=>p,WU:()=>D,X$:()=>v,Ym:()=>l,Yw:()=>L,_N:()=>M,aI:()=>m,aZ:()=>_,bE:()=>x,dP:()=>f,k_:()=>C,ms:()=>h,o8:()=>o,q1:()=>w,qF:()=>b,r:()=>r,sB:()=>A,vz:()=>u});var n=i(1580);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)y(e,t[i]);return e}function r(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function o(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function a(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function l(t,e){return c(t,e[0],e[1])}function h(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function c(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function u(t,e){const i=t[0],s=t[1],r=t[2],o=t[3],a=e[0],l=e[1];let h=n.A.UNKNOWN;return a<i?h|=n.A.LEFT:a>r&&(h|=n.A.RIGHT),l<s?h|=n.A.BELOW:l>o&&(h|=n.A.ABOVE),h===n.A.UNKNOWN&&(h=n.A.INTERSECTING),h}function d(){return[1/0,1/0,-1/0,-1/0]}function g(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 g(1/0,1/0,-1/0,-1/0,t)}function f(t,e){const i=t[0],n=t[1];return g(i,n,i,n,e)}function p(t,e,i,n,s){return E(_(s),t,e,i,n)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function x(t,e,i){return Math.abs(t[0]-e[0])<i&&Math.abs(t[2]-e[2])<i&&Math.abs(t[1]-e[1])<i&&Math.abs(t[3]-e[3])<i}function v(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function y(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function E(t,e,i,n,s){for(;i<n;i+=s)T(t,e[i],e[i+1]);return t}function T(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function A(t,e){let i;return i=e(R(t)),i||(i=e(C(t)),i||(i=e(D(t)),i||(i=e(F(t)),i||!1)))}function S(t){let e=0;return G(t)||(e=O(t)*P(t)),e}function R(t){return[t[0],t[1]]}function C(t){return[t[2],t[1]]}function w(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function b(t,e){let i;if("bottom-left"===e)i=R(t);else if("bottom-right"===e)i=C(t);else if("top-left"===e)i=F(t);else{if("top-right"!==e)throw new Error("Invalid corner");i=D(t)}return i}function I(t,e,i,n,s){const[r,o,a,l,h,c,u,d]=L(t,e,i,n);return g(Math.min(r,a,h,u),Math.min(o,l,c,d),Math.max(r,a,h,u),Math.max(o,l,c,d),s)}function L(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),l=s*o,h=s*a,c=r*o,u=r*a,d=t[0],g=t[1];return[d-l+u,g-h-c,d-l-u,g-h+c,d+l-u,g+h+c,d+l+u,g+h-c,d-l+u,g-h-c]}function P(t){return t[3]-t[1]}function M(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return N(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):_(n),n}function F(t){return[t[0],t[3]]}function D(t){return[t[2],t[3]]}function O(t){return t[2]-t[0]}function N(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function G(t){return t[2]<t[0]||t[3]<t[1]}function k(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function z(t,e){const i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}function U(t,e,i){let s=!1;const r=u(t,e),o=u(t,i);if(r===n.A.INTERSECTING||o===n.A.INTERSECTING)s=!0;else{const a=t[0],l=t[1],h=t[2],c=t[3],u=e[0],d=e[1],g=i[0],_=i[1],f=(_-d)/(g-u);let p,m;o&n.A.ABOVE&&!(r&n.A.ABOVE)&&(p=g-(_-c)/f,s=p>=a&&p<=h),s||!(o&n.A.RIGHT)||r&n.A.RIGHT||(m=_-(g-h)*f,s=m>=l&&m<=c),s||!(o&n.A.BELOW)||r&n.A.BELOW||(p=g-(_-l)/f,s=p>=a&&p<=h),s||!(o&n.A.LEFT)||r&n.A.LEFT||(m=_-(g-a)*f,s=m>=l&&m<=c)}return s}function B(t,e,i,n){if(G(t))return _(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r<n;++r)s.push(t[0]+e*r/n,t[1],t[2],t[1]+i*r/n,t[2]-e*r/n,t[3],t[0],t[3]-i*r/n)}else s=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(s,s,2);const r=[],o=[];for(let t=0,e=s.length;t<e;t+=2)r.push(s[t]),o.push(s[t+1]);return function(t,e,i){return g(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(r,o,i)}function j(t,e){const i=e.getExtent(),n=w(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=O(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function X(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];j(t,e);const s=O(n);if(O(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+s,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}},940:(t,e,i)=>{i.d(e,{A:()=>o});var n=i(4401),s=i(4087);class r{con