@mapcomponents/ra-geospatial 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -0
- package/dist/CHANGELOG.md +0 -0
- package/dist/{index-BYtSitNR.js → index-C46vlfqQ.js} +24 -4
- package/dist/{index-BYtSitNR.js.map → index-C46vlfqQ.js.map} +1 -1
- package/dist/{index-DD78QbMh.cjs → index-DuPAPsWa.cjs} +4 -4
- package/dist/{index-DD78QbMh.cjs.map → index-DuPAPsWa.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/{index.es-DBcuOIG0.js → index.es-BXasLBfG.js} +2 -2
- package/dist/{index.es-DBcuOIG0.js.map → index.es-BXasLBfG.js.map} +1 -1
- package/dist/{index.es-YxBXdzDQ.cjs → index.es-UgETSxCJ.cjs} +2 -2
- package/dist/{index.es-YxBXdzDQ.cjs.map → index.es-UgETSxCJ.cjs.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +2 -2
|
@@ -767,7 +767,7 @@ uniform ${G} ${X} u_${Y};
|
|
|
767
767
|
`),bt=nt.concat(yt.prelude.vertexSource,I.vertexSource,s.vertexSource).join(`
|
|
768
768
|
`);ao(G)||(dt=(function(Bt){return Bt.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(dt),bt=(function(Bt){return Bt.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})(bt));const rt=G.createShader(G.FRAGMENT_SHADER);if(G.isContextLost())return void(this.failedToCreate=!0);if(G.shaderSource(rt,dt),G.compileShader(rt),!G.getShaderParameter(rt,G.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${G.getShaderInfoLog(rt)}`);G.attachShader(this.program,rt);const At=G.createShader(G.VERTEX_SHADER);if(G.isContextLost())return void(this.failedToCreate=!0);if(G.shaderSource(At,bt),G.compileShader(At),!G.getShaderParameter(At,G.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${G.getShaderInfoLog(At)}`);G.attachShader(this.program,At),this.attributes={};const qt={};this.numAttributes=ie.length;for(let Bt=0;Bt<this.numAttributes;Bt++)ie[Bt]&&(G.bindAttribLocation(this.program,Bt,ie[Bt]),this.attributes[ie[Bt]]=Bt);if(G.linkProgram(this.program),!G.getProgramParameter(this.program,G.LINK_STATUS))throw new Error(`Program failed to link: ${G.getProgramInfoLog(this.program)}`);G.deleteShader(At),G.deleteShader(rt);for(let Bt=0;Bt<lt.length;Bt++){const zt=lt[Bt];if(zt&&!qt[zt]){const Vt=G.getUniformLocation(this.program,zt);Vt&&(qt[zt]=Vt)}}this.fixedUniforms=m(r,qt),this.terrainUniforms=((Bt,zt)=>({u_depth:new o.bO(Bt,zt.u_depth),u_terrain:new o.bO(Bt,zt.u_terrain),u_terrain_dim:new o.bf(Bt,zt.u_terrain_dim),u_terrain_matrix:new o.bQ(Bt,zt.u_terrain_matrix),u_terrain_unpack:new o.bR(Bt,zt.u_terrain_unpack),u_terrain_exaggeration:new o.bf(Bt,zt.u_terrain_exaggeration)}))(r,qt),this.projectionUniforms=((Bt,zt)=>({u_projection_matrix:new o.bQ(Bt,zt.u_projection_matrix),u_projection_tile_mercator_coords:new o.bR(Bt,zt.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bR(Bt,zt.u_projection_clipping_plane),u_projection_transition:new o.bf(Bt,zt.u_projection_transition),u_projection_fallback_matrix:new o.bQ(Bt,zt.u_projection_fallback_matrix)}))(r,qt),this.binderUniforms=p?p.getUniforms(r,qt):[]}draw(r,s,p,m,b,T,I,R,j,G,X,Y,ie,be,Ue,je,qe,Ke,lt){const nt=r.gl;if(this.failedToCreate)return;if(r.program.set(this.program),r.setDepthMode(p),r.setStencilMode(m),r.setColorMode(b),r.setCullFace(T),R){r.activeTexture.set(nt.TEXTURE2),nt.bindTexture(nt.TEXTURE_2D,R.depthTexture),r.activeTexture.set(nt.TEXTURE3),nt.bindTexture(nt.TEXTURE_2D,R.texture);for(const bt in this.terrainUniforms)this.terrainUniforms[bt].set(R[bt])}if(j)for(const bt in j)this.projectionUniforms[El[bt]].set(j[bt]);if(I)for(const bt in this.fixedUniforms)this.fixedUniforms[bt].set(I[bt]);je&&je.setUniforms(r,this.binderUniforms,be,{zoom:Ue});let dt=0;switch(s){case nt.LINES:dt=2;break;case nt.TRIANGLES:dt=3;break;case nt.LINE_STRIP:dt=1}for(const bt of ie.get()){const rt=bt.vaos||(bt.vaos={});(rt[G]||(rt[G]=new Sl)).bind(r,this,X,je?je.getPaintVertexBuffers():[],Y,bt.vertexOffset,qe,Ke,lt),nt.drawElements(s,bt.primitiveLength*dt,nt.UNSIGNED_SHORT,bt.primitiveOffset*dt*2)}}}function Us(_,r,s){const p=1/o.aB(s,1,r.transform.tileZoom),m=Math.pow(2,s.tileID.overscaledZ),b=s.tileSize*Math.pow(2,r.transform.tileZoom)/m,T=b*(s.tileID.canonical.x+s.tileID.wrap*m),I=b*s.tileID.canonical.y;return{u_image:0,u_texsize:s.imageAtlasTexture.size,u_scale:[p,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[T>>16,I>>16],u_pixel_coord_lower:[65535&T,65535&I]}}const La=(_,r,s,p)=>{const m=_.style.light,b=m.properties.get("position"),T=[b.x,b.y,b.z],I=o.bU();m.properties.get("anchor")==="viewport"&&o.bV(I,_.transform.bearingInRadians),o.bW(T,T,I);const R=_.transform.transformLightDirection(T),j=m.properties.get("color");return{u_lightpos:T,u_lightpos_globe:R,u_lightintensity:m.properties.get("intensity"),u_lightcolor:[j.r,j.g,j.b],u_vertical_gradient:+r,u_opacity:s,u_fill_translate:p}},Xi=(_,r,s,p,m,b,T)=>o.e(La(_,r,s,p),Us(b,_,T),{u_height_factor:-Math.pow(2,m.overscaledZ)/T.tileSize/8}),Lo=(_,r,s,p)=>o.e(Us(r,_,s),{u_fill_translate:p}),Ai=(_,r)=>({u_world:_,u_fill_translate:r}),$a=(_,r,s,p,m)=>o.e(Lo(_,r,s,m),{u_world:p}),xs=(_,r,s,p,m)=>{const b=_.transform;let T,I,R=0;if(s.paint.get("circle-pitch-alignment")==="map"){const j=o.aB(r,1,b.zoom);T=!0,I=[j,j],R=j/(o.$*Math.pow(2,r.tileID.overscaledZ))*2*Math.PI*m}else T=!1,I=b.pixelsToGLUnits;return{u_camera_to_center_distance:b.cameraToCenterDistance,u_scale_with_map:+(s.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+T,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:I,u_globe_extrude_scale:R,u_translate:p}},Pi=_=>({u_pixel_extrude_scale:[1/_.width,1/_.height]}),tl=_=>({u_viewport_size:[_.width,_.height]}),ws=(_,r=1)=>({u_color:_,u_overlay:0,u_overlay_scale:r}),Va=(_,r,s,p)=>{const m=o.aB(_,1,r)/(o.$*Math.pow(2,_.tileID.overscaledZ))*2*Math.PI*p;return{u_extrude_scale:o.aB(_,1,r),u_intensity:s,u_globe_extrude_scale:m}},so=(_,r,s,p)=>{const m=o.L();o.bX(m,0,_.width,_.height,0,0,1);const b=_.context.gl;return{u_matrix:m,u_world:[b.drawingBufferWidth,b.drawingBufferHeight],u_image:s,u_color_ramp:p,u_opacity:r.paint.get("heatmap-opacity")}},Do=(_,r,s)=>{const p=s.paint.get("hillshade-accent-color");let m;switch(s.paint.get("hillshade-method")){case"basic":m=4;break;case"combined":m=1;break;case"igor":m=2;break;case"multidirectional":m=3;break;default:m=0}const b=s.getIlluminationProperties();for(let T=0;T<b.directionRadians.length;T++)s.paint.get("hillshade-illumination-anchor")==="viewport"&&(b.directionRadians[T]+=_.transform.bearingInRadians);return{u_image:0,u_latrange:Gl(0,r.tileID),u_exaggeration:s.paint.get("hillshade-exaggeration"),u_altitudes:b.altitudeRadians,u_azimuths:b.directionRadians,u_accent:p,u_method:m,u_highlights:b.highlightColor,u_shadows:b.shadowColor}},iu=(_,r)=>{const s=r.stride,p=o.L();return o.bX(p,0,o.$,-8192,0,0,1),o.M(p,p,[0,-8192,0]),{u_matrix:p,u_image:1,u_dimension:[s,s],u_zoom:_.overscaledZ,u_unpack:r.getUnpackVector()}};function Gl(_,r){const s=Math.pow(2,r.canonical.z),p=r.canonical.y;return[new o.a0(0,p/s).toLngLat().lat,new o.a0(0,(p+1)/s).toLngLat().lat]}const qs=(_,r)=>({u_image:0,u_unpack:r.getUnpackVector(),u_dimension:[r.stride,r.stride],u_elevation_stops:1,u_color_stops:4,u_opacity:_.paint.get("color-relief-opacity")}),Ss=(_,r,s,p)=>{const m=_.transform;return{u_translation:Es(_,r,s),u_ratio:p/o.aB(r,1,m.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/m.pixelsToGLUnits[0],1/m.pixelsToGLUnits[1]]}},xo=(_,r,s,p,m)=>o.e(Ss(_,r,s,p),{u_image:0,u_image_height:m}),mo=(_,r,s,p,m)=>{const b=_.transform,T=wo(r,b);return{u_translation:Es(_,r,s),u_texsize:r.imageAtlasTexture.size,u_ratio:p/o.aB(r,1,b.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[T,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},rl=(_,r,s,p,m,b)=>{const T=_.lineAtlas,I=wo(r,_.transform),R=s.layout.get("line-cap")==="round",j=T.getDash(m.from,R),G=T.getDash(m.to,R),X=j.width*b.fromScale,Y=G.width*b.toScale;return o.e(Ss(_,r,s,p),{u_patternscale_a:[I/X,-j.height/2],u_patternscale_b:[I/Y,-G.height/2],u_sdfgamma:T.width/(256*Math.min(X,Y)*_.pixelRatio)/2,u_image:0,u_tex_y_a:j.y,u_tex_y_b:G.y,u_mix:b.t})};function wo(_,r){return 1/o.aB(_,1,r.tileZoom)}function Es(_,r,s){return o.aC(_.transform,r,s.paint.get("line-translate"),s.paint.get("line-translate-anchor"))}const Uo=(_,r,s,p,m)=>{return{u_tl_parent:_,u_scale_parent:r,u_buffer_scale:1,u_fade_t:s.mix,u_opacity:s.opacity*p.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:p.paint.get("raster-brightness-min"),u_brightness_high:p.paint.get("raster-brightness-max"),u_saturation_factor:(T=p.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(b=p.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:Ts(p.paint.get("raster-hue-rotate")),u_coords_top:[m[0].x,m[0].y,m[1].x,m[1].y],u_coords_bottom:[m[3].x,m[3].y,m[2].x,m[2].y]};var b,T};function Ts(_){_*=Math.PI/180;const r=Math.sin(_),s=Math.cos(_);return[(2*s+1)/3,(-Math.sqrt(3)*r-s+1)/3,(Math.sqrt(3)*r-s+1)/3]}const $i=(_,r,s,p,m,b,T,I,R,j,G,X,Y)=>{const ie=T.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:r?r.uSizeT:0,u_size:r?r.uSize:0,u_camera_to_center_distance:ie.cameraToCenterDistance,u_pitch:ie.pitch/360*2*Math.PI,u_rotate_symbol:+s,u_aspect_ratio:ie.width/ie.height,u_fade_change:T.options.fadeDuration?T.symbolFadeChange:1,u_label_plane_matrix:I,u_coord_matrix:R,u_is_text:+G,u_pitch_with_map:+p,u_is_along_line:m,u_is_variable_anchor:b,u_texsize:X,u_texture:0,u_translation:j,u_pitched_scale:Y}},ns=(_,r,s,p,m,b,T,I,R,j,G,X,Y,ie)=>{const be=T.transform;return o.e($i(_,r,s,p,m,b,T,I,R,j,G,X,ie),{u_gamma_scale:p?Math.cos(be.pitch*Math.PI/180)*be.cameraToCenterDistance:1,u_device_pixel_ratio:T.pixelRatio,u_is_halo:1})},Ga=(_,r,s,p,m,b,T,I,R,j,G,X,Y)=>o.e(ns(_,r,s,p,m,b,T,I,R,j,!0,G,0,Y),{u_texsize_icon:X,u_texture_icon:1}),ga=(_,r)=>({u_opacity:_,u_color:r}),Tl=(_,r,s,p,m)=>o.e((function(b,T,I,R){const j=I.imageManager.getPattern(b.from.toString()),G=I.imageManager.getPattern(b.to.toString()),{width:X,height:Y}=I.imageManager.getPixelSize(),ie=Math.pow(2,R.tileID.overscaledZ),be=R.tileSize*Math.pow(2,I.transform.tileZoom)/ie,Ue=be*(R.tileID.canonical.x+R.tileID.wrap*ie),je=be*R.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:j.tl,u_pattern_br_a:j.br,u_pattern_tl_b:G.tl,u_pattern_br_b:G.br,u_texsize:[X,Y],u_mix:T.t,u_pattern_size_a:j.displaySize,u_pattern_size_b:G.displaySize,u_scale_a:T.fromScale,u_scale_b:T.toScale,u_tile_units_to_pixels:1/o.aB(R,1,I.transform.tileZoom),u_pixel_coord_upper:[Ue>>16,je>>16],u_pixel_coord_lower:[65535&Ue,65535&je]}})(s,m,r,p),{u_opacity:_}),Cl=(_,r)=>{},is={fillExtrusion:(_,r)=>({u_lightpos:new o.bS(_,r.u_lightpos),u_lightpos_globe:new o.bS(_,r.u_lightpos_globe),u_lightintensity:new o.bf(_,r.u_lightintensity),u_lightcolor:new o.bS(_,r.u_lightcolor),u_vertical_gradient:new o.bf(_,r.u_vertical_gradient),u_opacity:new o.bf(_,r.u_opacity),u_fill_translate:new o.bT(_,r.u_fill_translate)}),fillExtrusionPattern:(_,r)=>({u_lightpos:new o.bS(_,r.u_lightpos),u_lightpos_globe:new o.bS(_,r.u_lightpos_globe),u_lightintensity:new o.bf(_,r.u_lightintensity),u_lightcolor:new o.bS(_,r.u_lightcolor),u_vertical_gradient:new o.bf(_,r.u_vertical_gradient),u_height_factor:new o.bf(_,r.u_height_factor),u_opacity:new o.bf(_,r.u_opacity),u_fill_translate:new o.bT(_,r.u_fill_translate),u_image:new o.bO(_,r.u_image),u_texsize:new o.bT(_,r.u_texsize),u_pixel_coord_upper:new o.bT(_,r.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,r.u_pixel_coord_lower),u_scale:new o.bS(_,r.u_scale),u_fade:new o.bf(_,r.u_fade)}),fill:(_,r)=>({u_fill_translate:new o.bT(_,r.u_fill_translate)}),fillPattern:(_,r)=>({u_image:new o.bO(_,r.u_image),u_texsize:new o.bT(_,r.u_texsize),u_pixel_coord_upper:new o.bT(_,r.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,r.u_pixel_coord_lower),u_scale:new o.bS(_,r.u_scale),u_fade:new o.bf(_,r.u_fade),u_fill_translate:new o.bT(_,r.u_fill_translate)}),fillOutline:(_,r)=>({u_world:new o.bT(_,r.u_world),u_fill_translate:new o.bT(_,r.u_fill_translate)}),fillOutlinePattern:(_,r)=>({u_world:new o.bT(_,r.u_world),u_image:new o.bO(_,r.u_image),u_texsize:new o.bT(_,r.u_texsize),u_pixel_coord_upper:new o.bT(_,r.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,r.u_pixel_coord_lower),u_scale:new o.bS(_,r.u_scale),u_fade:new o.bf(_,r.u_fade),u_fill_translate:new o.bT(_,r.u_fill_translate)}),circle:(_,r)=>({u_camera_to_center_distance:new o.bf(_,r.u_camera_to_center_distance),u_scale_with_map:new o.bO(_,r.u_scale_with_map),u_pitch_with_map:new o.bO(_,r.u_pitch_with_map),u_extrude_scale:new o.bT(_,r.u_extrude_scale),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_globe_extrude_scale:new o.bf(_,r.u_globe_extrude_scale),u_translate:new o.bT(_,r.u_translate)}),collisionBox:(_,r)=>({u_pixel_extrude_scale:new o.bT(_,r.u_pixel_extrude_scale)}),collisionCircle:(_,r)=>({u_viewport_size:new o.bT(_,r.u_viewport_size)}),debug:(_,r)=>({u_color:new o.bP(_,r.u_color),u_overlay:new o.bO(_,r.u_overlay),u_overlay_scale:new o.bf(_,r.u_overlay_scale)}),depth:Cl,clippingMask:Cl,heatmap:(_,r)=>({u_extrude_scale:new o.bf(_,r.u_extrude_scale),u_intensity:new o.bf(_,r.u_intensity),u_globe_extrude_scale:new o.bf(_,r.u_globe_extrude_scale)}),heatmapTexture:(_,r)=>({u_matrix:new o.bQ(_,r.u_matrix),u_world:new o.bT(_,r.u_world),u_image:new o.bO(_,r.u_image),u_color_ramp:new o.bO(_,r.u_color_ramp),u_opacity:new o.bf(_,r.u_opacity)}),hillshade:(_,r)=>({u_image:new o.bO(_,r.u_image),u_latrange:new o.bT(_,r.u_latrange),u_exaggeration:new o.bf(_,r.u_exaggeration),u_altitudes:new o.bZ(_,r.u_altitudes),u_azimuths:new o.bZ(_,r.u_azimuths),u_accent:new o.bP(_,r.u_accent),u_method:new o.bO(_,r.u_method),u_shadows:new o.bY(_,r.u_shadows),u_highlights:new o.bY(_,r.u_highlights)}),hillshadePrepare:(_,r)=>({u_matrix:new o.bQ(_,r.u_matrix),u_image:new o.bO(_,r.u_image),u_dimension:new o.bT(_,r.u_dimension),u_zoom:new o.bf(_,r.u_zoom),u_unpack:new o.bR(_,r.u_unpack)}),colorRelief:(_,r)=>({u_image:new o.bO(_,r.u_image),u_unpack:new o.bR(_,r.u_unpack),u_dimension:new o.bT(_,r.u_dimension),u_elevation_stops:new o.bO(_,r.u_elevation_stops),u_color_stops:new o.bO(_,r.u_color_stops),u_opacity:new o.bf(_,r.u_opacity)}),line:(_,r)=>({u_translation:new o.bT(_,r.u_translation),u_ratio:new o.bf(_,r.u_ratio),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,r.u_units_to_pixels)}),lineGradient:(_,r)=>({u_translation:new o.bT(_,r.u_translation),u_ratio:new o.bf(_,r.u_ratio),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,r.u_units_to_pixels),u_image:new o.bO(_,r.u_image),u_image_height:new o.bf(_,r.u_image_height)}),linePattern:(_,r)=>({u_translation:new o.bT(_,r.u_translation),u_texsize:new o.bT(_,r.u_texsize),u_ratio:new o.bf(_,r.u_ratio),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_image:new o.bO(_,r.u_image),u_units_to_pixels:new o.bT(_,r.u_units_to_pixels),u_scale:new o.bS(_,r.u_scale),u_fade:new o.bf(_,r.u_fade)}),lineSDF:(_,r)=>({u_translation:new o.bT(_,r.u_translation),u_ratio:new o.bf(_,r.u_ratio),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_units_to_pixels:new o.bT(_,r.u_units_to_pixels),u_patternscale_a:new o.bT(_,r.u_patternscale_a),u_patternscale_b:new o.bT(_,r.u_patternscale_b),u_sdfgamma:new o.bf(_,r.u_sdfgamma),u_image:new o.bO(_,r.u_image),u_tex_y_a:new o.bf(_,r.u_tex_y_a),u_tex_y_b:new o.bf(_,r.u_tex_y_b),u_mix:new o.bf(_,r.u_mix)}),raster:(_,r)=>({u_tl_parent:new o.bT(_,r.u_tl_parent),u_scale_parent:new o.bf(_,r.u_scale_parent),u_buffer_scale:new o.bf(_,r.u_buffer_scale),u_fade_t:new o.bf(_,r.u_fade_t),u_opacity:new o.bf(_,r.u_opacity),u_image0:new o.bO(_,r.u_image0),u_image1:new o.bO(_,r.u_image1),u_brightness_low:new o.bf(_,r.u_brightness_low),u_brightness_high:new o.bf(_,r.u_brightness_high),u_saturation_factor:new o.bf(_,r.u_saturation_factor),u_contrast_factor:new o.bf(_,r.u_contrast_factor),u_spin_weights:new o.bS(_,r.u_spin_weights),u_coords_top:new o.bR(_,r.u_coords_top),u_coords_bottom:new o.bR(_,r.u_coords_bottom)}),symbolIcon:(_,r)=>({u_is_size_zoom_constant:new o.bO(_,r.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,r.u_is_size_feature_constant),u_size_t:new o.bf(_,r.u_size_t),u_size:new o.bf(_,r.u_size),u_camera_to_center_distance:new o.bf(_,r.u_camera_to_center_distance),u_pitch:new o.bf(_,r.u_pitch),u_rotate_symbol:new o.bO(_,r.u_rotate_symbol),u_aspect_ratio:new o.bf(_,r.u_aspect_ratio),u_fade_change:new o.bf(_,r.u_fade_change),u_label_plane_matrix:new o.bQ(_,r.u_label_plane_matrix),u_coord_matrix:new o.bQ(_,r.u_coord_matrix),u_is_text:new o.bO(_,r.u_is_text),u_pitch_with_map:new o.bO(_,r.u_pitch_with_map),u_is_along_line:new o.bO(_,r.u_is_along_line),u_is_variable_anchor:new o.bO(_,r.u_is_variable_anchor),u_texsize:new o.bT(_,r.u_texsize),u_texture:new o.bO(_,r.u_texture),u_translation:new o.bT(_,r.u_translation),u_pitched_scale:new o.bf(_,r.u_pitched_scale)}),symbolSDF:(_,r)=>({u_is_size_zoom_constant:new o.bO(_,r.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,r.u_is_size_feature_constant),u_size_t:new o.bf(_,r.u_size_t),u_size:new o.bf(_,r.u_size),u_camera_to_center_distance:new o.bf(_,r.u_camera_to_center_distance),u_pitch:new o.bf(_,r.u_pitch),u_rotate_symbol:new o.bO(_,r.u_rotate_symbol),u_aspect_ratio:new o.bf(_,r.u_aspect_ratio),u_fade_change:new o.bf(_,r.u_fade_change),u_label_plane_matrix:new o.bQ(_,r.u_label_plane_matrix),u_coord_matrix:new o.bQ(_,r.u_coord_matrix),u_is_text:new o.bO(_,r.u_is_text),u_pitch_with_map:new o.bO(_,r.u_pitch_with_map),u_is_along_line:new o.bO(_,r.u_is_along_line),u_is_variable_anchor:new o.bO(_,r.u_is_variable_anchor),u_texsize:new o.bT(_,r.u_texsize),u_texture:new o.bO(_,r.u_texture),u_gamma_scale:new o.bf(_,r.u_gamma_scale),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_is_halo:new o.bO(_,r.u_is_halo),u_translation:new o.bT(_,r.u_translation),u_pitched_scale:new o.bf(_,r.u_pitched_scale)}),symbolTextAndIcon:(_,r)=>({u_is_size_zoom_constant:new o.bO(_,r.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bO(_,r.u_is_size_feature_constant),u_size_t:new o.bf(_,r.u_size_t),u_size:new o.bf(_,r.u_size),u_camera_to_center_distance:new o.bf(_,r.u_camera_to_center_distance),u_pitch:new o.bf(_,r.u_pitch),u_rotate_symbol:new o.bO(_,r.u_rotate_symbol),u_aspect_ratio:new o.bf(_,r.u_aspect_ratio),u_fade_change:new o.bf(_,r.u_fade_change),u_label_plane_matrix:new o.bQ(_,r.u_label_plane_matrix),u_coord_matrix:new o.bQ(_,r.u_coord_matrix),u_is_text:new o.bO(_,r.u_is_text),u_pitch_with_map:new o.bO(_,r.u_pitch_with_map),u_is_along_line:new o.bO(_,r.u_is_along_line),u_is_variable_anchor:new o.bO(_,r.u_is_variable_anchor),u_texsize:new o.bT(_,r.u_texsize),u_texsize_icon:new o.bT(_,r.u_texsize_icon),u_texture:new o.bO(_,r.u_texture),u_texture_icon:new o.bO(_,r.u_texture_icon),u_gamma_scale:new o.bf(_,r.u_gamma_scale),u_device_pixel_ratio:new o.bf(_,r.u_device_pixel_ratio),u_is_halo:new o.bO(_,r.u_is_halo),u_translation:new o.bT(_,r.u_translation),u_pitched_scale:new o.bf(_,r.u_pitched_scale)}),background:(_,r)=>({u_opacity:new o.bf(_,r.u_opacity),u_color:new o.bP(_,r.u_color)}),backgroundPattern:(_,r)=>({u_opacity:new o.bf(_,r.u_opacity),u_image:new o.bO(_,r.u_image),u_pattern_tl_a:new o.bT(_,r.u_pattern_tl_a),u_pattern_br_a:new o.bT(_,r.u_pattern_br_a),u_pattern_tl_b:new o.bT(_,r.u_pattern_tl_b),u_pattern_br_b:new o.bT(_,r.u_pattern_br_b),u_texsize:new o.bT(_,r.u_texsize),u_mix:new o.bf(_,r.u_mix),u_pattern_size_a:new o.bT(_,r.u_pattern_size_a),u_pattern_size_b:new o.bT(_,r.u_pattern_size_b),u_scale_a:new o.bf(_,r.u_scale_a),u_scale_b:new o.bf(_,r.u_scale_b),u_pixel_coord_upper:new o.bT(_,r.u_pixel_coord_upper),u_pixel_coord_lower:new o.bT(_,r.u_pixel_coord_lower),u_tile_units_to_pixels:new o.bf(_,r.u_tile_units_to_pixels)}),terrain:(_,r)=>({u_texture:new o.bO(_,r.u_texture),u_ele_delta:new o.bf(_,r.u_ele_delta),u_fog_matrix:new o.bQ(_,r.u_fog_matrix),u_fog_color:new o.bP(_,r.u_fog_color),u_fog_ground_blend:new o.bf(_,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new o.bf(_,r.u_fog_ground_blend_opacity),u_horizon_color:new o.bP(_,r.u_horizon_color),u_horizon_fog_blend:new o.bf(_,r.u_horizon_fog_blend),u_is_globe_mode:new o.bf(_,r.u_is_globe_mode)}),terrainDepth:(_,r)=>({u_ele_delta:new o.bf(_,r.u_ele_delta)}),terrainCoords:(_,r)=>({u_texture:new o.bO(_,r.u_texture),u_terrain_coords_id:new o.bf(_,r.u_terrain_coords_id),u_ele_delta:new o.bf(_,r.u_ele_delta)}),projectionErrorMeasurement:(_,r)=>({u_input:new o.bf(_,r.u_input),u_output_expected:new o.bf(_,r.u_output_expected)}),atmosphere:(_,r)=>({u_sun_pos:new o.bS(_,r.u_sun_pos),u_atmosphere_blend:new o.bf(_,r.u_atmosphere_blend),u_globe_position:new o.bS(_,r.u_globe_position),u_globe_radius:new o.bf(_,r.u_globe_radius),u_inv_proj_matrix:new o.bQ(_,r.u_inv_proj_matrix)}),sky:(_,r)=>({u_sky_color:new o.bP(_,r.u_sky_color),u_horizon_color:new o.bP(_,r.u_horizon_color),u_horizon:new o.bT(_,r.u_horizon),u_horizon_normal:new o.bT(_,r.u_horizon_normal),u_sky_horizon_blend:new o.bf(_,r.u_sky_horizon_blend),u_sky_blend:new o.bf(_,r.u_sky_blend)})};class nl{constructor(r,s,p){this.context=r;const m=r.gl;this.buffer=m.createBuffer(),this.dynamicDraw=!!p,this.context.unbindVAO(),r.bindElementBuffer.set(this.buffer),m.bufferData(m.ELEMENT_ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?m.DYNAMIC_DRAW:m.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(r){const s=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),s.bufferSubData(s.ELEMENT_ARRAY_BUFFER,0,r.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const il={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Mt{constructor(r,s,p,m){this.length=s.length,this.attributes=p,this.itemSize=s.bytesPerElement,this.dynamicDraw=m,this.context=r;const b=r.gl;this.buffer=b.createBuffer(),r.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,s.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete s.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(r){if(r.length!==this.length)throw new Error(`Length of new data is ${r.length}, which doesn't match current length of ${this.length}`);const s=this.context.gl;this.bind(),s.bufferSubData(s.ARRAY_BUFFER,0,r.arrayBuffer)}enableAttributes(r,s){for(let p=0;p<this.attributes.length;p++){const m=s.attributes[this.attributes[p].name];m!==void 0&&r.enableVertexAttribArray(m)}}setVertexAttribPointers(r,s,p){for(let m=0;m<this.attributes.length;m++){const b=this.attributes[m],T=s.attributes[b.name];T!==void 0&&r.vertexAttribPointer(T,b.components,r[il[b.type]],!1,this.itemSize,b.offset+this.itemSize*(p||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Nt{constructor(r){this.gl=r.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(r){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Rr extends Nt{getDefault(){return o.be.transparent}set(r){const s=this.current;(r.r!==s.r||r.g!==s.g||r.b!==s.b||r.a!==s.a||this.dirty)&&(this.gl.clearColor(r.r,r.g,r.b,r.a),this.current=r,this.dirty=!1)}}class Hr extends Nt{getDefault(){return 1}set(r){(r!==this.current||this.dirty)&&(this.gl.clearDepth(r),this.current=r,this.dirty=!1)}}class Vn extends Nt{getDefault(){return 0}set(r){(r!==this.current||this.dirty)&&(this.gl.clearStencil(r),this.current=r,this.dirty=!1)}}class on extends Nt{getDefault(){return[!0,!0,!0,!0]}set(r){const s=this.current;(r[0]!==s[0]||r[1]!==s[1]||r[2]!==s[2]||r[3]!==s[3]||this.dirty)&&(this.gl.colorMask(r[0],r[1],r[2],r[3]),this.current=r,this.dirty=!1)}}class In extends Nt{getDefault(){return!0}set(r){(r!==this.current||this.dirty)&&(this.gl.depthMask(r),this.current=r,this.dirty=!1)}}class Bn extends Nt{getDefault(){return 255}set(r){(r!==this.current||this.dirty)&&(this.gl.stencilMask(r),this.current=r,this.dirty=!1)}}class si extends Nt{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(r){const s=this.current;(r.func!==s.func||r.ref!==s.ref||r.mask!==s.mask||this.dirty)&&(this.gl.stencilFunc(r.func,r.ref,r.mask),this.current=r,this.dirty=!1)}}class li extends Nt{getDefault(){const r=this.gl;return[r.KEEP,r.KEEP,r.KEEP]}set(r){const s=this.current;(r[0]!==s[0]||r[1]!==s[1]||r[2]!==s[2]||this.dirty)&&(this.gl.stencilOp(r[0],r[1],r[2]),this.current=r,this.dirty=!1)}}class Ii extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;r?s.enable(s.STENCIL_TEST):s.disable(s.STENCIL_TEST),this.current=r,this.dirty=!1}}class So extends Nt{getDefault(){return[0,1]}set(r){const s=this.current;(r[0]!==s[0]||r[1]!==s[1]||this.dirty)&&(this.gl.depthRange(r[0],r[1]),this.current=r,this.dirty=!1)}}class Da extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;r?s.enable(s.DEPTH_TEST):s.disable(s.DEPTH_TEST),this.current=r,this.dirty=!1}}class Xo extends Nt{getDefault(){return this.gl.LESS}set(r){(r!==this.current||this.dirty)&&(this.gl.depthFunc(r),this.current=r,this.dirty=!1)}}class Cs extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;r?s.enable(s.BLEND):s.disable(s.BLEND),this.current=r,this.dirty=!1}}class ol extends Nt{getDefault(){const r=this.gl;return[r.ONE,r.ZERO]}set(r){const s=this.current;(r[0]!==s[0]||r[1]!==s[1]||this.dirty)&&(this.gl.blendFunc(r[0],r[1]),this.current=r,this.dirty=!1)}}class ou extends Nt{getDefault(){return o.be.transparent}set(r){const s=this.current;(r.r!==s.r||r.g!==s.g||r.b!==s.b||r.a!==s.a||this.dirty)&&(this.gl.blendColor(r.r,r.g,r.b,r.a),this.current=r,this.dirty=!1)}}class al extends Nt{getDefault(){return this.gl.FUNC_ADD}set(r){(r!==this.current||this.dirty)&&(this.gl.blendEquation(r),this.current=r,this.dirty=!1)}}class $s extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;r?s.enable(s.CULL_FACE):s.disable(s.CULL_FACE),this.current=r,this.dirty=!1}}class Hl extends Nt{getDefault(){return this.gl.BACK}set(r){(r!==this.current||this.dirty)&&(this.gl.cullFace(r),this.current=r,this.dirty=!1)}}class au extends Nt{getDefault(){return this.gl.CCW}set(r){(r!==this.current||this.dirty)&&(this.gl.frontFace(r),this.current=r,this.dirty=!1)}}class Pu extends Nt{getDefault(){return null}set(r){(r!==this.current||this.dirty)&&(this.gl.useProgram(r),this.current=r,this.dirty=!1)}}class ri extends Nt{getDefault(){return this.gl.TEXTURE0}set(r){(r!==this.current||this.dirty)&&(this.gl.activeTexture(r),this.current=r,this.dirty=!1)}}class ni extends Nt{getDefault(){const r=this.gl;return[0,0,r.drawingBufferWidth,r.drawingBufferHeight]}set(r){const s=this.current;(r[0]!==s[0]||r[1]!==s[1]||r[2]!==s[2]||r[3]!==s[3]||this.dirty)&&(this.gl.viewport(r[0],r[1],r[2],r[3]),this.current=r,this.dirty=!1)}}class As extends Nt{getDefault(){return null}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.bindFramebuffer(s.FRAMEBUFFER,r),this.current=r,this.dirty=!1}}class Vi extends Nt{getDefault(){return null}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.bindRenderbuffer(s.RENDERBUFFER,r),this.current=r,this.dirty=!1}}class su extends Nt{getDefault(){return null}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.bindTexture(s.TEXTURE_2D,r),this.current=r,this.dirty=!1}}class ya extends Nt{getDefault(){return null}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,r),this.current=r,this.dirty=!1}}class Ha extends Nt{getDefault(){return null}set(r){const s=this.gl;s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,r),this.current=r,this.dirty=!1}}class oa extends Nt{getDefault(){return null}set(r){var s;if(r===this.current&&!this.dirty)return;const p=this.gl;ao(p)?p.bindVertexArray(r):(s=p.getExtension("OES_vertex_array_object"))===null||s===void 0||s.bindVertexArrayOES(r),this.current=r,this.dirty=!1}}class Vs extends Nt{getDefault(){return 4}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_ALIGNMENT,r),this.current=r,this.dirty=!1}}class sl extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r),this.current=r,this.dirty=!1}}class os extends Nt{getDefault(){return!1}set(r){if(r===this.current&&!this.dirty)return;const s=this.gl;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,r),this.current=r,this.dirty=!1}}class ka extends Nt{constructor(r,s){super(r),this.context=r,this.parent=s}getDefault(){return null}}class lu extends ka{setDirty(){this.dirty=!0}set(r){if(r===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,r,0),this.current=r,this.dirty=!1}}class Wa extends ka{set(r){if(r===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.RENDERBUFFER,r),this.current=r,this.dirty=!1}}class go extends ka{set(r){if(r===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const s=this.gl;s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,r),this.current=r,this.dirty=!1}}const qo="Framebuffer is not complete";class Gs{constructor(r,s,p,m,b){this.context=r,this.width=s,this.height=p;const T=r.gl,I=this.framebuffer=T.createFramebuffer();if(this.colorAttachment=new lu(r,I),m)this.depthAttachment=b?new go(r,I):new Wa(r,I);else if(b)throw new Error("Stencil cannot be set without depth");if(T.checkFramebufferStatus(T.FRAMEBUFFER)!==T.FRAMEBUFFER_COMPLETE)throw new Error(qo)}destroy(){const r=this.context.gl,s=this.colorAttachment.get();if(s&&r.deleteTexture(s),this.depthAttachment){const p=this.depthAttachment.get();p&&r.deleteRenderbuffer(p)}r.deleteFramebuffer(this.framebuffer)}}class Dn{constructor(r){var s,p;if(this.gl=r,this.clearColor=new Rr(this),this.clearDepth=new Hr(this),this.clearStencil=new Vn(this),this.colorMask=new on(this),this.depthMask=new In(this),this.stencilMask=new Bn(this),this.stencilFunc=new si(this),this.stencilOp=new li(this),this.stencilTest=new Ii(this),this.depthRange=new So(this),this.depthTest=new Da(this),this.depthFunc=new Xo(this),this.blend=new Cs(this),this.blendFunc=new ol(this),this.blendColor=new ou(this),this.blendEquation=new al(this),this.cullFace=new $s(this),this.cullFaceSide=new Hl(this),this.frontFace=new au(this),this.program=new Pu(this),this.activeTexture=new ri(this),this.viewport=new ni(this),this.bindFramebuffer=new As(this),this.bindRenderbuffer=new Vi(this),this.bindTexture=new su(this),this.bindVertexBuffer=new ya(this),this.bindElementBuffer=new Ha(this),this.bindVertexArray=new oa(this),this.pixelStoreUnpack=new Vs(this),this.pixelStoreUnpackPremultiplyAlpha=new sl(this),this.pixelStoreUnpackFlipY=new os(this),this.extTextureFilterAnisotropic=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=r.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),ao(r)){this.HALF_FLOAT=r.HALF_FLOAT;const m=r.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(s=r.RGBA16F)!==null&&s!==void 0?s:m?.RGBA16F_EXT,this.RGB16F=(p=r.RGB16F)!==null&&p!==void 0?p:m?.RGB16F_EXT,r.getExtension("EXT_color_buffer_float")}else{r.getExtension("EXT_color_buffer_half_float"),r.getExtension("OES_texture_half_float_linear");const m=r.getExtension("OES_texture_half_float");this.HALF_FLOAT=m?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(r,s){return new nl(this,r,s)}createVertexBuffer(r,s,p){return new Mt(this,r,s,p)}createRenderbuffer(r,s,p){const m=this.gl,b=m.createRenderbuffer();return this.bindRenderbuffer.set(b),m.renderbufferStorage(m.RENDERBUFFER,r,s,p),this.bindRenderbuffer.set(null),b}createFramebuffer(r,s,p,m){return new Gs(this,r,s,p,m)}clear({color:r,depth:s,stencil:p}){const m=this.gl;let b=0;r&&(b|=m.COLOR_BUFFER_BIT,this.clearColor.set(r),this.colorMask.set([!0,!0,!0,!0])),s!==void 0&&(b|=m.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(s),this.depthMask.set(!0)),p!==void 0&&(b|=m.STENCIL_BUFFER_BIT,this.clearStencil.set(p),this.stencilMask.set(255)),m.clear(b)}setCullFace(r){r.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(r.mode),this.frontFace.set(r.frontFace))}setDepthMode(r){r.func!==this.gl.ALWAYS||r.mask?(this.depthTest.set(!0),this.depthFunc.set(r.func),this.depthMask.set(r.mask),this.depthRange.set(r.range)):this.depthTest.set(!1)}setStencilMode(r){r.test.func!==this.gl.ALWAYS||r.mask?(this.stencilTest.set(!0),this.stencilMask.set(r.mask),this.stencilOp.set([r.fail,r.depthFail,r.pass]),this.stencilFunc.set({func:r.test.func,ref:r.ref,mask:r.test.mask})):this.stencilTest.set(!1)}setColorMode(r){o.bG(r.blendFunction,rn.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(r.blendFunction),this.blendColor.set(r.blendColor)),this.colorMask.set(r.mask)}createVertexArray(){var r;return ao(this.gl)?this.gl.createVertexArray():(r=this.gl.getExtension("OES_vertex_array_object"))===null||r===void 0?void 0:r.createVertexArrayOES()}deleteVertexArray(r){var s;return ao(this.gl)?this.gl.deleteVertexArray(r):(s=this.gl.getExtension("OES_vertex_array_object"))===null||s===void 0?void 0:s.deleteVertexArrayOES(r)}unbindVAO(){this.bindVertexArray.set(null)}}let as;function ll(_,r,s,p,m){const b=_.context,T=_.transform,I=b.gl,R=_.useProgram("collisionBox"),j=[];let G=0,X=0;for(let qe=0;qe<p.length;qe++){const Ke=p[qe],lt=r.getTile(Ke).getBucket(s);if(!lt)continue;const nt=m?lt.textCollisionBox:lt.iconCollisionBox,dt=lt.collisionCircleArray;dt.length>0&&(j.push({circleArray:dt,circleOffset:X,coord:Ke}),G+=dt.length/4,X=G),nt&&R.draw(b,I.LINES,pn.disabled,cn.disabled,_.colorModeForRenderPass(),En.disabled,Pi(_.transform),_.style.map.terrain&&_.style.map.terrain.getTerrainData(Ke),T.getProjectionData({overscaledTileID:Ke,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),s.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,null,_.transform.zoom,null,null,nt.collisionVertexBuffer)}if(!m||!j.length)return;const Y=_.useProgram("collisionCircle"),ie=new o.b_;ie.resize(4*G),ie._trim();let be=0;for(const qe of j)for(let Ke=0;Ke<qe.circleArray.length/4;Ke++){const lt=4*Ke,nt=qe.circleArray[lt+0],dt=qe.circleArray[lt+1],bt=qe.circleArray[lt+2],rt=qe.circleArray[lt+3];ie.emplace(be++,nt,dt,bt,rt,0),ie.emplace(be++,nt,dt,bt,rt,1),ie.emplace(be++,nt,dt,bt,rt,2),ie.emplace(be++,nt,dt,bt,rt,3)}(!as||as.length<2*G)&&(as=(function(qe){const Ke=2*qe,lt=new o.c0;lt.resize(Ke),lt._trim();for(let nt=0;nt<Ke;nt++){const dt=6*nt;lt.uint16[dt+0]=4*nt+0,lt.uint16[dt+1]=4*nt+1,lt.uint16[dt+2]=4*nt+2,lt.uint16[dt+3]=4*nt+2,lt.uint16[dt+4]=4*nt+3,lt.uint16[dt+5]=4*nt+0}return lt})(G));const Ue=b.createIndexBuffer(as,!0),je=b.createVertexBuffer(ie,o.b$.members,!0);for(const qe of j){const Ke=tl(_.transform);Y.draw(b,I.TRIANGLES,pn.disabled,cn.disabled,_.colorModeForRenderPass(),En.disabled,Ke,_.style.map.terrain&&_.style.map.terrain.getTerrainData(qe.coord),null,s.id,je,Ue,o.aL.simpleSegment(0,2*qe.circleOffset,qe.circleArray.length,qe.circleArray.length/2),null,_.transform.zoom,null,null,null)}je.destroy(),Ue.destroy()}const tc=o.af(new Float32Array(16));function uu(_,r,s,p,m,b){const{horizontalAlign:T,verticalAlign:I}=o.aG(_);return new o.P((-(T-.5)*r/m+p[0])*b,(-(I-.5)*s/m+p[1])*b)}function ef(_,r,s,p,m,b){const T=r.tileAnchorPoint.add(new o.P(r.translation[0],r.translation[1]));if(r.pitchWithMap){let I=p.mult(b);s||(I=I.rotate(-m));const R=T.add(I);return We(R.x,R.y,r.pitchedLabelPlaneMatrix,r.getElevation).point}if(s){const I=pr(r.tileAnchorPoint.x+1,r.tileAnchorPoint.y,r).point.sub(_),R=Math.atan(I.y/I.x)+(I.x<0?Math.PI:0);return _.add(p.rotate(R))}return _.add(p)}function lh(_,r,s,p,m,b,T,I,R,j,G,X){const Y=_.text.placedSymbolArray,ie=_.text.dynamicLayoutVertexArray,be=_.icon.dynamicLayoutVertexArray,Ue={};ie.clear();for(let je=0;je<Y.length;je++){const qe=Y.get(je),Ke=qe.hidden||!qe.crossTileID||_.allowVerticalPlacement&&!qe.placedOrientation?null:p[qe.crossTileID];if(Ke){const lt=new o.P(qe.anchorX,qe.anchorY),nt={getElevation:X,width:m.width,height:m.height,pitchedLabelPlaneMatrix:b,pitchWithMap:s,transform:m,tileAnchorPoint:lt,translation:j,unwrappedTileID:G},dt=s?ln(lt.x,lt.y,nt):pr(lt.x,lt.y,nt),bt=ft(m.cameraToCenterDistance,dt.signedDistanceFromCamera);let rt=o.ao(_.textSizeData,I,qe)*bt/o.aA;s&&(rt*=_.tilePixelRatio/T);const{width:At,height:qt,anchor:Bt,textOffset:zt,textBoxScale:Vt}=Ke,Dr=uu(Bt,At,qt,zt,Vt,rt),Ar=m.getPitchedTextCorrection(lt.x+j[0],lt.y+j[1],G),sr=ef(dt.point,nt,r,Dr,-m.bearingInRadians,Ar),Xr=_.allowVerticalPlacement&&qe.placedOrientation===o.an.vertical?Math.PI/2:0;for(let On=0;On<qe.numGlyphs;On++)o.au(ie,sr,Xr);R&&qe.associatedIconIndex>=0&&(Ue[qe.associatedIconIndex]={shiftedAnchor:sr,angle:Xr})}else fo(qe.numGlyphs,ie)}if(R){be.clear();const je=_.icon.placedSymbolArray;for(let qe=0;qe<je.length;qe++){const Ke=je.get(qe);if(Ke.hidden)fo(Ke.numGlyphs,be);else{const lt=Ue[qe];if(lt)for(let nt=0;nt<Ke.numGlyphs;nt++)o.au(be,lt.shiftedAnchor,lt.angle);else fo(Ke.numGlyphs,be)}}_.icon.dynamicLayoutVertexBuffer.updateData(be)}_.text.dynamicLayoutVertexBuffer.updateData(ie)}function Pc(_,r,s){return s.iconsInText&&r?"symbolTextAndIcon":_?"symbolSDF":"symbolIcon"}function rc(_,r,s,p,m,b,T,I,R,j,G,X,Y){const ie=_.context,be=ie.gl,Ue=_.transform,je=I==="map",qe=R==="map",Ke=I!=="viewport"&&s.layout.get("symbol-placement")!=="point",lt=je&&!qe&&!Ke,nt=!s.layout.get("symbol-sort-key").isConstant();let dt=!1;const bt=_.getDepthModeForSublayer(0,pn.ReadOnly),rt=s._unevaluatedLayout.hasValue("text-variable-anchor")||s._unevaluatedLayout.hasValue("text-variable-anchor-offset"),At=[],qt=Ue.getCircleRadiusCorrection();for(const Bt of p){const zt=r.getTile(Bt),Vt=zt.getBucket(s);if(!Vt)continue;const Dr=m?Vt.text:Vt.icon;if(!Dr||!Dr.segments.get().length||!Dr.hasVisibleVertices)continue;const Ar=Dr.programConfigurations.get(s.id),sr=m||Vt.sdfIcons,Xr=m?Vt.textSizeData:Vt.iconSizeData,On=qe||Ue.pitch!==0,Kn=_.useProgram(Pc(sr,m,Vt),Ar),Bi=o.am(Xr,Ue.zoom),mi=_.style.map.terrain&&_.style.map.terrain.getTerrainData(Bt);let gi,ui,oi,vi,Wo=[0,0],Hn=null;if(m)ui=zt.glyphAtlasTexture,oi=be.LINEAR,gi=zt.glyphAtlasTexture.size,Vt.iconsInText&&(Wo=zt.imageAtlasTexture.size,Hn=zt.imageAtlasTexture,vi=On||_.options.rotating||_.options.zooming||Xr.kind==="composite"||Xr.kind==="camera"?be.LINEAR:be.NEAREST);else{const No=s.layout.get("icon-size").constantOr(0)!==1||Vt.iconsNeedLinear;ui=zt.imageAtlasTexture,oi=sr||_.options.rotating||_.options.zooming||No||On?be.LINEAR:be.NEAREST,gi=zt.imageAtlasTexture.size}const Ko=o.aB(zt,1,_.transform.zoom),Zo=sn(je,_.transform,Ko),hl=o.L();o.ap(hl,Zo);const Fu=Q(qe,je,_.transform,Ko),Bu=o.aC(Ue,zt,b,T),Wl=Ue.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!Y,applyTerrainMatrix:!0}),fh=rt&&Vt.hasTextData(),dh=s.layout.get("icon-text-fit")!=="none"&&fh&&Vt.hasIconData();if(Ke){const No=_.style.map.terrain?(ss,aa)=>_.style.map.terrain.getElevation(Bt,ss,aa):null,Ji=s.layout.get("text-rotation-alignment")==="map";Sr(Vt,_,m,Zo,hl,qe,j,Ji,Bt.toUnwrapped(),Ue.width,Ue.height,Bu,No)}const Oc=m&&rt||dh,Ds=Ke||Oc?tc:qe?Zo:_.transform.clipSpaceToPixelsMatrix,Ml=sr&&s.paint.get(m?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let zu;zu=sr?Vt.iconsInText?Ga(Xr.kind,Bi,lt,qe,Ke,Oc,_,Ds,Fu,Bu,gi,Wo,qt):ns(Xr.kind,Bi,lt,qe,Ke,Oc,_,Ds,Fu,Bu,m,gi,0,qt):$i(Xr.kind,Bi,lt,qe,Ke,Oc,_,Ds,Fu,Bu,m,gi,qt);const cc={program:Kn,buffers:Dr,uniformValues:zu,projectionData:Wl,atlasTexture:ui,atlasTextureIcon:Hn,atlasInterpolation:oi,atlasInterpolationIcon:vi,isSDF:sr,hasHalo:Ml};if(nt&&Vt.canOverlap){dt=!0;const No=Dr.segments.get();for(const Ji of No)At.push({segments:new o.aL([Ji]),sortKey:Ji.sortKey,state:cc,terrainData:mi})}else At.push({segments:Dr.segments,sortKey:0,state:cc,terrainData:mi})}dt&&At.sort(((Bt,zt)=>Bt.sortKey-zt.sortKey));for(const Bt of At){const zt=Bt.state;if(ie.activeTexture.set(be.TEXTURE0),zt.atlasTexture.bind(zt.atlasInterpolation,be.CLAMP_TO_EDGE),zt.atlasTextureIcon&&(ie.activeTexture.set(be.TEXTURE1),zt.atlasTextureIcon&&zt.atlasTextureIcon.bind(zt.atlasInterpolationIcon,be.CLAMP_TO_EDGE)),zt.isSDF){const Vt=zt.uniformValues;zt.hasHalo&&(Vt.u_is_halo=1,Iu(zt.buffers,Bt.segments,s,_,zt.program,bt,G,X,Vt,zt.projectionData,Bt.terrainData)),Vt.u_is_halo=0}Iu(zt.buffers,Bt.segments,s,_,zt.program,bt,G,X,zt.uniformValues,zt.projectionData,Bt.terrainData)}}function Iu(_,r,s,p,m,b,T,I,R,j,G){const X=p.context;m.draw(X,X.gl.TRIANGLES,b,T,I,En.backCCW,R,G,j,s.id,_.layoutVertexBuffer,_.indexBuffer,r,s.paint,p.transform.zoom,_.programConfigurations.get(s.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function Ic(_,r,s,p,m){const b=_.context,T=b.gl,I=cn.disabled,R=new rn([T.ONE,T.ONE],o.be.transparent,[!0,!0,!0,!0]),j=r.getBucket(s);if(!j)return;const G=p.key;let X=s.heatmapFbos.get(G);X||(X=Mu(b,r.tileSize,r.tileSize),s.heatmapFbos.set(G,X)),b.bindFramebuffer.set(X.framebuffer),b.viewport.set([0,0,r.tileSize,r.tileSize]),b.clear({color:o.be.transparent});const Y=j.programConfigurations.get(s.id),ie=_.useProgram("heatmap",Y,!m),be=_.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ue=_.style.map.terrain.getTerrainData(p);ie.draw(b,T.TRIANGLES,pn.disabled,I,R,En.disabled,Va(r,_.transform.zoom,s.paint.get("heatmap-intensity"),1),Ue,be,s.id,j.layoutVertexBuffer,j.indexBuffer,j.segments,s.paint,_.transform.zoom,Y)}function Mc(_,r,s,p,m){const b=_.context,T=b.gl,I=_.transform;b.setColorMode(_.colorModeForRenderPass());const R=Lc(b,r),j=s.key,G=r.heatmapFbos.get(j);if(!G)return;b.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,G.colorAttachment.get()),b.activeTexture.set(T.TEXTURE1),R.bind(T.LINEAR,T.CLAMP_TO_EDGE);const X=I.getProjectionData({overscaledTileID:s,applyTerrainMatrix:m,applyGlobeMatrix:!p});_.useProgram("heatmapTexture").draw(b,T.TRIANGLES,pn.disabled,cn.disabled,_.colorModeForRenderPass(),En.disabled,so(_,r,0,1),null,X,r.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments,r.paint,I.zoom),G.destroy(),r.heatmapFbos.delete(j)}function Mu(_,r,s){var p,m;const b=_.gl,T=b.createTexture();b.bindTexture(b.TEXTURE_2D,T),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);const I=(p=_.HALF_FLOAT)!==null&&p!==void 0?p:b.UNSIGNED_BYTE,R=(m=_.RGBA16F)!==null&&m!==void 0?m:b.RGBA;b.texImage2D(b.TEXTURE_2D,0,R,r,s,0,b.RGBA,I,null);const j=_.createFramebuffer(r,s,!1,!1);return j.colorAttachment.set(T),j}function Lc(_,r){return r.colorRampTexture||(r.colorRampTexture=new o.T(_,r.colorRamp,_.gl.RGBA)),r.colorRampTexture}function uh(_,r,s,p,m){if(!s||!p||!p.imageAtlas)return;const b=p.imageAtlas.patternPositions;let T=b[s.to.toString()],I=b[s.from.toString()];if(!T&&I&&(T=I),!I&&T&&(I=T),!T||!I){const R=m.getPaintProperty(r);T=b[R],I=b[R]}T&&I&&_.setConstantPatternPositions(T,I)}function nc(_,r,s,p,m,b,T,I){const R=_.context.gl,j="fill-pattern",G=s.paint.get(j),X=G&&G.constantOr(1),Y=s.getCrossfadeParameters();let ie,be,Ue,je,qe;const Ke=_.transform,lt=s.paint.get("fill-translate"),nt=s.paint.get("fill-translate-anchor");T?(be=X&&!s.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ie=R.LINES):(be=X?"fillPattern":"fill",ie=R.TRIANGLES);const dt=G.constantOr(null);for(const bt of p){const rt=r.getTile(bt);if(X&&!rt.patternsLoaded())continue;const At=rt.getBucket(s);if(!At)continue;const qt=At.programConfigurations.get(s.id),Bt=_.useProgram(be,qt),zt=_.style.map.terrain&&_.style.map.terrain.getTerrainData(bt);X&&(_.context.activeTexture.set(R.TEXTURE0),rt.imageAtlasTexture.bind(R.LINEAR,R.CLAMP_TO_EDGE),qt.updatePaintBuffers(Y)),uh(qt,j,dt,rt,s);const Vt=Ke.getProjectionData({overscaledTileID:bt,applyGlobeMatrix:!I,applyTerrainMatrix:!0}),Dr=o.aC(Ke,rt,lt,nt);if(T){je=At.indexBuffer2,qe=At.segments2;const sr=[R.drawingBufferWidth,R.drawingBufferHeight];Ue=be==="fillOutlinePattern"&&X?$a(_,Y,rt,sr,Dr):Ai(sr,Dr)}else je=At.indexBuffer,qe=At.segments,Ue=X?Lo(_,Y,rt,Dr):{u_fill_translate:Dr};const Ar=_.stencilModeForClipping(bt);Bt.draw(_.context,ie,m,Ar,b,En.backCCW,Ue,zt,Vt,s.id,At.layoutVertexBuffer,je,qe,s.paint,_.transform.zoom,qt)}}function Lu(_,r,s,p,m,b,T,I){const R=_.context,j=R.gl,G="fill-extrusion-pattern",X=s.paint.get(G),Y=X.constantOr(1),ie=s.getCrossfadeParameters(),be=s.paint.get("fill-extrusion-opacity"),Ue=X.constantOr(null),je=_.transform;for(const qe of p){const Ke=r.getTile(qe),lt=Ke.getBucket(s);if(!lt)continue;const nt=_.style.map.terrain&&_.style.map.terrain.getTerrainData(qe),dt=lt.programConfigurations.get(s.id),bt=_.useProgram(Y?"fillExtrusionPattern":"fillExtrusion",dt);Y&&(_.context.activeTexture.set(j.TEXTURE0),Ke.imageAtlasTexture.bind(j.LINEAR,j.CLAMP_TO_EDGE),dt.updatePaintBuffers(ie));const rt=je.getProjectionData({overscaledTileID:qe,applyGlobeMatrix:!I,applyTerrainMatrix:!0});uh(dt,G,Ue,Ke,s);const At=o.aC(je,Ke,s.paint.get("fill-extrusion-translate"),s.paint.get("fill-extrusion-translate-anchor")),qt=s.paint.get("fill-extrusion-vertical-gradient"),Bt=Y?Xi(_,qt,be,At,qe,ie,Ke):La(_,qt,be,At);bt.draw(R,R.gl.TRIANGLES,m,b,T,En.backCCW,Bt,nt,rt,s.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,s.paint,_.transform.zoom,dt,_.style.map.terrain&<.centroidVertexBuffer)}}function Du(_,r,s,p,m,b,T,I,R){var j;const G=_.style.projection,X=_.context,Y=_.transform,ie=X.gl,be=[`#define NUM_ILLUMINATION_SOURCES ${s.paint.get("hillshade-highlight-color").values.length}`],Ue=_.useProgram("hillshade",null,!1,be),je=!_.options.moving;for(const qe of p){const Ke=r.getTile(qe),lt=Ke.fbo;if(!lt)continue;const nt=G.getMeshFromTileID(X,qe.canonical,I,!0,"raster"),dt=(j=_.style.map.terrain)===null||j===void 0?void 0:j.getTerrainData(qe);X.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,lt.colorAttachment.get());const bt=Y.getProjectionData({overscaledTileID:qe,aligned:je,applyGlobeMatrix:!R,applyTerrainMatrix:!0});Ue.draw(X,ie.TRIANGLES,b,m[qe.overscaledZ],T,En.backCCW,Do(_,Ke,s),dt,bt,s.id,nt.vertexBuffer,nt.indexBuffer,nt.segments)}}function cu(_,r,s,p,m,b,T,I,R){var j;const G=_.style.projection,X=_.context,Y=_.transform,ie=X.gl,be=_.useProgram("colorRelief"),Ue=!_.options.moving;let je=!0;for(const qe of p){const Ke=r.getTile(qe),lt=Ke.dem;if(je){const qt=ie.getParameter(ie.MAX_TEXTURE_SIZE),{elevationTexture:Bt,colorTexture:zt}=s.getColorRampTextures(X,qt,lt.getUnpackVector());X.activeTexture.set(ie.TEXTURE1),Bt.bind(ie.NEAREST,ie.CLAMP_TO_EDGE),X.activeTexture.set(ie.TEXTURE4),zt.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),je=!1}if(!lt||!lt.data)continue;const nt=lt.stride,dt=lt.getPixels();if(X.activeTexture.set(ie.TEXTURE0),X.pixelStoreUnpackPremultiplyAlpha.set(!1),Ke.demTexture=Ke.demTexture||_.getTileTexture(nt),Ke.demTexture){const qt=Ke.demTexture;qt.update(dt,{premultiply:!1}),qt.bind(ie.LINEAR,ie.CLAMP_TO_EDGE)}else Ke.demTexture=new o.T(X,dt,ie.RGBA,{premultiply:!1}),Ke.demTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE);const bt=G.getMeshFromTileID(X,qe.canonical,I,!0,"raster"),rt=(j=_.style.map.terrain)===null||j===void 0?void 0:j.getTerrainData(qe),At=Y.getProjectionData({overscaledTileID:qe,aligned:Ue,applyGlobeMatrix:!R,applyTerrainMatrix:!0});be.draw(X,ie.TRIANGLES,b,m[qe.overscaledZ],T,En.backCCW,qs(s,Ke.dem),rt,At,s.id,bt.vertexBuffer,bt.indexBuffer,bt.segments)}}const ic=[new o.P(0,0),new o.P(o.$,0),new o.P(o.$,o.$),new o.P(0,o.$)];function Ps(_,r,s,p,m,b,T,I,R=!1,j=!1){const G=p[p.length-1].overscaledZ,X=_.context,Y=X.gl,ie=_.useProgram("raster"),be=_.transform,Ue=_.style.projection,je=_.colorModeForRenderPass(),qe=!_.options.moving;for(const Ke of p){const lt=_.getDepthModeForSublayer(Ke.overscaledZ-G,s.paint.get("raster-opacity")===1?pn.ReadWrite:pn.ReadOnly,Y.LESS),nt=r.getTile(Ke);nt.registerFadeDuration(s.paint.get("raster-fade-duration"));const dt=r.findLoadedParent(Ke,0),bt=r.findLoadedSibling(Ke),rt=Sd(nt,dt||bt||null,r,s,_.transform,_.style.map.terrain);let At,qt;const Bt=s.paint.get("raster-resampling")==="nearest"?Y.NEAREST:Y.LINEAR;X.activeTexture.set(Y.TEXTURE0),nt.texture.bind(Bt,Y.CLAMP_TO_EDGE,Y.LINEAR_MIPMAP_NEAREST),X.activeTexture.set(Y.TEXTURE1),dt?(dt.texture.bind(Bt,Y.CLAMP_TO_EDGE,Y.LINEAR_MIPMAP_NEAREST),At=Math.pow(2,dt.tileID.overscaledZ-nt.tileID.overscaledZ),qt=[nt.tileID.canonical.x*At%1,nt.tileID.canonical.y*At%1]):nt.texture.bind(Bt,Y.CLAMP_TO_EDGE,Y.LINEAR_MIPMAP_NEAREST),nt.texture.useMipmap&&X.extTextureFilterAnisotropic&&_.transform.pitch>20&&Y.texParameterf(Y.TEXTURE_2D,X.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,X.extTextureFilterAnisotropicMax);const zt=_.style.map.terrain&&_.style.map.terrain.getTerrainData(Ke),Vt=be.getProjectionData({overscaledTileID:Ke,aligned:qe,applyGlobeMatrix:!j,applyTerrainMatrix:!0}),Dr=Uo(qt||[0,0],At||1,rt,s,I),Ar=Ue.getMeshFromTileID(X,Ke.canonical,b,T,"raster");ie.draw(X,Y.TRIANGLES,lt,m?m[Ke.overscaledZ]:cn.disabled,je,R?En.frontCCW:En.backCCW,Dr,zt,Vt,s.id,Ar.vertexBuffer,Ar.indexBuffer,Ar.segments)}}function Sd(_,r,s,p,m,b){const T=p.paint.get("raster-fade-duration");if(!b&&T>0){const I=M.now(),R=(I-_.timeAdded)/T,j=r?(I-r.timeAdded)/T:-1,G=s.getSource(),X=Ft(m,{tileSize:G.tileSize,roundZoom:G.roundZoom}),Y=!r||Math.abs(r.tileID.overscaledZ-X)>Math.abs(_.tileID.overscaledZ-X),ie=Y&&_.refreshedUponExpiration?1:o.ag(Y?R:1-j,0,1);return _.refreshedUponExpiration&&R>=1&&(_.refreshedUponExpiration=!1),r?{opacity:1,mix:1-ie}:{opacity:ie,mix:0}}return{opacity:1,mix:0}}const tf=new o.be(1,0,0,1),oc=new o.be(0,1,0,1),ch=new o.be(0,0,1,1),rf=new o.be(1,0,1,1),nf=new o.be(0,1,1,1);function ac(_,r,s,p){Za(_,0,r+s/2,_.transform.width,s,p)}function Hs(_,r,s,p){Za(_,r-s/2,0,s,_.transform.height,p)}function Za(_,r,s,p,m,b){const T=_.context,I=T.gl;I.enable(I.SCISSOR_TEST),I.scissor(r*_.pixelRatio,s*_.pixelRatio,p*_.pixelRatio,m*_.pixelRatio),T.clear({color:b}),I.disable(I.SCISSOR_TEST)}function ul(_,r,s){const p=_.context,m=p.gl,b=_.useProgram("debug"),T=pn.disabled,I=cn.disabled,R=_.colorModeForRenderPass(),j="$debug",G=_.style.map.terrain&&_.style.map.terrain.getTerrainData(s);p.activeTexture.set(m.TEXTURE0);const X=r.getTileByID(s.key).latestRawTileData,Y=Math.floor((X&&X.byteLength||0)/1024),ie=r.getTile(s).tileSize,be=512/Math.min(ie,512)*(s.overscaledZ/_.transform.zoom)*.5;let Ue=s.canonical.toString();s.overscaledZ!==s.canonical.z&&(Ue+=` => ${s.overscaledZ}`),(function(qe,Ke){qe.initDebugOverlayCanvas();const lt=qe.debugOverlayCanvas,nt=qe.context.gl,dt=qe.debugOverlayCanvas.getContext("2d");dt.clearRect(0,0,lt.width,lt.height),dt.shadowColor="white",dt.shadowBlur=2,dt.lineWidth=1.5,dt.strokeStyle="white",dt.textBaseline="top",dt.font="bold 36px Open Sans, sans-serif",dt.fillText(Ke,5,5),dt.strokeText(Ke,5,5),qe.debugOverlayTexture.update(lt),qe.debugOverlayTexture.bind(nt.LINEAR,nt.CLAMP_TO_EDGE)})(_,`${Ue} ${Y}kB`);const je=_.transform.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});b.draw(p,m.TRIANGLES,T,I,rn.alphaBlended,En.disabled,ws(o.be.transparent,be),null,je,j,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),b.draw(p,m.LINE_STRIP,T,I,R,En.disabled,ws(o.be.red),G,je,j,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function lo(_,r,s,p){const{isRenderingGlobe:m}=p,b=_.context,T=b.gl,I=_.transform,R=_.colorModeForRenderPass(),j=_.getDepthModeFor3D(),G=_.useProgram("terrain");b.bindFramebuffer.set(null),b.viewport.set([0,0,_.width,_.height]);for(const X of s){const Y=r.getTerrainMesh(X.tileID),ie=_.renderToTexture.getTexture(X),be=r.getTerrainData(X.tileID);b.activeTexture.set(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,ie.texture);const Ue=r.getMeshFrameDelta(I.zoom),je=I.calculateFogMatrix(X.tileID.toUnwrapped()),qe=Au(Ue,je,_.style.sky,I.pitch,m),Ke=I.getProjectionData({overscaledTileID:X.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});G.draw(b,T.TRIANGLES,j,cn.disabled,R,En.backCCW,qe,be,Ke,"terrain",Y.vertexBuffer,Y.indexBuffer,Y.segments)}}function Al(_,r){if(!r.mesh){const s=new o.aK;s.emplaceBack(-1,-1),s.emplaceBack(1,-1),s.emplaceBack(1,1),s.emplaceBack(-1,1);const p=new o.aM;p.emplaceBack(0,1,2),p.emplaceBack(0,2,3),r.mesh=new Pt(_.createVertexBuffer(s,ur.members),_.createIndexBuffer(p),o.aL.simpleSegment(0,0,s.length,p.length))}return r.mesh}class $o{constructor(r,s){this.context=new Dn(r),this.transform=s,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.af(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ee}resize(r,s,p){if(this.width=Math.floor(r*p),this.height=Math.floor(s*p),this.pixelRatio=p,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const m of this.style._order)this.style._layers[m].resize()}setup(){const r=this.context,s=new o.aK;s.emplaceBack(0,0),s.emplaceBack(o.$,0),s.emplaceBack(0,o.$),s.emplaceBack(o.$,o.$),this.tileExtentBuffer=r.createVertexBuffer(s,ur.members),this.tileExtentSegments=o.aL.simpleSegment(0,0,4,2);const p=new o.aK;p.emplaceBack(0,0),p.emplaceBack(o.$,0),p.emplaceBack(0,o.$),p.emplaceBack(o.$,o.$),this.debugBuffer=r.createVertexBuffer(p,ur.members),this.debugSegments=o.aL.simpleSegment(0,0,4,5);const m=new o.c5;m.emplaceBack(0,0,0,0),m.emplaceBack(o.$,0,o.$,0),m.emplaceBack(0,o.$,0,o.$),m.emplaceBack(o.$,o.$,o.$,o.$),this.rasterBoundsBuffer=r.createVertexBuffer(m,bs.members),this.rasterBoundsSegments=o.aL.simpleSegment(0,0,4,2);const b=new o.aK;b.emplaceBack(0,0),b.emplaceBack(o.$,0),b.emplaceBack(0,o.$),b.emplaceBack(o.$,o.$),this.rasterBoundsBufferPosOnly=r.createVertexBuffer(b,ur.members),this.rasterBoundsSegmentsPosOnly=o.aL.simpleSegment(0,0,4,5);const T=new o.aK;T.emplaceBack(0,0),T.emplaceBack(1,0),T.emplaceBack(0,1),T.emplaceBack(1,1),this.viewportBuffer=r.createVertexBuffer(T,ur.members),this.viewportSegments=o.aL.simpleSegment(0,0,4,2);const I=new o.c6;I.emplaceBack(0),I.emplaceBack(1),I.emplaceBack(3),I.emplaceBack(2),I.emplaceBack(0),this.tileBorderIndexBuffer=r.createIndexBuffer(I);const R=new o.aM;R.emplaceBack(1,0,2),R.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=r.createIndexBuffer(R);const j=this.context.gl;this.stencilClearMode=new cn({func:j.ALWAYS,mask:0},0,255,j.ZERO,j.ZERO,j.ZERO),this.tileExtentMesh=new Pt(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const r=this.context,s=r.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const p=o.L();o.bX(p,0,this.width,this.height,0,0,1),o.N(p,p,[s.drawingBufferWidth,s.drawingBufferHeight,0]);const m={mainMatrix:p,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:p};this.useProgram("clippingMask",null,!0).draw(r,s.TRIANGLES,pn.disabled,this.stencilClearMode,rn.disabled,En.disabled,null,null,m,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(r,s,p){if(this.currentStencilSource===r.source||!r.isTileClipped()||!s||!s.length)return;this.currentStencilSource=r.source,this.nextStencilID+s.length>256&&this.clearStencil();const m=this.context;m.setColorMode(rn.disabled),m.setDepthMode(pn.disabled);const b={};for(const T of s)b[T.key]=this.nextStencilID++;this._renderTileMasks(b,s,p,!0),this._renderTileMasks(b,s,p,!1),this._tileClippingMaskIDs=b}_renderTileMasks(r,s,p,m){const b=this.context,T=b.gl,I=this.style.projection,R=this.transform,j=this.useProgram("clippingMask");for(const G of s){const X=r[G.key],Y=this.style.map.terrain&&this.style.map.terrain.getTerrainData(G),ie=I.getMeshFromTileID(this.context,G.canonical,m,!0,"stencil"),be=R.getProjectionData({overscaledTileID:G,applyGlobeMatrix:!p,applyTerrainMatrix:!0});j.draw(b,T.TRIANGLES,pn.disabled,new cn({func:T.ALWAYS,mask:0},X,255,T.KEEP,T.KEEP,T.REPLACE),rn.disabled,p?En.disabled:En.backCCW,null,Y,be,"$clipping",ie.vertexBuffer,ie.indexBuffer,ie.segments)}}_renderTilesDepthBuffer(){const r=this.context,s=r.gl,p=this.style.projection,m=this.transform,b=this.useProgram("depth"),T=this.getDepthModeFor3D(),I=It(m,{tileSize:m.tileSize});for(const R of I){const j=this.style.map.terrain&&this.style.map.terrain.getTerrainData(R),G=p.getMeshFromTileID(this.context,R.canonical,!0,!0,"raster"),X=m.getProjectionData({overscaledTileID:R,applyGlobeMatrix:!0,applyTerrainMatrix:!0});b.draw(r,s.TRIANGLES,T,cn.disabled,rn.disabled,En.backCCW,null,j,X,"$clipping",G.vertexBuffer,G.indexBuffer,G.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const r=this.nextStencilID++,s=this.context.gl;return new cn({func:s.NOTEQUAL,mask:255},r,255,s.KEEP,s.KEEP,s.REPLACE)}stencilModeForClipping(r){const s=this.context.gl;return new cn({func:s.EQUAL,mask:255},this._tileClippingMaskIDs[r.key],0,s.KEEP,s.KEEP,s.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(r){const s=this.context.gl,p=r.sort(((T,I)=>I.overscaledZ-T.overscaledZ)),m=p[p.length-1].overscaledZ,b=p[0].overscaledZ-m+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const T={};for(let I=0;I<b;I++)T[I+m]=new cn({func:s.GEQUAL,mask:255},I+this.nextStencilID,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID+=b,[T,p]}return[{[m]:cn.disabled},p]}stencilConfigForOverlapTwoPass(r){const s=this.context.gl,p=r.sort(((T,I)=>I.overscaledZ-T.overscaledZ)),m=p[p.length-1].overscaledZ,b=p[0].overscaledZ-m+1;if(this.clearStencil(),b>1){const T={},I={};for(let R=0;R<b;R++)T[R+m]=new cn({func:s.GREATER,mask:255},b+1+R,255,s.KEEP,s.KEEP,s.REPLACE),I[R+m]=new cn({func:s.GREATER,mask:255},1+R,255,s.KEEP,s.KEEP,s.REPLACE);return this.nextStencilID=2*b+1,[T,I,p]}return this.nextStencilID=3,[{[m]:new cn({func:s.GREATER,mask:255},2,255,s.KEEP,s.KEEP,s.REPLACE)},{[m]:new cn({func:s.GREATER,mask:255},1,255,s.KEEP,s.KEEP,s.REPLACE)},p]}colorModeForRenderPass(){const r=this.context.gl;return this._showOverdrawInspector?new rn([r.CONSTANT_COLOR,r.ONE],new o.be(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?rn.unblended:rn.alphaBlended}getDepthModeForSublayer(r,s,p){if(!this.opaquePassEnabledForLayer())return pn.disabled;const m=1-((1+this.currentLayer)*this.numSublayers+r)*this.depthEpsilon;return new pn(p||this.context.gl.LEQUAL,s,[m,m])}getDepthModeFor3D(){return new pn(this.context.gl.LEQUAL,pn.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(r,s){var p,m;this.style=r,this.options=s,this.lineAtlas=r.lineAtlas,this.imageManager=r.imageManager,this.glyphManager=r.glyphManager,this.symbolFadeChange=r.placement.symbolFadeChange(M.now()),this.imageManager.beginFrame();const b=this.style._order,T=this.style.sourceCaches,I={},R={},j={},G={isRenderingToTexture:!1,isRenderingGlobe:((p=r.projection)===null||p===void 0?void 0:p.transitionState)>0};for(const Y in T){const ie=T[Y];ie.used&&ie.prepare(this.context),I[Y]=ie.getVisibleCoordinates(!1),R[Y]=I[Y].slice().reverse(),j[Y]=ie.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Y=0;Y<b.length;Y++)if(this.style._layers[b[Y]].is3D()){this.opaquePassCutoff=Y;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Y of b){const ie=this.style._layers[Y];if(!ie.hasOffscreenPass()||ie.isHidden(this.transform.zoom))continue;const be=R[ie.source];(ie.type==="custom"||be.length)&&this.renderLayer(this,T[ie.source],ie,be,G)}if((m=this.style.projection)===null||m===void 0||m.updateGPUdependent({context:this.context,useProgram:Y=>this.useProgram(Y)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:s.showOverdrawInspector?o.be.black:o.be.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(Y,ie){const be=Y.context,Ue=be.gl,je=((bt,rt,At)=>{const qt=Math.cos(rt.rollInRadians),Bt=Math.sin(rt.rollInRadians),zt=ce(rt),Vt=rt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:bt.properties.get("sky-color"),u_horizon_color:bt.properties.get("horizon-color"),u_horizon:[(rt.width/2-zt*Bt)*At,(rt.height/2+zt*qt)*At],u_horizon_normal:[-Bt,qt],u_sky_horizon_blend:bt.properties.get("sky-horizon-blend")*rt.height/2*At,u_sky_blend:Vt}})(ie,Y.style.map.transform,Y.pixelRatio),qe=new pn(Ue.LEQUAL,pn.ReadWrite,[0,1]),Ke=cn.disabled,lt=Y.colorModeForRenderPass(),nt=Y.useProgram("sky"),dt=Al(be,ie);nt.draw(be,Ue.TRIANGLES,qe,Ke,lt,En.disabled,je,null,void 0,"sky",dt.vertexBuffer,dt.indexBuffer,dt.segments)})(this,this.style.sky),this._showOverdrawInspector=s.showOverdrawInspector,this.depthRangeFor3D=[0,1-(r._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=b.length-1;this.currentLayer>=0;this.currentLayer--){const Y=this.style._layers[b[this.currentLayer]],ie=T[Y.source],be=I[Y.source];this._renderTileClippingMasks(Y,be,!1),this.renderLayer(this,ie,Y,be,G)}this.renderPass="translucent";let X=!1;for(this.currentLayer=0;this.currentLayer<b.length;this.currentLayer++){const Y=this.style._layers[b[this.currentLayer]],ie=T[Y.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Y,G))continue;this.opaquePassEnabledForLayer()||X||(X=!0,G.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const be=(Y.type==="symbol"?j:R)[Y.source];this._renderTileClippingMasks(Y,I[Y.source],!!this.renderToTexture),this.renderLayer(this,ie,Y,be,G)}if(G.isRenderingGlobe&&(function(Y,ie,be){const Ue=Y.context,je=Ue.gl,qe=Y.useProgram("atmosphere"),Ke=new pn(je.LEQUAL,pn.ReadOnly,[0,1]),lt=Y.transform,nt=(function(Vt,Dr){const Ar=Vt.properties.get("position"),sr=[-Ar.x,-Ar.y,-Ar.z],Xr=o.af(new Float64Array(16));return Vt.properties.get("anchor")==="map"&&(o.b5(Xr,Xr,Dr.rollInRadians),o.b6(Xr,Xr,-Dr.pitchInRadians),o.b5(Xr,Xr,Dr.bearingInRadians),o.b6(Xr,Xr,Dr.center.lat*Math.PI/180),o.by(Xr,Xr,-Dr.center.lng*Math.PI/180)),o.c4(sr,sr,Xr),sr})(be,Y.transform),dt=lt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),bt=ie.properties.get("atmosphere-blend")*dt.projectionTransition;if(bt===0)return;const rt=Mo(lt.worldSize,lt.center.lat),At=lt.inverseProjectionMatrix,qt=new Float64Array(4);qt[3]=1,o.av(qt,qt,lt.modelViewProjectionMatrix),qt[0]/=qt[3],qt[1]/=qt[3],qt[2]/=qt[3],qt[3]=1,o.av(qt,qt,At),qt[0]/=qt[3],qt[1]/=qt[3],qt[2]/=qt[3],qt[3]=1;const Bt=((Vt,Dr,Ar,sr,Xr)=>({u_sun_pos:Vt,u_atmosphere_blend:Dr,u_globe_position:Ar,u_globe_radius:sr,u_inv_proj_matrix:Xr}))(nt,bt,[qt[0],qt[1],qt[2]],rt,At),zt=Al(Ue,ie);qe.draw(Ue,je.TRIANGLES,Ke,cn.disabled,rn.alphaBlended,En.disabled,Bt,null,null,"atmosphere",zt.vertexBuffer,zt.indexBuffer,zt.segments)})(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const Y=(function(ie,be){let Ue=null;const je=Object.values(ie._layers).flatMap((nt=>nt.source&&!nt.isHidden(be)?[ie.sourceCaches[nt.source]]:[])),qe=je.filter((nt=>nt.getSource().type==="vector")),Ke=je.filter((nt=>nt.getSource().type!=="vector")),lt=nt=>{(!Ue||Ue.getSource().maxzoom<nt.getSource().maxzoom)&&(Ue=nt)};return qe.forEach((nt=>lt(nt))),Ue||Ke.forEach((nt=>lt(nt))),Ue})(this.style,this.transform.zoom);Y&&(function(ie,be,Ue){for(let je=0;je<Ue.length;je++)ul(ie,be,Ue[je])})(this,Y,Y.getVisibleCoordinates())}this.options.showPadding&&(function(Y){const ie=Y.transform.padding;ac(Y,Y.transform.height-(ie.top||0),3,tf),ac(Y,ie.bottom||0,3,oc),Hs(Y,ie.left||0,3,ch),Hs(Y,Y.transform.width-(ie.right||0),3,rf);const be=Y.transform.centerPoint;(function(Ue,je,qe,Ke){Za(Ue,je-1,qe-10,2,20,Ke),Za(Ue,je-10,qe-1,20,2,Ke)})(Y,be.x,Y.transform.height-be.y,nf)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(r){if(!this.style||!this.style.map||!this.style.map.terrain)return;const s=this.terrainFacilitator.matrix,p=this.transform.modelViewProjectionMatrix;let m=this.terrainFacilitator.dirty;m||(m=r?!o.c7(s,p):!o.c8(s,p)),m||(m=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),m&&(o.c9(s,p),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(b,T){const I=b.context,R=I.gl,j=b.transform,G=rn.unblended,X=new pn(R.LEQUAL,pn.ReadWrite,[0,1]),Y=T.sourceCache.getRenderableTiles(),ie=b.useProgram("terrainDepth");I.bindFramebuffer.set(T.getFramebuffer("depth").framebuffer),I.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),I.clear({color:o.be.transparent,depth:1});for(const be of Y){const Ue=T.getTerrainMesh(be.tileID),je=T.getTerrainData(be.tileID),qe=j.getProjectionData({overscaledTileID:be.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Ke={u_ele_delta:T.getMeshFrameDelta(j.zoom)};ie.draw(I,R.TRIANGLES,X,cn.disabled,G,En.backCCW,Ke,je,qe,"terrain",Ue.vertexBuffer,Ue.indexBuffer,Ue.segments)}I.bindFramebuffer.set(null),I.viewport.set([0,0,b.width,b.height])})(this,this.style.map.terrain),(function(b,T){const I=b.context,R=I.gl,j=b.transform,G=rn.unblended,X=new pn(R.LEQUAL,pn.ReadWrite,[0,1]),Y=T.getCoordsTexture(),ie=T.sourceCache.getRenderableTiles(),be=b.useProgram("terrainCoords");I.bindFramebuffer.set(T.getFramebuffer("coords").framebuffer),I.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),I.clear({color:o.be.transparent,depth:1}),T.coordsIndex=[];for(const Ue of ie){const je=T.getTerrainMesh(Ue.tileID),qe=T.getTerrainData(Ue.tileID);I.activeTexture.set(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,Y.texture);const Ke={u_terrain_coords_id:(255-T.coordsIndex.length)/255,u_texture:0,u_ele_delta:T.getMeshFrameDelta(j.zoom)},lt=j.getProjectionData({overscaledTileID:Ue.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});be.draw(I,R.TRIANGLES,X,cn.disabled,G,En.backCCW,Ke,qe,lt,"terrain",je.vertexBuffer,je.indexBuffer,je.segments),T.coordsIndex.push(Ue.tileID.key)}I.bindFramebuffer.set(null),I.viewport.set([0,0,b.width,b.height])})(this,this.style.map.terrain))}renderLayer(r,s,p,m,b){p.isHidden(this.transform.zoom)||(p.type==="background"||p.type==="custom"||(m||[]).length)&&(this.id=p.id,o.ca(p)?(function(T,I,R,j,G,X){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:Y}=X,ie=cn.disabled,be=T.colorModeForRenderPass();(R._unevaluatedLayout.hasValue("text-variable-anchor")||R._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Ue,je,qe,Ke,lt,nt,dt,bt,rt){const At=je.transform,qt=je.style.map.terrain,Bt=lt==="map",zt=nt==="map";for(const Vt of Ue){const Dr=Ke.getTile(Vt),Ar=Dr.getBucket(qe);if(!Ar||!Ar.text||!Ar.text.segments.get().length)continue;const sr=o.am(Ar.textSizeData,At.zoom),Xr=o.aB(Dr,1,je.transform.zoom),On=sn(Bt,je.transform,Xr),Kn=qe.layout.get("icon-text-fit")!=="none"&&Ar.hasIconData();if(sr){const Bi=Math.pow(2,At.zoom-Dr.tileID.overscaledZ),mi=qt?(gi,ui)=>qt.getElevation(Vt,gi,ui):null;lh(Ar,Bt,zt,rt,At,On,Bi,sr,Kn,o.aC(At,Dr,dt,bt),Vt.toUnwrapped(),mi)}}})(j,T,R,I,R.layout.get("text-rotation-alignment"),R.layout.get("text-pitch-alignment"),R.paint.get("text-translate"),R.paint.get("text-translate-anchor"),G),R.paint.get("icon-opacity").constantOr(1)!==0&&rc(T,I,R,j,!1,R.paint.get("icon-translate"),R.paint.get("icon-translate-anchor"),R.layout.get("icon-rotation-alignment"),R.layout.get("icon-pitch-alignment"),R.layout.get("icon-keep-upright"),ie,be,Y),R.paint.get("text-opacity").constantOr(1)!==0&&rc(T,I,R,j,!0,R.paint.get("text-translate"),R.paint.get("text-translate-anchor"),R.layout.get("text-rotation-alignment"),R.layout.get("text-pitch-alignment"),R.layout.get("text-keep-upright"),ie,be,Y),I.map.showCollisionBoxes&&(ll(T,I,R,j,!0),ll(T,I,R,j,!1))})(r,s,p,m,this.style.placement.variableOffsets,b):o.cb(p)?(function(T,I,R,j,G){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:X}=G,Y=R.paint.get("circle-opacity"),ie=R.paint.get("circle-stroke-width"),be=R.paint.get("circle-stroke-opacity"),Ue=!R.layout.get("circle-sort-key").isConstant();if(Y.constantOr(1)===0&&(ie.constantOr(1)===0||be.constantOr(1)===0))return;const je=T.context,qe=je.gl,Ke=T.transform,lt=T.getDepthModeForSublayer(0,pn.ReadOnly),nt=cn.disabled,dt=T.colorModeForRenderPass(),bt=[],rt=Ke.getCircleRadiusCorrection();for(let At=0;At<j.length;At++){const qt=j[At],Bt=I.getTile(qt),zt=Bt.getBucket(R);if(!zt)continue;const Vt=R.paint.get("circle-translate"),Dr=R.paint.get("circle-translate-anchor"),Ar=o.aC(Ke,Bt,Vt,Dr),sr=zt.programConfigurations.get(R.id),Xr=T.useProgram("circle",sr),On=zt.layoutVertexBuffer,Kn=zt.indexBuffer,Bi=T.style.map.terrain&&T.style.map.terrain.getTerrainData(qt),mi={programConfiguration:sr,program:Xr,layoutVertexBuffer:On,indexBuffer:Kn,uniformValues:xs(T,Bt,R,Ar,rt),terrainData:Bi,projectionData:Ke.getProjectionData({overscaledTileID:qt,applyGlobeMatrix:!X,applyTerrainMatrix:!0})};if(Ue){const gi=zt.segments.get();for(const ui of gi)bt.push({segments:new o.aL([ui]),sortKey:ui.sortKey,state:mi})}else bt.push({segments:zt.segments,sortKey:0,state:mi})}Ue&&bt.sort(((At,qt)=>At.sortKey-qt.sortKey));for(const At of bt){const{programConfiguration:qt,program:Bt,layoutVertexBuffer:zt,indexBuffer:Vt,uniformValues:Dr,terrainData:Ar,projectionData:sr}=At.state;Bt.draw(je,qe.TRIANGLES,lt,nt,dt,En.backCCW,Dr,Ar,sr,R.id,zt,Vt,At.segments,R.paint,T.transform.zoom,qt)}})(r,s,p,m,b):o.cc(p)?(function(T,I,R,j,G){if(R.paint.get("heatmap-opacity")===0)return;const X=T.context,{isRenderingToTexture:Y,isRenderingGlobe:ie}=G;if(T.style.map.terrain){for(const be of j){const Ue=I.getTile(be);I.hasRenderableParent(be)||(T.renderPass==="offscreen"?Ic(T,Ue,R,be,ie):T.renderPass==="translucent"&&Mc(T,R,be,Y,ie))}X.viewport.set([0,0,T.width,T.height])}else T.renderPass==="offscreen"?(function(be,Ue,je,qe){const Ke=be.context,lt=Ke.gl,nt=be.transform,dt=cn.disabled,bt=new rn([lt.ONE,lt.ONE],o.be.transparent,[!0,!0,!0,!0]);(function(rt,At,qt){const Bt=rt.gl;rt.activeTexture.set(Bt.TEXTURE1),rt.viewport.set([0,0,At.width/4,At.height/4]);let zt=qt.heatmapFbos.get(o.c1);zt?(Bt.bindTexture(Bt.TEXTURE_2D,zt.colorAttachment.get()),rt.bindFramebuffer.set(zt.framebuffer)):(zt=Mu(rt,At.width/4,At.height/4),qt.heatmapFbos.set(o.c1,zt))})(Ke,be,je),Ke.clear({color:o.be.transparent});for(let rt=0;rt<qe.length;rt++){const At=qe[rt];if(Ue.hasRenderableParent(At))continue;const qt=Ue.getTile(At),Bt=qt.getBucket(je);if(!Bt)continue;const zt=Bt.programConfigurations.get(je.id),Vt=be.useProgram("heatmap",zt),Dr=nt.getProjectionData({overscaledTileID:At,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ar=nt.getCircleRadiusCorrection();Vt.draw(Ke,lt.TRIANGLES,pn.disabled,dt,bt,En.backCCW,Va(qt,nt.zoom,je.paint.get("heatmap-intensity"),Ar),null,Dr,je.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,je.paint,nt.zoom,zt)}Ke.viewport.set([0,0,be.width,be.height])})(T,I,R,j):T.renderPass==="translucent"&&(function(be,Ue){const je=be.context,qe=je.gl;je.setColorMode(be.colorModeForRenderPass());const Ke=Ue.heatmapFbos.get(o.c1);Ke&&(je.activeTexture.set(qe.TEXTURE0),qe.bindTexture(qe.TEXTURE_2D,Ke.colorAttachment.get()),je.activeTexture.set(qe.TEXTURE1),Lc(je,Ue).bind(qe.LINEAR,qe.CLAMP_TO_EDGE),be.useProgram("heatmapTexture").draw(je,qe.TRIANGLES,pn.disabled,cn.disabled,be.colorModeForRenderPass(),En.disabled,so(be,Ue,0,1),null,null,Ue.id,be.viewportBuffer,be.quadTriangleIndexBuffer,be.viewportSegments,Ue.paint,be.transform.zoom))})(T,R)})(r,s,p,m,b):o.cd(p)?(function(T,I,R,j,G){if(T.renderPass!=="translucent")return;const{isRenderingToTexture:X}=G,Y=R.paint.get("line-opacity"),ie=R.paint.get("line-width");if(Y.constantOr(1)===0||ie.constantOr(1)===0)return;const be=T.getDepthModeForSublayer(0,pn.ReadOnly),Ue=T.colorModeForRenderPass(),je=R.paint.get("line-dasharray"),qe=R.paint.get("line-pattern"),Ke=qe.constantOr(1),lt=R.paint.get("line-gradient"),nt=R.getCrossfadeParameters(),dt=Ke?"linePattern":je?"lineSDF":lt?"lineGradient":"line",bt=T.context,rt=bt.gl,At=T.transform;let qt=!0;for(const Bt of j){const zt=I.getTile(Bt);if(Ke&&!zt.patternsLoaded())continue;const Vt=zt.getBucket(R);if(!Vt)continue;const Dr=Vt.programConfigurations.get(R.id),Ar=T.context.program.get(),sr=T.useProgram(dt,Dr),Xr=qt||sr.program!==Ar,On=T.style.map.terrain&&T.style.map.terrain.getTerrainData(Bt),Kn=qe.constantOr(null);if(Kn&&zt.imageAtlas){const oi=zt.imageAtlas,vi=oi.patternPositions[Kn.to.toString()],Wo=oi.patternPositions[Kn.from.toString()];vi&&Wo&&Dr.setConstantPatternPositions(vi,Wo)}const Bi=At.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!X,applyTerrainMatrix:!0}),mi=At.getPixelScale(),gi=Ke?mo(T,zt,R,mi,nt):je?rl(T,zt,R,mi,je,nt):lt?xo(T,zt,R,mi,Vt.lineClipsArray.length):Ss(T,zt,R,mi);if(Ke)bt.activeTexture.set(rt.TEXTURE0),zt.imageAtlasTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE),Dr.updatePaintBuffers(nt);else if(je&&(Xr||T.lineAtlas.dirty))bt.activeTexture.set(rt.TEXTURE0),T.lineAtlas.bind(bt);else if(lt){const oi=Vt.gradients[R.id];let vi=oi.texture;if(R.gradientVersion!==oi.version){let Wo=256;if(R.stepInterpolant){const Hn=I.getSource().maxzoom,Ko=Bt.canonical.z===Hn?Math.ceil(1<<T.transform.maxZoom-Bt.canonical.z):1;Wo=o.ag(o.c2(Vt.maxLineLength/o.$*1024*Ko),256,bt.maxTextureSize)}oi.gradient=o.c3({expression:R.gradientExpression(),evaluationKey:"lineProgress",resolution:Wo,image:oi.gradient||void 0,clips:Vt.lineClipsArray}),oi.texture?oi.texture.update(oi.gradient):oi.texture=new o.T(bt,oi.gradient,rt.RGBA),oi.version=R.gradientVersion,vi=oi.texture}bt.activeTexture.set(rt.TEXTURE0),vi.bind(R.stepInterpolant?rt.NEAREST:rt.LINEAR,rt.CLAMP_TO_EDGE)}const ui=T.stencilModeForClipping(Bt);sr.draw(bt,rt.TRIANGLES,be,ui,Ue,En.disabled,gi,On,Bi,R.id,Vt.layoutVertexBuffer,Vt.indexBuffer,Vt.segments,R.paint,T.transform.zoom,Dr,Vt.layoutVertexBuffer2),qt=!1}})(r,s,p,m,b):o.ce(p)?(function(T,I,R,j,G){const X=R.paint.get("fill-color"),Y=R.paint.get("fill-opacity");if(Y.constantOr(1)===0)return;const{isRenderingToTexture:ie}=G,be=T.colorModeForRenderPass(),Ue=R.paint.get("fill-pattern"),je=T.opaquePassEnabledForLayer()&&!Ue.constantOr(1)&&X.constantOr(o.be.transparent).a===1&&Y.constantOr(0)===1?"opaque":"translucent";if(T.renderPass===je){const qe=T.getDepthModeForSublayer(1,T.renderPass==="opaque"?pn.ReadWrite:pn.ReadOnly);nc(T,I,R,j,qe,be,!1,ie)}if(T.renderPass==="translucent"&&R.paint.get("fill-antialias")){const qe=T.getDepthModeForSublayer(R.getPaintProperty("fill-outline-color")?2:0,pn.ReadOnly);nc(T,I,R,j,qe,be,!0,ie)}})(r,s,p,m,b):o.cf(p)?(function(T,I,R,j,G){const X=R.paint.get("fill-extrusion-opacity");if(X===0)return;const{isRenderingToTexture:Y}=G;if(T.renderPass==="translucent"){const ie=new pn(T.context.gl.LEQUAL,pn.ReadWrite,T.depthRangeFor3D);if(X!==1||R.paint.get("fill-extrusion-pattern").constantOr(1))Lu(T,I,R,j,ie,cn.disabled,rn.disabled,Y),Lu(T,I,R,j,ie,T.stencilModeFor3D(),T.colorModeForRenderPass(),Y);else{const be=T.colorModeForRenderPass();Lu(T,I,R,j,ie,cn.disabled,be,Y)}}})(r,s,p,m,b):o.cg(p)?(function(T,I,R,j,G){if(T.renderPass!=="offscreen"&&T.renderPass!=="translucent")return;const{isRenderingToTexture:X}=G,Y=T.context,ie=T.style.projection.useSubdivision,be=T.getDepthModeForSublayer(0,pn.ReadOnly),Ue=T.colorModeForRenderPass();if(T.renderPass==="offscreen")(function(je,qe,Ke,lt,nt,dt,bt){const rt=je.context,At=rt.gl;for(const qt of Ke){const Bt=qe.getTile(qt),zt=Bt.dem;if(!zt||!zt.data||!Bt.needsHillshadePrepare)continue;const Vt=zt.dim,Dr=zt.stride,Ar=zt.getPixels();if(rt.activeTexture.set(At.TEXTURE1),rt.pixelStoreUnpackPremultiplyAlpha.set(!1),Bt.demTexture=Bt.demTexture||je.getTileTexture(Dr),Bt.demTexture){const Xr=Bt.demTexture;Xr.update(Ar,{premultiply:!1}),Xr.bind(At.NEAREST,At.CLAMP_TO_EDGE)}else Bt.demTexture=new o.T(rt,Ar,At.RGBA,{premultiply:!1}),Bt.demTexture.bind(At.NEAREST,At.CLAMP_TO_EDGE);rt.activeTexture.set(At.TEXTURE0);let sr=Bt.fbo;if(!sr){const Xr=new o.T(rt,{width:Vt,height:Vt,data:null},At.RGBA);Xr.bind(At.LINEAR,At.CLAMP_TO_EDGE),sr=Bt.fbo=rt.createFramebuffer(Vt,Vt,!0,!1),sr.colorAttachment.set(Xr.texture)}rt.bindFramebuffer.set(sr.framebuffer),rt.viewport.set([0,0,Vt,Vt]),je.useProgram("hillshadePrepare").draw(rt,At.TRIANGLES,nt,dt,bt,En.disabled,iu(Bt.tileID,zt),null,null,lt.id,je.rasterBoundsBuffer,je.quadTriangleIndexBuffer,je.rasterBoundsSegments),Bt.needsHillshadePrepare=!1}})(T,I,j,R,be,cn.disabled,Ue),Y.viewport.set([0,0,T.width,T.height]);else if(T.renderPass==="translucent")if(ie){const[je,qe,Ke]=T.stencilConfigForOverlapTwoPass(j);Du(T,I,R,Ke,je,be,Ue,!1,X),Du(T,I,R,Ke,qe,be,Ue,!0,X)}else{const[je,qe]=T.getStencilConfigForOverlapAndUpdateStencilID(j);Du(T,I,R,qe,je,be,Ue,!1,X)}})(r,s,p,m,b):o.ch(p)?(function(T,I,R,j,G){if(T.renderPass!=="translucent"||!j.length)return;const{isRenderingToTexture:X}=G,Y=T.style.projection.useSubdivision,ie=T.getDepthModeForSublayer(0,pn.ReadOnly),be=T.colorModeForRenderPass();if(Y){const[Ue,je,qe]=T.stencilConfigForOverlapTwoPass(j);cu(T,I,R,qe,Ue,ie,be,!1,X),cu(T,I,R,qe,je,ie,be,!0,X)}else{const[Ue,je]=T.getStencilConfigForOverlapAndUpdateStencilID(j);cu(T,I,R,je,Ue,ie,be,!1,X)}})(r,s,p,m,b):o.ci(p)?(function(T,I,R,j,G){if(T.renderPass!=="translucent"||R.paint.get("raster-opacity")===0||!j.length)return;const{isRenderingToTexture:X}=G,Y=I.getSource(),ie=T.style.projection.useSubdivision;if(Y instanceof Jt)Ps(T,I,R,j,null,!1,!1,Y.tileCoords,Y.flippedWindingOrder,X);else if(ie){const[be,Ue,je]=T.stencilConfigForOverlapTwoPass(j);Ps(T,I,R,je,be,!1,!0,ic,!1,X),Ps(T,I,R,je,Ue,!0,!0,ic,!1,X)}else{const[be,Ue]=T.getStencilConfigForOverlapAndUpdateStencilID(j);Ps(T,I,R,Ue,be,!1,!0,ic,!1,X)}})(r,s,p,m,b):o.cj(p)?(function(T,I,R,j,G){const X=R.paint.get("background-color"),Y=R.paint.get("background-opacity");if(Y===0)return;const{isRenderingToTexture:ie}=G,be=T.context,Ue=be.gl,je=T.style.projection,qe=T.transform,Ke=qe.tileSize,lt=R.paint.get("background-pattern");if(T.isPatternMissing(lt))return;const nt=!lt&&X.a===1&&Y===1&&T.opaquePassEnabledForLayer()?"opaque":"translucent";if(T.renderPass!==nt)return;const dt=cn.disabled,bt=T.getDepthModeForSublayer(0,nt==="opaque"?pn.ReadWrite:pn.ReadOnly),rt=T.colorModeForRenderPass(),At=T.useProgram(lt?"backgroundPattern":"background"),qt=j||It(qe,{tileSize:Ke,terrain:T.style.map.terrain});lt&&(be.activeTexture.set(Ue.TEXTURE0),T.imageManager.bind(T.context));const Bt=R.getCrossfadeParameters();for(const zt of qt){const Vt=qe.getProjectionData({overscaledTileID:zt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0}),Dr=lt?Tl(Y,T,lt,{tileID:zt,tileSize:Ke},Bt):ga(Y,X),Ar=T.style.map.terrain&&T.style.map.terrain.getTerrainData(zt),sr=je.getMeshFromTileID(be,zt.canonical,!1,!0,"raster");At.draw(be,Ue.TRIANGLES,bt,dt,rt,En.backCCW,Dr,Ar,Vt,R.id,sr.vertexBuffer,sr.indexBuffer,sr.segments)}})(r,0,p,m,b):o.ck(p)&&(function(T,I,R,j){const{isRenderingGlobe:G}=j,X=T.context,Y=R.implementation,ie=T.style.projection,be=T.transform,Ue=be.getProjectionDataForCustomLayer(G),je={farZ:be.farZ,nearZ:be.nearZ,fov:be.fov*Math.PI/180,modelViewProjectionMatrix:be.modelViewProjectionMatrix,projectionMatrix:be.projectionMatrix,shaderData:{variantName:ie.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
|
|
769
769
|
uniform mat4 u_projection_matrix;
|
|
770
|
-
${ie.shaderPreludeCode.vertexSource}`,define:ie.shaderDefine},defaultProjectionData:Ue},qe=Y.renderingMode?Y.renderingMode:"2d";if(T.renderPass==="offscreen"){const Ke=Y.prerender;Ke&&(T.setCustomLayerDefaults(),X.setColorMode(T.colorModeForRenderPass()),Ke.call(Y,X.gl,je),X.setDirty(),T.setBaseState())}else if(T.renderPass==="translucent"){T.setCustomLayerDefaults(),X.setColorMode(T.colorModeForRenderPass()),X.setStencilMode(cn.disabled);const Ke=qe==="3d"?T.getDepthModeFor3D():T.getDepthModeForSublayer(0,pn.ReadOnly);X.setDepthMode(Ke),Y.render(X.gl,je),X.setDirty(),T.setBaseState(),X.bindFramebuffer.set(null)}})(r,0,p,b))}saveTileTexture(r){const s=this._tileTextures[r.size[0]];s?s.push(r):this._tileTextures[r.size[0]]=[r]}getTileTexture(r){const s=this._tileTextures[r];return s&&s.length>0?s.pop():null}isPatternMissing(r){if(!r)return!1;if(!r.from||!r.to)return!0;const s=this.imageManager.getPattern(r.from.toString()),p=this.imageManager.getPattern(r.to.toString());return!s||!p}useProgram(r,s,p=!1,m=[]){this.cache=this.cache||{};const b=!!this.style.map.terrain,T=this.style.projection,I=p?yt.projectionMercator:T.shaderPreludeCode,R=p?xr:T.shaderDefine,j=r+(s?s.cacheKey:"")+`/${p?Fr:T.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(b?"/terrain":"")+(m?`/${m.join("/")}`:"");return this.cache[j]||(this.cache[j]=new el(this.context,yt[r],s,is[r],this._showOverdrawInspector,b,I,R,m)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const r=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(r.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new o.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:r,drawingBufferHeight:s}=this.context.gl;return this.width!==r||this.height!==s}}function Ra(_,r){let s,p=!1,m=null,b=null;const T=()=>{m=null,p&&(_.apply(b,s),m=setTimeout(T,r),p=!1)};return(...I)=>(p=!0,b=this,s=I,m||T(),m)}class sc{constructor(r){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let p;return s.split("&").map((m=>m.split("="))).forEach((m=>{m[0]===this._hashName&&(p=m)})),(p&&p[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(!this._isValidHash(s))return!1;const p=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:p,pitch:+(s[4]||0)}),!0},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const p=s.join("/");let m=p;m.split("&").length>0&&(m=m.split("&")[0]),this._hashName&&(m=`${this._hashName}=${p}`);let b=window.location.hash.replace(m,"");b.startsWith("#&")?b=b.slice(0,1)+b.slice(2):b==="#"&&(b="");let T=window.location.href.replace(/(#.+)?$/,b);T=T.replace("&&","&"),window.history.replaceState(window.history.state,null,T)},this._updateHash=Ra(this._updateHashUnthrottled,300),this._hashName=r&&encodeURIComponent(r)}addTo(r){return this._map=r,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(r){const s=this._map.getCenter(),p=Math.round(100*this._map.getZoom())/100,m=Math.ceil((p*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,m),T=Math.round(s.lng*b)/b,I=Math.round(s.lat*b)/b,R=this._map.getBearing(),j=this._map.getPitch();let G="";if(G+=r?`/${T}/${I}/${p}`:`${p}/${I}/${T}`,(R||j)&&(G+="/"+Math.round(10*R)/10),j&&(G+=`/${Math.round(j)}`),this._hashName){const X=this._hashName;let Y=!1;const ie=window.location.hash.slice(1).split("&").map((be=>{const Ue=be.split("=")[0];return Ue===X?(Y=!0,`${Ue}=${G}`):be})).filter((be=>be));return Y||ie.push(`${X}=${G}`),`#${ie.join("&")}`}return`#${G}`}_isValidHash(r){if(r.length<3||r.some(isNaN))return!1;try{new o.S(+r[2],+r[1])}catch{return!1}const s=+r[0],p=+(r[3]||0),m=+(r[4]||0);return s>=this._map.getMinZoom()&&s<=this._map.getMaxZoom()&&p>=-180&&p<=180&&m>=this._map.getMinPitch()&&m<=this._map.getMaxPitch()}}const ku={linearity:.3,easing:o.cl(0,0,.3,1)},hu=o.e({deceleration:2500,maxSpeed:1400},ku),Dc=o.e({deceleration:20,maxSpeed:1400},ku),Ru=o.e({deceleration:1e3,maxSpeed:360},ku),kc=o.e({deceleration:1e3,maxSpeed:90},ku),of=o.e({deceleration:1e3,maxSpeed:360},ku);class lc{constructor(r){this._map=r,this.clear()}clear(){this._inertiaBuffer=[]}record(r){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:M.now(),settings:r})}_drainInertiaBuffer(){const r=this._inertiaBuffer,s=M.now();for(;r.length>0&&s-r[0].time>160;)r.shift()}_onMoveEnd(r){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,roll:0,pan:new o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)s.zoom+=b.zoomDelta||0,s.bearing+=b.bearingDelta||0,s.pitch+=b.pitchDelta||0,s.roll+=b.rollDelta||0,b.panDelta&&s.pan._add(b.panDelta),b.around&&(s.around=b.around),b.pinchAround&&(s.pinchAround=b.pinchAround);const p=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,m={};if(s.pan.mag()){const b=cl(s.pan.mag(),p,o.e({},hu,r||{})),T=s.pan.mult(b.amount/s.pan.mag()),I=this._map.cameraHelper.handlePanInertia(T,this._map.transform);m.center=I.easingCenter,m.offset=I.easingOffset,Pl(m,b)}if(s.zoom){const b=cl(s.zoom,p,Dc);m.zoom=this._map.transform.zoom+b.amount,Pl(m,b)}if(s.bearing){const b=cl(s.bearing,p,Ru);m.bearing=this._map.transform.bearing+o.ag(b.amount,-179,179),Pl(m,b)}if(s.pitch){const b=cl(s.pitch,p,kc);m.pitch=this._map.transform.pitch+b.amount,Pl(m,b)}if(s.roll){const b=cl(s.roll,p,of);m.roll=this._map.transform.roll+o.ag(b.amount,-179,179),Pl(m,b)}if(m.zoom||m.bearing){const b=s.pinchAround===void 0?s.around:s.pinchAround;m.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),o.e(m,{noMoveStart:!0})}}function Pl(_,r){(!_.duration||_.duration<r.duration)&&(_.duration=r.duration,_.easing=r.easing)}function cl(_,r,s){const{maxSpeed:p,linearity:m,deceleration:b}=s,T=o.ag(_*m/(r/1e3),-p,p),I=Math.abs(T)/(b*m);return{easing:s.easing,duration:1e3*I,amount:T*(I/2)}}class _a extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p,m={}){p=p instanceof MouseEvent?p:new MouseEvent(r,p);const b=E.mousePos(s.getCanvas(),p),T=s.unproject(b);super(r,o.e({point:b,lngLat:T,originalEvent:p},m)),this._defaultPrevented=!1,this.target=s}}class Ws extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p){const m=r==="touchend"?p.changedTouches:p.touches,b=E.touchPos(s.getCanvasContainer(),m),T=b.map((R=>s.unproject(R))),I=b.reduce(((R,j,G,X)=>R.add(j.div(X.length))),new o.P(0,0));super(r,{points:b,point:I,lngLats:T,lngLat:s.unproject(I),originalEvent:p}),this._defaultPrevented=!1}}class Rc extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p){super(r,{originalEvent:p}),this._defaultPrevented=!1}}class af{constructor(r,s){this._map=r,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(r){return this._firePreventable(new Rc(r.type,this._map,r))}mousedown(r,s){return this._mousedownPos=s,this._firePreventable(new _a(r.type,this._map,r))}mouseup(r){this._map.fire(new _a(r.type,this._map,r))}click(r,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new _a(r.type,this._map,r))}dblclick(r){return this._firePreventable(new _a(r.type,this._map,r))}mouseover(r){this._map.fire(new _a(r.type,this._map,r))}mouseout(r){this._map.fire(new _a(r.type,this._map,r))}touchstart(r){return this._firePreventable(new Ws(r.type,this._map,r))}touchmove(r){this._map.fire(new Ws(r.type,this._map,r))}touchend(r){this._map.fire(new Ws(r.type,this._map,r))}touchcancel(r){this._map.fire(new Ws(r.type,this._map,r))}_firePreventable(r){if(this._map.fire(r),r.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sf{constructor(r){this._map=r}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(r){this._map.fire(new _a(r.type,this._map,r))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new _a("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(r){this._delayContextMenu?this._contextMenuEvent=r:this._ignoreContextMenu||this._map.fire(new _a(r.type,this._map,r)),this._map.listens("contextmenu")&&r.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Nu{constructor(r){this._map=r}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(r){return this.transform.screenPointToLocation(o.P.convert(r),this._map.terrain)}}class hh{constructor(r,s){this._map=r,this._tr=new Nu(r),this._el=r.getCanvasContainer(),this._container=r.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(r,s){this.isEnabled()&&r.shiftKey&&r.button===0&&(E.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(r,s){if(!this._active)return;const p=s;if(this._lastPos.equals(p)||!this._box&&p.dist(this._startPos)<this._clickTolerance)return;const m=this._startPos;this._lastPos=p,this._box||(this._box=E.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",r));const b=Math.min(m.x,p.x),T=Math.max(m.x,p.x),I=Math.min(m.y,p.y),R=Math.max(m.y,p.y);E.setTransform(this._box,`translate(${b}px,${I}px)`),this._box.style.width=T-b+"px",this._box.style.height=R-I+"px"}mouseupWindow(r,s){if(!this._active||r.button!==0)return;const p=this._startPos,m=s;if(this.reset(),E.suppressClick(),p.x!==m.x||p.y!==m.y)return this._map.fire(new o.l("boxzoomend",{originalEvent:r})),{cameraAnimation:b=>b.fitScreenCoordinates(p,m,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",r)}keydown(r){this._active&&r.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",r))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(E.remove(this._box),this._box=null),E.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(r,s){return this._map.fire(new o.l(r,{originalEvent:s}))}}function Nc(_,r){if(_.length!==r.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${r.length}`);const s={};for(let p=0;p<_.length;p++)s[_[p].identifier]=r[p];return s}class lf{constructor(r){this.reset(),this.numTouches=r.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(r,s,p){(this.centroid||p.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=r.timeStamp),p.length===this.numTouches&&(this.centroid=(function(m){const b=new o.P(0,0);for(const T of m)b._add(T);return b.div(m.length)})(s),this.touches=Nc(p,s)))}touchmove(r,s,p){if(this.aborted||!this.centroid)return;const m=Nc(p,s);for(const b in this.touches){const T=m[b];(!T||T.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(r,s,p){if((!this.centroid||r.timeStamp-this.startTime>500)&&(this.aborted=!0),p.length===0){const m=!this.aborted&&this.centroid;if(this.reset(),m)return m}}}class uc{constructor(r){this.singleTap=new lf(r),this.numTaps=r.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(r,s,p){this.singleTap.touchstart(r,s,p)}touchmove(r,s,p){this.singleTap.touchmove(r,s,p)}touchend(r,s,p){const m=this.singleTap.touchend(r,s,p);if(m){const b=r.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(m)<30;if(b&&T||this.reset(),this.count++,this.lastTime=r.timeStamp,this.lastTap=m,this.count===this.numTaps)return this.reset(),m}}}class fu{constructor(r){this._tr=new Nu(r),this._zoomIn=new uc({numTouches:1,numTaps:2}),this._zoomOut=new uc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(r,s,p){this._zoomIn.touchstart(r,s,p),this._zoomOut.touchstart(r,s,p)}touchmove(r,s,p){this._zoomIn.touchmove(r,s,p),this._zoomOut.touchmove(r,s,p)}touchend(r,s,p){const m=this._zoomIn.touchend(r,s,p),b=this._zoomOut.touchend(r,s,p),T=this._tr;return m?(this._active=!0,r.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:I=>I.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(m)},{originalEvent:r})}):b?(this._active=!0,r.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:I=>I.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(b)},{originalEvent:r})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ou{constructor(r){this._enabled=!!r.enable,this._moveStateManager=r.moveStateManager,this._clickTolerance=r.clickTolerance||1,this._moveFunction=r.move,this._activateOnStart=!!r.activateOnStart,r.assignEvents(this),this.reset()}reset(r){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(r)}_move(...r){const s=this._moveFunction(...r);if(s.bearingDelta||s.pitchDelta||s.rollDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(r,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(r)&&(this._moveStateManager.startMove(r),this._lastPoint=Array.isArray(s)?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(r,s){if(!this.isEnabled())return;const p=this._lastPoint;if(!p)return;if(r.preventDefault(),!this._moveStateManager.isValidMoveEvent(r))return void this.reset(r);const m=Array.isArray(s)?s[0]:s;return!this._moved&&m.dist(p)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=m,this._move(p,m))}dragEnd(r){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(r)&&(this._moved&&E.suppressClick(),this.reset(r))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Is=0,Ms=2,C={[Is]:1,[Ms]:2};class L{constructor(r){this._correctEvent=r.checkCorrectEvent}startMove(r){const s=E.mouseButton(r);this._eventButton=s}endMove(r){delete this._eventButton}isValidStartEvent(r){return this._correctEvent(r)}isValidMoveEvent(r){return!(function(s,p){const m=C[p];return s.buttons===void 0||(s.buttons&m)!==m})(r,this._eventButton)}isValidEndEvent(r){return E.mouseButton(r)===this._eventButton}}class ${constructor(){this._firstTouch=void 0}_isOneFingerTouch(r){return r.targetTouches.length===1}_isSameTouchEvent(r){return r.targetTouches[0].identifier===this._firstTouch}startMove(r){this._firstTouch=r.targetTouches[0].identifier}endMove(r){delete this._firstTouch}isValidStartEvent(r){return this._isOneFingerTouch(r)}isValidMoveEvent(r){return this._isOneFingerTouch(r)&&this._isSameTouchEvent(r)}isValidEndEvent(r){return this._isOneFingerTouch(r)&&this._isSameTouchEvent(r)}}class K{constructor(r=new L({checkCorrectEvent:()=>!0}),s=new $){this.mouseMoveStateManager=r,this.oneFingerTouchMoveStateManager=s}_executeRelevantHandler(r,s,p){return r instanceof MouseEvent?s(r):typeof TouchEvent<"u"&&r instanceof TouchEvent?p(r):void 0}startMove(r){this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.startMove(s)),(s=>this.oneFingerTouchMoveStateManager.startMove(s)))}endMove(r){this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.endMove(s)),(s=>this.oneFingerTouchMoveStateManager.endMove(s)))}isValidStartEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidStartEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidStartEvent(s)))}isValidMoveEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidMoveEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(s)))}isValidEndEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidEndEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidEndEvent(s)))}}const ve=_=>{_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=r=>{r.preventDefault()}};class Ce{constructor(r,s){this._clickTolerance=r.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(r){return r<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(r,s,p){return this._calculateTransform(r,s,p)}touchmove(r,s,p){if(this._active){if(!this._shouldBePrevented(p.length))return r.preventDefault(),this._calculateTransform(r,s,p);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",r)}}touchend(r,s,p){this._calculateTransform(r,s,p),this._active&&this._shouldBePrevented(p.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(r,s,p){p.length>0&&(this._active=!0);const m=Nc(p,s),b=new o.P(0,0),T=new o.P(0,0);let I=0;for(const j in m){const G=m[j],X=this._touches[j];X&&(b._add(G),T._add(G.sub(X)),I++,m[j]=G)}if(this._touches=m,this._shouldBePrevented(I)||!T.mag())return;const R=T.div(I);return this._sum._add(R),this._sum.mag()<this._clickTolerance?void 0:{around:b.div(I),panDelta:R}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class De{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(r,s,p){this._firstTwoTouches||p.length<2||(this._firstTwoTouches=[p[0].identifier,p[1].identifier],this._start([s[0],s[1]]))}touchmove(r,s,p){if(!this._firstTwoTouches)return;r.preventDefault();const[m,b]=this._firstTwoTouches,T=Oe(p,s,m),I=Oe(p,s,b);if(!T||!I)return;const R=this._aroundCenter?null:T.add(I).div(2);return this._move([T,I],R,r)}touchend(r,s,p){if(!this._firstTwoTouches)return;const[m,b]=this._firstTwoTouches,T=Oe(p,s,m),I=Oe(p,s,b);T&&I||(this._active&&E.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(r){this._enabled=!0,this._aroundCenter=!!r&&r.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Oe(_,r,s){for(let p=0;p<_.length;p++)if(_[p].identifier===s)return r[p]}function $e(_,r){return Math.log(_/r)/Math.LN2}class Je extends De{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(r){this._startDistance=this._distance=r[0].dist(r[1])}_move(r,s){const p=this._distance;if(this._distance=r[0].dist(r[1]),this._active||!(Math.abs($e(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:$e(this._distance,p),pinchAround:s}}}function Qe(_,r){return 180*_.angleWith(r)/Math.PI}class Gt extends De{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(r){this._startVector=this._vector=r[0].sub(r[1]),this._minDiameter=r[0].dist(r[1])}_move(r,s,p){const m=this._vector;if(this._vector=r[0].sub(r[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Qe(this._vector,m),pinchAround:s}}_isBelowThreshold(r){this._minDiameter=Math.min(this._minDiameter,r.mag());const s=25/(Math.PI*this._minDiameter)*360,p=Qe(r,this._startVector);return Math.abs(p)<s}}function et(_){return Math.abs(_.y)>Math.abs(_.x)}class Lt extends De{constructor(r){super(),this._currentTouchCount=0,this._map=r}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(r,s,p){super.touchstart(r,s,p),this._currentTouchCount=p.length}_start(r){this._lastPoints=r,et(r[0].sub(r[1]))&&(this._valid=!1)}_move(r,s,p){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const m=r[0].sub(this._lastPoints[0]),b=r[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(m,b,p.timeStamp),this._valid?(this._lastPoints=r,this._active=!0,{pitchDelta:(m.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(r,s,p){if(this._valid!==void 0)return this._valid;const m=r.mag()>=2,b=s.mag()>=2;if(!m&&!b)return;if(!m||!b)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;const T=r.y>0==s.y>0;return et(r)&&et(s)&&T}}const Ot={panStep:100,bearingStep:15,pitchStep:10};class tr{constructor(r){this._tr=new Nu(r);const s=Ot;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(r){if(r.altKey||r.ctrlKey||r.metaKey)return;let s=0,p=0,m=0,b=0,T=0;switch(r.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:r.shiftKey?p=-1:(r.preventDefault(),b=-1);break;case 39:r.shiftKey?p=1:(r.preventDefault(),b=1);break;case 38:r.shiftKey?m=1:(r.preventDefault(),T=-1);break;case 40:r.shiftKey?m=-1:(r.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(p=0,m=0),{cameraAnimation:I=>{const R=this._tr;I.easeTo({duration:300,easeId:"keyboardHandler",easing:$t,zoom:s?Math.round(R.zoom)+s*(r.shiftKey?2:1):R.zoom,bearing:R.bearing+p*this._bearingStep,pitch:R.pitch+m*this._pitchStep,offset:[-b*this._panStep,-T*this._panStep],center:R.center},{originalEvent:r})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function $t(_){return _*(2-_)}const jt=4.000244140625,ir=1/450;class Cr{constructor(r,s){this._onTimeout=p=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(p)},this._map=r,this._tr=new Nu(r),this._triggerRenderFrame=s,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=ir}setZoomRate(r){this._defaultZoomRate=r}setWheelZoomRate(r){this._wheelZoomRate=r}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(r){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!r&&r.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(r){return!!this._map.cooperativeGestures.isEnabled()&&!(r.ctrlKey||this._map.cooperativeGestures.isBypassed(r))}wheel(r){if(!this.isEnabled())return;if(this._shouldBePrevented(r))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",r);let s=r.deltaMode===WheelEvent.DOM_DELTA_LINE?40*r.deltaY:r.deltaY;const p=M.now(),m=p-(this._lastWheelEventTime||0);this._lastWheelEventTime=p,s!==0&&s%jt==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":m>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,r)):this._type||(this._type=Math.abs(m*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),r.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=r,this._delta-=s,this._active||this._start(r)),r.preventDefault()}_start(r){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const s=E.mousePos(this._map.getCanvas(),r),p=this._tr;this._aroundPoint=this._aroundCenter?p.transform.locationToScreenPoint(o.S.convert(p.center)):s,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const r=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const I=r.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=I),typeof this._targetZoom=="number"&&(this._targetZoom+=I)}if(this._delta!==0){const I=this._type==="wheel"&&Math.abs(this._delta)>jt?this._wheelZoomRate:this._defaultZoomRate;let R=2/(1+Math.exp(-Math.abs(this._delta*I)));this._delta<0&&R!==0&&(R=1/R);const j=typeof this._targetZoom!="number"?r.scale:o.ae(this._targetZoom);this._targetZoom=r.getConstrained(r.getCameraLngLat(),o.aj(j*R)).zoom,this._type==="wheel"&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom!="number"?r.zoom:this._targetZoom,p=this._startZoom,m=this._easing;let b,T=!1;if(this._type==="wheel"&&p&&m){const I=M.now()-this._lastWheelEventTime,R=Math.min((I+5)/200,1),j=m(R);b=o.C.number(p,s,j),R<1?this._frameId||(this._frameId=!0):T=!0}else b=s,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=b,{noInertia:!0,needsRenderFrame:!T,zoomDelta:b-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(r){let s=o.cn;if(this._prevEase){const p=this._prevEase,m=(M.now()-p.start)/p.duration,b=p.easing(m+.01)-p.easing(m),T=.27/Math.sqrt(b*b+1e-4)*.01,I=Math.sqrt(.0729-T*T);s=o.cl(T,I,.25,1)}return this._prevEase={start:M.now(),duration:r,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class mr{constructor(r,s){this._clickZoom=r,this._tapZoom=s}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class yn{constructor(r){this._tr=new Nu(r),this.reset()}reset(){this._active=!1}dblclick(r,s){return r.preventDefault(),{cameraAnimation:p=>{p.easeTo({duration:300,zoom:this._tr.zoom+(r.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:r})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class an{constructor(){this._tap=new uc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(r,s,p){if(!this._swipePoint)if(this._tapTime){const m=s[0],b=r.timeStamp-this._tapTime<500,T=this._tapPoint.dist(m)<30;b&&T?p.length>0&&(this._swipePoint=m,this._swipeTouch=p[0].identifier):this.reset()}else this._tap.touchstart(r,s,p)}touchmove(r,s,p){if(this._tapTime){if(this._swipePoint){if(p[0].identifier!==this._swipeTouch)return;const m=s[0],b=m.y-this._swipePoint.y;return this._swipePoint=m,r.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(r,s,p)}touchend(r,s,p){if(this._tapTime)this._swipePoint&&p.length===0&&this.reset();else{const m=this._tap.touchend(r,s,p);m&&(this._tapTime=r.timeStamp,this._tapPoint=m)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zn{constructor(r,s,p){this._el=r,this._mousePan=s,this._touchPan=p}enable(r){this._inertiaOptions=r||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class un{constructor(r,s,p,m){this._pitchWithRotate=r.pitchWithRotate,this._rollEnabled=r.rollEnabled,this._mouseRotate=s,this._mousePitch=p,this._mouseRoll=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Yn{constructor(r,s,p,m){this._el=r,this._touchZoom=s,this._touchRotate=p,this._tapDragZoom=m,this._rotationDisabled=!1,this._enabled=!0}enable(r){this._touchZoom.enable(r),this._rotationDisabled||this._touchRotate.enable(r),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ko{constructor(r,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=r,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const r=this._map.getCanvasContainer();r.classList.add("maplibregl-cooperative-gestures"),this._container=E.create("div","maplibregl-cooperative-gesture-screen",r);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const p=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),m=document.createElement("div");m.className="maplibregl-desktop-message",m.textContent=s,this._container.appendChild(m);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=p,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(E.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(r){return r[this._bypassKey]}notifyGestureBlocked(r,s){this._enabled&&(this._map.fire(new o.l("cooperativegestureprevented",{gestureType:r,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const kn=_=>_.zoom||_.drag||_.roll||_.pitch||_.rotate;class fn extends o.l{}function $r(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta||_.rollDelta}class Mi{constructor(r,s){this.handleWindowEvent=m=>{this.handleEvent(m,`${m.type}Window`)},this.handleEvent=(m,b)=>{if(m.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=m.type==="renderFrame"?void 0:m,I={needsRenderFrame:!1},R={},j={};for(const{handlerName:Y,handler:ie,allowed:be}of this._handlers){if(!ie.isEnabled())continue;let Ue;if(this._blockedByActive(j,be,Y))ie.reset();else if(ie[b||m.type]){if(o.co(m,b||m.type)){const je=E.mousePos(this._map.getCanvas(),m);Ue=ie[b||m.type](m,je)}else if(o.cp(m,b||m.type)){const je=this._getMapTouches(m.touches),qe=E.touchPos(this._map.getCanvas(),je);Ue=ie[b||m.type](m,qe,je)}else o.cq(b||m.type)||(Ue=ie[b||m.type](m));this.mergeHandlerResult(I,R,Ue,Y,T),Ue&&Ue.needsRenderFrame&&this._triggerRenderFrame()}(Ue||ie.isActive())&&(j[Y]=ie)}const G={};for(const Y in this._previousActiveHandlers)j[Y]||(G[Y]=T);this._previousActiveHandlers=j,(Object.keys(G).length||$r(I))&&(this._changes.push([I,R,G]),this._triggerRenderFrame()),(Object.keys(j).length||$r(I))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:X}=I;X&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],X(this._map))},this._map=r,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lc(r),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const p=this._el;this._listeners=[[p,"touchstart",{passive:!0}],[p,"touchmove",{passive:!1}],[p,"touchend",void 0],[p,"touchcancel",void 0],[p,"mousedown",void 0],[p,"mousemove",void 0],[p,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[p,"mouseover",void 0],[p,"mouseout",void 0],[p,"dblclick",void 0],[p,"click",void 0],[p,"keydown",{capture:!1}],[p,"keyup",void 0],[p,"wheel",{passive:!1}],[p,"contextmenu",void 0],[window,"blur",void 0]];for(const[m,b,T]of this._listeners)E.addEventListener(m,b,m===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[r,s,p]of this._listeners)E.removeEventListener(r,s,r===document?this.handleWindowEvent:this.handleEvent,p)}_addDefaultHandlers(r){const s=this._map,p=s.getCanvasContainer();this._add("mapEvent",new af(s,r));const m=s.boxZoom=new hh(s,r);this._add("boxZoom",m),r.interactive&&r.boxZoom&&m.enable();const b=s.cooperativeGestures=new ko(s,r.cooperativeGestures);this._add("cooperativeGestures",b),r.cooperativeGestures&&b.enable();const T=new fu(s),I=new yn(s);s.doubleClickZoom=new mr(I,T),this._add("tapZoom",T),this._add("clickZoom",I),r.interactive&&r.doubleClickZoom&&s.doubleClickZoom.enable();const R=new an;this._add("tapDragZoom",R);const j=s.touchPitch=new Lt(s);this._add("touchPitch",j),r.interactive&&r.touchPitch&&s.touchPitch.enable(r.touchPitch);const G=()=>s.project(s.getCenter()),X=(function({enable:nt,clickTolerance:dt,aroundCenter:bt=!0,minPixelCenterThreshold:rt=100,rotateDegreesPerPixelMoved:At=.8},qt){const Bt=new L({checkCorrectEvent:zt=>E.mouseButton(zt)===0&&zt.ctrlKey||E.mouseButton(zt)===2&&!zt.ctrlKey});return new Ou({clickTolerance:dt,move:(zt,Vt)=>{const Dr=qt();if(bt&&Math.abs(Dr.y-zt.y)>rt)return{bearingDelta:o.cm(new o.P(zt.x,Vt.y),Vt,Dr)};let Ar=(Vt.x-zt.x)*At;return bt&&Vt.y<Dr.y&&(Ar=-Ar),{bearingDelta:Ar}},moveStateManager:Bt,enable:nt,assignEvents:ve})})(r,G),Y=(function({enable:nt,clickTolerance:dt,pitchDegreesPerPixelMoved:bt=-.5}){const rt=new L({checkCorrectEvent:At=>E.mouseButton(At)===0&&At.ctrlKey||E.mouseButton(At)===2});return new Ou({clickTolerance:dt,move:(At,qt)=>({pitchDelta:(qt.y-At.y)*bt}),moveStateManager:rt,enable:nt,assignEvents:ve})})(r),ie=(function({enable:nt,clickTolerance:dt,rollDegreesPerPixelMoved:bt=.3},rt){const At=new L({checkCorrectEvent:qt=>E.mouseButton(qt)===2&&qt.ctrlKey});return new Ou({clickTolerance:dt,move:(qt,Bt)=>{const zt=rt();let Vt=(Bt.x-qt.x)*bt;return Bt.y<zt.y&&(Vt=-Vt),{rollDelta:Vt}},moveStateManager:At,enable:nt,assignEvents:ve})})(r,G);s.dragRotate=new un(r,X,Y,ie),this._add("mouseRotate",X,["mousePitch"]),this._add("mousePitch",Y,["mouseRotate","mouseRoll"]),this._add("mouseRoll",ie,["mousePitch"]),r.interactive&&r.dragRotate&&s.dragRotate.enable();const be=(function({enable:nt,clickTolerance:dt}){const bt=new L({checkCorrectEvent:rt=>E.mouseButton(rt)===0&&!rt.ctrlKey});return new Ou({clickTolerance:dt,move:(rt,At)=>({around:At,panDelta:At.sub(rt)}),activateOnStart:!0,moveStateManager:bt,enable:nt,assignEvents:ve})})(r),Ue=new Ce(r,s);s.dragPan=new zn(p,be,Ue),this._add("mousePan",be),this._add("touchPan",Ue,["touchZoom","touchRotate"]),r.interactive&&r.dragPan&&s.dragPan.enable(r.dragPan);const je=new Gt,qe=new Je;s.touchZoomRotate=new Yn(p,qe,je,R),this._add("touchRotate",je,["touchPan","touchZoom"]),this._add("touchZoom",qe,["touchPan","touchRotate"]),r.interactive&&r.touchZoomRotate&&s.touchZoomRotate.enable(r.touchZoomRotate);const Ke=s.scrollZoom=new Cr(s,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Ke,["mousePan"]),r.interactive&&r.scrollZoom&&s.scrollZoom.enable(r.scrollZoom);const lt=s.keyboard=new tr(s);this._add("keyboard",lt),r.interactive&&r.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new sf(s))}_add(r,s,p){this._handlers.push({handlerName:r,handler:s,allowed:p}),this._handlersById[r]=s}stop(r){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.reset();this._inertia.clear(),this._fireEvents({},{},r),this._changes=[]}}isActive(){for(const{handler:r}of this._handlers)if(r.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!kn(this._eventsInProgress)||this.isZooming()}_blockedByActive(r,s,p){for(const m in r)if(m!==p&&(!s||s.indexOf(m)<0))return!0;return!1}_getMapTouches(r){const s=[];for(const p of r)this._el.contains(p.target)&&s.push(p);return s}mergeHandlerResult(r,s,p,m,b){if(!p)return;o.e(r,p);const T={handlerName:m,originalEvent:p.originalEvent||b};p.zoomDelta!==void 0&&(s.zoom=T),p.panDelta!==void 0&&(s.drag=T),p.rollDelta!==void 0&&(s.roll=T),p.pitchDelta!==void 0&&(s.pitch=T),p.bearingDelta!==void 0&&(s.rotate=T)}_applyChanges(){const r={},s={},p={};for(const[m,b,T]of this._changes)m.panDelta&&(r.panDelta=(r.panDelta||new o.P(0,0))._add(m.panDelta)),m.zoomDelta&&(r.zoomDelta=(r.zoomDelta||0)+m.zoomDelta),m.bearingDelta&&(r.bearingDelta=(r.bearingDelta||0)+m.bearingDelta),m.pitchDelta&&(r.pitchDelta=(r.pitchDelta||0)+m.pitchDelta),m.rollDelta&&(r.rollDelta=(r.rollDelta||0)+m.rollDelta),m.around!==void 0&&(r.around=m.around),m.pinchAround!==void 0&&(r.pinchAround=m.pinchAround),m.noInertia&&(r.noInertia=m.noInertia),o.e(s,b),o.e(p,T);this._updateMapTransform(r,s,p),this._changes=[]}_updateMapTransform(r,s,p){const m=this._map,b=m._getTransformForUpdate(),T=m.terrain;if(!($r(r)||T&&this._terrainMovement))return this._fireEvents(s,p,!0);m._stop(!0);let{panDelta:I,zoomDelta:R,bearingDelta:j,pitchDelta:G,rollDelta:X,around:Y,pinchAround:ie}=r;ie!==void 0&&(Y=ie),Y=Y||m.transform.centerPoint,T&&!b.isPointOnMapSurface(Y)&&(Y=b.centerPoint);const be={panDelta:I,zoomDelta:R,rollDelta:X,pitchDelta:G,bearingDelta:j,around:Y};this._map.cameraHelper.useGlobeControls&&!b.isPointOnMapSurface(Y)&&(Y=b.centerPoint);const Ue=Y.distSqr(b.centerPoint)<.01?b.center:b.screenPointToLocation(I?Y.sub(I):Y);T?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(be,b),this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?b.setCenter(b.screenPointToLocation(b.centerPoint.sub(I))):this._map.cameraHelper.handleMapControlsPan(be,b,Ue):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(be,b,Ue))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(be,b),this._map.cameraHelper.handleMapControlsPan(be,b,Ue)),m._applyUpdatedTransform(b),this._map._update(),r.noInertia||this._inertia.record(r),this._fireEvents(s,p,!0)}_fireEvents(r,s,p){const m=kn(this._eventsInProgress),b=kn(r),T={};for(const X in r){const{originalEvent:Y}=r[X];this._eventsInProgress[X]||(T[`${X}start`]=Y),this._eventsInProgress[X]=r[X]}!m&&b&&this._fireEvent("movestart",b.originalEvent);for(const X in T)this._fireEvent(X,T[X]);b&&this._fireEvent("move",b.originalEvent);for(const X in r){const{originalEvent:Y}=r[X];this._fireEvent(X,Y)}const I={};let R;for(const X in this._eventsInProgress){const{handlerName:Y,originalEvent:ie}=this._eventsInProgress[X];this._handlersById[Y].isActive()||(delete this._eventsInProgress[X],R=s[Y]||ie,I[`${X}end`]=R)}for(const X in I)this._fireEvent(X,I[X]);const j=kn(this._eventsInProgress),G=(m||b)&&!j;if(G&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const X=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&X.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(X)}if(p&&G){this._updatingCamera=!0;const X=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Y=ie=>ie!==0&&-this._bearingSnap<ie&&ie<this._bearingSnap;!X||!X.essential&&M.prefersReducedMotion?(this._map.fire(new o.l("moveend",{originalEvent:R})),Y(this._map.getBearing())&&this._map.resetNorth()):(Y(X.bearing||this._map.getBearing())&&(X.bearing=0),X.freezeElevation=!0,this._map.easeTo(X,{originalEvent:R})),this._updatingCamera=!1}}_fireEvent(r,s){this._map.fire(new o.l(r,s?{originalEvent:s}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((r=>{delete this._frameId,this.handleEvent(new fn("renderFrame",{timeStamp:r})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class en extends o.E{constructor(r,s,p){super(),this._renderFrameCallback=()=>{const m=Math.min((M.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=p.bearingSnap,this.cameraHelper=s,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(r,s){r.apply(this.transform),this.transform=r,this.cameraHelper=s}getCenter(){return new o.S(this.transform.center.lng,this.transform.center.lat)}setCenter(r,s){return this.jumpTo({center:r},s)}getCenterElevation(){return this.transform.elevation}setCenterElevation(r,s){return this.jumpTo({elevation:r},s),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(r){this._centerClampedToGround=r}panBy(r,s,p){return r=o.P.convert(r).mult(-1),this.panTo(this.transform.center,o.e({offset:r},s),p)}panTo(r,s,p){return this.easeTo(o.e({center:r},s),p)}getZoom(){return this.transform.zoom}setZoom(r,s){return this.jumpTo({zoom:r},s),this}zoomTo(r,s,p){return this.easeTo(o.e({zoom:r},s),p)}zoomIn(r,s){return this.zoomTo(this.getZoom()+1,r,s),this}zoomOut(r,s){return this.zoomTo(this.getZoom()-1,r,s),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(r,s){return r!=this.transform.fov&&(this.transform.setFov(r),this.fire(new o.l("movestart",s)).fire(new o.l("move",s)).fire(new o.l("moveend",s))),this}getBearing(){return this.transform.bearing}setBearing(r,s){return this.jumpTo({bearing:r},s),this}getPadding(){return this.transform.padding}setPadding(r,s){return this.jumpTo({padding:r},s),this}rotateTo(r,s,p){return this.easeTo(o.e({bearing:r},s),p)}resetNorth(r,s){return this.rotateTo(0,o.e({duration:1e3},r),s),this}resetNorthPitch(r,s){return this.easeTo(o.e({bearing:0,pitch:0,roll:0,duration:1e3},r),s),this}snapToNorth(r,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(r,s):this}getPitch(){return this.transform.pitch}setPitch(r,s){return this.jumpTo({pitch:r},s),this}getRoll(){return this.transform.roll}setRoll(r,s){return this.jumpTo({roll:r},s),this}cameraForBounds(r,s){r=Kt.convert(r).adjustAntiMeridian();const p=s&&s.bearing||0;return this._cameraForBoxAndBearing(r.getNorthWest(),r.getSouthEast(),p,s)}_cameraForBoxAndBearing(r,s,p,m){const b={top:0,bottom:0,right:0,left:0};if(typeof(m=o.e({padding:b,offset:[0,0],maxZoom:this.transform.maxZoom},m)).padding=="number"){const j=m.padding;m.padding={top:j,bottom:j,right:j,left:j}}const T=o.e(b,m.padding);m.padding=T;const I=this.transform,R=new Kt(r,s);return this.cameraHelper.cameraForBoxAndBearing(m,T,R,p,I)}fitBounds(r,s,p){return this._fitInternal(this.cameraForBounds(r,s),s,p)}fitScreenCoordinates(r,s,p,m,b){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(r)),this.transform.screenPointToLocation(o.P.convert(s)),p,m),m,b)}_fitInternal(r,s,p){return r?(delete(s=o.e(r,s)).padding,s.linear?this.easeTo(s,p):this.flyTo(s,p)):this}jumpTo(r,s){this.stop();const p=this._getTransformForUpdate();let m=!1,b=!1,T=!1;const I=p.zoom;this.cameraHelper.handleJumpToCenterZoom(p,r);const R=p.zoom!==I;return"elevation"in r&&p.elevation!==+r.elevation&&p.setElevation(+r.elevation),"bearing"in r&&p.bearing!==+r.bearing&&(m=!0,p.setBearing(+r.bearing)),"pitch"in r&&p.pitch!==+r.pitch&&(b=!0,p.setPitch(+r.pitch)),"roll"in r&&p.roll!==+r.roll&&(T=!0,p.setRoll(+r.roll)),r.padding==null||p.isPaddingEqual(r.padding)||p.setPadding(r.padding),this._applyUpdatedTransform(p),this.fire(new o.l("movestart",s)).fire(new o.l("move",s)),R&&this.fire(new o.l("zoomstart",s)).fire(new o.l("zoom",s)).fire(new o.l("zoomend",s)),m&&this.fire(new o.l("rotatestart",s)).fire(new o.l("rotate",s)).fire(new o.l("rotateend",s)),b&&this.fire(new o.l("pitchstart",s)).fire(new o.l("pitch",s)).fire(new o.l("pitchend",s)),T&&this.fire(new o.l("rollstart",s)).fire(new o.l("roll",s)).fire(new o.l("rollend",s)),this.fire(new o.l("moveend",s))}calculateCameraOptionsFromTo(r,s,p,m=0){const b=o.a0.fromLngLat(r,s),T=o.a0.fromLngLat(p,m),I=T.x-b.x,R=T.y-b.y,j=T.z-b.z,G=Math.hypot(I,R,j);if(G===0)throw new Error("Can't calculate camera options with same From and To");const X=Math.hypot(I,R),Y=o.aj(this.transform.cameraToCenterDistance/G/this.transform.tileSize),ie=180*Math.atan2(I,-R)/Math.PI;let be=180*Math.acos(X/G)/Math.PI;return be=j<0?90-be:90+be,{center:T.toLngLat(),elevation:m,zoom:Y,pitch:be,bearing:ie}}calculateCameraOptionsFromCameraLngLatAltRotation(r,s,p,m,b){const T=this.transform.calculateCenterFromCameraLngLatAlt(r,s,p,m);return{center:T.center,elevation:T.elevation,zoom:T.zoom,bearing:p,pitch:m,roll:b}}easeTo(r,s){this._stop(!1,r.easeId),((r=o.e({offset:[0,0],duration:500,easing:o.cn},r)).animate===!1||!r.essential&&M.prefersReducedMotion)&&(r.duration=0);const p=this._getTransformForUpdate(),m=this.getBearing(),b=p.pitch,T=p.roll,I="bearing"in r?this._normalizeBearing(r.bearing,m):m,R="pitch"in r?+r.pitch:b,j="roll"in r?this._normalizeBearing(r.roll,T):T,G="padding"in r?r.padding:p.padding,X=o.P.convert(r.offset);let Y,ie;r.around&&(Y=o.S.convert(r.around),ie=p.locationToScreenPoint(Y));const be={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},Ue=this.cameraHelper.handleEaseTo(p,{bearing:I,pitch:R,roll:j,padding:G,around:Y,aroundPoint:ie,offsetAsPoint:X,offset:r.offset,zoom:r.zoom,center:r.center});return this._rotating=this._rotating||m!==I,this._pitching=this._pitching||R!==b,this._rolling=this._rolling||j!==T,this._padding=!p.isPaddingEqual(G),this._zooming=this._zooming||Ue.isZooming,this._easeId=r.easeId,this._prepareEase(s,r.noMoveStart,be),this.terrain&&this._prepareElevation(Ue.elevationCenter),this._ease((je=>{Ue.easeFunc(je),this.terrain&&!r.freezeElevation&&this._updateElevation(je),this._applyUpdatedTransform(p),this._fireMoveEvents(s)}),(je=>{this.terrain&&r.freezeElevation&&this._finalizeElevation(),this._afterEase(s,je)}),r),this}_prepareEase(r,s,p={}){this._moving=!0,s||p.moving||this.fire(new o.l("movestart",r)),this._zooming&&!p.zooming&&this.fire(new o.l("zoomstart",r)),this._rotating&&!p.rotating&&this.fire(new o.l("rotatestart",r)),this._pitching&&!p.pitching&&this.fire(new o.l("pitchstart",r)),this._rolling&&!p.rolling&&this.fire(new o.l("rollstart",r))}_prepareElevation(r){this._elevationCenter=r,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(r){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(r<1&&s!==this._elevationTarget){const p=this._elevationTarget-this._elevationStart;this._elevationStart+=r*(p-(s-(p*r+this._elevationStart))/(1-r)),this._elevationTarget=s}this.transform.setElevation(o.C.number(this._elevationStart,this._elevationTarget,r))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(r){if(!this.terrain&&r.elevation>=0&&r.pitch<=90)return{};const s=r.getCameraLngLat(),p=r.getCameraAltitude(),m=this.terrain?this.terrain.getElevationForLngLatZoom(s,r.zoom):0;if(p<m){const b=this.calculateCameraOptionsFromTo(s,m,r.center,r.elevation);return{pitch:b.pitch,zoom:b.zoom}}return{}}_applyUpdatedTransform(r){const s=[];if(s.push((m=>this._elevateCameraIfInsideTerrain(m))),this.transformCameraUpdate&&s.push((m=>this.transformCameraUpdate(m))),!s.length)return;const p=r.clone();for(const m of s){const b=p.clone(),{center:T,zoom:I,roll:R,pitch:j,bearing:G,elevation:X}=m(b);T&&b.setCenter(T),X!==void 0&&b.setElevation(X),I!==void 0&&b.setZoom(I),R!==void 0&&b.setRoll(R),j!==void 0&&b.setPitch(j),G!==void 0&&b.setBearing(G),p.apply(b)}this.transform.apply(p)}_fireMoveEvents(r){this.fire(new o.l("move",r)),this._zooming&&this.fire(new o.l("zoom",r)),this._rotating&&this.fire(new o.l("rotate",r)),this._pitching&&this.fire(new o.l("pitch",r)),this._rolling&&this.fire(new o.l("roll",r))}_afterEase(r,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const p=this._zooming,m=this._rotating,b=this._pitching,T=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,p&&this.fire(new o.l("zoomend",r)),m&&this.fire(new o.l("rotateend",r)),b&&this.fire(new o.l("pitchend",r)),T&&this.fire(new o.l("rollend",r)),this.fire(new o.l("moveend",r))}flyTo(r,s){if(!r.essential&&M.prefersReducedMotion){const Vt=o.Q(r,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(Vt,s)}this.stop(),r=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.cn},r);const p=this._getTransformForUpdate(),m=p.bearing,b=p.pitch,T=p.roll,I=p.padding,R="bearing"in r?this._normalizeBearing(r.bearing,m):m,j="pitch"in r?+r.pitch:b,G="roll"in r?this._normalizeBearing(r.roll,T):T,X="padding"in r?r.padding:p.padding,Y=o.P.convert(r.offset);let ie=p.centerPoint.add(Y);const be=p.screenPointToLocation(ie),Ue=this.cameraHelper.handleFlyTo(p,{bearing:R,pitch:j,roll:G,padding:X,locationAtOffset:be,offsetAsPoint:Y,center:r.center,minZoom:r.minZoom,zoom:r.zoom});let je=r.curve;const qe=Math.max(p.width,p.height),Ke=qe/Ue.scaleOfZoom,lt=Ue.pixelPathLength;typeof Ue.scaleOfMinZoom=="number"&&(je=Math.sqrt(qe/Ue.scaleOfMinZoom/lt*2));const nt=je*je;function dt(Vt){const Dr=(Ke*Ke-qe*qe+(Vt?-1:1)*nt*nt*lt*lt)/(2*(Vt?Ke:qe)*nt*lt);return Math.log(Math.sqrt(Dr*Dr+1)-Dr)}function bt(Vt){return(Math.exp(Vt)-Math.exp(-Vt))/2}function rt(Vt){return(Math.exp(Vt)+Math.exp(-Vt))/2}const At=dt(!1);let qt=function(Vt){return rt(At)/rt(At+je*Vt)},Bt=function(Vt){return qe*((rt(At)*(bt(Dr=At+je*Vt)/rt(Dr))-bt(At))/nt)/lt;var Dr},zt=(dt(!0)-At)/je;if(Math.abs(lt)<2e-6||!isFinite(zt)){if(Math.abs(qe-Ke)<1e-6)return this.easeTo(r,s);const Vt=Ke<qe?-1:1;zt=Math.abs(Math.log(Ke/qe))/je,Bt=()=>0,qt=Dr=>Math.exp(Vt*je*Dr)}return r.duration="duration"in r?+r.duration:1e3*zt/("screenSpeed"in r?+r.screenSpeed/je:+r.speed),r.maxDuration&&r.duration>r.maxDuration&&(r.duration=0),this._zooming=!0,this._rotating=m!==R,this._pitching=j!==b,this._rolling=G!==T,this._padding=!p.isPaddingEqual(X),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(Ue.targetCenter),this._ease((Vt=>{const Dr=Vt*zt,Ar=1/qt(Dr),sr=Bt(Dr);this._rotating&&p.setBearing(o.C.number(m,R,Vt)),this._pitching&&p.setPitch(o.C.number(b,j,Vt)),this._rolling&&p.setRoll(o.C.number(T,G,Vt)),this._padding&&(p.interpolatePadding(I,X,Vt),ie=p.centerPoint.add(Y)),Ue.easeFunc(Vt,Ar,sr,ie),this.terrain&&!r.freezeElevation&&this._updateElevation(Vt),this._applyUpdatedTransform(p),this._fireMoveEvents(s)}),(()=>{this.terrain&&r.freezeElevation&&this._finalizeElevation(),this._afterEase(s)}),r),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(r,s){var p;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,s)}return r||(p=this.handlers)===null||p===void 0||p.stop(!1),this}_ease(r,s,p){p.animate===!1||p.duration===0?(r(1),s()):(this._easeStart=M.now(),this._easeOptions=p,this._onEaseFrame=r,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(r,s){r=o.aN(r,-180,180);const p=Math.abs(r-s);return Math.abs(r-360-s)<p&&(r-=360),Math.abs(r+360-s)<p&&(r+=360),r}queryTerrainElevation(r){return this.terrain?this.terrain.getElevationForLngLatZoom(o.S.convert(r),this.transform.tileZoom):null}}const Gn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Li{constructor(r=Gn){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=r}getDefaultPosition(){return"bottom-right"}onAdd(r){return this._map=r,this._compact=this.options.compact,this._container=E.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=E.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=E.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){E.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(r,s){const p=this._map._getUIString(`AttributionControl.${s}`);r.title=p,r.setAttribute("aria-label",p)}_updateAttributions(){if(!this._map.style)return;let r=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?r=r.concat(this.options.customAttribution.map((m=>typeof m!="string"?"":m))):typeof this.options.customAttribution=="string"&&r.push(this.options.customAttribution)),this._map.style.stylesheet){const m=this._map.style.stylesheet;this.styleOwner=m.owner,this.styleId=m.id}const s=this._map.style.sourceCaches;for(const m in s){const b=s[m];if(b.used||b.usedForTerrain){const T=b.getSource();T.attribution&&r.indexOf(T.attribution)<0&&r.push(T.attribution)}}r=r.filter((m=>String(m).trim())),r.sort(((m,b)=>m.length-b.length)),r=r.filter(((m,b)=>{for(let T=b+1;T<r.length;T++)if(r[T].indexOf(m)>=0)return!1;return!0}));const p=r.join(" | ");p!==this._attribHTML&&(this._attribHTML=p,r.length?(this._innerContainer.innerHTML=E.sanitize(p),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Vo{constructor(r={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const p=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&p.classList.add("maplibregl-compact"):p.classList.remove("maplibregl-compact")}},this.options=r}getDefaultPosition(){return"bottom-left"}onAdd(r){this._map=r,this._compact=this.options&&this.options.compact,this._container=E.create("div","maplibregl-ctrl");const s=E.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){E.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class va{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(r){const s=++this._id;return this._queue.push({callback:r,id:s,cancelled:!1}),s}remove(r){const s=this._currentlyRunning,p=s?this._queue.concat(s):this._queue;for(const m of p)if(m.id===r)return void(m.cancelled=!0)}run(r=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const p of s)if(!p.cancelled&&(p.callback(r),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var uo=o.aI([{name:"a_pos3d",type:"Int16",components:3}]);class ba extends o.E{constructor(r){super(),this._lastTilesetChange=M.now(),this.sourceCache=r,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=r._source.tileSize*2**this.deltaZoom,r.usedForTerrain=!0,r.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(r,s){this.sourceCache.update(r,s),this._renderableTilesKeys=[];const p={};for(const m of It(r,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))p[m.key]=!0,this._renderableTilesKeys.push(m.key),this._tiles[m.key]||(m.terrainRttPosMatrix32f=new Float64Array(16),o.bX(m.terrainRttPosMatrix32f,0,o.$,o.$,0,0,1),this._tiles[m.key]=new Ur(m,this.tileSize),this._lastTilesetChange=M.now());for(const m in this._tiles)p[m]||delete this._tiles[m]}freeRtt(r){for(const s in this._tiles){const p=this._tiles[s];(!r||p.tileID.equals(r)||p.tileID.isChildOf(r)||r.isChildOf(p.tileID))&&(p.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((r=>this.getTileByID(r)))}getTileByID(r){return this._tiles[r]}getTerrainCoords(r,s){return s?this._getTerrainCoordsForTileRanges(r,s):this._getTerrainCoordsForRegularTile(r)}_getTerrainCoordsForRegularTile(r){const s={};for(const p of this._renderableTilesKeys){const m=this._tiles[p].tileID,b=r.clone(),T=o.b9();if(m.canonical.equals(r.canonical))o.bX(T,0,o.$,o.$,0,0,1);else if(m.canonical.isChildOf(r.canonical)){const I=m.canonical.z-r.canonical.z,R=m.canonical.x-(m.canonical.x>>I<<I),j=m.canonical.y-(m.canonical.y>>I<<I),G=o.$>>I;o.bX(T,0,G,G,0,0,1),o.M(T,T,[-R*G,-j*G,0])}else{if(!r.canonical.isChildOf(m.canonical))continue;{const I=r.canonical.z-m.canonical.z,R=r.canonical.x-(r.canonical.x>>I<<I),j=r.canonical.y-(r.canonical.y>>I<<I),G=o.$>>I;o.bX(T,0,o.$,o.$,0,0,1),o.M(T,T,[R*G,j*G,0]),o.N(T,T,[1/2**I,1/2**I,0])}}b.terrainRttPosMatrix32f=new Float32Array(T),s[p]=b}return s}_getTerrainCoordsForTileRanges(r,s){const p={};for(const m of this._renderableTilesKeys){const b=this._tiles[m].tileID;if(!this._isWithinTileRanges(b,s))continue;const T=r.clone(),I=o.b9();if(b.canonical.z===r.canonical.z){const R=r.canonical.x-b.canonical.x,j=r.canonical.y-b.canonical.y;o.bX(I,0,o.$,o.$,0,0,1),o.M(I,I,[R*o.$,j*o.$,0])}else if(b.canonical.z>r.canonical.z){const R=b.canonical.z-r.canonical.z,j=b.canonical.x-(b.canonical.x>>R<<R),G=b.canonical.y-(b.canonical.y>>R<<R),X=r.canonical.x-(b.canonical.x>>R),Y=r.canonical.y-(b.canonical.y>>R),ie=o.$>>R;o.bX(I,0,ie,ie,0,0,1),o.M(I,I,[-j*ie+X*o.$,-G*ie+Y*o.$,0])}else{const R=r.canonical.z-b.canonical.z,j=r.canonical.x-(r.canonical.x>>R<<R),G=r.canonical.y-(r.canonical.y>>R<<R),X=(r.canonical.x>>R)-b.canonical.x,Y=(r.canonical.y>>R)-b.canonical.y,ie=o.$<<R;o.bX(I,0,ie,ie,0,0,1),o.M(I,I,[j*o.$+X*ie,G*o.$+Y*ie,0])}T.terrainRttPosMatrix32f=new Float32Array(I),p[m]=T}return p}getSourceTile(r,s){const p=this.sourceCache._source;let m=r.overscaledZ-this.deltaZoom;if(m>p.maxzoom&&(m=p.maxzoom),m<p.minzoom)return null;this._sourceTileCache[r.key]||(this._sourceTileCache[r.key]=r.scaledTo(m).key);let b=this.sourceCache.getTileByID(this._sourceTileCache[r.key]);if((!b||!b.dem)&&s)for(;m>=p.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(r.scaledTo(m--).key);return b}anyTilesAfterTime(r=Date.now()){return this._lastTilesetChange>=r}_isWithinTileRanges(r,s){return s[r.canonical.z]&&r.canonical.x>=s[r.canonical.z].minTileX&&r.canonical.x<=s[r.canonical.z].maxTileX&&r.canonical.y>=s[r.canonical.z].minTileY&&r.canonical.y<=s[r.canonical.z].maxTileY}}class Ki{constructor(r,s,p){this._meshCache={},this.painter=r,this.sourceCache=new ba(s),this.options=p,this.exaggeration=typeof p.exaggeration=="number"?p.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(r,s,p,m=o.$){var b;if(!(s>=0&&s<m&&p>=0&&p<m))return 0;const T=this.getTerrainData(r),I=(b=T.tile)===null||b===void 0?void 0:b.dem;if(!I)return 0;const R=o.cr([],[s/m*o.$,p/m*o.$],T.u_terrain_matrix),j=[R[0]*I.dim,R[1]*I.dim],G=Math.floor(j[0]),X=Math.floor(j[1]),Y=j[0]-G,ie=j[1]-X;return I.get(G,X)*(1-Y)*(1-ie)+I.get(G+1,X)*Y*(1-ie)+I.get(G,X+1)*(1-Y)*ie+I.get(G+1,X+1)*Y*ie}getElevationForLngLatZoom(r,s){if(!o.cs(s,r.wrap()))return 0;const{tileID:p,mercatorX:m,mercatorY:b}=this._getOverscaledTileIDFromLngLatZoom(r,s);return this.getElevation(p,m%o.$,b%o.$,o.$)}getElevation(r,s,p,m=o.$){return this.getDEMElevation(r,s,p,m)*this.exaggeration}getTerrainData(r){if(!this._emptyDemTexture){const m=this.painter.context,b=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new o.T(m,b,m.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new o.T(m,new o.R({width:1,height:1}),m.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.af([])}const s=this.sourceCache.getSourceTile(r,!0);if(s&&s.dem&&(!s.demTexture||s.needsTerrainPrepare)){const m=this.painter.context;s.demTexture=this.painter.getTileTexture(s.dem.stride),s.demTexture?s.demTexture.update(s.dem.getPixels(),{premultiply:!1}):s.demTexture=new o.T(m,s.dem.getPixels(),m.gl.RGBA,{premultiply:!1}),s.demTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),s.needsTerrainPrepare=!1}const p=s&&s+s.tileID.key+r.key;if(p&&!this._demMatrixCache[p]){const m=this.sourceCache.sourceCache._source.maxzoom;let b=r.canonical.z-s.tileID.canonical.z;r.overscaledZ>r.canonical.z&&(r.canonical.z>=m?b=r.canonical.z-m:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=r.canonical.x-(r.canonical.x>>b<<b),I=r.canonical.y-(r.canonical.y>>b<<b),R=o.ct(new Float64Array(16),[1/(o.$<<b),1/(o.$<<b),0]);o.M(R,R,[T*o.$,I*o.$,0]),this._demMatrixCache[r.key]={matrix:R,coord:r}}return{u_depth:2,u_terrain:3,u_terrain_dim:s&&s.dem&&s.dem.dim||1,u_terrain_matrix:p?this._demMatrixCache[r.key].matrix:this._emptyDemMatrix,u_terrain_unpack:s&&s.dem&&s.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(s&&s.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:s}}getFramebuffer(r){const s=this.painter,p=s.width/devicePixelRatio,m=s.height/devicePixelRatio;return!this._fbo||this._fbo.width===p&&this._fbo.height===m||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new o.T(s.context,{width:p,height:m,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new o.T(s.context,{width:p,height:m,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=s.context.createFramebuffer(p,m,!0,!1),this._fbo.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,p,m))),this._fbo.colorAttachment.set(r==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const r=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const s=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let b=0,T=0;b<this._coordsTextureSize;b++)for(let I=0;I<this._coordsTextureSize;I++,T+=4)s[T+0]=255&I,s[T+1]=255&b,s[T+2]=I>>8<<4|b>>8,s[T+3]=0;const p=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),m=new o.T(r,p,r.gl.RGBA,{premultiply:!1});return m.bind(r.gl.NEAREST,r.gl.CLAMP_TO_EDGE),this._coordsTexture=m,m}pointCoordinate(r){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),p=this.painter.context,m=p.gl,b=Math.round(r.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(r.y*this.painter.pixelRatio/devicePixelRatio),I=Math.round(this.painter.height/devicePixelRatio);p.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),m.readPixels(b,I-T-1,1,1,m.RGBA,m.UNSIGNED_BYTE,s),p.bindFramebuffer.set(null);const R=s[0]+(s[2]>>4<<8),j=s[1]+((15&s[2])<<8),G=this.coordsIndex[255-s[3]],X=G&&this.sourceCache.getTileByID(G);if(!X)return null;const Y=this._coordsTextureSize,ie=(1<<X.tileID.canonical.z)*Y;return new o.a0((X.tileID.canonical.x*Y+R)/ie+X.tileID.wrap,(X.tileID.canonical.y*Y+j)/ie,this.getElevation(X.tileID,R,j,Y))}depthAtPoint(r){const s=new Uint8Array(4),p=this.painter.context,m=p.gl;return p.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),m.readPixels(r.x,this.painter.height/devicePixelRatio-r.y-1,1,1,m.RGBA,m.UNSIGNED_BYTE,s),p.bindFramebuffer.set(null),(s[0]/16777216+s[1]/65536+s[2]/256+s[3])/256}getTerrainMesh(r){var s;const p=((s=this.painter.style.projection)===null||s===void 0?void 0:s.transitionState)>0,m=p&&r.canonical.y===0,b=p&&r.canonical.y===(1<<r.canonical.z)-1,T=`m_${m?"n":""}_${b?"s":""}`;if(this._meshCache[T])return this._meshCache[T];const I=this.painter.context,R=new o.cu,j=new o.aM,G=this.meshSize,X=o.$/G,Y=G*G;for(let rt=0;rt<=G;rt++)for(let At=0;At<=G;At++)R.emplaceBack(At*X,rt*X,0);for(let rt=0;rt<Y;rt+=G+1)for(let At=0;At<G;At++)j.emplaceBack(At+rt,G+At+rt+1,G+At+rt+2),j.emplaceBack(At+rt,G+At+rt+2,At+rt+1);const ie=R.length,be=ie+(G+1),Ue=(G+1)*G,je=m?o.bg:0,qe=m?0:1,Ke=b?o.bh:o.$,lt=b?0:1;for(let rt=0;rt<=G;rt++)R.emplaceBack(rt*X,je,qe);for(let rt=0;rt<=G;rt++)R.emplaceBack(rt*X,Ke,lt);for(let rt=0;rt<G;rt++)j.emplaceBack(Ue+rt,be+rt,be+rt+1),j.emplaceBack(Ue+rt,be+rt+1,Ue+rt+1),j.emplaceBack(0+rt,ie+rt+1,ie+rt),j.emplaceBack(0+rt,0+rt+1,ie+rt+1);const nt=R.length,dt=nt+2*(G+1);for(const rt of[0,1])for(let At=0;At<=G;At++)for(const qt of[0,1])R.emplaceBack(rt*o.$,At*X,qt);for(let rt=0;rt<2*G;rt+=2)j.emplaceBack(nt+rt,nt+rt+1,nt+rt+3),j.emplaceBack(nt+rt,nt+rt+3,nt+rt+2),j.emplaceBack(dt+rt,dt+rt+3,dt+rt+1),j.emplaceBack(dt+rt,dt+rt+2,dt+rt+3);const bt=new Pt(I.createVertexBuffer(R,uo.members),I.createIndexBuffer(j),o.aL.simpleSegment(0,0,R.length,j.length));return this._meshCache[T]=bt,bt}getMeshFrameDelta(r){return 2*Math.PI*o.bt/Math.pow(2,Math.max(r,0))/5}getMinTileElevationForLngLatZoom(r,s){var p;const{tileID:m}=this._getOverscaledTileIDFromLngLatZoom(r,s);return(p=this.getMinMaxElevation(m).minElevation)!==null&&p!==void 0?p:0}getMinMaxElevation(r){const s=this.getTerrainData(r).tile,p={minElevation:null,maxElevation:null};return s&&s.dem&&(p.minElevation=s.dem.min*this.exaggeration,p.maxElevation=s.dem.max*this.exaggeration),p}_getOverscaledTileIDFromLngLatZoom(r,s){const p=o.a0.fromLngLat(r.wrap()),m=(1<<s)*o.$,b=p.x*m,T=p.y*m,I=Math.floor(b/o.$),R=Math.floor(T/o.$);return{tileID:new o.Z(s,0,s,I,R),mercatorX:b,mercatorY:T}}}class yo{constructor(r,s,p){this._context=r,this._size=s,this._tileSize=p,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const r of this._objects)r.texture.destroy(),r.fbo.destroy()}_createObject(r){const s=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),p=new o.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return p.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),s.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),s.colorAttachment.set(p.texture),{id:r,fbo:s,texture:p,stamp:-1,inUse:!1}}getObjectForId(r){return this._objects[r]}useObject(r){r.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((s=>r.id!==s)),this._recentlyUsed.push(r.id)}stampObject(r){r.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const r=this._createObject(this._objects.length);return this._objects.push(r),r}freeObject(r){r.inUse=!1}freeAllObjects(){for(const r of this._objects)this.freeObject(r)}isFull(){return!(this._objects.length<this._size)&&this._objects.some((r=>!r.inUse))===!1}}const br={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class zr{constructor(r,s){this.painter=r,this.terrain=s,this.pool=new yo(r.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(r){return this.pool.getObjectForId(r.rtt[this._stacks.length-1].id).texture}prepareForRender(r,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=r._order.filter((p=>!r._layers[p].isHidden(s))),this._coordsAscending={};for(const p in r.sourceCaches){this._coordsAscending[p]={};const m=r.sourceCaches[p].getVisibleCoordinates(),b=r.sourceCaches[p].getSource(),T=b instanceof Jt?b.terrainTileRanges:null;for(const I of m){const R=this.terrain.sourceCache.getTerrainCoords(I,T);for(const j in R)this._coordsAscending[p][j]||(this._coordsAscending[p][j]=[]),this._coordsAscending[p][j].push(R[j])}}this._coordsAscendingStr={};for(const p of r._order){const m=r._layers[p],b=m.source;if(br[m.type]&&!this._coordsAscendingStr[b]){this._coordsAscendingStr[b]={};for(const T in this._coordsAscending[b])this._coordsAscendingStr[b][T]=this._coordsAscending[b][T].map((I=>I.key)).sort().join()}}for(const p of this._renderableTiles)for(const m in this._coordsAscendingStr){const b=this._coordsAscendingStr[m][p.tileID.key];b&&b!==p.rttCoords[m]&&(p.rtt=[])}}renderLayer(r,s){if(r.isHidden(this.painter.transform.zoom))return!1;const p=Object.assign(Object.assign({},s),{isRenderingToTexture:!0}),m=r.type,b=this.painter,T=this._renderableLayerIds[this._renderableLayerIds.length-1]===r.id;if(br[m]&&(this._prevType&&br[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(r.id),!T))return!0;if(br[this._prevType]||br[m]&&T){this._prevType=m;const I=this._stacks.length-1,R=this._stacks[I]||[];for(const j of this._renderableTiles){if(this.pool.isFull()&&(lo(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(j),j.rtt[I]){const X=this.pool.getObjectForId(j.rtt[I].id);if(X.stamp===j.rtt[I].stamp){this.pool.useObject(X);continue}}const G=this.pool.getOrCreateFreeObject();this.pool.useObject(G),this.pool.stampObject(G),j.rtt[I]={id:G.id,stamp:G.stamp},b.context.bindFramebuffer.set(G.fbo.framebuffer),b.context.clear({color:o.be.transparent,stencil:0}),b.currentStencilSource=void 0;for(let X=0;X<R.length;X++){const Y=b.style._layers[R[X]],ie=Y.source?this._coordsAscending[Y.source][j.tileID.key]:[j.tileID];b.context.viewport.set([0,0,G.fbo.width,G.fbo.height]),b._renderTileClippingMasks(Y,ie,!0),b.renderLayer(b,b.style.sourceCaches[Y.source],Y,ie,p),Y.source&&(j.rttCoords[Y.source]=this._coordsAscendingStr[Y.source][j.tileID.key])}}return lo(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects(),br[m]}return!1}}const Gi={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},_i=y,Eo={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Gn,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:o.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Hi={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class _o{constructor(r,s,p=!1){this.mousedown=b=>{this.startMove(b,E.mousePos(this.element,b)),E.addEventListener(window,"mousemove",this.mousemove),E.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=b=>{this.move(b,E.mousePos(this.element,b))},this.mouseup=b=>{this._rotatePitchHanlder.dragEnd(b),this.offTemp()},this.touchstart=b=>{b.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=E.touchPos(this.element,b.targetTouches)[0],this.startMove(b,this._startPos),E.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.addEventListener(window,"touchend",this.touchend))},this.touchmove=b=>{b.targetTouches.length!==1?this.reset():(this._lastPos=E.touchPos(this.element,b.targetTouches)[0],this.move(b,this._lastPos))},this.touchend=b=>{b.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=s;const m=new K;this._rotatePitchHanlder=new Ou({clickTolerance:3,move:(b,T)=>{const I=s.getBoundingClientRect(),R=new o.P((I.bottom-I.top)/2,(I.right-I.left)/2);return{bearingDelta:o.cm(new o.P(b.x,T.y),T,R),pitchDelta:p?-.5*(T.y-b.y):void 0}},moveStateManager:m,enable:!0,assignEvents:()=>{}}),this.map=r,E.addEventListener(s,"mousedown",this.mousedown),E.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),E.addEventListener(s,"touchcancel",this.reset)}startMove(r,s){this._rotatePitchHanlder.dragStart(r,s),E.disableDrag()}move(r,s){const p=this.map,{bearingDelta:m,pitchDelta:b}=this._rotatePitchHanlder.dragMove(r,s)||{};m&&p.setBearing(p.getBearing()+m),b&&p.setPitch(p.getPitch()+b)}off(){const r=this.element;E.removeEventListener(r,"mousedown",this.mousedown),E.removeEventListener(r,"touchstart",this.touchstart,{passive:!1}),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend),E.removeEventListener(r,"touchcancel",this.reset),this.offTemp()}offTemp(){E.enableDrag(),E.removeEventListener(window,"mousemove",this.mousemove),E.removeEventListener(window,"mouseup",this.mouseup),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend)}}let Si;function Di(_,r,s,p=!1){if(p||!s.getCoveringTilesDetailsProvider().allowWorldCopies())return _?.wrap();const m=new o.S(_.lng,_.lat);if(_=new o.S(_.lng,_.lat),r){const b=new o.S(_.lng-360,_.lat),T=new o.S(_.lng+360,_.lat),I=s.locationToScreenPoint(_).distSqr(r);s.locationToScreenPoint(b).distSqr(r)<I?_=b:s.locationToScreenPoint(T).distSqr(r)<I&&(_=T)}for(;Math.abs(_.lng-s.center.lng)>180;){const b=s.locationToScreenPoint(_);if(b.x>=0&&b.y>=0&&b.x<=s.width&&b.y<=s.height)break;_.lng>s.center.lng?_.lng-=360:_.lng+=360}return _.lng!==m.lng&&s.isPointOnMapSurface(s.locationToScreenPoint(_))?_:m}const Wi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ii(_,r,s){const p=_.classList;for(const m in Wi)p.remove(`maplibregl-${s}-anchor-${m}`);p.add(`maplibregl-${s}-anchor-${r}`)}class Xn extends o.E{constructor(r){if(super(),this._onKeyPress=s=>{const p=s.code,m=s.charCode||s.keyCode;p!=="Space"&&p!=="Enter"&&m!==32&&m!==13||this.togglePopup()},this._onMapClick=s=>{const p=s.originalEvent.target,m=this._element;this._popup&&(p===m||m.contains(p))&&this.togglePopup()},this._update=s=>{if(!this._map)return;const p=this._map.loaded()&&!this._map.isMoving();(s?.type==="terrain"||s?.type==="render"&&!p)&&this._map.once("render",this._update),this._lngLat=Di(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let m="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?m=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(m=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let b="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?b="rotateX(0deg)":this._pitchAlignment==="map"&&(b=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),E.setTransform(this._element,`${Wi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${b} ${m}`),M.frameAsync(new AbortController).then((()=>{this._updateOpacity(s&&s.type==="moveend")})).catch((()=>{}))},this._onMove=s=>{if(!this._isDragging){const p=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=p}this._isDragging&&(this._pos=s.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.l("dragstart"))),this.fire(new o.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.l("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._scale=r&&r.scale||1,this._draggable=r&&r.draggable||!1,this._clickTolerance=r&&r.clickTolerance||0,this._subpixelPositioning=r&&r.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=r&&r.rotation||0,this._rotationAlignment=r&&r.rotationAlignment||"auto",this._pitchAlignment=r&&r.pitchAlignment&&r.pitchAlignment!=="auto"?r.pitchAlignment:this._rotationAlignment,this.setOpacity(r?.opacity,r?.opacityWhenCovered),r&&r.element)this._element=r.element,this._offset=o.P.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=E.create("div");const s=E.createNS("http://www.w3.org/2000/svg","svg"),p=41,m=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${p}px`),s.setAttributeNS(null,"width",`${m}px`),s.setAttributeNS(null,"viewBox",`0 0 ${m} ${p}`);const b=E.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const T=E.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const I=E.createNS("http://www.w3.org/2000/svg","g");I.setAttributeNS(null,"transform","translate(3.0, 29.0)"),I.setAttributeNS(null,"fill","#000000");const R=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const qe of R){const Ke=E.createNS("http://www.w3.org/2000/svg","ellipse");Ke.setAttributeNS(null,"opacity","0.04"),Ke.setAttributeNS(null,"cx","10.5"),Ke.setAttributeNS(null,"cy","5.80029008"),Ke.setAttributeNS(null,"rx",qe.rx),Ke.setAttributeNS(null,"ry",qe.ry),I.appendChild(Ke)}const j=E.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"fill",this._color);const G=E.createNS("http://www.w3.org/2000/svg","path");G.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),j.appendChild(G);const X=E.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"opacity","0.25"),X.setAttributeNS(null,"fill","#000000");const Y=E.createNS("http://www.w3.org/2000/svg","path");Y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),X.appendChild(Y);const ie=E.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ie.setAttributeNS(null,"fill","#FFFFFF");const be=E.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Ue=E.createNS("http://www.w3.org/2000/svg","circle");Ue.setAttributeNS(null,"fill","#000000"),Ue.setAttributeNS(null,"opacity","0.25"),Ue.setAttributeNS(null,"cx","5.5"),Ue.setAttributeNS(null,"cy","5.5"),Ue.setAttributeNS(null,"r","5.4999962");const je=E.createNS("http://www.w3.org/2000/svg","circle");je.setAttributeNS(null,"fill","#FFFFFF"),je.setAttributeNS(null,"cx","5.5"),je.setAttributeNS(null,"cy","5.5"),je.setAttributeNS(null,"r","5.4999962"),be.appendChild(Ue),be.appendChild(je),T.appendChild(I),T.appendChild(j),T.appendChild(X),T.appendChild(ie),T.appendChild(be),s.appendChild(T),s.setAttributeNS(null,"height",p*this._scale+"px"),s.setAttributeNS(null,"width",m*this._scale+"px"),this._element.appendChild(s),this._offset=o.P.convert(r&&r.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(s=>{s.preventDefault()})),this._element.addEventListener("mousedown",(s=>{s.preventDefault()})),ii(this._element,this._anchor,"marker"),r&&r.className)for(const s of r.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(r){return this.remove(),this._map=r,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",r._getUIString("Marker.Title")),r.getCanvasContainer().appendChild(this._element),r.on("move",this._update),r.on("moveend",this._update),r.on("terrain",this._update),r.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),E.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(r){return this._lngLat=o.S.convert(r),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(r){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),r){if(!("offset"in r.options)){const m=Math.abs(13.5)/Math.SQRT2;r.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[m,-1*(38.1-13.5+m)],"bottom-right":[-m,-1*(38.1-13.5+m)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=r,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(r){return this._subpixelPositioning=r,this}getPopup(){return this._popup}togglePopup(){const r=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:r?(r.isOpen()?r.remove():(r.setLngLat(this._lngLat),r.addTo(this._map)),this):this}_updateOpacity(r=!1){var s,p;const m=(s=this._map)===null||s===void 0?void 0:s.terrain,b=this._map.transform.isLocationOccluded(this._lngLat);if(!m||b){const ie=b?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==ie&&(this._element.style.opacity=ie))}if(r)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const T=this._map,I=T.terrain.depthAtPoint(this._pos),R=T.terrain.getElevationForLngLatZoom(this._lngLat,T.transform.tileZoom);if(T.transform.lngLatToCameraDepth(this._lngLat,R)-I<.006)return void(this._element.style.opacity=this._opacity);const j=-this._offset.y/T.transform.pixelsPerMeter,G=Math.sin(T.getPitch()*Math.PI/180)*j,X=T.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),Y=T.transform.lngLatToCameraDepth(this._lngLat,R+G)-X>.006;!((p=this._popup)===null||p===void 0)&&p.isOpen()&&Y&&this._popup.remove(),this._element.style.opacity=Y?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(r){return this._offset=o.P.convert(r),this._update(),this}addClassName(r){this._element.classList.add(r)}removeClassName(r){this._element.classList.remove(r)}toggleClassName(r){return this._element.classList.toggle(r)}setDraggable(r){return this._draggable=!!r,this._map&&(r?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(r){return this._rotation=r||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(r){return this._rotationAlignment=r||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(r){return this._pitchAlignment=r&&r!=="auto"?r:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(r,s){return(this._opacity===void 0||r===void 0&&s===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),r!==void 0&&(this._opacity=r),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const Ya={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ro=0,To=!1;const Na={maxWidth:100,unit:"metric"};function Ti(_,r,s){const p=s&&s.maxWidth||100,m=_._container.clientHeight/2,b=_._container.clientWidth/2,T=_.unproject([b-p/2,m]),I=_.unproject([b+p/2,m]),R=Math.round(_.project(I).x-_.project(T).x),j=Math.min(p,R,_._container.clientWidth),G=T.distanceTo(I);if(s&&s.unit==="imperial"){const X=3.2808*G;X>5280?Go(r,j,X/5280,_._getUIString("ScaleControl.Miles")):Go(r,j,X,_._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?Go(r,j,G/1852,_._getUIString("ScaleControl.NauticalMiles")):G>=1e3?Go(r,j,G/1e3,_._getUIString("ScaleControl.Kilometers")):Go(r,j,G,_._getUIString("ScaleControl.Meters"))}function Go(_,r,s,p){const m=(function(b){const T=Math.pow(10,`${Math.floor(b)}`.length-1);let I=b/T;return I=I>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:(function(R){const j=Math.pow(10,Math.ceil(-Math.log(R)/Math.LN10));return Math.round(R*j)/j})(I),T*I})(s);_.style.width=r*(m/s)+"px",_.innerHTML=`${m} ${p}`}const Oa={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Il=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ls(_){if(_){if(typeof _=="number"){const r=Math.round(Math.abs(_)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,_),"top-left":new o.P(r,r),"top-right":new o.P(-r,r),bottom:new o.P(0,-_),"bottom-left":new o.P(r,-r),"bottom-right":new o.P(-r,-r),left:new o.P(_,0),right:new o.P(-_,0)}}if(_ instanceof o.P||Array.isArray(_)){const r=o.P.convert(_);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:o.P.convert(_.center||[0,0]),top:o.P.convert(_.top||[0,0]),"top-left":o.P.convert(_["top-left"]||[0,0]),"top-right":o.P.convert(_["top-right"]||[0,0]),bottom:o.P.convert(_.bottom||[0,0]),"bottom-left":o.P.convert(_["bottom-left"]||[0,0]),"bottom-right":o.P.convert(_["bottom-right"]||[0,0]),left:o.P.convert(_.left||[0,0]),right:o.P.convert(_.right||[0,0])}}return Ls(new o.P(0,0))}const Ho=y;f.AJAXError=o.cy,f.Event=o.l,f.Evented=o.E,f.LngLat=o.S,f.MercatorCoordinate=o.a0,f.Point=o.P,f.addProtocol=o.cz,f.config=o.a,f.removeProtocol=o.cA,f.AttributionControl=Li,f.BoxZoomHandler=hh,f.CanvasSource=Er,f.CooperativeGesturesHandler=ko,f.DoubleClickZoomHandler=mr,f.DragPanHandler=zn,f.DragRotateHandler=un,f.EdgeInsets=_r,f.FullscreenControl=class extends o.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var r;let s=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((r=s?.shadowRoot)===null||r===void 0)&&r.fullscreenElement;)s=s.shadowRoot.fullscreenElement;s===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:o.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){E.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=E.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);E.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new o.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},f.GeoJSONSource=Mr,f.GeolocateControl=class extends o.E{constructor(_){super(),this._onSuccess=r=>{if(this._map){if(this._isOutOfMapMaxBounds(r))return this._setErrorState(),this.fire(new o.l("outofmaxbounds",r)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=r,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(r),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(r),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new o.l("geolocate",r)),this._finish()}},this._updateCamera=r=>{const s=new o.S(r.coords.longitude,r.coords.latitude),p=r.coords.accuracy,m=this._map.getBearing(),b=o.e({bearing:m},this.options.fitBoundsOptions),T=Kt.fromLngLat(s,p);this._map.fitBounds(T,b,{geolocateSource:!0})},this._updateMarker=r=>{if(r){const s=new o.S(r.coords.longitude,r.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=r.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=r=>{if(this._map){if(r.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(r.code===3&&To)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.l("error",r)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(r=>r.preventDefault())),this._geolocateButton=E.create("button","maplibregl-ctrl-geolocate",this._container),E.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=r=>{if(this._map){if(r===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}else{const s=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=E.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Xn({element:this._dotElement}),this._circleElement=E.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Xn({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(s=>{s.geolocateSource||this._watchState!=="ACTIVE_LOCK"||s.originalEvent&&s.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new o.l("trackuserlocationend")),this.fire(new o.l("userlocationlostfocus")))}))}},this.options=o.e({},Ya,_)}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return o._(this,arguments,void 0,(function*(r=!1){if(Si!==void 0&&!r)return Si;if(window.navigator.permissions===void 0)return Si=!!window.navigator.geolocation,Si;try{Si=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Si=!!window.navigator.geolocation}return Si}))})().then((r=>this._finishSetupUI(r))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),E.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ro=0,To=!1}_isOutOfMapMaxBounds(_){const r=this._map.getMaxBounds(),s=_.coords;return r&&(s.longitude<r.getWest()||s.longitude>r.getEast()||s.latitude<r.getSouth()||s.latitude>r.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),r=_.getSouthEast(),s=_.getNorthEast(),p=r.distanceTo(s),m=Math.ceil(this._accuracy/(p/this._map._container.clientHeight)*2);this._circleElement.style.width=`${m}px`,this._circleElement.style.height=`${m}px`}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ro--,To=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new o.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.l("trackuserlocationstart")),this.fire(new o.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ro++,Ro>1?(_={maximumAge:6e5,timeout:0},To=!0):(_=this.options.positionOptions,To=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},f.GlobeControl=class{constructor(){this._toggleProjection=()=>{var _;const r=(_=this._map.getProjection())===null||_===void 0?void 0:_.type;this._map.setProjection(r!=="mercator"&&r?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var _;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((_=this._map.getProjection())===null||_===void 0?void 0:_.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=E.create("button","maplibregl-ctrl-globe",this._container),E.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){E.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},f.Hash=sc,f.ImageSource=Jt,f.KeyboardHandler=tr,f.LngLatBounds=Kt,f.LogoControl=Vo,f.Map=class extends en{constructor(_){var r,s;o.cv.mark(o.cw.create);const p=Object.assign(Object.assign(Object.assign({},Eo),_),{canvasContextAttributes:Object.assign(Object.assign({},Eo.canvasContextAttributes),_.canvasContextAttributes)});if(p.minZoom!=null&&p.maxZoom!=null&&p.minZoom>p.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(p.minPitch!=null&&p.maxPitch!=null&&p.minPitch>p.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(p.minPitch!=null&&p.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(p.maxPitch!=null&&p.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const m=new An,b=new Vl;if(p.minZoom!==void 0&&m.setMinZoom(p.minZoom),p.maxZoom!==void 0&&m.setMaxZoom(p.maxZoom),p.minPitch!==void 0&&m.setMinPitch(p.minPitch),p.maxPitch!==void 0&&m.setMaxPitch(p.maxPitch),p.renderWorldCopies!==void 0&&m.setRenderWorldCopies(p.renderWorldCopies),super(m,b,{bearingSnap:p.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new va,this._controls=[],this._mapId=o.a6(),this._contextLost=I=>{I.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.l("webglcontextlost",{originalEvent:I}))},this._contextRestored=I=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.l("webglcontextrestored",{originalEvent:I}))},this._onMapScroll=I=>{if(I.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=p.interactive,this._maxTileCacheSize=p.maxTileCacheSize,this._maxTileCacheZoomLevels=p.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},p.canvasContextAttributes),this._trackResize=p.trackResize===!0,this._bearingSnap=p.bearingSnap,this._centerClampedToGround=p.centerClampedToGround,this._refreshExpiredTiles=p.refreshExpiredTiles===!0,this._fadeDuration=p.fadeDuration,this._crossSourceCollisions=p.crossSourceCollisions===!0,this._collectResourceTiming=p.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Gi),p.locale),this._clickTolerance=p.clickTolerance,this._overridePixelRatio=p.pixelRatio,this._maxCanvasSize=p.maxCanvasSize,this.transformCameraUpdate=p.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=p.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=W.addThrottleControl((()=>this.isMoving())),this._requestManager=new le(p.transformRequest),typeof p.container=="string"){if(this._container=document.getElementById(p.container),!this._container)throw new Error(`Container '${p.container}' not found.`)}else{if(!(p.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=p.container}if(p.maxBounds&&this.setMaxBounds(p.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),this.once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let I=!1;const R=Ra((j=>{this._trackResize&&!this._removed&&(this.resize(j),this.redraw())}),50);this._resizeObserver=new ResizeObserver((j=>{I?R(j):I=!0})),this._resizeObserver.observe(this._container)}this.handlers=new Mi(this,p),this._hash=p.hash&&new sc(typeof p.hash=="string"&&p.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:p.center,elevation:p.elevation,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,roll:p.roll}),p.bounds&&(this.resize(),this.fitBounds(p.bounds,o.e({},p.fitBoundsOptions,{duration:0}))));const T=typeof p.style=="string"||((s=(r=p.style)===null||r===void 0?void 0:r.projection)===null||s===void 0?void 0:s.type)!=="globe";this.resize(null,T),this._localIdeographFontFamily=p.localIdeographFontFamily,this._validateStyle=p.validateStyle,p.style&&this.setStyle(p.style,{localIdeographFontFamily:p.localIdeographFontFamily}),p.attributionControl&&this.addControl(new Li(typeof p.attributionControl=="boolean"?void 0:p.attributionControl)),p.maplibreLogo&&this.addControl(new Vo,p.logoPosition),this.on("style.load",(()=>{if(T||this._resizeTransform(),this.transform.unmodified){const I=o.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(I)}})),this.on("data",(I=>{this._update(I.dataType==="style"),this.fire(new o.l(`${I.dataType}data`,I))})),this.on("dataloading",(I=>{this.fire(new o.l(`${I.dataType}dataloading`,I))})),this.on("dataabort",(I=>{this.fire(new o.l("sourcedataabort",I))}))}_getMapId(){return this._mapId}setGlobalStateProperty(_,r){return this.style.setGlobalStateProperty(_,r),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(_,r){if(r===void 0&&(r=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=_.onAdd(this);this._controls.push(_);const p=this._controlPositions[r];return r.indexOf("bottom")!==-1?p.insertBefore(s,p.firstChild):p.appendChild(s),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const r=this._controls.indexOf(_);return r>-1&&this._controls.splice(r,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,r,s,p){return p==null&&this.terrain&&(p=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,r,s,p)}resize(_,r=!0){const[s,p]=this._containerDimensions(),m=this._getClampedPixelRatio(s,p);if(this._resizeCanvas(s,p,m),this.painter.resize(s,p,m),this.painter.overLimit()){const T=this.painter.context.gl;this._maxCanvasSize=[T.drawingBufferWidth,T.drawingBufferHeight];const I=this._getClampedPixelRatio(s,p);this._resizeCanvas(s,p,I),this.painter.resize(s,p,I)}this._resizeTransform(r);const b=!this._moving;return b&&(this.stop(),this.fire(new o.l("movestart",_)).fire(new o.l("move",_))),this.fire(new o.l("resize",_)),b&&this.fire(new o.l("moveend",_)),this}_resizeTransform(_=!0){var r;const[s,p]=this._containerDimensions();this.transform.resize(s,p,_),(r=this._requestedCameraState)===null||r===void 0||r.resize(s,p,_)}_getClampedPixelRatio(_,r){const{0:s,1:p}=this._maxCanvasSize,m=this.getPixelRatio(),b=_*m,T=r*m;return Math.min(b>s?s/b:1,T>p?p/T:1)*m}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(Kt.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.setMinZoom(_),this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.setMaxZoom(_),this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.setMinPitch(_),this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(_>=this.transform.minPitch)return this.transform.setMaxPitch(_),this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.setRenderWorldCopies(_),this._update()}project(_){return this.transform.locationToScreenPoint(o.S.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.screenPointToLocation(o.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,r,s){if(_==="mouseenter"||_==="mouseover"){let p=!1;return{layers:r,listener:s,delegates:{mousemove:b=>{const T=r.filter((R=>this.getLayer(R))),I=T.length!==0?this.queryRenderedFeatures(b.point,{layers:T}):[];I.length?p||(p=!0,s.call(this,new _a(_,this,b.originalEvent,{features:I}))):p=!1},mouseout:()=>{p=!1}}}}if(_==="mouseleave"||_==="mouseout"){let p=!1;return{layers:r,listener:s,delegates:{mousemove:T=>{const I=r.filter((R=>this.getLayer(R)));(I.length!==0?this.queryRenderedFeatures(T.point,{layers:I}):[]).length?p=!0:p&&(p=!1,s.call(this,new _a(_,this,T.originalEvent)))},mouseout:T=>{p&&(p=!1,s.call(this,new _a(_,this,T.originalEvent)))}}}}{const p=m=>{const b=r.filter((I=>this.getLayer(I))),T=b.length!==0?this.queryRenderedFeatures(m.point,{layers:b}):[];T.length&&(m.features=T,s.call(this,m),delete m.features)};return{layers:r,listener:s,delegates:{[_]:p}}}}_saveDelegatedListener(_,r){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(r)}_removeDelegatedListener(_,r,s){if(!this._delegatedListeners||!this._delegatedListeners[_])return;const p=this._delegatedListeners[_];for(let m=0;m<p.length;m++){const b=p[m];if(b.listener===s&&b.layers.length===r.length&&b.layers.every((T=>r.includes(T)))){for(const T in b.delegates)this.off(T,b.delegates[T]);return void p.splice(m,1)}}}on(_,r,s){if(s===void 0)return super.on(_,r);const p=typeof r=="string"?[r]:r,m=this._createDelegatedListener(_,p,s);this._saveDelegatedListener(_,m);for(const b in m.delegates)this.on(b,m.delegates[b]);return{unsubscribe:()=>{this._removeDelegatedListener(_,p,s)}}}once(_,r,s){if(s===void 0)return super.once(_,r);const p=typeof r=="string"?[r]:r,m=this._createDelegatedListener(_,p,s);for(const b in m.delegates){const T=m.delegates[b];m.delegates[b]=(...I)=>{this._removeDelegatedListener(_,p,s),T(...I)}}this._saveDelegatedListener(_,m);for(const b in m.delegates)this.once(b,m.delegates[b]);return this}off(_,r,s){return s===void 0?super.off(_,r):(this._removeDelegatedListener(_,typeof r=="string"?[r]:r,s),this)}queryRenderedFeatures(_,r){if(!this.style)return[];let s;const p=_ instanceof o.P||Array.isArray(_),m=p?_:[[0,0],[this.transform.width,this.transform.height]];if(r=r||(p?{}:_)||{},m instanceof o.P||typeof m[0]=="number")s=[o.P.convert(m)];else{const b=o.P.convert(m[0]),T=o.P.convert(m[1]);s=[b,new o.P(T.x,b.y),T,new o.P(b.x,T.y),b]}return this.style.queryRenderedFeatures(s,r,this.transform)}querySourceFeatures(_,r){return this.style.querySourceFeatures(_,r)}setStyle(_,r){return(r=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff!==!1&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&_?(this._diffStyle(_,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(_,r))}setTransformRequest(_){return this._requestManager.setTransformRequest(_),this}_getUIString(_){const r=this._locale[_];if(r==null)throw new Error(`Missing UI string '${_}'`);return r}_updateStyle(_,r){var s,p;if(r.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(_,r)));const m=this.style&&r.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new Ma(this,r||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,r,m):this.style.loadJSON(_,r,m),this):((p=(s=this.style)===null||s===void 0?void 0:s.projection)===null||p===void 0||p.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ma(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,r){if(typeof _=="string"){const s=this._requestManager.transformRequest(_,"Style");o.j(s,new AbortController).then((p=>{this._updateDiff(p.data,r)})).catch((p=>{p&&this.fire(new o.k(p))}))}else typeof _=="object"&&this._updateDiff(_,r)}_updateDiff(_,r){try{this.style.setState(_,r)&&this._update(!0)}catch(s){o.w(`Unable to perform style diff: ${s.message||s.error||s}. Rebuilding the style from scratch.`),this._updateStyle(_,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(_,r){return this._lazyInitEmptyStyle(),this.style.addSource(_,r),this._update(!0)}isSourceLoaded(_){const r=this.style&&this.style.sourceCaches[_];if(r!==void 0)return r.loaded();this.fire(new o.k(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const r=this.style.sourceCaches[_.source];if(!r)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&r.reload();for(const s in this.style._layers){const p=this.style._layers[s];p.type==="hillshade"&&p.source===_.source&&o.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),p.type==="color-relief"&&p.source===_.source&&o.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ki(this.painter,r,_),this.painter.renderToTexture=new zr(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=s=>{var p;s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==_.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((p=s.source)===null||p===void 0?void 0:p.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(s.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new o.l("terrain",{terrain:_})),this}getTerrain(){var _,r;return(r=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&r!==void 0?r:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const r in _){const s=_[r]._tiles;for(const p in s){const m=s[p];if(m.state!=="loaded"&&m.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}setSourceTileLodParams(_,r,s){if(s){const p=this.getSource(s);if(!p)throw new Error(`There is no source with ID "${s}", cannot set LOD parameters`);p.calculateTileZoom=St(Math.max(1,_),Math.max(1,r))}else for(const p in this.style.sourceCaches)this.style.sourceCaches[p].getSource().calculateTileZoom=St(Math.max(1,_),Math.max(1,r));return this._update(!0),this}refreshTiles(_,r){const s=this.style.sourceCaches[_];if(!s)throw new Error(`There is no source cache with ID "${_}", cannot refresh tile`);r===void 0?s.reload(!0):s.refreshTiles(r.map((p=>new o.a3(p.z,p.x,p.y))))}addImage(_,r,s={}){const{pixelRatio:p=1,sdf:m=!1,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j}=s;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||o.b(r))){if(r.width===void 0||r.height===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:G,height:X,data:Y}=r,ie=r;return this.style.addImage(_,{data:new o.R({width:G,height:X},new Uint8Array(Y)),pixelRatio:p,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j,sdf:m,version:0,userImage:ie}),ie.onAdd&&ie.onAdd(this,_),this}}{const{width:G,height:X,data:Y}=M.getImageData(r);this.style.addImage(_,{data:new o.R({width:G,height:X},Y),pixelRatio:p,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j,sdf:m,version:0})}}updateImage(_,r){const s=this.style.getImage(_);if(!s)return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const p=r instanceof HTMLImageElement||o.b(r)?M.getImageData(r):r,{width:m,height:b,data:T}=p;if(m===void 0||b===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(m!==s.data.width||b!==s.data.height)return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const I=!(r instanceof HTMLImageElement||o.b(r));return s.data.replace(T,I),this.style.updateImage(_,s),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new o.k(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return W.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,r){return this._lazyInitEmptyStyle(),this.style.addLayer(_,r),this._update(!0)}moveLayer(_,r){return this.style.moveLayer(_,r),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,r,s){return this.style.setLayerZoomRange(_,r,s),this._update(!0)}setFilter(_,r,s={}){return this.style.setFilter(_,r,s),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,r,s,p={}){return this.style.setPaintProperty(_,r,s,p),this._update(!0)}getPaintProperty(_,r){return this.style.getPaintProperty(_,r)}setLayoutProperty(_,r,s,p={}){return this.style.setLayoutProperty(_,r,s,p),this._update(!0)}getLayoutProperty(_,r){return this.style.getLayoutProperty(_,r)}setGlyphs(_,r={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,r),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,r,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,r,s,(p=>{p||this._update(!0)})),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,r={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,r,(s=>{s||this._update(!0)})),this}setLight(_,r={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,r),this._update(!0)}getLight(){return this.style.getLight()}setSky(_,r={}){return this._lazyInitEmptyStyle(),this.style.setSky(_,r),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(_,r){return this.style.setFeatureState(_,r),this._update()}removeFeatureState(_,r){return this.style.removeFeatureState(_,r),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,r=0;return this._container&&(_=this._container.clientWidth||400,r=this._container.clientHeight||300),[_,r]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const r=this._canvasContainer=E.create("div","maplibregl-canvas-container",_);this._interactive&&r.classList.add("maplibregl-interactive"),this._canvas=E.create("canvas","maplibregl-canvas",r),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),p=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],p);const m=this._controlContainer=E.create("div","maplibregl-control-container",_),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((T=>{b[T]=E.create("div",`maplibregl-ctrl-${T} `,m)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,r,s){this._canvas.width=Math.floor(s*_),this._canvas.height=Math.floor(s*r),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${r}px`}_setupPainter(){const _=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let r=null;this._canvas.addEventListener("webglcontextcreationerror",(p=>{r={requestedAttributes:_},p&&(r.statusMessage=p.statusMessage,r.type=p.type)}),{once:!0});let s=null;if(s=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,_):this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_),!s){const p="Failed to initialize WebGL";throw r?(r.message=p,new Error(JSON.stringify(r))):new Error(p)}this.painter=new $o(s,this.transform),O.testSupport(s)}migrateProjection(_,r){super.migrateProjection(_,r),this.painter.transform=_,this.fire(new o.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){var r,s,p,m,b;const T=this._idleTriggered?this._fadeDuration:0,I=((r=this.style.projection)===null||r===void 0?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let R=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const X=this.transform.zoom,Y=M.now();this.style.zoomHistory.update(X,Y);const ie=new o.F(X,{now:Y,fadeDuration:T,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),be=ie.crossFadingFactor();be===1&&be===this._crossFadingFactor||(R=!0,this._crossFadingFactor=be),this.style.update(ie)}const j=((s=this.style.projection)===null||s===void 0?void 0:s.transitionState)>0!==I;(p=this.style.projection)===null||p===void 0||p.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((m=this.style.projection)===null||m===void 0?void 0:m.transitionState,(b=this.style.projection)===null||b===void 0?void 0:b.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||j)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,T,this._crossSourceCollisions,j),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:T,showPadding:this.showPadding}),this.fire(new o.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cv.mark(o.cw.load),this.fire(new o.l("load"))),this.style&&(this.style.hasTransitions()||R)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const G=this._sourcesDirty||this._styleDirty||this._placementDirty;return G||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.l("idle")),!this._loaded||this._fullyLoaded||G||(this._fullyLoaded=!0,o.cv.mark(o.cw.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),W.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const r=this.painter.context.gl.getExtension("WEBGL_lose_context");r?.loseContext&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),E.remove(this._canvasContainer),E.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cv.clearMetrics(),this._removed=!0,this.fire(new o.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,M.frame(this._frameRequest,(_=>{o.cv.frame(_),this._frameRequest=null;try{this._render(_)}catch(r){if(!o.cx(r)&&!(function(s){return s.message===qo})(r))throw r}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return _i}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(_){return this._lazyInitEmptyStyle(),this.style.setProjection(_),this._update(!0)}},f.MapMouseEvent=_a,f.MapTouchEvent=Ws,f.MapWheelEvent=Rc,f.Marker=Xn,f.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const r=this._map.getZoom(),s=r===this._map.getMaxZoom(),p=r===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(r,s)=>{const p=this._map._getUIString(`NavigationControl.${s}`);r.title=p,r.setAttribute("aria-label",p)},this.options=o.e({},Hi,_),this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(r=>r.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(r=>this._map.zoomIn({},{originalEvent:r}))),E.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(r=>this._map.zoomOut({},{originalEvent:r}))),E.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(r=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:r}):this._map.resetNorth({},{originalEvent:r})})),this._compassIcon=E.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new _o(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){E.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(_,r){const s=E.create("button",_,this._container);return s.type="button",s.addEventListener("click",r),s}},f.Popup=class extends o.E{constructor(_){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&E.remove(this._content),this._container&&(E.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new o.l("close"))),this),this._onMouseUp=r=>{this._update(r.point)},this._onMouseMove=r=>{this._update(r.point)},this._onDrag=r=>{this._update(r.point)},this._update=r=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=E.create("div","maplibregl-popup",this._map.getContainer()),this._tip=E.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const T of this.options.className.split(" "))this._container.classList.add(T);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Di(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!r)return;const s=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let p=this.options.anchor;const m=Ls(this.options.offset);if(!p){const T=this._container.offsetWidth,I=this._container.offsetHeight;let R;R=s.y+m.bottom.y<I?["top"]:s.y>this._map.transform.height-I?["bottom"]:[],s.x<T/2?R.push("left"):s.x>this._map.transform.width-T/2&&R.push("right"),p=R.length===0?"bottom":R.join("-")}let b=s.add(m[p]);this.options.subpixelPositioning||(b=b.round()),E.setTransform(this._container,`${Wi[p]} translate(${b.x}px,${b.y}px)`),ii(this._container,p,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(Oa),_)}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new o.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=o.S.convert(_),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const r=document.createDocumentFragment(),s=document.createElement("body");let p;for(s.innerHTML=_;p=s.firstChild,p;)r.appendChild(p);return this.setDOMContent(r)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=E.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=E.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const _=this._container.querySelector(Il);_&&_.focus()}},f.RasterDEMTileSource=fr,f.RasterTileSource=Lr,f.ScaleControl=class{constructor(_){this._onMove=()=>{Ti(this._map,this._container,this.options)},this.setUnit=r=>{this.options.unit=r,Ti(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Na),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){E.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Cr,f.Style=Ma,f.TerrainControl=class{constructor(_){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=_}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=E.create("button","maplibregl-ctrl-terrain",this._container),E.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){E.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=Lt,f.TwoFingersTouchRotateHandler=Gt,f.TwoFingersTouchZoomHandler=Je,f.TwoFingersTouchZoomRotateHandler=Yn,f.VectorTileSource=Be,f.VideoSource=Or,f.addSourceType=(_,r)=>o._(void 0,void 0,void 0,(function*(){if(yr(_))throw new Error(`A source type called "${_}" already exists.`);((s,p)=>{lr[s]=p})(_,r)})),f.clearPrewarmedResources=function(){const _=fe;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(ge),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.createTileMesh=js,f.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Wr().getRTLTextPluginStatus()},f.getVersion=function(){return Ho},f.getWorkerCount=function(){return Re.workerCount},f.getWorkerUrl=function(){return o.a.WORKER_URL},f.importScriptInWorkers=function(_){return ot().broadcast("IS",_)},f.prewarm=function(){Ie().acquire(ge)},f.setMaxParallelImageRequests=function(_){o.a.MAX_PARALLEL_IMAGE_REQUESTS=_},f.setRTLTextPlugin=function(_,r){return Wr().setRTLTextPlugin(_,r)},f.setWorkerCount=function(_){Re.workerCount=_},f.setWorkerUrl=function(_){o.a.WORKER_URL=_}}));var h=n;return h}))})(Um)),Um.exports}var QD=JD();class ek{constructor(t){const n=this;this.registeredElements={},this.baseLayers=[],this.firstSymbolLayer=void 0,this.eventHandlers={layerchange:[],viewportchange:[],addsource:[],addlayer:[]},this.wrapper={on:(o,y,v,S)=>{if(!n.eventHandlers[o])return;typeof v=="string"&&(S=v,v={}),n.eventHandlers[o].push({handler:y,options:v});const P=[o,y];S&&typeof S=="string"&&(n.initRegisteredElements(S),n.registeredElements[S].wrapperEvents.push(P))},off:(o,y)=>{n.eventHandlers[o]&&(n.eventHandlers[o]=n.eventHandlers[o].filter(v=>Object.is(v.handler,y)?!1:v))},fire:(o,y)=>{if(!n.eventHandlers[o])return;const v=y||window,S=new Event(o);n.eventHandlers[o].forEach(function(P){P.handler.call(v,S,n,y)})},layerState:[],layerStateString:"",oldLayerStateStrings:{},buildLayerObject:o=>{if(o)return{id:o.id,type:o.type,visible:o.visibility!=="none",baseLayer:n.baseLayers.indexOf(o.id)!==-1}},buildLayerObjects:()=>n.map.style._order.map(o=>n.wrapper.buildLayerObject(n.map.style._layers[o])).filter(o=>typeof o<"u"),refreshLayerState:()=>{n.wrapper.layerState=n.wrapper.buildLayerObjects(),JSON.stringify(n.wrapper.layerState)!==n.wrapper.layerStateString&&(n.wrapper.fire("layerchange"),n.wrapper.layerStateString=JSON.stringify(n.wrapper.layerState))},viewportState:{center:{lng:0,lat:0},zoom:0,bearing:0,pitch:0},viewportStateString:"{}",oldViewportStateString:"{}",getViewport:()=>typeof n.map.getCenter=="function"?{center:(({lng:o,lat:y})=>({lng:o,lat:y}))(n.map.getCenter()),zoom:n.map.getZoom(),bearing:n.map.getBearing(),pitch:n.map.getPitch()}:{center:{lng:0,lat:0},zoom:0,bearing:0,pitch:0},refreshViewport:()=>{n.wrapper.viewportState=n.wrapper.getViewport()}},this.cancelled=!1,this.initRegisteredElements=(o,y)=>{(typeof n.registeredElements[o]>"u"||typeof y<"u"&&y)&&(n.registeredElements[o]={layers:[],sources:[],images:[],events:[],controls:[],wrapperEvents:[]})},this.addLayer=(o,y,v)=>n.map.style?(v&&typeof v=="string"&&typeof o.id<"u"&&(n.initRegisteredElements(v),n.registeredElements[v].layers.push(o.id),o?.source&&typeof o?.source!="string"&&n.registeredElements[v].sources.push(o.id)),n.map.addLayer(o,y),n.wrapper.fire("addlayer",{layer_id:o.id}),this):this,this.addSource=(o,y,v)=>n.map.style?(v&&typeof v=="string"&&typeof o<"u"&&(n.initRegisteredElements(v),n.registeredElements[v].sources.push(o)),n.map.addSource(o,y),n.wrapper.fire("addsource",{source_id:o}),this):this,this.addImage=(o,y,v,S)=>n.map.style?typeof v=="string"&&typeof S>"u"?n.addImage(o,y,void 0,v):(S&&typeof S=="string"&&typeof o<"u"&&(n.initRegisteredElements(S),n.registeredElements[S].images.push(o)),n.map.addImage(o,y,v),this):this,this.on=(o,y,v,S)=>{if(typeof v=="string"&&typeof y=="function")return n.on.call(n,o,void 0,y,v);let P=[o,y,v];return y||(P=[o,v]),S&&typeof S=="string"&&(n.initRegisteredElements(S),n.registeredElements[S].events.push(P)),n.map.on(...P),this},this.addControl=(o,y,v)=>(v&&typeof v=="string"&&(n.initRegisteredElements(v),n.registeredElements[v].controls.push(o)),n.map.addControl(o,y),this),this.cleanup=o=>{n.map.style&&typeof n.registeredElements[o]<"u"&&(n.registeredElements[o].layers.forEach(y=>{n.map.style.getLayer(y)&&n.map.style.removeLayer(y)}),n.registeredElements[o].sources.forEach(y=>{n.map.style.getSource(y)&&n.map.style.removeSource(y)}),n.registeredElements[o].images.forEach(y=>{n.map.hasImage(y)&&n.map.style.removeImage(y)}),n.registeredElements[o].events.forEach(y=>{n.map.off(...y)}),n.registeredElements[o].controls.forEach(y=>{n.map.removeControl(y)}),n.registeredElements[o].wrapperEvents.forEach(y=>{n.wrapper.off(...y)}),n.initRegisteredElements(o,!0))},["moveLayer","removeLayer","removeSource","setPaintProperty","setLayoutProperty"].forEach(o=>{this[o]=(...y)=>(n.map&&n.map.style&&typeof n.map.style[o]=="function"&&n.map.style[o](...y),n.map._update?n.map._update(!0):void 0)}),["getLayer","getSource","listImages","getPaintProperty","getLayoutProperty","removeImage"].forEach(o=>{this[o]=(...y)=>n.map&&n.map.style?n.map.style[o](...y):!1}),this.addNativeMaplibreFunctionsAndProps=()=>{Object.getOwnPropertyNames(Object.getPrototypeOf(this.map)).forEach(o=>{typeof this[o]>"u"&&(this[o]=(...y)=>n.map[o](...y))}),Object.keys(this.map).forEach(o=>{typeof this[o]>"u"&&(this[o]=n.map[o])})},["getZoom","setZoom","getCenter","setCenter","getBearing","setBearing","getPitch","setPitch","jumpTo","flyTo","panTo","panBy","panBy","zoomTo","zoomIn","zoomOut","getPadding","setPadding","rotateTo","resetNorth","resetNorthPitch","snapToNorth","cameraForBounds","fitBounds","fitScreenCoordinates","getFreeCameraOptions","setFreeCameraOptions","easeTo","stop"].forEach(o=>{this[o]=(...y)=>{if(typeof n.map[o]=="function")return n.map[o].call(n.map,...y)}}),(async()=>{typeof t.mapOptions.style=="string"&&t.mapOptions.style.indexOf("mapbox://")===-1&&await fetch(t.mapOptions.style).then(o=>{if(o.ok)return o.json();throw new Error("error loading map style.json")}).then(o=>{o.layers.forEach(y=>{n.baseLayers.push(y.id),!n.firstSymbolLayer&&y.type==="symbol"&&(n.firstSymbolLayer=y.id)}),n.styleJson=o,t.mapOptions.style=o}).catch(o=>{console.log(o)}),n.map=new QD.Map(t.mapOptions),n.addNativeMaplibreFunctionsAndProps(),n.wrapper.refreshViewport(),n.wrapper.fire("viewportchange"),n.map.on("load",()=>{n.addNativeMaplibreFunctionsAndProps()}),n.map.on("move",()=>{n.wrapper.viewportState=n.wrapper.getViewport(),n.wrapper.fire("viewportchange")}),n.map.on("idle",()=>{n.wrapper.refreshLayerState()}),n.map.on("data",()=>{n.wrapper.refreshLayerState()}),typeof t.onReady=="function"&&t.onReady(n.map,n)})()}}function Yc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(a=>n.searchParams.append("args[]",a)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Yu="$$material";function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rg.apply(null,arguments)}function tk(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rk(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var nk=(function(){function e(n){var a=this;this._insertTag=function(c){var h;a.tags.length===0?a.insertionPoint?h=a.insertionPoint.nextSibling:a.prepend?h=a.container.firstChild:h=a.before:h=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(c,h),a.tags.push(c)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rk(this));var c=this.tags[this.tags.length-1];if(this.isSpeedy){var h=tk(c);try{h.insertRule(a,h.cssRules.length)}catch{}}else c.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var c;return(c=a.parentNode)==null?void 0:c.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Bs="-ms-",ng="-moz-",Ri="-webkit-",pP="comm",Hb="rule",Wb="decl",ik="@import",mP="@keyframes",ok="@layer",ak=Math.abs,Ag=String.fromCharCode,sk=Object.assign;function lk(e,t){return hs(e,0)^45?(((t<<2^hs(e,0))<<2^hs(e,1))<<2^hs(e,2))<<2^hs(e,3):0}function gP(e){return e.trim()}function uk(e,t){return(e=t.exec(e))?e[0]:e}function Ni(e,t,n){return e.replace(t,n)}function tb(e,t){return e.indexOf(t)}function hs(e,t){return e.charCodeAt(t)|0}function wp(e,t,n){return e.slice(t,n)}function Gu(e){return e.length}function Zb(e){return e.length}function _m(e,t){return t.push(e),e}function ck(e,t){return e.map(t).join("")}var Pg=1,hd=1,yP=0,gl=0,Ca=0,pd="";function Ig(e,t,n,a,c,h,f){return{value:e,root:t,parent:n,type:a,props:c,children:h,line:Pg,column:hd,length:f,return:""}}function Hd(e,t){return sk(Ig("",null,null,"",null,null,0),e,{length:-e.length},t)}function hk(){return Ca}function fk(){return Ca=gl>0?hs(pd,--gl):0,hd--,Ca===10&&(hd=1,Pg--),Ca}function zl(){return Ca=gl<yP?hs(pd,gl++):0,hd++,Ca===10&&(hd=1,Pg++),Ca}function Xu(){return hs(pd,gl)}function qm(){return gl}function Np(e,t){return wp(pd,e,t)}function Sp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _P(e){return Pg=hd=1,yP=Gu(pd=e),gl=0,[]}function vP(e){return pd="",e}function $m(e){return gP(Np(gl-1,rb(e===91?e+2:e===40?e+1:e)))}function dk(e){for(;(Ca=Xu())&&Ca<33;)zl();return Sp(e)>2||Sp(Ca)>3?"":" "}function pk(e,t){for(;--t&&zl()&&!(Ca<48||Ca>102||Ca>57&&Ca<65||Ca>70&&Ca<97););return Np(e,qm()+(t<6&&Xu()==32&&zl()==32))}function rb(e){for(;zl();)switch(Ca){case e:return gl;case 34:case 39:e!==34&&e!==39&&rb(Ca);break;case 40:e===41&&rb(e);break;case 92:zl();break}return gl}function mk(e,t){for(;zl()&&e+Ca!==57;)if(e+Ca===84&&Xu()===47)break;return"/*"+Np(t,gl-1)+"*"+Ag(e===47?e:zl())}function gk(e){for(;!Sp(Xu());)zl();return Np(e,gl)}function yk(e){return vP(Vm("",null,null,null,[""],e=_P(e),0,[0],e))}function Vm(e,t,n,a,c,h,f,o,y){for(var v=0,S=0,P=f,M=0,E=0,O=0,N=1,z=1,U=1,ee=0,ae="",W=c,le=h,te=a,we=ae;z;)switch(O=ee,ee=zl()){case 40:if(O!=108&&hs(we,P-1)==58){tb(we+=Ni($m(ee),"&","&\f"),"&\f")!=-1&&(U=-1);break}case 34:case 39:case 91:we+=$m(ee);break;case 9:case 10:case 13:case 32:we+=dk(O);break;case 92:we+=pk(qm()-1,7);continue;case 47:switch(Xu()){case 42:case 47:_m(_k(mk(zl(),qm()),t,n),y);break;default:we+="/"}break;case 123*N:o[v++]=Gu(we)*U;case 125*N:case 59:case 0:switch(ee){case 0:case 125:z=0;case 59+S:U==-1&&(we=Ni(we,/\f/g,"")),E>0&&Gu(we)-P&&_m(E>32?g5(we+";",a,n,P-1):g5(Ni(we," ","")+";",a,n,P-2),y);break;case 59:we+=";";default:if(_m(te=m5(we,t,n,v,S,c,o,ae,W=[],le=[],P),h),ee===123)if(S===0)Vm(we,t,te,te,W,h,P,o,le);else switch(M===99&&hs(we,3)===110?100:M){case 100:case 108:case 109:case 115:Vm(e,te,te,a&&_m(m5(e,te,te,0,0,c,o,ae,c,W=[],P),le),c,le,P,o,a?W:le);break;default:Vm(we,te,te,te,[""],le,0,o,le)}}v=S=E=0,N=U=1,ae=we="",P=f;break;case 58:P=1+Gu(we),E=O;default:if(N<1){if(ee==123)--N;else if(ee==125&&N++==0&&fk()==125)continue}switch(we+=Ag(ee),ee*N){case 38:U=S>0?1:(we+="\f",-1);break;case 44:o[v++]=(Gu(we)-1)*U,U=1;break;case 64:Xu()===45&&(we+=$m(zl())),M=Xu(),S=P=Gu(ae=we+=gk(qm())),ee++;break;case 45:O===45&&Gu(we)==2&&(N=0)}}return h}function m5(e,t,n,a,c,h,f,o,y,v,S){for(var P=c-1,M=c===0?h:[""],E=Zb(M),O=0,N=0,z=0;O<a;++O)for(var U=0,ee=wp(e,P+1,P=ak(N=f[O])),ae=e;U<E;++U)(ae=gP(N>0?M[U]+" "+ee:Ni(ee,/&\f/g,M[U])))&&(y[z++]=ae);return Ig(e,t,n,c===0?Hb:o,y,v,S)}function _k(e,t,n){return Ig(e,t,n,pP,Ag(hk()),wp(e,2,-2),0)}function g5(e,t,n,a){return Ig(e,t,n,Wb,wp(e,0,a),wp(e,a+1,-1),a)}function od(e,t){for(var n="",a=Zb(e),c=0;c<a;c++)n+=t(e[c],c,e,t)||"";return n}function vk(e,t,n,a){switch(e.type){case ok:if(e.children.length)break;case ik:case Wb:return e.return=e.return||e.value;case pP:return"";case mP:return e.return=e.value+"{"+od(e.children,a)+"}";case Hb:e.value=e.props.join(",")}return Gu(n=od(e.children,a))?e.return=e.value+"{"+n+"}":""}function bk(e){var t=Zb(e);return function(n,a,c,h){for(var f="",o=0;o<t;o++)f+=e[o](n,a,c,h)||"";return f}}function xk(e){return function(t){t.root||(t=t.return)&&e(t)}}function bP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var wk=function(t,n,a){for(var c=0,h=0;c=h,h=Xu(),c===38&&h===12&&(n[a]=1),!Sp(h);)zl();return Np(t,gl)},Sk=function(t,n){var a=-1,c=44;do switch(Sp(c)){case 0:c===38&&Xu()===12&&(n[a]=1),t[a]+=wk(gl-1,n,a);break;case 2:t[a]+=$m(c);break;case 4:if(c===44){t[++a]=Xu()===58?"&\f":"",n[a]=t[a].length;break}default:t[a]+=Ag(c)}while(c=zl());return t},Ek=function(t,n){return vP(Sk(_P(t),n))},y5=new WeakMap,Tk=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,a=t.parent,c=t.column===a.column&&t.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!y5.get(a))&&!c){y5.set(t,!0);for(var h=[],f=Ek(n,h),o=a.props,y=0,v=0;y<f.length;y++)for(var S=0;S<o.length;S++,v++)t.props[v]=h[y]?f[y].replace(/&\f/g,o[S]):o[S]+" "+f[y]}}},Ck=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xP(e,t){switch(lk(e,t)){case 5103:return Ri+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ri+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ri+e+ng+e+Bs+e+e;case 6828:case 4268:return Ri+e+Bs+e+e;case 6165:return Ri+e+Bs+"flex-"+e+e;case 5187:return Ri+e+Ni(e,/(\w+).+(:[^]+)/,Ri+"box-$1$2"+Bs+"flex-$1$2")+e;case 5443:return Ri+e+Bs+"flex-item-"+Ni(e,/flex-|-self/,"")+e;case 4675:return Ri+e+Bs+"flex-line-pack"+Ni(e,/align-content|flex-|-self/,"")+e;case 5548:return Ri+e+Bs+Ni(e,"shrink","negative")+e;case 5292:return Ri+e+Bs+Ni(e,"basis","preferred-size")+e;case 6060:return Ri+"box-"+Ni(e,"-grow","")+Ri+e+Bs+Ni(e,"grow","positive")+e;case 4554:return Ri+Ni(e,/([^-])(transform)/g,"$1"+Ri+"$2")+e;case 6187:return Ni(Ni(Ni(e,/(zoom-|grab)/,Ri+"$1"),/(image-set)/,Ri+"$1"),e,"")+e;case 5495:case 3959:return Ni(e,/(image-set\([^]*)/,Ri+"$1$`$1");case 4968:return Ni(Ni(e,/(.+:)(flex-)?(.*)/,Ri+"box-pack:$3"+Bs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ri+e+e;case 4095:case 3583:case 4068:case 2532:return Ni(e,/(.+)-inline(.+)/,Ri+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gu(e)-1-t>6)switch(hs(e,t+1)){case 109:if(hs(e,t+4)!==45)break;case 102:return Ni(e,/(.+:)(.+)-([^]+)/,"$1"+Ri+"$2-$3$1"+ng+(hs(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tb(e,"stretch")?xP(Ni(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(hs(e,t+1)!==115)break;case 6444:switch(hs(e,Gu(e)-3-(~tb(e,"!important")&&10))){case 107:return Ni(e,":",":"+Ri)+e;case 101:return Ni(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ri+(hs(e,14)===45?"inline-":"")+"box$3$1"+Ri+"$2$3$1"+Bs+"$2box$3")+e}break;case 5936:switch(hs(e,t+11)){case 114:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ri+e+Bs+e+e}return e}var Ak=function(t,n,a,c){if(t.length>-1&&!t.return)switch(t.type){case Wb:t.return=xP(t.value,t.length);break;case mP:return od([Hd(t,{value:Ni(t.value,"@","@"+Ri)})],c);case Hb:if(t.length)return ck(t.props,function(h){switch(uk(h,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return od([Hd(t,{props:[Ni(h,/:(read-\w+)/,":"+ng+"$1")]})],c);case"::placeholder":return od([Hd(t,{props:[Ni(h,/:(plac\w+)/,":"+Ri+"input-$1")]}),Hd(t,{props:[Ni(h,/:(plac\w+)/,":"+ng+"$1")]}),Hd(t,{props:[Ni(h,/:(plac\w+)/,Bs+"input-$1")]})],c)}return""})}},Pk=[Ak],Ik=function(t){var n=t.key;if(n==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(N){var z=N.getAttribute("data-emotion");z.indexOf(" ")!==-1&&(document.head.appendChild(N),N.setAttribute("data-s",""))})}var c=t.stylisPlugins||Pk,h={},f,o=[];f=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(N){for(var z=N.getAttribute("data-emotion").split(" "),U=1;U<z.length;U++)h[z[U]]=!0;o.push(N)});var y,v=[Tk,Ck];{var S,P=[vk,xk(function(N){S.insert(N)})],M=bk(v.concat(c,P)),E=function(z){return od(yk(z),M)};y=function(z,U,ee,ae){S=ee,E(z?z+"{"+U.styles+"}":U.styles),ae&&(O.inserted[U.name]=!0)}}var O={key:n,sheet:new nk({key:n,container:f,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:h,registered:{},insert:y};return O.sheet.hydrate(o),O},vm={exports:{}},zi={};/** @license React v16.13.1
|
|
770
|
+
${ie.shaderPreludeCode.vertexSource}`,define:ie.shaderDefine},defaultProjectionData:Ue},qe=Y.renderingMode?Y.renderingMode:"2d";if(T.renderPass==="offscreen"){const Ke=Y.prerender;Ke&&(T.setCustomLayerDefaults(),X.setColorMode(T.colorModeForRenderPass()),Ke.call(Y,X.gl,je),X.setDirty(),T.setBaseState())}else if(T.renderPass==="translucent"){T.setCustomLayerDefaults(),X.setColorMode(T.colorModeForRenderPass()),X.setStencilMode(cn.disabled);const Ke=qe==="3d"?T.getDepthModeFor3D():T.getDepthModeForSublayer(0,pn.ReadOnly);X.setDepthMode(Ke),Y.render(X.gl,je),X.setDirty(),T.setBaseState(),X.bindFramebuffer.set(null)}})(r,0,p,b))}saveTileTexture(r){const s=this._tileTextures[r.size[0]];s?s.push(r):this._tileTextures[r.size[0]]=[r]}getTileTexture(r){const s=this._tileTextures[r];return s&&s.length>0?s.pop():null}isPatternMissing(r){if(!r)return!1;if(!r.from||!r.to)return!0;const s=this.imageManager.getPattern(r.from.toString()),p=this.imageManager.getPattern(r.to.toString());return!s||!p}useProgram(r,s,p=!1,m=[]){this.cache=this.cache||{};const b=!!this.style.map.terrain,T=this.style.projection,I=p?yt.projectionMercator:T.shaderPreludeCode,R=p?xr:T.shaderDefine,j=r+(s?s.cacheKey:"")+`/${p?Fr:T.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(b?"/terrain":"")+(m?`/${m.join("/")}`:"");return this.cache[j]||(this.cache[j]=new el(this.context,yt[r],s,is[r],this._showOverdrawInspector,b,I,R,m)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const r=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(r.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new o.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:r,drawingBufferHeight:s}=this.context.gl;return this.width!==r||this.height!==s}}function Ra(_,r){let s,p=!1,m=null,b=null;const T=()=>{m=null,p&&(_.apply(b,s),m=setTimeout(T,r),p=!1)};return(...I)=>(p=!0,b=this,s=I,m||T(),m)}class sc{constructor(r){this._getCurrentHash=()=>{const s=window.location.hash.replace("#","");if(this._hashName){let p;return s.split("&").map((m=>m.split("="))).forEach((m=>{m[0]===this._hashName&&(p=m)})),(p&&p[1]||"").split("/")}return s.split("/")},this._onHashChange=()=>{const s=this._getCurrentHash();if(!this._isValidHash(s))return!1;const p=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:p,pitch:+(s[4]||0)}),!0},this._updateHashUnthrottled=()=>{const s=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,s)},this._removeHash=()=>{const s=this._getCurrentHash();if(s.length===0)return;const p=s.join("/");let m=p;m.split("&").length>0&&(m=m.split("&")[0]),this._hashName&&(m=`${this._hashName}=${p}`);let b=window.location.hash.replace(m,"");b.startsWith("#&")?b=b.slice(0,1)+b.slice(2):b==="#"&&(b="");let T=window.location.href.replace(/(#.+)?$/,b);T=T.replace("&&","&"),window.history.replaceState(window.history.state,null,T)},this._updateHash=Ra(this._updateHashUnthrottled,300),this._hashName=r&&encodeURIComponent(r)}addTo(r){return this._map=r,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(r){const s=this._map.getCenter(),p=Math.round(100*this._map.getZoom())/100,m=Math.ceil((p*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,m),T=Math.round(s.lng*b)/b,I=Math.round(s.lat*b)/b,R=this._map.getBearing(),j=this._map.getPitch();let G="";if(G+=r?`/${T}/${I}/${p}`:`${p}/${I}/${T}`,(R||j)&&(G+="/"+Math.round(10*R)/10),j&&(G+=`/${Math.round(j)}`),this._hashName){const X=this._hashName;let Y=!1;const ie=window.location.hash.slice(1).split("&").map((be=>{const Ue=be.split("=")[0];return Ue===X?(Y=!0,`${Ue}=${G}`):be})).filter((be=>be));return Y||ie.push(`${X}=${G}`),`#${ie.join("&")}`}return`#${G}`}_isValidHash(r){if(r.length<3||r.some(isNaN))return!1;try{new o.S(+r[2],+r[1])}catch{return!1}const s=+r[0],p=+(r[3]||0),m=+(r[4]||0);return s>=this._map.getMinZoom()&&s<=this._map.getMaxZoom()&&p>=-180&&p<=180&&m>=this._map.getMinPitch()&&m<=this._map.getMaxPitch()}}const ku={linearity:.3,easing:o.cl(0,0,.3,1)},hu=o.e({deceleration:2500,maxSpeed:1400},ku),Dc=o.e({deceleration:20,maxSpeed:1400},ku),Ru=o.e({deceleration:1e3,maxSpeed:360},ku),kc=o.e({deceleration:1e3,maxSpeed:90},ku),of=o.e({deceleration:1e3,maxSpeed:360},ku);class lc{constructor(r){this._map=r,this.clear()}clear(){this._inertiaBuffer=[]}record(r){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:M.now(),settings:r})}_drainInertiaBuffer(){const r=this._inertiaBuffer,s=M.now();for(;r.length>0&&s-r[0].time>160;)r.shift()}_onMoveEnd(r){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const s={zoom:0,bearing:0,pitch:0,roll:0,pan:new o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)s.zoom+=b.zoomDelta||0,s.bearing+=b.bearingDelta||0,s.pitch+=b.pitchDelta||0,s.roll+=b.rollDelta||0,b.panDelta&&s.pan._add(b.panDelta),b.around&&(s.around=b.around),b.pinchAround&&(s.pinchAround=b.pinchAround);const p=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,m={};if(s.pan.mag()){const b=cl(s.pan.mag(),p,o.e({},hu,r||{})),T=s.pan.mult(b.amount/s.pan.mag()),I=this._map.cameraHelper.handlePanInertia(T,this._map.transform);m.center=I.easingCenter,m.offset=I.easingOffset,Pl(m,b)}if(s.zoom){const b=cl(s.zoom,p,Dc);m.zoom=this._map.transform.zoom+b.amount,Pl(m,b)}if(s.bearing){const b=cl(s.bearing,p,Ru);m.bearing=this._map.transform.bearing+o.ag(b.amount,-179,179),Pl(m,b)}if(s.pitch){const b=cl(s.pitch,p,kc);m.pitch=this._map.transform.pitch+b.amount,Pl(m,b)}if(s.roll){const b=cl(s.roll,p,of);m.roll=this._map.transform.roll+o.ag(b.amount,-179,179),Pl(m,b)}if(m.zoom||m.bearing){const b=s.pinchAround===void 0?s.around:s.pinchAround;m.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),o.e(m,{noMoveStart:!0})}}function Pl(_,r){(!_.duration||_.duration<r.duration)&&(_.duration=r.duration,_.easing=r.easing)}function cl(_,r,s){const{maxSpeed:p,linearity:m,deceleration:b}=s,T=o.ag(_*m/(r/1e3),-p,p),I=Math.abs(T)/(b*m);return{easing:s.easing,duration:1e3*I,amount:T*(I/2)}}class _a extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p,m={}){p=p instanceof MouseEvent?p:new MouseEvent(r,p);const b=E.mousePos(s.getCanvas(),p),T=s.unproject(b);super(r,o.e({point:b,lngLat:T,originalEvent:p},m)),this._defaultPrevented=!1,this.target=s}}class Ws extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p){const m=r==="touchend"?p.changedTouches:p.touches,b=E.touchPos(s.getCanvasContainer(),m),T=b.map((R=>s.unproject(R))),I=b.reduce(((R,j,G,X)=>R.add(j.div(X.length))),new o.P(0,0));super(r,{points:b,point:I,lngLats:T,lngLat:s.unproject(I),originalEvent:p}),this._defaultPrevented=!1}}class Rc extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(r,s,p){super(r,{originalEvent:p}),this._defaultPrevented=!1}}class af{constructor(r,s){this._map=r,this._clickTolerance=s.clickTolerance}reset(){delete this._mousedownPos}wheel(r){return this._firePreventable(new Rc(r.type,this._map,r))}mousedown(r,s){return this._mousedownPos=s,this._firePreventable(new _a(r.type,this._map,r))}mouseup(r){this._map.fire(new _a(r.type,this._map,r))}click(r,s){this._mousedownPos&&this._mousedownPos.dist(s)>=this._clickTolerance||this._map.fire(new _a(r.type,this._map,r))}dblclick(r){return this._firePreventable(new _a(r.type,this._map,r))}mouseover(r){this._map.fire(new _a(r.type,this._map,r))}mouseout(r){this._map.fire(new _a(r.type,this._map,r))}touchstart(r){return this._firePreventable(new Ws(r.type,this._map,r))}touchmove(r){this._map.fire(new Ws(r.type,this._map,r))}touchend(r){this._map.fire(new Ws(r.type,this._map,r))}touchcancel(r){this._map.fire(new Ws(r.type,this._map,r))}_firePreventable(r){if(this._map.fire(r),r.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class sf{constructor(r){this._map=r}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(r){this._map.fire(new _a(r.type,this._map,r))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new _a("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(r){this._delayContextMenu?this._contextMenuEvent=r:this._ignoreContextMenu||this._map.fire(new _a(r.type,this._map,r)),this._map.listens("contextmenu")&&r.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Nu{constructor(r){this._map=r}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(r){return this.transform.screenPointToLocation(o.P.convert(r),this._map.terrain)}}class hh{constructor(r,s){this._map=r,this._tr=new Nu(r),this._el=r.getCanvasContainer(),this._container=r.getContainer(),this._clickTolerance=s.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(r,s){this.isEnabled()&&r.shiftKey&&r.button===0&&(E.disableDrag(),this._startPos=this._lastPos=s,this._active=!0)}mousemoveWindow(r,s){if(!this._active)return;const p=s;if(this._lastPos.equals(p)||!this._box&&p.dist(this._startPos)<this._clickTolerance)return;const m=this._startPos;this._lastPos=p,this._box||(this._box=E.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",r));const b=Math.min(m.x,p.x),T=Math.max(m.x,p.x),I=Math.min(m.y,p.y),R=Math.max(m.y,p.y);E.setTransform(this._box,`translate(${b}px,${I}px)`),this._box.style.width=T-b+"px",this._box.style.height=R-I+"px"}mouseupWindow(r,s){if(!this._active||r.button!==0)return;const p=this._startPos,m=s;if(this.reset(),E.suppressClick(),p.x!==m.x||p.y!==m.y)return this._map.fire(new o.l("boxzoomend",{originalEvent:r})),{cameraAnimation:b=>b.fitScreenCoordinates(p,m,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",r)}keydown(r){this._active&&r.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",r))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(E.remove(this._box),this._box=null),E.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(r,s){return this._map.fire(new o.l(r,{originalEvent:s}))}}function Nc(_,r){if(_.length!==r.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${r.length}`);const s={};for(let p=0;p<_.length;p++)s[_[p].identifier]=r[p];return s}class lf{constructor(r){this.reset(),this.numTouches=r.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(r,s,p){(this.centroid||p.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=r.timeStamp),p.length===this.numTouches&&(this.centroid=(function(m){const b=new o.P(0,0);for(const T of m)b._add(T);return b.div(m.length)})(s),this.touches=Nc(p,s)))}touchmove(r,s,p){if(this.aborted||!this.centroid)return;const m=Nc(p,s);for(const b in this.touches){const T=m[b];(!T||T.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(r,s,p){if((!this.centroid||r.timeStamp-this.startTime>500)&&(this.aborted=!0),p.length===0){const m=!this.aborted&&this.centroid;if(this.reset(),m)return m}}}class uc{constructor(r){this.singleTap=new lf(r),this.numTaps=r.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(r,s,p){this.singleTap.touchstart(r,s,p)}touchmove(r,s,p){this.singleTap.touchmove(r,s,p)}touchend(r,s,p){const m=this.singleTap.touchend(r,s,p);if(m){const b=r.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(m)<30;if(b&&T||this.reset(),this.count++,this.lastTime=r.timeStamp,this.lastTap=m,this.count===this.numTaps)return this.reset(),m}}}class fu{constructor(r){this._tr=new Nu(r),this._zoomIn=new uc({numTouches:1,numTaps:2}),this._zoomOut=new uc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(r,s,p){this._zoomIn.touchstart(r,s,p),this._zoomOut.touchstart(r,s,p)}touchmove(r,s,p){this._zoomIn.touchmove(r,s,p),this._zoomOut.touchmove(r,s,p)}touchend(r,s,p){const m=this._zoomIn.touchend(r,s,p),b=this._zoomOut.touchend(r,s,p),T=this._tr;return m?(this._active=!0,r.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:I=>I.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(m)},{originalEvent:r})}):b?(this._active=!0,r.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:I=>I.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(b)},{originalEvent:r})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ou{constructor(r){this._enabled=!!r.enable,this._moveStateManager=r.moveStateManager,this._clickTolerance=r.clickTolerance||1,this._moveFunction=r.move,this._activateOnStart=!!r.activateOnStart,r.assignEvents(this),this.reset()}reset(r){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(r)}_move(...r){const s=this._moveFunction(...r);if(s.bearingDelta||s.pitchDelta||s.rollDelta||s.around||s.panDelta)return this._active=!0,s}dragStart(r,s){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(r)&&(this._moveStateManager.startMove(r),this._lastPoint=Array.isArray(s)?s[0]:s,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(r,s){if(!this.isEnabled())return;const p=this._lastPoint;if(!p)return;if(r.preventDefault(),!this._moveStateManager.isValidMoveEvent(r))return void this.reset(r);const m=Array.isArray(s)?s[0]:s;return!this._moved&&m.dist(p)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=m,this._move(p,m))}dragEnd(r){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(r)&&(this._moved&&E.suppressClick(),this.reset(r))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Is=0,Ms=2,C={[Is]:1,[Ms]:2};class L{constructor(r){this._correctEvent=r.checkCorrectEvent}startMove(r){const s=E.mouseButton(r);this._eventButton=s}endMove(r){delete this._eventButton}isValidStartEvent(r){return this._correctEvent(r)}isValidMoveEvent(r){return!(function(s,p){const m=C[p];return s.buttons===void 0||(s.buttons&m)!==m})(r,this._eventButton)}isValidEndEvent(r){return E.mouseButton(r)===this._eventButton}}class ${constructor(){this._firstTouch=void 0}_isOneFingerTouch(r){return r.targetTouches.length===1}_isSameTouchEvent(r){return r.targetTouches[0].identifier===this._firstTouch}startMove(r){this._firstTouch=r.targetTouches[0].identifier}endMove(r){delete this._firstTouch}isValidStartEvent(r){return this._isOneFingerTouch(r)}isValidMoveEvent(r){return this._isOneFingerTouch(r)&&this._isSameTouchEvent(r)}isValidEndEvent(r){return this._isOneFingerTouch(r)&&this._isSameTouchEvent(r)}}class K{constructor(r=new L({checkCorrectEvent:()=>!0}),s=new $){this.mouseMoveStateManager=r,this.oneFingerTouchMoveStateManager=s}_executeRelevantHandler(r,s,p){return r instanceof MouseEvent?s(r):typeof TouchEvent<"u"&&r instanceof TouchEvent?p(r):void 0}startMove(r){this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.startMove(s)),(s=>this.oneFingerTouchMoveStateManager.startMove(s)))}endMove(r){this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.endMove(s)),(s=>this.oneFingerTouchMoveStateManager.endMove(s)))}isValidStartEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidStartEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidStartEvent(s)))}isValidMoveEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidMoveEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(s)))}isValidEndEvent(r){return this._executeRelevantHandler(r,(s=>this.mouseMoveStateManager.isValidEndEvent(s)),(s=>this.oneFingerTouchMoveStateManager.isValidEndEvent(s)))}}const ve=_=>{_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=r=>{r.preventDefault()}};class Ce{constructor(r,s){this._clickTolerance=r.clickTolerance||1,this._map=s,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(r){return r<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(r,s,p){return this._calculateTransform(r,s,p)}touchmove(r,s,p){if(this._active){if(!this._shouldBePrevented(p.length))return r.preventDefault(),this._calculateTransform(r,s,p);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",r)}}touchend(r,s,p){this._calculateTransform(r,s,p),this._active&&this._shouldBePrevented(p.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(r,s,p){p.length>0&&(this._active=!0);const m=Nc(p,s),b=new o.P(0,0),T=new o.P(0,0);let I=0;for(const j in m){const G=m[j],X=this._touches[j];X&&(b._add(G),T._add(G.sub(X)),I++,m[j]=G)}if(this._touches=m,this._shouldBePrevented(I)||!T.mag())return;const R=T.div(I);return this._sum._add(R),this._sum.mag()<this._clickTolerance?void 0:{around:b.div(I),panDelta:R}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class De{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(r,s,p){this._firstTwoTouches||p.length<2||(this._firstTwoTouches=[p[0].identifier,p[1].identifier],this._start([s[0],s[1]]))}touchmove(r,s,p){if(!this._firstTwoTouches)return;r.preventDefault();const[m,b]=this._firstTwoTouches,T=Oe(p,s,m),I=Oe(p,s,b);if(!T||!I)return;const R=this._aroundCenter?null:T.add(I).div(2);return this._move([T,I],R,r)}touchend(r,s,p){if(!this._firstTwoTouches)return;const[m,b]=this._firstTwoTouches,T=Oe(p,s,m),I=Oe(p,s,b);T&&I||(this._active&&E.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(r){this._enabled=!0,this._aroundCenter=!!r&&r.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Oe(_,r,s){for(let p=0;p<_.length;p++)if(_[p].identifier===s)return r[p]}function $e(_,r){return Math.log(_/r)/Math.LN2}class Je extends De{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(r){this._startDistance=this._distance=r[0].dist(r[1])}_move(r,s){const p=this._distance;if(this._distance=r[0].dist(r[1]),this._active||!(Math.abs($e(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:$e(this._distance,p),pinchAround:s}}}function Qe(_,r){return 180*_.angleWith(r)/Math.PI}class Gt extends De{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(r){this._startVector=this._vector=r[0].sub(r[1]),this._minDiameter=r[0].dist(r[1])}_move(r,s,p){const m=this._vector;if(this._vector=r[0].sub(r[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Qe(this._vector,m),pinchAround:s}}_isBelowThreshold(r){this._minDiameter=Math.min(this._minDiameter,r.mag());const s=25/(Math.PI*this._minDiameter)*360,p=Qe(r,this._startVector);return Math.abs(p)<s}}function et(_){return Math.abs(_.y)>Math.abs(_.x)}class Lt extends De{constructor(r){super(),this._currentTouchCount=0,this._map=r}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(r,s,p){super.touchstart(r,s,p),this._currentTouchCount=p.length}_start(r){this._lastPoints=r,et(r[0].sub(r[1]))&&(this._valid=!1)}_move(r,s,p){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const m=r[0].sub(this._lastPoints[0]),b=r[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(m,b,p.timeStamp),this._valid?(this._lastPoints=r,this._active=!0,{pitchDelta:(m.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(r,s,p){if(this._valid!==void 0)return this._valid;const m=r.mag()>=2,b=s.mag()>=2;if(!m&&!b)return;if(!m||!b)return this._firstMove===void 0&&(this._firstMove=p),p-this._firstMove<100&&void 0;const T=r.y>0==s.y>0;return et(r)&&et(s)&&T}}const Ot={panStep:100,bearingStep:15,pitchStep:10};class tr{constructor(r){this._tr=new Nu(r);const s=Ot;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(r){if(r.altKey||r.ctrlKey||r.metaKey)return;let s=0,p=0,m=0,b=0,T=0;switch(r.keyCode){case 61:case 107:case 171:case 187:s=1;break;case 189:case 109:case 173:s=-1;break;case 37:r.shiftKey?p=-1:(r.preventDefault(),b=-1);break;case 39:r.shiftKey?p=1:(r.preventDefault(),b=1);break;case 38:r.shiftKey?m=1:(r.preventDefault(),T=-1);break;case 40:r.shiftKey?m=-1:(r.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(p=0,m=0),{cameraAnimation:I=>{const R=this._tr;I.easeTo({duration:300,easeId:"keyboardHandler",easing:$t,zoom:s?Math.round(R.zoom)+s*(r.shiftKey?2:1):R.zoom,bearing:R.bearing+p*this._bearingStep,pitch:R.pitch+m*this._pitchStep,offset:[-b*this._panStep,-T*this._panStep],center:R.center},{originalEvent:r})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function $t(_){return _*(2-_)}const jt=4.000244140625,ir=1/450;class Cr{constructor(r,s){this._onTimeout=p=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(p)},this._map=r,this._tr=new Nu(r),this._triggerRenderFrame=s,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=ir}setZoomRate(r){this._defaultZoomRate=r}setWheelZoomRate(r){this._wheelZoomRate=r}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(r){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!r&&r.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(r){return!!this._map.cooperativeGestures.isEnabled()&&!(r.ctrlKey||this._map.cooperativeGestures.isBypassed(r))}wheel(r){if(!this.isEnabled())return;if(this._shouldBePrevented(r))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",r);let s=r.deltaMode===WheelEvent.DOM_DELTA_LINE?40*r.deltaY:r.deltaY;const p=M.now(),m=p-(this._lastWheelEventTime||0);this._lastWheelEventTime=p,s!==0&&s%jt==0?this._type="wheel":s!==0&&Math.abs(s)<4?this._type="trackpad":m>400?(this._type=null,this._lastValue=s,this._timeout=setTimeout(this._onTimeout,40,r)):this._type||(this._type=Math.abs(m*s)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,s+=this._lastValue)),r.shiftKey&&s&&(s/=4),this._type&&(this._lastWheelEvent=r,this._delta-=s,this._active||this._start(r)),r.preventDefault()}_start(r){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const s=E.mousePos(this._map.getCanvas(),r),p=this._tr;this._aroundPoint=this._aroundCenter?p.transform.locationToScreenPoint(o.S.convert(p.center)):s,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const r=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const I=r.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=I),typeof this._targetZoom=="number"&&(this._targetZoom+=I)}if(this._delta!==0){const I=this._type==="wheel"&&Math.abs(this._delta)>jt?this._wheelZoomRate:this._defaultZoomRate;let R=2/(1+Math.exp(-Math.abs(this._delta*I)));this._delta<0&&R!==0&&(R=1/R);const j=typeof this._targetZoom!="number"?r.scale:o.ae(this._targetZoom);this._targetZoom=r.getConstrained(r.getCameraLngLat(),o.aj(j*R)).zoom,this._type==="wheel"&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const s=typeof this._targetZoom!="number"?r.zoom:this._targetZoom,p=this._startZoom,m=this._easing;let b,T=!1;if(this._type==="wheel"&&p&&m){const I=M.now()-this._lastWheelEventTime,R=Math.min((I+5)/200,1),j=m(R);b=o.C.number(p,s,j),R<1?this._frameId||(this._frameId=!0):T=!0}else b=s,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=b,{noInertia:!0,needsRenderFrame:!T,zoomDelta:b-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(r){let s=o.cn;if(this._prevEase){const p=this._prevEase,m=(M.now()-p.start)/p.duration,b=p.easing(m+.01)-p.easing(m),T=.27/Math.sqrt(b*b+1e-4)*.01,I=Math.sqrt(.0729-T*T);s=o.cl(T,I,.25,1)}return this._prevEase={start:M.now(),duration:r,easing:s},s}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class mr{constructor(r,s){this._clickZoom=r,this._tapZoom=s}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class yn{constructor(r){this._tr=new Nu(r),this.reset()}reset(){this._active=!1}dblclick(r,s){return r.preventDefault(),{cameraAnimation:p=>{p.easeTo({duration:300,zoom:this._tr.zoom+(r.shiftKey?-1:1),around:this._tr.unproject(s)},{originalEvent:r})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class an{constructor(){this._tap=new uc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(r,s,p){if(!this._swipePoint)if(this._tapTime){const m=s[0],b=r.timeStamp-this._tapTime<500,T=this._tapPoint.dist(m)<30;b&&T?p.length>0&&(this._swipePoint=m,this._swipeTouch=p[0].identifier):this.reset()}else this._tap.touchstart(r,s,p)}touchmove(r,s,p){if(this._tapTime){if(this._swipePoint){if(p[0].identifier!==this._swipeTouch)return;const m=s[0],b=m.y-this._swipePoint.y;return this._swipePoint=m,r.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(r,s,p)}touchend(r,s,p){if(this._tapTime)this._swipePoint&&p.length===0&&this.reset();else{const m=this._tap.touchend(r,s,p);m&&(this._tapTime=r.timeStamp,this._tapPoint=m)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zn{constructor(r,s,p){this._el=r,this._mousePan=s,this._touchPan=p}enable(r){this._inertiaOptions=r||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class un{constructor(r,s,p,m){this._pitchWithRotate=r.pitchWithRotate,this._rollEnabled=r.rollEnabled,this._mouseRotate=s,this._mousePitch=p,this._mouseRoll=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Yn{constructor(r,s,p,m){this._el=r,this._touchZoom=s,this._touchRotate=p,this._tapDragZoom=m,this._rotationDisabled=!1,this._enabled=!0}enable(r){this._touchZoom.enable(r),this._rotationDisabled||this._touchRotate.enable(r),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ko{constructor(r,s){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=r,this._options=s,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const r=this._map.getCanvasContainer();r.classList.add("maplibregl-cooperative-gestures"),this._container=E.create("div","maplibregl-cooperative-gesture-screen",r);let s=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(s=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const p=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),m=document.createElement("div");m.className="maplibregl-desktop-message",m.textContent=s,this._container.appendChild(m);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=p,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(E.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(r){return r[this._bypassKey]}notifyGestureBlocked(r,s){this._enabled&&(this._map.fire(new o.l("cooperativegestureprevented",{gestureType:r,originalEvent:s})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const kn=_=>_.zoom||_.drag||_.roll||_.pitch||_.rotate;class fn extends o.l{}function $r(_){return _.panDelta&&_.panDelta.mag()||_.zoomDelta||_.bearingDelta||_.pitchDelta||_.rollDelta}class Mi{constructor(r,s){this.handleWindowEvent=m=>{this.handleEvent(m,`${m.type}Window`)},this.handleEvent=(m,b)=>{if(m.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=m.type==="renderFrame"?void 0:m,I={needsRenderFrame:!1},R={},j={};for(const{handlerName:Y,handler:ie,allowed:be}of this._handlers){if(!ie.isEnabled())continue;let Ue;if(this._blockedByActive(j,be,Y))ie.reset();else if(ie[b||m.type]){if(o.co(m,b||m.type)){const je=E.mousePos(this._map.getCanvas(),m);Ue=ie[b||m.type](m,je)}else if(o.cp(m,b||m.type)){const je=this._getMapTouches(m.touches),qe=E.touchPos(this._map.getCanvas(),je);Ue=ie[b||m.type](m,qe,je)}else o.cq(b||m.type)||(Ue=ie[b||m.type](m));this.mergeHandlerResult(I,R,Ue,Y,T),Ue&&Ue.needsRenderFrame&&this._triggerRenderFrame()}(Ue||ie.isActive())&&(j[Y]=ie)}const G={};for(const Y in this._previousActiveHandlers)j[Y]||(G[Y]=T);this._previousActiveHandlers=j,(Object.keys(G).length||$r(I))&&(this._changes.push([I,R,G]),this._triggerRenderFrame()),(Object.keys(j).length||$r(I))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:X}=I;X&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],X(this._map))},this._map=r,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lc(r),this._bearingSnap=s.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(s);const p=this._el;this._listeners=[[p,"touchstart",{passive:!0}],[p,"touchmove",{passive:!1}],[p,"touchend",void 0],[p,"touchcancel",void 0],[p,"mousedown",void 0],[p,"mousemove",void 0],[p,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[p,"mouseover",void 0],[p,"mouseout",void 0],[p,"dblclick",void 0],[p,"click",void 0],[p,"keydown",{capture:!1}],[p,"keyup",void 0],[p,"wheel",{passive:!1}],[p,"contextmenu",void 0],[window,"blur",void 0]];for(const[m,b,T]of this._listeners)E.addEventListener(m,b,m===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[r,s,p]of this._listeners)E.removeEventListener(r,s,r===document?this.handleWindowEvent:this.handleEvent,p)}_addDefaultHandlers(r){const s=this._map,p=s.getCanvasContainer();this._add("mapEvent",new af(s,r));const m=s.boxZoom=new hh(s,r);this._add("boxZoom",m),r.interactive&&r.boxZoom&&m.enable();const b=s.cooperativeGestures=new ko(s,r.cooperativeGestures);this._add("cooperativeGestures",b),r.cooperativeGestures&&b.enable();const T=new fu(s),I=new yn(s);s.doubleClickZoom=new mr(I,T),this._add("tapZoom",T),this._add("clickZoom",I),r.interactive&&r.doubleClickZoom&&s.doubleClickZoom.enable();const R=new an;this._add("tapDragZoom",R);const j=s.touchPitch=new Lt(s);this._add("touchPitch",j),r.interactive&&r.touchPitch&&s.touchPitch.enable(r.touchPitch);const G=()=>s.project(s.getCenter()),X=(function({enable:nt,clickTolerance:dt,aroundCenter:bt=!0,minPixelCenterThreshold:rt=100,rotateDegreesPerPixelMoved:At=.8},qt){const Bt=new L({checkCorrectEvent:zt=>E.mouseButton(zt)===0&&zt.ctrlKey||E.mouseButton(zt)===2&&!zt.ctrlKey});return new Ou({clickTolerance:dt,move:(zt,Vt)=>{const Dr=qt();if(bt&&Math.abs(Dr.y-zt.y)>rt)return{bearingDelta:o.cm(new o.P(zt.x,Vt.y),Vt,Dr)};let Ar=(Vt.x-zt.x)*At;return bt&&Vt.y<Dr.y&&(Ar=-Ar),{bearingDelta:Ar}},moveStateManager:Bt,enable:nt,assignEvents:ve})})(r,G),Y=(function({enable:nt,clickTolerance:dt,pitchDegreesPerPixelMoved:bt=-.5}){const rt=new L({checkCorrectEvent:At=>E.mouseButton(At)===0&&At.ctrlKey||E.mouseButton(At)===2});return new Ou({clickTolerance:dt,move:(At,qt)=>({pitchDelta:(qt.y-At.y)*bt}),moveStateManager:rt,enable:nt,assignEvents:ve})})(r),ie=(function({enable:nt,clickTolerance:dt,rollDegreesPerPixelMoved:bt=.3},rt){const At=new L({checkCorrectEvent:qt=>E.mouseButton(qt)===2&&qt.ctrlKey});return new Ou({clickTolerance:dt,move:(qt,Bt)=>{const zt=rt();let Vt=(Bt.x-qt.x)*bt;return Bt.y<zt.y&&(Vt=-Vt),{rollDelta:Vt}},moveStateManager:At,enable:nt,assignEvents:ve})})(r,G);s.dragRotate=new un(r,X,Y,ie),this._add("mouseRotate",X,["mousePitch"]),this._add("mousePitch",Y,["mouseRotate","mouseRoll"]),this._add("mouseRoll",ie,["mousePitch"]),r.interactive&&r.dragRotate&&s.dragRotate.enable();const be=(function({enable:nt,clickTolerance:dt}){const bt=new L({checkCorrectEvent:rt=>E.mouseButton(rt)===0&&!rt.ctrlKey});return new Ou({clickTolerance:dt,move:(rt,At)=>({around:At,panDelta:At.sub(rt)}),activateOnStart:!0,moveStateManager:bt,enable:nt,assignEvents:ve})})(r),Ue=new Ce(r,s);s.dragPan=new zn(p,be,Ue),this._add("mousePan",be),this._add("touchPan",Ue,["touchZoom","touchRotate"]),r.interactive&&r.dragPan&&s.dragPan.enable(r.dragPan);const je=new Gt,qe=new Je;s.touchZoomRotate=new Yn(p,qe,je,R),this._add("touchRotate",je,["touchPan","touchZoom"]),this._add("touchZoom",qe,["touchPan","touchRotate"]),r.interactive&&r.touchZoomRotate&&s.touchZoomRotate.enable(r.touchZoomRotate);const Ke=s.scrollZoom=new Cr(s,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Ke,["mousePan"]),r.interactive&&r.scrollZoom&&s.scrollZoom.enable(r.scrollZoom);const lt=s.keyboard=new tr(s);this._add("keyboard",lt),r.interactive&&r.keyboard&&s.keyboard.enable(),this._add("blockableMapEvent",new sf(s))}_add(r,s,p){this._handlers.push({handlerName:r,handler:s,allowed:p}),this._handlersById[r]=s}stop(r){if(!this._updatingCamera){for(const{handler:s}of this._handlers)s.reset();this._inertia.clear(),this._fireEvents({},{},r),this._changes=[]}}isActive(){for(const{handler:r}of this._handlers)if(r.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!kn(this._eventsInProgress)||this.isZooming()}_blockedByActive(r,s,p){for(const m in r)if(m!==p&&(!s||s.indexOf(m)<0))return!0;return!1}_getMapTouches(r){const s=[];for(const p of r)this._el.contains(p.target)&&s.push(p);return s}mergeHandlerResult(r,s,p,m,b){if(!p)return;o.e(r,p);const T={handlerName:m,originalEvent:p.originalEvent||b};p.zoomDelta!==void 0&&(s.zoom=T),p.panDelta!==void 0&&(s.drag=T),p.rollDelta!==void 0&&(s.roll=T),p.pitchDelta!==void 0&&(s.pitch=T),p.bearingDelta!==void 0&&(s.rotate=T)}_applyChanges(){const r={},s={},p={};for(const[m,b,T]of this._changes)m.panDelta&&(r.panDelta=(r.panDelta||new o.P(0,0))._add(m.panDelta)),m.zoomDelta&&(r.zoomDelta=(r.zoomDelta||0)+m.zoomDelta),m.bearingDelta&&(r.bearingDelta=(r.bearingDelta||0)+m.bearingDelta),m.pitchDelta&&(r.pitchDelta=(r.pitchDelta||0)+m.pitchDelta),m.rollDelta&&(r.rollDelta=(r.rollDelta||0)+m.rollDelta),m.around!==void 0&&(r.around=m.around),m.pinchAround!==void 0&&(r.pinchAround=m.pinchAround),m.noInertia&&(r.noInertia=m.noInertia),o.e(s,b),o.e(p,T);this._updateMapTransform(r,s,p),this._changes=[]}_updateMapTransform(r,s,p){const m=this._map,b=m._getTransformForUpdate(),T=m.terrain;if(!($r(r)||T&&this._terrainMovement))return this._fireEvents(s,p,!0);m._stop(!0);let{panDelta:I,zoomDelta:R,bearingDelta:j,pitchDelta:G,rollDelta:X,around:Y,pinchAround:ie}=r;ie!==void 0&&(Y=ie),Y=Y||m.transform.centerPoint,T&&!b.isPointOnMapSurface(Y)&&(Y=b.centerPoint);const be={panDelta:I,zoomDelta:R,rollDelta:X,pitchDelta:G,bearingDelta:j,around:Y};this._map.cameraHelper.useGlobeControls&&!b.isPointOnMapSurface(Y)&&(Y=b.centerPoint);const Ue=Y.distSqr(b.centerPoint)<.01?b.center:b.screenPointToLocation(I?Y.sub(I):Y);T?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(be,b),this._terrainMovement||!s.drag&&!s.zoom?s.drag&&this._terrainMovement?b.setCenter(b.screenPointToLocation(b.centerPoint.sub(I))):this._map.cameraHelper.handleMapControlsPan(be,b,Ue):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(be,b,Ue))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(be,b),this._map.cameraHelper.handleMapControlsPan(be,b,Ue)),m._applyUpdatedTransform(b),this._map._update(),r.noInertia||this._inertia.record(r),this._fireEvents(s,p,!0)}_fireEvents(r,s,p){const m=kn(this._eventsInProgress),b=kn(r),T={};for(const X in r){const{originalEvent:Y}=r[X];this._eventsInProgress[X]||(T[`${X}start`]=Y),this._eventsInProgress[X]=r[X]}!m&&b&&this._fireEvent("movestart",b.originalEvent);for(const X in T)this._fireEvent(X,T[X]);b&&this._fireEvent("move",b.originalEvent);for(const X in r){const{originalEvent:Y}=r[X];this._fireEvent(X,Y)}const I={};let R;for(const X in this._eventsInProgress){const{handlerName:Y,originalEvent:ie}=this._eventsInProgress[X];this._handlersById[Y].isActive()||(delete this._eventsInProgress[X],R=s[Y]||ie,I[`${X}end`]=R)}for(const X in I)this._fireEvent(X,I[X]);const j=kn(this._eventsInProgress),G=(m||b)&&!j;if(G&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const X=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&X.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(X)}if(p&&G){this._updatingCamera=!0;const X=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Y=ie=>ie!==0&&-this._bearingSnap<ie&&ie<this._bearingSnap;!X||!X.essential&&M.prefersReducedMotion?(this._map.fire(new o.l("moveend",{originalEvent:R})),Y(this._map.getBearing())&&this._map.resetNorth()):(Y(X.bearing||this._map.getBearing())&&(X.bearing=0),X.freezeElevation=!0,this._map.easeTo(X,{originalEvent:R})),this._updatingCamera=!1}}_fireEvent(r,s){this._map.fire(new o.l(r,s?{originalEvent:s}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((r=>{delete this._frameId,this.handleEvent(new fn("renderFrame",{timeStamp:r})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class en extends o.E{constructor(r,s,p){super(),this._renderFrameCallback=()=>{const m=Math.min((M.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=p.bearingSnap,this.cameraHelper=s,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(r,s){r.apply(this.transform),this.transform=r,this.cameraHelper=s}getCenter(){return new o.S(this.transform.center.lng,this.transform.center.lat)}setCenter(r,s){return this.jumpTo({center:r},s)}getCenterElevation(){return this.transform.elevation}setCenterElevation(r,s){return this.jumpTo({elevation:r},s),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(r){this._centerClampedToGround=r}panBy(r,s,p){return r=o.P.convert(r).mult(-1),this.panTo(this.transform.center,o.e({offset:r},s),p)}panTo(r,s,p){return this.easeTo(o.e({center:r},s),p)}getZoom(){return this.transform.zoom}setZoom(r,s){return this.jumpTo({zoom:r},s),this}zoomTo(r,s,p){return this.easeTo(o.e({zoom:r},s),p)}zoomIn(r,s){return this.zoomTo(this.getZoom()+1,r,s),this}zoomOut(r,s){return this.zoomTo(this.getZoom()-1,r,s),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(r,s){return r!=this.transform.fov&&(this.transform.setFov(r),this.fire(new o.l("movestart",s)).fire(new o.l("move",s)).fire(new o.l("moveend",s))),this}getBearing(){return this.transform.bearing}setBearing(r,s){return this.jumpTo({bearing:r},s),this}getPadding(){return this.transform.padding}setPadding(r,s){return this.jumpTo({padding:r},s),this}rotateTo(r,s,p){return this.easeTo(o.e({bearing:r},s),p)}resetNorth(r,s){return this.rotateTo(0,o.e({duration:1e3},r),s),this}resetNorthPitch(r,s){return this.easeTo(o.e({bearing:0,pitch:0,roll:0,duration:1e3},r),s),this}snapToNorth(r,s){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(r,s):this}getPitch(){return this.transform.pitch}setPitch(r,s){return this.jumpTo({pitch:r},s),this}getRoll(){return this.transform.roll}setRoll(r,s){return this.jumpTo({roll:r},s),this}cameraForBounds(r,s){r=Kt.convert(r).adjustAntiMeridian();const p=s&&s.bearing||0;return this._cameraForBoxAndBearing(r.getNorthWest(),r.getSouthEast(),p,s)}_cameraForBoxAndBearing(r,s,p,m){const b={top:0,bottom:0,right:0,left:0};if(typeof(m=o.e({padding:b,offset:[0,0],maxZoom:this.transform.maxZoom},m)).padding=="number"){const j=m.padding;m.padding={top:j,bottom:j,right:j,left:j}}const T=o.e(b,m.padding);m.padding=T;const I=this.transform,R=new Kt(r,s);return this.cameraHelper.cameraForBoxAndBearing(m,T,R,p,I)}fitBounds(r,s,p){return this._fitInternal(this.cameraForBounds(r,s),s,p)}fitScreenCoordinates(r,s,p,m,b){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(r)),this.transform.screenPointToLocation(o.P.convert(s)),p,m),m,b)}_fitInternal(r,s,p){return r?(delete(s=o.e(r,s)).padding,s.linear?this.easeTo(s,p):this.flyTo(s,p)):this}jumpTo(r,s){this.stop();const p=this._getTransformForUpdate();let m=!1,b=!1,T=!1;const I=p.zoom;this.cameraHelper.handleJumpToCenterZoom(p,r);const R=p.zoom!==I;return"elevation"in r&&p.elevation!==+r.elevation&&p.setElevation(+r.elevation),"bearing"in r&&p.bearing!==+r.bearing&&(m=!0,p.setBearing(+r.bearing)),"pitch"in r&&p.pitch!==+r.pitch&&(b=!0,p.setPitch(+r.pitch)),"roll"in r&&p.roll!==+r.roll&&(T=!0,p.setRoll(+r.roll)),r.padding==null||p.isPaddingEqual(r.padding)||p.setPadding(r.padding),this._applyUpdatedTransform(p),this.fire(new o.l("movestart",s)).fire(new o.l("move",s)),R&&this.fire(new o.l("zoomstart",s)).fire(new o.l("zoom",s)).fire(new o.l("zoomend",s)),m&&this.fire(new o.l("rotatestart",s)).fire(new o.l("rotate",s)).fire(new o.l("rotateend",s)),b&&this.fire(new o.l("pitchstart",s)).fire(new o.l("pitch",s)).fire(new o.l("pitchend",s)),T&&this.fire(new o.l("rollstart",s)).fire(new o.l("roll",s)).fire(new o.l("rollend",s)),this.fire(new o.l("moveend",s))}calculateCameraOptionsFromTo(r,s,p,m=0){const b=o.a0.fromLngLat(r,s),T=o.a0.fromLngLat(p,m),I=T.x-b.x,R=T.y-b.y,j=T.z-b.z,G=Math.hypot(I,R,j);if(G===0)throw new Error("Can't calculate camera options with same From and To");const X=Math.hypot(I,R),Y=o.aj(this.transform.cameraToCenterDistance/G/this.transform.tileSize),ie=180*Math.atan2(I,-R)/Math.PI;let be=180*Math.acos(X/G)/Math.PI;return be=j<0?90-be:90+be,{center:T.toLngLat(),elevation:m,zoom:Y,pitch:be,bearing:ie}}calculateCameraOptionsFromCameraLngLatAltRotation(r,s,p,m,b){const T=this.transform.calculateCenterFromCameraLngLatAlt(r,s,p,m);return{center:T.center,elevation:T.elevation,zoom:T.zoom,bearing:p,pitch:m,roll:b}}easeTo(r,s){this._stop(!1,r.easeId),((r=o.e({offset:[0,0],duration:500,easing:o.cn},r)).animate===!1||!r.essential&&M.prefersReducedMotion)&&(r.duration=0);const p=this._getTransformForUpdate(),m=this.getBearing(),b=p.pitch,T=p.roll,I="bearing"in r?this._normalizeBearing(r.bearing,m):m,R="pitch"in r?+r.pitch:b,j="roll"in r?this._normalizeBearing(r.roll,T):T,G="padding"in r?r.padding:p.padding,X=o.P.convert(r.offset);let Y,ie;r.around&&(Y=o.S.convert(r.around),ie=p.locationToScreenPoint(Y));const be={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},Ue=this.cameraHelper.handleEaseTo(p,{bearing:I,pitch:R,roll:j,padding:G,around:Y,aroundPoint:ie,offsetAsPoint:X,offset:r.offset,zoom:r.zoom,center:r.center});return this._rotating=this._rotating||m!==I,this._pitching=this._pitching||R!==b,this._rolling=this._rolling||j!==T,this._padding=!p.isPaddingEqual(G),this._zooming=this._zooming||Ue.isZooming,this._easeId=r.easeId,this._prepareEase(s,r.noMoveStart,be),this.terrain&&this._prepareElevation(Ue.elevationCenter),this._ease((je=>{Ue.easeFunc(je),this.terrain&&!r.freezeElevation&&this._updateElevation(je),this._applyUpdatedTransform(p),this._fireMoveEvents(s)}),(je=>{this.terrain&&r.freezeElevation&&this._finalizeElevation(),this._afterEase(s,je)}),r),this}_prepareEase(r,s,p={}){this._moving=!0,s||p.moving||this.fire(new o.l("movestart",r)),this._zooming&&!p.zooming&&this.fire(new o.l("zoomstart",r)),this._rotating&&!p.rotating&&this.fire(new o.l("rotatestart",r)),this._pitching&&!p.pitching&&this.fire(new o.l("pitchstart",r)),this._rolling&&!p.rolling&&this.fire(new o.l("rollstart",r))}_prepareElevation(r){this._elevationCenter=r,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(r){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const s=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(r<1&&s!==this._elevationTarget){const p=this._elevationTarget-this._elevationStart;this._elevationStart+=r*(p-(s-(p*r+this._elevationStart))/(1-r)),this._elevationTarget=s}this.transform.setElevation(o.C.number(this._elevationStart,this._elevationTarget,r))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(r){if(!this.terrain&&r.elevation>=0&&r.pitch<=90)return{};const s=r.getCameraLngLat(),p=r.getCameraAltitude(),m=this.terrain?this.terrain.getElevationForLngLatZoom(s,r.zoom):0;if(p<m){const b=this.calculateCameraOptionsFromTo(s,m,r.center,r.elevation);return{pitch:b.pitch,zoom:b.zoom}}return{}}_applyUpdatedTransform(r){const s=[];if(s.push((m=>this._elevateCameraIfInsideTerrain(m))),this.transformCameraUpdate&&s.push((m=>this.transformCameraUpdate(m))),!s.length)return;const p=r.clone();for(const m of s){const b=p.clone(),{center:T,zoom:I,roll:R,pitch:j,bearing:G,elevation:X}=m(b);T&&b.setCenter(T),X!==void 0&&b.setElevation(X),I!==void 0&&b.setZoom(I),R!==void 0&&b.setRoll(R),j!==void 0&&b.setPitch(j),G!==void 0&&b.setBearing(G),p.apply(b)}this.transform.apply(p)}_fireMoveEvents(r){this.fire(new o.l("move",r)),this._zooming&&this.fire(new o.l("zoom",r)),this._rotating&&this.fire(new o.l("rotate",r)),this._pitching&&this.fire(new o.l("pitch",r)),this._rolling&&this.fire(new o.l("roll",r))}_afterEase(r,s){if(this._easeId&&s&&this._easeId===s)return;delete this._easeId;const p=this._zooming,m=this._rotating,b=this._pitching,T=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,p&&this.fire(new o.l("zoomend",r)),m&&this.fire(new o.l("rotateend",r)),b&&this.fire(new o.l("pitchend",r)),T&&this.fire(new o.l("rollend",r)),this.fire(new o.l("moveend",r))}flyTo(r,s){if(!r.essential&&M.prefersReducedMotion){const Vt=o.Q(r,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(Vt,s)}this.stop(),r=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.cn},r);const p=this._getTransformForUpdate(),m=p.bearing,b=p.pitch,T=p.roll,I=p.padding,R="bearing"in r?this._normalizeBearing(r.bearing,m):m,j="pitch"in r?+r.pitch:b,G="roll"in r?this._normalizeBearing(r.roll,T):T,X="padding"in r?r.padding:p.padding,Y=o.P.convert(r.offset);let ie=p.centerPoint.add(Y);const be=p.screenPointToLocation(ie),Ue=this.cameraHelper.handleFlyTo(p,{bearing:R,pitch:j,roll:G,padding:X,locationAtOffset:be,offsetAsPoint:Y,center:r.center,minZoom:r.minZoom,zoom:r.zoom});let je=r.curve;const qe=Math.max(p.width,p.height),Ke=qe/Ue.scaleOfZoom,lt=Ue.pixelPathLength;typeof Ue.scaleOfMinZoom=="number"&&(je=Math.sqrt(qe/Ue.scaleOfMinZoom/lt*2));const nt=je*je;function dt(Vt){const Dr=(Ke*Ke-qe*qe+(Vt?-1:1)*nt*nt*lt*lt)/(2*(Vt?Ke:qe)*nt*lt);return Math.log(Math.sqrt(Dr*Dr+1)-Dr)}function bt(Vt){return(Math.exp(Vt)-Math.exp(-Vt))/2}function rt(Vt){return(Math.exp(Vt)+Math.exp(-Vt))/2}const At=dt(!1);let qt=function(Vt){return rt(At)/rt(At+je*Vt)},Bt=function(Vt){return qe*((rt(At)*(bt(Dr=At+je*Vt)/rt(Dr))-bt(At))/nt)/lt;var Dr},zt=(dt(!0)-At)/je;if(Math.abs(lt)<2e-6||!isFinite(zt)){if(Math.abs(qe-Ke)<1e-6)return this.easeTo(r,s);const Vt=Ke<qe?-1:1;zt=Math.abs(Math.log(Ke/qe))/je,Bt=()=>0,qt=Dr=>Math.exp(Vt*je*Dr)}return r.duration="duration"in r?+r.duration:1e3*zt/("screenSpeed"in r?+r.screenSpeed/je:+r.speed),r.maxDuration&&r.duration>r.maxDuration&&(r.duration=0),this._zooming=!0,this._rotating=m!==R,this._pitching=j!==b,this._rolling=G!==T,this._padding=!p.isPaddingEqual(X),this._prepareEase(s,!1),this.terrain&&this._prepareElevation(Ue.targetCenter),this._ease((Vt=>{const Dr=Vt*zt,Ar=1/qt(Dr),sr=Bt(Dr);this._rotating&&p.setBearing(o.C.number(m,R,Vt)),this._pitching&&p.setPitch(o.C.number(b,j,Vt)),this._rolling&&p.setRoll(o.C.number(T,G,Vt)),this._padding&&(p.interpolatePadding(I,X,Vt),ie=p.centerPoint.add(Y)),Ue.easeFunc(Vt,Ar,sr,ie),this.terrain&&!r.freezeElevation&&this._updateElevation(Vt),this._applyUpdatedTransform(p),this._fireMoveEvents(s)}),(()=>{this.terrain&&r.freezeElevation&&this._finalizeElevation(),this._afterEase(s)}),r),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(r,s){var p;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,s)}return r||(p=this.handlers)===null||p===void 0||p.stop(!1),this}_ease(r,s,p){p.animate===!1||p.duration===0?(r(1),s()):(this._easeStart=M.now(),this._easeOptions=p,this._onEaseFrame=r,this._onEaseEnd=s,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(r,s){r=o.aN(r,-180,180);const p=Math.abs(r-s);return Math.abs(r-360-s)<p&&(r-=360),Math.abs(r+360-s)<p&&(r+=360),r}queryTerrainElevation(r){return this.terrain?this.terrain.getElevationForLngLatZoom(o.S.convert(r),this.transform.tileZoom):null}}const Gn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Li{constructor(r=Gn){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=s=>{!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=r}getDefaultPosition(){return"bottom-right"}onAdd(r){return this._map=r,this._compact=this.options.compact,this._container=E.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=E.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=E.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){E.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(r,s){const p=this._map._getUIString(`AttributionControl.${s}`);r.title=p,r.setAttribute("aria-label",p)}_updateAttributions(){if(!this._map.style)return;let r=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?r=r.concat(this.options.customAttribution.map((m=>typeof m!="string"?"":m))):typeof this.options.customAttribution=="string"&&r.push(this.options.customAttribution)),this._map.style.stylesheet){const m=this._map.style.stylesheet;this.styleOwner=m.owner,this.styleId=m.id}const s=this._map.style.sourceCaches;for(const m in s){const b=s[m];if(b.used||b.usedForTerrain){const T=b.getSource();T.attribution&&r.indexOf(T.attribution)<0&&r.push(T.attribution)}}r=r.filter((m=>String(m).trim())),r.sort(((m,b)=>m.length-b.length)),r=r.filter(((m,b)=>{for(let T=b+1;T<r.length;T++)if(r[T].indexOf(m)>=0)return!1;return!0}));const p=r.join(" | ");p!==this._attribHTML&&(this._attribHTML=p,r.length?(this._innerContainer.innerHTML=E.sanitize(p),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Vo{constructor(r={}){this._updateCompact=()=>{const s=this._container.children;if(s.length){const p=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&p.classList.add("maplibregl-compact"):p.classList.remove("maplibregl-compact")}},this.options=r}getDefaultPosition(){return"bottom-left"}onAdd(r){this._map=r,this._compact=this.options&&this.options.compact,this._container=E.create("div","maplibregl-ctrl");const s=E.create("a","maplibregl-ctrl-logo");return s.target="_blank",s.rel="noopener nofollow",s.href="https://maplibre.org/",s.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),s.setAttribute("rel","noopener nofollow"),this._container.appendChild(s),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){E.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class va{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(r){const s=++this._id;return this._queue.push({callback:r,id:s,cancelled:!1}),s}remove(r){const s=this._currentlyRunning,p=s?this._queue.concat(s):this._queue;for(const m of p)if(m.id===r)return void(m.cancelled=!0)}run(r=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const s=this._currentlyRunning=this._queue;this._queue=[];for(const p of s)if(!p.cancelled&&(p.callback(r),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var uo=o.aI([{name:"a_pos3d",type:"Int16",components:3}]);class ba extends o.E{constructor(r){super(),this._lastTilesetChange=M.now(),this.sourceCache=r,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=r._source.tileSize*2**this.deltaZoom,r.usedForTerrain=!0,r.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(r,s){this.sourceCache.update(r,s),this._renderableTilesKeys=[];const p={};for(const m of It(r,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:s,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))p[m.key]=!0,this._renderableTilesKeys.push(m.key),this._tiles[m.key]||(m.terrainRttPosMatrix32f=new Float64Array(16),o.bX(m.terrainRttPosMatrix32f,0,o.$,o.$,0,0,1),this._tiles[m.key]=new Ur(m,this.tileSize),this._lastTilesetChange=M.now());for(const m in this._tiles)p[m]||delete this._tiles[m]}freeRtt(r){for(const s in this._tiles){const p=this._tiles[s];(!r||p.tileID.equals(r)||p.tileID.isChildOf(r)||r.isChildOf(p.tileID))&&(p.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((r=>this.getTileByID(r)))}getTileByID(r){return this._tiles[r]}getTerrainCoords(r,s){return s?this._getTerrainCoordsForTileRanges(r,s):this._getTerrainCoordsForRegularTile(r)}_getTerrainCoordsForRegularTile(r){const s={};for(const p of this._renderableTilesKeys){const m=this._tiles[p].tileID,b=r.clone(),T=o.b9();if(m.canonical.equals(r.canonical))o.bX(T,0,o.$,o.$,0,0,1);else if(m.canonical.isChildOf(r.canonical)){const I=m.canonical.z-r.canonical.z,R=m.canonical.x-(m.canonical.x>>I<<I),j=m.canonical.y-(m.canonical.y>>I<<I),G=o.$>>I;o.bX(T,0,G,G,0,0,1),o.M(T,T,[-R*G,-j*G,0])}else{if(!r.canonical.isChildOf(m.canonical))continue;{const I=r.canonical.z-m.canonical.z,R=r.canonical.x-(r.canonical.x>>I<<I),j=r.canonical.y-(r.canonical.y>>I<<I),G=o.$>>I;o.bX(T,0,o.$,o.$,0,0,1),o.M(T,T,[R*G,j*G,0]),o.N(T,T,[1/2**I,1/2**I,0])}}b.terrainRttPosMatrix32f=new Float32Array(T),s[p]=b}return s}_getTerrainCoordsForTileRanges(r,s){const p={};for(const m of this._renderableTilesKeys){const b=this._tiles[m].tileID;if(!this._isWithinTileRanges(b,s))continue;const T=r.clone(),I=o.b9();if(b.canonical.z===r.canonical.z){const R=r.canonical.x-b.canonical.x,j=r.canonical.y-b.canonical.y;o.bX(I,0,o.$,o.$,0,0,1),o.M(I,I,[R*o.$,j*o.$,0])}else if(b.canonical.z>r.canonical.z){const R=b.canonical.z-r.canonical.z,j=b.canonical.x-(b.canonical.x>>R<<R),G=b.canonical.y-(b.canonical.y>>R<<R),X=r.canonical.x-(b.canonical.x>>R),Y=r.canonical.y-(b.canonical.y>>R),ie=o.$>>R;o.bX(I,0,ie,ie,0,0,1),o.M(I,I,[-j*ie+X*o.$,-G*ie+Y*o.$,0])}else{const R=r.canonical.z-b.canonical.z,j=r.canonical.x-(r.canonical.x>>R<<R),G=r.canonical.y-(r.canonical.y>>R<<R),X=(r.canonical.x>>R)-b.canonical.x,Y=(r.canonical.y>>R)-b.canonical.y,ie=o.$<<R;o.bX(I,0,ie,ie,0,0,1),o.M(I,I,[j*o.$+X*ie,G*o.$+Y*ie,0])}T.terrainRttPosMatrix32f=new Float32Array(I),p[m]=T}return p}getSourceTile(r,s){const p=this.sourceCache._source;let m=r.overscaledZ-this.deltaZoom;if(m>p.maxzoom&&(m=p.maxzoom),m<p.minzoom)return null;this._sourceTileCache[r.key]||(this._sourceTileCache[r.key]=r.scaledTo(m).key);let b=this.sourceCache.getTileByID(this._sourceTileCache[r.key]);if((!b||!b.dem)&&s)for(;m>=p.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(r.scaledTo(m--).key);return b}anyTilesAfterTime(r=Date.now()){return this._lastTilesetChange>=r}_isWithinTileRanges(r,s){return s[r.canonical.z]&&r.canonical.x>=s[r.canonical.z].minTileX&&r.canonical.x<=s[r.canonical.z].maxTileX&&r.canonical.y>=s[r.canonical.z].minTileY&&r.canonical.y<=s[r.canonical.z].maxTileY}}class Ki{constructor(r,s,p){this._meshCache={},this.painter=r,this.sourceCache=new ba(s),this.options=p,this.exaggeration=typeof p.exaggeration=="number"?p.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(r,s,p,m=o.$){var b;if(!(s>=0&&s<m&&p>=0&&p<m))return 0;const T=this.getTerrainData(r),I=(b=T.tile)===null||b===void 0?void 0:b.dem;if(!I)return 0;const R=o.cr([],[s/m*o.$,p/m*o.$],T.u_terrain_matrix),j=[R[0]*I.dim,R[1]*I.dim],G=Math.floor(j[0]),X=Math.floor(j[1]),Y=j[0]-G,ie=j[1]-X;return I.get(G,X)*(1-Y)*(1-ie)+I.get(G+1,X)*Y*(1-ie)+I.get(G,X+1)*(1-Y)*ie+I.get(G+1,X+1)*Y*ie}getElevationForLngLatZoom(r,s){if(!o.cs(s,r.wrap()))return 0;const{tileID:p,mercatorX:m,mercatorY:b}=this._getOverscaledTileIDFromLngLatZoom(r,s);return this.getElevation(p,m%o.$,b%o.$,o.$)}getElevation(r,s,p,m=o.$){return this.getDEMElevation(r,s,p,m)*this.exaggeration}getTerrainData(r){if(!this._emptyDemTexture){const m=this.painter.context,b=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new o.T(m,b,m.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new o.T(m,new o.R({width:1,height:1}),m.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.af([])}const s=this.sourceCache.getSourceTile(r,!0);if(s&&s.dem&&(!s.demTexture||s.needsTerrainPrepare)){const m=this.painter.context;s.demTexture=this.painter.getTileTexture(s.dem.stride),s.demTexture?s.demTexture.update(s.dem.getPixels(),{premultiply:!1}):s.demTexture=new o.T(m,s.dem.getPixels(),m.gl.RGBA,{premultiply:!1}),s.demTexture.bind(m.gl.NEAREST,m.gl.CLAMP_TO_EDGE),s.needsTerrainPrepare=!1}const p=s&&s+s.tileID.key+r.key;if(p&&!this._demMatrixCache[p]){const m=this.sourceCache.sourceCache._source.maxzoom;let b=r.canonical.z-s.tileID.canonical.z;r.overscaledZ>r.canonical.z&&(r.canonical.z>=m?b=r.canonical.z-m:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=r.canonical.x-(r.canonical.x>>b<<b),I=r.canonical.y-(r.canonical.y>>b<<b),R=o.ct(new Float64Array(16),[1/(o.$<<b),1/(o.$<<b),0]);o.M(R,R,[T*o.$,I*o.$,0]),this._demMatrixCache[r.key]={matrix:R,coord:r}}return{u_depth:2,u_terrain:3,u_terrain_dim:s&&s.dem&&s.dem.dim||1,u_terrain_matrix:p?this._demMatrixCache[r.key].matrix:this._emptyDemMatrix,u_terrain_unpack:s&&s.dem&&s.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(s&&s.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:s}}getFramebuffer(r){const s=this.painter,p=s.width/devicePixelRatio,m=s.height/devicePixelRatio;return!this._fbo||this._fbo.width===p&&this._fbo.height===m||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new o.T(s.context,{width:p,height:m,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new o.T(s.context,{width:p,height:m,data:null},s.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(s.context.gl.NEAREST,s.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=s.context.createFramebuffer(p,m,!0,!1),this._fbo.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,p,m))),this._fbo.colorAttachment.set(r==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const r=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const s=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let b=0,T=0;b<this._coordsTextureSize;b++)for(let I=0;I<this._coordsTextureSize;I++,T+=4)s[T+0]=255&I,s[T+1]=255&b,s[T+2]=I>>8<<4|b>>8,s[T+3]=0;const p=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(s.buffer)),m=new o.T(r,p,r.gl.RGBA,{premultiply:!1});return m.bind(r.gl.NEAREST,r.gl.CLAMP_TO_EDGE),this._coordsTexture=m,m}pointCoordinate(r){this.painter.maybeDrawDepthAndCoords(!0);const s=new Uint8Array(4),p=this.painter.context,m=p.gl,b=Math.round(r.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(r.y*this.painter.pixelRatio/devicePixelRatio),I=Math.round(this.painter.height/devicePixelRatio);p.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),m.readPixels(b,I-T-1,1,1,m.RGBA,m.UNSIGNED_BYTE,s),p.bindFramebuffer.set(null);const R=s[0]+(s[2]>>4<<8),j=s[1]+((15&s[2])<<8),G=this.coordsIndex[255-s[3]],X=G&&this.sourceCache.getTileByID(G);if(!X)return null;const Y=this._coordsTextureSize,ie=(1<<X.tileID.canonical.z)*Y;return new o.a0((X.tileID.canonical.x*Y+R)/ie+X.tileID.wrap,(X.tileID.canonical.y*Y+j)/ie,this.getElevation(X.tileID,R,j,Y))}depthAtPoint(r){const s=new Uint8Array(4),p=this.painter.context,m=p.gl;return p.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),m.readPixels(r.x,this.painter.height/devicePixelRatio-r.y-1,1,1,m.RGBA,m.UNSIGNED_BYTE,s),p.bindFramebuffer.set(null),(s[0]/16777216+s[1]/65536+s[2]/256+s[3])/256}getTerrainMesh(r){var s;const p=((s=this.painter.style.projection)===null||s===void 0?void 0:s.transitionState)>0,m=p&&r.canonical.y===0,b=p&&r.canonical.y===(1<<r.canonical.z)-1,T=`m_${m?"n":""}_${b?"s":""}`;if(this._meshCache[T])return this._meshCache[T];const I=this.painter.context,R=new o.cu,j=new o.aM,G=this.meshSize,X=o.$/G,Y=G*G;for(let rt=0;rt<=G;rt++)for(let At=0;At<=G;At++)R.emplaceBack(At*X,rt*X,0);for(let rt=0;rt<Y;rt+=G+1)for(let At=0;At<G;At++)j.emplaceBack(At+rt,G+At+rt+1,G+At+rt+2),j.emplaceBack(At+rt,G+At+rt+2,At+rt+1);const ie=R.length,be=ie+(G+1),Ue=(G+1)*G,je=m?o.bg:0,qe=m?0:1,Ke=b?o.bh:o.$,lt=b?0:1;for(let rt=0;rt<=G;rt++)R.emplaceBack(rt*X,je,qe);for(let rt=0;rt<=G;rt++)R.emplaceBack(rt*X,Ke,lt);for(let rt=0;rt<G;rt++)j.emplaceBack(Ue+rt,be+rt,be+rt+1),j.emplaceBack(Ue+rt,be+rt+1,Ue+rt+1),j.emplaceBack(0+rt,ie+rt+1,ie+rt),j.emplaceBack(0+rt,0+rt+1,ie+rt+1);const nt=R.length,dt=nt+2*(G+1);for(const rt of[0,1])for(let At=0;At<=G;At++)for(const qt of[0,1])R.emplaceBack(rt*o.$,At*X,qt);for(let rt=0;rt<2*G;rt+=2)j.emplaceBack(nt+rt,nt+rt+1,nt+rt+3),j.emplaceBack(nt+rt,nt+rt+3,nt+rt+2),j.emplaceBack(dt+rt,dt+rt+3,dt+rt+1),j.emplaceBack(dt+rt,dt+rt+2,dt+rt+3);const bt=new Pt(I.createVertexBuffer(R,uo.members),I.createIndexBuffer(j),o.aL.simpleSegment(0,0,R.length,j.length));return this._meshCache[T]=bt,bt}getMeshFrameDelta(r){return 2*Math.PI*o.bt/Math.pow(2,Math.max(r,0))/5}getMinTileElevationForLngLatZoom(r,s){var p;const{tileID:m}=this._getOverscaledTileIDFromLngLatZoom(r,s);return(p=this.getMinMaxElevation(m).minElevation)!==null&&p!==void 0?p:0}getMinMaxElevation(r){const s=this.getTerrainData(r).tile,p={minElevation:null,maxElevation:null};return s&&s.dem&&(p.minElevation=s.dem.min*this.exaggeration,p.maxElevation=s.dem.max*this.exaggeration),p}_getOverscaledTileIDFromLngLatZoom(r,s){const p=o.a0.fromLngLat(r.wrap()),m=(1<<s)*o.$,b=p.x*m,T=p.y*m,I=Math.floor(b/o.$),R=Math.floor(T/o.$);return{tileID:new o.Z(s,0,s,I,R),mercatorX:b,mercatorY:T}}}class yo{constructor(r,s,p){this._context=r,this._size=s,this._tileSize=p,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const r of this._objects)r.texture.destroy(),r.fbo.destroy()}_createObject(r){const s=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),p=new o.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return p.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),s.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),s.colorAttachment.set(p.texture),{id:r,fbo:s,texture:p,stamp:-1,inUse:!1}}getObjectForId(r){return this._objects[r]}useObject(r){r.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((s=>r.id!==s)),this._recentlyUsed.push(r.id)}stampObject(r){r.stamp=++this._stamp}getOrCreateFreeObject(){for(const s of this._recentlyUsed)if(!this._objects[s].inUse)return this._objects[s];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const r=this._createObject(this._objects.length);return this._objects.push(r),r}freeObject(r){r.inUse=!1}freeAllObjects(){for(const r of this._objects)this.freeObject(r)}isFull(){return!(this._objects.length<this._size)&&this._objects.some((r=>!r.inUse))===!1}}const br={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class zr{constructor(r,s){this.painter=r,this.terrain=s,this.pool=new yo(r.context,30,s.sourceCache.tileSize*s.qualityFactor)}destruct(){this.pool.destruct()}getTexture(r){return this.pool.getObjectForId(r.rtt[this._stacks.length-1].id).texture}prepareForRender(r,s){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=r._order.filter((p=>!r._layers[p].isHidden(s))),this._coordsAscending={};for(const p in r.sourceCaches){this._coordsAscending[p]={};const m=r.sourceCaches[p].getVisibleCoordinates(),b=r.sourceCaches[p].getSource(),T=b instanceof Jt?b.terrainTileRanges:null;for(const I of m){const R=this.terrain.sourceCache.getTerrainCoords(I,T);for(const j in R)this._coordsAscending[p][j]||(this._coordsAscending[p][j]=[]),this._coordsAscending[p][j].push(R[j])}}this._coordsAscendingStr={};for(const p of r._order){const m=r._layers[p],b=m.source;if(br[m.type]&&!this._coordsAscendingStr[b]){this._coordsAscendingStr[b]={};for(const T in this._coordsAscending[b])this._coordsAscendingStr[b][T]=this._coordsAscending[b][T].map((I=>I.key)).sort().join()}}for(const p of this._renderableTiles)for(const m in this._coordsAscendingStr){const b=this._coordsAscendingStr[m][p.tileID.key];b&&b!==p.rttCoords[m]&&(p.rtt=[])}}renderLayer(r,s){if(r.isHidden(this.painter.transform.zoom))return!1;const p=Object.assign(Object.assign({},s),{isRenderingToTexture:!0}),m=r.type,b=this.painter,T=this._renderableLayerIds[this._renderableLayerIds.length-1]===r.id;if(br[m]&&(this._prevType&&br[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(r.id),!T))return!0;if(br[this._prevType]||br[m]&&T){this._prevType=m;const I=this._stacks.length-1,R=this._stacks[I]||[];for(const j of this._renderableTiles){if(this.pool.isFull()&&(lo(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(j),j.rtt[I]){const X=this.pool.getObjectForId(j.rtt[I].id);if(X.stamp===j.rtt[I].stamp){this.pool.useObject(X);continue}}const G=this.pool.getOrCreateFreeObject();this.pool.useObject(G),this.pool.stampObject(G),j.rtt[I]={id:G.id,stamp:G.stamp},b.context.bindFramebuffer.set(G.fbo.framebuffer),b.context.clear({color:o.be.transparent,stencil:0}),b.currentStencilSource=void 0;for(let X=0;X<R.length;X++){const Y=b.style._layers[R[X]],ie=Y.source?this._coordsAscending[Y.source][j.tileID.key]:[j.tileID];b.context.viewport.set([0,0,G.fbo.width,G.fbo.height]),b._renderTileClippingMasks(Y,ie,!0),b.renderLayer(b,b.style.sourceCaches[Y.source],Y,ie,p),Y.source&&(j.rttCoords[Y.source]=this._coordsAscendingStr[Y.source][j.tileID.key])}}return lo(this.painter,this.terrain,this._rttTiles,p),this._rttTiles=[],this.pool.freeAllObjects(),br[m]}return!1}}const Gi={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},_i=y,Eo={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Gn,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:o.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Hi={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class _o{constructor(r,s,p=!1){this.mousedown=b=>{this.startMove(b,E.mousePos(this.element,b)),E.addEventListener(window,"mousemove",this.mousemove),E.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=b=>{this.move(b,E.mousePos(this.element,b))},this.mouseup=b=>{this._rotatePitchHanlder.dragEnd(b),this.offTemp()},this.touchstart=b=>{b.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=E.touchPos(this.element,b.targetTouches)[0],this.startMove(b,this._startPos),E.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.addEventListener(window,"touchend",this.touchend))},this.touchmove=b=>{b.targetTouches.length!==1?this.reset():(this._lastPos=E.touchPos(this.element,b.targetTouches)[0],this.move(b,this._lastPos))},this.touchend=b=>{b.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=s;const m=new K;this._rotatePitchHanlder=new Ou({clickTolerance:3,move:(b,T)=>{const I=s.getBoundingClientRect(),R=new o.P((I.bottom-I.top)/2,(I.right-I.left)/2);return{bearingDelta:o.cm(new o.P(b.x,T.y),T,R),pitchDelta:p?-.5*(T.y-b.y):void 0}},moveStateManager:m,enable:!0,assignEvents:()=>{}}),this.map=r,E.addEventListener(s,"mousedown",this.mousedown),E.addEventListener(s,"touchstart",this.touchstart,{passive:!1}),E.addEventListener(s,"touchcancel",this.reset)}startMove(r,s){this._rotatePitchHanlder.dragStart(r,s),E.disableDrag()}move(r,s){const p=this.map,{bearingDelta:m,pitchDelta:b}=this._rotatePitchHanlder.dragMove(r,s)||{};m&&p.setBearing(p.getBearing()+m),b&&p.setPitch(p.getPitch()+b)}off(){const r=this.element;E.removeEventListener(r,"mousedown",this.mousedown),E.removeEventListener(r,"touchstart",this.touchstart,{passive:!1}),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend),E.removeEventListener(r,"touchcancel",this.reset),this.offTemp()}offTemp(){E.enableDrag(),E.removeEventListener(window,"mousemove",this.mousemove),E.removeEventListener(window,"mouseup",this.mouseup),E.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),E.removeEventListener(window,"touchend",this.touchend)}}let Si;function Di(_,r,s,p=!1){if(p||!s.getCoveringTilesDetailsProvider().allowWorldCopies())return _?.wrap();const m=new o.S(_.lng,_.lat);if(_=new o.S(_.lng,_.lat),r){const b=new o.S(_.lng-360,_.lat),T=new o.S(_.lng+360,_.lat),I=s.locationToScreenPoint(_).distSqr(r);s.locationToScreenPoint(b).distSqr(r)<I?_=b:s.locationToScreenPoint(T).distSqr(r)<I&&(_=T)}for(;Math.abs(_.lng-s.center.lng)>180;){const b=s.locationToScreenPoint(_);if(b.x>=0&&b.y>=0&&b.x<=s.width&&b.y<=s.height)break;_.lng>s.center.lng?_.lng-=360:_.lng+=360}return _.lng!==m.lng&&s.isPointOnMapSurface(s.locationToScreenPoint(_))?_:m}const Wi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ii(_,r,s){const p=_.classList;for(const m in Wi)p.remove(`maplibregl-${s}-anchor-${m}`);p.add(`maplibregl-${s}-anchor-${r}`)}class Xn extends o.E{constructor(r){if(super(),this._onKeyPress=s=>{const p=s.code,m=s.charCode||s.keyCode;p!=="Space"&&p!=="Enter"&&m!==32&&m!==13||this.togglePopup()},this._onMapClick=s=>{const p=s.originalEvent.target,m=this._element;this._popup&&(p===m||m.contains(p))&&this.togglePopup()},this._update=s=>{if(!this._map)return;const p=this._map.loaded()&&!this._map.isMoving();(s?.type==="terrain"||s?.type==="render"&&!p)&&this._map.once("render",this._update),this._lngLat=Di(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let m="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?m=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(m=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let b="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?b="rotateX(0deg)":this._pitchAlignment==="map"&&(b=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||s&&s.type!=="moveend"||(this._pos=this._pos.round()),E.setTransform(this._element,`${Wi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${b} ${m}`),M.frameAsync(new AbortController).then((()=>{this._updateOpacity(s&&s.type==="moveend")})).catch((()=>{}))},this._onMove=s=>{if(!this._isDragging){const p=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=p}this._isDragging&&(this._pos=s.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.l("dragstart"))),this.fire(new o.l("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.l("dragend")),this._state="inactive"},this._addDragHandler=s=>{this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=r&&r.anchor||"center",this._color=r&&r.color||"#3FB1CE",this._scale=r&&r.scale||1,this._draggable=r&&r.draggable||!1,this._clickTolerance=r&&r.clickTolerance||0,this._subpixelPositioning=r&&r.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=r&&r.rotation||0,this._rotationAlignment=r&&r.rotationAlignment||"auto",this._pitchAlignment=r&&r.pitchAlignment&&r.pitchAlignment!=="auto"?r.pitchAlignment:this._rotationAlignment,this.setOpacity(r?.opacity,r?.opacityWhenCovered),r&&r.element)this._element=r.element,this._offset=o.P.convert(r&&r.offset||[0,0]);else{this._defaultMarker=!0,this._element=E.create("div");const s=E.createNS("http://www.w3.org/2000/svg","svg"),p=41,m=27;s.setAttributeNS(null,"display","block"),s.setAttributeNS(null,"height",`${p}px`),s.setAttributeNS(null,"width",`${m}px`),s.setAttributeNS(null,"viewBox",`0 0 ${m} ${p}`);const b=E.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const T=E.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const I=E.createNS("http://www.w3.org/2000/svg","g");I.setAttributeNS(null,"transform","translate(3.0, 29.0)"),I.setAttributeNS(null,"fill","#000000");const R=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const qe of R){const Ke=E.createNS("http://www.w3.org/2000/svg","ellipse");Ke.setAttributeNS(null,"opacity","0.04"),Ke.setAttributeNS(null,"cx","10.5"),Ke.setAttributeNS(null,"cy","5.80029008"),Ke.setAttributeNS(null,"rx",qe.rx),Ke.setAttributeNS(null,"ry",qe.ry),I.appendChild(Ke)}const j=E.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"fill",this._color);const G=E.createNS("http://www.w3.org/2000/svg","path");G.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),j.appendChild(G);const X=E.createNS("http://www.w3.org/2000/svg","g");X.setAttributeNS(null,"opacity","0.25"),X.setAttributeNS(null,"fill","#000000");const Y=E.createNS("http://www.w3.org/2000/svg","path");Y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),X.appendChild(Y);const ie=E.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ie.setAttributeNS(null,"fill","#FFFFFF");const be=E.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Ue=E.createNS("http://www.w3.org/2000/svg","circle");Ue.setAttributeNS(null,"fill","#000000"),Ue.setAttributeNS(null,"opacity","0.25"),Ue.setAttributeNS(null,"cx","5.5"),Ue.setAttributeNS(null,"cy","5.5"),Ue.setAttributeNS(null,"r","5.4999962");const je=E.createNS("http://www.w3.org/2000/svg","circle");je.setAttributeNS(null,"fill","#FFFFFF"),je.setAttributeNS(null,"cx","5.5"),je.setAttributeNS(null,"cy","5.5"),je.setAttributeNS(null,"r","5.4999962"),be.appendChild(Ue),be.appendChild(je),T.appendChild(I),T.appendChild(j),T.appendChild(X),T.appendChild(ie),T.appendChild(be),s.appendChild(T),s.setAttributeNS(null,"height",p*this._scale+"px"),s.setAttributeNS(null,"width",m*this._scale+"px"),this._element.appendChild(s),this._offset=o.P.convert(r&&r.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(s=>{s.preventDefault()})),this._element.addEventListener("mousedown",(s=>{s.preventDefault()})),ii(this._element,this._anchor,"marker"),r&&r.className)for(const s of r.className.split(" "))this._element.classList.add(s);this._popup=null}addTo(r){return this.remove(),this._map=r,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",r._getUIString("Marker.Title")),r.getCanvasContainer().appendChild(this._element),r.on("move",this._update),r.on("moveend",this._update),r.on("terrain",this._update),r.on("projectiontransition",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),E.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(r){return this._lngLat=o.S.convert(r),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(r){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),r){if(!("offset"in r.options)){const m=Math.abs(13.5)/Math.SQRT2;r.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[m,-1*(38.1-13.5+m)],"bottom-right":[-m,-1*(38.1-13.5+m)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=r,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(r){return this._subpixelPositioning=r,this}getPopup(){return this._popup}togglePopup(){const r=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:r?(r.isOpen()?r.remove():(r.setLngLat(this._lngLat),r.addTo(this._map)),this):this}_updateOpacity(r=!1){var s,p;const m=(s=this._map)===null||s===void 0?void 0:s.terrain,b=this._map.transform.isLocationOccluded(this._lngLat);if(!m||b){const ie=b?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==ie&&(this._element.style.opacity=ie))}if(r)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const T=this._map,I=T.terrain.depthAtPoint(this._pos),R=T.terrain.getElevationForLngLatZoom(this._lngLat,T.transform.tileZoom);if(T.transform.lngLatToCameraDepth(this._lngLat,R)-I<.006)return void(this._element.style.opacity=this._opacity);const j=-this._offset.y/T.transform.pixelsPerMeter,G=Math.sin(T.getPitch()*Math.PI/180)*j,X=T.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),Y=T.transform.lngLatToCameraDepth(this._lngLat,R+G)-X>.006;!((p=this._popup)===null||p===void 0)&&p.isOpen()&&Y&&this._popup.remove(),this._element.style.opacity=Y?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(r){return this._offset=o.P.convert(r),this._update(),this}addClassName(r){this._element.classList.add(r)}removeClassName(r){this._element.classList.remove(r)}toggleClassName(r){return this._element.classList.toggle(r)}setDraggable(r){return this._draggable=!!r,this._map&&(r?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(r){return this._rotation=r||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(r){return this._rotationAlignment=r||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(r){return this._pitchAlignment=r&&r!=="auto"?r:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(r,s){return(this._opacity===void 0||r===void 0&&s===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),r!==void 0&&(this._opacity=r),s!==void 0&&(this._opacityWhenCovered=s),this._map&&this._updateOpacity(!0),this}}const Ya={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ro=0,To=!1;const Na={maxWidth:100,unit:"metric"};function Ti(_,r,s){const p=s&&s.maxWidth||100,m=_._container.clientHeight/2,b=_._container.clientWidth/2,T=_.unproject([b-p/2,m]),I=_.unproject([b+p/2,m]),R=Math.round(_.project(I).x-_.project(T).x),j=Math.min(p,R,_._container.clientWidth),G=T.distanceTo(I);if(s&&s.unit==="imperial"){const X=3.2808*G;X>5280?Go(r,j,X/5280,_._getUIString("ScaleControl.Miles")):Go(r,j,X,_._getUIString("ScaleControl.Feet"))}else s&&s.unit==="nautical"?Go(r,j,G/1852,_._getUIString("ScaleControl.NauticalMiles")):G>=1e3?Go(r,j,G/1e3,_._getUIString("ScaleControl.Kilometers")):Go(r,j,G,_._getUIString("ScaleControl.Meters"))}function Go(_,r,s,p){const m=(function(b){const T=Math.pow(10,`${Math.floor(b)}`.length-1);let I=b/T;return I=I>=10?10:I>=5?5:I>=3?3:I>=2?2:I>=1?1:(function(R){const j=Math.pow(10,Math.ceil(-Math.log(R)/Math.LN10));return Math.round(R*j)/j})(I),T*I})(s);_.style.width=r*(m/s)+"px",_.innerHTML=`${m} ${p}`}const Oa={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},Il=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ls(_){if(_){if(typeof _=="number"){const r=Math.round(Math.abs(_)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,_),"top-left":new o.P(r,r),"top-right":new o.P(-r,r),bottom:new o.P(0,-_),"bottom-left":new o.P(r,-r),"bottom-right":new o.P(-r,-r),left:new o.P(_,0),right:new o.P(-_,0)}}if(_ instanceof o.P||Array.isArray(_)){const r=o.P.convert(_);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:o.P.convert(_.center||[0,0]),top:o.P.convert(_.top||[0,0]),"top-left":o.P.convert(_["top-left"]||[0,0]),"top-right":o.P.convert(_["top-right"]||[0,0]),bottom:o.P.convert(_.bottom||[0,0]),"bottom-left":o.P.convert(_["bottom-left"]||[0,0]),"bottom-right":o.P.convert(_["bottom-right"]||[0,0]),left:o.P.convert(_.left||[0,0]),right:o.P.convert(_.right||[0,0])}}return Ls(new o.P(0,0))}const Ho=y;f.AJAXError=o.cy,f.Event=o.l,f.Evented=o.E,f.LngLat=o.S,f.MercatorCoordinate=o.a0,f.Point=o.P,f.addProtocol=o.cz,f.config=o.a,f.removeProtocol=o.cA,f.AttributionControl=Li,f.BoxZoomHandler=hh,f.CanvasSource=Er,f.CooperativeGesturesHandler=ko,f.DoubleClickZoomHandler=mr,f.DragPanHandler=zn,f.DragRotateHandler=un,f.EdgeInsets=_r,f.FullscreenControl=class extends o.E{constructor(_={}){super(),this._onFullscreenChange=()=>{var r;let s=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((r=s?.shadowRoot)===null||r===void 0)&&r.fullscreenElement;)s=s.shadowRoot.fullscreenElement;s===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,_&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:o.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){E.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=E.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);E.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new o.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},f.GeoJSONSource=Mr,f.GeolocateControl=class extends o.E{constructor(_){super(),this._onSuccess=r=>{if(this._map){if(this._isOutOfMapMaxBounds(r))return this._setErrorState(),this.fire(new o.l("outofmaxbounds",r)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=r,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(r),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(r),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new o.l("geolocate",r)),this._finish()}},this._updateCamera=r=>{const s=new o.S(r.coords.longitude,r.coords.latitude),p=r.coords.accuracy,m=this._map.getBearing(),b=o.e({bearing:m},this.options.fitBoundsOptions),T=Kt.fromLngLat(s,p);this._map.fitBounds(T,b,{geolocateSource:!0})},this._updateMarker=r=>{if(r){const s=new o.S(r.coords.longitude,r.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=r.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=r=>{if(this._map){if(r.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(r.code===3&&To)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.l("error",r)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(r=>r.preventDefault())),this._geolocateButton=E.create("button","maplibregl-ctrl-geolocate",this._container),E.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=r=>{if(this._map){if(r===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}else{const s=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=E.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Xn({element:this._dotElement}),this._circleElement=E.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Xn({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(s=>{s.geolocateSource||this._watchState!=="ACTIVE_LOCK"||s.originalEvent&&s.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new o.l("trackuserlocationend")),this.fire(new o.l("userlocationlostfocus")))}))}},this.options=o.e({},Ya,_)}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return o._(this,arguments,void 0,(function*(r=!1){if(Si!==void 0&&!r)return Si;if(window.navigator.permissions===void 0)return Si=!!window.navigator.geolocation,Si;try{Si=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Si=!!window.navigator.geolocation}return Si}))})().then((r=>this._finishSetupUI(r))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),E.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ro=0,To=!1}_isOutOfMapMaxBounds(_){const r=this._map.getMaxBounds(),s=_.coords;return r&&(s.longitude<r.getWest()||s.longitude>r.getEast()||s.latitude<r.getSouth()||s.latitude>r.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const _=this._map.getBounds(),r=_.getSouthEast(),s=_.getNorthEast(),p=r.distanceTo(s),m=Math.ceil(this._accuracy/(p/this._map._container.clientHeight)*2);this._circleElement.style.width=`${m}px`,this._circleElement.style.height=`${m}px`}trigger(){if(!this._setup)return o.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ro--,To=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new o.l("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.l("trackuserlocationstart")),this.fire(new o.l("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ro++,Ro>1?(_={maximumAge:6e5,timeout:0},To=!0):(_=this.options.positionOptions,To=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},f.GlobeControl=class{constructor(){this._toggleProjection=()=>{var _;const r=(_=this._map.getProjection())===null||_===void 0?void 0:_.type;this._map.setProjection(r!=="mercator"&&r?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var _;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((_=this._map.getProjection())===null||_===void 0?void 0:_.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=E.create("button","maplibregl-ctrl-globe",this._container),E.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){E.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},f.Hash=sc,f.ImageSource=Jt,f.KeyboardHandler=tr,f.LngLatBounds=Kt,f.LogoControl=Vo,f.Map=class extends en{constructor(_){var r,s;o.cv.mark(o.cw.create);const p=Object.assign(Object.assign(Object.assign({},Eo),_),{canvasContextAttributes:Object.assign(Object.assign({},Eo.canvasContextAttributes),_.canvasContextAttributes)});if(p.minZoom!=null&&p.maxZoom!=null&&p.minZoom>p.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(p.minPitch!=null&&p.maxPitch!=null&&p.minPitch>p.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(p.minPitch!=null&&p.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(p.maxPitch!=null&&p.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const m=new An,b=new Vl;if(p.minZoom!==void 0&&m.setMinZoom(p.minZoom),p.maxZoom!==void 0&&m.setMaxZoom(p.maxZoom),p.minPitch!==void 0&&m.setMinPitch(p.minPitch),p.maxPitch!==void 0&&m.setMaxPitch(p.maxPitch),p.renderWorldCopies!==void 0&&m.setRenderWorldCopies(p.renderWorldCopies),super(m,b,{bearingSnap:p.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new va,this._controls=[],this._mapId=o.a6(),this._contextLost=I=>{I.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.l("webglcontextlost",{originalEvent:I}))},this._contextRestored=I=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.l("webglcontextrestored",{originalEvent:I}))},this._onMapScroll=I=>{if(I.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=p.interactive,this._maxTileCacheSize=p.maxTileCacheSize,this._maxTileCacheZoomLevels=p.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},p.canvasContextAttributes),this._trackResize=p.trackResize===!0,this._bearingSnap=p.bearingSnap,this._centerClampedToGround=p.centerClampedToGround,this._refreshExpiredTiles=p.refreshExpiredTiles===!0,this._fadeDuration=p.fadeDuration,this._crossSourceCollisions=p.crossSourceCollisions===!0,this._collectResourceTiming=p.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Gi),p.locale),this._clickTolerance=p.clickTolerance,this._overridePixelRatio=p.pixelRatio,this._maxCanvasSize=p.maxCanvasSize,this.transformCameraUpdate=p.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=p.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=W.addThrottleControl((()=>this.isMoving())),this._requestManager=new le(p.transformRequest),typeof p.container=="string"){if(this._container=document.getElementById(p.container),!this._container)throw new Error(`Container '${p.container}' not found.`)}else{if(!(p.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=p.container}if(p.maxBounds&&this.setMaxBounds(p.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})),this.once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let I=!1;const R=Ra((j=>{this._trackResize&&!this._removed&&(this.resize(j),this.redraw())}),50);this._resizeObserver=new ResizeObserver((j=>{I?R(j):I=!0})),this._resizeObserver.observe(this._container)}this.handlers=new Mi(this,p),this._hash=p.hash&&new sc(typeof p.hash=="string"&&p.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:p.center,elevation:p.elevation,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch,roll:p.roll}),p.bounds&&(this.resize(),this.fitBounds(p.bounds,o.e({},p.fitBoundsOptions,{duration:0}))));const T=typeof p.style=="string"||((s=(r=p.style)===null||r===void 0?void 0:r.projection)===null||s===void 0?void 0:s.type)!=="globe";this.resize(null,T),this._localIdeographFontFamily=p.localIdeographFontFamily,this._validateStyle=p.validateStyle,p.style&&this.setStyle(p.style,{localIdeographFontFamily:p.localIdeographFontFamily}),p.attributionControl&&this.addControl(new Li(typeof p.attributionControl=="boolean"?void 0:p.attributionControl)),p.maplibreLogo&&this.addControl(new Vo,p.logoPosition),this.on("style.load",(()=>{if(T||this._resizeTransform(),this.transform.unmodified){const I=o.Q(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(I)}})),this.on("data",(I=>{this._update(I.dataType==="style"),this.fire(new o.l(`${I.dataType}data`,I))})),this.on("dataloading",(I=>{this.fire(new o.l(`${I.dataType}dataloading`,I))})),this.on("dataabort",(I=>{this.fire(new o.l("sourcedataabort",I))}))}_getMapId(){return this._mapId}setGlobalStateProperty(_,r){return this.style.setGlobalStateProperty(_,r),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(_,r){if(r===void 0&&(r=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!_||!_.onAdd)return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const s=_.onAdd(this);this._controls.push(_);const p=this._controlPositions[r];return r.indexOf("bottom")!==-1?p.insertBefore(s,p.firstChild):p.appendChild(s),this}removeControl(_){if(!_||!_.onRemove)return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const r=this._controls.indexOf(_);return r>-1&&this._controls.splice(r,1),_.onRemove(this),this}hasControl(_){return this._controls.indexOf(_)>-1}calculateCameraOptionsFromTo(_,r,s,p){return p==null&&this.terrain&&(p=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(_,r,s,p)}resize(_,r=!0){const[s,p]=this._containerDimensions(),m=this._getClampedPixelRatio(s,p);if(this._resizeCanvas(s,p,m),this.painter.resize(s,p,m),this.painter.overLimit()){const T=this.painter.context.gl;this._maxCanvasSize=[T.drawingBufferWidth,T.drawingBufferHeight];const I=this._getClampedPixelRatio(s,p);this._resizeCanvas(s,p,I),this.painter.resize(s,p,I)}this._resizeTransform(r);const b=!this._moving;return b&&(this.stop(),this.fire(new o.l("movestart",_)).fire(new o.l("move",_))),this.fire(new o.l("resize",_)),b&&this.fire(new o.l("moveend",_)),this}_resizeTransform(_=!0){var r;const[s,p]=this._containerDimensions();this.transform.resize(s,p,_),(r=this._requestedCameraState)===null||r===void 0||r.resize(s,p,_)}_getClampedPixelRatio(_,r){const{0:s,1:p}=this._maxCanvasSize,m=this.getPixelRatio(),b=_*m,T=r*m;return Math.min(b>s?s/b:1,T>p?p/T:1)*m}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(Kt.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom)return this.transform.setMinZoom(_),this._update(),this.getZoom()<_&&this.setZoom(_),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom)return this.transform.setMaxZoom(_),this._update(),this.getZoom()>_&&this.setZoom(_),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch)return this.transform.setMinPitch(_),this._update(),this.getPitch()<_&&this.setPitch(_),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(_>=this.transform.minPitch)return this.transform.setMaxPitch(_),this._update(),this.getPitch()>_&&this.setPitch(_),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.setRenderWorldCopies(_),this._update()}project(_){return this.transform.locationToScreenPoint(o.S.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.screenPointToLocation(o.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,r,s){if(_==="mouseenter"||_==="mouseover"){let p=!1;return{layers:r,listener:s,delegates:{mousemove:b=>{const T=r.filter((R=>this.getLayer(R))),I=T.length!==0?this.queryRenderedFeatures(b.point,{layers:T}):[];I.length?p||(p=!0,s.call(this,new _a(_,this,b.originalEvent,{features:I}))):p=!1},mouseout:()=>{p=!1}}}}if(_==="mouseleave"||_==="mouseout"){let p=!1;return{layers:r,listener:s,delegates:{mousemove:T=>{const I=r.filter((R=>this.getLayer(R)));(I.length!==0?this.queryRenderedFeatures(T.point,{layers:I}):[]).length?p=!0:p&&(p=!1,s.call(this,new _a(_,this,T.originalEvent)))},mouseout:T=>{p&&(p=!1,s.call(this,new _a(_,this,T.originalEvent)))}}}}{const p=m=>{const b=r.filter((I=>this.getLayer(I))),T=b.length!==0?this.queryRenderedFeatures(m.point,{layers:b}):[];T.length&&(m.features=T,s.call(this,m),delete m.features)};return{layers:r,listener:s,delegates:{[_]:p}}}}_saveDelegatedListener(_,r){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[_]=this._delegatedListeners[_]||[],this._delegatedListeners[_].push(r)}_removeDelegatedListener(_,r,s){if(!this._delegatedListeners||!this._delegatedListeners[_])return;const p=this._delegatedListeners[_];for(let m=0;m<p.length;m++){const b=p[m];if(b.listener===s&&b.layers.length===r.length&&b.layers.every((T=>r.includes(T)))){for(const T in b.delegates)this.off(T,b.delegates[T]);return void p.splice(m,1)}}}on(_,r,s){if(s===void 0)return super.on(_,r);const p=typeof r=="string"?[r]:r,m=this._createDelegatedListener(_,p,s);this._saveDelegatedListener(_,m);for(const b in m.delegates)this.on(b,m.delegates[b]);return{unsubscribe:()=>{this._removeDelegatedListener(_,p,s)}}}once(_,r,s){if(s===void 0)return super.once(_,r);const p=typeof r=="string"?[r]:r,m=this._createDelegatedListener(_,p,s);for(const b in m.delegates){const T=m.delegates[b];m.delegates[b]=(...I)=>{this._removeDelegatedListener(_,p,s),T(...I)}}this._saveDelegatedListener(_,m);for(const b in m.delegates)this.once(b,m.delegates[b]);return this}off(_,r,s){return s===void 0?super.off(_,r):(this._removeDelegatedListener(_,typeof r=="string"?[r]:r,s),this)}queryRenderedFeatures(_,r){if(!this.style)return[];let s;const p=_ instanceof o.P||Array.isArray(_),m=p?_:[[0,0],[this.transform.width,this.transform.height]];if(r=r||(p?{}:_)||{},m instanceof o.P||typeof m[0]=="number")s=[o.P.convert(m)];else{const b=o.P.convert(m[0]),T=o.P.convert(m[1]);s=[b,new o.P(T.x,b.y),T,new o.P(b.x,T.y),b]}return this.style.queryRenderedFeatures(s,r,this.transform)}querySourceFeatures(_,r){return this.style.querySourceFeatures(_,r)}setStyle(_,r){return(r=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff!==!1&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&_?(this._diffStyle(_,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(_,r))}setTransformRequest(_){return this._requestManager.setTransformRequest(_),this}_getUIString(_){const r=this._locale[_];if(r==null)throw new Error(`Missing UI string '${_}'`);return r}_updateStyle(_,r){var s,p;if(r.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(_,r)));const m=this.style&&r.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new Ma(this,r||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,r,m):this.style.loadJSON(_,r,m),this):((p=(s=this.style)===null||s===void 0?void 0:s.projection)===null||p===void 0||p.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ma(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,r){if(typeof _=="string"){const s=this._requestManager.transformRequest(_,"Style");o.j(s,new AbortController).then((p=>{this._updateDiff(p.data,r)})).catch((p=>{p&&this.fire(new o.k(p))}))}else typeof _=="object"&&this._updateDiff(_,r)}_updateDiff(_,r){try{this.style.setState(_,r)&&this._update(!0)}catch(s){o.w(`Unable to perform style diff: ${s.message||s.error||s}. Rebuilding the style from scratch.`),this._updateStyle(_,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(_,r){return this._lazyInitEmptyStyle(),this.style.addSource(_,r),this._update(!0)}isSourceLoaded(_){const r=this.style&&this.style.sourceCaches[_];if(r!==void 0)return r.loaded();this.fire(new o.k(new Error(`There is no source with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const r=this.style.sourceCaches[_.source];if(!r)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&r.reload();for(const s in this.style._layers){const p=this.style._layers[s];p.type==="hillshade"&&p.source===_.source&&o.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),p.type==="color-relief"&&p.source===_.source&&o.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Ki(this.painter,r,_),this.painter.renderToTexture=new zr(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=s=>{var p;s.dataType==="style"?this.terrain.sourceCache.freeRtt():s.dataType==="source"&&s.tile&&(s.sourceId!==_.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((p=s.source)===null||p===void 0?void 0:p.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(s.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new o.l("terrain",{terrain:_})),this}getTerrain(){var _,r;return(r=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&r!==void 0?r:null}areTilesLoaded(){const _=this.style&&this.style.sourceCaches;for(const r in _){const s=_[r]._tiles;for(const p in s){const m=s[p];if(m.state!=="loaded"&&m.state!=="errored")return!1}}return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}setSourceTileLodParams(_,r,s){if(s){const p=this.getSource(s);if(!p)throw new Error(`There is no source with ID "${s}", cannot set LOD parameters`);p.calculateTileZoom=St(Math.max(1,_),Math.max(1,r))}else for(const p in this.style.sourceCaches)this.style.sourceCaches[p].getSource().calculateTileZoom=St(Math.max(1,_),Math.max(1,r));return this._update(!0),this}refreshTiles(_,r){const s=this.style.sourceCaches[_];if(!s)throw new Error(`There is no source cache with ID "${_}", cannot refresh tile`);r===void 0?s.reload(!0):s.refreshTiles(r.map((p=>new o.a3(p.z,p.x,p.y))))}addImage(_,r,s={}){const{pixelRatio:p=1,sdf:m=!1,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j}=s;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||o.b(r))){if(r.width===void 0||r.height===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:G,height:X,data:Y}=r,ie=r;return this.style.addImage(_,{data:new o.R({width:G,height:X},new Uint8Array(Y)),pixelRatio:p,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j,sdf:m,version:0,userImage:ie}),ie.onAdd&&ie.onAdd(this,_),this}}{const{width:G,height:X,data:Y}=M.getImageData(r);this.style.addImage(_,{data:new o.R({width:G,height:X},Y),pixelRatio:p,stretchX:b,stretchY:T,content:I,textFitWidth:R,textFitHeight:j,sdf:m,version:0})}}updateImage(_,r){const s=this.style.getImage(_);if(!s)return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const p=r instanceof HTMLImageElement||o.b(r)?M.getImageData(r):r,{width:m,height:b,data:T}=p;if(m===void 0||b===void 0)return this.fire(new o.k(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(m!==s.data.width||b!==s.data.height)return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const I=!(r instanceof HTMLImageElement||o.b(r));return s.data.replace(T,I),this.style.updateImage(_,s),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new o.k(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return W.getImage(this._requestManager.transformRequest(_,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(_,r){return this._lazyInitEmptyStyle(),this.style.addLayer(_,r),this._update(!0)}moveLayer(_,r){return this.style.moveLayer(_,r),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,r,s){return this.style.setLayerZoomRange(_,r,s),this._update(!0)}setFilter(_,r,s={}){return this.style.setFilter(_,r,s),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,r,s,p={}){return this.style.setPaintProperty(_,r,s,p),this._update(!0)}getPaintProperty(_,r){return this.style.getPaintProperty(_,r)}setLayoutProperty(_,r,s,p={}){return this.style.setLayoutProperty(_,r,s,p),this._update(!0)}getLayoutProperty(_,r){return this.style.getLayoutProperty(_,r)}setGlyphs(_,r={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,r),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,r,s={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,r,s,(p=>{p||this._update(!0)})),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,r={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,r,(s=>{s||this._update(!0)})),this}setLight(_,r={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,r),this._update(!0)}getLight(){return this.style.getLight()}setSky(_,r={}){return this._lazyInitEmptyStyle(),this.style.setSky(_,r),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(_,r){return this.style.setFeatureState(_,r),this._update()}removeFeatureState(_,r){return this.style.removeFeatureState(_,r),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,r=0;return this._container&&(_=this._container.clientWidth||400,r=this._container.clientHeight||300),[_,r]}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const r=this._canvasContainer=E.create("div","maplibregl-canvas-container",_);this._interactive&&r.classList.add("maplibregl-interactive"),this._canvas=E.create("canvas","maplibregl-canvas",r),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const s=this._containerDimensions(),p=this._getClampedPixelRatio(s[0],s[1]);this._resizeCanvas(s[0],s[1],p);const m=this._controlContainer=E.create("div","maplibregl-control-container",_),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((T=>{b[T]=E.create("div",`maplibregl-ctrl-${T} `,m)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,r,s){this._canvas.width=Math.floor(s*_),this._canvas.height=Math.floor(s*r),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${r}px`}_setupPainter(){const _=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let r=null;this._canvas.addEventListener("webglcontextcreationerror",(p=>{r={requestedAttributes:_},p&&(r.statusMessage=p.statusMessage,r.type=p.type)}),{once:!0});let s=null;if(s=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,_):this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_),!s){const p="Failed to initialize WebGL";throw r?(r.message=p,new Error(JSON.stringify(r))):new Error(p)}this.painter=new $o(s,this.transform),O.testSupport(s)}migrateProjection(_,r){super.migrateProjection(_,r),this.painter.transform=_,this.fire(new o.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||_,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){var r,s,p,m,b;const T=this._idleTriggered?this._fadeDuration:0,I=((r=this.style.projection)===null||r===void 0?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let R=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const X=this.transform.zoom,Y=M.now();this.style.zoomHistory.update(X,Y);const ie=new o.F(X,{now:Y,fadeDuration:T,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition(),globalState:this.style.getGlobalState()}),be=ie.crossFadingFactor();be===1&&be===this._crossFadingFactor||(R=!0,this._crossFadingFactor=be),this.style.update(ie)}const j=((s=this.style.projection)===null||s===void 0?void 0:s.transitionState)>0!==I;(p=this.style.projection)===null||p===void 0||p.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((m=this.style.projection)===null||m===void 0?void 0:m.transitionState,(b=this.style.projection)===null||b===void 0?void 0:b.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||j)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,T,this._crossSourceCollisions,j),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:T,showPadding:this.showPadding}),this.fire(new o.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cv.mark(o.cw.load),this.fire(new o.l("load"))),this.style&&(this.style.hasTransitions()||R)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const G=this._sourcesDirty||this._styleDirty||this._placementDirty;return G||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.l("idle")),!this._loaded||this._fullyLoaded||G||(this._fullyLoaded=!0,o.cv.mark(o.cw.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _;this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),W.removeThrottleControl(this._imageQueueHandle),(_=this._resizeObserver)===null||_===void 0||_.disconnect();const r=this.painter.context.gl.getExtension("WEBGL_lose_context");r?.loseContext&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),E.remove(this._canvasContainer),E.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cv.clearMetrics(),this._removed=!0,this.fire(new o.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,M.frame(this._frameRequest,(_=>{o.cv.frame(_),this._frameRequest=null;try{this._render(_)}catch(r){if(!o.cx(r)&&!(function(s){return s.message===qo})(r))throw r}}),(()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return _i}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(_){return this._lazyInitEmptyStyle(),this.style.setProjection(_),this._update(!0)}},f.MapMouseEvent=_a,f.MapTouchEvent=Ws,f.MapWheelEvent=Rc,f.Marker=Xn,f.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const r=this._map.getZoom(),s=r===this._map.getMaxZoom(),p=r===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(r,s)=>{const p=this._map._getUIString(`NavigationControl.${s}`);r.title=p,r.setAttribute("aria-label",p)},this.options=o.e({},Hi,_),this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(r=>r.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(r=>this._map.zoomIn({},{originalEvent:r}))),E.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(r=>this._map.zoomOut({},{originalEvent:r}))),E.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(r=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:r}):this._map.resetNorth({},{originalEvent:r})})),this._compassIcon=E.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new _o(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){E.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(_,r){const s=E.create("button",_,this._container);return s.type="button",s.addEventListener("click",r),s}},f.Popup=class extends o.E{constructor(_){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&E.remove(this._content),this._container&&(E.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new o.l("close"))),this),this._onMouseUp=r=>{this._update(r.point)},this._onMouseMove=r=>{this._update(r.point)},this._onDrag=r=>{this._update(r.point)},this._update=r=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=E.create("div","maplibregl-popup",this._map.getContainer()),this._tip=E.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const T of this.options.className.split(" "))this._container.classList.add(T);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Di(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!r)return;const s=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let p=this.options.anchor;const m=Ls(this.options.offset);if(!p){const T=this._container.offsetWidth,I=this._container.offsetHeight;let R;R=s.y+m.bottom.y<I?["top"]:s.y>this._map.transform.height-I?["bottom"]:[],s.x<T/2?R.push("left"):s.x>this._map.transform.width-T/2&&R.push("right"),p=R.length===0?"bottom":R.join("-")}let b=s.add(m[p]);this.options.subpixelPositioning||(b=b.round()),E.setTransform(this._container,`${Wi[p]} translate(${b.x}px,${b.y}px)`),ii(this._container,p,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(Oa),_)}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new o.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=o.S.convert(_),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const r=document.createDocumentFragment(),s=document.createElement("body");let p;for(s.innerHTML=_;p=s.firstChild,p;)r.appendChild(p);return this.setDOMContent(r)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=E.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}_createCloseButton(){this.options.closeButton&&(this._closeButton=E.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const _=this._container.querySelector(Il);_&&_.focus()}},f.RasterDEMTileSource=fr,f.RasterTileSource=Lr,f.ScaleControl=class{constructor(_){this._onMove=()=>{Ti(this._map,this._container,this.options)},this.setUnit=r=>{this.options.unit=r,Ti(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Na),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){E.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Cr,f.Style=Ma,f.TerrainControl=class{constructor(_){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=_}onAdd(_){return this._map=_,this._container=E.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=E.create("button","maplibregl-ctrl-terrain",this._container),E.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){E.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=Lt,f.TwoFingersTouchRotateHandler=Gt,f.TwoFingersTouchZoomHandler=Je,f.TwoFingersTouchZoomRotateHandler=Yn,f.VectorTileSource=Be,f.VideoSource=Or,f.addSourceType=(_,r)=>o._(void 0,void 0,void 0,(function*(){if(yr(_))throw new Error(`A source type called "${_}" already exists.`);((s,p)=>{lr[s]=p})(_,r)})),f.clearPrewarmedResources=function(){const _=fe;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(ge),fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.createTileMesh=js,f.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Wr().getRTLTextPluginStatus()},f.getVersion=function(){return Ho},f.getWorkerCount=function(){return Re.workerCount},f.getWorkerUrl=function(){return o.a.WORKER_URL},f.importScriptInWorkers=function(_){return ot().broadcast("IS",_)},f.prewarm=function(){Ie().acquire(ge)},f.setMaxParallelImageRequests=function(_){o.a.MAX_PARALLEL_IMAGE_REQUESTS=_},f.setRTLTextPlugin=function(_,r){return Wr().setRTLTextPlugin(_,r)},f.setWorkerCount=function(_){Re.workerCount=_},f.setWorkerUrl=function(_){o.a.WORKER_URL=_}}));var h=n;return h}))})(Um)),Um.exports}var QD=JD();class ek{registeredElements;baseLayers;firstSymbolLayer;eventHandlers;wrapper;initRegisteredElements;addNativeMaplibreFunctionsAndProps;map;style;styleJson;addSource;addControl;on;cleanup;constructor(t){const n=this;this.registeredElements={},this.baseLayers=[],this.firstSymbolLayer=void 0,this.eventHandlers={layerchange:[],viewportchange:[],addsource:[],addlayer:[]},this.wrapper={on:(o,y,v,S)=>{if(!n.eventHandlers[o])return;typeof v=="string"&&(S=v,v={}),n.eventHandlers[o].push({handler:y,options:v});const P=[o,y];S&&typeof S=="string"&&(n.initRegisteredElements(S),n.registeredElements[S].wrapperEvents.push(P))},off:(o,y)=>{n.eventHandlers[o]&&(n.eventHandlers[o]=n.eventHandlers[o].filter(v=>Object.is(v.handler,y)?!1:v))},fire:(o,y)=>{if(!n.eventHandlers[o])return;const v=y||window,S=new Event(o);n.eventHandlers[o].forEach(function(P){P.handler.call(v,S,n,y)})},layerState:[],layerStateString:"",oldLayerStateStrings:{},buildLayerObject:o=>{if(o)return{id:o.id,type:o.type,visible:o.visibility!=="none",baseLayer:n.baseLayers.indexOf(o.id)!==-1}},buildLayerObjects:()=>n.map.style._order.map(o=>n.wrapper.buildLayerObject(n.map.style._layers[o])).filter(o=>typeof o<"u"),refreshLayerState:()=>{n.wrapper.layerState=n.wrapper.buildLayerObjects(),JSON.stringify(n.wrapper.layerState)!==n.wrapper.layerStateString&&(n.wrapper.fire("layerchange"),n.wrapper.layerStateString=JSON.stringify(n.wrapper.layerState))},viewportState:{center:{lng:0,lat:0},zoom:0,bearing:0,pitch:0},viewportStateString:"{}",oldViewportStateString:"{}",getViewport:()=>typeof n.map.getCenter=="function"?{center:(({lng:o,lat:y})=>({lng:o,lat:y}))(n.map.getCenter()),zoom:n.map.getZoom(),bearing:n.map.getBearing(),pitch:n.map.getPitch()}:{center:{lng:0,lat:0},zoom:0,bearing:0,pitch:0},refreshViewport:()=>{n.wrapper.viewportState=n.wrapper.getViewport()}},this.cancelled=!1,this.initRegisteredElements=(o,y)=>{(typeof n.registeredElements[o]>"u"||typeof y<"u"&&y)&&(n.registeredElements[o]={layers:[],sources:[],images:[],events:[],controls:[],wrapperEvents:[]})},this.addLayer=(o,y,v)=>n.map.style?(v&&typeof v=="string"&&typeof o.id<"u"&&(n.initRegisteredElements(v),n.registeredElements[v].layers.push(o.id),o?.source&&typeof o?.source!="string"&&n.registeredElements[v].sources.push(o.id)),n.map.addLayer(o,y),n.wrapper.fire("addlayer",{layer_id:o.id}),this):this,this.addSource=(o,y,v)=>n.map.style?(v&&typeof v=="string"&&typeof o<"u"&&(n.initRegisteredElements(v),n.registeredElements[v].sources.push(o)),n.map.addSource(o,y),n.wrapper.fire("addsource",{source_id:o}),this):this,this.addImage=(o,y,v,S)=>n.map.style?typeof v=="string"&&typeof S>"u"?n.addImage(o,y,void 0,v):(S&&typeof S=="string"&&typeof o<"u"&&(n.initRegisteredElements(S),n.registeredElements[S].images.push(o)),n.map.addImage(o,y,v),this):this,this.on=(o,y,v,S)=>{if(typeof v=="string"&&typeof y=="function")return n.on.call(n,o,void 0,y,v);let P=[o,y,v];return y||(P=[o,v]),S&&typeof S=="string"&&(n.initRegisteredElements(S),n.registeredElements[S].events.push(P)),n.map.on(...P),this},this.addControl=(o,y,v)=>(v&&typeof v=="string"&&(n.initRegisteredElements(v),n.registeredElements[v].controls.push(o)),n.map.addControl(o,y),this),this.cleanup=o=>{n.map.style&&typeof n.registeredElements[o]<"u"&&(n.registeredElements[o].layers.forEach(y=>{n.map.style.getLayer(y)&&n.map.style.removeLayer(y)}),n.registeredElements[o].sources.forEach(y=>{n.map.style.getSource(y)&&n.map.style.removeSource(y)}),n.registeredElements[o].images.forEach(y=>{n.map.hasImage(y)&&n.map.style.removeImage(y)}),n.registeredElements[o].events.forEach(y=>{n.map.off(...y)}),n.registeredElements[o].controls.forEach(y=>{n.map.removeControl(y)}),n.registeredElements[o].wrapperEvents.forEach(y=>{n.wrapper.off(...y)}),n.initRegisteredElements(o,!0))},["moveLayer","removeLayer","removeSource","setPaintProperty","setLayoutProperty"].forEach(o=>{this[o]=(...y)=>(n.map&&n.map.style&&typeof n.map.style[o]=="function"&&n.map.style[o](...y),n.map._update?n.map._update(!0):void 0)}),["getLayer","getSource","listImages","getPaintProperty","getLayoutProperty","removeImage"].forEach(o=>{this[o]=(...y)=>n.map&&n.map.style?n.map.style[o](...y):!1}),this.addNativeMaplibreFunctionsAndProps=()=>{Object.getOwnPropertyNames(Object.getPrototypeOf(this.map)).forEach(o=>{typeof this[o]>"u"&&(this[o]=(...y)=>n.map[o](...y))}),Object.keys(this.map).forEach(o=>{typeof this[o]>"u"&&(this[o]=n.map[o])})},["getZoom","setZoom","getCenter","setCenter","getBearing","setBearing","getPitch","setPitch","jumpTo","flyTo","panTo","panBy","panBy","zoomTo","zoomIn","zoomOut","getPadding","setPadding","rotateTo","resetNorth","resetNorthPitch","snapToNorth","cameraForBounds","fitBounds","fitScreenCoordinates","getFreeCameraOptions","setFreeCameraOptions","easeTo","stop"].forEach(o=>{this[o]=(...y)=>{if(typeof n.map[o]=="function")return n.map[o].call(n.map,...y)}}),(async()=>{typeof t.mapOptions.style=="string"&&t.mapOptions.style.indexOf("mapbox://")===-1&&await fetch(t.mapOptions.style).then(o=>{if(o.ok)return o.json();throw new Error("error loading map style.json")}).then(o=>{o.layers.forEach(y=>{n.baseLayers.push(y.id),!n.firstSymbolLayer&&y.type==="symbol"&&(n.firstSymbolLayer=y.id)}),n.styleJson=o,t.mapOptions.style=o}).catch(o=>{console.log(o)}),n.map=new QD.Map(t.mapOptions),n.addNativeMaplibreFunctionsAndProps(),n.wrapper.refreshViewport(),n.wrapper.fire("viewportchange"),n.map.on("load",()=>{n.addNativeMaplibreFunctionsAndProps()}),n.map.on("move",()=>{n.wrapper.viewportState=n.wrapper.getViewport(),n.wrapper.fire("viewportchange")}),n.map.on("idle",()=>{n.wrapper.refreshLayerState()}),n.map.on("data",()=>{n.wrapper.refreshLayerState()}),typeof t.onReady=="function"&&t.onReady(n.map,n)})()}}function Yc(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(a=>n.searchParams.append("args[]",a)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Yu="$$material";function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},rg.apply(null,arguments)}function tk(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rk(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var nk=(function(){function e(n){var a=this;this._insertTag=function(c){var h;a.tags.length===0?a.insertionPoint?h=a.insertionPoint.nextSibling:a.prepend?h=a.container.firstChild:h=a.before:h=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(c,h),a.tags.push(c)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(a){a.forEach(this._insertTag)},t.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rk(this));var c=this.tags[this.tags.length-1];if(this.isSpeedy){var h=tk(c);try{h.insertRule(a,h.cssRules.length)}catch{}}else c.appendChild(document.createTextNode(a));this.ctr++},t.flush=function(){this.tags.forEach(function(a){var c;return(c=a.parentNode)==null?void 0:c.removeChild(a)}),this.tags=[],this.ctr=0},e})(),Bs="-ms-",ng="-moz-",Ri="-webkit-",pP="comm",Hb="rule",Wb="decl",ik="@import",mP="@keyframes",ok="@layer",ak=Math.abs,Ag=String.fromCharCode,sk=Object.assign;function lk(e,t){return hs(e,0)^45?(((t<<2^hs(e,0))<<2^hs(e,1))<<2^hs(e,2))<<2^hs(e,3):0}function gP(e){return e.trim()}function uk(e,t){return(e=t.exec(e))?e[0]:e}function Ni(e,t,n){return e.replace(t,n)}function tb(e,t){return e.indexOf(t)}function hs(e,t){return e.charCodeAt(t)|0}function wp(e,t,n){return e.slice(t,n)}function Gu(e){return e.length}function Zb(e){return e.length}function _m(e,t){return t.push(e),e}function ck(e,t){return e.map(t).join("")}var Pg=1,hd=1,yP=0,gl=0,Ca=0,pd="";function Ig(e,t,n,a,c,h,f){return{value:e,root:t,parent:n,type:a,props:c,children:h,line:Pg,column:hd,length:f,return:""}}function Hd(e,t){return sk(Ig("",null,null,"",null,null,0),e,{length:-e.length},t)}function hk(){return Ca}function fk(){return Ca=gl>0?hs(pd,--gl):0,hd--,Ca===10&&(hd=1,Pg--),Ca}function zl(){return Ca=gl<yP?hs(pd,gl++):0,hd++,Ca===10&&(hd=1,Pg++),Ca}function Xu(){return hs(pd,gl)}function qm(){return gl}function Np(e,t){return wp(pd,e,t)}function Sp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _P(e){return Pg=hd=1,yP=Gu(pd=e),gl=0,[]}function vP(e){return pd="",e}function $m(e){return gP(Np(gl-1,rb(e===91?e+2:e===40?e+1:e)))}function dk(e){for(;(Ca=Xu())&&Ca<33;)zl();return Sp(e)>2||Sp(Ca)>3?"":" "}function pk(e,t){for(;--t&&zl()&&!(Ca<48||Ca>102||Ca>57&&Ca<65||Ca>70&&Ca<97););return Np(e,qm()+(t<6&&Xu()==32&&zl()==32))}function rb(e){for(;zl();)switch(Ca){case e:return gl;case 34:case 39:e!==34&&e!==39&&rb(Ca);break;case 40:e===41&&rb(e);break;case 92:zl();break}return gl}function mk(e,t){for(;zl()&&e+Ca!==57;)if(e+Ca===84&&Xu()===47)break;return"/*"+Np(t,gl-1)+"*"+Ag(e===47?e:zl())}function gk(e){for(;!Sp(Xu());)zl();return Np(e,gl)}function yk(e){return vP(Vm("",null,null,null,[""],e=_P(e),0,[0],e))}function Vm(e,t,n,a,c,h,f,o,y){for(var v=0,S=0,P=f,M=0,E=0,O=0,N=1,z=1,U=1,ee=0,ae="",W=c,le=h,te=a,we=ae;z;)switch(O=ee,ee=zl()){case 40:if(O!=108&&hs(we,P-1)==58){tb(we+=Ni($m(ee),"&","&\f"),"&\f")!=-1&&(U=-1);break}case 34:case 39:case 91:we+=$m(ee);break;case 9:case 10:case 13:case 32:we+=dk(O);break;case 92:we+=pk(qm()-1,7);continue;case 47:switch(Xu()){case 42:case 47:_m(_k(mk(zl(),qm()),t,n),y);break;default:we+="/"}break;case 123*N:o[v++]=Gu(we)*U;case 125*N:case 59:case 0:switch(ee){case 0:case 125:z=0;case 59+S:U==-1&&(we=Ni(we,/\f/g,"")),E>0&&Gu(we)-P&&_m(E>32?g5(we+";",a,n,P-1):g5(Ni(we," ","")+";",a,n,P-2),y);break;case 59:we+=";";default:if(_m(te=m5(we,t,n,v,S,c,o,ae,W=[],le=[],P),h),ee===123)if(S===0)Vm(we,t,te,te,W,h,P,o,le);else switch(M===99&&hs(we,3)===110?100:M){case 100:case 108:case 109:case 115:Vm(e,te,te,a&&_m(m5(e,te,te,0,0,c,o,ae,c,W=[],P),le),c,le,P,o,a?W:le);break;default:Vm(we,te,te,te,[""],le,0,o,le)}}v=S=E=0,N=U=1,ae=we="",P=f;break;case 58:P=1+Gu(we),E=O;default:if(N<1){if(ee==123)--N;else if(ee==125&&N++==0&&fk()==125)continue}switch(we+=Ag(ee),ee*N){case 38:U=S>0?1:(we+="\f",-1);break;case 44:o[v++]=(Gu(we)-1)*U,U=1;break;case 64:Xu()===45&&(we+=$m(zl())),M=Xu(),S=P=Gu(ae=we+=gk(qm())),ee++;break;case 45:O===45&&Gu(we)==2&&(N=0)}}return h}function m5(e,t,n,a,c,h,f,o,y,v,S){for(var P=c-1,M=c===0?h:[""],E=Zb(M),O=0,N=0,z=0;O<a;++O)for(var U=0,ee=wp(e,P+1,P=ak(N=f[O])),ae=e;U<E;++U)(ae=gP(N>0?M[U]+" "+ee:Ni(ee,/&\f/g,M[U])))&&(y[z++]=ae);return Ig(e,t,n,c===0?Hb:o,y,v,S)}function _k(e,t,n){return Ig(e,t,n,pP,Ag(hk()),wp(e,2,-2),0)}function g5(e,t,n,a){return Ig(e,t,n,Wb,wp(e,0,a),wp(e,a+1,-1),a)}function od(e,t){for(var n="",a=Zb(e),c=0;c<a;c++)n+=t(e[c],c,e,t)||"";return n}function vk(e,t,n,a){switch(e.type){case ok:if(e.children.length)break;case ik:case Wb:return e.return=e.return||e.value;case pP:return"";case mP:return e.return=e.value+"{"+od(e.children,a)+"}";case Hb:e.value=e.props.join(",")}return Gu(n=od(e.children,a))?e.return=e.value+"{"+n+"}":""}function bk(e){var t=Zb(e);return function(n,a,c,h){for(var f="",o=0;o<t;o++)f+=e[o](n,a,c,h)||"";return f}}function xk(e){return function(t){t.root||(t=t.return)&&e(t)}}function bP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var wk=function(t,n,a){for(var c=0,h=0;c=h,h=Xu(),c===38&&h===12&&(n[a]=1),!Sp(h);)zl();return Np(t,gl)},Sk=function(t,n){var a=-1,c=44;do switch(Sp(c)){case 0:c===38&&Xu()===12&&(n[a]=1),t[a]+=wk(gl-1,n,a);break;case 2:t[a]+=$m(c);break;case 4:if(c===44){t[++a]=Xu()===58?"&\f":"",n[a]=t[a].length;break}default:t[a]+=Ag(c)}while(c=zl());return t},Ek=function(t,n){return vP(Sk(_P(t),n))},y5=new WeakMap,Tk=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,a=t.parent,c=t.column===a.column&&t.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!y5.get(a))&&!c){y5.set(t,!0);for(var h=[],f=Ek(n,h),o=a.props,y=0,v=0;y<f.length;y++)for(var S=0;S<o.length;S++,v++)t.props[v]=h[y]?f[y].replace(/&\f/g,o[S]):o[S]+" "+f[y]}}},Ck=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xP(e,t){switch(lk(e,t)){case 5103:return Ri+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ri+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ri+e+ng+e+Bs+e+e;case 6828:case 4268:return Ri+e+Bs+e+e;case 6165:return Ri+e+Bs+"flex-"+e+e;case 5187:return Ri+e+Ni(e,/(\w+).+(:[^]+)/,Ri+"box-$1$2"+Bs+"flex-$1$2")+e;case 5443:return Ri+e+Bs+"flex-item-"+Ni(e,/flex-|-self/,"")+e;case 4675:return Ri+e+Bs+"flex-line-pack"+Ni(e,/align-content|flex-|-self/,"")+e;case 5548:return Ri+e+Bs+Ni(e,"shrink","negative")+e;case 5292:return Ri+e+Bs+Ni(e,"basis","preferred-size")+e;case 6060:return Ri+"box-"+Ni(e,"-grow","")+Ri+e+Bs+Ni(e,"grow","positive")+e;case 4554:return Ri+Ni(e,/([^-])(transform)/g,"$1"+Ri+"$2")+e;case 6187:return Ni(Ni(Ni(e,/(zoom-|grab)/,Ri+"$1"),/(image-set)/,Ri+"$1"),e,"")+e;case 5495:case 3959:return Ni(e,/(image-set\([^]*)/,Ri+"$1$`$1");case 4968:return Ni(Ni(e,/(.+:)(flex-)?(.*)/,Ri+"box-pack:$3"+Bs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ri+e+e;case 4095:case 3583:case 4068:case 2532:return Ni(e,/(.+)-inline(.+)/,Ri+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gu(e)-1-t>6)switch(hs(e,t+1)){case 109:if(hs(e,t+4)!==45)break;case 102:return Ni(e,/(.+:)(.+)-([^]+)/,"$1"+Ri+"$2-$3$1"+ng+(hs(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tb(e,"stretch")?xP(Ni(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(hs(e,t+1)!==115)break;case 6444:switch(hs(e,Gu(e)-3-(~tb(e,"!important")&&10))){case 107:return Ni(e,":",":"+Ri)+e;case 101:return Ni(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ri+(hs(e,14)===45?"inline-":"")+"box$3$1"+Ri+"$2$3$1"+Bs+"$2box$3")+e}break;case 5936:switch(hs(e,t+11)){case 114:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ri+e+Bs+Ni(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ri+e+Bs+e+e}return e}var Ak=function(t,n,a,c){if(t.length>-1&&!t.return)switch(t.type){case Wb:t.return=xP(t.value,t.length);break;case mP:return od([Hd(t,{value:Ni(t.value,"@","@"+Ri)})],c);case Hb:if(t.length)return ck(t.props,function(h){switch(uk(h,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return od([Hd(t,{props:[Ni(h,/:(read-\w+)/,":"+ng+"$1")]})],c);case"::placeholder":return od([Hd(t,{props:[Ni(h,/:(plac\w+)/,":"+Ri+"input-$1")]}),Hd(t,{props:[Ni(h,/:(plac\w+)/,":"+ng+"$1")]}),Hd(t,{props:[Ni(h,/:(plac\w+)/,Bs+"input-$1")]})],c)}return""})}},Pk=[Ak],Ik=function(t){var n=t.key;if(n==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(N){var z=N.getAttribute("data-emotion");z.indexOf(" ")!==-1&&(document.head.appendChild(N),N.setAttribute("data-s",""))})}var c=t.stylisPlugins||Pk,h={},f,o=[];f=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(N){for(var z=N.getAttribute("data-emotion").split(" "),U=1;U<z.length;U++)h[z[U]]=!0;o.push(N)});var y,v=[Tk,Ck];{var S,P=[vk,xk(function(N){S.insert(N)})],M=bk(v.concat(c,P)),E=function(z){return od(yk(z),M)};y=function(z,U,ee,ae){S=ee,E(z?z+"{"+U.styles+"}":U.styles),ae&&(O.inserted[U.name]=!0)}}var O={key:n,sheet:new nk({key:n,container:f,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:h,registered:{},insert:y};return O.sheet.hydrate(o),O},vm={exports:{}},zi={};/** @license React v16.13.1
|
|
771
771
|
* react-is.production.min.js
|
|
772
772
|
*
|
|
773
773
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -874,7 +874,7 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
874
874
|
|
|
875
875
|
export default theme;`}function oS(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const _N=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let a=0;a<t.length;a+=1)n+=+t[a];return n};function vN(e){Object.assign(e,{alpha(t,n){const a=this||e;return a.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:a.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:ag(t,_N(n))},lighten(t,n){const a=this||e;return a.colorSpace?`color-mix(in ${a.colorSpace}, ${t}, #fff ${oS(n)})`:$g(t,n)},darken(t,n){const a=this||e;return a.colorSpace?`color-mix(in ${a.colorSpace}, ${t}, #000 ${oS(n)})`:qg(t,n)}})}function sb(e={},...t){const{breakpoints:n,mixins:a={},spacing:c,palette:h={},transitions:f={},typography:o={},shape:y,colorSpace:v,...S}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Yc(20));const P=p2({...h,colorSpace:v}),M=o2(e);let E=jl(M,{mixins:aN(M.breakpoints,a),palette:P,shadows:hN.slice(),typography:QP(P,o),transitions:mN(f),zIndex:{...gN}});if(E=jl(E,S),E=t.reduce((O,N)=>jl(O,N),E),process.env.NODE_ENV!=="production"){const O=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],N=(z,U)=>{let ee;for(ee in z){const ae=z[ee];if(O.includes(ee)&&Object.keys(ae).length>0){if(process.env.NODE_ENV!=="production"){const W=yl("",ee);console.error([`MUI: The \`${U}\` component increases the CSS specificity of the \`${ee}\` internal state.`,"You can not override it like this: ",JSON.stringify(z,null,2),"",`Instead, you need to use the '&.${W}' syntax:`,JSON.stringify({root:{[`&.${W}`]:ae}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
876
876
|
`))}z[ee]={}}}};Object.keys(E.components).forEach(z=>{const U=E.components[z].styleOverrides;U&&z.startsWith("Mui")&&N(U,z)})}return E.unstable_sxConfig={...Up,...S?.unstable_sxConfig},E.unstable_sx=function(N){return Xc({sx:N,theme:this})},E.toRuntimeSource=eI,vN(E),E}function lb(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const bN=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=lb(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function tI(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function rI(e){return e==="dark"?bN:[]}function xN(e){const{palette:t={mode:"light"},opacity:n,overlays:a,colorSpace:c,...h}=e,f=p2({...t,colorSpace:c});return{palette:f,opacity:{...tI(f.mode),...n},overlays:a||rI(f.mode),...h}}function wN(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const SN=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],EN=e=>(t,n)=>{const a=e.rootSelector||":root",c=e.colorSchemeSelector;let h=c;if(c==="class"&&(h=".%s"),c==="data"&&(h="[data-%s]"),c?.startsWith("data-")&&!c.includes("%s")&&(h=`[${c}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const f={};return SN(e.cssVarPrefix).forEach(o=>{f[o]=n[o],delete n[o]}),h==="media"?{[a]:n,"@media (prefers-color-scheme: dark)":{[a]:f}}:h?{[h.replace("%s",t)]:f,[`${a}, ${h.replace("%s",t)}`]:n}:{[a]:{...n,...f}}}if(h&&h!=="media")return`${a}, ${h.replace("%s",String(t))}`}else if(t){if(h==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[a]:n}};if(h)return h.replace("%s",String(t))}return a};function TN(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function or(e,t,n){!e[t]&&n&&(e[t]=n)}function up(e){return typeof e!="string"||!e.startsWith("hsl")?e:$P(e)}function dc(e,t){`${t}Channel`in e||(e[`${t}Channel`]=lp(up(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
877
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function CN(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const qu=e=>{try{return e()}catch{}},AN=(e="mui")=>H6(e);function w0(e,t,n,a,c){if(!n)return;n=n===!0?{}:n;const h=c==="dark"?"dark":"light";if(!a){t[c]=xN({...n,palette:{mode:h,...n?.palette},colorSpace:e});return}const{palette:f,...o}=sb({...a,palette:{mode:h,...n?.palette},colorSpace:e});return t[c]={...n,palette:f,opacity:{...tI(h),...n?.opacity},overlays:n?.overlays||rI(h)},o}function PN(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:a,disableCssColorScheme:c=!1,cssVarPrefix:h="mui",nativeColor:f=!1,shouldSkipGeneratingVar:o=wN,colorSchemeSelector:y=n.light&&n.dark?"media":void 0,rootSelector:v=":root",...S}=e,P=Object.keys(n)[0],M=a||(n.light&&P!=="light"?"light":P),E=AN(h),{[M]:O,light:N,dark:z,...U}=n,ee={...U};let ae=O;if((M==="dark"&&!("dark"in n)||M==="light"&&!("light"in n))&&(ae=!0),!ae)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${M}\` option is either missing or invalid.`:Yc(21,M));let W;f&&(W="oklch");const le=w0(W,ee,ae,S,M);N&&!ee.light&&w0(W,ee,N,void 0,"light"),z&&!ee.dark&&w0(W,ee,z,void 0,"dark");let te={defaultColorScheme:M,...le,cssVarPrefix:h,colorSchemeSelector:y,rootSelector:v,getCssVar:E,colorSchemes:ee,font:{...oN(le.typography),...le.font},spacing:CN(S.spacing)};Object.keys(te.colorSchemes).forEach(re=>{const H=te.colorSchemes[re].palette,Le=Me=>{const Ze=Me.split("-"),ut=Ze[1],ke=Ze[2];return E(Me,H[ut][ke])};H.mode==="light"&&(or(H.common,"background","#fff"),or(H.common,"onBackground","#000")),H.mode==="dark"&&(or(H.common,"background","#000"),or(H.common,"onBackground","#fff"));function Pe(Me,Ze,ut){if(W){let ke;return Me===Eh&&(ke=`transparent ${((1-ut)*100).toFixed(0)}%`),Me===Zi&&(ke=`#000 ${(ut*100).toFixed(0)}%`),Me===Yi&&(ke=`#fff ${(ut*100).toFixed(0)}%`),`color-mix(in ${W}, ${Ze}, ${ke})`}return Me(Ze,ut)}if(TN(H,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),H.mode==="light"){or(H.Alert,"errorColor",Pe(Zi,H.error.light,.6)),or(H.Alert,"infoColor",Pe(Zi,H.info.light,.6)),or(H.Alert,"successColor",Pe(Zi,H.success.light,.6)),or(H.Alert,"warningColor",Pe(Zi,H.warning.light,.6)),or(H.Alert,"errorFilledBg",Le("palette-error-main")),or(H.Alert,"infoFilledBg",Le("palette-info-main")),or(H.Alert,"successFilledBg",Le("palette-success-main")),or(H.Alert,"warningFilledBg",Le("palette-warning-main")),or(H.Alert,"errorFilledColor",qu(()=>H.getContrastText(H.error.main))),or(H.Alert,"infoFilledColor",qu(()=>H.getContrastText(H.info.main))),or(H.Alert,"successFilledColor",qu(()=>H.getContrastText(H.success.main))),or(H.Alert,"warningFilledColor",qu(()=>H.getContrastText(H.warning.main))),or(H.Alert,"errorStandardBg",Pe(Yi,H.error.light,.9)),or(H.Alert,"infoStandardBg",Pe(Yi,H.info.light,.9)),or(H.Alert,"successStandardBg",Pe(Yi,H.success.light,.9)),or(H.Alert,"warningStandardBg",Pe(Yi,H.warning.light,.9)),or(H.Alert,"errorIconColor",Le("palette-error-main")),or(H.Alert,"infoIconColor",Le("palette-info-main")),or(H.Alert,"successIconColor",Le("palette-success-main")),or(H.Alert,"warningIconColor",Le("palette-warning-main")),or(H.AppBar,"defaultBg",Le("palette-grey-100")),or(H.Avatar,"defaultBg",Le("palette-grey-400")),or(H.Button,"inheritContainedBg",Le("palette-grey-300")),or(H.Button,"inheritContainedHoverBg",Le("palette-grey-A100")),or(H.Chip,"defaultBorder",Le("palette-grey-400")),or(H.Chip,"defaultAvatarColor",Le("palette-grey-700")),or(H.Chip,"defaultIconColor",Le("palette-grey-700")),or(H.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),or(H.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),or(H.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),or(H.LinearProgress,"primaryBg",Pe(Yi,H.primary.main,.62)),or(H.LinearProgress,"secondaryBg",Pe(Yi,H.secondary.main,.62)),or(H.LinearProgress,"errorBg",Pe(Yi,H.error.main,.62)),or(H.LinearProgress,"infoBg",Pe(Yi,H.info.main,.62)),or(H.LinearProgress,"successBg",Pe(Yi,H.success.main,.62)),or(H.LinearProgress,"warningBg",Pe(Yi,H.warning.main,.62)),or(H.Skeleton,"bg",W?Pe(Eh,H.text.primary,.11):`rgba(${Le("palette-text-primaryChannel")} / 0.11)`),or(H.Slider,"primaryTrack",Pe(Yi,H.primary.main,.62)),or(H.Slider,"secondaryTrack",Pe(Yi,H.secondary.main,.62)),or(H.Slider,"errorTrack",Pe(Yi,H.error.main,.62)),or(H.Slider,"infoTrack",Pe(Yi,H.info.main,.62)),or(H.Slider,"successTrack",Pe(Yi,H.success.main,.62)),or(H.Slider,"warningTrack",Pe(Yi,H.warning.main,.62));const Me=W?Pe(Zi,H.background.default,.6825):wm(H.background.default,.8);or(H.SnackbarContent,"bg",Me),or(H.SnackbarContent,"color",qu(()=>W?ab.text.primary:H.getContrastText(Me))),or(H.SpeedDialAction,"fabHoverBg",wm(H.background.paper,.15)),or(H.StepConnector,"border",Le("palette-grey-400")),or(H.StepContent,"border",Le("palette-grey-400")),or(H.Switch,"defaultColor",Le("palette-common-white")),or(H.Switch,"defaultDisabledColor",Le("palette-grey-100")),or(H.Switch,"primaryDisabledColor",Pe(Yi,H.primary.main,.62)),or(H.Switch,"secondaryDisabledColor",Pe(Yi,H.secondary.main,.62)),or(H.Switch,"errorDisabledColor",Pe(Yi,H.error.main,.62)),or(H.Switch,"infoDisabledColor",Pe(Yi,H.info.main,.62)),or(H.Switch,"successDisabledColor",Pe(Yi,H.success.main,.62)),or(H.Switch,"warningDisabledColor",Pe(Yi,H.warning.main,.62)),or(H.TableCell,"border",Pe(Yi,Pe(Eh,H.divider,1),.88)),or(H.Tooltip,"bg",Pe(Eh,H.grey[700],.92))}if(H.mode==="dark"){or(H.Alert,"errorColor",Pe(Yi,H.error.light,.6)),or(H.Alert,"infoColor",Pe(Yi,H.info.light,.6)),or(H.Alert,"successColor",Pe(Yi,H.success.light,.6)),or(H.Alert,"warningColor",Pe(Yi,H.warning.light,.6)),or(H.Alert,"errorFilledBg",Le("palette-error-dark")),or(H.Alert,"infoFilledBg",Le("palette-info-dark")),or(H.Alert,"successFilledBg",Le("palette-success-dark")),or(H.Alert,"warningFilledBg",Le("palette-warning-dark")),or(H.Alert,"errorFilledColor",qu(()=>H.getContrastText(H.error.dark))),or(H.Alert,"infoFilledColor",qu(()=>H.getContrastText(H.info.dark))),or(H.Alert,"successFilledColor",qu(()=>H.getContrastText(H.success.dark))),or(H.Alert,"warningFilledColor",qu(()=>H.getContrastText(H.warning.dark))),or(H.Alert,"errorStandardBg",Pe(Zi,H.error.light,.9)),or(H.Alert,"infoStandardBg",Pe(Zi,H.info.light,.9)),or(H.Alert,"successStandardBg",Pe(Zi,H.success.light,.9)),or(H.Alert,"warningStandardBg",Pe(Zi,H.warning.light,.9)),or(H.Alert,"errorIconColor",Le("palette-error-main")),or(H.Alert,"infoIconColor",Le("palette-info-main")),or(H.Alert,"successIconColor",Le("palette-success-main")),or(H.Alert,"warningIconColor",Le("palette-warning-main")),or(H.AppBar,"defaultBg",Le("palette-grey-900")),or(H.AppBar,"darkBg",Le("palette-background-paper")),or(H.AppBar,"darkColor",Le("palette-text-primary")),or(H.Avatar,"defaultBg",Le("palette-grey-600")),or(H.Button,"inheritContainedBg",Le("palette-grey-800")),or(H.Button,"inheritContainedHoverBg",Le("palette-grey-700")),or(H.Chip,"defaultBorder",Le("palette-grey-700")),or(H.Chip,"defaultAvatarColor",Le("palette-grey-300")),or(H.Chip,"defaultIconColor",Le("palette-grey-300")),or(H.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),or(H.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),or(H.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),or(H.LinearProgress,"primaryBg",Pe(Zi,H.primary.main,.5)),or(H.LinearProgress,"secondaryBg",Pe(Zi,H.secondary.main,.5)),or(H.LinearProgress,"errorBg",Pe(Zi,H.error.main,.5)),or(H.LinearProgress,"infoBg",Pe(Zi,H.info.main,.5)),or(H.LinearProgress,"successBg",Pe(Zi,H.success.main,.5)),or(H.LinearProgress,"warningBg",Pe(Zi,H.warning.main,.5)),or(H.Skeleton,"bg",W?Pe(Eh,H.text.primary,.13):`rgba(${Le("palette-text-primaryChannel")} / 0.13)`),or(H.Slider,"primaryTrack",Pe(Zi,H.primary.main,.5)),or(H.Slider,"secondaryTrack",Pe(Zi,H.secondary.main,.5)),or(H.Slider,"errorTrack",Pe(Zi,H.error.main,.5)),or(H.Slider,"infoTrack",Pe(Zi,H.info.main,.5)),or(H.Slider,"successTrack",Pe(Zi,H.success.main,.5)),or(H.Slider,"warningTrack",Pe(Zi,H.warning.main,.5));const Me=W?Pe(Yi,H.background.default,.985):wm(H.background.default,.98);or(H.SnackbarContent,"bg",Me),or(H.SnackbarContent,"color",qu(()=>W?KP.text.primary:H.getContrastText(Me))),or(H.SpeedDialAction,"fabHoverBg",wm(H.background.paper,.15)),or(H.StepConnector,"border",Le("palette-grey-600")),or(H.StepContent,"border",Le("palette-grey-600")),or(H.Switch,"defaultColor",Le("palette-grey-300")),or(H.Switch,"defaultDisabledColor",Le("palette-grey-600")),or(H.Switch,"primaryDisabledColor",Pe(Zi,H.primary.main,.55)),or(H.Switch,"secondaryDisabledColor",Pe(Zi,H.secondary.main,.55)),or(H.Switch,"errorDisabledColor",Pe(Zi,H.error.main,.55)),or(H.Switch,"infoDisabledColor",Pe(Zi,H.info.main,.55)),or(H.Switch,"successDisabledColor",Pe(Zi,H.success.main,.55)),or(H.Switch,"warningDisabledColor",Pe(Zi,H.warning.main,.55)),or(H.TableCell,"border",Pe(Zi,Pe(Eh,H.divider,1),.68)),or(H.Tooltip,"bg",Pe(Eh,H.grey[700],.92))}dc(H.background,"default"),dc(H.background,"paper"),dc(H.common,"background"),dc(H.common,"onBackground"),dc(H,"divider"),Object.keys(H).forEach(Me=>{const Ze=H[Me];Me!=="tonalOffset"&&Ze&&typeof Ze=="object"&&(Ze.main&&or(H[Me],"mainChannel",lp(up(Ze.main))),Ze.light&&or(H[Me],"lightChannel",lp(up(Ze.light))),Ze.dark&&or(H[Me],"darkChannel",lp(up(Ze.dark))),Ze.contrastText&&or(H[Me],"contrastTextChannel",lp(up(Ze.contrastText))),Me==="text"&&(dc(H[Me],"primary"),dc(H[Me],"secondary")),Me==="action"&&(Ze.active&&dc(H[Me],"active"),Ze.selected&&dc(H[Me],"selected")))})}),te=t.reduce((re,H)=>jl(re,H),te);const we={prefix:h,disableCssColorScheme:c,shouldSkipGeneratingVar:o,getSelector:EN(te),enableContrastVars:f},{vars:Te,generateThemeVars:me,generateStyleSheets:Ve}=Y6(te,we);return te.vars=Te,Object.entries(te.colorSchemes[te.defaultColorScheme]).forEach(([re,H])=>{te[re]=H}),te.generateThemeVars=me,te.generateStyleSheets=Ve,te.generateSpacing=function(){return LP(S.spacing,n2(this))},te.getColorSchemeSelector=X6(y),te.spacing=te.generateSpacing(),te.shouldSkipGeneratingVar=o,te.unstable_sxConfig={...Up,...S?.unstable_sxConfig},te.unstable_sx=function(H){return Xc({sx:H,theme:this})},te.toRuntimeSource=eI,te}function aS(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:p2({...n===!0?{}:n.palette,mode:t})})}function gd(e={},...t){const{palette:n,cssVariables:a=!1,colorSchemes:c=n?void 0:{light:!0},defaultColorScheme:h=n?.mode,...f}=e,o=h||"light",y=c?.[o],v={...c,...n?{[o]:{...typeof y!="boolean"&&y,palette:n}}:void 0};if(a===!1){if(!("colorSchemes"in e))return sb(e,...t);let S=n;"palette"in e||v[o]&&(v[o]!==!0?S=v[o].palette:o==="dark"&&(S={mode:"dark"}));const P=sb({...e,palette:S},...t);return P.defaultColorScheme=o,P.colorSchemes=v,P.palette.mode==="light"&&(P.colorSchemes.light={...v.light!==!0&&v.light,palette:P.palette},aS(P,"dark",v.dark)),P.palette.mode==="dark"&&(P.colorSchemes.dark={...v.dark!==!0&&v.dark,palette:P.palette},aS(P,"light",v.light)),P}return!n&&!("light"in v)&&o==="light"&&(v.light=!0),PN({...f,colorSchemes:v,defaultColorScheme:o,...typeof a!="boolean"&&a},...t)}const nI=gd();function IN(){const e=a2(nI);return process.env.NODE_ENV!=="production"&&Qt.useDebugValue(e),e[Yu]||e}function MN(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vg=e=>MN(e)&&e!=="classes",Rn=zP({themeId:Yu,defaultTheme:nI,rootShouldForwardProp:Vg});function LN({theme:e,...t}){const n=Yu in e?e[Yu]:void 0;return Pr.jsx(Cp,{...t,themeId:n?Yu:void 0,theme:n||e})}const Sm={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(ne.string,ne.string,ne.string,ne.string,ne.string,ne.oneOf(["dark","light","system"]),ne.string,ne.string);const{CssVarsProvider:DN}=G6({themeId:Yu,theme:()=>gd({cssVariables:!0}),colorSchemeStorageKey:Sm.colorSchemeStorageKey,modeStorageKey:Sm.modeStorageKey,defaultColorScheme:{light:Sm.defaultLightColorScheme,dark:Sm.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:QP(e.palette,e.typography)};return t.unstable_sx=function(a){return Xc({sx:a,theme:this})},t}}),kN=DN;function RN({theme:e,...t}){const n=Qt.useMemo(()=>{if(typeof e=="function")return e;const a=Yu in e?e[Yu]:e;return"colorSchemes"in a?null:"vars"in a?e:{...e,vars:null}},[e]);return n?Pr.jsx(LN,{theme:n,...t}):Pr.jsx(kN,{theme:e,...t})}const NN=gd({palette:{mode:"light"}});gd({palette:{mode:"dark"}});const ON=e=>({...NN,palette:{mode:e,primary:{main:"#009EE0"},secondary:{main:"#747577"},text:{primary:"#000",contrast:"#fff"},topToolbar:{barColor:"#fff"},navigation:{buttonColor:"#747577",navColor:"#fff",navHover:"#f5f5f5"},GPS:{GPSActiveColor:"#009EE0",GPSInactiveColor:"#747577",GPSActiveBackgroundColor:"#fff"},compass:{compColor:"#fff",compHover:"#f5f5f5",compStroke:"#009ee0",compNorth:"#cf003f",compSouth:"#d3dcf0"}}}),FN=e=>{const t=ON(["light","dark"].includes(e)?e:"light");return gd(t,{components:{MuiTypography:{styleOverrides:{root:{}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:t.palette.topToolbar.barColor}}},MuiButton:{variants:[{props:{variant:"navtools"},style:{minWidth:"20px",minHeight:"20px",fontWeight:600,[t.breakpoints.down("md")]:{width:"50px",height:"50px",fontSize:"1.4em"},[t.breakpoints.up("md")]:{width:"30px",height:"30px",fontSize:"1.2em"},color:t.palette.text.primary,backgroundColor:t.palette.navigation.navColor,borderRadius:"23%",margin:"0.15px",marginTop:"4px",":hover":{backgroundColor:t.palette.navigation.navHover}}}]},MuiListItemText:{styleOverrides:{primary:({ownerState:n})=>n?.variant==="layerlist"?{fontSize:"0.9rem"}:{},secondary:({ownerState:n})=>n?.variant==="layerlist"?{fontSize:"0.7rem"}:{}}}}})},BN={sourceOptions_tiles:["https://wms.wheregroup.com/tileserver/tile/world-0-14/{z}/{x}/{y}.pbf"]},us=[];for(let e=0;e<256;++e)us.push((e+256).toString(16).slice(1));function zN(e,t=0){return(us[e[t+0]]+us[e[t+1]]+us[e[t+2]]+us[e[t+3]]+"-"+us[e[t+4]]+us[e[t+5]]+"-"+us[e[t+6]]+us[e[t+7]]+"-"+us[e[t+8]]+us[e[t+9]]+"-"+us[e[t+10]]+us[e[t+11]]+us[e[t+12]]+us[e[t+13]]+us[e[t+14]]+us[e[t+15]]).toLowerCase()}let S0;const jN=new Uint8Array(16);function UN(){if(!S0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");S0=crypto.getRandomValues.bind(crypto)}return S0(jN)}const qN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sS={randomUUID:qN};function Pp(e,t,n){if(sS.randomUUID&&!e)return sS.randomUUID();e=e||{};const a=e.random??e.rng?.()??UN();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,zN(a)}const $N=_e.createContext({});function VN(e){const[t,n]=_e.useState([]),[a,c]=_e.useState([]),[h,f]=_e.useState([]),[o,y]=_e.useState(BN.sourceOptions_tiles[0]),v=_e.useMemo(()=>({layerId:"openmaptiles",sourceOptions:{type:"vector",tiles:[o]}}),[o]),S=N=>{if(!N)return;const z=[],U=[];N.layers.forEach((ee,ae)=>{ee.type==="symbol"?U.push(ee):(ae===0&&(ee.id=N.name||"background"),z.push(ee))}),c(z),f(U)};_e.useEffect(()=>{if(t.filter(N=>!N?.id).length){const N=[...t];N.forEach(z=>{z?.id||(z.id=Pp())}),n(N)}},[t]);const P=_e.useCallback((N,z)=>{const U=t?.filter?.(ee=>ee.id===N);if(U.length>0){const ee=[...t],ae=U[0],W=t.indexOf(ae),le=z(W);le>=0&&le<=t.length-1&&(ee.splice(W,1),ee.splice(le,0,ae),n(ee))}},[t]),M=_e.useCallback(N=>{P(N,z=>z+1)},[P]),E=_e.useCallback(N=>{P(N,z=>z-1)},[P]),O={layers:t,setLayers:n,backgroundLayers:a,setBackgroundLayers:c,symbolLayers:h,setSymbolLayers:f,updateStyle:S,vtLayerConfig:v,tileUrl:o,setTileUrl:y,moveUp:E,moveDown:M,moveLayer:P};return Pr.jsx($N.Provider,{value:O,children:e.children})}const Gg=_e.createContext({}),iI=({children:e})=>{const[t,n]=_e.useState(void 0),[a,c]=_e.useState([]),h=_e.useRef([]),f=_e.useRef({}),o=S=>{if(S){typeof f.current[S]<"u"&&delete f.current[S];const P=h.current.indexOf(S);P>-1&&h.current.splice(P,1),c([...h.current]),h.current.length===0&&t&&n(void 0)}else o("anonymous_map")},v={map:t,setMap:S=>{if(n(S),a.length===0){const P="anonymous_map";c([...a,P]),f.current[P]=S}},maps:f.current,mapIds:a,registerMap:(S,P)=>{S&&P&&(f.current[S]=P,h.current.push(S),c([...h.current]),(!t||t?.cancelled===!0)&&n(P))},removeMap:o,mapExists:S=>S&&Object.keys(f.current).indexOf(S)===-1?!1:!(!S&&!t),getMap:S=>S&&a.indexOf(S)!==-1?f.current[S]:!S&&t?t:null};return Pr.jsx(Gg.Provider,{value:v,children:Pr.jsx(VN,{children:Pr.jsx(RN,{theme:FN("light"),children:e})})})},oI={mapId:void 0,options:{center:{lng:8.607,lat:53.1409349},zoom:11,container:"",style:{version:8,name:"blank",center:[0,0],zoom:0,sources:{},sprite:"https://wms.wheregroup.com/tileserver/sprites/osm-bright",glyphs:"https://wms.wheregroup.com/tileserver/fonts/{fontstack}/{range}.pbf",layers:[{id:"_background",type:"background",paint:{"background-color":"rgba(0,0,0,0)"}}]}}},m2=e=>{const t=_e.useRef(null),n=_e.useRef(null),a=_e.useContext(Gg),c=_e.useRef(e.mapId),h=_e.useRef(!1),f=_e.useRef(e.options?.style);return _e.useEffect(()=>{const o=c.current;return()=>{h.current=!1,a.removeMap(o),t.current&&(t.current.map?.remove?.(),t.current.cancelled=!0,t.current=null)}},[]),_e.useEffect(()=>{h.current||n.current&&(h.current=!0,t.current=new ek({mapOptions:{style:"",...e.options,...e?.options?.style?{}:{style:oI?.options?.style},container:n.current},onReady:(o,y)=>{o.once("load",()=>{y?.cancelled?o.remove():(window._map=o,e.mapId?a.registerMap(e.mapId,y):a.setMap(y))})}}))},[e.options,e.mapId]),_e.useEffect(()=>{t.current?.map&&e?.options?.style&&f.current!==e.options.style&&(f.current=e.options.style,t.current.map.setStyle(e.options.style))},[e?.options?.style]),Pr.jsx("div",{ref:n,className:"mapContainer",style:e.style})};m2.defaultProps=oI;function aI(e){const t=_e.useContext(Gg),n=_e.useRef(!1),a=_e.useRef(null),[c,h]=_e.useState(),f=_e.useRef(void 0),[o,y]=_e.useState([]),v=_e.useRef(""),S=_e.useRef(Pp()),P=_e.useCallback(E=>!e?.filter?.includeBaseLayers&&E?.baseLayer?!1:typeof e.filter?.matchLayerIds<"u"?e.filter.matchLayerIds instanceof RegExp?e.filter.matchLayerIds.test(E.id):E.id.includes(e.filter.matchLayerIds):!0,[e.filter]),M=_e.useCallback(()=>{if(!a.current)return;const E=a.current.wrapper.layerState.filter(P),O=JSON.stringify(E);v.current!==O&&(v.current=O,y(E))},[P]);return _e.useEffect(()=>{const E=S.current;return()=>{a.current&&(a.current.cleanup(E),a.current=null),n.current=!1}},[]),_e.useEffect(()=>{if(!(!t.mapExists(e.mapId)||n.current)){if(n.current=!0,a.current=t.getMap(e.mapId),!a.current){n.current=!1;return}e?.watch?.viewport&&(h(a.current.wrapper.viewportState),a.current.wrapper.on("viewportchange",()=>{f.current!==a.current?.wrapper.viewportStateString&&h(a.current?.wrapper.viewportState)},S.current)),e?.watch?.layers&&(M(),a.current.wrapper.on("layerchange",M,{includeBaseLayers:e?.filter?.includeBaseLayers,matchLayerIds:e?.filter?.matchLayerIds},S.current))}},[t.mapIds,t,e.mapId,M,e]),{layers:o,viewport:c}}aI.defaultProps={mapId:void 0,watch:{layers:!0,sources:!1,viewport:!1},filter:{includeBaseLayers:!1}};function qp(e){const t=_e.useContext(Gg),[n,a]=_e.useState({map:void 0,ready:!1}),c=aI({mapId:e?.mapId,watch:{viewport:!1,layers:!!e?.waitForLayer,sources:!1},filter:{includeBaseLayers:!0}}),h=_e.useRef(null),f=_e.useRef(Pp()),o=()=>{h.current&&h.current.cleanup(f.current)};return _e.useEffect(()=>()=>{o(),h.current=null},[]),_e.useEffect(()=>{if(h.current&&h.current.cancelled===!0&&(h.current=null,a({map:void 0,ready:!1})),!(h.current||!t.mapExists(e?.mapId))){if(e?.waitForLayer){let y=!1;if(c?.layers?.forEach(v=>{v.id===e?.waitForLayer&&(y=!0)}),!y)return}h.current=t.getMap(e?.mapId),a({map:h.current,ready:!0})}},[t.mapIds,c.layers,t,e]),{map:n.map,mapIsReady:n.ready,componentId:f.current,layers:c.layers,cleanup:o}}const Ju=F6;process.env.NODE_ENV!=="production"&&(ne.node,ne.object.isRequired);function tu(e){return k6(e)}function GN(e){return yl("MuiSvgIcon",e)}zs("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HN=e=>{const{color:t,fontSize:n,classes:a}=e,c={root:["root",t!=="inherit"&&`color${Ei(t)}`,`fontSize${Ei(n)}`]};return eu(c,GN,a)},WN=Rn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ei(n.color)}`],t[`fontSize${Ei(n.fontSize)}`]]}})(Ju(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),lg=Qt.forwardRef(function(t,n){const a=tu({props:t,name:"MuiSvgIcon"}),{children:c,className:h,color:f="inherit",component:o="svg",fontSize:y="medium",htmlColor:v,inheritViewBox:S=!1,titleAccess:P,viewBox:M="0 0 24 24",...E}=a,O=Qt.isValidElement(c)&&c.type==="svg",N={...a,color:f,component:o,fontSize:y,instanceFontSize:t.fontSize,inheritViewBox:S,viewBox:M,hasSvgAsChild:O},z={};S||(z.viewBox=M);const U=HN(N);return Pr.jsxs(WN,{as:o,className:ro(U.root,h),focusable:"false",color:v,"aria-hidden":P?void 0:!0,role:P?"img":void 0,ref:n,...z,...E,...O&&c.props,ownerState:N,children:[O?c.props.children:c,P?Pr.jsx("title",{children:P}):null]})});process.env.NODE_ENV!=="production"&&(lg.propTypes={children:ne.node,classes:ne.object,className:ne.string,color:ne.oneOfType([ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ne.string]),component:ne.elementType,fontSize:ne.oneOfType([ne.oneOf(["inherit","large","medium","small"]),ne.string]),htmlColor:ne.string,inheritViewBox:ne.bool,shapeRendering:ne.string,sx:ne.oneOfType([ne.arrayOf(ne.oneOfType([ne.func,ne.object,ne.bool])),ne.func,ne.object]),titleAccess:ne.string,viewBox:ne.string});lg.muiName="SvgIcon";function g2(e,t){function n(a,c){return Pr.jsx(lg,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:c,...a,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=lg.muiName,Qt.memo(Qt.forwardRef(n))}function ZN(e){const{controlled:t,default:n,name:a,state:c="value"}=e,{current:h}=Qt.useRef(t!==void 0),[f,o]=Qt.useState(n),y=h?t:f;if(process.env.NODE_ENV!=="production"){Qt.useEffect(()=>{h!==(t!==void 0)&&console.error([`MUI: A component is changing the ${h?"":"un"}controlled ${c} state of ${a} to be ${h?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${a} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
877
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function CN(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const qu=e=>{try{return e()}catch{}},AN=(e="mui")=>H6(e);function w0(e,t,n,a,c){if(!n)return;n=n===!0?{}:n;const h=c==="dark"?"dark":"light";if(!a){t[c]=xN({...n,palette:{mode:h,...n?.palette},colorSpace:e});return}const{palette:f,...o}=sb({...a,palette:{mode:h,...n?.palette},colorSpace:e});return t[c]={...n,palette:f,opacity:{...tI(h),...n?.opacity},overlays:n?.overlays||rI(h)},o}function PN(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:a,disableCssColorScheme:c=!1,cssVarPrefix:h="mui",nativeColor:f=!1,shouldSkipGeneratingVar:o=wN,colorSchemeSelector:y=n.light&&n.dark?"media":void 0,rootSelector:v=":root",...S}=e,P=Object.keys(n)[0],M=a||(n.light&&P!=="light"?"light":P),E=AN(h),{[M]:O,light:N,dark:z,...U}=n,ee={...U};let ae=O;if((M==="dark"&&!("dark"in n)||M==="light"&&!("light"in n))&&(ae=!0),!ae)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${M}\` option is either missing or invalid.`:Yc(21,M));let W;f&&(W="oklch");const le=w0(W,ee,ae,S,M);N&&!ee.light&&w0(W,ee,N,void 0,"light"),z&&!ee.dark&&w0(W,ee,z,void 0,"dark");let te={defaultColorScheme:M,...le,cssVarPrefix:h,colorSchemeSelector:y,rootSelector:v,getCssVar:E,colorSchemes:ee,font:{...oN(le.typography),...le.font},spacing:CN(S.spacing)};Object.keys(te.colorSchemes).forEach(re=>{const H=te.colorSchemes[re].palette,Le=Me=>{const Ze=Me.split("-"),ut=Ze[1],ke=Ze[2];return E(Me,H[ut][ke])};H.mode==="light"&&(or(H.common,"background","#fff"),or(H.common,"onBackground","#000")),H.mode==="dark"&&(or(H.common,"background","#000"),or(H.common,"onBackground","#fff"));function Pe(Me,Ze,ut){if(W){let ke;return Me===Eh&&(ke=`transparent ${((1-ut)*100).toFixed(0)}%`),Me===Zi&&(ke=`#000 ${(ut*100).toFixed(0)}%`),Me===Yi&&(ke=`#fff ${(ut*100).toFixed(0)}%`),`color-mix(in ${W}, ${Ze}, ${ke})`}return Me(Ze,ut)}if(TN(H,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),H.mode==="light"){or(H.Alert,"errorColor",Pe(Zi,H.error.light,.6)),or(H.Alert,"infoColor",Pe(Zi,H.info.light,.6)),or(H.Alert,"successColor",Pe(Zi,H.success.light,.6)),or(H.Alert,"warningColor",Pe(Zi,H.warning.light,.6)),or(H.Alert,"errorFilledBg",Le("palette-error-main")),or(H.Alert,"infoFilledBg",Le("palette-info-main")),or(H.Alert,"successFilledBg",Le("palette-success-main")),or(H.Alert,"warningFilledBg",Le("palette-warning-main")),or(H.Alert,"errorFilledColor",qu(()=>H.getContrastText(H.error.main))),or(H.Alert,"infoFilledColor",qu(()=>H.getContrastText(H.info.main))),or(H.Alert,"successFilledColor",qu(()=>H.getContrastText(H.success.main))),or(H.Alert,"warningFilledColor",qu(()=>H.getContrastText(H.warning.main))),or(H.Alert,"errorStandardBg",Pe(Yi,H.error.light,.9)),or(H.Alert,"infoStandardBg",Pe(Yi,H.info.light,.9)),or(H.Alert,"successStandardBg",Pe(Yi,H.success.light,.9)),or(H.Alert,"warningStandardBg",Pe(Yi,H.warning.light,.9)),or(H.Alert,"errorIconColor",Le("palette-error-main")),or(H.Alert,"infoIconColor",Le("palette-info-main")),or(H.Alert,"successIconColor",Le("palette-success-main")),or(H.Alert,"warningIconColor",Le("palette-warning-main")),or(H.AppBar,"defaultBg",Le("palette-grey-100")),or(H.Avatar,"defaultBg",Le("palette-grey-400")),or(H.Button,"inheritContainedBg",Le("palette-grey-300")),or(H.Button,"inheritContainedHoverBg",Le("palette-grey-A100")),or(H.Chip,"defaultBorder",Le("palette-grey-400")),or(H.Chip,"defaultAvatarColor",Le("palette-grey-700")),or(H.Chip,"defaultIconColor",Le("palette-grey-700")),or(H.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),or(H.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),or(H.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),or(H.LinearProgress,"primaryBg",Pe(Yi,H.primary.main,.62)),or(H.LinearProgress,"secondaryBg",Pe(Yi,H.secondary.main,.62)),or(H.LinearProgress,"errorBg",Pe(Yi,H.error.main,.62)),or(H.LinearProgress,"infoBg",Pe(Yi,H.info.main,.62)),or(H.LinearProgress,"successBg",Pe(Yi,H.success.main,.62)),or(H.LinearProgress,"warningBg",Pe(Yi,H.warning.main,.62)),or(H.Skeleton,"bg",W?Pe(Eh,H.text.primary,.11):`rgba(${Le("palette-text-primaryChannel")} / 0.11)`),or(H.Slider,"primaryTrack",Pe(Yi,H.primary.main,.62)),or(H.Slider,"secondaryTrack",Pe(Yi,H.secondary.main,.62)),or(H.Slider,"errorTrack",Pe(Yi,H.error.main,.62)),or(H.Slider,"infoTrack",Pe(Yi,H.info.main,.62)),or(H.Slider,"successTrack",Pe(Yi,H.success.main,.62)),or(H.Slider,"warningTrack",Pe(Yi,H.warning.main,.62));const Me=W?Pe(Zi,H.background.default,.6825):wm(H.background.default,.8);or(H.SnackbarContent,"bg",Me),or(H.SnackbarContent,"color",qu(()=>W?ab.text.primary:H.getContrastText(Me))),or(H.SpeedDialAction,"fabHoverBg",wm(H.background.paper,.15)),or(H.StepConnector,"border",Le("palette-grey-400")),or(H.StepContent,"border",Le("palette-grey-400")),or(H.Switch,"defaultColor",Le("palette-common-white")),or(H.Switch,"defaultDisabledColor",Le("palette-grey-100")),or(H.Switch,"primaryDisabledColor",Pe(Yi,H.primary.main,.62)),or(H.Switch,"secondaryDisabledColor",Pe(Yi,H.secondary.main,.62)),or(H.Switch,"errorDisabledColor",Pe(Yi,H.error.main,.62)),or(H.Switch,"infoDisabledColor",Pe(Yi,H.info.main,.62)),or(H.Switch,"successDisabledColor",Pe(Yi,H.success.main,.62)),or(H.Switch,"warningDisabledColor",Pe(Yi,H.warning.main,.62)),or(H.TableCell,"border",Pe(Yi,Pe(Eh,H.divider,1),.88)),or(H.Tooltip,"bg",Pe(Eh,H.grey[700],.92))}if(H.mode==="dark"){or(H.Alert,"errorColor",Pe(Yi,H.error.light,.6)),or(H.Alert,"infoColor",Pe(Yi,H.info.light,.6)),or(H.Alert,"successColor",Pe(Yi,H.success.light,.6)),or(H.Alert,"warningColor",Pe(Yi,H.warning.light,.6)),or(H.Alert,"errorFilledBg",Le("palette-error-dark")),or(H.Alert,"infoFilledBg",Le("palette-info-dark")),or(H.Alert,"successFilledBg",Le("palette-success-dark")),or(H.Alert,"warningFilledBg",Le("palette-warning-dark")),or(H.Alert,"errorFilledColor",qu(()=>H.getContrastText(H.error.dark))),or(H.Alert,"infoFilledColor",qu(()=>H.getContrastText(H.info.dark))),or(H.Alert,"successFilledColor",qu(()=>H.getContrastText(H.success.dark))),or(H.Alert,"warningFilledColor",qu(()=>H.getContrastText(H.warning.dark))),or(H.Alert,"errorStandardBg",Pe(Zi,H.error.light,.9)),or(H.Alert,"infoStandardBg",Pe(Zi,H.info.light,.9)),or(H.Alert,"successStandardBg",Pe(Zi,H.success.light,.9)),or(H.Alert,"warningStandardBg",Pe(Zi,H.warning.light,.9)),or(H.Alert,"errorIconColor",Le("palette-error-main")),or(H.Alert,"infoIconColor",Le("palette-info-main")),or(H.Alert,"successIconColor",Le("palette-success-main")),or(H.Alert,"warningIconColor",Le("palette-warning-main")),or(H.AppBar,"defaultBg",Le("palette-grey-900")),or(H.AppBar,"darkBg",Le("palette-background-paper")),or(H.AppBar,"darkColor",Le("palette-text-primary")),or(H.Avatar,"defaultBg",Le("palette-grey-600")),or(H.Button,"inheritContainedBg",Le("palette-grey-800")),or(H.Button,"inheritContainedHoverBg",Le("palette-grey-700")),or(H.Chip,"defaultBorder",Le("palette-grey-700")),or(H.Chip,"defaultAvatarColor",Le("palette-grey-300")),or(H.Chip,"defaultIconColor",Le("palette-grey-300")),or(H.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),or(H.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),or(H.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),or(H.LinearProgress,"primaryBg",Pe(Zi,H.primary.main,.5)),or(H.LinearProgress,"secondaryBg",Pe(Zi,H.secondary.main,.5)),or(H.LinearProgress,"errorBg",Pe(Zi,H.error.main,.5)),or(H.LinearProgress,"infoBg",Pe(Zi,H.info.main,.5)),or(H.LinearProgress,"successBg",Pe(Zi,H.success.main,.5)),or(H.LinearProgress,"warningBg",Pe(Zi,H.warning.main,.5)),or(H.Skeleton,"bg",W?Pe(Eh,H.text.primary,.13):`rgba(${Le("palette-text-primaryChannel")} / 0.13)`),or(H.Slider,"primaryTrack",Pe(Zi,H.primary.main,.5)),or(H.Slider,"secondaryTrack",Pe(Zi,H.secondary.main,.5)),or(H.Slider,"errorTrack",Pe(Zi,H.error.main,.5)),or(H.Slider,"infoTrack",Pe(Zi,H.info.main,.5)),or(H.Slider,"successTrack",Pe(Zi,H.success.main,.5)),or(H.Slider,"warningTrack",Pe(Zi,H.warning.main,.5));const Me=W?Pe(Yi,H.background.default,.985):wm(H.background.default,.98);or(H.SnackbarContent,"bg",Me),or(H.SnackbarContent,"color",qu(()=>W?KP.text.primary:H.getContrastText(Me))),or(H.SpeedDialAction,"fabHoverBg",wm(H.background.paper,.15)),or(H.StepConnector,"border",Le("palette-grey-600")),or(H.StepContent,"border",Le("palette-grey-600")),or(H.Switch,"defaultColor",Le("palette-grey-300")),or(H.Switch,"defaultDisabledColor",Le("palette-grey-600")),or(H.Switch,"primaryDisabledColor",Pe(Zi,H.primary.main,.55)),or(H.Switch,"secondaryDisabledColor",Pe(Zi,H.secondary.main,.55)),or(H.Switch,"errorDisabledColor",Pe(Zi,H.error.main,.55)),or(H.Switch,"infoDisabledColor",Pe(Zi,H.info.main,.55)),or(H.Switch,"successDisabledColor",Pe(Zi,H.success.main,.55)),or(H.Switch,"warningDisabledColor",Pe(Zi,H.warning.main,.55)),or(H.TableCell,"border",Pe(Zi,Pe(Eh,H.divider,1),.68)),or(H.Tooltip,"bg",Pe(Eh,H.grey[700],.92))}dc(H.background,"default"),dc(H.background,"paper"),dc(H.common,"background"),dc(H.common,"onBackground"),dc(H,"divider"),Object.keys(H).forEach(Me=>{const Ze=H[Me];Me!=="tonalOffset"&&Ze&&typeof Ze=="object"&&(Ze.main&&or(H[Me],"mainChannel",lp(up(Ze.main))),Ze.light&&or(H[Me],"lightChannel",lp(up(Ze.light))),Ze.dark&&or(H[Me],"darkChannel",lp(up(Ze.dark))),Ze.contrastText&&or(H[Me],"contrastTextChannel",lp(up(Ze.contrastText))),Me==="text"&&(dc(H[Me],"primary"),dc(H[Me],"secondary")),Me==="action"&&(Ze.active&&dc(H[Me],"active"),Ze.selected&&dc(H[Me],"selected")))})}),te=t.reduce((re,H)=>jl(re,H),te);const we={prefix:h,disableCssColorScheme:c,shouldSkipGeneratingVar:o,getSelector:EN(te),enableContrastVars:f},{vars:Te,generateThemeVars:me,generateStyleSheets:Ve}=Y6(te,we);return te.vars=Te,Object.entries(te.colorSchemes[te.defaultColorScheme]).forEach(([re,H])=>{te[re]=H}),te.generateThemeVars=me,te.generateStyleSheets=Ve,te.generateSpacing=function(){return LP(S.spacing,n2(this))},te.getColorSchemeSelector=X6(y),te.spacing=te.generateSpacing(),te.shouldSkipGeneratingVar=o,te.unstable_sxConfig={...Up,...S?.unstable_sxConfig},te.unstable_sx=function(H){return Xc({sx:H,theme:this})},te.toRuntimeSource=eI,te}function aS(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:p2({...n===!0?{}:n.palette,mode:t})})}function gd(e={},...t){const{palette:n,cssVariables:a=!1,colorSchemes:c=n?void 0:{light:!0},defaultColorScheme:h=n?.mode,...f}=e,o=h||"light",y=c?.[o],v={...c,...n?{[o]:{...typeof y!="boolean"&&y,palette:n}}:void 0};if(a===!1){if(!("colorSchemes"in e))return sb(e,...t);let S=n;"palette"in e||v[o]&&(v[o]!==!0?S=v[o].palette:o==="dark"&&(S={mode:"dark"}));const P=sb({...e,palette:S},...t);return P.defaultColorScheme=o,P.colorSchemes=v,P.palette.mode==="light"&&(P.colorSchemes.light={...v.light!==!0&&v.light,palette:P.palette},aS(P,"dark",v.dark)),P.palette.mode==="dark"&&(P.colorSchemes.dark={...v.dark!==!0&&v.dark,palette:P.palette},aS(P,"light",v.light)),P}return!n&&!("light"in v)&&o==="light"&&(v.light=!0),PN({...f,colorSchemes:v,defaultColorScheme:o,...typeof a!="boolean"&&a},...t)}const nI=gd();function IN(){const e=a2(nI);return process.env.NODE_ENV!=="production"&&Qt.useDebugValue(e),e[Yu]||e}function MN(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Vg=e=>MN(e)&&e!=="classes",Rn=zP({themeId:Yu,defaultTheme:nI,rootShouldForwardProp:Vg});function LN({theme:e,...t}){const n=Yu in e?e[Yu]:void 0;return Pr.jsx(Cp,{...t,themeId:n?Yu:void 0,theme:n||e})}const Sm={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(ne.string,ne.string,ne.string,ne.string,ne.string,ne.oneOf(["dark","light","system"]),ne.string,ne.string);const{CssVarsProvider:DN}=G6({themeId:Yu,theme:()=>gd({cssVariables:!0}),colorSchemeStorageKey:Sm.colorSchemeStorageKey,modeStorageKey:Sm.modeStorageKey,defaultColorScheme:{light:Sm.defaultLightColorScheme,dark:Sm.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:QP(e.palette,e.typography)};return t.unstable_sx=function(a){return Xc({sx:a,theme:this})},t}}),kN=DN;function RN({theme:e,...t}){const n=Qt.useMemo(()=>{if(typeof e=="function")return e;const a=Yu in e?e[Yu]:e;return"colorSchemes"in a?null:"vars"in a?e:{...e,vars:null}},[e]);return n?Pr.jsx(LN,{theme:n,...t}):Pr.jsx(kN,{theme:e,...t})}const NN=gd({palette:{mode:"light"}});gd({palette:{mode:"dark"}});const ON=e=>({...NN,palette:{mode:e,primary:{main:"#009EE0"},secondary:{main:"#747577"},text:{primary:"#000",contrast:"#fff"},topToolbar:{barColor:"#fff"},navigation:{buttonColor:"#747577",navColor:"#fff",navHover:"#f5f5f5"},GPS:{GPSActiveColor:"#009EE0",GPSInactiveColor:"#747577",GPSActiveBackgroundColor:"#fff"},compass:{compColor:"#fff",compHover:"#f5f5f5",compStroke:"#009ee0",compNorth:"#cf003f",compSouth:"#d3dcf0"}}}),FN=e=>{const t=ON(["light","dark"].includes(e)?e:"light");return gd(t,{components:{MuiTypography:{styleOverrides:{root:{}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:t.palette.topToolbar.barColor}}},MuiButton:{variants:[{props:{variant:"navtools"},style:{minWidth:"20px",minHeight:"20px",fontWeight:600,[t.breakpoints.down("md")]:{width:"50px",height:"50px",fontSize:"1.4em"},[t.breakpoints.up("md")]:{width:"30px",height:"30px",fontSize:"1.2em"},color:t.palette.text.primary,backgroundColor:t.palette.navigation.navColor,borderRadius:"23%",margin:"0.15px",marginTop:"4px",":hover":{backgroundColor:t.palette.navigation.navHover}}}]},MuiListItemText:{styleOverrides:{primary:({ownerState:n})=>n?.variant==="layerlist"?{fontSize:"0.9rem"}:{},secondary:({ownerState:n})=>n?.variant==="layerlist"?{fontSize:"0.7rem"}:{}}}}})},BN={sourceOptions_tiles:["https://wms.wheregroup.com/tileserver/tile/world-0-14/{z}/{x}/{y}.pbf"]},us=[];for(let e=0;e<256;++e)us.push((e+256).toString(16).slice(1));function zN(e,t=0){return(us[e[t+0]]+us[e[t+1]]+us[e[t+2]]+us[e[t+3]]+"-"+us[e[t+4]]+us[e[t+5]]+"-"+us[e[t+6]]+us[e[t+7]]+"-"+us[e[t+8]]+us[e[t+9]]+"-"+us[e[t+10]]+us[e[t+11]]+us[e[t+12]]+us[e[t+13]]+us[e[t+14]]+us[e[t+15]]).toLowerCase()}let S0;const jN=new Uint8Array(16);function UN(){if(!S0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");S0=crypto.getRandomValues.bind(crypto)}return S0(jN)}const qN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sS={randomUUID:qN};function Pp(e,t,n){if(sS.randomUUID&&!e)return sS.randomUUID();e=e||{};const a=e.random??e.rng?.()??UN();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,zN(a)}const $N=_e.createContext({});function VN(e){const[t,n]=_e.useState([]),[a,c]=_e.useState([]),[h,f]=_e.useState([]),[o,y]=_e.useState(BN.sourceOptions_tiles[0]),v=_e.useMemo(()=>({layerId:"openmaptiles",sourceOptions:{type:"vector",tiles:[o]}}),[o]),S=N=>{if(!N)return;const z=[],U=[];N.layers.forEach((ee,ae)=>{ee.type==="symbol"?U.push(ee):(ae===0&&(ee.id=N.name||"background"),z.push(ee))}),c(z),f(U)};_e.useEffect(()=>{if(t.filter(N=>!N?.id).length){const N=[...t];N.forEach(z=>{z?.id||(z.id=Pp())}),n(N)}},[t]);const P=_e.useCallback((N,z)=>{const U=t?.filter?.(ee=>ee.id===N);if(U.length>0){const ee=[...t],ae=U[0],W=t.indexOf(ae),le=z(W);le>=0&&le<=t.length-1&&(ee.splice(W,1),ee.splice(le,0,ae),n(ee))}},[t]),M=_e.useCallback(N=>{P(N,z=>z+1)},[P]),E=_e.useCallback(N=>{P(N,z=>z-1)},[P]),O={layers:t,setLayers:n,backgroundLayers:a,setBackgroundLayers:c,symbolLayers:h,setSymbolLayers:f,updateStyle:S,vtLayerConfig:v,tileUrl:o,setTileUrl:y,moveUp:E,moveDown:M,moveLayer:P};return Pr.jsx($N.Provider,{value:O,children:e.children})}const Gg=_e.createContext({}),iI=({children:e})=>{const[t,n]=_e.useState(void 0),[a,c]=_e.useState([]),h=_e.useRef([]),f=_e.useRef({}),o=S=>{if(S){typeof f.current[S]<"u"&&delete f.current[S];const P=h.current.indexOf(S);P>-1&&h.current.splice(P,1),c([...h.current]),h.current.length===0&&t&&n(void 0)}else o("anonymous_map")},v={map:t,setMap:S=>{if(n(S),a.length===0){const P="anonymous_map";c([...a,P]),f.current[P]=S}},maps:f.current,mapIds:a,registerMap:(S,P)=>{S&&P&&(f.current[S]=P,h.current.push(S),c([...h.current]),(!t||t?.cancelled===!0)&&n(P))},removeMap:o,mapExists:S=>S&&Object.keys(f.current).indexOf(S)===-1?!1:!(!S&&!t),getMap:S=>S&&a.indexOf(S)!==-1?f.current[S]:!S&&t?t:null};return Pr.jsx(Gg.Provider,{value:v,children:Pr.jsx(VN,{children:Pr.jsx(RN,{theme:FN("light"),children:e})})})},oI={mapId:void 0,options:{center:{lng:8.607,lat:53.1409349},zoom:11,container:"",style:{version:8,name:"blank",center:[0,0],zoom:0,sources:{},sprite:"https://wms.wheregroup.com/tileserver/sprites/osm-bright",glyphs:"https://wms.wheregroup.com/tileserver/fonts/{fontstack}/{range}.pbf",layers:[{id:"_background",type:"background",paint:{"background-color":"rgba(0,0,0,0)"}}]}}},m2=e=>{const t=_e.useRef(null),n=_e.useRef(null),a=_e.useContext(Gg),c=_e.useRef(e.mapId),h=_e.useRef(!1),f=_e.useRef(e.options?.style);return _e.useEffect(()=>{const o=c.current;return()=>{h.current=!1,a.removeMap(o),t.current&&(t.current.map?.remove?.(),t.current.cancelled=!0,t.current=null)}},[]),_e.useEffect(()=>{h.current||n.current&&(h.current=!0,e?.options?.style&&(f.current=JSON.stringify(e.options.style)),t.current=new ek({mapOptions:{style:"",...e.options,...e?.options?.style?{}:{style:oI?.options?.style},container:n.current},onReady:(o,y)=>{o.once("load",()=>{y?.cancelled?o.remove():(window._map=o,e.mapId?a.registerMap(e.mapId,y):a.setMap(y))})}}))},[e.options,e.mapId]),_e.useEffect(()=>{if(t.current?.map&&e?.options?.style){const o=JSON.stringify(e.options.style);f.current!==o&&(f.current=o,t.current.map.setStyle(e.options.style))}},[e?.options?.style]),Pr.jsx("div",{ref:n,className:"mapContainer",style:e.style})};m2.defaultProps=oI;function aI(e){const t=_e.useContext(Gg),n=_e.useRef(!1),a=_e.useRef(null),[c,h]=_e.useState(),f=_e.useRef(void 0),[o,y]=_e.useState([]),v=_e.useRef(""),S=_e.useRef(Pp()),P=_e.useCallback(E=>!e?.filter?.includeBaseLayers&&E?.baseLayer?!1:typeof e.filter?.matchLayerIds<"u"?e.filter.matchLayerIds instanceof RegExp?e.filter.matchLayerIds.test(E.id):E.id.includes(e.filter.matchLayerIds):!0,[e.filter]),M=_e.useCallback(()=>{if(!a.current)return;const E=a.current.wrapper.layerState.filter(P),O=JSON.stringify(E);v.current!==O&&(v.current=O,y(E))},[P]);return _e.useEffect(()=>{const E=S.current;return()=>{a.current&&(a.current.cleanup(E),a.current=null),n.current=!1}},[]),_e.useEffect(()=>{if(!(!t.mapExists(e.mapId)||n.current)){if(n.current=!0,a.current=t.getMap(e.mapId),!a.current){n.current=!1;return}e?.watch?.viewport&&(h(a.current.wrapper.viewportState),a.current.wrapper.on("viewportchange",()=>{f.current!==a.current?.wrapper.viewportStateString&&h(a.current?.wrapper.viewportState)},S.current)),e?.watch?.layers&&(M(),a.current.wrapper.on("layerchange",M,{includeBaseLayers:e?.filter?.includeBaseLayers,matchLayerIds:e?.filter?.matchLayerIds},S.current))}},[t.mapIds,t,e.mapId,M,e]),{layers:o,viewport:c}}aI.defaultProps={mapId:void 0,watch:{layers:!0,sources:!1,viewport:!1},filter:{includeBaseLayers:!1}};function qp(e){const t=_e.useContext(Gg),[n,a]=_e.useState({map:void 0,ready:!1}),c=aI({mapId:e?.mapId,watch:{viewport:!1,layers:!!e?.waitForLayer,sources:!1},filter:{includeBaseLayers:!0}}),h=_e.useRef(null),f=_e.useRef(Pp()),o=()=>{h.current&&h.current.cleanup(f.current)};return _e.useEffect(()=>()=>{o(),h.current=null},[]),_e.useEffect(()=>{if(h.current&&h.current.cancelled===!0&&(h.current=null,a({map:void 0,ready:!1})),!(h.current||!t.mapExists(e?.mapId))){if(e?.waitForLayer){let y=!1;if(c?.layers?.forEach(v=>{v.id===e?.waitForLayer&&(y=!0)}),!y)return}h.current=t.getMap(e?.mapId),a({map:h.current,ready:!0})}},[t.mapIds,c.layers,t,e]),{map:n.map,mapIsReady:n.ready,componentId:f.current,layers:c.layers,cleanup:o}}const Ju=F6;process.env.NODE_ENV!=="production"&&(ne.node,ne.object.isRequired);function tu(e){return k6(e)}function GN(e){return yl("MuiSvgIcon",e)}zs("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const HN=e=>{const{color:t,fontSize:n,classes:a}=e,c={root:["root",t!=="inherit"&&`color${Ei(t)}`,`fontSize${Ei(n)}`]};return eu(c,GN,a)},WN=Rn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ei(n.color)}`],t[`fontSize${Ei(n.fontSize)}`]]}})(Ju(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),lg=Qt.forwardRef(function(t,n){const a=tu({props:t,name:"MuiSvgIcon"}),{children:c,className:h,color:f="inherit",component:o="svg",fontSize:y="medium",htmlColor:v,inheritViewBox:S=!1,titleAccess:P,viewBox:M="0 0 24 24",...E}=a,O=Qt.isValidElement(c)&&c.type==="svg",N={...a,color:f,component:o,fontSize:y,instanceFontSize:t.fontSize,inheritViewBox:S,viewBox:M,hasSvgAsChild:O},z={};S||(z.viewBox=M);const U=HN(N);return Pr.jsxs(WN,{as:o,className:ro(U.root,h),focusable:"false",color:v,"aria-hidden":P?void 0:!0,role:P?"img":void 0,ref:n,...z,...E,...O&&c.props,ownerState:N,children:[O?c.props.children:c,P?Pr.jsx("title",{children:P}):null]})});process.env.NODE_ENV!=="production"&&(lg.propTypes={children:ne.node,classes:ne.object,className:ne.string,color:ne.oneOfType([ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ne.string]),component:ne.elementType,fontSize:ne.oneOfType([ne.oneOf(["inherit","large","medium","small"]),ne.string]),htmlColor:ne.string,inheritViewBox:ne.bool,shapeRendering:ne.string,sx:ne.oneOfType([ne.arrayOf(ne.oneOfType([ne.func,ne.object,ne.bool])),ne.func,ne.object]),titleAccess:ne.string,viewBox:ne.string});lg.muiName="SvgIcon";function g2(e,t){function n(a,c){return Pr.jsx(lg,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:c,...a,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=lg.muiName,Qt.memo(Qt.forwardRef(n))}function ZN(e){const{controlled:t,default:n,name:a,state:c="value"}=e,{current:h}=Qt.useRef(t!==void 0),[f,o]=Qt.useState(n),y=h?t:f;if(process.env.NODE_ENV!=="production"){Qt.useEffect(()=>{h!==(t!==void 0)&&console.error([`MUI: A component is changing the ${h?"":"un"}controlled ${c} state of ${a} to be ${h?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${a} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
878
878
|
`))},[c,a,t]);const{current:S}=Qt.useRef(n);Qt.useEffect(()=>{!h&&JSON.stringify(n)!==JSON.stringify(S)&&console.error([`MUI: A component is changing the default ${c} state of an uncontrolled ${a} after being initialized. To suppress this warning opt to use a controlled ${a}.`].join(`
|
|
879
879
|
`))},[JSON.stringify(n)])}const v=Qt.useCallback(S=>{h||o(S)},[]);return[y,v]}function Hm(e){const t=Qt.useRef(e);return jg(()=>{t.current=e}),Qt.useRef((...n)=>(0,t.current)(...n)).current}function ug(...e){const t=Qt.useRef(void 0),n=Qt.useCallback(a=>{const c=e.map(h=>{if(h==null)return null;if(typeof h=="function"){const f=h,o=f(a);return typeof o=="function"?o:()=>{f(null)}}return h.current=a,()=>{h.current=null}});return()=>{c.forEach(h=>h?.())}},e);return Qt.useMemo(()=>e.every(a=>a==null)?null:a=>{t.current&&(t.current(),t.current=void 0),a!=null&&(t.current=n(a))},e)}function YN(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function XN(e,t){if(!e)return t;function n(f,o){const y={};return Object.keys(o).forEach(v=>{YN(v,o[v])&&typeof f[v]=="function"&&(y[v]=(...S)=>{f[v](...S),o[v](...S)})}),y}if(typeof e=="function"||typeof t=="function")return f=>{const o=typeof t=="function"?t(f):t,y=typeof e=="function"?e({...f,...o}):e,v=ro(f?.className,o?.className,y?.className),S=n(y,o);return{...o,...y,...S,...!!v&&{className:v},...o?.style&&y?.style&&{style:{...o.style,...y.style}},...o?.sx&&y?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(y.sx)?y.sx:[y.sx]]}}};const a=t,c=n(e,a),h=ro(a?.className,e?.className);return{...t,...e,...c,...!!h&&{className:h},...a?.style&&e?.style&&{style:{...a.style,...e.style}},...a?.sx&&e?.sx&&{sx:[...Array.isArray(a.sx)?a.sx:[a.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function $p(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...a){return e(...a)||t(...a)}}function KN(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function ub(e,t){return ub=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ub(e,t)}function JN(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ub(e,t)}const lS=_e.createContext(null);function QN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y2(e,t){var n=function(h){return t&&_e.isValidElement(h)?t(h):h},a=Object.create(null);return e&&_e.Children.map(e,function(c){return c}).forEach(function(c){a[c.key]=n(c)}),a}function eO(e,t){e=e||{},t=t||{};function n(S){return S in t?t[S]:e[S]}var a=Object.create(null),c=[];for(var h in e)h in t?c.length&&(a[h]=c,c=[]):c.push(h);var f,o={};for(var y in t){if(a[y])for(f=0;f<a[y].length;f++){var v=a[y][f];o[a[y][f]]=n(v)}o[y]=n(y)}for(f=0;f<c.length;f++)o[c[f]]=n(c[f]);return o}function Rh(e,t,n){return n[t]!=null?n[t]:e.props[t]}function tO(e,t){return y2(e.children,function(n){return _e.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Rh(n,"appear",e),enter:Rh(n,"enter",e),exit:Rh(n,"exit",e)})})}function rO(e,t,n){var a=y2(e.children),c=eO(t,a);return Object.keys(c).forEach(function(h){var f=c[h];if(_e.isValidElement(f)){var o=h in t,y=h in a,v=t[h],S=_e.isValidElement(v)&&!v.props.in;y&&(!o||S)?c[h]=_e.cloneElement(f,{onExited:n.bind(null,f),in:!0,exit:Rh(f,"exit",e),enter:Rh(f,"enter",e)}):!y&&o&&!S?c[h]=_e.cloneElement(f,{in:!1}):y&&o&&_e.isValidElement(v)&&(c[h]=_e.cloneElement(f,{onExited:n.bind(null,f),in:v.props.in,exit:Rh(f,"exit",e),enter:Rh(f,"enter",e)}))}}),c}var nO=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},iO={component:"div",childFactory:function(t){return t}},_2=(function(e){JN(t,e);function t(a,c){var h;h=e.call(this,a,c)||this;var f=h.handleExited.bind(QN(h));return h.state={contextValue:{isMounting:!0},handleExited:f,firstRender:!0},h}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(c,h){var f=h.children,o=h.handleExited,y=h.firstRender;return{children:y?tO(c,o):rO(c,f,o),firstRender:!1}},n.handleExited=function(c,h){var f=y2(this.props.children);c.key in f||(c.props.onExited&&c.props.onExited(h),this.mounted&&this.setState(function(o){var y=rg({},o.children);return delete y[c.key],{children:y}}))},n.render=function(){var c=this.props,h=c.component,f=c.childFactory,o=KN(c,["component","childFactory"]),y=this.state.contextValue,v=nO(this.state.children).map(f);return delete o.appear,delete o.enter,delete o.exit,h===null?_e.createElement(lS.Provider,{value:y},v):_e.createElement(lS.Provider,{value:y},_e.createElement(h,o,v))},t})(_e.Component);_2.propTypes=process.env.NODE_ENV!=="production"?{component:ne.any,children:ne.node,appear:ne.bool,enter:ne.bool,exit:ne.bool,childFactory:ne.func}:{};_2.defaultProps=iO;const uS={};function sI(e,t){const n=Qt.useRef(uS);return n.current===uS&&(n.current=e(t)),n}const oO=[];function aO(e){Qt.useEffect(e,oO)}class v2{static create(){return new v2}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function sO(){const e=sI(v2.create).current;return aO(e.disposeEffect),e}function lO(e){const{prototype:t={}}=e;return!!t.isReactComponent}function uO(e,t,n,a,c){const h=e[t],f=c||t;if(h==null||typeof window>"u")return null;let o;return typeof h=="function"&&!lO(h)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${a} \`${f}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const lI=$p(ne.elementType,uO);function cO(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function uI(e,t,n,a){const c=e[t];if(c==null||!Number.isInteger(c)){const h=cO(c);return new RangeError(`Invalid ${a} \`${t}\` of type \`${h}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function cI(e,t,n,a){return e[t]===void 0?null:uI(e,t,n,a)}function cb(){return null}cI.isRequired=uI;cb.isRequired=cb;const hO=process.env.NODE_ENV==="production"?cb:cI;function fO(e){return yl("MuiPaper",e)}zs("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const dO=e=>{const{square:t,elevation:n,variant:a,classes:c}=e,h={root:["root",a,!t&&"rounded",a==="elevation"&&`elevation${n}`]};return eu(h,fO,c)},pO=Rn("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ju(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),b2=Qt.forwardRef(function(t,n){const a=tu({props:t,name:"MuiPaper"}),c=IN(),{className:h,component:f="div",elevation:o=1,square:y=!1,variant:v="elevation",...S}=a,P={...a,component:f,elevation:o,square:y,variant:v},M=dO(P);return process.env.NODE_ENV!=="production"&&c.shadows[o]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${o}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${o}]\` is defined.`].join(`
|
|
880
880
|
`)),Pr.jsx(pO,{as:f,ownerState:P,className:ro(M.root,h),ref:n,...S,style:{...v==="elevation"&&{"--Paper-shadow":(c.vars||c).shadows[o],...c.vars&&{"--Paper-overlay":c.vars.overlays?.[o]},...!c.vars&&c.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${ag("#fff",lb(o))}, ${ag("#fff",lb(o))})`}},...S.style}})});process.env.NODE_ENV!=="production"&&(b2.propTypes={children:ne.node,classes:ne.object,className:ne.string,component:ne.elementType,elevation:$p(hO,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:ne.bool,style:ne.object,sx:ne.oneOfType([ne.arrayOf(ne.oneOfType([ne.func,ne.object,ne.bool])),ne.func,ne.object]),variant:ne.oneOfType([ne.oneOf(["elevation","outlined"]),ne.string])});function hb(e){return typeof e=="string"}function mO(e,t,n){return e===void 0||hb(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function gO(e,t,n){return typeof e=="function"?e(t,n):e}function yO(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(a=>a.match(/^on[A-Z]/)&&typeof e[a]=="function"&&!t.includes(a)).forEach(a=>{n[a]=e[a]}),n}function cS(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function _O(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:c,className:h}=e;if(!t){const E=ro(n?.className,h,c?.className,a?.className),O={...n?.style,...c?.style,...a?.style},N={...n,...c,...a};return E.length>0&&(N.className=E),Object.keys(O).length>0&&(N.style=O),{props:N,internalRef:void 0}}const f=yO({...c,...a}),o=cS(a),y=cS(c),v=t(f),S=ro(v?.className,n?.className,h,c?.className,a?.className),P={...v?.style,...n?.style,...c?.style,...a?.style},M={...v,...n,...y,...o};return S.length>0&&(M.className=S),Object.keys(P).length>0&&(M.style=P),{props:M,internalRef:v.ref}}function fb(e,t){const{className:n,elementType:a,ownerState:c,externalForwardedProps:h,internalForwardedProps:f,shouldForwardComponentProp:o=!1,...y}=t,{component:v,slots:S={[e]:void 0},slotProps:P={[e]:void 0},...M}=h,E=S[e]||a,O=gO(P[e],c),{props:{component:N,...z},internalRef:U}=_O({className:n,...y,externalForwardedProps:e==="root"?M:void 0,externalSlotProps:O}),ee=ug(U,O?.ref,t.ref),ae=e==="root"?N||v:N,W=mO(E,{...e==="root"&&!v&&!S[e]&&f,...e!=="root"&&!S[e]&&f,...z,...ae&&!o&&{as:ae},...ae&&o&&{component:ae},ref:ee},c);return[E,W]}const hI=ne.oneOfType([ne.func,ne.object]);function hS(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
@@ -1142,7 +1142,7 @@ T* `):B.join(` Tj
|
|
|
1142
1142
|
endobj\r
|
|
1143
1143
|
`},n.outline.count_r=function(a,c){for(var h=0;h<c.children.length;h++)a.count++,this.count_r(a,c.children[h]);return a.count}}])})(Cn.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,a,c,h,f,o){var y,v=this.decode.DCT_DECODE,S=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=f||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,y=(function(P){for(var M,E=256*P.charCodeAt(4)+P.charCodeAt(5),O=P.length,N={width:0,height:0,numcomponents:1},z=4;z<O;z+=2){if(z+=E,t.indexOf(P.charCodeAt(z+1))!==-1){M=256*P.charCodeAt(z+5)+P.charCodeAt(z+6),N={width:256*P.charCodeAt(z+7)+P.charCodeAt(z+8),height:M,numcomponents:P.charCodeAt(z+9)};break}E=256*P.charCodeAt(z+2)+P.charCodeAt(z+3)}return N})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),y.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}S={data:n,width:y.width,height:y.height,colorSpace:o,bitsPerComponent:8,filter:v,index:a,alias:c}}return S}})(Cn.API),Cn.API.processPNG=function(e,t,n,a){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var c,h=kB(e,{checkCrc:!0}),f=h.width,o=h.height,y=h.channels,v=h.palette,S=h.depth;c=v&&y===1?(function(we){for(var Te=we.width,me=we.height,Ve=we.data,re=we.palette,H=we.depth,Le=!1,Pe=[],Me=[],Ze=void 0,ut=!1,ke=0,Xe=0;Xe<re.length;Xe++){var ge=vS(re[Xe],4),Re=ge[0],J=ge[1],fe=ge[2],xe=ge[3];Pe.push(Re,J,fe),xe!=null&&(xe===0?(ke++,Me.length<1&&Me.push(Xe)):xe<255&&(ut=!0))}if(ut||ke>1){Le=!0,Me=void 0;var Ie=Te*me;Ze=new Uint8Array(Ie);for(var Fe=new DataView(Ve.buffer),ot=0;ot<Ie;ot++){var Et=V0(Fe,ot,H),gt=vS(re[Et],4)[3];Ze[ot]=gt}}return{colorSpace:"Indexed",colorsPerPixel:1,colorBytes:Ve,alphaBytes:Ze,needSMask:Le,palette:Pe,mask:Me}})(h):y===2||y===4?(function(we){for(var Te=we.data,me=we.width,Ve=we.height,re=we.channels,H=we.depth,Le=re===2?"DeviceGray":"DeviceRGB",Pe=re-1,Me=me*Ve,Ze=Pe,ut=Me*Ze,ke=1*Me,Xe=Math.ceil(ut*H/8),ge=Math.ceil(ke*H/8),Re=new Uint8Array(Xe),J=new Uint8Array(ge),fe=new DataView(Te.buffer),xe=new DataView(Re.buffer),Ie=new DataView(J.buffer),Fe=!1,ot=0;ot<Me;ot++){for(var Et=ot*re,gt=0;gt<Ze;gt++)EE(xe,V0(fe,Et+gt,H),ot*Ze+gt,H);var wt=V0(fe,Et+Ze,H);wt<(1<<H)-1&&(Fe=!0),EE(Ie,wt,1*ot,H)}return{colorSpace:Le,colorsPerPixel:Pe,colorBytes:Re,alphaBytes:J,needSMask:Fe}})(h):(function(we){var Te=we.data,me=we.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:me,colorsPerPixel:me==="DeviceGray"?1:3,colorBytes:Te instanceof Uint8Array?Te:new Uint8Array(Te.buffer),needSMask:!1}})(h);var P,M,E,O=c,N=O.colorSpace,z=O.colorsPerPixel,U=O.colorBytes,ee=O.alphaBytes,ae=O.needSMask,W=O.palette,le=O.mask,te=null;return a!==Cn.API.image_compression.NONE&&typeof vb=="function"?(te=(function(we){var Te;switch(we){case Cn.API.image_compression.FAST:Te=11;break;case Cn.API.image_compression.MEDIUM:Te=13;break;case Cn.API.image_compression.SLOW:Te=14;break;default:Te=12}return Te})(a),P=this.decode.FLATE_DECODE,M="/Predictor ".concat(te," "),e=vE(U,f*z,z,a),ae&&(E=vE(ee,f,1,a))):(P=void 0,M="",e=U,ae&&(E=ee)),M+="/Colors ".concat(z," /BitsPerComponent ").concat(S," /Columns ").concat(f),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(E&&this.__addimage__.isArrayBuffer(E)||this.__addimage__.isArrayBufferView(E))&&(E=this.__addimage__.arrayBufferToBinaryString(E)),{alias:n,data:e,index:t,filter:P,decodeParameters:M,transparency:le,palette:W,sMask:E,predictor:te,width:f,height:o,bitsPerComponent:S,colorSpace:N}}},(function(e){e.processGIF89A=function(t,n,a,c){var h=new ez(t),f=h.width,o=h.height,y=[];h.decodeAndBlitFrameRGBA(0,y);var v={data:y,width:f,height:o},S=new G0(100).encode(v,100);return e.processJPEG.call(this,S,n,a,c)},e.processGIF87A=e.processGIF89A})(Cn.API),vu.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),h=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:c,green:a,blue:n,quad:h}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},vu.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(n){co.log("bit decode error:"+n)}},vu.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var a=this.bottom_up?e:this.height-1-e,c=0;c<t;c++)for(var h=this.datav.getUint8(this.pos++,!0),f=a*this.width*4+8*c*4,o=0;o<8&&8*c+o<this.width;o++){var y=this.palette[h>>7-o&1];this.data[f+4*o]=y.blue,this.data[f+4*o+1]=y.green,this.data[f+4*o+2]=y.red,this.data[f+4*o+3]=255}n!==0&&(this.pos+=4-n)}},vu.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c<e;c++){var h=this.datav.getUint8(this.pos++,!0),f=a*this.width*4+2*c*4,o=h>>4,y=15&h,v=this.palette[o];if(this.data[f]=v.blue,this.data[f+1]=v.green,this.data[f+2]=v.red,this.data[f+3]=255,2*c+1>=this.width)break;v=this.palette[y],this.data[f+4]=v.blue,this.data[f+4+1]=v.green,this.data[f+4+2]=v.red,this.data[f+4+3]=255}t!==0&&(this.pos+=4-t)}},vu.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var c=this.datav.getUint8(this.pos++,!0),h=n*this.width*4+4*a;if(c<this.palette.length){var f=this.palette[c];this.data[h]=f.red,this.data[h+1]=f.green,this.data[h+2]=f.blue,this.data[h+3]=255}else this.data[h]=255,this.data[h+1]=255,this.data[h+2]=255,this.data[h+3]=255}e!==0&&(this.pos+=4-e)}},vu.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var a=this.bottom_up?n:this.height-1-n,c=0;c<this.width;c++){var h=this.datav.getUint16(this.pos,!0);this.pos+=2;var f=(h&t)/t*255|0,o=(h>>5&t)/t*255|0,y=(h>>10&t)/t*255|0,v=h>>15?255:0,S=a*this.width*4+4*c;this.data[S]=y,this.data[S+1]=o,this.data[S+2]=f,this.data[S+3]=v}this.pos+=e}},vu.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),a=this.height-1;a>=0;a--){for(var c=this.bottom_up?a:this.height-1-a,h=0;h<this.width;h++){var f=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(f&t)/t*255|0,y=(f>>5&n)/n*255|0,v=(f>>11)/t*255|0,S=c*this.width*4+4*h;this.data[S]=v,this.data[S+1]=y,this.data[S+2]=o,this.data[S+3]=255}this.pos+=e}},vu.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),h=this.datav.getUint8(this.pos++,!0),f=t*this.width*4+4*n;this.data[f]=h,this.data[f+1]=c,this.data[f+2]=a,this.data[f+3]=255}this.pos+=this.width%4}},vu.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var a=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),h=this.datav.getUint8(this.pos++,!0),f=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=h,this.data[o+1]=c,this.data[o+2]=a,this.data[o+3]=f}},vu.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,n,a,c){var h=new vu(t,!1),f=h.width,o=h.height,y={data:h.getData(),width:f,height:o},v=new G0(100).encode(y,100);return e.processJPEG.call(this,v,n,a,c)}})(Cn.API),CE.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,n,a,c){var h=new CE(t),f=h.width,o=h.height,y={data:h.getData(),width:f,height:o},v=new G0(100).encode(y,100);return e.processJPEG.call(this,v,n,a,c)}})(Cn.API),Cn.API.processRGBA=function(e,t,n){for(var a=e.data,c=a.length,h=new Uint8Array(c/4*3),f=new Uint8Array(c/4),o=0,y=0,v=0;v<c;v+=4){var S=a[v],P=a[v+1],M=a[v+2],E=a[v+3];h[o++]=S,h[o++]=P,h[o++]=M,f[y++]=E}var O=this.__addimage__.arrayBufferToBinaryString(h);return{alpha:this.__addimage__.arrayBufferToBinaryString(f),data:O,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Cn.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},If=Cn.API,Dm=If.getCharWidthsArray=function(e,t){var n,a,c=(t=t||{}).font||this.internal.getFont(),h=t.fontSize||this.internal.getFontSize(),f=t.charSpace||this.internal.getCharSpace(),o=t.widths?t.widths:c.metadata.Unicode.widths,y=o.fof?o.fof:1,v=t.kerning?t.kerning:c.metadata.Unicode.kerning,S=v.fof?v.fof:1,P=t.doKerning!==!1,M=0,E=e.length,O=0,N=o[0]||y,z=[];for(n=0;n<E;n++)a=e.charCodeAt(n),typeof c.metadata.widthOfString=="function"?z.push((c.metadata.widthOfGlyph(c.metadata.characterToGlyph(a))+f*(1e3/h)||0)/1e3):(M=P&&Ui(v[a])==="object"&&!isNaN(parseInt(v[a][O],10))?v[a][O]/S:0,z.push((o[a]||N)/y+M)),O=a;return z},gE=If.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),a=t.font||this.internal.getFont(),c=t.charSpace||this.internal.getCharSpace();return If.processArabic&&(e=If.processArabic(e)),typeof a.metadata.widthOfString=="function"?a.metadata.widthOfString(e,n,c)/n:Dm.apply(this,arguments).reduce(function(h,f){return h+f},0)},yE=function(e,t,n,a){for(var c=[],h=0,f=e.length,o=0;h!==f&&o+t[h]<n;)o+=t[h],h++;c.push(e.slice(0,h));var y=h;for(o=0;h!==f;)o+t[h]>a&&(c.push(e.slice(y,h)),o=0,y=h),o+=t[h],h++;return y!==h&&c.push(e.slice(y,h)),c},_E=function(e,t,n){n||(n={});var a,c,h,f,o,y,v,S=[],P=[S],M=n.textIndent||0,E=0,O=0,N=e.split(" "),z=Dm.apply(this,[" ",n])[0];if(y=n.lineIndent===-1?N[0].length+2:n.lineIndent||0){var U=Array(y).join(" "),ee=[];N.map(function(W){(W=W.split(/\s*\n/)).length>1?ee=ee.concat(W.map(function(le,te){return(te&&le.length?`
|
|
1144
1144
|
`:"")+le})):ee.push(W[0])}),N=ee,y=gE.apply(this,[U,n])}for(h=0,f=N.length;h<f;h++){var ae=0;if(a=N[h],y&&a[0]==`
|
|
1145
|
-
`&&(a=a.substr(1),ae=1),M+E+(O=(c=Dm.apply(this,[a,n])).reduce(function(W,le){return W+le},0))>t||ae){if(O>t){for(o=yE.apply(this,[a,c,t-(M+E),t]),S.push(o.shift()),S=[o.pop()];o.length;)P.push([o.shift()]);O=c.slice(a.length-(S[0]?S[0].length:0)).reduce(function(W,le){return W+le},0)}else S=[a];P.push(S),M=O+y,E=z}else S.push(a),M+=E+O,E=z}return v=y?function(W,le){return(le?U:"")+W.join(" ")}:function(W){return W.join(" ")},P.map(v)},If.splitTextToSize=function(e,t,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),h=(function(S){if(S.widths&&S.kerning)return{widths:S.widths,kerning:S.kerning};var P=this.internal.getFont(S.fontName,S.fontStyle),M="Unicode";return P.metadata[M]?{widths:P.metadata[M].widths||{0:1},kerning:P.metadata[M].kerning||{}}:{font:P.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(e)?e:String(e).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/c;h.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,h.lineIndent=n.lineIndent;var o,y,v=[];for(o=0,y=a.length;o<y;o++)v=v.concat(_E.apply(this,[a[o],f,h]));return v},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",a={},c={},h=0;h<16;h++)a[n[h]]=t[h],c[t[h]]=n[h];var f=function(M){return"0x"+parseInt(M,10).toString(16)},o=e.__fontmetrics__.compress=function(M){var E,O,N,z,U=["{"];for(var ee in M){if(E=M[ee],isNaN(parseInt(ee,10))?O="'"+ee+"'":(ee=parseInt(ee,10),O=(O=f(ee).slice(2)).slice(0,-1)+c[O.slice(-1)]),typeof E=="number")E<0?(N=f(E).slice(3),z="-"):(N=f(E).slice(2),z=""),N=z+N.slice(0,-1)+c[N.slice(-1)];else{if(Ui(E)!=="object")throw new Error("Don't know what to do with value type "+Ui(E)+".");N=o(E)}U.push(O+N)}return U.push("}"),U.join("")},y=e.__fontmetrics__.uncompress=function(M){if(typeof M!="string")throw new Error("Invalid argument passed to uncompress.");for(var E,O,N,z,U={},ee=1,ae=U,W=[],le="",te="",we=M.length-1,Te=1;Te<we;Te+=1)(z=M[Te])=="'"?E?(N=E.join(""),E=void 0):E=[]:E?E.push(z):z=="{"?(W.push([ae,N]),ae={},N=void 0):z=="}"?((O=W.pop())[0][O[1]]=ae,N=void 0,ae=O[0]):z=="-"?ee=-1:N===void 0?a.hasOwnProperty(z)?(le+=a[z],N=parseInt(le,16)*ee,ee=1,le=""):le+=z:a.hasOwnProperty(z)?(te+=a[z],ae[N]=parseInt(te,16)*ee,ee=1,N=void 0,te=""):te+=z;return U},v={codePages:["WinAnsiEncoding"],WinAnsiEncoding:y("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},S={Unicode:{Courier:v,"Courier-Bold":v,"Courier-BoldOblique":v,"Courier-Oblique":v,Helvetica:v,"Helvetica-Bold":v,"Helvetica-BoldOblique":v,"Helvetica-Oblique":v,"Times-Roman":v,"Times-Bold":v,"Times-BoldItalic":v,"Times-Italic":v}},P={Unicode:{"Courier-Oblique":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":y("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":y("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":y("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:y("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:y("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":y("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:y("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":y("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":y("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":y("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(M){var E=M.font,O=P.Unicode[E.postScriptName];O&&(E.metadata.Unicode={},E.metadata.Unicode.widths=O.widths,E.metadata.Unicode.kerning=O.kerning);var N=S.Unicode[E.postScriptName];N&&(E.metadata.Unicode.encoding=N,E.encoding=N.codePages[0])}])})(Cn.API),(function(e){var t=function(n){for(var a=n.length,c=new Uint8Array(a),h=0;h<a;h++)c[h]=n.charCodeAt(h);return c};e.API.events.push(["addFont",function(n){var a=void 0,c=n.font,h=n.instance;if(!c.isStandardFont){if(h===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");if(typeof(a=h.existsFileInVFS(c.postScriptName)===!1?h.loadFile(c.postScriptName):h.getFileFromVFS(c.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");(function(f,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(Zm(o)),f.metadata=e.API.TTFFont.open(o),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(c,a)}}])})(Cn),Cn.API.addSvgAsImage=function(e,t,n,a,c,h,f,o){if(isNaN(t)||isNaN(n))throw co.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(c))throw co.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var y=document.createElement("canvas");y.width=a,y.height=c;var v=y.getContext("2d");v.fillStyle="#fff",v.fillRect(0,0,y.width,y.height);var S={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},P=this;return(jn.canvg?Promise.resolve(jn.canvg):Promise.resolve().then(()=>require("./index.es-YxBXdzDQ.cjs"))).catch(function(M){return Promise.reject(new Error("Could not load canvg: "+M))}).then(function(M){return M.default?M.default:M}).then(function(M){return M.fromString(v,e,S)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(M){return M.render(S)}).then(function(){P.addImage(y.toDataURL("image/jpeg",1),t,n,a,c,f,o)})},Cn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var c=0;c<this.internal.pages[a].length;c++)this.internal.pages[a][c]=this.internal.pages[a][c].replace(t,n);return this},Cn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var a,c,h,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(f),y=[],v=0,S=0,P=0;function M(O,N){var z,U=!1;for(z=0;z<O.length;z+=1)O[z]===N&&(U=!0);return U}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var E=o.length;for(P=0;P<E;P+=1)n[o[P]].value=n[o[P]].defaultValue,n[o[P]].explicitSet=!1}if(Ui(e)==="object"){for(c in e)if(h=e[c],M(o,c)&&h!==void 0){if(n[c].type==="boolean"&&typeof h=="boolean")n[c].value=h;else if(n[c].type==="name"&&M(n[c].valueSet,h))n[c].value=h;else if(n[c].type==="integer"&&Number.isInteger(h))n[c].value=h;else if(n[c].type==="array"){for(v=0;v<h.length;v+=1)if(a=!0,h[v].length===1&&typeof h[v][0]=="number")y.push(String(h[v]-1));else if(h[v].length>1){for(S=0;S<h[v].length;S+=1)typeof h[v][S]!="number"&&(a=!1);a===!0&&y.push([h[v][0]-1,h[v][1]-1].join(" "))}n[c].value="["+y.join(" ")+"]"}else n[c].value=n[c].defaultValue;n[c].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var O,N=[];for(O in n)n[O].explicitSet===!0&&(n[O].type==="name"?N.push("/"+O+" /"+n[O].value):N.push("/"+O+" "+n[O].value));N.length!==0&&this.internal.write(`/ViewerPreferences
|
|
1145
|
+
`&&(a=a.substr(1),ae=1),M+E+(O=(c=Dm.apply(this,[a,n])).reduce(function(W,le){return W+le},0))>t||ae){if(O>t){for(o=yE.apply(this,[a,c,t-(M+E),t]),S.push(o.shift()),S=[o.pop()];o.length;)P.push([o.shift()]);O=c.slice(a.length-(S[0]?S[0].length:0)).reduce(function(W,le){return W+le},0)}else S=[a];P.push(S),M=O+y,E=z}else S.push(a),M+=E+O,E=z}return v=y?function(W,le){return(le?U:"")+W.join(" ")}:function(W){return W.join(" ")},P.map(v)},If.splitTextToSize=function(e,t,n){var a,c=(n=n||{}).fontSize||this.internal.getFontSize(),h=(function(S){if(S.widths&&S.kerning)return{widths:S.widths,kerning:S.kerning};var P=this.internal.getFont(S.fontName,S.fontStyle),M="Unicode";return P.metadata[M]?{widths:P.metadata[M].widths||{0:1},kerning:P.metadata[M].kerning||{}}:{font:P.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);a=Array.isArray(e)?e:String(e).split(/\r?\n/);var f=1*this.internal.scaleFactor*t/c;h.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/c:0,h.lineIndent=n.lineIndent;var o,y,v=[];for(o=0,y=a.length;o<y;o++)v=v.concat(_E.apply(this,[a[o],f,h]));return v},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",a={},c={},h=0;h<16;h++)a[n[h]]=t[h],c[t[h]]=n[h];var f=function(M){return"0x"+parseInt(M,10).toString(16)},o=e.__fontmetrics__.compress=function(M){var E,O,N,z,U=["{"];for(var ee in M){if(E=M[ee],isNaN(parseInt(ee,10))?O="'"+ee+"'":(ee=parseInt(ee,10),O=(O=f(ee).slice(2)).slice(0,-1)+c[O.slice(-1)]),typeof E=="number")E<0?(N=f(E).slice(3),z="-"):(N=f(E).slice(2),z=""),N=z+N.slice(0,-1)+c[N.slice(-1)];else{if(Ui(E)!=="object")throw new Error("Don't know what to do with value type "+Ui(E)+".");N=o(E)}U.push(O+N)}return U.push("}"),U.join("")},y=e.__fontmetrics__.uncompress=function(M){if(typeof M!="string")throw new Error("Invalid argument passed to uncompress.");for(var E,O,N,z,U={},ee=1,ae=U,W=[],le="",te="",we=M.length-1,Te=1;Te<we;Te+=1)(z=M[Te])=="'"?E?(N=E.join(""),E=void 0):E=[]:E?E.push(z):z=="{"?(W.push([ae,N]),ae={},N=void 0):z=="}"?((O=W.pop())[0][O[1]]=ae,N=void 0,ae=O[0]):z=="-"?ee=-1:N===void 0?a.hasOwnProperty(z)?(le+=a[z],N=parseInt(le,16)*ee,ee=1,le=""):le+=z:a.hasOwnProperty(z)?(te+=a[z],ae[N]=parseInt(te,16)*ee,ee=1,N=void 0,te=""):te+=z;return U},v={codePages:["WinAnsiEncoding"],WinAnsiEncoding:y("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},S={Unicode:{Courier:v,"Courier-Bold":v,"Courier-BoldOblique":v,"Courier-Oblique":v,Helvetica:v,"Helvetica-Bold":v,"Helvetica-BoldOblique":v,"Helvetica-Oblique":v,"Times-Roman":v,"Times-Bold":v,"Times-BoldItalic":v,"Times-Italic":v}},P={Unicode:{"Courier-Oblique":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":y("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":y("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":y("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:y("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:y("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":y("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:y("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":y("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":y("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":y("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":y("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(M){var E=M.font,O=P.Unicode[E.postScriptName];O&&(E.metadata.Unicode={},E.metadata.Unicode.widths=O.widths,E.metadata.Unicode.kerning=O.kerning);var N=S.Unicode[E.postScriptName];N&&(E.metadata.Unicode.encoding=N,E.encoding=N.codePages[0])}])})(Cn.API),(function(e){var t=function(n){for(var a=n.length,c=new Uint8Array(a),h=0;h<a;h++)c[h]=n.charCodeAt(h);return c};e.API.events.push(["addFont",function(n){var a=void 0,c=n.font,h=n.instance;if(!c.isStandardFont){if(h===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");if(typeof(a=h.existsFileInVFS(c.postScriptName)===!1?h.loadFile(c.postScriptName):h.getFileFromVFS(c.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+c.postScriptName+"').");(function(f,o){o=/^\x00\x01\x00\x00/.test(o)?t(o):t(Zm(o)),f.metadata=e.API.TTFFont.open(o),f.metadata.Unicode=f.metadata.Unicode||{encoding:{},kerning:{},widths:[]},f.metadata.glyIdsUsed=[0]})(c,a)}}])})(Cn),Cn.API.addSvgAsImage=function(e,t,n,a,c,h,f,o){if(isNaN(t)||isNaN(n))throw co.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(c))throw co.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var y=document.createElement("canvas");y.width=a,y.height=c;var v=y.getContext("2d");v.fillStyle="#fff",v.fillRect(0,0,y.width,y.height);var S={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},P=this;return(jn.canvg?Promise.resolve(jn.canvg):Promise.resolve().then(()=>require("./index.es-UgETSxCJ.cjs"))).catch(function(M){return Promise.reject(new Error("Could not load canvg: "+M))}).then(function(M){return M.default?M.default:M}).then(function(M){return M.fromString(v,e,S)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(M){return M.render(S)}).then(function(){P.addImage(y.toDataURL("image/jpeg",1),t,n,a,c,f,o)})},Cn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var a=1;a<=this.internal.getNumberOfPages();a++)for(var c=0;c<this.internal.pages[a].length;c++)this.internal.pages[a][c]=this.internal.pages[a][c].replace(t,n);return this},Cn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var a,c,h,f={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(f),y=[],v=0,S=0,P=0;function M(O,N){var z,U=!1;for(z=0;z<O.length;z+=1)O[z]===N&&(U=!0);return U}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(f)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var E=o.length;for(P=0;P<E;P+=1)n[o[P]].value=n[o[P]].defaultValue,n[o[P]].explicitSet=!1}if(Ui(e)==="object"){for(c in e)if(h=e[c],M(o,c)&&h!==void 0){if(n[c].type==="boolean"&&typeof h=="boolean")n[c].value=h;else if(n[c].type==="name"&&M(n[c].valueSet,h))n[c].value=h;else if(n[c].type==="integer"&&Number.isInteger(h))n[c].value=h;else if(n[c].type==="array"){for(v=0;v<h.length;v+=1)if(a=!0,h[v].length===1&&typeof h[v][0]=="number")y.push(String(h[v]-1));else if(h[v].length>1){for(S=0;S<h[v].length;S+=1)typeof h[v][S]!="number"&&(a=!1);a===!0&&y.push([h[v][0]-1,h[v][1]-1].join(" "))}n[c].value="["+y.join(" ")+"]"}else n[c].value=n[c].defaultValue;n[c].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var O,N=[];for(O in n)n[O].explicitSet===!0&&(n[O].type==="name"?N.push("/"+O+" /"+n[O].value):N.push("/"+O+" "+n[O].value));N.length!==0&&this.internal.write(`/ViewerPreferences
|
|
1146
1146
|
<<
|
|
1147
1147
|
`+N.join(`
|
|
1148
1148
|
`)+`
|
|
@@ -1219,4 +1219,4 @@ Take a look at the logic that dispatched this action: `,E,`
|
|
|
1219
1219
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),o||(N.measureTime(()=>{const z=P.getState(),U=$b(z,"",t,n,h,S);if(U){const{keyPath:ee,value:ae}=U;console.error(`A non-serializable value was detected in the state, in the path: \`${ee}\`. Value:`,ae,`
|
|
1220
1220
|
Take a look at the reducer(s) handling this action type: ${E.type}.
|
|
1221
1221
|
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),N.warnIfExceeded()),O}}}function zm(e){return typeof e=="boolean"}var VW=()=>function(t){const{thunk:n=!0,immutableCheck:a=!0,serializableCheck:c=!0,actionCreatorCheck:h=!0}=t??{};let f=new j4;if(n&&(zm(n)?f.push(kW):f.push(RW(n.extraArgument))),process.env.NODE_ENV!=="production"){if(a){let o={};zm(a)||(o=a),f.unshift(qW(o))}if(c){let o={};zm(c)||(o=c),f.push($W(o))}if(h){let o={};zm(h)||(o=h),f.unshift(zW(o))}}return f},GW="RTK_autoBatch",aP=e=>t=>{setTimeout(t,e)},HW=(e={type:"raf"})=>t=>(...n)=>{const a=t(...n);let c=!0,h=!1,f=!1;const o=new Set,y=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:aP(10):e.type==="callback"?e.queueNotification:aP(e.timeout),v=()=>{f=!1,h&&(h=!1,o.forEach(S=>S()))};return Object.assign({},a,{subscribe(S){const P=()=>c&&S(),M=a.subscribe(P);return o.add(S),()=>{M(),o.delete(S)}},dispatch(S){try{return c=!S?.meta?.[GW],h=!c,h&&(f||(f=!0,y(v))),a.dispatch(S)}finally{c=!0}}})},WW=e=>function(n){const{autoBatch:a=!0}=n??{};let c=new j4(e);return a&&c.push(HW(typeof a=="object"?a:void 0)),c};function ZW(e){const t=VW(),{reducer:n=void 0,middleware:a,devTools:c=!0,duplicateMiddlewareCheck:h=!0,preloadedState:f=void 0,enhancers:o=void 0}=e||{};let y;if(typeof n=="function")y=n;else if(Kp(n))y=bW(n);else throw new Error(process.env.NODE_ENV==="production"?ho(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?ho(2):"`middleware` field must be a callback");let v;if(typeof a=="function"){if(v=a(t),process.env.NODE_ENV!=="production"&&!Array.isArray(v))throw new Error(process.env.NODE_ENV==="production"?ho(3):"when using a middleware builder function, an array of middleware must be returned")}else v=t();if(process.env.NODE_ENV!=="production"&&v.some(N=>typeof N!="function"))throw new Error(process.env.NODE_ENV==="production"?ho(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&h){let N=new Set;v.forEach(z=>{if(N.has(z))throw new Error(process.env.NODE_ENV==="production"?ho(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");N.add(z)})}let S=Sg;c&&(S=NW({trace:process.env.NODE_ENV!=="production",...typeof c=="object"&&c}));const P=xW(...v),M=WW(P);if(process.env.NODE_ENV!=="production"&&o&&typeof o!="function")throw new Error(process.env.NODE_ENV==="production"?ho(5):"`enhancers` field must be a callback");let E=typeof o=="function"?o(M):M();if(process.env.NODE_ENV!=="production"&&!Array.isArray(E))throw new Error(process.env.NODE_ENV==="production"?ho(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&E.some(N=>typeof N!="function"))throw new Error(process.env.NODE_ENV==="production"?ho(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&v.length&&!E.includes(P)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const O=S(...E);return I4(y,f,O)}function G4(e){const t={},n=[];let a;const c={addCase(h,f){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?ho(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(a)throw new Error(process.env.NODE_ENV==="production"?ho(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const o=typeof h=="string"?h:h.type;if(!o)throw new Error(process.env.NODE_ENV==="production"?ho(28):"`builder.addCase` cannot be called with an empty action type");if(o in t)throw new Error(process.env.NODE_ENV==="production"?ho(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${o}'`);return t[o]=f,c},addAsyncThunk(h,f){if(process.env.NODE_ENV!=="production"&&a)throw new Error(process.env.NODE_ENV==="production"?ho(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return f.pending&&(t[h.pending.type]=f.pending),f.rejected&&(t[h.rejected.type]=f.rejected),f.fulfilled&&(t[h.fulfilled.type]=f.fulfilled),f.settled&&n.push({matcher:h.settled,reducer:f.settled}),c},addMatcher(h,f){if(process.env.NODE_ENV!=="production"&&a)throw new Error(process.env.NODE_ENV==="production"?ho(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:h,reducer:f}),c},addDefaultCase(h){if(process.env.NODE_ENV!=="production"&&a)throw new Error(process.env.NODE_ENV==="production"?ho(31):"`builder.addDefaultCase` can only be called once");return a=h,c}};return e(c),[t,n,a]}function YW(e){return typeof e=="function"}function XW(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?ho(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,a,c]=G4(t),h;if(YW(e))h=()=>oP(e());else{const o=oP(e);h=()=>o}function f(o=h(),y){let v=[n[y.type],...a.filter(({matcher:S})=>S(y)).map(({reducer:S})=>S)];return v.filter(S=>!!S).length===0&&(v=[c]),v.reduce((S,P)=>{if(P)if(qh(S)){const E=P(S,y);return E===void 0?S:E}else{if(Sc(S))return F4(S,M=>P(M,y));{const M=P(S,y);if(M===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return M}}return S},o)}return f.getInitialState=h,f}var KW=Symbol.for("rtk-slice-createasyncthunk");function JW(e,t){return`${e}/${t}`}function QW({creators:e}={}){const t=e?.asyncThunk?.[KW];return function(a){const{name:c,reducerPath:h=c}=a;if(!c)throw new Error(process.env.NODE_ENV==="production"?ho(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&a.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const f=(typeof a.reducers=="function"?a.reducers(rZ()):a.reducers)||{},o=Object.keys(f),y={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},v={addCase(ae,W){const le=typeof ae=="string"?ae:ae.type;if(!le)throw new Error(process.env.NODE_ENV==="production"?ho(12):"`context.addCase` cannot be called with an empty action type");if(le in y.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?ho(13):"`context.addCase` cannot be called with two reducers for the same action type: "+le);return y.sliceCaseReducersByType[le]=W,v},addMatcher(ae,W){return y.sliceMatchers.push({matcher:ae,reducer:W}),v},exposeAction(ae,W){return y.actionCreators[ae]=W,v},exposeCaseReducer(ae,W){return y.sliceCaseReducersByName[ae]=W,v}};o.forEach(ae=>{const W=f[ae],le={reducerName:ae,type:JW(c,ae),createNotation:typeof a.reducers=="function"};iZ(W)?aZ(le,W,v,t):nZ(le,W,v)});function S(){if(process.env.NODE_ENV!=="production"&&typeof a.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?ho(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[ae={},W=[],le=void 0]=typeof a.extraReducers=="function"?G4(a.extraReducers):[a.extraReducers],te={...ae,...y.sliceCaseReducersByType};return XW(a.initialState,we=>{for(let Te in te)we.addCase(Te,te[Te]);for(let Te of y.sliceMatchers)we.addMatcher(Te.matcher,Te.reducer);for(let Te of W)we.addMatcher(Te.matcher,Te.reducer);le&&we.addDefaultCase(le)})}const P=ae=>ae,M=new Map,E=new WeakMap;let O;function N(ae,W){return O||(O=S()),O(ae,W)}function z(){return O||(O=S()),O.getInitialState()}function U(ae,W=!1){function le(we){let Te=we[ae];if(typeof Te>"u"){if(W)Te=Bm(E,le,z);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ho(15):"selectSlice returned undefined for an uninjected slice reducer")}return Te}function te(we=P){const Te=Bm(M,W,()=>new WeakMap);return Bm(Te,we,()=>{const me={};for(const[Ve,re]of Object.entries(a.selectors??{}))me[Ve]=eZ(re,we,()=>Bm(E,we,z),W);return me})}return{reducerPath:ae,getSelectors:te,get selectors(){return te(le)},selectSlice:le}}const ee={name:c,reducer:N,actions:y.actionCreators,caseReducers:y.sliceCaseReducersByName,getInitialState:z,...U(h),injectInto(ae,{reducerPath:W,...le}={}){const te=W??h;return ae.inject({reducerPath:te,reducer:N},le),{...ee,...U(te,!0)}}};return ee}}function eZ(e,t,n,a){function c(h,...f){let o=t(h);if(typeof o>"u"){if(a)o=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ho(16):"selectState returned undefined for an uninjected slice reducer")}return e(o,...f)}return c.unwrapped=e,c}var tZ=QW();function rZ(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function nZ({type:e,reducerName:t,createNotation:n},a,c){let h,f;if("reducer"in a){if(n&&!oZ(a))throw new Error(process.env.NODE_ENV==="production"?ho(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");h=a.reducer,f=a.prepare}else h=a;c.addCase(e,h).exposeCaseReducer(t,h).exposeAction(t,f?iP(e,f):iP(e))}function iZ(e){return e._reducerDefinitionType==="asyncThunk"}function oZ(e){return e._reducerDefinitionType==="reducerWithPrepare"}function aZ({type:e,reducerName:t},n,a,c){if(!c)throw new Error(process.env.NODE_ENV==="production"?ho(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:h,fulfilled:f,pending:o,rejected:y,settled:v,options:S}=n,P=c(e,h,S);a.exposeAction(t,P),f&&a.addCase(P.fulfilled,f),o&&a.addCase(P.pending,o),y&&a.addCase(P.rejected,y),v&&a.addMatcher(P.settled,v),a.exposeCaseReducer(t,{fulfilled:f||jm,pending:o||jm,rejected:y||jm,settled:v||jm})}function jm(){}function ho(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function H4(e,t,n){t.forEach(a=>{e(a,n),a.layers&&a.layers.length>0&&H4(e,a.layers,a)})}const sZ={mapConfigs:{}},W4=tZ({name:"mapConfig",initialState:sZ,reducers:{setMapConfig:(e,t)=>{const n=t.payload.mapConfig,a=t.payload.key;e.mapConfigs[a]=n},removeMapConfig:(e,t)=>{delete e.mapConfigs[t.payload.key]},setLayerInMapConfig:(e,t)=>{const{mapConfigKey:n,layer:a}=t.payload,c=e.mapConfigs[n];if(c){for(let h=0;h<c.layers.length;h++)if(c.layers[h].uuid===a.uuid){c.layers[h]=a;break}}},removeLayerFromMapConfig:(e,t)=>{const{mapConfigKey:n,layerUuid:a}=t.payload,c=e.mapConfigs[n];if(c){const h=c.layers.findIndex(f=>f.uuid===a);h!==-1&&(delete c.layers[h],H4(function(f,o){o&&o.layers&&(o.layers=o.layers.filter(y=>y.uuid!==a))},c.layerOrder))}},updateLayerOrder:(e,t)=>{const{mapConfigKey:n,newOrder:a}=t.payload,c=e.mapConfigs[n];c&&(c.layerOrder=a)},setMasterVisible(e,t){const{mapConfigKey:n,layerId:a,masterVisible:c}=t.payload,h=e.mapConfigs[n];if(h){const f=h.layers.findIndex(o=>o.uuid===a);if(f!==-1){const o=h.layers[f];if(o){const y=[...h.layers];o.type==="folder"&&h.layerOrder.forEach(v=>{v.uuid===a&&v.layers?.forEach(S=>{const P=h.layers.findIndex(E=>E.uuid===S.uuid),M=y[P];y[P]={...M,masterVisible:c},M?.type==="vt"&&M?.config?.layers&&(M.config.layers=M.config.layers.map(E=>({...E,masterVisible:c})))})}),o.type==="vt"&&o?.config?.layers&&(o.config.layers=o.config.layers.map(v=>({...v,masterVisible:c}))),e.mapConfigs[n].layers=y}}}}}});ZW({reducer:{mapConfig:W4.reducer}});const{setMapConfig:WZ,removeMapConfig:ZZ,setLayerInMapConfig:YZ,removeLayerFromMapConfig:XZ,updateLayerOrder:KZ,setMasterVisible:JZ}=W4.actions;Rn(b2)({marginLeft:"-100px",marginRight:"-21px",paddingLeft:"53px",borderRadius:"0px",boxShadow:"none",backgroundColor:"rgb(0, 0, 0, 0)"});Rn(nh)({marginLeft:"61px"});Rn(Ec)({padding:"4px",marginTop:"-3px"});Rn(Ec)({marginLeft:"20px"});Rn(Wg)({paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:"4px"});Rn(Zg)({minWidth:"30px"});Rn(Ec)({marginRight:"0px",padding:"0px"});Rn(nh)(({open:e})=>({display:e?"block":"none"}));Rn(Vp)({marginLeft:"50px"});Rn(Vp)({marginTop:"15px"});var lZ=FM();const tg=th(lZ);var Z4=_e.createContext(void 0);Z4.displayName="RecordContext";var _y=function(e){var t=_e.useContext(Z4);return e&&e.record||t},uZ=e=>e.type==="checkbox",yp=e=>e instanceof Date,Ex=e=>e==null;const Y4=e=>typeof e=="object";var Vh=e=>!Ex(e)&&!Array.isArray(e)&&Y4(e)&&!yp(e),cZ=e=>Vh(e)&&e.target?uZ(e.target)?e.target.checked:e.target.value:e,hZ=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,fZ=(e,t)=>e.has(hZ(t)),dZ=e=>{const t=e.constructor&&e.constructor.prototype;return Vh(t)&&t.hasOwnProperty("isPrototypeOf")},pZ=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function X4(e){let t;const n=Array.isArray(e),a=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(pZ&&(e instanceof Blob||a))&&(n||Vh(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!dZ(e))t=e;else for(const c in e)e.hasOwnProperty(c)&&(t[c]=X4(e[c]));else return e;return t}var K4=e=>/^\w*$/.test(e),Vb=e=>e===void 0,mZ=e=>Array.isArray(e)?e.filter(Boolean):[],J4=e=>mZ(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dl=(e,t,n)=>{if(!t||!Vh(e))return n;const a=(K4(t)?[t]:J4(t)).reduce((c,h)=>Ex(c)?c:c[h],e);return Vb(a)||a===e?Vb(e[t])?n:e[t]:a},Q1=e=>typeof e=="boolean",sP=(e,t,n)=>{let a=-1;const c=K4(t)?[t]:J4(t),h=c.length,f=h-1;for(;++a<h;){const o=c[a];let y=n;if(a!==f){const v=e[o];y=Vh(v)||Array.isArray(v)?v:isNaN(+c[a+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=y,e=e[o]}};const lP={BLUR:"blur",CHANGE:"change"},uP={all:"all"},Q4=_e.createContext(null);Q4.displayName="HookFormContext";const vy=()=>_e.useContext(Q4);var gZ=(e,t,n,a=!0)=>{const c={defaultValues:t._defaultValues};for(const h in e)Object.defineProperty(c,h,{get:()=>{const f=h;return t._proxyFormState[f]!==uP.all&&(t._proxyFormState[f]=!a||uP.all),n&&(n[f]=!0),e[f]}});return c};const eL=typeof window<"u"?_e.useLayoutEffect:_e.useEffect;function yZ(e){const t=vy(),{control:n=t.control,disabled:a,name:c,exact:h}=e||{},[f,o]=_e.useState(n._formState),y=_e.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return eL(()=>n._subscribe({name:c,formState:y.current,exact:h,callback:v=>{!a&&o({...n._formState,...v})}}),[c,a,h]),_e.useEffect(()=>{y.current.isValid&&n._setValid(!0)},[n]),_e.useMemo(()=>gZ(f,n,y.current,!1),[f,n])}var _Z=e=>typeof e=="string",vZ=(e,t,n,a,c)=>_Z(e)?dl(n,e,c):Array.isArray(e)?e.map(h=>dl(n,h)):n,cP=e=>Ex(e)||!Y4(e);function tL(e,t,n=new WeakSet){if(cP(e)||cP(t))return e===t;if(yp(e)&&yp(t))return e.getTime()===t.getTime();const a=Object.keys(e),c=Object.keys(t);if(a.length!==c.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const h of a){const f=e[h];if(!c.includes(h))return!1;if(h!=="ref"){const o=t[h];if(yp(f)&&yp(o)||Vh(f)&&Vh(o)||Array.isArray(f)&&Array.isArray(o)?!tL(f,o,n):f!==o)return!1}}return!0}function bZ(e){const t=vy(),{control:n=t.control,name:a,defaultValue:c,disabled:h,exact:f,compute:o}=e||{},y=_e.useRef(c),v=_e.useRef(o),S=_e.useRef(void 0);v.current=o;const P=_e.useMemo(()=>n._getWatch(a,y.current),[n,a]),[M,E]=_e.useState(v.current?v.current(P):P);return eL(()=>n._subscribe({name:a,formState:{values:!0},exact:f,callback:O=>{if(!h){const N=vZ(a,n._names,O.values||n._formValues,!1,y.current);if(v.current){const z=v.current(N);tL(z,S.current)||(E(z),S.current=z)}else E(N)}}}),[n,h,a,f]),_e.useEffect(()=>n._removeUnmounted()),M}function xZ(e){const t=vy(),{name:n,disabled:a,control:c=t.control,shouldUnregister:h,defaultValue:f}=e,o=fZ(c._names.array,n),y=_e.useMemo(()=>dl(c._formValues,n,dl(c._defaultValues,n,f)),[c,n,f]),v=bZ({control:c,name:n,defaultValue:y,exact:!0}),S=yZ({control:c,name:n,exact:!0}),P=_e.useRef(e),M=_e.useRef(c.register(n,{...e.rules,value:v,...Q1(e.disabled)?{disabled:e.disabled}:{}}));P.current=e;const E=_e.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!dl(S.errors,n)},isDirty:{enumerable:!0,get:()=>!!dl(S.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!dl(S.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!dl(S.validatingFields,n)},error:{enumerable:!0,get:()=>dl(S.errors,n)}}),[S,n]),O=_e.useCallback(ee=>M.current.onChange({target:{value:cZ(ee),name:n},type:lP.CHANGE}),[n]),N=_e.useCallback(()=>M.current.onBlur({target:{value:dl(c._formValues,n),name:n},type:lP.BLUR}),[n,c._formValues]),z=_e.useCallback(ee=>{const ae=dl(c._fields,n);ae&&ee&&(ae._f.ref={focus:()=>ee.focus&&ee.focus(),select:()=>ee.select&&ee.select(),setCustomValidity:W=>ee.setCustomValidity(W),reportValidity:()=>ee.reportValidity()})},[c._fields,n]),U=_e.useMemo(()=>({name:n,value:v,...Q1(a)||S.disabled?{disabled:S.disabled||a}:{},onChange:O,onBlur:N,ref:z}),[n,a,S.disabled,O,N,z,v]);return _e.useEffect(()=>{const ee=c._options.shouldUnregister||h;c.register(n,{...P.current.rules,...Q1(P.current.disabled)?{disabled:P.current.disabled}:{}});const ae=(W,le)=>{const te=dl(c._fields,W);te&&te._f&&(te._f.mount=le)};if(ae(n,!0),ee){const W=X4(dl(c._options.defaultValues,n));sP(c._defaultValues,n,W),Vb(dl(c._formValues,n))&&sP(c._formValues,n,W)}return!o&&c.register(n),()=>{(o?ee&&!c._state.action:ee)?c.unregister(n):ae(n,!1)}},[n,c,o,h]),_e.useEffect(()=>{c._setDisabledField({disabled:a,name:n})},[a,n,c]),_e.useMemo(()=>({field:U,formState:S,fieldState:E}),[U,S,E])}var wZ=_e.createContext(void 0),SZ=_e.createContext(null),EZ=function(){var e=_e.useContext(wZ);return e},TZ=function(){var e=_e.useContext(SZ);return e},CZ=function(e){var t=e.inputProps,n=e.isArrayInput,a=e.fieldArrayInputControl,c=t.defaultValue,h=t.source,f=t.disabled,o=iL(h),y=_y(t),v=vy(),S=v.getValues,P=v.resetField,M=v.formState,E=v.reset,O=tg(y,o),N=tg(S(),o),z=M.dirtyFields,U=Object.keys(z).includes(o);_e.useEffect(function(){if(!(c==null||N!=null||f||O!==void 0||U)){var ee=o.split(".").some(function(le){return AZ.test(le)});if(ee){var ae=o.split(".").slice(0,-1).join("."),W=tg(S(),ae);if(W==null)return}if(n){if(!a)throw new Error("useApplyInputDefaultValues: No fieldArrayInputControl passed in props for array input usage");a.replace(c),E({},{keepValues:!0});return}P(o,{defaultValue:c})}})},AZ=/^\d+$/,PZ=RM();const rL=th(PZ);var IZ=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,oh=function(e){return typeof e>"u"||e===null||e===""||Array.isArray(e)&&e.length===0};function MZ(e){return e?e.hasOwnProperty("message"):!1}var ah=function(e,t,n,a){return typeof e=="function"?e({args:t,value:n,values:a}):t?{message:e,args:t}:e},sh=function(e){return rL(e,function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return JSON.stringify(t)})},LZ=function(e){return typeof e=="function"},DZ=function(e,t){return function(n,a,c){var h=e(n,a,c);return h?typeof h=="string"||MZ(h)?h:h.then(function(f){return f||t(n,a,c)}):t(n,a,c)}},kZ=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(Array.isArray(e[0])?e[0]:e).filter(LZ);return n.reduce(DZ,function(){return null})};sh(function(e){return e===void 0&&(e="ra.validation.required"),Object.assign(function(t,n){return oh(t)?ah(e,void 0,t,n):void 0},{isRequired:!0})});sh(function(e,t){return t===void 0&&(t="ra.validation.minLength"),function(n,a){return!oh(n)&&n.length<e?ah(t,{min:e},n,a):void 0}});sh(function(e,t){return t===void 0&&(t="ra.validation.maxLength"),function(n,a){return!oh(n)&&n.length>e?ah(t,{max:e},n,a):void 0}});sh(function(e,t){return t===void 0&&(t="ra.validation.minValue"),function(n,a){return!oh(n)&&n<e?ah(t,{min:e},n,a):void 0}});sh(function(e,t){return t===void 0&&(t="ra.validation.maxValue"),function(n,a){return!oh(n)&&n>e?ah(t,{max:e},n,a):void 0}});sh(function(e){return e===void 0&&(e="ra.validation.number"),function(t,n){return!oh(t)&&isNaN(Number(t))?ah(e,void 0,t,n):void 0}});var RZ=rL(function(e,t){return t===void 0&&(t="ra.validation.regex"),function(n,a){return!oh(n)&&typeof n=="string"&&!e.test(n)?ah(t,{pattern:e},n,a):void 0}},function(e,t){return e.toString()+t});sh(function(e){return e===void 0&&(e="ra.validation.email"),RZ(IZ,e)});var NZ=function(e){var t=e.args;return{message:"ra.validation.oneOf",args:t}};sh(function(e,t){return t===void 0&&(t=NZ),function(n,a){return!oh(n)&&e.indexOf(n)===-1?ah(t,{list:e},n,a):void 0}});var OZ=function(e){return e&&e.isRequired?!0:Array.isArray(e)?!!e.find(function(t){return t.isRequired}):!1},Dh=function(){return Dh=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(e[c]=t[c])}return e},Dh.apply(this,arguments)},FZ=function(e,t,n,a){function c(h){return h instanceof n?h:new n(function(f){f(h)})}return new(n||(n=Promise))(function(h,f){function o(S){try{v(a.next(S))}catch(P){f(P)}}function y(S){try{v(a.throw(S))}catch(P){f(P)}}function v(S){S.done?h(S.value):c(S.value).then(o,y)}v((a=a.apply(e,t||[])).next())})},BZ=function(e,t){var n={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},a,c,h,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=o(0),f.throw=o(1),f.return=o(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function o(v){return function(S){return y([v,S])}}function y(v){if(a)throw new TypeError("Generator is already executing.");for(;f&&(f=0,v[0]&&(n=0)),n;)try{if(a=1,c&&(h=v[0]&2?c.return:v[0]?c.throw||((h=c.return)&&h.call(c),0):c.next)&&!(h=h.call(c,v[1])).done)return h;switch(c=0,h&&(v=[v[0]&2,h.value]),v[0]){case 0:case 1:h=v;break;case 4:return n.label++,{value:v[1],done:!1};case 5:n.label++,c=v[1],v=[0];continue;case 7:v=n.ops.pop(),n.trys.pop();continue;default:if(h=n.trys,!(h=h.length>0&&h[h.length-1])&&(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&&(!h||v[1]>h[0]&&v[1]<h[3])){n.label=v[1];break}if(v[0]===6&&n.label<h[1]){n.label=h[1],h=v;break}if(h&&n.label<h[2]){n.label=h[2],n.ops.push(v);break}h[2]&&n.ops.pop(),n.trys.pop();continue}v=t.call(e,n)}catch(S){v=[6,S],c=0}finally{a=h=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},zZ=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(e);c<a.length;c++)t.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(e,a[c])&&(n[a[c]]=e[a[c]]);return n},jZ=function(e){return e??""},UZ=function(e){return e===""?null:e},qZ=function(e){var t=e.defaultValue,n=e.format,a=n===void 0?jZ:n,c=e.id,h=e.isRequired,f=e.name,o=e.onBlur,y=e.onChange,v=e.parse,S=v===void 0?UZ:v,P=e.source,M=e.validate,E=zZ(e,["defaultValue","format","id","isRequired","name","onBlur","onChange","parse","source","validate"]),O=iL(P),N=f||O,z=TZ(),U=EZ(),ee=_y(),ae=eb(S),W=_e.useId();!N&&process.env.NODE_ENV==="development"&&console.warn("Input components require either a source or a name prop."),_e.useEffect(function(){if(!(!U||z==null))return U.registerField(O,z),function(){U.unregisterField(O,z)}},[U,z,O]);var le=Array.isArray(M)?kZ(M):M,te=xZ(Dh({name:N,defaultValue:tg(ee,O,t),rules:{validate:function(Le,Pe){return FZ(void 0,void 0,void 0,function(){var Me;return BZ(this,function(Ze){switch(Ze.label){case 0:return le?[4,le(Le,Pe,Dh(Dh({},e),{finalSource:O}))]:[2,!0];case 1:return Me=Ze.sent(),Me?[2,"@@react-admin@@".concat(JSON.stringify(Me))]:[2,!0]}})})}}},E)),we=te.field,Te=te.fieldState,me=te.formState;CZ({inputProps:e});var Ve=eb(function(){for(var Le=[],Pe=0;Pe<arguments.length;Pe++)Le[Pe]=arguments[Pe];we.onBlur(),o&&o.apply(void 0,Le)}),re=eb(function(){for(var Le,Pe,Me,Ze,ut,ke=[],Xe=0;Xe<arguments.length;Xe++)ke[Xe]=arguments[Xe];var ge=e.type==="checkbox"&&((Pe=(Le=ke[0])===null||Le===void 0?void 0:Le.target)===null||Pe===void 0?void 0:Pe.value)==="on"?ke[0].target.checked:(ut=(Ze=(Me=ke[0])===null||Me===void 0?void 0:Me.target)===null||Ze===void 0?void 0:Ze.value)!==null&&ut!==void 0?ut:ke[0];we.onChange(ae?ae(ge):ge),y&&y.apply(void 0,ke)}),H=Dh(Dh({},we),{value:a?a(we.value):we.value,onBlur:Ve,onChange:re});return{id:c||W,field:H,fieldState:Te,formState:me,isRequired:h||OZ(M)}},nL=_e.createContext(void 0),$Z={getSource:function(e){return e},getLabel:function(e){return e}};nL.Provider;var VZ=function(){var e=_e.useContext(nL);return e||$Z},iL=function(e){var t=VZ();return t.getSource(e)},GZ=typeof window<"u"?Qt.useLayoutEffect:Qt.useEffect,eb=function(e){var t=Qt.useRef(function(){throw new Error("Cannot call an event handler while rendering.")});return GZ(function(){t.current=e}),_e.useCallback(function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return t.current.apply(t,n)},[])},sp={exports:{}},hP;function HZ(){if(hP)return sp.exports;hP=1,sp.exports=n,sp.exports.parse=n,sp.exports.stringify=a;var e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,t=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");function n(c){var h=c.split(";"),f=h.pop(),o=(h.shift()||"").split("=").pop(),y=0;function v(te){var we=f.substring(y).match(te);return we?(y+=we[0].length,we[0]):null}function S(te){return te&&o.match(/\d+/)&&(te.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+o}}),te}function P(){v(/^\s*/)}function M(){P();for(var te=0,we=[],Te=[we],me=we,Ve;Ve=v(/^(\()/)||v(/^(\))/)||v(/^(,)/)||v(t);){if(Ve==="(")Te.push(me),me=[],Te[Te.length-1].push(me),te++;else if(Ve===")"){if(me.length===0||(me=Te.pop(),!me))return null;if(te--,te===0)break}else if(Ve===",")me=[],Te[Te.length-1].push(me);else if(!Ve.split(/\s/g).some(isNaN))Array.prototype.push.apply(me,Ve.split(/\s/g).map(parseFloat));else return null;P()}return te!==0?null:we}function E(){for(var te=[],we,Te;Te=v(t)||v(/^(,)/);)Te===","?(te.push(we),we=[]):Te.split(/\s/g).some(isNaN)||(we||(we=[]),Array.prototype.push.apply(we,Te.split(/\s/g).map(parseFloat))),P();if(we)te.push(we);else return null;return te.length?te:null}function O(){if(!v(/^(point(\sz)?)/i)||(P(),!v(/^(\()/)))return null;var te=E();return!te||(P(),!v(/^(\))/))?null:{type:"Point",coordinates:te[0]}}function N(){if(!v(/^(multipoint)/i))return null;P();var te=f.substring(f.indexOf("(")+1,f.length-1).replace(/\(/g,"").replace(/\)/g,"");f="MULTIPOINT ("+te+")";var we=M();return we?(P(),{type:"MultiPoint",coordinates:we}):null}function z(){if(!v(/^(multilinestring)/i))return null;P();var te=M();return te?(P(),{type:"MultiLineString",coordinates:te}):null}function U(){if(!v(/^(linestring(\sz)?)/i)||(P(),!v(/^(\()/)))return null;var te=E();return!te||!v(/^(\))/)?null:{type:"LineString",coordinates:te}}function ee(){if(!v(/^(polygon(\sz)?)/i))return null;P();var te=M();return te?{type:"Polygon",coordinates:te}:null}function ae(){if(!v(/^(multipolygon)/i))return null;P();var te=M();return te?{type:"MultiPolygon",coordinates:te}:null}function W(){var te=[],we;if(!v(/^(geometrycollection)/i)||(P(),!v(/^(\()/)))return null;for(;we=le();)te.push(we),P(),v(/^(,)/),P();return v(/^(\))/)?{type:"GeometryCollection",geometries:te}:null}function le(){return O()||U()||ee()||N()||z()||ae()||W()}return S(le())}function a(c){c.type==="Feature"&&(c=c.geometry);function h(S){return S.join(" ")}function f(S){return S.map(h).join(", ")}function o(S){return S.map(f).map(v).join(", ")}function y(S){return S.map(o).map(v).join(", ")}function v(S){return"("+S+")"}switch(c.type){case"Point":return"POINT ("+h(c.coordinates)+")";case"LineString":return"LINESTRING ("+f(c.coordinates)+")";case"Polygon":return"POLYGON ("+o(c.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+f(c.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+y(c.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+o(c.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+c.geometries.map(a).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}return sp.exports}var td=HZ();function Gb(e){const t=e?.source,n=_y(),a=qp({mapId:e?.mapId}),[c,h]=_e.useState(),[f,o]=_e.useState(),y=qZ(e),{field:{onChange:v}}=y;return _e.useEffect(()=>{if(typeof n>"u"||!n[t])return;const S={type:"Feature",properties:{},geometry:td.parse(n[t])};h(S),o(S)},[n,e.source]),_e.useEffect(()=>{if(a.map&&typeof n<"u"&&n[t]){const S=fM(td.parse(n[t]));S?.geometry?.coordinates&&a.map.setCenter(S.geometry.coordinates)}},[a.map]),Pr.jsxs(Pr.Fragment,{children:[e.embeddedMap&&Pr.jsx(m2,{...e?.MapLibreMapProps,options:{zoom:14,style:"https://wms.wheregroup.com/tileserver/style/klokantech-basic.json",center:Array.isArray(e?.MapLibreMapProps?.options?.center)&&e.MapLibreMapProps.options.center.length===2?[e.MapLibreMapProps.options.center[0],e.MapLibreMapProps.options.center[1]]:[0,0],...e?.MapLibreMapProps?.options},style:{width:"100%",height:"400px",...e?.MapLibreMapProps?.style}}),e.type==="point"&&Pr.jsxs(Pr.Fragment,{children:[f&&Pr.jsx(eg,{mapId:e?.mapId,geojson:f,options:{paint:{"circle-radius":8,"circle-color":"#6f6f96","circle-stroke-color":"white","circle-stroke-width":3,"circle-opacity":.8}},type:"circle",insertBeforeLayer:"gl-draw-polygon-fill-inactive.cold"}),Pr.jsx(H0,{mapId:e?.mapId,geojson:c,mode:c?"simple_select":"draw_point",onChange:S=>{typeof S[0]<"u"&&v(td.stringify(S[0]))}})]}),e.type==="polygon"&&Pr.jsxs(Pr.Fragment,{children:[f&&Pr.jsx(eg,{mapId:e?.mapId,geojson:f,options:{paint:{"fill-color":"#6f6f96","fill-opacity":.6}},type:"fill",insertBeforeLayer:"gl-draw-polygon-fill-inactive.cold"}),Pr.jsx(H0,{mapId:e?.mapId,geojson:c,mode:c?"simple_select":"draw_polygon",onChange:S=>{typeof S[0]<"u"&&v(td.stringify(S[0]))}})]}),e.type==="line"&&Pr.jsxs(Pr.Fragment,{children:[f&&Pr.jsx(eg,{mapId:e?.mapId,geojson:f,options:{paint:{"line-width":6,"line-color":"#6f6f96","line-opacity":.6}},type:"line",insertBeforeLayer:"gl-draw-polygon-fill-inactive.cold"}),Pr.jsx(H0,{mapId:e?.mapId,geojson:c,mode:c?"simple_select":"draw_line_string",onChange:S=>{typeof S[0]<"u"&&v(td.stringify(S[0]))}})]})]})}Gb.defaultProps={type:"point",embeddedMap:!0};function oL(e){return Pr.jsx(Pr.Fragment,{children:e.embeddedMap?Pr.jsx(iI,{children:Pr.jsx(Gb,{...e})}):Pr.jsx(Gb,{...e})})}oL.defaultProps={embeddedMap:!0};function fP(e){const t=e.source,n=_y(),a=qp(),[c,h]=_e.useState();return _e.useEffect(()=>{if(!n?.[t])return;const f=td.parse(n[t]);f&&h({type:"Feature",properties:{},geometry:f})},[n]),_e.useEffect(()=>{if(!a.map||!c)return;const f=fM(c);f?.geometry?.coordinates&&a.map.setCenter(f.geometry.coordinates)},[a.map,c]),Pr.jsxs(Pr.Fragment,{children:[e.embeddedMap&&Pr.jsx(m2,{...e?.MapLibreMapProps,options:{zoom:14,style:"https://wms.wheregroup.com/tileserver/style/klokantech-basic.json",center:[0,0],...e?.MapLibreMapProps?.options},style:{width:"100%",height:"400px",...e?.MapLibreMapProps?.style}}),c&&Pr.jsx(eg,{geojson:c})]})}function aL(e){return Pr.jsx(Pr.Fragment,{children:e.embeddedMap?Pr.jsx(iI,{children:Pr.jsx(fP,{...e})}):Pr.jsx(fP,{...e})})}aL.defaultProps={embeddedMap:!0};exports.GeospatialInput=oL;exports.GeospatialShow=aL;exports._typeof=Ui;exports.commonjsGlobal=vc;exports.getDefaultExportFromCjs=th;
|
|
1222
|
-
//# sourceMappingURL=index-
|
|
1222
|
+
//# sourceMappingURL=index-DuPAPsWa.cjs.map
|