@golstats/gsc-game-data 1.0.326 → 1.0.327

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.
@@ -4117,7 +4117,7 @@ uniform ${Ne} ${Ge} u_${at};
4117
4117
  #endif
4118
4118
  `}),staticAttributes:z,staticUniforms:ie}}class Na{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(l,p,z,j,q,ie,pe,be,Ae){this.context=l;let Ne=this.boundPaintVertexBuffers.length!==j.length;for(let Ge=0;!Ne&&Ge<j.length;Ge++)this.boundPaintVertexBuffers[Ge]!==j[Ge]&&(Ne=!0);!this.vao||this.boundProgram!==p||this.boundLayoutVertexBuffer!==z||Ne||this.boundIndexBuffer!==q||this.boundVertexOffset!==ie||this.boundDynamicVertexBuffer!==pe||this.boundDynamicVertexBuffer2!==be||this.boundDynamicVertexBuffer3!==Ae?this.freshBind(p,z,j,q,ie,pe,be,Ae):(l.bindVertexArray.set(this.vao),pe&&pe.bind(),q&&q.dynamicDraw&&q.bind(),be&&be.bind(),Ae&&Ae.bind())}freshBind(l,p,z,j,q,ie,pe,be){const Ae=l.numAttributes,Ne=this.context,Ge=Ne.gl;this.vao&&this.destroy(),this.vao=Ne.createVertexArray(),Ne.bindVertexArray.set(this.vao),this.boundProgram=l,this.boundLayoutVertexBuffer=p,this.boundPaintVertexBuffers=z,this.boundIndexBuffer=j,this.boundVertexOffset=q,this.boundDynamicVertexBuffer=ie,this.boundDynamicVertexBuffer2=pe,this.boundDynamicVertexBuffer3=be,p.enableAttributes(Ge,l);for(const at of z)at.enableAttributes(Ge,l);ie&&ie.enableAttributes(Ge,l),pe&&pe.enableAttributes(Ge,l),be&&be.enableAttributes(Ge,l),p.bind(),p.setVertexAttribPointers(Ge,l,q);for(const at of z)at.bind(),at.setVertexAttribPointers(Ge,l,q);ie&&(ie.bind(),ie.setVertexAttribPointers(Ge,l,q)),j&&j.bind(),pe&&(pe.bind(),pe.setVertexAttribPointers(Ge,l,q)),be&&(be.bind(),be.setVertexAttribPointers(Ge,l,q)),Ne.currentNumAttributes=Ae}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const _n=(R,l,p,z,j)=>({u_matrix:R,u_texture:0,u_ele_delta:l,u_fog_matrix:p,u_fog_color:z?z.properties.get("fog-color"):n.aN.white,u_fog_ground_blend:z?z.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:z?z.calculateFogBlendOpacity(j):0,u_horizon_color:z?z.properties.get("horizon-color"):n.aN.white,u_horizon_fog_blend:z?z.properties.get("horizon-fog-blend"):1});function kn(R){const l=[];for(let p=0;p<R.length;p++){if(R[p]===null)continue;const z=R[p].split(" ");l.push(z.pop())}return l}class na{constructor(l,p,z,j,q,ie){const pe=l.gl;this.program=pe.createProgram();const be=kn(p.staticAttributes),Ae=z?z.getBinderAttributes():[],Ne=be.concat(Ae),Ge=ba.prelude.staticUniforms?kn(ba.prelude.staticUniforms):[],at=p.staticUniforms?kn(p.staticUniforms):[],ct=z?z.getBinderUniforms():[],pt=Ge.concat(at).concat(ct),xt=[];for(const Xt of pt)xt.indexOf(Xt)<0&&xt.push(Xt);const At=z?z.defines():[];q&&At.push("#define OVERDRAW_INSPECTOR;"),ie&&At.push("#define TERRAIN3D;");const Tt=At.concat(ba.prelude.fragmentSource,p.fragmentSource).join(`
4119
4119
  `),Rt=At.concat(ba.prelude.vertexSource,p.vertexSource).join(`
4120
- `),Et=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Et,Tt),pe.compileShader(Et),!pe.getShaderParameter(Et,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(Et)}`);pe.attachShader(this.program,Et);const Zt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Zt,Rt),pe.compileShader(Zt),!pe.getShaderParameter(Zt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Zt)}`);pe.attachShader(this.program,Zt),this.attributes={};const Yt={};this.numAttributes=Ne.length;for(let Xt=0;Xt<this.numAttributes;Xt++)Ne[Xt]&&(pe.bindAttribLocation(this.program,Xt,Ne[Xt]),this.attributes[Ne[Xt]]=Xt);if(pe.linkProgram(this.program),!pe.getProgramParameter(this.program,pe.LINK_STATUS))throw new Error(`Program failed to link: ${pe.getProgramInfoLog(this.program)}`);pe.deleteShader(Zt),pe.deleteShader(Et);for(let Xt=0;Xt<xt.length;Xt++){const hn=xt[Xt];if(hn&&!Yt[hn]){const xn=pe.getUniformLocation(this.program,hn);xn&&(Yt[hn]=xn)}}this.fixedUniforms=j(l,Yt),this.terrainUniforms=((Xt,hn)=>({u_depth:new n.aI(Xt,hn.u_depth),u_terrain:new n.aI(Xt,hn.u_terrain),u_terrain_dim:new n.aJ(Xt,hn.u_terrain_dim),u_terrain_matrix:new n.aK(Xt,hn.u_terrain_matrix),u_terrain_unpack:new n.aL(Xt,hn.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Xt,hn.u_terrain_exaggeration)}))(l,Yt),this.binderUniforms=z?z.getUniforms(l,Yt):[]}draw(l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct,pt,xt,At,Tt,Rt){const Et=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(z),l.setStencilMode(j),l.setColorMode(q),l.setCullFace(ie),be){l.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,be.depthTexture),l.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,be.texture);for(const Yt in this.terrainUniforms)this.terrainUniforms[Yt].set(be[Yt])}for(const Yt in this.fixedUniforms)this.fixedUniforms[Yt].set(pe[Yt]);xt&&xt.setUniforms(l,this.binderUniforms,ct,{zoom:pt});let Zt=0;switch(p){case Et.LINES:Zt=2;break;case Et.TRIANGLES:Zt=3;break;case Et.LINE_STRIP:Zt=1}for(const Yt of at.get()){const Xt=Yt.vaos||(Yt.vaos={});(Xt[Ae]||(Xt[Ae]=new Na)).bind(l,this,Ne,xt?xt.getPaintVertexBuffers():[],Ge,Yt.vertexOffset,At,Tt,Rt),Et.drawElements(p,Yt.primitiveLength*Zt,Et.UNSIGNED_SHORT,Yt.primitiveOffset*Zt*2)}}}function jn(R,l,p){const z=1/St(p,1,l.transform.tileZoom),j=Math.pow(2,p.tileID.overscaledZ),q=p.tileSize*Math.pow(2,l.transform.tileZoom)/j,ie=q*(p.tileID.canonical.x+p.tileID.wrap*j),pe=q*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[z,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[ie>>16,pe>>16],u_pixel_coord_lower:[65535&ie,65535&pe]}}const aa=(R,l,p,z)=>{const j=l.style.light,q=j.properties.get("position"),ie=[q.x,q.y,q.z],pe=function(){var Ae=new n.A(9);return n.A!=Float32Array&&(Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[5]=0,Ae[6]=0,Ae[7]=0),Ae[0]=1,Ae[4]=1,Ae[8]=1,Ae}();j.properties.get("anchor")==="viewport"&&function(Ae,Ne){var Ge=Math.sin(Ne),at=Math.cos(Ne);Ae[0]=at,Ae[1]=Ge,Ae[2]=0,Ae[3]=-Ge,Ae[4]=at,Ae[5]=0,Ae[6]=0,Ae[7]=0,Ae[8]=1}(pe,-l.transform.angle),function(Ae,Ne,Ge){var at=Ne[0],ct=Ne[1],pt=Ne[2];Ae[0]=at*Ge[0]+ct*Ge[3]+pt*Ge[6],Ae[1]=at*Ge[1]+ct*Ge[4]+pt*Ge[7],Ae[2]=at*Ge[2]+ct*Ge[5]+pt*Ge[8]}(ie,ie,pe);const be=j.properties.get("color");return{u_matrix:R,u_lightpos:ie,u_lightintensity:j.properties.get("intensity"),u_lightcolor:[be.r,be.g,be.b],u_vertical_gradient:+p,u_opacity:z}},_a=(R,l,p,z,j,q,ie)=>n.e(aa(R,l,p,z),jn(q,l,ie),{u_height_factor:-Math.pow(2,j.overscaledZ)/ie.tileSize/8}),ga=R=>({u_matrix:R}),Fa=(R,l,p,z)=>n.e(ga(R),jn(p,l,z)),Ua=(R,l)=>({u_matrix:R,u_world:l}),gn=(R,l,p,z,j)=>n.e(Fa(R,l,p,z),{u_world:j}),Un=(R,l,p,z)=>{const j=R.transform;let q,ie;if(z.paint.get("circle-pitch-alignment")==="map"){const pe=St(p,1,j.zoom);q=!0,ie=[pe,pe]}else q=!1,ie=j.pixelsToGLUnits;return{u_camera_to_center_distance:j.cameraToCenterDistance,u_scale_with_map:+(z.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(l.posMatrix,p,z.paint.get("circle-translate"),z.paint.get("circle-translate-anchor")),u_pitch_with_map:+q,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:ie}},tn=(R,l)=>({u_matrix:l,u_pixel_extrude_scale:[1/R.width,1/R.height]}),un=(R,l,p)=>({u_matrix:R,u_inv_matrix:l,u_camera_to_center_distance:p.cameraToCenterDistance,u_viewport_size:[p.width,p.height]}),mn=(R,l,p=1)=>({u_matrix:R,u_color:l,u_overlay:0,u_overlay_scale:p}),zn=R=>({u_matrix:R}),On=(R,l,p,z)=>({u_matrix:R,u_extrude_scale:St(l,1,p),u_intensity:z}),Zn=(R,l,p,z)=>{const j=n.H();n.aQ(j,0,R.width,R.height,0,0,1);const q=R.context.gl;return{u_matrix:j,u_world:[q.drawingBufferWidth,q.drawingBufferHeight],u_image:p,u_color_ramp:z,u_opacity:l.paint.get("heatmap-opacity")}},Vn=(R,l,p,z)=>{const j=p.paint.get("hillshade-shadow-color"),q=p.paint.get("hillshade-highlight-color"),ie=p.paint.get("hillshade-accent-color");let pe=p.paint.get("hillshade-illumination-direction")*(Math.PI/180);p.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=R.transform.angle);const be=!R.options.moving;return{u_matrix:z?z.posMatrix:R.transform.calculatePosMatrix(l.tileID.toUnwrapped(),be),u_image:0,u_latrange:cn(0,l.tileID),u_light:[p.paint.get("hillshade-exaggeration"),pe],u_shadow:j,u_highlight:q,u_accent:ie}},Pn=(R,l)=>{const p=l.stride,z=n.H();return n.aQ(z,0,n.X,-n.X,0,0,1),n.J(z,z,[0,-n.X,0]),{u_matrix:z,u_image:1,u_dimension:[p,p],u_zoom:R.overscaledZ,u_unpack:l.getUnpackVector()}};function cn(R,l){const p=Math.pow(2,l.canonical.z),z=l.canonical.y;return[new n.Z(0,z/p).toLngLat().lat,new n.Z(0,(z+1)/p).toLngLat().lat]}const sn=(R,l,p,z)=>{const j=R.transform;return{u_matrix:ua(R,l,p,z),u_ratio:1/St(l,1,j.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/j.pixelsToGLUnits[0],1/j.pixelsToGLUnits[1]]}},Tn=(R,l,p,z,j)=>n.e(sn(R,l,p,j),{u_image:0,u_image_height:z}),Xn=(R,l,p,z,j)=>{const q=R.transform,ie=la(l,q);return{u_matrix:ua(R,l,p,j),u_texsize:l.imageAtlasTexture.size,u_ratio:1/St(l,1,q.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[ie,z.fromScale,z.toScale],u_fade:z.t,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},ca=(R,l,p,z,j,q)=>{const ie=R.transform,pe=R.lineAtlas,be=la(l,ie),Ae=p.layout.get("line-cap")==="round",Ne=pe.getDash(z.from,Ae),Ge=pe.getDash(z.to,Ae),at=Ne.width*j.fromScale,ct=Ge.width*j.toScale;return n.e(sn(R,l,p,q),{u_patternscale_a:[be/at,-Ne.height/2],u_patternscale_b:[be/ct,-Ge.height/2],u_sdfgamma:pe.width/(256*Math.min(at,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Ne.y,u_tex_y_b:Ge.y,u_mix:j.t})};function la(R,l){return 1/St(R,1,l.tileZoom)}function ua(R,l,p,z){return R.translatePosMatrix(z?z.posMatrix:l.tileID.posMatrix,l,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}const Aa=(R,l,p,z,j)=>{return{u_matrix:R,u_tl_parent:l,u_scale_parent:p,u_buffer_scale:1,u_fade_t:z.mix,u_opacity:z.opacity*j.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:j.paint.get("raster-brightness-min"),u_brightness_high:j.paint.get("raster-brightness-max"),u_saturation_factor:(ie=j.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(q=j.paint.get("raster-contrast"),q>0?1/(1-q):1+q),u_spin_weights:ka(j.paint.get("raster-hue-rotate"))};var q,ie};function ka(R){R*=Math.PI/180;const l=Math.sin(R),p=Math.cos(R);return[(2*p+1)/3,(-Math.sqrt(3)*l-p+1)/3,(Math.sqrt(3)*l-p+1)/3]}const Ba=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct)=>{const pt=ie.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:pt.width/pt.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:be,u_coord_matrix:Ae,u_is_text:+Ge,u_pitch_with_map:+z,u_is_along_line:j,u_is_variable_anchor:q,u_texsize:at,u_texture:0,u_translation:Ne,u_pitched_scale:ct}},xa=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct,pt)=>{const xt=ie.transform;return n.e(Ba(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,pt),{u_gamma_scale:z?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:+ct})},Ca=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct)=>n.e(xa(R,l,p,z,j,q,ie,pe,be,Ae,Ne,!0,Ge,!0,ct),{u_texsize_icon:at,u_texture_icon:1}),za=(R,l,p)=>({u_matrix:R,u_opacity:l,u_color:p}),Ka=(R,l,p,z,j,q)=>n.e(function(ie,pe,be,Ae){const Ne=be.imageManager.getPattern(ie.from.toString()),Ge=be.imageManager.getPattern(ie.to.toString()),{width:at,height:ct}=be.imageManager.getPixelSize(),pt=Math.pow(2,Ae.tileID.overscaledZ),xt=Ae.tileSize*Math.pow(2,be.transform.tileZoom)/pt,At=xt*(Ae.tileID.canonical.x+Ae.tileID.wrap*pt),Tt=xt*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ne.tl,u_pattern_br_a:Ne.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[at,ct],u_mix:pe.t,u_pattern_size_a:Ne.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/St(Ae,1,be.transform.tileZoom),u_pixel_coord_upper:[At>>16,Tt>>16],u_pixel_coord_lower:[65535&At,65535&Tt]}}(z,q,p,j),{u_matrix:R,u_opacity:l}),$a={fillExtrusion:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_lightpos:new n.aO(R,l.u_lightpos),u_lightintensity:new n.aJ(R,l.u_lightintensity),u_lightcolor:new n.aO(R,l.u_lightcolor),u_vertical_gradient:new n.aJ(R,l.u_vertical_gradient),u_opacity:new n.aJ(R,l.u_opacity)}),fillExtrusionPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_lightpos:new n.aO(R,l.u_lightpos),u_lightintensity:new n.aJ(R,l.u_lightintensity),u_lightcolor:new n.aO(R,l.u_lightcolor),u_vertical_gradient:new n.aJ(R,l.u_vertical_gradient),u_height_factor:new n.aJ(R,l.u_height_factor),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade),u_opacity:new n.aJ(R,l.u_opacity)}),fill:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix)}),fillPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),fillOutline:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world)}),fillOutlinePattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),circle:(R,l)=>({u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_scale_with_map:new n.aI(R,l.u_scale_with_map),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_extrude_scale:new n.aP(R,l.u_extrude_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_matrix:new n.aK(R,l.u_matrix)}),collisionBox:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_pixel_extrude_scale:new n.aP(R,l.u_pixel_extrude_scale)}),collisionCircle:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_inv_matrix:new n.aK(R,l.u_inv_matrix),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_viewport_size:new n.aP(R,l.u_viewport_size)}),debug:(R,l)=>({u_color:new n.aM(R,l.u_color),u_matrix:new n.aK(R,l.u_matrix),u_overlay:new n.aI(R,l.u_overlay),u_overlay_scale:new n.aJ(R,l.u_overlay_scale)}),clippingMask:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix)}),heatmap:(R,l)=>({u_extrude_scale:new n.aJ(R,l.u_extrude_scale),u_intensity:new n.aJ(R,l.u_intensity),u_matrix:new n.aK(R,l.u_matrix)}),heatmapTexture:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world),u_image:new n.aI(R,l.u_image),u_color_ramp:new n.aI(R,l.u_color_ramp),u_opacity:new n.aJ(R,l.u_opacity)}),hillshade:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_latrange:new n.aP(R,l.u_latrange),u_light:new n.aP(R,l.u_light),u_shadow:new n.aM(R,l.u_shadow),u_highlight:new n.aM(R,l.u_highlight),u_accent:new n.aM(R,l.u_accent)}),hillshadePrepare:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_dimension:new n.aP(R,l.u_dimension),u_zoom:new n.aJ(R,l.u_zoom),u_unpack:new n.aL(R,l.u_unpack)}),line:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels)}),lineGradient:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_image:new n.aI(R,l.u_image),u_image_height:new n.aJ(R,l.u_image_height)}),linePattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texsize:new n.aP(R,l.u_texsize),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_image:new n.aI(R,l.u_image),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),lineSDF:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_patternscale_a:new n.aP(R,l.u_patternscale_a),u_patternscale_b:new n.aP(R,l.u_patternscale_b),u_sdfgamma:new n.aJ(R,l.u_sdfgamma),u_image:new n.aI(R,l.u_image),u_tex_y_a:new n.aJ(R,l.u_tex_y_a),u_tex_y_b:new n.aJ(R,l.u_tex_y_b),u_mix:new n.aJ(R,l.u_mix)}),raster:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_tl_parent:new n.aP(R,l.u_tl_parent),u_scale_parent:new n.aJ(R,l.u_scale_parent),u_buffer_scale:new n.aJ(R,l.u_buffer_scale),u_fade_t:new n.aJ(R,l.u_fade_t),u_opacity:new n.aJ(R,l.u_opacity),u_image0:new n.aI(R,l.u_image0),u_image1:new n.aI(R,l.u_image1),u_brightness_low:new n.aJ(R,l.u_brightness_low),u_brightness_high:new n.aJ(R,l.u_brightness_high),u_saturation_factor:new n.aJ(R,l.u_saturation_factor),u_contrast_factor:new n.aJ(R,l.u_contrast_factor),u_spin_weights:new n.aO(R,l.u_spin_weights)}),symbolIcon:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texture:new n.aI(R,l.u_texture),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),symbolSDF:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texture:new n.aI(R,l.u_texture),u_gamma_scale:new n.aJ(R,l.u_gamma_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_is_halo:new n.aI(R,l.u_is_halo),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),symbolTextAndIcon:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texsize_icon:new n.aP(R,l.u_texsize_icon),u_texture:new n.aI(R,l.u_texture),u_texture_icon:new n.aI(R,l.u_texture_icon),u_gamma_scale:new n.aJ(R,l.u_gamma_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_is_halo:new n.aI(R,l.u_is_halo),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),background:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_opacity:new n.aJ(R,l.u_opacity),u_color:new n.aM(R,l.u_color)}),backgroundPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_opacity:new n.aJ(R,l.u_opacity),u_image:new n.aI(R,l.u_image),u_pattern_tl_a:new n.aP(R,l.u_pattern_tl_a),u_pattern_br_a:new n.aP(R,l.u_pattern_br_a),u_pattern_tl_b:new n.aP(R,l.u_pattern_tl_b),u_pattern_br_b:new n.aP(R,l.u_pattern_br_b),u_texsize:new n.aP(R,l.u_texsize),u_mix:new n.aJ(R,l.u_mix),u_pattern_size_a:new n.aP(R,l.u_pattern_size_a),u_pattern_size_b:new n.aP(R,l.u_pattern_size_b),u_scale_a:new n.aJ(R,l.u_scale_a),u_scale_b:new n.aJ(R,l.u_scale_b),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(R,l.u_tile_units_to_pixels)}),terrain:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texture:new n.aI(R,l.u_texture),u_ele_delta:new n.aJ(R,l.u_ele_delta),u_fog_matrix:new n.aK(R,l.u_fog_matrix),u_fog_color:new n.aM(R,l.u_fog_color),u_fog_ground_blend:new n.aJ(R,l.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(R,l.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(R,l.u_horizon_color),u_horizon_fog_blend:new n.aJ(R,l.u_horizon_fog_blend)}),terrainDepth:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ele_delta:new n.aJ(R,l.u_ele_delta)}),terrainCoords:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texture:new n.aI(R,l.u_texture),u_terrain_coords_id:new n.aJ(R,l.u_terrain_coords_id),u_ele_delta:new n.aJ(R,l.u_ele_delta)}),sky:(R,l)=>({u_sky_color:new n.aM(R,l.u_sky_color),u_horizon_color:new n.aM(R,l.u_horizon_color),u_horizon:new n.aJ(R,l.u_horizon),u_sky_horizon_blend:new n.aJ(R,l.u_sky_horizon_blend)})};class Oa{constructor(l,p,z){this.context=l;const j=l.gl;this.buffer=j.createBuffer(),this.dynamicDraw=!!z,this.context.unbindVAO(),l.bindElementBuffer.set(this.buffer),j.bufferData(j.ELEMENT_ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?j.DYNAMIC_DRAW:j.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(l){const p=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),p.bufferSubData(p.ELEMENT_ARRAY_BUFFER,0,l.arrayBuffer)}destroy(){const l=this.context.gl;this.buffer&&(l.deleteBuffer(this.buffer),delete this.buffer)}}const Ha={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ur{constructor(l,p,z,j){this.length=p.length,this.attributes=z,this.itemSize=p.bytesPerElement,this.dynamicDraw=j,this.context=l;const q=l.gl;this.buffer=q.createBuffer(),l.bindVertexBuffer.set(this.buffer),q.bufferData(q.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?q.DYNAMIC_DRAW:q.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){if(l.length!==this.length)throw new Error(`Length of new data is ${l.length}, which doesn't match current length of ${this.length}`);const p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,p){for(let z=0;z<this.attributes.length;z++){const j=this.attributes[z],q=p.attributes[j.name];q!==void 0&&l.enableVertexAttribArray(q)}}setVertexAttribPointers(l,p,z){for(let j=0;j<this.attributes.length;j++){const q=this.attributes[j],ie=p.attributes[q.name];ie!==void 0&&l.vertexAttribPointer(ie,q.components,l[Ha[q.type]],!1,this.itemSize,q.offset+this.itemSize*(z||0))}}destroy(){const l=this.context.gl;this.buffer&&(l.deleteBuffer(this.buffer),delete this.buffer)}}const kr=new WeakMap;function mi(R){var l;if(kr.has(R))return kr.get(R);{const p=(l=R.getParameter(R.VERSION))===null||l===void 0?void 0:l.startsWith("WebGL 2.0");return kr.set(R,p),p}}class xr{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class oo extends xr{getDefault(){return n.aN.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class ki extends xr{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class Ui extends xr{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class Do extends xr{getDefault(){return[!0,!0,!0,!0]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class ai extends xr{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class si extends xr{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class Ko extends xr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){const p=this.current;(l.func!==p.func||l.ref!==p.ref||l.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class fo extends xr{getDefault(){const l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Vo extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=l,this.dirty=!1}}class os extends xr{getDefault(){return[0,1]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class Mo extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=l,this.dirty=!1}}class Tl extends xr{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class Cl extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.BLEND):p.disable(p.BLEND),this.current=l,this.dirty=!1}}class El extends xr{getDefault(){const l=this.gl;return[l.ONE,l.ZERO]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.blendFunc(l[0],l[1]),this.current=l,this.dirty=!1)}}class Ro extends xr{getDefault(){return n.aN.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class qs extends xr{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class ms extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=l,this.dirty=!1}}class Si extends xr{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class Ji extends xr{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class Al extends xr{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class Zs extends xr{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class Ls extends xr{getDefault(){const l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class Ml extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class Fs extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Il extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindTexture(p.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class Pl extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Xs extends xr{getDefault(){return null}set(l){const p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class ko extends xr{getDefault(){return null}set(l){var p;if(l===this.current&&!this.dirty)return;const z=this.gl;mi(z)?z.bindVertexArray(l):(p=z.getExtension("OES_vertex_array_object"))===null||p===void 0||p.bindVertexArrayOES(l),this.current=l,this.dirty=!1}}class Uc extends xr{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class Pc extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class Hl extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class Gc extends xr{constructor(l,p){super(l),this.context=l,this.parent=p}getDefault(){return null}}class Qc extends Gc{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class gs extends Gc{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class eu extends Gc{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_STENCIL_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Pu{constructor(l,p,z,j,q){this.context=l,this.width=p,this.height=z;const ie=l.gl,pe=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new Qc(l,pe),j)this.depthAttachment=q?new eu(l,pe):new gs(l,pe);else if(q)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const l=this.context.gl,p=this.colorAttachment.get();if(p&&l.deleteTexture(p),this.depthAttachment){const z=this.depthAttachment.get();z&&l.deleteRenderbuffer(z)}l.deleteFramebuffer(this.framebuffer)}}class Yi{constructor(l,p,z){this.blendFunction=l,this.blendColor=p,this.mask=z}}Yi.Replace=[1,0],Yi.disabled=new Yi(Yi.Replace,n.aN.transparent,[!1,!1,!1,!1]),Yi.unblended=new Yi(Yi.Replace,n.aN.transparent,[!0,!0,!0,!0]),Yi.alphaBlended=new Yi([1,771],n.aN.transparent,[!0,!0,!0,!0]);class bc{constructor(l){var p,z;if(this.gl=l,this.clearColor=new oo(this),this.clearDepth=new ki(this),this.clearStencil=new Ui(this),this.colorMask=new Do(this),this.depthMask=new ai(this),this.stencilMask=new si(this),this.stencilFunc=new Ko(this),this.stencilOp=new fo(this),this.stencilTest=new Vo(this),this.depthRange=new os(this),this.depthTest=new Mo(this),this.depthFunc=new Tl(this),this.blend=new Cl(this),this.blendFunc=new El(this),this.blendColor=new Ro(this),this.blendEquation=new qs(this),this.cullFace=new ms(this),this.cullFaceSide=new Si(this),this.frontFace=new Ji(this),this.program=new Al(this),this.activeTexture=new Zs(this),this.viewport=new Ls(this),this.bindFramebuffer=new Ml(this),this.bindRenderbuffer=new Fs(this),this.bindTexture=new Il(this),this.bindVertexBuffer=new Pl(this),this.bindElementBuffer=new Xs(this),this.bindVertexArray=new ko(this),this.pixelStoreUnpack=new Uc(this),this.pixelStoreUnpackPremultiplyAlpha=new Pc(this),this.pixelStoreUnpackFlipY=new Hl(this),this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=l.getParameter(l.MAX_TEXTURE_SIZE),mi(l)){this.HALF_FLOAT=l.HALF_FLOAT;const j=l.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(p=l.RGBA16F)!==null&&p!==void 0?p:j==null?void 0:j.RGBA16F_EXT,this.RGB16F=(z=l.RGB16F)!==null&&z!==void 0?z:j==null?void 0:j.RGB16F_EXT,l.getExtension("EXT_color_buffer_float")}else{l.getExtension("EXT_color_buffer_half_float"),l.getExtension("OES_texture_half_float_linear");const j=l.getExtension("OES_texture_half_float");this.HALF_FLOAT=j==null?void 0:j.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(l,p){return new Oa(this,l,p)}createVertexBuffer(l,p,z){return new ur(this,l,p,z)}createRenderbuffer(l,p,z){const j=this.gl,q=j.createRenderbuffer();return this.bindRenderbuffer.set(q),j.renderbufferStorage(j.RENDERBUFFER,l,p,z),this.bindRenderbuffer.set(null),q}createFramebuffer(l,p,z,j){return new Pu(this,l,p,z,j)}clear({color:l,depth:p,stencil:z}){const j=this.gl;let q=0;l&&(q|=j.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(q|=j.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),z!==void 0&&(q|=j.STENCIL_BUFFER_BIT,this.clearStencil.set(z),this.stencilMask.set(255)),j.clear(q)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){n.aF(l.blendFunction,Yi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor)),this.colorMask.set(l.mask)}createVertexArray(){var l;return mi(this.gl)?this.gl.createVertexArray():(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.createVertexArrayOES()}deleteVertexArray(l){var p;return mi(this.gl)?this.gl.deleteVertexArray(l):(p=this.gl.getExtension("OES_vertex_array_object"))===null||p===void 0?void 0:p.deleteVertexArrayOES(l)}unbindVAO(){this.bindVertexArray.set(null)}}class Zr{constructor(l,p,z){this.func=l,this.mask=p,this.range=z}}Zr.ReadOnly=!1,Zr.ReadWrite=!0,Zr.disabled=new Zr(519,Zr.ReadOnly,[0,1]);const Wl=7680;class bi{constructor(l,p,z,j,q,ie){this.test=l,this.ref=p,this.mask=z,this.fail=j,this.depthFail=q,this.pass=ie}}bi.disabled=new bi({func:519,mask:0},0,0,Wl,Wl,Wl);class xi{constructor(l,p,z){this.enable=l,this.mode=p,this.frontFace=z}}let ys;function Yo(R,l,p,z,j){const q=R.context,ie=q.gl,pe=R.useProgram("collisionBox"),be=[];let Ae=0,Ne=0;for(let At=0;At<z.length;At++){const Tt=z[At],Rt=l.getTile(Tt).getBucket(p);if(!Rt)continue;const Et=j?Rt.textCollisionBox:Rt.iconCollisionBox,Zt=Rt.collisionCircleArray;if(Zt.length>0){const Yt=n.H();n.aR(Yt,Rt.placementInvProjMatrix,R.transform.glCoordMatrix),n.aR(Yt,Yt,Rt.placementViewportMatrix),be.push({circleArray:Zt,circleOffset:Ne,transform:Tt.posMatrix,invTransform:Yt,coord:Tt}),Ae+=Zt.length/4,Ne=Ae}Et&&pe.draw(q,ie.LINES,Zr.disabled,bi.disabled,R.colorModeForRenderPass(),xi.disabled,tn(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),p.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!j||!be.length)return;const Ge=R.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Ae),at._trim();let ct=0;for(const At of be)for(let Tt=0;Tt<At.circleArray.length/4;Tt++){const Rt=4*Tt,Et=At.circleArray[Rt+0],Zt=At.circleArray[Rt+1],Yt=At.circleArray[Rt+2],Xt=At.circleArray[Rt+3];at.emplace(ct++,Et,Zt,Yt,Xt,0),at.emplace(ct++,Et,Zt,Yt,Xt,1),at.emplace(ct++,Et,Zt,Yt,Xt,2),at.emplace(ct++,Et,Zt,Yt,Xt,3)}(!ys||ys.length<2*Ae)&&(ys=function(At){const Tt=2*At,Rt=new n.aU;Rt.resize(Tt),Rt._trim();for(let Et=0;Et<Tt;Et++){const Zt=6*Et;Rt.uint16[Zt+0]=4*Et+0,Rt.uint16[Zt+1]=4*Et+1,Rt.uint16[Zt+2]=4*Et+2,Rt.uint16[Zt+3]=4*Et+2,Rt.uint16[Zt+4]=4*Et+3,Rt.uint16[Zt+5]=4*Et+0}return Rt}(Ae));const pt=q.createIndexBuffer(ys,!0),xt=q.createVertexBuffer(at,n.aT.members,!0);for(const At of be){const Tt=un(At.transform,At.invTransform,R.transform);Ge.draw(q,ie.TRIANGLES,Zr.disabled,bi.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(At.coord),p.id,xt,pt,n.a0.simpleSegment(0,2*At.circleOffset,At.circleArray.length,At.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=n.ao(new Float32Array(16));function Bl(R,l,p,z,j){if(R.renderPass!=="translucent")return;const q=bi.disabled,ie=R.colorModeForRenderPass();(p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,be,Ae,Ne,Ge,at,ct,pt,xt){const At=be.transform,Tt=Bn(),Rt=Ge==="map",Et=at==="map";for(const Zt of pe){const Yt=Ne.getTile(Zt),Xt=Yt.getBucket(Ae);if(!Xt||!Xt.text||!Xt.text.segments.get().length)continue;const hn=Xt.textSizeData,xn=n.ah(hn,At.zoom),Nn=St(Yt,1,be.transform.zoom),Dn=Vt(Zt.posMatrix,Et,Rt,be.transform,Nn),Gn=Ae.layout.get("icon-text-fit")!=="none"&&Xt.hasIconData();if(xn){const Yn=Math.pow(2,At.zoom-Yt.tileID.overscaledZ),ya=be.style.map.terrain?(wa,ia)=>be.style.map.terrain.getElevation(Zt,wa,ia):null,ea=Tt.translatePosition(At,Yt,ct,pt);mo(Xt,Rt,Et,xt,At,Dn,Zt.posMatrix,Yn,xn,Gn,Tt,ea,Zt.toUnwrapped(),ya)}}}(z,R,p,l,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),j),p.paint.get("icon-opacity").constantOr(1)!==0&&ic(R,l,p,z,!1,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),p.layout.get("icon-rotation-alignment"),p.layout.get("icon-pitch-alignment"),p.layout.get("icon-keep-upright"),q,ie),p.paint.get("text-opacity").constantOr(1)!==0&&ic(R,l,p,z,!0,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.layout.get("text-keep-upright"),q,ie),l.map.showCollisionBoxes&&(Yo(R,l,p,z,!0),Yo(R,l,p,z,!1))}function Qo(R,l,p,z,j,q){const{horizontalAlign:ie,verticalAlign:pe}=n.av(R),be=-(ie-.5)*l,Ae=-(pe-.5)*p;return new n.P((be/j+z[0])*q,(Ae/j+z[1])*q)}function ss(R,l,p,z,j,q){const ie=l.tileAnchorPoint.add(new n.P(l.translation[0],l.translation[1]));if(l.pitchWithMap){let pe=z.mult(q);return p||(pe=pe.rotate(-j)),Ut(ie.add(pe),l.labelPlaneMatrix,l.getElevation).point}if(p){const pe=Ze(l.tileAnchorPoint.x+1,l.tileAnchorPoint.y,l).point.sub(R),be=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return R.add(z.rotate(be))}return R.add(z)}function mo(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,At=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let Rt=0;Rt<pt.length;Rt++){const Et=pt.get(Rt),Zt=R.allowVerticalPlacement&&!Et.placedOrientation,Yt=Et.hidden||!Et.crossTileID||Zt?null:z[Et.crossTileID];if(Yt){const Xt=new n.P(Et.anchorX,Et.anchorY),hn={getElevation:ct,width:j.width,height:j.height,labelPlaneMatrix:q,lineVertexArray:null,pitchWithMap:p,projection:Ne,projectionCache:null,tileAnchorPoint:Xt,translation:Ge,unwrappedTileID:at},xn=p?Ut(Xt,ie,ct):Ze(Xt.x,Xt.y,hn),Nn=ot(j.cameraToCenterDistance,xn.signedDistanceFromCamera);let Dn=n.aj(R.textSizeData,be,Et)*Nn/n.aq;p&&(Dn*=R.tilePixelRatio/pe);const{width:Gn,height:Yn,anchor:ya,textOffset:ea,textBoxScale:wa}=Yt,ia=Qo(ya,Gn,Yn,ea,wa,Dn),Ta=Ne.getPitchedTextCorrection(j,Xt.add(new n.P(Ge[0],Ge[1])),at),fa=ss(xn.point,hn,l,ia,j.angle,Ta),Ia=R.allowVerticalPlacement&&Et.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let qa=0;qa<Et.numGlyphs;qa++)n.ak(xt,fa,Ia);Ae&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:fa,angle:Ia})}else Dt(Et.numGlyphs,xt)}if(Ae){At.clear();const Rt=R.icon.placedSymbolArray;for(let Et=0;Et<Rt.length;Et++){const Zt=Rt.get(Et);if(Zt.hidden)Dt(Zt.numGlyphs,At);else{const Yt=Tt[Et];if(Yt)for(let Xt=0;Xt<Zt.numGlyphs;Xt++)n.ak(At,Yt.shiftedAnchor,Yt.angle);else Dt(Zt.numGlyphs,At)}}R.icon.dynamicLayoutVertexBuffer.updateData(At)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,l,p){return p.iconsInText&&l?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function ic(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge){const at=R.context,ct=at.gl,pt=R.transform,xt=Bn(),At=pe==="map",Tt=be==="map",Rt=pe!=="viewport"&&p.layout.get("symbol-placement")!=="point",Et=At&&!Tt&&!Rt,Zt=!Tt&&Rt,Yt=!p.layout.get("symbol-sort-key").isConstant();let Xt=!1;const hn=R.depthModeForSublayer(0,Zr.ReadOnly),xn=p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Nn=[],Dn=xt.getCircleRadiusCorrection(pt);for(const Gn of z){const Yn=l.getTile(Gn),ya=Yn.getBucket(p);if(!ya)continue;const ea=j?ya.text:ya.icon;if(!ea||!ea.segments.get().length||!ea.hasVisibleVertices)continue;const wa=ea.programConfigurations.get(p.id),ia=j||ya.sdfIcons,Ta=j?ya.textSizeData:ya.iconSizeData,fa=Tt||pt.pitch!==0,Ia=R.useProgram(ei(ia,j,ya),wa),qa=n.ah(Ta,pt.zoom),Ma=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Gn);let Ga,nr,Br,yr,Gr=[0,0],$r=null;if(j){if(nr=Yn.glyphAtlasTexture,Br=ct.LINEAR,Ga=Yn.glyphAtlasTexture.size,ya.iconsInText){Gr=Yn.imageAtlasTexture.size,$r=Yn.imageAtlasTexture;const Lr=Ta.kind==="composite"||Ta.kind==="camera";yr=fa||R.options.rotating||R.options.zooming||Lr?ct.LINEAR:ct.NEAREST}}else{const Lr=p.layout.get("icon-size").constantOr(0)!==1||ya.iconsNeedLinear;nr=Yn.imageAtlasTexture,Br=ia||R.options.rotating||R.options.zooming||Lr||fa?ct.LINEAR:ct.NEAREST,Ga=Yn.imageAtlasTexture.size}const Xr=St(Yn,1,R.transform.zoom),oi=Zt?Gn.posMatrix:xc,Ri=Vt(oi,Tt,At,R.transform,Xr),Li=$t(oi,Tt,At,R.transform,Xr),no=$t(Gn.posMatrix,Tt,At,R.transform,Xr),ci=xt.translatePosition(R.transform,Yn,q,ie),Kr=xn&&ya.hasTextData(),Ei=p.layout.get("icon-text-fit")!=="none"&&Kr&&ya.hasIconData();if(Rt){const Lr=R.style.map.terrain?(Xi,us)=>R.style.map.terrain.getElevation(Gn,Xi,us):null,_o=p.layout.get("text-rotation-alignment")==="map";ht(ya,Gn.posMatrix,R,j,Ri,no,Tt,Ae,_o,xt,Gn.toUnwrapped(),pt.width,pt.height,ci,Lr)}const pi=Gn.posMatrix,ni=j&&xn||Ei,ui=Rt||ni?xc:Ri,_i=Li,Yr=ia&&p.paint.get(j?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let As;As=ia?ya.iconsInText?Ca(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,Ga,Gr,Dn):xa(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,j,Ga,!0,Dn):Ba(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,j,Ga,Dn);const Gi={program:Ia,buffers:ea,uniformValues:As,atlasTexture:nr,atlasTextureIcon:$r,atlasInterpolation:Br,atlasInterpolationIcon:yr,isSDF:ia,hasHalo:Yr};if(Yt&&ya.canOverlap){Xt=!0;const Lr=ea.segments.get();for(const _o of Lr)Nn.push({segments:new n.a0([_o]),sortKey:_o.sortKey,state:Gi,terrainData:Ma})}else Nn.push({segments:ea.segments,sortKey:0,state:Gi,terrainData:Ma})}Xt&&Nn.sort((Gn,Yn)=>Gn.sortKey-Yn.sortKey);for(const Gn of Nn){const Yn=Gn.state;if(at.activeTexture.set(ct.TEXTURE0),Yn.atlasTexture.bind(Yn.atlasInterpolation,ct.CLAMP_TO_EDGE),Yn.atlasTextureIcon&&(at.activeTexture.set(ct.TEXTURE1),Yn.atlasTextureIcon&&Yn.atlasTextureIcon.bind(Yn.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),Yn.isSDF){const ya=Yn.uniformValues;Yn.hasHalo&&(ya.u_is_halo=1,tu(Yn.buffers,Gn.segments,p,R,Yn.program,hn,Ne,Ge,ya,Gn.terrainData)),ya.u_is_halo=0}tu(Yn.buffers,Gn.segments,p,R,Yn.program,hn,Ne,Ge,Yn.uniformValues,Gn.terrainData)}}function tu(R,l,p,z,j,q,ie,pe,be,Ae){const Ne=z.context,Ge=Ne.gl;j.draw(Ne,Ge.TRIANGLES,q,ie,pe,xi.disabled,be,Ae,p.id,R.layoutVertexBuffer,R.indexBuffer,l,p.paint,z.transform.zoom,R.programConfigurations.get(p.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function Ll(R,l,p,z){if(p.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const j=R.context,q=j.gl,ie=bi.disabled,pe=new Yi([q.ONE,q.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(be,Ae,Ne){const Ge=be.gl;be.activeTexture.set(Ge.TEXTURE1),be.viewport.set([0,0,Ae.width/4,Ae.height/4]);let at=Ne.heatmapFbo;if(at)Ge.bindTexture(Ge.TEXTURE_2D,at.colorAttachment.get()),be.bindFramebuffer.set(at.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),at=Ne.heatmapFbo=be.createFramebuffer(Ae.width/4,Ae.height/4,!1,!1),function(pt,xt,At,Tt){var Rt,Et;const Zt=pt.gl,Yt=(Rt=pt.HALF_FLOAT)!==null&&Rt!==void 0?Rt:Zt.UNSIGNED_BYTE,Xt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Zt.RGBA;Zt.texImage2D(Zt.TEXTURE_2D,0,Xt,xt.width/4,xt.height/4,0,Zt.RGBA,Yt,null),Tt.colorAttachment.set(At)}(be,Ae,ct,at)}})(j,R,p),j.clear({color:n.aN.transparent});for(let be=0;be<z.length;be++){const Ae=z[be];if(l.hasRenderableParent(Ae))continue;const Ne=l.getTile(Ae),Ge=Ne.getBucket(p);if(!Ge)continue;const at=Ge.programConfigurations.get(p.id),ct=R.useProgram("heatmap",at),{zoom:pt}=R.transform;ct.draw(j,q.TRIANGLES,Zr.disabled,ie,pe,xi.disabled,On(Ae.posMatrix,Ne,pt,p.paint.get("heatmap-intensity")),null,p.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,p.paint,R.transform.zoom,at)}j.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(j,q){const ie=j.context,pe=ie.gl,be=q.heatmapFbo;if(!be)return;ie.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,be.colorAttachment.get()),ie.activeTexture.set(pe.TEXTURE1);let Ae=q.colorRampTexture;Ae||(Ae=q.colorRampTexture=new L(ie,q.colorRamp,pe.RGBA)),Ae.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),j.useProgram("heatmapTexture").draw(ie,pe.TRIANGLES,Zr.disabled,bi.disabled,j.colorModeForRenderPass(),xi.disabled,Zn(j,q,0,1),null,q.id,j.viewportBuffer,j.quadTriangleIndexBuffer,j.viewportSegments,q.paint,j.transform.zoom)}(R,p))}function Fl(R,l,p,z,j){if(!p||!z||!z.imageAtlas)return;const q=z.imageAtlas.patternPositions;let ie=q[p.to.toString()],pe=q[p.from.toString()];if(!ie&&pe&&(ie=pe),!pe&&ie&&(pe=ie),!ie||!pe){const be=j.getPaintProperty(l);ie=q[be],pe=q[be]}ie&&pe&&R.setConstantPatternPositions(ie,pe)}function Bc(R,l,p,z,j,q,ie){const pe=R.context.gl,be="fill-pattern",Ae=p.paint.get(be),Ne=Ae&&Ae.constantOr(1),Ge=p.getCrossfadeParameters();let at,ct,pt,xt,At;ie?(ct=Ne&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=pe.LINES):(ct=Ne?"fillPattern":"fill",at=pe.TRIANGLES);const Tt=Ae.constantOr(null);for(const Rt of z){const Et=l.getTile(Rt);if(Ne&&!Et.patternsLoaded())continue;const Zt=Et.getBucket(p);if(!Zt)continue;const Yt=Zt.programConfigurations.get(p.id),Xt=R.useProgram(ct,Yt),hn=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Rt);Ne&&(R.context.activeTexture.set(pe.TEXTURE0),Et.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Yt.updatePaintBuffers(Ge)),Fl(Yt,be,Tt,Et,p);const xn=hn?Rt:null,Nn=xn?xn.posMatrix:Rt.posMatrix,Dn=R.translatePosMatrix(Nn,Et,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(ie){xt=Zt.indexBuffer2,At=Zt.segments2;const Gn=[pe.drawingBufferWidth,pe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Ne?gn(Dn,R,Ge,Et,Gn):Ua(Dn,Gn)}else xt=Zt.indexBuffer,At=Zt.segments,pt=Ne?Fa(Dn,R,Ge,Et):ga(Dn);Xt.draw(R.context,at,j,R.stencilModeForClipping(Rt),q,xi.disabled,pt,hn,p.id,Zt.layoutVertexBuffer,xt,At,p.paint,R.transform.zoom,Yt)}}function wc(R,l,p,z,j,q,ie){const pe=R.context,be=pe.gl,Ae="fill-extrusion-pattern",Ne=p.paint.get(Ae),Ge=Ne.constantOr(1),at=p.getCrossfadeParameters(),ct=p.paint.get("fill-extrusion-opacity"),pt=Ne.constantOr(null);for(const xt of z){const At=l.getTile(xt),Tt=At.getBucket(p);if(!Tt)continue;const Rt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(p.id),Zt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(be.TEXTURE0),At.imageAtlasTexture.bind(be.LINEAR,be.CLAMP_TO_EDGE),Et.updatePaintBuffers(at)),Fl(Et,Ae,pt,At,p);const Yt=R.translatePosMatrix(xt.posMatrix,At,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Xt=p.paint.get("fill-extrusion-vertical-gradient"),hn=Ge?_a(Yt,R,Xt,ct,xt,at,At):aa(Yt,R,Xt,ct);Zt.draw(pe,pe.gl.TRIANGLES,j,q,ie,xi.backCCW,hn,Rt,p.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,p.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,l,p,z,j,q,ie){const pe=R.context,be=pe.gl,Ae=p.fbo;if(!Ae)return;const Ne=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(l);pe.activeTexture.set(be.TEXTURE0),be.bindTexture(be.TEXTURE_2D,Ae.colorAttachment.get());const at=Ge?l:null;Ne.draw(pe,be.TRIANGLES,j,q,ie,xi.disabled,Vn(R,p,z,at),Ge,z.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function hu(R,l,p,z,j,q){const ie=R.context,pe=ie.gl,be=l.dem;if(be&&be.data){const Ae=be.dim,Ne=be.stride,Ge=be.getPixels();if(ie.activeTexture.set(pe.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||R.getTileTexture(Ne),l.demTexture){const ct=l.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else l.demTexture=new L(ie,Ge,pe.RGBA,{premultiply:!1}),l.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);ie.activeTexture.set(pe.TEXTURE0);let at=l.fbo;if(!at){const ct=new L(ie,{width:Ae,height:Ae,data:null},pe.RGBA);ct.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),at=l.fbo=ie.createFramebuffer(Ae,Ae,!0,!1),at.colorAttachment.set(ct.texture)}ie.bindFramebuffer.set(at.framebuffer),ie.viewport.set([0,0,Ae,Ae]),R.useProgram("hillshadePrepare").draw(ie,pe.TRIANGLES,z,j,q,xi.disabled,Pn(l.tileID,be),null,p.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),l.needsHillshadePrepare=!1}}function vs(R,l,p,z,j,q){const ie=z.paint.get("raster-fade-duration");if(!q&&ie>0){const pe=u.now(),be=(pe-R.timeAdded)/ie,Ae=l?(pe-l.timeAdded)/ie:-1,Ne=p.getSource(),Ge=j.coveringZoomLevel({tileSize:Ne.tileSize,roundZoom:Ne.roundZoom}),at=!l||Math.abs(l.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=at&&R.refreshedUponExpiration?1:n.ad(at?be:1-Ae,0,1);return R.refreshedUponExpiration&&be>=1&&(R.refreshedUponExpiration=!1),l?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Os=new n.aN(1,0,0,1),Ol=new n.aN(0,1,0,1),_s=new n.aN(0,0,1,1),ti=new n.aN(1,0,1,1),Hc=new n.aN(0,1,1,1);function Wc(R){const l=R.transform.padding;Lc(R,R.transform.height-(l.top||0),3,Os),Lc(R,l.bottom||0,3,Ol),So(R,l.left||0,3,_s),So(R,R.transform.width-(l.right||0),3,ti);const p=R.transform.centerPoint;(function(z,j,q,ie){Sc(z,j-1,q-10,2,20,ie),Sc(z,j-10,q-1,20,2,ie)})(R,p.x,R.transform.height-p.y,Hc)}function Lc(R,l,p,z){Sc(R,0,l+p/2,R.transform.width,p,z)}function So(R,l,p,z){Sc(R,l-p/2,0,p,R.transform.height,z)}function Sc(R,l,p,z,j,q){const ie=R.context,pe=ie.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(l*R.pixelRatio,p*R.pixelRatio,z*R.pixelRatio,j*R.pixelRatio),ie.clear({color:q}),pe.disable(pe.SCISSOR_TEST)}function xu(R,l,p){const z=R.context,j=z.gl,q=p.posMatrix,ie=R.useProgram("debug"),pe=Zr.disabled,be=bi.disabled,Ae=R.colorModeForRenderPass(),Ne="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(p);z.activeTexture.set(j.TEXTURE0);const at=l.getTileByID(p.key).latestRawTileData,ct=at&&at.byteLength||0,pt=Math.floor(ct/1024),xt=l.getTile(p).tileSize,At=512/Math.min(xt,512)*(p.overscaledZ/R.transform.zoom)*.5;let Tt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Tt+=` => ${p.overscaledZ}`),function(Rt,Et){Rt.initDebugOverlayCanvas();const Zt=Rt.debugOverlayCanvas,Yt=Rt.context.gl,Xt=Rt.debugOverlayCanvas.getContext("2d");Xt.clearRect(0,0,Zt.width,Zt.height),Xt.shadowColor="white",Xt.shadowBlur=2,Xt.lineWidth=1.5,Xt.strokeStyle="white",Xt.textBaseline="top",Xt.font="bold 36px Open Sans, sans-serif",Xt.fillText(Et,5,5),Xt.strokeText(Et,5,5),Rt.debugOverlayTexture.update(Zt),Rt.debugOverlayTexture.bind(Yt.LINEAR,Yt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),ie.draw(z,j.TRIANGLES,pe,be,Yi.alphaBlended,xi.disabled,mn(q,n.aN.transparent,At),null,Ne,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),ie.draw(z,j.LINE_STRIP,pe,be,Ae,xi.disabled,mn(q,n.aN.red),Ge,Ne,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function oc(R,l,p){const z=R.context,j=z.gl,q=R.colorModeForRenderPass(),ie=new Zr(j.LEQUAL,Zr.ReadWrite,R.depthRangeFor3D),pe=R.useProgram("terrain"),be=l.getTerrainMesh();z.bindFramebuffer.set(null),z.viewport.set([0,0,R.width,R.height]);for(const Ae of p){const Ne=R.renderToTexture.getTexture(Ae),Ge=l.getTerrainData(Ae.tileID);z.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Ne.texture);const at=R.transform.calculatePosMatrix(Ae.tileID.toUnwrapped()),ct=l.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ae.tileID.toUnwrapped()),xt=_n(at,ct,pt,R.style.sky,R.transform.pitch);pe.draw(z,j.TRIANGLES,ie,bi.disabled,q,xi.backCCW,xt,Ge,"terrain",be.vertexBuffer,be.indexBuffer,be.segments)}}class sc{constructor(l,p,z){this.vertexBuffer=l,this.indexBuffer=p,this.segments=z}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class lc{constructor(l,p){this.context=new bc(l),this.transform=p,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ta}resize(l,p,z){if(this.width=Math.floor(l*z),this.height=Math.floor(p*z),this.pixelRatio=z,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const j of this.style._order)this.style._layers[j].resize()}setup(){const l=this.context,p=new n.aX;p.emplaceBack(0,0),p.emplaceBack(n.X,0),p.emplaceBack(0,n.X),p.emplaceBack(n.X,n.X),this.tileExtentBuffer=l.createVertexBuffer(p,va.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const z=new n.aX;z.emplaceBack(0,0),z.emplaceBack(n.X,0),z.emplaceBack(0,n.X),z.emplaceBack(n.X,n.X),this.debugBuffer=l.createVertexBuffer(z,va.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const j=new n.$;j.emplaceBack(0,0,0,0),j.emplaceBack(n.X,0,n.X,0),j.emplaceBack(0,n.X,0,n.X),j.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=l.createVertexBuffer(j,De.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const q=new n.aX;q.emplaceBack(0,0),q.emplaceBack(1,0),q.emplaceBack(0,1),q.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(q,va.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const ie=new n.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(ie);const pe=new n.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(pe);const be=this.context.gl;this.stencilClearMode=new bi({func:be.ALWAYS,mask:0},0,255,be.ZERO,be.ZERO,be.ZERO)}clearStencil(){const l=this.context,p=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const z=n.H();n.aQ(z,0,this.width,this.height,0,0,1),n.K(z,z,[p.drawingBufferWidth,p.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(l,p.TRIANGLES,Zr.disabled,this.stencilClearMode,Yi.disabled,xi.disabled,zn(z),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,p){if(this.currentStencilSource===l.source||!l.isTileClipped()||!p||!p.length)return;this.currentStencilSource=l.source;const z=this.context,j=z.gl;this.nextStencilID+p.length>256&&this.clearStencil(),z.setColorMode(Yi.disabled),z.setDepthMode(Zr.disabled);const q=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of p){const pe=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,be=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);q.draw(z,j.TRIANGLES,Zr.disabled,new bi({func:j.ALWAYS,mask:0},pe,255,j.KEEP,j.KEEP,j.REPLACE),Yi.disabled,xi.disabled,zn(ie.posMatrix),be,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,p=this.context.gl;return new bi({func:p.NOTEQUAL,mask:255},l,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(l){const p=this.context.gl;return new bi({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(l){const p=this.context.gl,z=l.sort((ie,pe)=>pe.overscaledZ-ie.overscaledZ),j=z[z.length-1].overscaledZ,q=z[0].overscaledZ-j+1;if(q>1){this.currentStencilSource=void 0,this.nextStencilID+q>256&&this.clearStencil();const ie={};for(let pe=0;pe<q;pe++)ie[pe+j]=new bi({func:p.GEQUAL,mask:255},pe+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=q,[ie,z]}return[{[j]:bi.disabled},z]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new Yi([l.CONSTANT_COLOR,l.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Yi.unblended:Yi.alphaBlended}depthModeForSublayer(l,p,z){if(!this.opaquePassEnabledForLayer())return Zr.disabled;const j=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new Zr(z||this.context.gl.LEQUAL,p,[j,j])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,p){var z;this.style=l,this.options=p,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(u.now()),this.imageManager.beginFrame();const j=this.style._order,q=this.style.sourceCaches,ie={},pe={},be={};for(const Ae in q){const Ne=q[Ae];Ne.used&&Ne.prepare(this.context),ie[Ae]=Ne.getVisibleCoordinates(),pe[Ae]=ie[Ae].slice().reverse(),be[Ae]=Ne.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ae=0;Ae<j.length;Ae++){const Ne=j[Ae];if(this.style._layers[Ne].is3D()){this.opaquePassCutoff=Ae;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ae of j){const Ne=this.style._layers[Ae];if(!Ne.hasOffscreenPass()||Ne.isHidden(this.transform.zoom))continue;const Ge=pe[Ne.source];(Ne.type==="custom"||Ge.length)&&this.renderLayer(this,q[Ne.source],Ne,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:p.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((z=this.style.stylesheet)===null||z===void 0)&&z.sky&&function(Ae,Ne){const Ge=Ae.context,at=Ge.gl,ct=((Rt,Et,Zt)=>({u_sky_color:Rt.properties.get("sky-color"),u_horizon_color:Rt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Zt,u_sky_horizon_blend:Rt.properties.get("sky-horizon-blend")*Et.height/2*Zt}))(Ne,Ae.style.map.transform,Ae.pixelRatio),pt=new Zr(at.LEQUAL,Zr.ReadWrite,[0,1]),xt=bi.disabled,At=Ae.colorModeForRenderPass(),Tt=Ae.useProgram("sky");if(!Ne.mesh){const Rt=new n.aX;Rt.emplaceBack(-1,-1),Rt.emplaceBack(1,-1),Rt.emplaceBack(1,1),Rt.emplaceBack(-1,1);const Et=new n.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Ne.mesh=new sc(Ge.createVertexBuffer(Rt,va.members),Ge.createIndexBuffer(Et),n.a0.simpleSegment(0,0,Rt.length,Et.length))}Tt.draw(Ge,at.TRIANGLES,pt,xt,At,xi.disabled,ct,void 0,"sky",Ne.mesh.vertexBuffer,Ne.mesh.indexBuffer,Ne.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=p.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=j.length-1;this.currentLayer>=0;this.currentLayer--){const Ae=this.style._layers[j[this.currentLayer]],Ne=q[Ae.source],Ge=ie[Ae.source];this._renderTileClippingMasks(Ae,Ge),this.renderLayer(this,Ne,Ae,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<j.length;this.currentLayer++){const Ae=this.style._layers[j[this.currentLayer]],Ne=q[Ae.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ae))continue;const Ge=(Ae.type==="symbol"?be:pe)[Ae.source];this._renderTileClippingMasks(Ae,ie[Ae.source]),this.renderLayer(this,Ne,Ae,Ge)}if(this.options.showTileBoundaries){const Ae=function(Ne,Ge){let at=null;const ct=Object.values(Ne._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Ne.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),At=Tt=>{(!at||at.getSource().maxzoom<Tt.getSource().maxzoom)&&(at=Tt)};return pt.forEach(Tt=>At(Tt)),at||xt.forEach(Tt=>At(Tt)),at}(this.style,this.transform.zoom);Ae&&function(Ne,Ge,at){for(let ct=0;ct<at.length;ct++)xu(Ne,Ge,at[ct])}(this,Ae,Ae.getVisibleCoordinates())}this.options.showPadding&&Wc(this),this.context.setDefault()}maybeDrawDepthAndCoords(l){if(!this.style||!this.style.map||!this.style.map.terrain)return;const p=this.terrainFacilitator.matrix,z=this.transform.modelViewProjectionMatrix;let j=this.terrainFacilitator.dirty;j||(j=l?!n.a_(p,z):!n.a$(p,z)),j||(j=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),j&&(n.b0(p,z),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(q,ie){const pe=q.context,be=pe.gl,Ae=Yi.unblended,Ne=new Zr(be.LEQUAL,Zr.ReadWrite,[0,1]),Ge=ie.getTerrainMesh(),at=ie.sourceCache.getRenderableTiles(),ct=q.useProgram("terrainDepth");pe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,q.width/devicePixelRatio,q.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1});for(const pt of at){const xt=ie.getTerrainData(pt.tileID),At={u_matrix:q.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(q.transform.zoom)};ct.draw(pe,be.TRIANGLES,Ne,bi.disabled,Ae,xi.backCCW,At,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,q.width,q.height])}(this,this.style.map.terrain),function(q,ie){const pe=q.context,be=pe.gl,Ae=Yi.unblended,Ne=new Zr(be.LEQUAL,Zr.ReadWrite,[0,1]),Ge=ie.getTerrainMesh(),at=ie.getCoordsTexture(),ct=ie.sourceCache.getRenderableTiles(),pt=q.useProgram("terrainCoords");pe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,q.width/devicePixelRatio,q.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1}),ie.coordsIndex=[];for(const xt of ct){const At=ie.getTerrainData(xt.tileID);pe.activeTexture.set(be.TEXTURE0),be.bindTexture(be.TEXTURE_2D,at.texture);const Tt={u_matrix:q.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(q.transform.zoom)};pt.draw(pe,be.TRIANGLES,Ne,bi.disabled,Ae,xi.backCCW,Tt,At,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),ie.coordsIndex.push(xt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,q.width,q.height])}(this,this.style.map.terrain))}renderLayer(l,p,z,j){if(!z.isHidden(this.transform.zoom)&&(z.type==="background"||z.type==="custom"||(j||[]).length))switch(this.id=z.id,z.type){case"symbol":Bl(l,p,z,j,this.style.placement.variableOffsets);break;case"circle":(function(q,ie,pe,be){if(q.renderPass!=="translucent")return;const Ae=pe.paint.get("circle-opacity"),Ne=pe.paint.get("circle-stroke-width"),Ge=pe.paint.get("circle-stroke-opacity"),at=!pe.layout.get("circle-sort-key").isConstant();if(Ae.constantOr(1)===0&&(Ne.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=q.context,pt=ct.gl,xt=q.depthModeForSublayer(0,Zr.ReadOnly),At=bi.disabled,Tt=q.colorModeForRenderPass(),Rt=[];for(let Et=0;Et<be.length;Et++){const Zt=be[Et],Yt=ie.getTile(Zt),Xt=Yt.getBucket(pe);if(!Xt)continue;const hn=Xt.programConfigurations.get(pe.id),xn=q.useProgram("circle",hn),Nn=Xt.layoutVertexBuffer,Dn=Xt.indexBuffer,Gn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Zt),Yn={programConfiguration:hn,program:xn,layoutVertexBuffer:Nn,indexBuffer:Dn,uniformValues:Un(q,Zt,Yt,pe),terrainData:Gn};if(at){const ya=Xt.segments.get();for(const ea of ya)Rt.push({segments:new n.a0([ea]),sortKey:ea.sortKey,state:Yn})}else Rt.push({segments:Xt.segments,sortKey:0,state:Yn})}at&&Rt.sort((Et,Zt)=>Et.sortKey-Zt.sortKey);for(const Et of Rt){const{programConfiguration:Zt,program:Yt,layoutVertexBuffer:Xt,indexBuffer:hn,uniformValues:xn,terrainData:Nn}=Et.state,Dn=Et.segments;Yt.draw(ct,pt.TRIANGLES,xt,At,Tt,xi.disabled,xn,Nn,pe.id,Xt,hn,Dn,pe.paint,q.transform.zoom,Zt)}})(l,p,z,j);break;case"heatmap":Ll(l,p,z,j);break;case"line":(function(q,ie,pe,be){if(q.renderPass!=="translucent")return;const Ae=pe.paint.get("line-opacity"),Ne=pe.paint.get("line-width");if(Ae.constantOr(1)===0||Ne.constantOr(1)===0)return;const Ge=q.depthModeForSublayer(0,Zr.ReadOnly),at=q.colorModeForRenderPass(),ct=pe.paint.get("line-dasharray"),pt=pe.paint.get("line-pattern"),xt=pt.constantOr(1),At=pe.paint.get("line-gradient"),Tt=pe.getCrossfadeParameters(),Rt=xt?"linePattern":ct?"lineSDF":At?"lineGradient":"line",Et=q.context,Zt=Et.gl;let Yt=!0;for(const Xt of be){const hn=ie.getTile(Xt);if(xt&&!hn.patternsLoaded())continue;const xn=hn.getBucket(pe);if(!xn)continue;const Nn=xn.programConfigurations.get(pe.id),Dn=q.context.program.get(),Gn=q.useProgram(Rt,Nn),Yn=Yt||Gn.program!==Dn,ya=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Xt),ea=pt.constantOr(null);if(ea&&hn.imageAtlas){const Ta=hn.imageAtlas,fa=Ta.patternPositions[ea.to.toString()],Ia=Ta.patternPositions[ea.from.toString()];fa&&Ia&&Nn.setConstantPatternPositions(fa,Ia)}const wa=ya?Xt:null,ia=xt?Xn(q,hn,pe,Tt,wa):ct?ca(q,hn,pe,ct,Tt,wa):At?Tn(q,hn,pe,xn.lineClipsArray.length,wa):sn(q,hn,pe,wa);if(xt)Et.activeTexture.set(Zt.TEXTURE0),hn.imageAtlasTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE),Nn.updatePaintBuffers(Tt);else if(ct&&(Yn||q.lineAtlas.dirty))Et.activeTexture.set(Zt.TEXTURE0),q.lineAtlas.bind(Et);else if(At){const Ta=xn.gradients[pe.id];let fa=Ta.texture;if(pe.gradientVersion!==Ta.version){let Ia=256;if(pe.stepInterpolant){const qa=ie.getSource().maxzoom,Ma=Xt.canonical.z===qa?Math.ceil(1<<q.transform.maxZoom-Xt.canonical.z):1,Ga=xn.maxLineLength/n.X*1024*Ma;Ia=n.ad(n.aV(Ga),256,Et.maxTextureSize)}Ta.gradient=n.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Ia,image:Ta.gradient||void 0,clips:xn.lineClipsArray}),Ta.texture?Ta.texture.update(Ta.gradient):Ta.texture=new L(Et,Ta.gradient,Zt.RGBA),Ta.version=pe.gradientVersion,fa=Ta.texture}Et.activeTexture.set(Zt.TEXTURE0),fa.bind(pe.stepInterpolant?Zt.NEAREST:Zt.LINEAR,Zt.CLAMP_TO_EDGE)}Gn.draw(Et,Zt.TRIANGLES,Ge,q.stencilModeForClipping(Xt),at,xi.disabled,ia,ya,pe.id,xn.layoutVertexBuffer,xn.indexBuffer,xn.segments,pe.paint,q.transform.zoom,Nn,xn.layoutVertexBuffer2),Yt=!1}})(l,p,z,j);break;case"fill":(function(q,ie,pe,be){const Ae=pe.paint.get("fill-color"),Ne=pe.paint.get("fill-opacity");if(Ne.constantOr(1)===0)return;const Ge=q.colorModeForRenderPass(),at=pe.paint.get("fill-pattern"),ct=q.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Ae.constantOr(n.aN.transparent).a===1&&Ne.constantOr(0)===1?"opaque":"translucent";if(q.renderPass===ct){const pt=q.depthModeForSublayer(1,q.renderPass==="opaque"?Zr.ReadWrite:Zr.ReadOnly);Bc(q,ie,pe,be,pt,Ge,!1)}if(q.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const pt=q.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,Zr.ReadOnly);Bc(q,ie,pe,be,pt,Ge,!0)}})(l,p,z,j);break;case"fill-extrusion":(function(q,ie,pe,be){const Ae=pe.paint.get("fill-extrusion-opacity");if(Ae!==0&&q.renderPass==="translucent"){const Ne=new Zr(q.context.gl.LEQUAL,Zr.ReadWrite,q.depthRangeFor3D);if(Ae!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))wc(q,ie,pe,be,Ne,bi.disabled,Yi.disabled),wc(q,ie,pe,be,Ne,q.stencilModeFor3D(),q.colorModeForRenderPass());else{const Ge=q.colorModeForRenderPass();wc(q,ie,pe,be,Ne,bi.disabled,Ge)}}})(l,p,z,j);break;case"hillshade":(function(q,ie,pe,be){if(q.renderPass!=="offscreen"&&q.renderPass!=="translucent")return;const Ae=q.context,Ne=q.depthModeForSublayer(0,Zr.ReadOnly),Ge=q.colorModeForRenderPass(),[at,ct]=q.renderPass==="translucent"?q.stencilConfigForOverlap(be):[{},be];for(const pt of ct){const xt=ie.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&q.renderPass==="offscreen"?hu(q,xt,pe,Ne,bi.disabled,Ge):q.renderPass==="translucent"&&kc(q,pt,xt,pe,Ne,at[pt.overscaledZ],Ge)}Ae.viewport.set([0,0,q.width,q.height])})(l,p,z,j);break;case"raster":(function(q,ie,pe,be){if(q.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!be.length)return;const Ae=q.context,Ne=Ae.gl,Ge=ie.getSource(),at=q.useProgram("raster"),ct=q.colorModeForRenderPass(),[pt,xt]=Ge instanceof Be?[{},be]:q.stencilConfigForOverlap(be),At=xt[xt.length-1].overscaledZ,Tt=!q.options.moving;for(const Rt of xt){const Et=q.depthModeForSublayer(Rt.overscaledZ-At,pe.paint.get("raster-opacity")===1?Zr.ReadWrite:Zr.ReadOnly,Ne.LESS),Zt=ie.getTile(Rt);Zt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Yt=ie.findLoadedParent(Rt,0),Xt=ie.findLoadedSibling(Rt),hn=vs(Zt,Yt||Xt||null,ie,pe,q.transform,q.style.map.terrain);let xn,Nn;const Dn=pe.paint.get("raster-resampling")==="nearest"?Ne.NEAREST:Ne.LINEAR;Ae.activeTexture.set(Ne.TEXTURE0),Zt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),Ae.activeTexture.set(Ne.TEXTURE1),Yt?(Yt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),xn=Math.pow(2,Yt.tileID.overscaledZ-Zt.tileID.overscaledZ),Nn=[Zt.tileID.canonical.x*xn%1,Zt.tileID.canonical.y*xn%1]):Zt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),Zt.texture.useMipmap&&Ae.extTextureFilterAnisotropic&&q.transform.pitch>20&&Ne.texParameterf(Ne.TEXTURE_2D,Ae.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ae.extTextureFilterAnisotropicMax);const Gn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Rt),Yn=Gn?Rt:null,ya=Yn?Yn.posMatrix:q.transform.calculatePosMatrix(Rt.toUnwrapped(),Tt),ea=Aa(ya,Nn||[0,0],xn||1,hn,pe);Ge instanceof Be?at.draw(Ae,Ne.TRIANGLES,Et,bi.disabled,ct,xi.disabled,ea,Gn,pe.id,Ge.boundsBuffer,q.quadTriangleIndexBuffer,Ge.boundsSegments):at.draw(Ae,Ne.TRIANGLES,Et,pt[Rt.overscaledZ],ct,xi.disabled,ea,Gn,pe.id,q.rasterBoundsBuffer,q.quadTriangleIndexBuffer,q.rasterBoundsSegments)}})(l,p,z,j);break;case"background":(function(q,ie,pe,be){const Ae=pe.paint.get("background-color"),Ne=pe.paint.get("background-opacity");if(Ne===0)return;const Ge=q.context,at=Ge.gl,ct=q.transform,pt=ct.tileSize,xt=pe.paint.get("background-pattern");if(q.isPatternMissing(xt))return;const At=!xt&&Ae.a===1&&Ne===1&&q.opaquePassEnabledForLayer()?"opaque":"translucent";if(q.renderPass!==At)return;const Tt=bi.disabled,Rt=q.depthModeForSublayer(0,At==="opaque"?Zr.ReadWrite:Zr.ReadOnly),Et=q.colorModeForRenderPass(),Zt=q.useProgram(xt?"backgroundPattern":"background"),Yt=be||ct.coveringTiles({tileSize:pt,terrain:q.style.map.terrain});xt&&(Ge.activeTexture.set(at.TEXTURE0),q.imageManager.bind(q.context));const Xt=pe.getCrossfadeParameters();for(const hn of Yt){const xn=be?hn.posMatrix:q.transform.calculatePosMatrix(hn.toUnwrapped()),Nn=xt?Ka(xn,Ne,q,xt,{tileID:hn,tileSize:pt},Xt):za(xn,Ne,Ae),Dn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(hn);Zt.draw(Ge,at.TRIANGLES,Rt,Tt,Et,xi.disabled,Nn,Dn,pe.id,q.tileExtentBuffer,q.quadTriangleIndexBuffer,q.tileExtentSegments)}})(l,0,z,j);break;case"custom":(function(q,ie,pe){const be=q.context,Ae=pe.implementation;if(q.renderPass==="offscreen"){const Ne=Ae.prerender;Ne&&(q.setCustomLayerDefaults(),be.setColorMode(q.colorModeForRenderPass()),Ne.call(Ae,be.gl,q.transform.customLayerMatrix()),be.setDirty(),q.setBaseState())}else if(q.renderPass==="translucent"){q.setCustomLayerDefaults(),be.setColorMode(q.colorModeForRenderPass()),be.setStencilMode(bi.disabled);const Ne=Ae.renderingMode==="3d"?new Zr(q.context.gl.LEQUAL,Zr.ReadWrite,q.depthRangeFor3D):q.depthModeForSublayer(0,Zr.ReadOnly);be.setDepthMode(Ne),Ae.render(be.gl,q.transform.customLayerMatrix(),{farZ:q.transform.farZ,nearZ:q.transform.nearZ,fov:q.transform._fov,modelViewProjectionMatrix:q.transform.modelViewProjectionMatrix,projectionMatrix:q.transform.projectionMatrix}),be.setDirty(),q.setBaseState(),be.bindFramebuffer.set(null)}})(l,0,z)}}translatePosMatrix(l,p,z,j,q){if(!z[0]&&!z[1])return l;const ie=q?j==="map"?this.transform.angle:0:j==="viewport"?-this.transform.angle:0;if(ie){const Ae=Math.sin(ie),Ne=Math.cos(ie);z=[z[0]*Ne-z[1]*Ae,z[0]*Ae+z[1]*Ne]}const pe=[q?z[0]:St(p,z[0],this.transform.zoom),q?z[1]:St(p,z[1],this.transform.zoom),0],be=new Float32Array(16);return n.J(be,l,pe),be}saveTileTexture(l){const p=this._tileTextures[l.size[0]];p?p.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const p=this._tileTextures[l];return p&&p.length>0?p.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const p=this.imageManager.getPattern(l.from.toString()),z=this.imageManager.getPattern(l.to.toString());return!p||!z}useProgram(l,p){this.cache=this.cache||{};const z=l+(p?p.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[z]||(this.cache[z]=new na(this.context,ba[l],p,$a[l],this._showOverdrawInspector,this.style.map.terrain)),this.cache[z]}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 l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const l=this.context.gl;this.debugOverlayTexture=new L(this.context,this.debugOverlayCanvas,l.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:l,drawingBufferHeight:p}=this.context.gl;return this.width!==l||this.height!==p}}class zs{constructor(l,p){this.points=l,this.planes=p}static fromInvProjectionMatrix(l,p,z){const j=Math.pow(2,z),q=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(pe=>{const be=1/(pe=n.ag([],pe,l))[3]/p*j;return n.b1(pe,pe,[be,be,1/pe[3],be])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const be=function(at,ct){var pt=ct[0],xt=ct[1],At=ct[2],Tt=pt*pt+xt*xt+At*At;return Tt>0&&(Tt=1/Math.sqrt(Tt)),at[0]=ct[0]*Tt,at[1]=ct[1]*Tt,at[2]=ct[2]*Tt,at}([],function(at,ct,pt){var xt=ct[0],At=ct[1],Tt=ct[2],Rt=pt[0],Et=pt[1],Zt=pt[2];return at[0]=At*Zt-Tt*Et,at[1]=Tt*Rt-xt*Zt,at[2]=xt*Et-At*Rt,at}([],B([],q[pe[0]],q[pe[1]]),B([],q[pe[2]],q[pe[1]]))),Ae=(Ne=be,Ge=q[pe[1]],-(Ne[0]*Ge[0]+Ne[1]*Ge[1]+Ne[2]*Ge[2]));var Ne,Ge;return be.concat(Ae)});return new zs(q,ie)}}class bs{constructor(l,p){this.min=l,this.max=p,this.center=function(z,j,q){return z[0]=j[0]*q,z[1]=j[1]*q,z[2]=j[2]*q,z}([],function(z,j,q){return z[0]=j[0]+q[0],z[1]=j[1]+q[1],z[2]=j[2]+q[2],z}([],this.min,this.max),.5)}quadrant(l){const p=[l%2==0,l<2],z=C(this.min),j=C(this.max);for(let q=0;q<p.length;q++)z[q]=p[q]?this.min[q]:this.center[q],j[q]=p[q]?this.center[q]:this.max[q];return j[2]=this.max[2],new bs(z,j)}distanceX(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]}distanceY(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]}intersects(l){const p=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let z=!0;for(let j=0;j<l.planes.length;j++){const q=l.planes[j];let ie=0;for(let pe=0;pe<p.length;pe++)n.b2(q,p[pe])>=0&&ie++;if(ie===0)return 0;ie!==p.length&&(z=!1)}if(z)return 2;for(let j=0;j<3;j++){let q=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let pe=0;pe<l.points.length;pe++){const be=l.points[pe][j]-this.min[j];q=Math.min(q,be),ie=Math.max(ie,be)}if(ie<0||q>this.max[j]-this.min[j])return 0}return 1}}class zl{constructor(l=0,p=0,z=0,j=0){if(isNaN(l)||l<0||isNaN(p)||p<0||isNaN(z)||z<0||isNaN(j)||j<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=p,this.left=z,this.right=j}interpolate(l,p,z){return p.top!=null&&l.top!=null&&(this.top=n.z.number(l.top,p.top,z)),p.bottom!=null&&l.bottom!=null&&(this.bottom=n.z.number(l.bottom,p.bottom,z)),p.left!=null&&l.left!=null&&(this.left=n.z.number(l.left,p.left,z)),p.right!=null&&l.right!=null&&(this.right=n.z.number(l.right,p.right,z)),this}getCenter(l,p){const z=n.ad((this.left+l-this.right)/2,0,l),j=n.ad((this.top+p-this.bottom)/2,0,p);return new n.P(z,j)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new zl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Tc=85.051129;class di{constructor(l,p,z,j,q){this.tileSize=512,this._renderWorldCopies=q===void 0||!!q,this._minZoom=l||0,this._maxZoom=p||22,this._minPitch=z??0,this._maxPitch=j??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new n.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new zl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const l=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return l.apply(this),l}apply(l){this.tileSize=l.tileSize,this.latRange=l.latRange,this.width=l.width,this.height=l.height,this._center=l._center,this._elevation=l._elevation,this.minElevationForCurrentTile=l.minElevationForCurrentTile,this.zoom=l.zoom,this.angle=l.angle,this._fov=l._fov,this._pitch=l._pitch,this._unmodified=l._unmodified,this._edgeInsets=l._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))}get maxZoom(){return this._maxZoom}set maxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))}get minPitch(){return this._minPitch}set minPitch(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))}get maxPitch(){return this._maxPitch}set maxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new n.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(l){const p=-n.b3(l,-180,180)*Math.PI/180;this.angle!==p&&(this._unmodified=!1,this.angle=p,this._calcMatrices(),this.rotationMatrix=function(){var z=new n.A(4);return n.A!=Float32Array&&(z[1]=0,z[2]=0),z[0]=1,z[3]=1,z}(),function(z,j,q){var ie=j[0],pe=j[1],be=j[2],Ae=j[3],Ne=Math.sin(q),Ge=Math.cos(q);z[0]=ie*Ge+be*Ne,z[1]=pe*Ge+Ae*Ne,z[2]=ie*-Ne+be*Ge,z[3]=pe*-Ne+Ae*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(l){const p=n.ad(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==p&&(this._unmodified=!1,this._pitch=p,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=l/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(l){const p=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==p&&(this._unmodified=!1,this._zoom=p,this.tileZoom=Math.max(0,Math.floor(p)),this.scale=this.zoomScale(p),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(l){l!==this._elevation&&(this._elevation=l,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(l){return this._edgeInsets.equals(l)}interpolatePadding(l,p,z){this._unmodified=!1,this._edgeInsets.interpolate(l,p,z),this._constrain(),this._calcMatrices()}coveringZoomLevel(l){const p=(l.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/l.tileSize));return Math.max(0,p)}getVisibleUnwrappedCoordinates(l){const p=[new n.b4(0,l)];if(this._renderWorldCopies){const z=this.pointCoordinate(new n.P(0,0)),j=this.pointCoordinate(new n.P(this.width,0)),q=this.pointCoordinate(new n.P(this.width,this.height)),ie=this.pointCoordinate(new n.P(0,this.height)),pe=Math.floor(Math.min(z.x,j.x,q.x,ie.x)),be=Math.floor(Math.max(z.x,j.x,q.x,ie.x)),Ae=1;for(let Ne=pe-Ae;Ne<=be+Ae;Ne++)Ne!==0&&p.push(new n.b4(Ne,l))}return p}coveringTiles(l){var p,z;let j=this.coveringZoomLevel(l);const q=j;if(l.minzoom!==void 0&&j<l.minzoom)return[];l.maxzoom!==void 0&&j>l.maxzoom&&(j=l.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),pe=n.Z.fromLngLat(this.center),be=Math.pow(2,j),Ae=[be*ie.x,be*ie.y,0],Ne=[be*pe.x,be*pe.y,0],Ge=zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,j);let at=l.minzoom||0;!l.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=j);const ct=l.terrain?2/Math.min(this.tileSize,l.tileSize)*this.tileSize:3,pt=Et=>({aabb:new bs([Et*be,0,0],[(Et+1)*be,be,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],At=[],Tt=j,Rt=l.reparseOverscaled?q:j;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Zt=Et.x,Yt=Et.y;let Xt=Et.fullyVisible;if(!Xt){const Yn=Et.aabb.intersects(Ge);if(Yn===0)continue;Xt=Yn===2}const hn=l.terrain?Ae:Ne,xn=Et.aabb.distanceX(hn),Nn=Et.aabb.distanceY(hn),Dn=Math.max(Math.abs(xn),Math.abs(Nn)),Gn=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Dn>Gn&&Et.zoom>=at){const Yn=Tt-Et.zoom,ya=Ae[0]-.5-(Zt<<Yn),ea=Ae[1]-.5-(Yt<<Yn);At.push({tileID:new n.S(Et.zoom===Tt?Rt:Et.zoom,Et.wrap,Et.zoom,Zt,Yt),distanceSq:E([Ne[0]-.5-Zt,Ne[1]-.5-Yt]),tileDistanceToCamera:Math.sqrt(ya*ya+ea*ea)})}else for(let Yn=0;Yn<4;Yn++){const ya=(Zt<<1)+Yn%2,ea=(Yt<<1)+(Yn>>1),wa=Et.zoom+1;let ia=Et.aabb.quadrant(Yn);if(l.terrain){const Ta=new n.S(wa,Et.wrap,wa,ya,ea),fa=l.terrain.getMinMaxElevation(Ta),Ia=(p=fa.minElevation)!==null&&p!==void 0?p:this.elevation,qa=(z=fa.maxElevation)!==null&&z!==void 0?z:this.elevation;ia=new bs([ia.min[0],ia.min[1],Ia],[ia.max[0],ia.max[1],qa])}xt.push({aabb:ia,zoom:wa,x:ya,y:ea,wrap:Et.wrap,fullyVisible:Xt})}}return At.sort((Et,Zt)=>Et.distanceSq-Zt.distanceSq).map(Et=>Et.tileID)}resize(l,p){this.width=l,this.height=p,this.pixelsToGLUnits=[2/l,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(l){return Math.pow(2,l)}scaleZoom(l){return Math.log(l)/Math.LN2}project(l){const p=n.ad(l.lat,-85.051129,Tc);return new n.P(n.O(l.lng)*this.worldSize,n.Q(p)*this.worldSize)}unproject(l){return new n.Z(l.x/this.worldSize,l.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(l){const p=this.elevation,z=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,j=this.pointLocation(this.centerPoint,l),q=l.getElevationForLngLatZoom(j,this.tileZoom);if(!(this.elevation-q))return;const ie=z+p-q,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/n.b5(1,j.lat)/this.tileSize,be=this.scaleZoom(pe);this._elevation=q,this._center=j,this.zoom=be}setLocationAtPoint(l,p){const z=this.pointCoordinate(p),j=this.pointCoordinate(this.centerPoint),q=this.locationCoordinate(l),ie=new n.Z(q.x-(z.x-j.x),q.y-(z.y-j.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(l,p){return p?this.coordinatePoint(this.locationCoordinate(l),p.getElevationForLngLatZoom(l,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(l))}pointLocation(l,p){return this.coordinateLocation(this.pointCoordinate(l,p))}locationCoordinate(l){return n.Z.fromLngLat(l)}coordinateLocation(l){return l&&l.toLngLat()}pointCoordinate(l,p){if(p){const pt=p.pointCoordinate(l);if(pt!=null)return pt}const z=[l.x,l.y,0,1],j=[l.x,l.y,1,1];n.ag(z,z,this.pixelMatrixInverse),n.ag(j,j,this.pixelMatrixInverse);const q=z[3],ie=j[3],pe=z[0]/q,be=j[0]/ie,Ae=z[1]/q,Ne=j[1]/ie,Ge=z[2]/q,at=j[2]/ie,ct=Ge===at?0:(0-Ge)/(at-Ge);return new n.Z(n.z.number(pe,be,ct)/this.worldSize,n.z.number(Ae,Ne,ct)/this.worldSize)}coordinatePoint(l,p=0,z=this.pixelMatrix){const j=[l.x*this.worldSize,l.y*this.worldSize,p,1];return n.ag(j,j,z),new n.P(j[0]/j[3],j[1]/j[3])}getBounds(){const l=Math.max(0,this.height/2-this.getHorizon());return new Te().extend(this.pointLocation(new n.P(0,l))).extend(this.pointLocation(new n.P(this.width,l))).extend(this.pointLocation(new n.P(this.width,this.height))).extend(this.pointLocation(new n.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Te([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(l){l?(this.lngRange=[l.getWest(),l.getEast()],this.latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(l){const p=l.canonical,z=this.worldSize/this.zoomScale(p.z),j=p.x+Math.pow(2,p.z)*l.wrap,q=n.ao(new Float64Array(16));return n.J(q,q,[j*z,p.y*z,0]),n.K(q,q,[z/n.X,z/n.X,1]),q}calculatePosMatrix(l,p=!1){const z=l.key,j=p?this._alignedPosMatrixCache:this._posMatrixCache;if(j[z])return j[z];const q=this.calculateTileMatrix(l);return n.L(q,p?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,q),j[z]=new Float32Array(q),j[z]}calculateFogMatrix(l){const p=l.key,z=this._fogMatrixCache;if(z[p])return z[p];const j=this.calculateTileMatrix(l);return n.L(j,this.fogMatrix,j),z[p]=new Float32Array(j),z[p]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(l,p){p=n.ad(+p,this.minZoom,this.maxZoom);const z={center:new n.N(l.lng,l.lat),zoom:p};let j=this.lngRange;if(!this._renderWorldCopies&&j===null){const Et=179.9999999999;j=[-Et,Et]}const q=this.tileSize*this.zoomScale(z.zoom);let ie=0,pe=q,be=0,Ae=q,Ne=0,Ge=0;const{x:at,y:ct}=this.size;if(this.latRange){const Et=this.latRange;ie=n.Q(Et[1])*q,pe=n.Q(Et[0])*q,pe-ie<ct&&(Ne=ct/(pe-ie))}j&&(be=n.b3(n.O(j[0])*q,0,q),Ae=n.b3(n.O(j[1])*q,0,q),Ae<be&&(Ae+=q),Ae-be<at&&(Ge=at/(Ae-be)));const{x:pt,y:xt}=this.project.call({worldSize:q},l);let At,Tt;const Rt=Math.max(Ge||0,Ne||0);if(Rt){const Et=new n.P(Ge?(Ae+be)/2:pt,Ne?(pe+ie)/2:xt);return z.center=this.unproject.call({worldSize:q},Et).wrap(),z.zoom+=this.scaleZoom(Rt),z}if(this.latRange){const Et=ct/2;xt-Et<ie&&(Tt=ie+Et),xt+Et>pe&&(Tt=pe-Et)}if(j){const Et=(be+Ae)/2;let Zt=pt;this._renderWorldCopies&&(Zt=n.b3(pt,Et-q/2,Et+q/2));const Yt=at/2;Zt-Yt<be&&(At=be+Yt),Zt+Yt>Ae&&(At=Ae-Yt)}if(At!==void 0||Tt!==void 0){const Et=new n.P(At??pt,Tt??xt);z.center=this.unproject.call({worldSize:q},Et).wrap()}return z}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const l=this._unmodified,{center:p,zoom:z}=this.getConstrained(this.center,this.zoom);this.center=p,this.zoom=z,this._unmodified=l,this._constraining=!1}_calcMatrices(){if(!this.height)return;const l=this._fov/2,p=this.centerOffset,z=this.point.x,j=this.point.y;this.cameraToCenterDistance=.5/Math.tan(l)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let q=n.ao(new Float64Array(16));n.K(q,q,[this.width/2,-this.height/2,1]),n.J(q,q,[1,-1,0]),this.labelPlaneMatrix=q,q=n.ao(new Float64Array(16)),n.K(q,q,[1,-1,1]),n.J(q,q,[-1,-1,0]),n.K(q,q,[2/this.width,2/this.height,1]),this.glCoordMatrix=q;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),be=ie-pe*this._pixelPerMeter/Math.cos(this._pitch),Ae=pe<0?be:ie,Ne=Math.PI/2+this._pitch,Ge=this._fov*(.5+p.y/this.height),at=Math.sin(Ge)*Ae/Math.sin(n.ad(Math.PI-Ne-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+p.y/(2*ct)),xt=Math.sin(pt)*Ae/Math.sin(n.ad(Math.PI-Ne-pt,.01,Math.PI-.01)),At=Math.min(at,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*At+Ae),this.nearZ=this.height/50,q=new Float64Array(16),n.b6(q,this._fov,this.width/this.height,this.nearZ,this.farZ),q[8]=2*-p.x/this.width,q[9]=2*p.y/this.height,this.projectionMatrix=n.af(q),n.K(q,q,[1,-1,1]),n.J(q,q,[0,0,-this.cameraToCenterDistance]),n.b7(q,q,this._pitch),n.ae(q,q,this.angle),n.J(q,q,[-z,-j,0]),this.mercatorMatrix=n.K([],q,[this.worldSize,this.worldSize,this.worldSize]),n.K(q,q,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,q),n.J(q,q,[0,0,-this.elevation]),this.modelViewProjectionMatrix=q,this.invModelViewProjectionMatrix=n.at([],q),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-p.x/this.width,this.fogMatrix[9]=2*p.y/this.height,n.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),n.b7(this.fogMatrix,this.fogMatrix,this._pitch),n.ae(this.fogMatrix,this.fogMatrix,this.angle),n.J(this.fogMatrix,this.fogMatrix,[-z,-j,0]),n.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=n.L(new Float64Array(16),this.labelPlaneMatrix,q);const Tt=this.width%2/2,Rt=this.height%2/2,Et=Math.cos(this.angle),Zt=Math.sin(this.angle),Yt=z-Math.round(z)+Et*Tt+Zt*Rt,Xt=j-Math.round(j)+Et*Rt+Zt*Tt,hn=new Float64Array(q);if(n.J(hn,hn,[Yt>.5?Yt-1:Yt,Xt>.5?Xt-1:Xt,0]),this.alignedModelViewProjectionMatrix=hn,q=n.at(new Float64Array(16),this.pixelMatrix),!q)throw new Error("failed to invert matrix");this.pixelMatrixInverse=q,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const l=this.pointCoordinate(new n.P(0,0)),p=[l.x*this.worldSize,l.y*this.worldSize,0,1];return n.ag(p,p,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const l=this._pitch,p=Math.tan(l)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,p))}getCameraQueryGeometry(l){const p=this.getCameraPoint();if(l.length===1)return[l[0],p];{let z=p.x,j=p.y,q=p.x,ie=p.y;for(const pe of l)z=Math.min(z,pe.x),j=Math.min(j,pe.y),q=Math.max(q,pe.x),ie=Math.max(ie,pe.y);return[new n.P(z,j),new n.P(q,j),new n.P(q,ie),new n.P(z,ie),new n.P(z,j)]}}lngLatToCameraDepth(l,p){const z=this.locationCoordinate(l),j=[z.x*this.worldSize,z.y*this.worldSize,p,1];return n.ag(j,j,this.modelViewProjectionMatrix),j[2]/j[3]}}function Ns(R,l){let p,z=!1,j=null,q=null;const ie=()=>{j=null,z&&(R.apply(q,p),j=setTimeout(ie,l),z=!1)};return(...pe)=>(z=!0,q=this,p=pe,j||ie(),j)}class Qi{constructor(l){this._getCurrentHash=()=>{const p=window.location.hash.replace("#","");if(this._hashName){let z;return p.split("&").map(j=>j.split("=")).forEach(j=>{j[0]===this._hashName&&(z=j)}),(z&&z[1]||"").split("/")}return p.split("/")},this._onHashChange=()=>{const p=this._getCurrentHash();if(p.length>=3&&!p.some(z=>isNaN(z))){const z=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(p[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:z,pitch:+(p[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const p=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,p)},this._removeHash=()=>{const p=this._getCurrentHash();if(p.length===0)return;const z=p.join("/");let j=z;j.split("&").length>0&&(j=j.split("&")[0]),this._hashName&&(j=`${this._hashName}=${z}`);let q=window.location.hash.replace(j,"");q.startsWith("#&")?q=q.slice(0,1)+q.slice(2):q==="#"&&(q="");let ie=window.location.href.replace(/(#.+)?$/,q);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Ns(this._updateHashUnthrottled,300),this._hashName=l&&encodeURIComponent(l)}addTo(l){return this._map=l,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(l){const p=this._map.getCenter(),z=Math.round(100*this._map.getZoom())/100,j=Math.ceil((z*Math.LN2+Math.log(512/360/.5))/Math.LN10),q=Math.pow(10,j),ie=Math.round(p.lng*q)/q,pe=Math.round(p.lat*q)/q,be=this._map.getBearing(),Ae=this._map.getPitch();let Ne="";if(Ne+=l?`/${ie}/${pe}/${z}`:`${z}/${pe}/${ie}`,(be||Ae)&&(Ne+="/"+Math.round(10*be)/10),Ae&&(Ne+=`/${Math.round(Ae)}`),this._hashName){const Ge=this._hashName;let at=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(at=!0,`${xt}=${Ne}`):pt}).filter(pt=>pt);return at||ct.push(`${Ge}=${Ne}`),`#${ct.join("&")}`}return`#${Ne}`}}const jo={linearity:.3,easing:n.b8(0,0,.3,1)},li=n.e({deceleration:2500,maxSpeed:1400},jo),hi=n.e({deceleration:20,maxSpeed:1400},jo),xs=n.e({deceleration:1e3,maxSpeed:360},jo),Cc=n.e({deceleration:1e3,maxSpeed:90},jo);class cc{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,p=u.now();for(;l.length>0&&p-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,pan:new n.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:q}of this._inertiaBuffer)p.zoom+=q.zoomDelta||0,p.bearing+=q.bearingDelta||0,p.pitch+=q.pitchDelta||0,q.panDelta&&p.pan._add(q.panDelta),q.around&&(p.around=q.around),q.pinchAround&&(p.pinchAround=q.pinchAround);const z=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,j={};if(p.pan.mag()){const q=Zl(p.pan.mag(),z,n.e({},li,l||{}));j.offset=p.pan.mult(q.amount/p.pan.mag()),j.center=this._map.transform.center,ql(j,q)}if(p.zoom){const q=Zl(p.zoom,z,hi);j.zoom=this._map.transform.zoom+q.amount,ql(j,q)}if(p.bearing){const q=Zl(p.bearing,z,xs);j.bearing=this._map.transform.bearing+n.ad(q.amount,-179,179),ql(j,q)}if(p.pitch){const q=Zl(p.pitch,z,Cc);j.pitch=this._map.transform.pitch+q.amount,ql(j,q)}if(j.zoom||j.bearing){const q=p.pinchAround===void 0?p.around:p.pinchAround;j.around=q?this._map.unproject(q):this._map.getCenter()}return this.clear(),n.e(j,{noMoveStart:!0})}}function ql(R,l){(!R.duration||R.duration<l.duration)&&(R.duration=l.duration,R.easing=l.easing)}function Zl(R,l,p){const{maxSpeed:z,linearity:j,deceleration:q}=p,ie=n.ad(R*j/(l/1e3),-z,z),pe=Math.abs(ie)/(q*j);return{easing:p.easing,duration:1e3*pe,amount:ie*(pe/2)}}class To extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z,j={}){const q=r.mousePos(p.getCanvas(),z),ie=p.unproject(q);super(l,n.e({point:q,lngLat:ie,originalEvent:z},j)),this._defaultPrevented=!1,this.target=p}}class go extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z){const j=l==="touchend"?z.changedTouches:z.touches,q=r.touchPos(p.getCanvasContainer(),j),ie=q.map(be=>p.unproject(be)),pe=q.reduce((be,Ae,Ne,Ge)=>be.add(Ae.div(Ge.length)),new n.P(0,0));super(l,{points:q,point:pe,lngLats:ie,lngLat:p.unproject(pe),originalEvent:z}),this._defaultPrevented=!1}}class Js extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z){super(l,{originalEvent:z}),this._defaultPrevented=!1}}class uc{constructor(l,p){this._map=l,this._clickTolerance=p.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new Js(l.type,this._map,l))}mousedown(l,p){return this._mousedownPos=p,this._firePreventable(new To(l.type,this._map,l))}mouseup(l){this._map.fire(new To(l.type,this._map,l))}click(l,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||this._map.fire(new To(l.type,this._map,l))}dblclick(l){return this._firePreventable(new To(l.type,this._map,l))}mouseover(l){this._map.fire(new To(l.type,this._map,l))}mouseout(l){this._map.fire(new To(l.type,this._map,l))}touchstart(l){return this._firePreventable(new go(l.type,this._map,l))}touchmove(l){this._map.fire(new go(l.type,this._map,l))}touchend(l){this._map.fire(new go(l.type,this._map,l))}touchcancel(l){this._map.fire(new go(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Io{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new To(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new To("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new To(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ti{constructor(l){this._map=l}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(l){return this.transform.pointLocation(n.P.convert(l),this._map.terrain)}}class yo{constructor(l,p){this._map=l,this._tr=new Ti(l),this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=p.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,p){this.isEnabled()&&l.shiftKey&&l.button===0&&(r.disableDrag(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(l,p){if(!this._active)return;const z=p;if(this._lastPos.equals(z)||!this._box&&z.dist(this._startPos)<this._clickTolerance)return;const j=this._startPos;this._lastPos=z,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",l));const q=Math.min(j.x,z.x),ie=Math.max(j.x,z.x),pe=Math.min(j.y,z.y),be=Math.max(j.y,z.y);r.setTransform(this._box,`translate(${q}px,${pe}px)`),this._box.style.width=ie-q+"px",this._box.style.height=be-pe+"px"}mouseupWindow(l,p){if(!this._active||l.button!==0)return;const z=this._startPos,j=p;if(this.reset(),r.suppressClick(),z.x!==j.x||z.y!==j.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:l})),{cameraAnimation:q=>q.fitScreenCoordinates(z,j,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",l)}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(l,p){return this._map.fire(new n.k(l,{originalEvent:p}))}}function gi(R,l){if(R.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${l.length}`);const p={};for(let z=0;z<R.length;z++)p[R[z].identifier]=l[z];return p}class eo{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,p,z){(this.centroid||z.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),z.length===this.numTouches&&(this.centroid=function(j){const q=new n.P(0,0);for(const ie of j)q._add(ie);return q.div(j.length)}(p),this.touches=gi(z,p)))}touchmove(l,p,z){if(this.aborted||!this.centroid)return;const j=gi(z,p);for(const q in this.touches){const ie=this.touches[q],pe=j[q];(!pe||pe.dist(ie)>30)&&(this.aborted=!0)}}touchend(l,p,z){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),z.length===0){const j=!this.aborted&&this.centroid;if(this.reset(),j)return j}}}class yi{constructor(l){this.singleTap=new eo(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,p,z){this.singleTap.touchstart(l,p,z)}touchmove(l,p,z){this.singleTap.touchmove(l,p,z)}touchend(l,p,z){const j=this.singleTap.touchend(l,p,z);if(j){const q=l.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(j)<30;if(q&&ie||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=j,this.count===this.numTaps)return this.reset(),j}}}class so{constructor(l){this._tr=new Ti(l),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,p,z){this._zoomIn.touchstart(l,p,z),this._zoomOut.touchstart(l,p,z)}touchmove(l,p,z){this._zoomIn.touchmove(l,p,z),this._zoomOut.touchmove(l,p,z)}touchend(l,p,z){const j=this._zoomIn.touchend(l,p,z),q=this._zoomOut.touchend(l,p,z),ie=this._tr;return j?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(j)},{originalEvent:l})}):q?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(q)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class vo{constructor(l){this._enabled=!!l.enable,this._moveStateManager=l.moveStateManager,this._clickTolerance=l.clickTolerance||1,this._moveFunction=l.move,this._activateOnStart=!!l.activateOnStart,l.assignEvents(this),this.reset()}reset(l){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(l)}_move(...l){const p=this._moveFunction(...l);if(p.bearingDelta||p.pitchDelta||p.around||p.panDelta)return this._active=!0,p}dragStart(l,p){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(l)&&(this._moveStateManager.startMove(l),this._lastPoint=p.length?p[0]:p,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(l,p){if(!this.isEnabled())return;const z=this._lastPoint;if(!z)return;if(l.preventDefault(),!this._moveStateManager.isValidMoveEvent(l))return void this.reset(l);const j=p.length?p[0]:p;return!this._moved&&j.dist(z)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=j,this._move(z,j))}dragEnd(l){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(l)&&(this._moved&&r.suppressClick(),this.reset(l))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Ks={0:1,2:2};class es{constructor(l){this._correctEvent=l.checkCorrectEvent}startMove(l){const p=r.mouseButton(l);this._eventButton=p}endMove(l){delete this._eventButton}isValidStartEvent(l){return this._correctEvent(l)}isValidMoveEvent(l){return!function(p,z){const j=Ks[z];return p.buttons===void 0||(p.buttons&j)!==j}(l,this._eventButton)}isValidEndEvent(l){return r.mouseButton(l)===this._eventButton}}class Nl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(l){return l.targetTouches.length===1}_isSameTouchEvent(l){return l.targetTouches[0].identifier===this._firstTouch}startMove(l){const p=l.targetTouches[0].identifier;this._firstTouch=p}endMove(l){delete this._firstTouch}isValidStartEvent(l){return this._isOneFingerTouch(l)}isValidMoveEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}isValidEndEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}}const Co=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=l=>{l.preventDefault()}},Xl=({enable:R,clickTolerance:l,bearingDegreesPerPixelMoved:p=.8})=>{const z=new es({checkCorrectEvent:j=>r.mouseButton(j)===0&&j.ctrlKey||r.mouseButton(j)===2});return new vo({clickTolerance:l,move:(j,q)=>({bearingDelta:(q.x-j.x)*p}),moveStateManager:z,enable:R,assignEvents:Co})},Ys=({enable:R,clickTolerance:l,pitchDegreesPerPixelMoved:p=-.5})=>{const z=new es({checkCorrectEvent:j=>r.mouseButton(j)===0&&j.ctrlKey||r.mouseButton(j)===2});return new vo({clickTolerance:l,move:(j,q)=>({pitchDelta:(q.y-j.y)*p}),moveStateManager:z,enable:R,assignEvents:Co})};class ws{constructor(l,p){this._clickTolerance=l.clickTolerance||1,this._map=p,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(l){return l<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(l,p,z){return this._calculateTransform(l,p,z)}touchmove(l,p,z){if(this._active){if(!this._shouldBePrevented(z.length))return l.preventDefault(),this._calculateTransform(l,p,z);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",l)}}touchend(l,p,z){this._calculateTransform(l,p,z),this._active&&this._shouldBePrevented(z.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,p,z){z.length>0&&(this._active=!0);const j=gi(z,p),q=new n.P(0,0),ie=new n.P(0,0);let pe=0;for(const Ae in j){const Ne=j[Ae],Ge=this._touches[Ae];Ge&&(q._add(Ne),ie._add(Ne.sub(Ge)),pe++,j[Ae]=Ne)}if(this._touches=j,this._shouldBePrevented(pe)||!ie.mag())return;const be=ie.div(pe);return this._sum._add(be),this._sum.mag()<this._clickTolerance?void 0:{around:q.div(pe),panDelta:be}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class lo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(l,p,z){this._firstTwoTouches||z.length<2||(this._firstTwoTouches=[z[0].identifier,z[1].identifier],this._start([p[0],p[1]]))}touchmove(l,p,z){if(!this._firstTwoTouches)return;l.preventDefault();const[j,q]=this._firstTwoTouches,ie=vi(z,p,j),pe=vi(z,p,q);if(!ie||!pe)return;const be=this._aroundCenter?null:ie.add(pe).div(2);return this._move([ie,pe],be,l)}touchend(l,p,z){if(!this._firstTwoTouches)return;const[j,q]=this._firstTwoTouches,ie=vi(z,p,j),pe=vi(z,p,q);ie&&pe||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,l,p){for(let z=0;z<R.length;z++)if(R[z].identifier===p)return l[z]}function ks(R,l){return Math.log(R/l)/Math.LN2}class sr extends lo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,p){const z=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(ks(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ks(this._distance,z),pinchAround:p}}}function Ec(R,l){return 180*R.angleWith(l)/Math.PI}class qc extends lo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,p,z){const j=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ec(this._vector,j),pinchAround:p}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const p=25/(Math.PI*this._minDiameter)*360,z=Ec(l,this._startVector);return Math.abs(z)<p}}function Qs(R){return Math.abs(R.y)>Math.abs(R.x)}class Dl extends lo{constructor(l){super(),this._currentTouchCount=0,this._map=l}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(l,p,z){super.touchstart(l,p,z),this._currentTouchCount=z.length}_start(l){this._lastPoints=l,Qs(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,p,z){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const j=l[0].sub(this._lastPoints[0]),q=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(j,q,z.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(j.y+q.y)/2*-.5}):void 0}gestureBeginsVertically(l,p,z){if(this._valid!==void 0)return this._valid;const j=l.mag()>=2,q=p.mag()>=2;if(!j&&!q)return;if(!j||!q)return this._firstMove===void 0&&(this._firstMove=z),z-this._firstMove<100&&void 0;const ie=l.y>0==p.y>0;return Qs(l)&&Qs(p)&&ie}}const Sl={panStep:100,bearingStep:15,pitchStep:10};class dc{constructor(l){this._tr=new Ti(l);const p=Sl;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let p=0,z=0,j=0,q=0,ie=0;switch(l.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:l.shiftKey?z=-1:(l.preventDefault(),q=-1);break;case 39:l.shiftKey?z=1:(l.preventDefault(),q=1);break;case 38:l.shiftKey?j=1:(l.preventDefault(),ie=-1);break;case 40:l.shiftKey?j=-1:(l.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(z=0,j=0),{cameraAnimation:pe=>{const be=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:Wa,zoom:p?Math.round(be.zoom)+p*(l.shiftKey?2:1):be.zoom,bearing:be.bearing+z*this._bearingStep,pitch:be.pitch+j*this._pitchStep,offset:[-q*this._panStep,-ie*this._panStep],center:be.center},{originalEvent:l})}}}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 Wa(R){return R*(2-R)}const ts=4.000244140625;class el{constructor(l,p){this._onTimeout=z=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(z)},this._map=l,this._tr=new Ti(l),this._triggerRenderFrame=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(l){return!!this._map.cooperativeGestures.isEnabled()&&!(l.ctrlKey||this._map.cooperativeGestures.isBypassed(l))}wheel(l){if(!this.isEnabled())return;if(this._shouldBePrevented(l))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",l);let p=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const z=u.now(),j=z-(this._lastWheelEventTime||0);this._lastWheelEventTime=z,p!==0&&p%ts==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":j>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(j*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),l.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=l,this._delta-=p,this._active||this._start(l)),l.preventDefault()}_start(l){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 p=r.mousePos(this._map.getCanvas(),l),z=this._tr;p.y>z.transform.height/2-z.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?z.center:z.unproject(p)):this._around=n.N.convert(z.center),this._aroundPoint=z.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const l=this._tr.transform;if(this._delta!==0){const be=this._type==="wheel"&&Math.abs(this._delta)>ts?this._wheelZoomRate:this._defaultZoomRate;let Ae=2/(1+Math.exp(-Math.abs(this._delta*be)));this._delta<0&&Ae!==0&&(Ae=1/Ae);const Ne=typeof this._targetZoom=="number"?l.zoomScale(this._targetZoom):l.scale;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(Ne*Ae))),this._type==="wheel"&&(this._startZoom=l.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const p=typeof this._targetZoom=="number"?this._targetZoom:l.zoom,z=this._startZoom,j=this._easing;let q,ie=!1;const pe=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&z&&j&&pe){const be=Math.min(pe/200,1),Ae=j(be);q=n.z.number(z,p,Ae),be<1?this._frameId||(this._frameId=!0):ie=!0}else q=p,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:q-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let p=n.b9;if(this._prevEase){const z=this._prevEase,j=(u.now()-z.start)/z.duration,q=z.easing(j+.01)-z.easing(j),ie=.27/Math.sqrt(q*q+1e-4)*.01,pe=Math.sqrt(.0729-ie*ie);p=n.b8(ie,pe,.25,1)}return this._prevEase={start:u.now(),duration:l,easing:p},p}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ci{constructor(l,p){this._clickZoom=l,this._tapZoom=p}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 $o{constructor(l){this._tr=new Ti(l),this.reset()}reset(){this._active=!1}dblclick(l,p){return l.preventDefault(),{cameraAnimation:z=>{z.easeTo({duration:300,zoom:this._tr.zoom+(l.shiftKey?-1:1),around:this._tr.unproject(p)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class tl{constructor(){this._tap=new yi({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(l,p,z){if(!this._swipePoint)if(this._tapTime){const j=p[0],q=l.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(j)<30;q&&ie?z.length>0&&(this._swipePoint=j,this._swipeTouch=z[0].identifier):this.reset()}else this._tap.touchstart(l,p,z)}touchmove(l,p,z){if(this._tapTime){if(this._swipePoint){if(z[0].identifier!==this._swipeTouch)return;const j=p[0],q=j.y-this._swipePoint.y;return this._swipePoint=j,l.preventDefault(),this._active=!0,{zoomDelta:q/128}}}else this._tap.touchmove(l,p,z)}touchend(l,p,z){if(this._tapTime)this._swipePoint&&z.length===0&&this.reset();else{const j=this._tap.touchend(l,p,z);j&&(this._tapTime=l.timeStamp,this._tapPoint=j)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(l,p,z){this._el=l,this._mousePan=p,this._touchPan=z}enable(l){this._inertiaOptions=l||{},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 Po{constructor(l,p,z){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=p,this._mousePitch=z}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class nl{constructor(l,p,z,j){this._el=l,this._touchZoom=p,this._touchRotate=z,this._tapDragZoom=j,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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 ls{constructor(l,p){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=l,this._options=p,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const l=this._map.getCanvasContainer();l.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",l);let p=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(p=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const z=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),j=document.createElement("div");j.className="maplibregl-desktop-message",j.textContent=p,this._container.appendChild(j);const q=document.createElement("div");q.className="maplibregl-mobile-message",q.textContent=z,this._container.appendChild(q),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.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(l){return l[this._bypassKey]}notifyGestureBlocked(l,p){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:l,originalEvent:p})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Uo=R=>R.zoom||R.drag||R.pitch||R.rotate;class Ts extends n.k{}function ar(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ri{constructor(l,p){this.handleWindowEvent=j=>{this.handleEvent(j,`${j.type}Window`)},this.handleEvent=(j,q)=>{if(j.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=j.type==="renderFrame"?void 0:j,pe={needsRenderFrame:!1},be={},Ae={},Ne=j.touches,Ge=Ne?this._getMapTouches(Ne):void 0,at=Ge?r.touchPos(this._map.getCanvas(),Ge):r.mousePos(this._map.getCanvas(),j);for(const{handlerName:xt,handler:At,allowed:Tt}of this._handlers){if(!At.isEnabled())continue;let Rt;this._blockedByActive(Ae,Tt,xt)?At.reset():At[q||j.type]&&(Rt=At[q||j.type](j,at,Ge),this.mergeHandlerResult(pe,be,Rt,xt,ie),Rt&&Rt.needsRenderFrame&&this._triggerRenderFrame()),(Rt||At.isActive())&&(Ae[xt]=At)}const ct={};for(const xt in this._previousActiveHandlers)Ae[xt]||(ct[xt]=ie);this._previousActiveHandlers=Ae,(Object.keys(ct).length||ar(pe))&&(this._changes.push([pe,be,ct]),this._triggerRenderFrame()),(Object.keys(Ae).length||ar(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=pe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new cc(l),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(p);const z=this._el;this._listeners=[[z,"touchstart",{passive:!0}],[z,"touchmove",{passive:!1}],[z,"touchend",void 0],[z,"touchcancel",void 0],[z,"mousedown",void 0],[z,"mousemove",void 0],[z,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[z,"mouseover",void 0],[z,"mouseout",void 0],[z,"dblclick",void 0],[z,"click",void 0],[z,"keydown",{capture:!1}],[z,"keyup",void 0],[z,"wheel",{passive:!1}],[z,"contextmenu",void 0],[window,"blur",void 0]];for(const[j,q,ie]of this._listeners)r.addEventListener(j,q,j===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[l,p,z]of this._listeners)r.removeEventListener(l,p,l===document?this.handleWindowEvent:this.handleEvent,z)}_addDefaultHandlers(l){const p=this._map,z=p.getCanvasContainer();this._add("mapEvent",new uc(p,l));const j=p.boxZoom=new yo(p,l);this._add("boxZoom",j),l.interactive&&l.boxZoom&&j.enable();const q=p.cooperativeGestures=new ls(p,l.cooperativeGestures);this._add("cooperativeGestures",q),l.cooperativeGestures&&q.enable();const ie=new so(p),pe=new $o(p);p.doubleClickZoom=new Ci(pe,ie),this._add("tapZoom",ie),this._add("clickZoom",pe),l.interactive&&l.doubleClickZoom&&p.doubleClickZoom.enable();const be=new tl;this._add("tapDragZoom",be);const Ae=p.touchPitch=new Dl(p);this._add("touchPitch",Ae),l.interactive&&l.touchPitch&&p.touchPitch.enable(l.touchPitch);const Ne=Xl(l),Ge=Ys(l);p.dragRotate=new Po(l,Ne,Ge),this._add("mouseRotate",Ne,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),l.interactive&&l.dragRotate&&p.dragRotate.enable();const at=(({enable:Rt,clickTolerance:Et})=>{const Zt=new es({checkCorrectEvent:Yt=>r.mouseButton(Yt)===0&&!Yt.ctrlKey});return new vo({clickTolerance:Et,move:(Yt,Xt)=>({around:Xt,panDelta:Xt.sub(Yt)}),activateOnStart:!0,moveStateManager:Zt,enable:Rt,assignEvents:Co})})(l),ct=new ws(l,p);p.dragPan=new Ss(z,at,ct),this._add("mousePan",at),this._add("touchPan",ct,["touchZoom","touchRotate"]),l.interactive&&l.dragPan&&p.dragPan.enable(l.dragPan);const pt=new qc,xt=new sr;p.touchZoomRotate=new nl(z,xt,pt,be),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),l.interactive&&l.touchZoomRotate&&p.touchZoomRotate.enable(l.touchZoomRotate);const At=p.scrollZoom=new el(p,()=>this._triggerRenderFrame());this._add("scrollZoom",At,["mousePan"]),l.interactive&&l.scrollZoom&&p.scrollZoom.enable(l.scrollZoom);const Tt=p.keyboard=new dc(p);this._add("keyboard",Tt),l.interactive&&l.keyboard&&p.keyboard.enable(),this._add("blockableMapEvent",new Io(p))}_add(l,p,z){this._handlers.push({handlerName:l,handler:p,allowed:z}),this._handlersById[l]=p}stop(l){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Uo(this._eventsInProgress)||this.isZooming()}_blockedByActive(l,p,z){for(const j in l)if(j!==z&&(!p||p.indexOf(j)<0))return!0;return!1}_getMapTouches(l){const p=[];for(const z of l){const j=z.target;this._el.contains(j)&&p.push(z)}return p}mergeHandlerResult(l,p,z,j,q){if(!z)return;n.e(l,z);const ie={handlerName:j,originalEvent:z.originalEvent||q};z.zoomDelta!==void 0&&(p.zoom=ie),z.panDelta!==void 0&&(p.drag=ie),z.pitchDelta!==void 0&&(p.pitch=ie),z.bearingDelta!==void 0&&(p.rotate=ie)}_applyChanges(){const l={},p={},z={};for(const[j,q,ie]of this._changes)j.panDelta&&(l.panDelta=(l.panDelta||new n.P(0,0))._add(j.panDelta)),j.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+j.zoomDelta),j.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+j.bearingDelta),j.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+j.pitchDelta),j.around!==void 0&&(l.around=j.around),j.pinchAround!==void 0&&(l.pinchAround=j.pinchAround),j.noInertia&&(l.noInertia=j.noInertia),n.e(p,q),n.e(z,ie);this._updateMapTransform(l,p,z),this._changes=[]}_updateMapTransform(l,p,z){const j=this._map,q=j._getTransformForUpdate(),ie=j.terrain;if(!(ar(l)||ie&&this._terrainMovement))return this._fireEvents(p,z,!0);let{panDelta:pe,zoomDelta:be,bearingDelta:Ae,pitchDelta:Ne,around:Ge,pinchAround:at}=l;at!==void 0&&(Ge=at),j._stop(!0),Ge=Ge||j.transform.centerPoint;const ct=q.pointLocation(pe?Ge.sub(pe):Ge);Ae&&(q.bearing+=Ae),Ne&&(q.pitch+=Ne),be&&(q.zoom+=be),ie?this._terrainMovement||!p.drag&&!p.zoom?p.drag&&this._terrainMovement?q.center=q.pointLocation(q.centerPoint.sub(pe)):q.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,q.setLocationAtPoint(ct,Ge)):q.setLocationAtPoint(ct,Ge),j._applyUpdatedTransform(q),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(p,z,!0)}_fireEvents(l,p,z){const j=Uo(this._eventsInProgress),q=Uo(l),ie={};for(const Ge in l){const{originalEvent:at}=l[Ge];this._eventsInProgress[Ge]||(ie[`${Ge}start`]=at),this._eventsInProgress[Ge]=l[Ge]}!j&&q&&this._fireEvent("movestart",q.originalEvent);for(const Ge in ie)this._fireEvent(Ge,ie[Ge]);q&&this._fireEvent("move",q.originalEvent);for(const Ge in l){const{originalEvent:at}=l[Ge];this._fireEvent(Ge,at)}const pe={};let be;for(const Ge in this._eventsInProgress){const{handlerName:at,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[at].isActive()||(delete this._eventsInProgress[Ge],be=p[at]||ct,pe[`${Ge}end`]=be)}for(const Ge in pe)this._fireEvent(Ge,pe[Ge]);const Ae=Uo(this._eventsInProgress),Ne=(j||q)&&!Ae;if(Ne&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(z&&Ne){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&u.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:be})),at(this._map.getBearing())&&this._map.resetNorth()):(at(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:be})),this._updatingCamera=!1}}_fireEvent(l,p){this._map.fire(new n.k(l,p?{originalEvent:p}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(l=>{delete this._frameId,this.handleEvent(new Ts("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class to extends n.E{constructor(l,p){super(),this._renderFrameCallback=()=>{const z=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(z)),z<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=p.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(l,p){return this.jumpTo({center:l},p)}panBy(l,p,z){return l=n.P.convert(l).mult(-1),this.panTo(this.transform.center,n.e({offset:l},p),z)}panTo(l,p,z){return this.easeTo(n.e({center:l},p),z)}getZoom(){return this.transform.zoom}setZoom(l,p){return this.jumpTo({zoom:l},p),this}zoomTo(l,p,z){return this.easeTo(n.e({zoom:l},p),z)}zoomIn(l,p){return this.zoomTo(this.getZoom()+1,l,p),this}zoomOut(l,p){return this.zoomTo(this.getZoom()-1,l,p),this}getBearing(){return this.transform.bearing}setBearing(l,p){return this.jumpTo({bearing:l},p),this}getPadding(){return this.transform.padding}setPadding(l,p){return this.jumpTo({padding:l},p),this}rotateTo(l,p,z){return this.easeTo(n.e({bearing:l},p),z)}resetNorth(l,p){return this.rotateTo(0,n.e({duration:1e3},l),p),this}resetNorthPitch(l,p){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},l),p),this}snapToNorth(l,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(l,p):this}getPitch(){return this.transform.pitch}setPitch(l,p){return this.jumpTo({pitch:l},p),this}cameraForBounds(l,p){l=Te.convert(l);const z=p&&p.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),z,p)}_cameraForBoxAndBearing(l,p,z,j){const q={top:0,bottom:0,right:0,left:0};if(typeof(j=n.e({padding:q,offset:[0,0],maxZoom:this.transform.maxZoom},j)).padding=="number"){const ya=j.padding;j.padding={top:ya,bottom:ya,right:ya,left:ya}}j.padding=n.e(q,j.padding);const ie=this.transform,pe=ie.padding,be=new Te(l,p),Ae=ie.project(be.getNorthWest()),Ne=ie.project(be.getNorthEast()),Ge=ie.project(be.getSouthEast()),at=ie.project(be.getSouthWest()),ct=n.ba(-z),pt=Ae.rotate(ct),xt=Ne.rotate(ct),At=Ge.rotate(ct),Tt=at.rotate(ct),Rt=new n.P(Math.max(pt.x,xt.x,Tt.x,At.x),Math.max(pt.y,xt.y,Tt.y,At.y)),Et=new n.P(Math.min(pt.x,xt.x,Tt.x,At.x),Math.min(pt.y,xt.y,Tt.y,At.y)),Zt=Rt.sub(Et),Yt=(ie.width-(pe.left+pe.right+j.padding.left+j.padding.right))/Zt.x,Xt=(ie.height-(pe.top+pe.bottom+j.padding.top+j.padding.bottom))/Zt.y;if(Xt<0||Yt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const hn=Math.min(ie.scaleZoom(ie.scale*Math.min(Yt,Xt)),j.maxZoom),xn=n.P.convert(j.offset),Nn=(j.padding.left-j.padding.right)/2,Dn=(j.padding.top-j.padding.bottom)/2,Gn=new n.P(Nn,Dn).rotate(n.ba(z)),Yn=xn.add(Gn).mult(ie.scale/ie.zoomScale(hn));return{center:ie.unproject(Ae.add(Ge).div(2).sub(Yn)),zoom:hn,bearing:z}}fitBounds(l,p,z){return this._fitInternal(this.cameraForBounds(l,p),p,z)}fitScreenCoordinates(l,p,z,j,q){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(l)),this.transform.pointLocation(n.P.convert(p)),z,j),j,q)}_fitInternal(l,p,z){return l?(delete(p=n.e(l,p)).padding,p.linear?this.easeTo(p,z):this.flyTo(p,z)):this}jumpTo(l,p){this.stop();const z=this._getTransformForUpdate();let j=!1,q=!1,ie=!1;return"zoom"in l&&z.zoom!==+l.zoom&&(j=!0,z.zoom=+l.zoom),l.center!==void 0&&(z.center=n.N.convert(l.center)),"bearing"in l&&z.bearing!==+l.bearing&&(q=!0,z.bearing=+l.bearing),"pitch"in l&&z.pitch!==+l.pitch&&(ie=!0,z.pitch=+l.pitch),l.padding==null||z.isPaddingEqual(l.padding)||(z.padding=l.padding),this._applyUpdatedTransform(z),this.fire(new n.k("movestart",p)).fire(new n.k("move",p)),j&&this.fire(new n.k("zoomstart",p)).fire(new n.k("zoom",p)).fire(new n.k("zoomend",p)),q&&this.fire(new n.k("rotatestart",p)).fire(new n.k("rotate",p)).fire(new n.k("rotateend",p)),ie&&this.fire(new n.k("pitchstart",p)).fire(new n.k("pitch",p)).fire(new n.k("pitchend",p)),this.fire(new n.k("moveend",p))}calculateCameraOptionsFromTo(l,p,z,j=0){const q=n.Z.fromLngLat(l,p),ie=n.Z.fromLngLat(z,j),pe=ie.x-q.x,be=ie.y-q.y,Ae=ie.z-q.z,Ne=Math.hypot(pe,be,Ae);if(Ne===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(pe,be),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ne/this.transform.tileSize),ct=180*Math.atan2(pe,-be)/Math.PI;let pt=180*Math.acos(Ge/Ne)/Math.PI;return pt=Ae<0?90-pt:90+pt,{center:ie.toLngLat(),zoom:at,pitch:pt,bearing:ct}}easeTo(l,p){var z;this._stop(!1,l.easeId),((l=n.e({offset:[0,0],duration:500,easing:n.b9},l)).animate===!1||!l.essential&&u.prefersReducedMotion)&&(l.duration=0);const j=this._getTransformForUpdate(),q=j.zoom,ie=j.bearing,pe=j.pitch,be=j.padding,Ae="bearing"in l?this._normalizeBearing(l.bearing,ie):ie,Ne="pitch"in l?+l.pitch:pe,Ge="padding"in l?l.padding:j.padding,at=n.P.convert(l.offset);let ct=j.centerPoint.add(at);const pt=j.pointLocation(ct),{center:xt,zoom:At}=j.getConstrained(n.N.convert(l.center||pt),(z=l.zoom)!==null&&z!==void 0?z:q);this._normalizeCenter(xt,j);const Tt=j.project(pt),Rt=j.project(xt).sub(Tt),Et=j.zoomScale(At-q);let Zt,Yt;l.around&&(Zt=n.N.convert(l.around),Yt=j.locationPoint(Zt));const Xt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||At!==q,this._rotating=this._rotating||ie!==Ae,this._pitching=this._pitching||Ne!==pe,this._padding=!j.isPaddingEqual(Ge),this._easeId=l.easeId,this._prepareEase(p,l.noMoveStart,Xt),this.terrain&&this._prepareElevation(xt),this._ease(hn=>{if(this._zooming&&(j.zoom=n.z.number(q,At,hn)),this._rotating&&(j.bearing=n.z.number(ie,Ae,hn)),this._pitching&&(j.pitch=n.z.number(pe,Ne,hn)),this._padding&&(j.interpolatePadding(be,Ge,hn),ct=j.centerPoint.add(at)),this.terrain&&!l.freezeElevation&&this._updateElevation(hn),Zt)j.setLocationAtPoint(Zt,Yt);else{const xn=j.zoomScale(j.zoom-q),Nn=At>q?Math.min(2,Et):Math.max(.5,Et),Dn=Math.pow(Nn,1-hn),Gn=j.unproject(Tt.add(Rt.mult(hn*Dn)).mult(xn));j.setLocationAtPoint(j.renderWorldCopies?Gn.wrap():Gn,ct)}this._applyUpdatedTransform(j),this._fireMoveEvents(p)},hn=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p,hn)},l),this}_prepareEase(l,p,z={}){this._moving=!0,p||z.moving||this.fire(new n.k("movestart",l)),this._zooming&&!z.zooming&&this.fire(new n.k("zoomstart",l)),this._rotating&&!z.rotating&&this.fire(new n.k("rotatestart",l)),this._pitching&&!z.pitching&&this.fire(new n.k("pitchstart",l))}_prepareElevation(l){this._elevationCenter=l,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(l){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const p=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(l<1&&p!==this._elevationTarget){const z=this._elevationTarget-this._elevationStart,j=(p-(z*l+this._elevationStart))/(1-l);this._elevationStart+=l*(z-j),this._elevationTarget=p}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,l)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(l){const p=l.getCameraPosition(),z=this.terrain.getElevationForLngLatZoom(p.lngLat,l.zoom);if(p.altitude<z){const j=this.calculateCameraOptionsFromTo(p.lngLat,z,l.center,l.elevation);return{pitch:j.pitch,zoom:j.zoom}}return{}}_applyUpdatedTransform(l){const p=[];if(this.terrain&&p.push(j=>this._elevateCameraIfInsideTerrain(j)),this.transformCameraUpdate&&p.push(j=>this.transformCameraUpdate(j)),!p.length)return;const z=l.clone();for(const j of p){const q=z.clone(),{center:ie,zoom:pe,pitch:be,bearing:Ae,elevation:Ne}=j(q);ie&&(q.center=ie),pe!==void 0&&(q.zoom=pe),be!==void 0&&(q.pitch=be),Ae!==void 0&&(q.bearing=Ae),Ne!==void 0&&(q.elevation=Ne),z.apply(q)}this.transform.apply(z)}_fireMoveEvents(l){this.fire(new n.k("move",l)),this._zooming&&this.fire(new n.k("zoom",l)),this._rotating&&this.fire(new n.k("rotate",l)),this._pitching&&this.fire(new n.k("pitch",l))}_afterEase(l,p){if(this._easeId&&p&&this._easeId===p)return;delete this._easeId;const z=this._zooming,j=this._rotating,q=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,z&&this.fire(new n.k("zoomend",l)),j&&this.fire(new n.k("rotateend",l)),q&&this.fire(new n.k("pitchend",l)),this.fire(new n.k("moveend",l))}flyTo(l,p){var z;if(!l.essential&&u.prefersReducedMotion){const ia=n.M(l,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ia,p)}this.stop(),l=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},l);const j=this._getTransformForUpdate(),q=j.zoom,ie=j.bearing,pe=j.pitch,be=j.padding,Ae="bearing"in l?this._normalizeBearing(l.bearing,ie):ie,Ne="pitch"in l?+l.pitch:pe,Ge="padding"in l?l.padding:j.padding,at=n.P.convert(l.offset);let ct=j.centerPoint.add(at);const pt=j.pointLocation(ct),{center:xt,zoom:At}=j.getConstrained(n.N.convert(l.center||pt),(z=l.zoom)!==null&&z!==void 0?z:q);this._normalizeCenter(xt,j);const Tt=j.zoomScale(At-q),Rt=j.project(pt),Et=j.project(xt).sub(Rt);let Zt=l.curve;const Yt=Math.max(j.width,j.height),Xt=Yt/Tt,hn=Et.mag();if("minZoom"in l){const ia=n.ad(Math.min(l.minZoom,q,At),j.minZoom,j.maxZoom),Ta=Yt/j.zoomScale(ia-q);Zt=Math.sqrt(Ta/hn*2)}const xn=Zt*Zt;function Nn(ia){const Ta=(Xt*Xt-Yt*Yt+(ia?-1:1)*xn*xn*hn*hn)/(2*(ia?Xt:Yt)*xn*hn);return Math.log(Math.sqrt(Ta*Ta+1)-Ta)}function Dn(ia){return(Math.exp(ia)-Math.exp(-ia))/2}function Gn(ia){return(Math.exp(ia)+Math.exp(-ia))/2}const Yn=Nn(!1);let ya=function(ia){return Gn(Yn)/Gn(Yn+Zt*ia)},ea=function(ia){return Yt*((Gn(Yn)*(Dn(Ta=Yn+Zt*ia)/Gn(Ta))-Dn(Yn))/xn)/hn;var Ta},wa=(Nn(!0)-Yn)/Zt;if(Math.abs(hn)<1e-6||!isFinite(wa)){if(Math.abs(Yt-Xt)<1e-6)return this.easeTo(l,p);const ia=Xt<Yt?-1:1;wa=Math.abs(Math.log(Xt/Yt))/Zt,ea=()=>0,ya=Ta=>Math.exp(ia*Zt*Ta)}if("duration"in l)l.duration=+l.duration;else{const ia="screenSpeed"in l?+l.screenSpeed/Zt:+l.speed;l.duration=1e3*wa/ia}return l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=ie!==Ae,this._pitching=Ne!==pe,this._padding=!j.isPaddingEqual(Ge),this._prepareEase(p,!1),this.terrain&&this._prepareElevation(xt),this._ease(ia=>{const Ta=ia*wa,fa=1/ya(Ta);j.zoom=ia===1?At:q+j.scaleZoom(fa),this._rotating&&(j.bearing=n.z.number(ie,Ae,ia)),this._pitching&&(j.pitch=n.z.number(pe,Ne,ia)),this._padding&&(j.interpolatePadding(be,Ge,ia),ct=j.centerPoint.add(at)),this.terrain&&!l.freezeElevation&&this._updateElevation(ia);const Ia=ia===1?xt:j.unproject(Rt.add(Et.mult(ea(Ta))).mult(fa));j.setLocationAtPoint(j.renderWorldCopies?Ia.wrap():Ia,ct),this._applyUpdatedTransform(j),this._fireMoveEvents(p)},()=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p)},l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,p){var z;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const j=this._onEaseEnd;delete this._onEaseEnd,j.call(this,p)}return l||(z=this.handlers)===null||z===void 0||z.stop(!1),this}_ease(l,p,z){z.animate===!1||z.duration===0?(l(1),p()):(this._easeStart=u.now(),this._easeOptions=z,this._onEaseFrame=l,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(l,p){l=n.b3(l,-180,180);const z=Math.abs(l-p);return Math.abs(l-360-p)<z&&(l-=360),Math.abs(l+360-p)<z&&(l+=360),l}_normalizeCenter(l,p){if(!p.renderWorldCopies||p.lngRange)return;const z=l.lng-p.center.lng;l.lng+=z>180?-360:z<-180?360:0}queryTerrainElevation(l){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(l),this.transform.tileZoom)-this.transform.elevation:null}}const Bo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ns{constructor(l=Bo){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=p=>{!p||p.sourceDataType!=="metadata"&&p.sourceDataType!=="visibility"&&p.dataType!=="style"&&p.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=l}getDefaultPosition(){return"bottom-right"}onAdd(l){return this._map=l,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.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(){r.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(l,p){const z=this._map._getUIString(`AttributionControl.${p}`);l.title=z,l.setAttribute("aria-label",z)}_updateAttributions(){if(!this._map.style)return;let l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map(j=>typeof j!="string"?"":j)):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){const j=this._map.style.stylesheet;this.styleOwner=j.owner,this.styleId=j.id}const p=this._map.style.sourceCaches;for(const j in p){const q=p[j];if(q.used||q.usedForTerrain){const ie=q.getSource();ie.attribution&&l.indexOf(ie.attribution)<0&&l.push(ie.attribution)}}l=l.filter(j=>String(j).trim()),l.sort((j,q)=>j.length-q.length),l=l.filter((j,q)=>{for(let ie=q+1;ie<l.length;ie++)if(l[ie].indexOf(j)>=0)return!1;return!0});const z=l.join(" | ");z!==this._attribHTML&&(this._attribHTML=z,l.length?(this._innerContainer.innerHTML=z,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class co{constructor(l={}){this._updateCompact=()=>{const p=this._container.children;if(p.length){const z=p[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&z.classList.add("maplibregl-compact"):z.classList.remove("maplibregl-compact")}},this.options=l}getDefaultPosition(){return"bottom-left"}onAdd(l){this._map=l,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const p=r.create("a","maplibregl-ctrl-logo");return p.target="_blank",p.rel="noopener nofollow",p.href="https://maplibre.org/",p.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),p.setAttribute("rel","noopener nofollow"),this._container.appendChild(p),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ac{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const p=++this._id;return this._queue.push({callback:l,id:p,cancelled:!1}),p}remove(l){const p=this._currentlyRunning,z=p?this._queue.concat(p):this._queue;for(const j of z)if(j.id===l)return void(j.cancelled=!0)}run(l=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const p=this._currentlyRunning=this._queue;this._queue=[];for(const z of p)if(!z.cancelled&&(z.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var er=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Lo extends n.E{constructor(l){super(),this.sourceCache=l,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,l.usedForTerrain=!0,l.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(l,p){this.sourceCache.update(l,p),this._renderableTilesKeys=[];const z={};for(const j of l.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:p}))z[j.key]=!0,this._renderableTilesKeys.push(j.key),this._tiles[j.key]||(j.posMatrix=new Float64Array(16),n.aQ(j.posMatrix,0,n.X,0,n.X,0,1),this._tiles[j.key]=new we(j,this.tileSize));for(const j in this._tiles)z[j]||delete this._tiles[j]}freeRtt(l){for(const p in this._tiles){const z=this._tiles[p];(!l||z.tileID.equals(l)||z.tileID.isChildOf(l)||l.isChildOf(z.tileID))&&(z.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(l=>this.getTileByID(l))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l){const p={};for(const z of this._renderableTilesKeys){const j=this._tiles[z].tileID;if(j.canonical.equals(l.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16),n.aQ(q.posMatrix,0,n.X,0,n.X,0,1),p[z]=q}else if(j.canonical.isChildOf(l.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16);const ie=j.canonical.z-l.canonical.z,pe=j.canonical.x-(j.canonical.x>>ie<<ie),be=j.canonical.y-(j.canonical.y>>ie<<ie),Ae=n.X>>ie;n.aQ(q.posMatrix,0,Ae,0,Ae,0,1),n.J(q.posMatrix,q.posMatrix,[-pe*Ae,-be*Ae,0]),p[z]=q}else if(l.canonical.isChildOf(j.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16);const ie=l.canonical.z-j.canonical.z,pe=l.canonical.x-(l.canonical.x>>ie<<ie),be=l.canonical.y-(l.canonical.y>>ie<<ie),Ae=n.X>>ie;n.aQ(q.posMatrix,0,n.X,0,n.X,0,1),n.J(q.posMatrix,q.posMatrix,[pe*Ae,be*Ae,0]),n.K(q.posMatrix,q.posMatrix,[1/2**ie,1/2**ie,0]),p[z]=q}}return p}getSourceTile(l,p){const z=this.sourceCache._source;let j=l.overscaledZ-this.deltaZoom;if(j>z.maxzoom&&(j=z.maxzoom),j<z.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(j).key);let q=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!q||!q.dem)&&p)for(;j>=z.minzoom&&(!q||!q.dem);)q=this.sourceCache.getTileByID(l.scaledTo(j--).key);return q}tilesAfterTime(l=Date.now()){return Object.values(this._tiles).filter(p=>p.timeAdded>=l)}}class ii{constructor(l,p,z){this.painter=l,this.sourceCache=new Lo(p),this.options=z,this.exaggeration=typeof z.exaggeration=="number"?z.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(l,p,z,j=n.X){var q;if(!(p>=0&&p<j&&z>=0&&z<j))return 0;const ie=this.getTerrainData(l),pe=(q=ie.tile)===null||q===void 0?void 0:q.dem;if(!pe)return 0;const be=function(pt,xt,At){var Tt=xt[0],Rt=xt[1];return pt[0]=At[0]*Tt+At[4]*Rt+At[12],pt[1]=At[1]*Tt+At[5]*Rt+At[13],pt}([],[p/j*n.X,z/j*n.X],ie.u_terrain_matrix),Ae=[be[0]*pe.dim,be[1]*pe.dim],Ne=Math.floor(Ae[0]),Ge=Math.floor(Ae[1]),at=Ae[0]-Ne,ct=Ae[1]-Ge;return pe.get(Ne,Ge)*(1-at)*(1-ct)+pe.get(Ne+1,Ge)*at*(1-ct)+pe.get(Ne,Ge+1)*(1-at)*ct+pe.get(Ne+1,Ge+1)*at*ct}getElevationForLngLatZoom(l,p){const{tileID:z,mercatorX:j,mercatorY:q}=this._getOverscaledTileIDFromLngLatZoom(l,p);return this.getElevation(z,j%n.X,q%n.X,n.X)}getElevation(l,p,z,j=n.X){return this.getDEMElevation(l,p,z,j)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const j=this.painter.context,q=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new L(j,q,j.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new L(j,new n.R({width:1,height:1}),j.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const p=this.sourceCache.getSourceTile(l,!0);if(p&&p.dem&&(!p.demTexture||p.needsTerrainPrepare)){const j=this.painter.context;p.demTexture=this.painter.getTileTexture(p.dem.stride),p.demTexture?p.demTexture.update(p.dem.getPixels(),{premultiply:!1}):p.demTexture=new L(j,p.dem.getPixels(),j.gl.RGBA,{premultiply:!1}),p.demTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),p.needsTerrainPrepare=!1}const z=p&&p+p.tileID.key+l.key;if(z&&!this._demMatrixCache[z]){const j=this.sourceCache.sourceCache._source.maxzoom;let q=l.canonical.z-p.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=j?q=l.canonical.z-j:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=l.canonical.x-(l.canonical.x>>q<<q),pe=l.canonical.y-(l.canonical.y>>q<<q),be=n.bb(new Float64Array(16),[1/(n.X<<q),1/(n.X<<q),0]);n.J(be,be,[ie*n.X,pe*n.X,0]),this._demMatrixCache[l.key]={matrix:be,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:p&&p.dem&&p.dem.dim||1,u_terrain_matrix:z?this._demMatrixCache[l.key].matrix:this._emptyDemMatrix,u_terrain_unpack:p&&p.dem&&p.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(p&&p.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:p}}getFramebuffer(l){const p=this.painter,z=p.width/devicePixelRatio,j=p.height/devicePixelRatio;return!this._fbo||this._fbo.width===z&&this._fbo.height===j||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new L(p.context,{width:z,height:j,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new L(p.context,{width:z,height:j,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=p.context.createFramebuffer(z,j,!0,!1),this._fbo.depthAttachment.set(p.context.createRenderbuffer(p.context.gl.DEPTH_COMPONENT16,z,j))),this._fbo.colorAttachment.set(l==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const l=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const p=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let q=0,ie=0;q<this._coordsTextureSize;q++)for(let pe=0;pe<this._coordsTextureSize;pe++,ie+=4)p[ie+0]=255&pe,p[ie+1]=255&q,p[ie+2]=pe>>8<<4|q>>8,p[ie+3]=0;const z=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(p.buffer)),j=new L(l,z,l.gl.RGBA,{premultiply:!1});return j.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._coordsTexture=j,j}pointCoordinate(l){this.painter.maybeDrawDepthAndCoords(!0);const p=new Uint8Array(4),z=this.painter.context,j=z.gl,q=Math.round(l.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(l.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);z.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),j.readPixels(q,pe-ie-1,1,1,j.RGBA,j.UNSIGNED_BYTE,p),z.bindFramebuffer.set(null);const be=p[0]+(p[2]>>4<<8),Ae=p[1]+((15&p[2])<<8),Ne=this.coordsIndex[255-p[3]],Ge=Ne&&this.sourceCache.getTileByID(Ne);if(!Ge)return null;const at=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*at;return new n.Z((Ge.tileID.canonical.x*at+be)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*at+Ae)/ct,this.getElevation(Ge.tileID,be,Ae,at))}depthAtPoint(l){const p=new Uint8Array(4),z=this.painter.context,j=z.gl;return z.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),j.readPixels(l.x,this.painter.height/devicePixelRatio-l.y-1,1,1,j.RGBA,j.UNSIGNED_BYTE,p),z.bindFramebuffer.set(null),(p[0]/16777216+p[1]/65536+p[2]/256+p[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const l=this.painter.context,p=new n.bc,z=new n.aY,j=this.meshSize,q=n.X/j,ie=j*j;for(let Ge=0;Ge<=j;Ge++)for(let at=0;at<=j;at++)p.emplaceBack(at*q,Ge*q,0);for(let Ge=0;Ge<ie;Ge+=j+1)for(let at=0;at<j;at++)z.emplaceBack(at+Ge,j+at+Ge+1,j+at+Ge+2),z.emplaceBack(at+Ge,j+at+Ge+2,at+Ge+1);const pe=p.length,be=pe+2*(j+1);for(const Ge of[0,1])for(let at=0;at<=j;at++)for(const ct of[0,1])p.emplaceBack(at*q,Ge*n.X,ct);for(let Ge=0;Ge<2*j;Ge+=2)z.emplaceBack(be+Ge,be+Ge+1,be+Ge+3),z.emplaceBack(be+Ge,be+Ge+3,be+Ge+2),z.emplaceBack(pe+Ge,pe+Ge+3,pe+Ge+1),z.emplaceBack(pe+Ge,pe+Ge+2,pe+Ge+3);const Ae=p.length,Ne=Ae+2*(j+1);for(const Ge of[0,1])for(let at=0;at<=j;at++)for(const ct of[0,1])p.emplaceBack(Ge*n.X,at*q,ct);for(let Ge=0;Ge<2*j;Ge+=2)z.emplaceBack(Ae+Ge,Ae+Ge+1,Ae+Ge+3),z.emplaceBack(Ae+Ge,Ae+Ge+3,Ae+Ge+2),z.emplaceBack(Ne+Ge,Ne+Ge+3,Ne+Ge+1),z.emplaceBack(Ne+Ge,Ne+Ge+2,Ne+Ge+3);return this._mesh=new sc(l.createVertexBuffer(p,er.members),l.createIndexBuffer(z),n.a0.simpleSegment(0,0,p.length,z.length)),this._mesh}getMeshFrameDelta(l){return 2*Math.PI*n.bd/Math.pow(2,l)/5}getMinTileElevationForLngLatZoom(l,p){var z;const{tileID:j}=this._getOverscaledTileIDFromLngLatZoom(l,p);return(z=this.getMinMaxElevation(j).minElevation)!==null&&z!==void 0?z:0}getMinMaxElevation(l){const p=this.getTerrainData(l).tile,z={minElevation:null,maxElevation:null};return p&&p.dem&&(z.minElevation=p.dem.min*this.exaggeration,z.maxElevation=p.dem.max*this.exaggeration),z}_getOverscaledTileIDFromLngLatZoom(l,p){const z=n.Z.fromLngLat(l.wrap()),j=(1<<p)*n.X,q=z.x*j,ie=z.y*j,pe=Math.floor(q/n.X),be=Math.floor(ie/n.X);return{tileID:new n.S(p,0,p,pe,be),mercatorX:q,mercatorY:ie}}}class Rl{constructor(l,p,z){this._context=l,this._size=p,this._tileSize=z,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const l of this._objects)l.texture.destroy(),l.fbo.destroy()}_createObject(l){const p=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),z=new L(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return z.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),p.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),p.colorAttachment.set(z.texture),{id:l,fbo:p,texture:z,stamp:-1,inUse:!1}}getObjectForId(l){return this._objects[l]}useObject(l){l.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(p=>l.id!==p),this._recentlyUsed.push(l.id)}stampObject(l){l.stamp=++this._stamp}getOrCreateFreeObject(){for(const p of this._recentlyUsed)if(!this._objects[p].inUse)return this._objects[p];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const l=this._createObject(this._objects.length);return this._objects.push(l),l}freeObject(l){l.inUse=!1}freeAllObjects(){for(const l of this._objects)this.freeObject(l)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(l=>!l.inUse)===!1}}const cs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ds{constructor(l,p){this.painter=l,this.terrain=p,this.pool=new Rl(l.context,30,p.sourceCache.tileSize*p.qualityFactor)}destruct(){this.pool.destruct()}getTexture(l){return this.pool.getObjectForId(l.rtt[this._stacks.length-1].id).texture}prepareForRender(l,p){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=l._order.filter(z=>!l._layers[z].isHidden(p)),this._coordsDescendingInv={};for(const z in l.sourceCaches){this._coordsDescendingInv[z]={};const j=l.sourceCaches[z].getVisibleCoordinates();for(const q of j){const ie=this.terrain.sourceCache.getTerrainCoords(q);for(const pe in ie)this._coordsDescendingInv[z][pe]||(this._coordsDescendingInv[z][pe]=[]),this._coordsDescendingInv[z][pe].push(ie[pe])}}this._coordsDescendingInvStr={};for(const z of l._order){const j=l._layers[z],q=j.source;if(cs[j.type]&&!this._coordsDescendingInvStr[q]){this._coordsDescendingInvStr[q]={};for(const ie in this._coordsDescendingInv[q])this._coordsDescendingInvStr[q][ie]=this._coordsDescendingInv[q][ie].map(pe=>pe.key).sort().join()}}for(const z of this._renderableTiles)for(const j in this._coordsDescendingInvStr){const q=this._coordsDescendingInvStr[j][z.tileID.key];q&&q!==z.rttCoords[j]&&(z.rtt=[])}}renderLayer(l){if(l.isHidden(this.painter.transform.zoom))return!1;const p=l.type,z=this.painter,j=this._renderableLayerIds[this._renderableLayerIds.length-1]===l.id;if(cs[p]&&(this._prevType&&cs[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(l.id),!j))return!0;if(cs[this._prevType]||cs[p]&&j){this._prevType=p;const q=this._stacks.length-1,ie=this._stacks[q]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[q]){const Ae=this.pool.getObjectForId(pe.rtt[q].id);if(Ae.stamp===pe.rtt[q].stamp){this.pool.useObject(Ae);continue}}const be=this.pool.getOrCreateFreeObject();this.pool.useObject(be),this.pool.stampObject(be),pe.rtt[q]={id:be.id,stamp:be.stamp},z.context.bindFramebuffer.set(be.fbo.framebuffer),z.context.clear({color:n.aN.transparent,stencil:0}),z.currentStencilSource=void 0;for(let Ae=0;Ae<ie.length;Ae++){const Ne=z.style._layers[ie[Ae]],Ge=Ne.source?this._coordsDescendingInv[Ne.source][pe.tileID.key]:[pe.tileID];z.context.viewport.set([0,0,be.fbo.width,be.fbo.height]),z._renderTileClippingMasks(Ne,Ge),z.renderLayer(z,z.style.sourceCaches[Ne.source],Ne,Ge),Ne.source&&(pe.rttCoords[Ne.source]=this._coordsDescendingInvStr[Ne.source][pe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),cs[p]}return!1}}const Fc={"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","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"},Mc=x,al={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Bo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!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],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:n.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ai=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Cs={showCompass:!0,showZoom:!0,visualizePitch:!1};class Za{constructor(l,p,z=!1){this.mousedown=ie=>{this.startMouse(n.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),r.mousePos(this.element,ie)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,r.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.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.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const j=l.dragRotate._mouseRotate.getClickTolerance(),q=l.dragRotate._mousePitch.getClickTolerance();this.element=p,this.mouseRotate=Xl({clickTolerance:j,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:pe,bearingDegreesPerPixelMoved:be=.8})=>{const Ae=new Nl;return new vo({clickTolerance:pe,move:(Ne,Ge)=>({bearingDelta:(Ge.x-Ne.x)*be}),moveStateManager:Ae,enable:ie,assignEvents:Ai})})({clickTolerance:j,enable:!0}),this.map=l,z&&(this.mousePitch=Ys({clickTolerance:q,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:pe,pitchDegreesPerPixelMoved:be=-.5})=>{const Ae=new Nl;return new vo({clickTolerance:pe,move:(Ne,Ge)=>({pitchDelta:(Ge.y-Ne.y)*be}),moveStateManager:Ae,enable:ie,assignEvents:Ai})})({clickTolerance:q,enable:!0})),r.addEventListener(p,"mousedown",this.mousedown),r.addEventListener(p,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(p,"touchcancel",this.reset)}startMouse(l,p){this.mouseRotate.dragStart(l,p),this.mousePitch&&this.mousePitch.dragStart(l,p),r.disableDrag()}startTouch(l,p){this.touchRotate.dragStart(l,p),this.touchPitch&&this.touchPitch.dragStart(l,p),r.disableDrag()}moveMouse(l,p){const z=this.map,{bearingDelta:j}=this.mouseRotate.dragMove(l,p)||{};if(j&&z.setBearing(z.getBearing()+j),this.mousePitch){const{pitchDelta:q}=this.mousePitch.dragMove(l,p)||{};q&&z.setPitch(z.getPitch()+q)}}moveTouch(l,p){const z=this.map,{bearingDelta:j}=this.touchRotate.dragMove(l,p)||{};if(j&&z.setBearing(z.getBearing()+j),this.touchPitch){const{pitchDelta:q}=this.touchPitch.dragMove(l,p)||{};q&&z.setPitch(z.getPitch()+q)}}off(){const l=this.element;r.removeEventListener(l,"mousedown",this.mousedown),r.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let gr;function Go(R,l,p){const z=new n.N(R.lng,R.lat);if(R=new n.N(R.lng,R.lat),l){const j=new n.N(R.lng-360,R.lat),q=new n.N(R.lng+360,R.lat),ie=p.locationPoint(R).distSqr(l);p.locationPoint(j).distSqr(l)<ie?R=j:p.locationPoint(q).distSqr(l)<ie&&(R=q)}for(;Math.abs(R.lng-p.center.lng)>180;){const j=p.locationPoint(R);if(j.x>=0&&j.y>=0&&j.x<=p.width&&j.y<=p.height)break;R.lng>p.center.lng?R.lng-=360:R.lng+=360}return R.lng!==z.lng&&p.locationPoint(R).y>p.height/2-p.getHorizon()?R:z}const Es={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 rl(R,l,p){const z=R.classList;for(const j in Es)z.remove(`maplibregl-${p}-anchor-${j}`);z.add(`maplibregl-${p}-anchor-${l}`)}class Fi extends n.E{constructor(l){if(super(),this._onKeyPress=p=>{const z=p.code,j=p.charCode||p.keyCode;z!=="Space"&&z!=="Enter"&&j!==32&&j!==13||this.togglePopup()},this._onMapClick=p=>{const z=p.originalEvent.target,j=this._element;this._popup&&(z===j||j.contains(z))&&this.togglePopup()},this._update=p=>{var z;if(!this._map)return;const j=this._map.loaded()&&!this._map.isMoving();((p==null?void 0:p.type)==="terrain"||(p==null?void 0:p.type)==="render"&&!j)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Go(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(z=this._lngLat)===null||z===void 0?void 0:z.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let q="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?q=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(q=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||p&&p.type!=="moveend"||(this._pos=this._pos.round()),r.setTransform(this._element,`${Es[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${q}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(p&&p.type==="moveend")}).catch(()=>{})},this._onMove=p=>{if(!this._isDragging){const z=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=z}this._isDragging&&(this._pos=p.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 n.k("dragstart"))),this.fire(new n.k("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 n.k("dragend")),this._state="inactive"},this._addDragHandler=p=>{this._element.contains(p.originalEvent.target)&&(p.preventDefault(),this._positionDelta=p.point.sub(this._pos).add(this._offset),this._pointerdownPos=p.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=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._subpixelPositioning=l&&l.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment!=="auto"?l.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(l==null?void 0:l.opacity,l==null?void 0:l.opacityWhenCovered),l&&l.element)this._element=l.element,this._offset=n.P.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const p=r.createNS("http://www.w3.org/2000/svg","svg"),z=41,j=27;p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height",`${z}px`),p.setAttributeNS(null,"width",`${j}px`),p.setAttributeNS(null,"viewBox",`0 0 ${j} ${z}`);const q=r.createNS("http://www.w3.org/2000/svg","g");q.setAttributeNS(null,"stroke","none"),q.setAttributeNS(null,"stroke-width","1"),q.setAttributeNS(null,"fill","none"),q.setAttributeNS(null,"fill-rule","evenodd");const ie=r.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const pe=r.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const be=[{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 Tt of be){const Rt=r.createNS("http://www.w3.org/2000/svg","ellipse");Rt.setAttributeNS(null,"opacity","0.04"),Rt.setAttributeNS(null,"cx","10.5"),Rt.setAttributeNS(null,"cy","5.80029008"),Rt.setAttributeNS(null,"rx",Tt.rx),Rt.setAttributeNS(null,"ry",Tt.ry),pe.appendChild(Rt)}const Ae=r.createNS("http://www.w3.org/2000/svg","g");Ae.setAttributeNS(null,"fill",this._color);const Ne=r.createNS("http://www.w3.org/2000/svg","path");Ne.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"),Ae.appendChild(Ne);const Ge=r.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const at=r.createNS("http://www.w3.org/2000/svg","path");at.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"),Ge.appendChild(at);const ct=r.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=r.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=r.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const At=r.createNS("http://www.w3.org/2000/svg","circle");At.setAttributeNS(null,"fill","#FFFFFF"),At.setAttributeNS(null,"cx","5.5"),At.setAttributeNS(null,"cy","5.5"),At.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(At),ie.appendChild(pe),ie.appendChild(Ae),ie.appendChild(Ge),ie.appendChild(ct),ie.appendChild(pt),p.appendChild(ie),p.setAttributeNS(null,"height",z*this._scale+"px"),p.setAttributeNS(null,"width",j*this._scale+"px"),this._element.appendChild(p),this._offset=n.P.convert(l&&l.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",p=>{p.preventDefault()}),this._element.addEventListener("mousedown",p=>{p.preventDefault()}),rl(this._element,this._anchor,"marker"),l&&l.className)for(const p of l.className.split(" "))this._element.classList.add(p);this._popup=null}addTo(l){return this.remove(),this._map=l,this._element.setAttribute("aria-label",l._getUIString("Marker.Title")),l.getCanvasContainer().appendChild(this._element),l.on("move",this._update),l.on("moveend",this._update),l.on("terrain",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("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),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=n.N.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const j=Math.abs(13.5)/Math.SQRT2;l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[j,-1*(24.6+j)],"bottom-right":[-j,-1*(24.6+j)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=l,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(l){return this._subpixelPositioning=l,this}getPopup(){return this._popup}togglePopup(){const l=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:l?(l.isOpen()?l.remove():(l.setLngLat(this._lngLat),l.addTo(this._map)),this):this}_updateOpacity(l=!1){var p,z;if(!(!((p=this._map)===null||p===void 0)&&p.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(l)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const j=this._map,q=j.terrain.depthAtPoint(this._pos),ie=j.terrain.getElevationForLngLatZoom(this._lngLat,j.transform.tileZoom);if(j.transform.lngLatToCameraDepth(this._lngLat,ie)-q<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/j.transform._pixelPerMeter,be=Math.sin(j.getPitch()*Math.PI/180)*pe,Ae=j.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ne=j.transform.lngLatToCameraDepth(this._lngLat,ie+be)-Ae>.006;!((z=this._popup)===null||z===void 0)&&z.isOpen()&&Ne&&this._popup.remove(),this._element.style.opacity=Ne?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(l){return this._offset=n.P.convert(l),this._update(),this}addClassName(l){this._element.classList.add(l)}removeClassName(l){this._element.classList.remove(l)}toggleClassName(l){return this._element.classList.toggle(l)}setDraggable(l){return this._draggable=!!l,this._map&&(l?(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(l){return this._rotation=l||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(l){return this._rotationAlignment=l||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(l){return this._pitchAlignment=l&&l!=="auto"?l:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(l,p){return l===void 0&&p===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),l!==void 0&&(this._opacity=l),p!==void 0&&(this._opacityWhenCovered=p),this._map&&this._updateOpacity(!0),this}}const Vl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Jr=0,Jl=!1;class ir extends n.E{constructor(l){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new n.k("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,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(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new n.k("geolocate",p)),this._finish()}},this._updateCamera=p=>{const z=new n.N(p.coords.longitude,p.coords.latitude),j=p.coords.accuracy,q=this._map.getBearing(),ie=n.e({bearing:q},this.options.fitBoundsOptions),pe=Te.fromLngLat(z,j);this._map.fitBounds(pe,ie,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const z=new n.N(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(z).addTo(this._map),this._userLocationDotMarker.setLngLat(z).addTo(this._map),this._accuracy=p.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=p=>{if(this._map){if(this.options.trackUserLocation)if(p.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 z=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Jl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new n.k("error",p)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",p=>p.preventDefault()),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=p=>{if(this._map){if(p===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const z=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z)}else{const z=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fi({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fi({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",z=>{const j=z.originalEvent&&z.originalEvent.type==="resize";z.geolocateSource||this._watchState!=="ACTIVE_LOCK"||j||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new n.k("trackuserlocationend")),this.fire(new n.k("userlocationlostfocus")))})}},this.options=n.e({},Vl,l)}onAdd(l){return this._map=l,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(p=!1){if(gr!==void 0&&!p)return gr;if(window.navigator.permissions===void 0)return gr=!!window.navigator.geolocation,gr;try{gr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{gr=!!window.navigator.geolocation}return gr})}().then(p=>this._finishSetupUI(p)),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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Jr=0,Jl=!1}_isOutOfMapMaxBounds(l){const p=this._map.getMaxBounds(),z=l.coords;return p&&(z.longitude<p.getWest()||z.longitude>p.getEast()||z.latitude<p.getSouth()||z.latitude>p.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 l=this._map.getBounds(),p=l.getSouthEast(),z=l.getNorthEast(),j=p.distanceTo(z),q=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(j/q)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return n.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 n.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Jr--,Jl=!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 n.k("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 n.k("trackuserlocationstart")),this.fire(new n.k("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 l;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Jr++,Jr>1?(l={maximumAge:6e5,timeout:0},Jl=!0):(l=this.options.positionOptions,Jl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,l)}}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)}}const tr={maxWidth:100,unit:"metric"};function wi(R,l,p){const z=p&&p.maxWidth||100,j=R._container.clientHeight/2,q=R.unproject([0,j]),ie=R.unproject([z,j]),pe=q.distanceTo(ie);if(p&&p.unit==="imperial"){const be=3.2808*pe;be>5280?uo(l,z,be/5280,R._getUIString("ScaleControl.Miles")):uo(l,z,be,R._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?uo(l,z,pe/1852,R._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?uo(l,z,pe/1e3,R._getUIString("ScaleControl.Kilometers")):uo(l,z,pe,R._getUIString("ScaleControl.Meters"))}function uo(R,l,p,z){const j=function(ie){const pe=Math.pow(10,`${Math.floor(ie)}`.length-1);let be=ie/pe;return be=be>=10?10:be>=5?5:be>=3?3:be>=2?2:be>=1?1:function(Ae){const Ne=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Ne)/Ne}(be),pe*be}(p),q=j/p;R.style.width=l*q+"px",R.innerHTML=`${j}&nbsp;${z}`}class jl extends n.E{constructor(l={}){super(),this._onFullscreenChange=()=>{var p;let z=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((p=z==null?void 0:z.shadowRoot)===null||p===void 0)&&p.fullscreenElement;)z=z.shadowRoot.fullscreenElement;z===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,l&&l.container&&(l.container instanceof HTMLElement?this._container=l.container:n.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(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const l=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",l).setAttribute("aria-hidden","true"),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.title=l}_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 n.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new n.k("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()}}const Ho={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},yt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class wt extends n.E{constructor(l){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.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 n.k("close"))),this),this._onMouseUp=p=>{this._update(p.point)},this._onMouseMove=p=>{this._update(p.point)},this._onDrag=p=>{this._update(p.point)},this._update=p=>{var z;const j=this._lngLat||this._trackPointer;if(!this._map||!j||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ae of this.options.className.split(" "))this._container.classList.add(Ae);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._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Go(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(z=this._lngLat)===null||z===void 0?void 0:z.wrap(),this._trackPointer&&!p)return;const q=this._flatPos=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&p?p:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const pe=Lt(this.options.offset);if(!ie){const Ae=this._container.offsetWidth,Ne=this._container.offsetHeight;let Ge;Ge=q.y+pe.bottom.y<Ne?["top"]:q.y>this._map.transform.height-Ne?["bottom"]:[],q.x<Ae/2?Ge.push("left"):q.x>this._map.transform.width-Ae/2&&Ge.push("right"),ie=Ge.length===0?"bottom":Ge.join("-")}let be=q.add(pe[ie]);this.options.subpixelPositioning||(be=be.round()),r.setTransform(this._container,`${Es[ie]} translate(${be.x}px,${be.y}px)`),rl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(Ho),l)}addTo(l){return this._map&&this.remove(),this._map=l,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 n.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=n.N.convert(l),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(l){return this.setDOMContent(document.createTextNode(l))}setHTML(l){const p=document.createDocumentFragment(),z=document.createElement("body");let j;for(z.innerHTML=l;j=z.firstChild,j;)p.appendChild(j);return this.setDOMContent(p)}getMaxWidth(){var l;return(l=this._container)===null||l===void 0?void 0:l.style.maxWidth}setMaxWidth(l){return this.options.maxWidth=l,this._update(),this}setDOMContent(l){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(l),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(l){return this._container&&this._container.classList.add(l),this}removeClassName(l){return this._container&&this._container.classList.remove(l),this}setOffset(l){return this.options.offset=l,this._update(),this}toggleClassName(l){if(this._container)return this._container.classList.toggle(l)}setSubpixelPositioning(l){this.options.subpixelPositioning=l}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(yt);l&&l.focus()}}function Lt(R){if(R){if(typeof R=="number"){const l=Math.round(Math.abs(R)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,R),"top-left":new n.P(l,l),"top-right":new n.P(-l,l),bottom:new n.P(0,-R),"bottom-left":new n.P(l,-l),"bottom-right":new n.P(-l,-l),left:new n.P(R,0),right:new n.P(-R,0)}}if(R instanceof n.P||Array.isArray(R)){const l=n.P.convert(R);return{center:l,top:l,"top-left":l,"top-right":l,bottom:l,"bottom-left":l,"bottom-right":l,left:l,right:l}}return{center:n.P.convert(R.center||[0,0]),top:n.P.convert(R.top||[0,0]),"top-left":n.P.convert(R["top-left"]||[0,0]),"top-right":n.P.convert(R["top-right"]||[0,0]),bottom:n.P.convert(R.bottom||[0,0]),"bottom-left":n.P.convert(R["bottom-left"]||[0,0]),"bottom-right":n.P.convert(R["bottom-right"]||[0,0]),left:n.P.convert(R.left||[0,0]),right:n.P.convert(R.right||[0,0])}}return Lt(new n.P(0,0))}const ne=x;h.AJAXError=n.bg,h.Evented=n.E,h.LngLat=n.N,h.MercatorCoordinate=n.Z,h.Point=n.P,h.addProtocol=n.bh,h.config=n.a,h.removeProtocol=n.bi,h.AttributionControl=ns,h.BoxZoomHandler=yo,h.CanvasSource=Me,h.CooperativeGesturesHandler=ls,h.DoubleClickZoomHandler=Ci,h.DragPanHandler=Ss,h.DragRotateHandler=Po,h.EdgeInsets=zl,h.FullscreenControl=jl,h.GeoJSONSource=Pe,h.GeolocateControl=ir,h.Hash=Qi,h.ImageSource=Be,h.KeyboardHandler=dc,h.LngLatBounds=Te,h.LogoControl=co,h.Map=class extends to{constructor(R){n.be.mark(n.bf.create);const l=Object.assign(Object.assign({},al),R);if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(l.minZoom,l.maxZoom,l.minPitch,l.maxPitch,l.renderWorldCopies),{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ac,this._controls=[],this._mapId=n.a4(),this._contextLost=z=>{z.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:z}))},this._contextRestored=z=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:z}))},this._onMapScroll=z=>{if(z.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=l.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=l.preserveDrawingBuffer===!0,this._antialias=l.antialias===!0,this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Fc),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=T.addThrottleControl(()=>this.isMoving()),this._requestManager=new A(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let z=!1;const j=Ns(q=>{this._trackResize&&!this._removed&&this.resize(q)._update()},50);this._resizeObserver=new ResizeObserver(q=>{z?j(q):z=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ri(this,l);const p=typeof l.hash=="string"&&l.hash||void 0;this._hash=l.hash&&new Qi(p).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,n.e({},l.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new ns(typeof l.attributionControl=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new co,l.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",z=>{this._update(z.dataType==="style"),this.fire(new n.k(`${z.dataType}data`,z))}),this.on("dataloading",z=>{this.fire(new n.k(`${z.dataType}dataloading`,z))}),this.on("dataabort",z=>{this.fire(new n.k("sourcedataabort",z))})}_getMapId(){return this._mapId}addControl(R,l){if(l===void 0&&(l=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new n.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=R.onAdd(this);this._controls.push(R);const z=this._controlPositions[l];return l.indexOf("bottom")!==-1?z.insertBefore(p,z.firstChild):z.appendChild(p),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new n.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(R);return l>-1&&this._controls.splice(l,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,l,p,z){return z==null&&this.terrain&&(z=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,l,p,z)}resize(R){var l;const p=this._containerDimensions(),z=p[0],j=p[1],q=this._getClampedPixelRatio(z,j);if(this._resizeCanvas(z,j,q),this.painter.resize(z,j,q),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const be=this._getClampedPixelRatio(z,j);this._resizeCanvas(z,j,be),this.painter.resize(z,j,be)}this.transform.resize(z,j),(l=this._requestedCameraState)===null||l===void 0||l.resize(z,j);const ie=!this._moving;return ie&&(this.stop(),this.fire(new n.k("movestart",R)).fire(new n.k("move",R))),this.fire(new n.k("resize",R)),ie&&this.fire(new n.k("moveend",R)),this}_getClampedPixelRatio(R,l){const{0:p,1:z}=this._maxCanvasSize,j=this.getPixelRatio(),q=R*j,ie=l*j,pe=q>p?p/q:1,be=ie>z?z/ie:1;return Math.min(pe,be)*j}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Te.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(n.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(n.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,l,p){if(R==="mouseenter"||R==="mouseover"){let z=!1;return{layer:l,listener:p,delegates:{mousemove:q=>{const ie=this.getLayer(l)?this.queryRenderedFeatures(q.point,{layers:[l]}):[];ie.length?z||(z=!0,p.call(this,new To(R,this,q.originalEvent,{features:ie}))):z=!1},mouseout:()=>{z=!1}}}}if(R==="mouseleave"||R==="mouseout"){let z=!1;return{layer:l,listener:p,delegates:{mousemove:ie=>{(this.getLayer(l)?this.queryRenderedFeatures(ie.point,{layers:[l]}):[]).length?z=!0:z&&(z=!1,p.call(this,new To(R,this,ie.originalEvent)))},mouseout:ie=>{z&&(z=!1,p.call(this,new To(R,this,ie.originalEvent)))}}}}{const z=j=>{const q=this.getLayer(l)?this.queryRenderedFeatures(j.point,{layers:[l]}):[];q.length&&(j.features=q,p.call(this,j),delete j.features)};return{layer:l,listener:p,delegates:{[R]:z}}}}on(R,l,p){if(p===void 0)return super.on(R,l);const z=this._createDelegatedListener(R,l,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(z);for(const j in z.delegates)this.on(j,z.delegates[j]);return this}once(R,l,p){if(p===void 0)return super.once(R,l);const z=this._createDelegatedListener(R,l,p);for(const j in z.delegates)this.once(j,z.delegates[j]);return this}off(R,l,p){return p===void 0?super.off(R,l):(this._delegatedListeners&&this._delegatedListeners[R]&&(z=>{const j=z[R];for(let q=0;q<j.length;q++){const ie=j[q];if(ie.layer===l&&ie.listener===p){for(const pe in ie.delegates)this.off(pe,ie.delegates[pe]);return j.splice(q,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,l){if(!this.style)return[];let p;const z=R instanceof n.P||Array.isArray(R),j=z?R:[[0,0],[this.transform.width,this.transform.height]];if(l=l||(z?{}:R)||{},j instanceof n.P||typeof j[0]=="number")p=[n.P.convert(j)];else{const q=n.P.convert(j[0]),ie=n.P.convert(j[1]);p=[q,new n.P(ie.x,q.y),ie,new n.P(q.x,ie.y),q]}return this.style.queryRenderedFeatures(p,l,this.transform)}querySourceFeatures(R,l){return this.style.querySourceFeatures(R,l)}setStyle(R,l){return(l=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(R,l))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const l=this._locale[R];if(l==null)throw new Error(`Missing UI string '${R}'`);return l}_updateStyle(R,l){if(l.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,l));const p=this.style&&l.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new ja(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,l,p):this.style.loadJSON(R,l,p),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ja(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,l){if(typeof R=="string"){const p=R,z=this._requestManager.transformRequest(p,"Style");n.h(z,new AbortController).then(j=>{this._updateDiff(j.data,l)}).catch(j=>{j&&this.fire(new n.j(j))})}else typeof R=="object"&&this._updateDiff(R,l)}_updateDiff(R,l){try{this.style.setState(R,l)&&this._update(!0)}catch(p){n.w(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(R,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():n.w("There is no style added to the map.")}addSource(R,l){return this._lazyInitEmptyStyle(),this.style.addSource(R,l),this._update(!0)}isSourceLoaded(R){const l=this.style&&this.style.sourceCaches[R];if(l!==void 0)return l.loaded();this.fire(new n.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const l=this.style.sourceCaches[R.source];if(!l)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&l.reload();for(const p in this.style._layers){const z=this.style._layers[p];z.type==="hillshade"&&z.source===R.source&&n.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.")}this.terrain=new ii(this.painter,l,R),this.painter.renderToTexture=new Ds(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=p=>{p.dataType==="style"?this.terrain.sourceCache.freeRtt():p.dataType==="source"&&p.tile&&(p.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(p.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.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new n.k("terrain",{terrain:R})),this}getTerrain(){var R,l;return(l=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&l!==void 0?l:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const l in R){const p=R[l]._tiles;for(const z in p){const j=p[z];if(j.state!=="loaded"&&j.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,l,p={}){const{pixelRatio:z=1,sdf:j=!1,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae}=p;if(this._lazyInitEmptyStyle(),!(l instanceof HTMLImageElement||n.b(l))){if(l.width===void 0||l.height===void 0)return this.fire(new n.j(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:Ne,height:Ge,data:at}=l,ct=l;return this.style.addImage(R,{data:new n.R({width:Ne,height:Ge},new Uint8Array(at)),pixelRatio:z,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae,sdf:j,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Ne,height:Ge,data:at}=u.getImageData(l);this.style.addImage(R,{data:new n.R({width:Ne,height:Ge},at),pixelRatio:z,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae,sdf:j,version:0})}}updateImage(R,l){const p=this.style.getImage(R);if(!p)return this.fire(new n.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const z=l instanceof HTMLImageElement||n.b(l)?u.getImageData(l):l,{width:j,height:q,data:ie}=z;if(j===void 0||q===void 0)return this.fire(new n.j(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(j!==p.data.width||q!==p.data.height)return this.fire(new n.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(l instanceof HTMLImageElement||n.b(l));return p.data.replace(ie,pe),this.style.updateImage(R,p),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return T.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,l){return this._lazyInitEmptyStyle(),this.style.addLayer(R,l),this._update(!0)}moveLayer(R,l){return this.style.moveLayer(R,l),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,l,p){return this.style.setLayerZoomRange(R,l,p),this._update(!0)}setFilter(R,l,p={}){return this.style.setFilter(R,l,p),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,l,p,z={}){return this.style.setPaintProperty(R,l,p,z),this._update(!0)}getPaintProperty(R,l){return this.style.getPaintProperty(R,l)}setLayoutProperty(R,l,p,z={}){return this.style.setLayoutProperty(R,l,p,z),this._update(!0)}getLayoutProperty(R,l){return this.style.getLayoutProperty(R,l)}setGlyphs(R,l={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,l),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,l,p={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,l,p,z=>{z||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,l={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,l,p=>{p||this._update(!0)}),this}setLight(R,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,l),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,l){return this.style.setFeatureState(R,l),this._update()}removeFeatureState(R,l){return this.style.removeFeatureState(R,l),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,l=0;return this._container&&(R=this._container.clientWidth||400,l=this._container.clientHeight||300),[R,l]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const l=this._canvasContainer=r.create("div","maplibregl-canvas-container",R);this._interactive&&l.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",l),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 p=this._containerDimensions(),z=this._getClampedPixelRatio(p[0],p[1]);this._resizeCanvas(p[0],p[1],z);const j=this._controlContainer=r.create("div","maplibregl-control-container",R),q=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{q[ie]=r.create("div",`maplibregl-ctrl-${ie} `,j)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,l,p){this._canvas.width=Math.floor(p*R),this._canvas.height=Math.floor(p*l),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let l=null;this._canvas.addEventListener("webglcontextcreationerror",z=>{l={requestedAttributes:R},z&&(l.statusMessage=z.statusMessage,l.type=z.type)},{once:!0});const p=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!p){const z="Failed to initialize WebGL";throw l?(l.message=z,new Error(JSON.stringify(l))):new Error(z)}this.painter=new lc(p,this.transform),i.testSupport(p)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const l=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let p=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,q=u.now();this.style.zoomHistory.update(j,q);const ie=new n.a9(j,{now:q,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=ie.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(p=!0,this._crossFadingFactor=pe),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,l,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding}),this.fire(new n.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,n.be.mark(n.bf.load),this.fire(new n.k("load"))),this.style&&(this.style.hasTransitions()||p)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const z=this._sourcesDirty||this._styleDirty||this._placementDirty;return z||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||z||(this._fullyLoaded=!0,n.be.mark(n.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const p of this._controls)p.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),T.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l!=null&&l.loseContext&&l.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),n.be.clearMetrics(),this._removed=!0,this.fire(new n.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(R=>{n.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},h.MapMouseEvent=To,h.MapTouchEvent=go,h.MapWheelEvent=Js,h.Marker=Fi,h.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const l=this._map.getZoom(),p=l===this._map.getMaxZoom(),z=l===this._map.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=z,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",z.toString())},this._rotateCompassArrow=()=>{const l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=l},this._setButtonTitle=(l,p)=>{const z=this._map._getUIString(`NavigationControl.${p}`);l.title=z,l.setAttribute("aria-label",z)},this.options=n.e({},Cs,R),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",l=>this._map.zoomIn({},{originalEvent:l})),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",l=>this._map.zoomOut({},{originalEvent:l})),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",l=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:l}):this._map.resetNorth({},{originalEvent:l})}),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,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._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Za(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.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._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,l){const p=r.create("button",R,this._container);return p.type="button",p.addEventListener("click",l),p}},h.Popup=wt,h.RasterDEMTileSource=Ve,h.RasterTileSource=Le,h.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=l=>{this.options.unit=l,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},tr),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},h.ScrollZoomHandler=el,h.Style=ja,h.TerrainControl=class{constructor(R){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=R}onAdd(R){return this._map=R,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.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(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},h.TwoFingersTouchPitchHandler=Dl,h.TwoFingersTouchRotateHandler=qc,h.TwoFingersTouchZoomHandler=sr,h.TwoFingersTouchZoomRotateHandler=nl,h.VectorTileSource=Ie,h.VideoSource=ye,h.addSourceType=(R,l)=>n._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((p,z)=>{ke[p]=z})(R,l)}),h.clearPrewarmedResources=function(){const R=fe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),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()"))},h.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},h.getRTLTextPluginStatus=function(){return Xe().getRTLTextPluginStatus()},h.getVersion=function(){return ne},h.getWorkerCount=function(){return de.workerCount},h.getWorkerUrl=function(){return n.a.WORKER_URL},h.importScriptInWorkers=function(R){return me().broadcast("IS",R)},h.prewarm=function(){le().acquire(ce)},h.setMaxParallelImageRequests=function(R){n.a.MAX_PARALLEL_IMAGE_REQUESTS=R},h.setRTLTextPlugin=function(R,l){return Xe().setRTLTextPlugin(R,l)},h.setWorkerCount=function(R){de.workerCount=R},h.setWorkerUrl=function(R){n.a.WORKER_URL=R}}),g}()},88640:function(b,g,a){function v(xe,Ce,Te){xe.prototype=Ce.prototype=Te,Te.constructor=xe}function h(xe,Ce){var Te=Object.create(xe.prototype);for(var Ee in Ce)Te[Ee]=Ce[Ee];return Te}function n(){}a.d(g,{GW:function(){return ge},Dj:function(){return de}});var x=.7,_=1/x,y="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\(".concat(y,",").concat(y,",").concat(y,"\\)$")),c=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),f=new RegExp("^rgba\\(".concat(y,",").concat(y,",").concat(y,",").concat(u,"\\)$")),m=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(u,"\\)$")),w=new RegExp("^hsl\\(".concat(u,",").concat(r,",").concat(r,"\\)$")),T=new RegExp("^hsla\\(".concat(u,",").concat(r,",").concat(r,",").concat(u,"\\)$")),A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function C(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function B(xe){var Ce,Te;return xe=(xe+"").trim().toLowerCase(),(Ce=i.exec(xe))?(Te=Ce[1].length,Ce=parseInt(Ce[1],16),Te===6?E(Ce):Te===3?new S(Ce>>8&15|Ce>>4&240,Ce>>4&15|240&Ce,(15&Ce)<<4|15&Ce,1):Te===8?I(Ce>>24&255,Ce>>16&255,Ce>>8&255,(255&Ce)/255):Te===4?I(Ce>>12&15|Ce>>8&240,Ce>>8&15|Ce>>4&240,Ce>>4&15|240&Ce,((15&Ce)<<4|15&Ce)/255):null):(Ce=d.exec(xe))?new S(Ce[1],Ce[2],Ce[3],1):(Ce=c.exec(xe))?new S(255*Ce[1]/100,255*Ce[2]/100,255*Ce[3]/100,1):(Ce=f.exec(xe))?I(Ce[1],Ce[2],Ce[3],Ce[4]):(Ce=m.exec(xe))?I(255*Ce[1]/100,255*Ce[2]/100,255*Ce[3]/100,Ce[4]):(Ce=w.exec(xe))?$(Ce[1],Ce[2]/100,Ce[3]/100,1):(Ce=T.exec(xe))?$(Ce[1],Ce[2]/100,Ce[3]/100,Ce[4]):A.hasOwnProperty(xe)?E(A[xe]):xe==="transparent"?new S(NaN,NaN,NaN,0):null}function E(xe){return new S(xe>>16&255,xe>>8&255,255&xe,1)}function I(xe,Ce,Te,Ee){return Ee<=0&&(xe=Ce=Te=NaN),new S(xe,Ce,Te,Ee)}function M(xe,Ce,Te,Ee){return arguments.length===1?((Ie=xe)instanceof n||(Ie=B(Ie)),Ie?new S((Ie=Ie.rgb()).r,Ie.g,Ie.b,Ie.opacity):new S):new S(xe,Ce,Te,Ee??1);var Ie}function S(xe,Ce,Te,Ee){this.r=+xe,this.g=+Ce,this.b=+Te,this.opacity=+Ee}function L(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function k(){var xe=F(this.opacity);return"".concat(xe===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(xe===1?")":", ".concat(xe,")"))}function F(xe){return isNaN(xe)?1:Math.max(0,Math.min(1,xe))}function N(xe){return Math.max(0,Math.min(255,Math.round(xe)||0))}function V(xe){return((xe=N(xe))<16?"0":"")+xe.toString(16)}function $(xe,Ce,Te,Ee){return Ee<=0?xe=Ce=Te=NaN:Te<=0||Te>=1?xe=Ce=NaN:Ce<=0&&(xe=NaN),new U(xe,Ce,Te,Ee)}function G(xe){if(xe instanceof U)return new U(xe.h,xe.s,xe.l,xe.opacity);if(xe instanceof n||(xe=B(xe)),!xe)return new U;if(xe instanceof U)return xe;var Ce=(xe=xe.rgb()).r/255,Te=xe.g/255,Ee=xe.b/255,Ie=Math.min(Ce,Te,Ee),Le=Math.max(Ce,Te,Ee),Ve=NaN,Pe=Le-Ie,De=(Le+Ie)/2;return Pe?(Ve=Ce===Le?(Te-Ee)/Pe+6*(Te<Ee):Te===Le?(Ee-Ce)/Pe+2:(Ce-Te)/Pe+4,Pe/=De<.5?Le+Ie:2-Le-Ie,Ve*=60):Pe=De>0&&De<1?0:Ve,new U(Ve,Pe,De,xe.opacity)}function U(xe,Ce,Te,Ee){this.h=+xe,this.s=+Ce,this.l=+Te,this.opacity=+Ee}function K(xe){return(xe=(xe||0)%360)<0?xe+360:xe}function ae(xe){return Math.max(0,Math.min(1,xe||0))}function Z(xe,Ce,Te){return 255*(xe<60?Ce+(Te-Ce)*xe/60:xe<180?Te:xe<240?Ce+(Te-Ce)*(240-xe)/60:Ce)}v(n,B,{copy:function(xe){return Object.assign(new this.constructor,this,xe)},displayable:function(){return this.rgb().displayable()},hex:C,formatHex:C,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return G(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,h(n,{brighter:function(xe){return xe=xe==null?_:Math.pow(_,xe),new S(this.r*xe,this.g*xe,this.b*xe,this.opacity)},darker:function(xe){return xe=xe==null?x:Math.pow(x,xe),new S(this.r*xe,this.g*xe,this.b*xe,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),F(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:L,formatHex:L,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(U,function(xe,Ce,Te,Ee){return arguments.length===1?G(xe):new U(xe,Ce,Te,Ee??1)},h(n,{brighter:function(xe){return xe=xe==null?_:Math.pow(_,xe),new U(this.h,this.s,this.l*xe,this.opacity)},darker:function(xe){return xe=xe==null?x:Math.pow(x,xe),new U(this.h,this.s,this.l*xe,this.opacity)},rgb:function(){var xe=this.h%360+360*(this.h<0),Ce=isNaN(xe)||isNaN(this.s)?0:this.s,Te=this.l,Ee=Te+(Te<.5?Te:1-Te)*Ce,Ie=2*Te-Ee;return new S(Z(xe>=240?xe-240:xe+120,Ie,Ee),Z(xe,Ie,Ee),Z(xe<120?xe+240:xe-120,Ie,Ee),this.opacity)},clamp:function(){return new U(K(this.h),ae(this.s),ae(this.l),F(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var xe=F(this.opacity);return"".concat(xe===1?"hsl(":"hsla(").concat(K(this.h),", ").concat(100*ae(this.s),"%, ").concat(100*ae(this.l),"%").concat(xe===1?")":", ".concat(xe,")"))}}));var te=function(xe){return function(){return xe}};function Q(xe,Ce){var Te=Ce-xe;return Te?function(Ee,Ie){return function(Le){return Ee+Le*Ie}}(xe,Te):te(isNaN(xe)?Ce:xe)}var J=function xe(Ce){var Te=function(Ie){return(Ie=+Ie)==1?Q:function(Le,Ve){return Ve-Le?function(Pe,De,Be){return Pe=Math.pow(Pe,Be),De=Math.pow(De,Be)-Pe,Be=1/Be,function(ye){return Math.pow(Pe+ye*De,Be)}}(Le,Ve,Ie):te(isNaN(Le)?Ve:Le)}}(Ce);function Ee(Ie,Le){var Ve=Te((Ie=M(Ie)).r,(Le=M(Le)).r),Pe=Te(Ie.g,Le.g),De=Te(Ie.b,Le.b),Be=Q(Ie.opacity,Le.opacity);return function(ye){return Ie.r=Ve(ye),Ie.g=Pe(ye),Ie.b=De(ye),Ie.opacity=Be(ye),Ie+""}}return Ee.gamma=xe,Ee}(1);function Y(xe,Ce){var Te,Ee=Ce?Ce.length:0,Ie=xe?Math.min(Ee,xe.length):0,Le=new Array(Ie),Ve=new Array(Ee);for(Te=0;Te<Ie;++Te)Le[Te]=ge(xe[Te],Ce[Te]);for(;Te<Ee;++Te)Ve[Te]=Ce[Te];return function(Pe){for(Te=0;Te<Ie;++Te)Ve[Te]=Le[Te](Pe);return Ve}}function ce(xe,Ce){var Te=new Date;return xe=+xe,Ce=+Ce,function(Ee){return Te.setTime(xe*(1-Ee)+Ce*Ee),Te}}function de(xe,Ce){return xe=+xe,Ce=+Ce,function(Te){return xe*(1-Te)+Ce*Te}}function he(xe){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce},he(xe)}function fe(xe,Ce){var Te,Ee={},Ie={};for(Te in xe!==null&&he(xe)==="object"||(xe={}),Ce!==null&&he(Ce)==="object"||(Ce={}),Ce)Te in xe?Ee[Te]=ge(xe[Te],Ce[Te]):Ie[Te]=Ce[Te];return function(Le){for(Te in Ee)Ie[Te]=Ee[Te](Le);return Ie}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,le=new RegExp(re.source,"g");function se(xe,Ce){var Te,Ee,Ie,Le=re.lastIndex=le.lastIndex=0,Ve=-1,Pe=[],De=[];for(xe+="",Ce+="";(Te=re.exec(xe))&&(Ee=le.exec(Ce));)(Ie=Ee.index)>Le&&(Ie=Ce.slice(Le,Ie),Pe[Ve]?Pe[Ve]+=Ie:Pe[++Ve]=Ie),(Te=Te[0])===(Ee=Ee[0])?Pe[Ve]?Pe[Ve]+=Ee:Pe[++Ve]=Ee:(Pe[++Ve]=null,De.push({i:Ve,x:de(Te,Ee)})),Le=le.lastIndex;return Le<Ce.length&&(Ie=Ce.slice(Le),Pe[Ve]?Pe[Ve]+=Ie:Pe[++Ve]=Ie),Pe.length<2?De[0]?function(Be){return function(ye){return Be(ye)+""}}(De[0].x):function(Be){return function(){return Be}}(Ce):(Ce=De.length,function(Be){for(var ye,Me=0;Me<Ce;++Me)Pe[(ye=De[Me]).i]=ye.x(Be);return Pe.join("")})}function me(xe,Ce){Ce||(Ce=[]);var Te,Ee=xe?Math.min(Ce.length,xe.length):0,Ie=Ce.slice();return function(Le){for(Te=0;Te<Ee;++Te)Ie[Te]=xe[Te]*(1-Le)+Ce[Te]*Le;return Ie}}function ve(xe){return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce},ve(xe)}function ge(xe,Ce){var Te,Ee,Ie=ve(Ce);return Ce==null||Ie==="boolean"?te(Ce):(Ie==="number"?de:Ie==="string"?(Te=B(Ce))?(Ce=Te,J):se:Ce instanceof B?J:Ce instanceof Date?ce:(Ee=Ce,!ArrayBuffer.isView(Ee)||Ee instanceof DataView?Array.isArray(Ce)?Y:typeof Ce.valueOf!="function"&&typeof Ce.toString!="function"||isNaN(Ce)?fe:de:me))(xe,Ce)}},23648:function(b){b.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(b){b.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(b){b.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(b){b.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(b){b.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(b){b.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(b){b.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(b){b.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},O={};function W(b){var g=O[b];if(g!==void 0)return g.exports;var a=O[b]={id:b,exports:{}};return s[b].call(a.exports,a,a.exports,W),a.exports}return W.m=s,W.n=function(b){var g=b&&b.__esModule?function(){return b.default}:function(){return b};return W.d(g,{a:g}),g},W.d=function(b,g){for(var a in g)W.o(g,a)&&!W.o(b,a)&&Object.defineProperty(b,a,{enumerable:!0,get:g[a]})},W.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),W.o=function(b,g){return Object.prototype.hasOwnProperty.call(b,g)},W.r=function(b){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},W.b=document.baseURI||self.location.href,W.nc=void 0,W(20260)}()})})(pD);var mst=pD.exports;const fD=w4(mst),MUt="",IUt="",gst={ref:"card",class:"card-volumetric-field"},mD=1,yst=800,gD=300,vst=-46,yD=100,vD=-14,_st=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const o=e,s=new Set([2,20,308,310]),O=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let W=null;const b=t.ref(null),g=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>o.passesPlays,f=>{const m=f.reduce((w,T)=>(s.has(T[o.playIndexes.categoryId])&&w.push({x1:T[o.playIndexes.coordinate1X],y1:T[o.playIndexes.coordinate1Y],x2:T[o.playIndexes.coordinate2X],y2:T[o.playIndexes.coordinate2Y],x3:T[o.playIndexes.coordinate3X],y3:T[o.playIndexes.coordinate3Y]}),w),[]);c(m)}),t.watch(()=>a.value,(f,m)=>{v.value&&(r(f),g.value.style.height=`${i(f)}px`,v.value.style.top=`${d(i(f))}px`)});function h(){W=new ResizeObserver(f=>{for(const m of f)a.value=m.contentRect.width}),W.observe(b.value)}function n(f){return Array.from({length:f},()=>0)}function x(f,m){let w=.01351,T=.02439,A=0,C=0,P=[];const B=m.length,E=Math.floor(B/10);for(;A<74;)C=m.filter(I=>1-I.y3>=A*w&&1-I.y3<=(A+1)*w&&1-I.x3>=f*T&&1-I.x3<=(f+1)*T).map(I=>I.y3).length,P.push(parseFloat((C/E).toFixed(4))),A++;return P.reverse()}function _(f){let m=[n(74),n(74)],w=[],T=39;for(;T>0&&T<=39;)w=x(T,f),m.push(w),T--;return m.push(n(74),n(74)),m}function y(f,m,w){const T=[];let P=0,B=0;T.push(f[0]);for(let E=1;E<w-1;E++){const I=[];I.push(f[E][0]);for(let M=1;M<m-1;M++)P=f[E][M-1],B=f[E][M+1],I.push(P+.5*(f[E][M]+B-P));I.push(f[E][m-1]),T.push(I)}T.push(f[w-1]);for(let E=1;E<m-1;E++)for(let I=1;I<w-1;I++)P=T[I-1][E],B=T[I+1][E],T[I][E]=P+.5*(T[I][E]+B-P);return T}function u(f){let m=0,w=0;for(let T=0;T<f.length;T++){w=w+f[T].reduce(function(C,P){return C+P});const A=Math.max.apply(null,f[T]);A>m&&(m=A)}return m}function r(f){fD.relayout(b.value,{width:f,height:i(f)})}function i(f){return Math.round(gD/yst*f,0)}function d(f){return vD+(f-yD)/(gD-yD)*(vst-vD)}function c(f){let m=_(f),w=m.length,T=m[0].length;m=y(y(m,T,w),T,w),T=m[0].length,w=m.length;const A=u(m),C=[{z:m,type:"surface",connectgaps:!0,opacity:.25,colorscale:O,autoscale:!1,showscale:!1}],P=[0,T],B=[0,w],E=[0,A*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:B},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:E},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};g.value&&(g.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<T;S++){const L=[],k=[],F=[];for(let N=0;N<w;N++)L.push(S),k.push(N),F.push(C[0].z[N][S]);M.push({x:L,y:k,z:F,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:A,width:mD,color:F,colorscale:O,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const L=[],k=[],F=[];for(let N=0;N<T;N++)L.push(N),k.push(S),F.push(C[0].z[S][N]);M.push({x:L,y:k,z:F,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:A,width:mD,color:F,colorscale:O,shape:"spline",smoothing:.6,dash:"dotline"}})}fD.newPlot("surface-plot",C.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${d(i(a.value))}px`)}return t.onMounted(()=>{b.value&&(b.value.style.pointerEvents="none"),h()}),(f,m)=>(t.openBlock(),t.createElementBlock("div",gst,[t.createElementVNode("div",{ref_key:"volumetricField",ref:g,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:b,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-46439c02"]]),BUt="",_D=e=>(t.pushScopeId("data-v-885deed1"),e=e(),t.popScopeId(),e),bst=_D(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),xst=_D(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),wst=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(O,W)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[bst,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),xst],4))}},[["__scopeId","data-v-885deed1"]]),kst=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let y9=null;function Sst(){return y9||(y9=fy(kst)),y9}const FUt="",Tst=e=>(t.pushScopeId("data-v-b3d91153"),e=e(),t.popScopeId(),e),Cst={class:"volumetric-section-container"},Est=Tst(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),Ast={key:0,class:"volumetric-section-container__switch"},Mst={class:"volumetric-section-container__attack-direction"},Ist={class:"volumetric-section-container__field"},Pst=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=e,s=Sst(),O=new Set([2,20,308,310]),W=new Set([3,21,309]),b=new Set([...O,...W]);let g=null;const a=t.ref(0),v=t.ref(new Map),h=t.ref({teamId:0}),n=t.computed(()=>[{teamId:o.game.homeTeam.team_id,text:o.game.homeTeam.colloquial_name,img:o.game.homeTeam.logo,isHomeTeam:!0},{teamId:o.game.awayTeam.team_id,text:o.game.awayTeam.colloquial_name,img:o.game.awayTeam.logo,isHomeTeam:!1}]),x=t.computed(()=>v.value.get(o.isGamePreMatch?o.teamSelectedPreMatch.teamId:h.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,h.value=n.value[a.value]},{immediate:!0}),t.watch(()=>o.game.gameId,f=>{f&&(c(),y(o.game.is_live&&o.game.game_status===4))},{immediate:!0});function _(){g=setInterval(()=>{y()},1e3*60*o.volumetricFieldIntervalMinutes)}async function y(f=!1){try{const m=await r();v.value.set(o.game.homeTeam.team_id,m.homeTeam),v.value.set(o.game.awayTeam.team_id,m.awayTeam),f&&_()}catch(m){throw new Error(m)}}function u(f){return o.game.game_status===4&&!o.game.is_live?f[s.gameId]!==o.game.gameId:f[s.gameId]===o.game.gameId}async function r(f=0){try{let m={homeTeam:[],awayTeam:[]};if(o.game.is_live||o.game.game_status===0){const w=await vu.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${o.game.gameId}`),T=w.data?w.data.data||[]:[],A=new Set;T.forEach(C=>{A.add(C[s.categoryId]),C[s.teamId]===o.game.homeTeam.team_id&&b.has(C[s.categoryId])&&u(C)?(i(C),m.homeTeam.push(C)):C[s.teamId]===o.game.awayTeam.team_id&&b.has(C[s.categoryId])&&u(C)&&(C[s.coordinate1Y]=1-C[s.coordinate1Y],C[s.coordinate2Y]=1-C[s.coordinate2Y],C[s.coordinate3Y]=1-C[s.coordinate3Y],C[s.coordinate1X]=1-C[s.coordinate1X],C[s.coordinate2X]=1-C[s.coordinate2X],C[s.coordinate3X]=1-C[s.coordinate3X],i(C),m.awayTeam.push(C))})}else{const[w,T]=await Promise.all([vu.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||o.game.seasonId}-${o.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),vu.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||o.game.seasonId}-${o.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);if(!w.data.data.posession.length&&!T.data.data.posession.length&&!f)return r(o.game.regularSeasonId);m={homeTeam:w.data.data.posession.filter(A=>A[s.teamId]===o.game.homeTeam.team_id&&b.has(A[s.categoryId])&&u(A)),awayTeam:T.data.data.posession.filter(A=>A[s.teamId]===o.game.awayTeam.team_id&&b.has(A[s.categoryId])&&u(A)?(A[s.coordinate1Y]=1-A[s.coordinate1Y],A[s.coordinate2Y]=1-A[s.coordinate2Y],A[s.coordinate3Y]=1-A[s.coordinate3Y],A[s.coordinate1X]=1-A[s.coordinate1X],A[s.coordinate2X]=1-A[s.coordinate2X],A[s.coordinate3X]=1-A[s.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function i(f){const m=f[s.coordinate1X],w=f[s.coordinate2X],T=f[s.coordinate3X];return f[s.coordinate1X]=f[s.coordinate1Y],f[s.coordinate2X]=f[s.coordinate2Y],f[s.coordinate3X]=f[s.coordinate3Y],f[s.coordinate1Y]=m,f[s.coordinate2Y]=w,f[s.coordinate3Y]=T,f}function d(f){a.value=f.index,h.value=f.button}function c(){g&&clearInterval(g)}return t.onUnmounted(()=>{c()}),(f,m)=>(t.openBlock(),t.createElementBlock("div",Cst,[Est,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ast,[t.createVNode(q3,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:d},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",Mst,[t.createVNode(wst,{team:e.isGamePreMatch?e.teamSelectedPreMatch:h.value},null,8,["team"])]),t.createElementVNode("div",Ist,[t.createVNode(_st,{"passes-plays":x.value,"play-indexes":t.unref(s)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-b3d91153"]]),zUt="";let bD=null;const Bst={components:{GSCHighlights:tUe,ToggleButtons:q3,VolumetricSectionContainer:Pst,DataProminentGame:mUe,HighlightsProminentGameLive:BGe,HighlightsProminentGame:mGe,GSCRadioToggle:Nz,FieldPosesion:ZUe,EventsLine:wHe,ChalkboardSectionContainer:fst},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)bD=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),bD.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},Xm=e=>(t.pushScopeId("data-v-36757a64"),e=e(),t.popScopeId(),e),Lst={class:"container-prominent",ref:"prominent"},Fst={key:0,class:"container-prominent-data"},Ost={class:"container-prominent-section"},zst={key:0,class:"highlights-containers"},Nst={class:"highlights-content"},Dst={key:1,class:"highlights-containers"},Rst=Xm(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),Vst={key:0,class:"container-leyend-prematch"},jst=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),$st={key:1,class:"container-leyend-prematch-movil"},Ust=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),Gst=Xm(()=>t.createElementVNode("br",null,null,-1)),Hst=Xm(()=>t.createElementVNode("br",null,null,-1)),Wst={key:2,class:"container-leyend-prematch-movil"},qst=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),Zst=Xm(()=>t.createElementVNode("br",null,null,-1)),Xst=Xm(()=>t.createElementVNode("br",null,null,-1)),Jst={class:"container-switch-toggle"},Kst={class:"container-prominent-section__chalkboard"},Yst=Xm(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function Qst(e,o,s,O,W,b){const g=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),h=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),x=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),y=t.resolveComponent("FieldPosesion"),u=t.resolveComponent("VolumetricSectionContainer"),r=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",Lst,[s.seasonSelected.incomplete_season==1&&s.game.game_status==4?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Fst,[t.createVNode(g,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:b.openmedia,onLoading:b.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",Ost,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",zst,[t.createElementVNode("div",{class:t.normalizeClass(b.getContainerClass())},[W.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(W.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(W.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(W.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Nst,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(W.showgoalsliveData?W.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:b.showgoalslive,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onIntervalidhighlive:b.intervalidhighlive,onOpenmedia:b.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onIntervalidhighlive:b.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:b.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(W.showsummaryliveData?W.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onShowsummarylive:b.showsummarylive,onIntervalidhighlive:b.intervalidhighlive,onOpenmedia:b.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onIntervalidhighlive:b.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:b.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Dst,[!W.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(h,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:b.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),b.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(W.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:s.token,game:s.game,widthScreen:W.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:b.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(W.widthSection>760?"fields-section-container":"fields-section-container-movil")},[Rst,s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[W.widthSection>590?(t.openBlock(),t.createElementBlock("div",Vst,[jst,t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),W.widthSection>340&&W.widthSection<=590?(t.openBlock(),t.createElementBlock("div",$st,[Ust,t.createTextVNode("  "),Gst,t.createTextVNode("Con base en las estadisticas de los partidos ya "),Hst,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),W.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Wst,[qst,t.createTextVNode("  "),Zst,t.createTextVNode("Con base en las estadisticas de los "),Xst,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(x,{"selected-button-index":W.teamButtonSelectedIndex,buttons:b.toggleButtons,width:"320px","border-radius":"16px",onChange:b.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Jst,[t.createVNode(_,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:b.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,W.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(y,{"width-Section":W.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:b.intervalidpossesion,"team-selected":W.teamSelected.teamId===0?b.toggleButtons[0]:W.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,W.switchTypeViewFiled==="Porcentajes"||W.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(u,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":b.isGamePreMatch,"team-selected-pre-match":W.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,W.viewVolumtrica&&W.widthSection>760||W.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Kst,[Yst,W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":W.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":b.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:b.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const elt=Ki(Bst,[["render",Qst],["__scopeId","data-v-36757a64"]]),NUt="",tlt={class:"datagame-container"},nlt=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){function s(g){o("intervalidhighlive",g)}function O(g){o("intervalidpossesion",g)}function W(g){o("openmedia",g)}function b(g){o("openmedia",g)}return(g,a)=>(t.openBlock(),t.createElementBlock("div",tlt,[t.createVNode(elt,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:O,onIntervalidhighlive:s,onOpenmedia:W,onOpenMediaPlayer:b},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-f33283ce"]]),alt={class:"datagame-container"},rlt={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=e,O=t.ref(0);t.watch(()=>s.game,g=>{O.value=g.gameId},{deep:!0,immediate:!0});function W(g){o("openmedia",g)}function b(g){o("intervalidgs",g)}return(g,a)=>(t.openBlock(),t.createElementBlock("div",alt,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:b,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},ilt={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function F2(e){const o=t.ref({width:0,height:0});function s(){const O=e.value.getBoundingClientRect();o.value.width=O.width,o.value.height=O.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const olt={containerLeftTitles:"_containerLeftTitles_82svp_119",containerLeftTitles420:"_containerLeftTitles420_82svp_135",containerLeftTitles620:"_containerLeftTitles620_82svp_151",containerLeftTitlesTeam:"_containerLeftTitlesTeam_82svp_169",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_82svp_185",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_82svp_201",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_82svp_217",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_82svp_233",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_82svp_249",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_82svp_265",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_82svp_281",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_82svp_297",headTitlesAvanced:"_headTitlesAvanced_82svp_315",headTitlesAvanced960:"_headTitlesAvanced960_82svp_345",headTitlesAvanced420:"_headTitlesAvanced420_82svp_375",headTitlesAvanced540:"_headTitlesAvanced540_82svp_415",headTitlesAvanced460:"_headTitlesAvanced460_82svp_445",headTitlesAvanced620:"_headTitlesAvanced620_82svp_475",position:"_position_82svp_505",position420:"_position420_82svp_523",player:"_player_82svp_529",player420:"_player420_82svp_551",containerRightTypeAvanced1:"_containerRightTypeAvanced1_82svp_559",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_82svp_573",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_82svp_591",block02Titles:"_block02Titles_82svp_609",block02Titles620:"_block02Titles620_82svp_625",mon1Scouting:"_mon1Scouting_82svp_633",mon1Scouting960:"_mon1Scouting960_82svp_653",mon1:"_mon1_82svp_633",mon1420:"_mon1420_82svp_689",mon1620:"_mon1620_82svp_709",icnIcon:"_icnIcon_82svp_729",icnIcon960:"_icnIcon960_82svp_739",icnIcon420:"_icnIcon420_82svp_751",teamTitle:"_teamTitle_82svp_759",positionTitle:"_positionTitle_82svp_779",ageTitle:"_ageTitle_82svp_795",partidos:"_partidos_82svp_811",playedGamesTitle:"_playedGamesTitle_82svp_819",playedMinutesTitle:"_playedMinutesTitle_82svp_839",block01Titles:"_block01Titles_82svp_857",mon:"_mon_82svp_633",containesOptionsTitles:"_containesOptionsTitles_82svp_889",templateTablaProductividadType1:"_templateTablaProductividadType1_82svp_903",templateTablaProductividadType1400:"_templateTablaProductividadType1400_82svp_927",headTitlesType1:"_headTitlesType1_82svp_955",headTitlesType1420:"_headTitlesType1420_82svp_981",headTitlesType1400:"_headTitlesType1400_82svp_1013",headTitlesType1540:"_headTitlesType1540_82svp_1045",headTitlesType1460:"_headTitlesType1460_82svp_1073",headTitlesType1680:"_headTitlesType1680_82svp_1101",headTitlesType1350:"_headTitlesType1350_82svp_1127",positionType1:"_positionType1_82svp_1157",positionType1400:"_positionType1400_82svp_1175",teamType1:"_teamType1_82svp_1195",teamType1400:"_teamType1400_82svp_1213",frecuenciaType1:"_frecuenciaType1_82svp_1233",frecuenciaType1540:"_frecuenciaType1540_82svp_1249",containerLeftTitlesType1:"_containerLeftTitlesType1_82svp_1267",frecuenciaWrapperType1:"_frecuenciaWrapperType1_82svp_1283",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_82svp_1301",promedioPartidoType1:"_promedioPartidoType1_82svp_1317",promedioEstePartidoType1:"_promedioEstePartidoType1_82svp_1325",promedioEstePartidoType1960:"_promedioEstePartidoType1960_82svp_1341",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_82svp_1349",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_82svp_1365",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_82svp_1383",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_82svp_1403",promedioPartidosType1:"_promedioPartidosType1_82svp_1421",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_82svp_1435",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_82svp_1451",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_82svp_1457",partidosJugadosType1:"_partidosJugadosType1_82svp_1463",partidosJugadosType1960:"_partidosJugadosType1960_82svp_1475",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_82svp_1489",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_82svp_1505",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_82svp_1521",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_82svp_1537",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_82svp_1553",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_82svp_1569",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_82svp_1585",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_82svp_1601",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_82svp_1617",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_82svp_1633",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_82svp_1649",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_82svp_1665",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_82svp_1681",block01TitlesType1:"_block01TitlesType1_82svp_1687",monType1:"_monType1_82svp_1703",monType1960:"_monType1960_82svp_1721",monType1680:"_monType1680_82svp_1741",videosType1:"_videosType1_82svp_1747",videosType1680:"_videosType1680_82svp_1767",videosType1600:"_videosType1600_82svp_1785",videosType1540:"_videosType1540_82svp_1803",videosType1420:"_videosType1420_82svp_1821",videosType1400:"_videosType1400_82svp_1839",containesOptionsTitlesType1:"_containesOptionsTitlesType1_82svp_1863",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_82svp_1879",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_82svp_1893",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_82svp_1907",icnIconType1:"_icnIconType1_82svp_1921",icnIconType1420:"_icnIconType1420_82svp_1933",icnIconType1400:"_icnIconType1400_82svp_1947",block02TitlesType1:"_block02TitlesType1_82svp_1955",block02TitlesType1680:"_block02TitlesType1680_82svp_1969",block02TitlesType1350:"_block02TitlesType1350_82svp_1983",containerRightTitlesType1:"_containerRightTitlesType1_82svp_1997",containerRightTitlesType1420:"_containerRightTitlesType1420_82svp_2015"},v9={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=F2(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},xD=()=>{t.useCssVars(e=>({"32aec1ca":e.background,"4e54a87a":e.height,"448b848c":e.fontSize,"4c061c38":e.fontColor,"3917092f":e.fontFamily,"4a286e80":e.heightTeam}))},wD=v9.setup;v9.setup=wD?(e,o)=>(xD(),wD(e,o)):xD;const slt={ref:"myDivRef"},llt=t.createElementVNode("br",null,null,-1),clt=t.createElementVNode("br",null,null,-1);function ult(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",slt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(b.frecuenciaWrapperType1Class)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),llt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),clt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containesOptionsTitlesType1Class)},[O.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(b.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const kD=Ki(v9,[["render",ult],["__cssModules",{$style:olt}]]),$Ht="",_9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},SD=()=>{t.useCssVars(e=>({"142f4a30":e.height,"425d470b":e.borderWidthBtn,e390e3e2:e.borderType,"37c60b2e":e.borderColor,"4c69ebb2":e.borderRadius,"1e10a0c6":e.width,64535028:e.backgroundColor,"26a98839":e.cursorType,"0ff73bb9":e.fontSize,"22158e0e":e.fontStyle,"4f1cadc8":e.fontFamily,"38d08a5c":e.marginLeftStat,f38f9ca6:e.fontSizeStat}))},TD=_9.setup;_9.setup=TD?(e,o)=>(SD(),TD(e,o)):SD;const dlt=e=>(t.pushScopeId("data-v-2d2e96b3"),e=e(),t.popScopeId(),e),hlt=["src"],plt={key:1,class:"text"},flt=["src"],mlt={class:"stats"},glt=dlt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ylt={class:"numstats"},vlt={class:"leyend"};function _lt(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,hlt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",plt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,flt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",mlt,[glt,t.createElementVNode("div",ylt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",vlt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const CD=Ki(_9,[["render",_lt],["__scopeId","data-v-2d2e96b3"]]),blt={rotate:"_rotate_1cvqy_5",positionContainer:"_positionContainer_1cvqy_99",positionContainer620:"_positionContainer620_1cvqy_113",rowwPlayerGames:"_rowwPlayerGames_1cvqy_127",rowwPlayer960Games:"_rowwPlayer960Games_1cvqy_159",rowwPlayer420Games:"_rowwPlayer420Games_1cvqy_189",rowwPlayer460Games:"_rowwPlayer460Games_1cvqy_221",containerLeftGames:"_containerLeftGames_1cvqy_255",containerLeft420Games:"_containerLeft420Games_1cvqy_271",containerLeft620Games:"_containerLeft620Games_1cvqy_287",iconFavoritesType1:"_iconFavoritesType1_1cvqy_301",iconFavoritesType1320:"_iconFavoritesType1320_1cvqy_317",iconFavorites:"_iconFavorites_1cvqy_301",iconFavorites420:"_iconFavorites420_1cvqy_349",playerContainerGames:"_playerContainerGames_1cvqy_365",playerContainer420Games:"_playerContainer420Games_1cvqy_389",playerContainer460Games:"_playerContainer460Games_1cvqy_413",playerContainerType1Games:"_playerContainerType1Games_1cvqy_437",playerContainerType1320Games:"_playerContainerType1320Games_1cvqy_457",playerContainerType1460Games:"_playerContainerType1460Games_1cvqy_477",imgPlayerIcon:"_imgPlayerIcon_1cvqy_497",imgPlayerIcon460:"_imgPlayerIcon460_1cvqy_517",imgPlayerIcon420:"_imgPlayerIcon420_1cvqy_537",manchesterUnitedGames:"_manchesterUnitedGames_1cvqy_557",manchesterUnited360Games:"_manchesterUnited360Games_1cvqy_579",manchesterUnited420Games:"_manchesterUnited420Games_1cvqy_601",manchesterUnited460Games:"_manchesterUnited460Games_1cvqy_623",containerRightGames:"_containerRightGames_1cvqy_645",containerRight960Games:"_containerRight960Games_1cvqy_663",containerRight420Games:"_containerRight420Games_1cvqy_683",numberOfVideos:"_numberOfVideos_1cvqy_705",numberOfVideos620:"_numberOfVideos620_1cvqy_717",block02Games:"_block02Games_1cvqy_729",block02960Games:"_block02960Games_1cvqy_749",block02620Games:"_block02620Games_1cvqy_767",block02420Games:"_block02420Games_1cvqy_781",verVideos:"_verVideos_1cvqy_797",verVideos620:"_verVideos620_1cvqy_809",numberPosition:"_numberPosition_1cvqy_815",shapeIcon:"_shapeIcon_1cvqy_827",chivasIcon:"_chivasIcon_1cvqy_837",imgTeamIcon:"_imgTeamIcon_1cvqy_859",teamName:"_teamName_1cvqy_869",nameTeamGames:"_nameTeamGames_1cvqy_881",dfC:"_dfC_1cvqy_899",position:"_position_1cvqy_99",age:"_age_1cvqy_919",manchesterUnitedIcon:"_manchesterUnitedIcon_1cvqy_935",country:"_country_1cvqy_949",playedGames:"_playedGames_1cvqy_963",playedMinutes:"_playedMinutes_1cvqy_977",block01:"_block01_1cvqy_991",leagueName:"_leagueName_1cvqy_1005",roleCharacterIcon:"_roleCharacterIcon_1cvqy_1017",btnVideosGames:"_btnVideosGames_1cvqy_1033",containerBtnVideosGames:"_containerBtnVideosGames_1cvqy_1063",containerBtnVideos620Games:"_containerBtnVideos620Games_1cvqy_1083",containesOptions:"_containesOptions_1cvqy_1101",arrowExpandIcon:"_arrowExpandIcon_1cvqy_1115",rowTeam:"_rowTeam_1cvqy_1133",rowTeam420:"_rowTeam420_1cvqy_1169",rowTeam320:"_rowTeam320_1cvqy_1205",rowTeam460:"_rowTeam460_1cvqy_1243",rowTeam350:"_rowTeam350_1cvqy_1281",containerLeftType1:"_containerLeftType1_1cvqy_1317",containerLeftType1680:"_containerLeftType1680_1cvqy_1329",containerLeftType1320:"_containerLeftType1320_1cvqy_1343",containerLeftType1350:"_containerLeftType1350_1cvqy_1359",positionContainertype1:"_positionContainertype1_1cvqy_1373",positionContainertype1380:"_positionContainertype1380_1cvqy_1389",positionContainertype1680:"_positionContainertype1680_1cvqy_1405",positionContainertype1420:"_positionContainertype1420_1cvqy_1421",manchesterUnitedType1:"_manchesterUnitedType1_1cvqy_1437",manchesterUnitedType1460:"_manchesterUnitedType1460_1cvqy_1449",manchesterUnitedType1320:"_manchesterUnitedType1320_1cvqy_1463",containerRightType1Games:"_containerRightType1Games_1cvqy_1477",containerRightType1420Games:"_containerRightType1420Games_1cvqy_1499",containerRightType1320Games:"_containerRightType1320Games_1cvqy_1521",teamNameWrapperType1:"_teamNameWrapperType1_1cvqy_1543",teamNameWrapperType1960:"_teamNameWrapperType1960_1cvqy_1557",teamNameWrapperType11086:"_teamNameWrapperType11086_1cvqy_1571",ageWrapperType1:"_ageWrapperType1_1cvqy_1585",ageWrapperType1680:"_ageWrapperType1680_1cvqy_1599",ageWrapperType11086:"_ageWrapperType11086_1cvqy_1615",ageType1:"_ageType1_1cvqy_1631",ageType1960:"_ageType1960_1cvqy_1647",playedGamesWrapperType1:"_playedGamesWrapperType1_1cvqy_1653",playedGamesWrapperType1680:"_playedGamesWrapperType1680_1cvqy_1667",playedGamesWrapperType1960:"_playedGamesWrapperType1960_1cvqy_1673",playedGamesType1:"_playedGamesType1_1cvqy_1679",playedGamesType1540:"_playedGamesType1540_1cvqy_1693",playedGamesType1960:"_playedGamesType1960_1cvqy_1701",playedGamesType11086:"_playedGamesType11086_1cvqy_1707",playedMinutesWrapperType1:"_playedMinutesWrapperType1_1cvqy_1713",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_1cvqy_1727",playedMinutesType1:"_playedMinutesType1_1cvqy_1741",playedMinutesType1680:"_playedMinutesType1680_1cvqy_1755",block02Type1Games:"_block02Type1Games_1cvqy_1761",block02Type1680Games:"_block02Type1680Games_1cvqy_1777",block02Type1320Games:"_block02Type1320Games_1cvqy_1793",block02Type1350Games:"_block02Type1350Games_1cvqy_1811",leagueNameWrapperType1:"_leagueNameWrapperType1_1cvqy_1827",leagueNameWrapperType1680:"_leagueNameWrapperType1680_1cvqy_1843",leagueNameWrapperType1960:"_leagueNameWrapperType1960_1cvqy_1849",leagueNameType1:"_leagueNameType1_1cvqy_1865",leagueNameType1960:"_leagueNameType1960_1cvqy_1885",numberOfVideosType1:"_numberOfVideosType1_1cvqy_1905",numberOfVideosType1680:"_numberOfVideosType1680_1cvqy_1919",numberOfVideosType11232:"_numberOfVideosType11232_1cvqy_1933",vectorIconType1:"_vectorIconType1_1cvqy_1947",block01TitlesType1:"_block01TitlesType1_1cvqy_1981",numberPositionType1:"_numberPositionType1_1cvqy_1995",shapeIconType1:"_shapeIconType1_1cvqy_2007",tijuanaIconType1:"_tijuanaIconType1_1cvqy_2019",tijuanaWrapperType1:"_tijuanaWrapperType1_1cvqy_2031",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_1cvqy_2053",teamNameType1:"_teamNameType1_1cvqy_2069",roleCharacterIconType1:"_roleCharacterIconType1_1cvqy_2083",verVideosType1:"_verVideosType1_1cvqy_2097",btnVideosType1Games:"_btnVideosType1Games_1cvqy_2109",containerBtnVideosType1Games:"_containerBtnVideosType1Games_1cvqy_2139",containesOptionsType1Games:"_containesOptionsType1Games_1cvqy_2161",arrowExpandIconType1:"_arrowExpandIconType1_1cvqy_2177",templateTablaProductividadType1:"_templateTablaProductividadType1_1cvqy_2189",verVideosType11232:"_verVideosType11232_1cvqy_2213",templateTablaProductividadType1320:"_templateTablaProductividadType1320_1cvqy_2221",verVideosType1680:"_verVideosType1680_1cvqy_2229"},b9={components:{GSCButton:CD},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=F2(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},ED=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},AD=b9.setup;b9.setup=AD?(e,o)=>(ED(),AD(e,o)):ED;const xlt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},wlt=["src"],klt=["src"],Slt=["src"],Tlt=["src"],Clt=["fill"],Elt=["fill"],Alt=["src"],Mlt=["src"],Ilt=["fill"],Plt=["fill"],Blt=["src"],Llt=["src"],Flt=["src"],Olt=["src"],zlt=["fill"],Nlt=["fill"];function Dlt(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",xlt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(b.imgPlayerIconClass),src:s.data.player_photo},null,10,wlt),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedClass)},[O.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),O.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,klt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[O.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Slt),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,Tlt)],2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[O.elementSize.width>635?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),O.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Elt)],10,Clt))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.rowTeamClass),style:t.normalizeStyle(O.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(b.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,Alt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,Mlt)],2),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(b.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(b.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[O.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(b.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Plt)],10,Ilt))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(b.imgPlayerIconClass),src:s.data.player_photo},null,10,Blt),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),O.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Llt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[O.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Flt),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,Olt)],2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(b.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:O.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>b.emitEventMedia(s.data)),style:t.normalizeStyle(O.elementSize.width<=680?O.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Nlt)],10,zlt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const MD=Ki(b9,[["render",Dlt],["__cssModules",{$style:blt}]]),Rlt=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},x9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},ID=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},PD=x9.setup;x9.setup=PD?(e,o)=>(ID(),PD(e,o)):ID;const Vlt=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),jlt=["src"],$lt={key:1,class:"text"},Ult=["src"],Glt={class:"stats"},Hlt=Vlt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),Wlt={class:"numstats"},qlt={class:"leyend"};function Zlt(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,jlt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",$lt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Ult)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",Glt,[Hlt,t.createElementVNode("div",Wlt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qlt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Xlt=Rlt(x9,[["render",Zlt],["__scopeId","data-v-f3ee6b2b"]]),Jlt=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},w9={components:{GSCButton:Xlt},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},BD=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},LD=w9.setup;w9.setup=LD?(e,o)=>(BD(),LD(e,o)):BD;const Klt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Ylt={class:"gsc-filterperteam__panel-teams__cont-teams"},Qlt=["onClick"],ect=["src","alt","title"];function tct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(b.customStyleContain)},[t.createElementVNode("div",Klt,[t.createElementVNode("div",Ylt,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(b.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(g,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:b.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(b.customStyleTeam),class:t.normalizeClass([a.id==W.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:h=>b.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,ect)],14,Qlt))),128))])],512)],4)}const nct=Jlt(w9,[["render",tct],["__scopeId","data-v-b39cba3b"]]),act={tablePositionGames:"_tablePositionGames_1reko_91",tablePositionWrapperGames:"_tablePositionWrapperGames_1reko_123",imgHenrryIcon:"_imgHenrryIcon_1reko_141",americaIcon:"_americaIcon_1reko_157",playerPhotoGames:"_playerPhotoGames_1reko_181",toniKroosGames:"_toniKroosGames_1reko_199",shapeIcon:"_shapeIcon_1reko_221",menuiconsTeams:"_menuiconsTeams_1reko_233",component31:"_component31_1reko_251",playerNameGames:"_playerNameGames_1reko_273",icnPlayIcon:"_icnPlayIcon_1reko_289",goles:"_goles_1reko_305",americaIcon1:"_americaIcon1_1reko_319",teamsAmerica:"_teamsAmerica_1reko_347",containerData:"_containerData_1reko_359",shapeIcon1:"_shapeIcon1_1reko_375",icnExpand1:"_icnExpand1_1reko_387",icnExpand:"_icnExpand_1reko_387",playerDataGames:"_playerDataGames_1reko_427",playerInfoGames:"_playerInfoGames_1reko_449",headerTopGame:"_headerTopGame_1reko_479",playerRow:"_playerRow_1reko_507",groupsLeague:"_groupsLeague_1reko_529",text:"_text_1reko_547",btnViewFullList:"_btnViewFullList_1reko_563",headerTopsGames:"_headerTopsGames_1reko_597",btnVideosOptions:"_btnVideosOptions_1reko_741",position:"_position_1reko_1095",positionWrapper:"_positionWrapper_1reko_1119",imgNecaxaIcon:"_imgNecaxaIcon_1reko_1135",teamLogo:"_teamLogo_1reko_1147",teamPhoto:"_teamPhoto_1reko_1163",name:"_name_1reko_1179",icnPlayIconType1:"_icnPlayIconType1_1reko_1195",verVideosType1:"_verVideosType1_1reko_1209",btnVideosOptionsType1:"_btnVideosOptionsType1_1reko_1221",btnVideosOptions1Games:"_btnVideosOptions1Games_1reko_1245",leftContainer:"_leftContainer_1reko_1269",shapeIconType1:"_shapeIconType1_1reko_1287",icnExpandType1:"_icnExpandType1_1reko_1297",arrowExpand:"_arrowExpand_1reko_1317",containerInfoGames:"_containerInfoGames_1reko_1333",headerTopTeam:"_headerTopTeam_1reko_1357",containerHeader:"_containerHeader_1reko_1385",goles1:"_goles1_1reko_1403",golesType1:"_golesType1_1reko_1409",golesWrapper:"_golesWrapper_1reko_1419",btnViewAll:"_btnViewAll_1reko_1437",headerTopsTeams:"_headerTopsTeams_1reko_1471",arrowExpandIcon:"_arrowExpandIcon_1reko_1705",rotate:"_rotate_1reko_1715"},k9={components:{GSCButton:CD},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},FD=()=>{t.useCssVars(e=>({"5b159b56":e.fontSizeTopNum,ef81ba90:e.fontFamilyTopNum,"40d5b2de":e.fontColorTopNum,"55ca4106":e.opacityColorTopNum,"488c59aa":e.fontColorName,"7f32ad12":e.fontFamilyName,"081c0022":e.fontSizeName,b1fb7024:e.backgroundColorHeader,"9af157f6":e.fontFamilyCategory,"4777f062":e.fontSizeCategory,e72874c4:e.fontColorCategory,"2ceb71e1":e.borderColorCategory}))},OD=k9.setup;k9.setup=OD?(e,o)=>(FD(),OD(e,o)):FD;const rct=["src"],ict=["src"],oct=["src"],sct=["src"],lct=["fill"],cct=["fill"],uct=["src"],dct=["fill"],hct=["fill"];function pct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,rct),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,ict)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,oct)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(g,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,sct)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>b.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,cct)],10,lct))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,uct)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>b.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hct)],10,dct))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const fct=Ki(k9,[["render",pct],["__cssModules",{$style:act}]]),mct=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},S9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},zD=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},ND=S9.setup;S9.setup=ND?(e,o)=>(zD(),ND(e,o)):zD;const gct=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),yct=["src"],vct={key:1,class:"text"},_ct=["src"],bct={class:"stats"},xct=gct(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),wct={class:"numstats"},kct={class:"leyend"};function Sct(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,yct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",vct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,_ct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",bct,[xct,t.createElementVNode("div",wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",kct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Tct=mct(S9,[["render",Sct],["__scopeId","data-v-f3ee6b2b"]]),sXt="",lXt="",Cct={equipoGames:"_equipoGames_fst7d_75",atlasSeleccinGames:"_atlasSeleccinGames_fst7d_85",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_fst7d_93",aosGames:"_aosGames_fst7d_101",span12:"_span12_fst7d_109",nacionalidadMex:"_nacionalidadMex_fst7d_115",manchesterUnited:"_manchesterUnited_fst7d_121",manchesterUnited12:"_manchesterUnited12_fst7d_135",containerInfoGames:"_containerInfoGames_fst7d_155",verPerfil12:"_verPerfil12_fst7d_173",btnProfile:"_btnProfile_fst7d_191",containerButton:"_containerButton_fst7d_223",dataContainer:"_dataContainer_fst7d_237",expandedInfoPlayerGames:"_expandedInfoPlayerGames_fst7d_257",containerDataBg:"_containerDataBg_fst7d_437",containerDataSm:"_containerDataSm_fst7d_459",span:"_span_fst7d_109",manchesterUnited14:"_manchesterUnited14_fst7d_481",filter:"_filter_fst7d_491",verPerfil:"_verPerfil_fst7d_173",manchesterUnited8:"_manchesterUnited8_fst7d_533",manchesterUnitedParent1:"_manchesterUnitedParent1_fst7d_545",manchesterUnited1:"_manchesterUnited1_fst7d_135",manchesterUnitedParent:"_manchesterUnitedParent_fst7d_545",frameDiv:"_frameDiv_fst7d_589",infoExpanded:"_infoExpanded_fst7d_605",countryFlag:"_countryFlag_fst7d_911"},T9={components:{GSCButton:Tct},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=F2(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},DD=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},RD=T9.setup;T9.setup=RD?(e,o)=>(DD(),RD(e,o)):DD;const ap=e=>(t.pushScopeId("data-v-5dd9e88d"),e=e(),t.popScopeId(),e),Ect={ref:"myDivRef"},Act=["src"],Mct=ap(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),Ict=ap(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),Pct=ap(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),Bct=ap(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),Lct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),Fct=ap(()=>t.createElementVNode("span",null,"xG: ",-1)),Oct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),zct=ap(()=>t.createElementVNode("span",null,"xG: ",-1)),Nct=ap(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),Dct=ap(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),Rct=ap(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),Vct=ap(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),jct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),$ct=ap(()=>t.createElementVNode("span",null,"xG: ",-1));function Uct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Ect,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,Act)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&O.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>b.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Mct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Ict,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Pct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Bct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[Lct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Fct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[Oct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[zct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Nct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Dct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Rct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Vct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[jct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[$ct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&O.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>b.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const VD=Ki(T9,[["render",Uct],["__cssModules",{$style:Cct}],["__scopeId","data-v-5dd9e88d"]]);/**
4120
+ `),Et=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Et,Tt),pe.compileShader(Et),!pe.getShaderParameter(Et,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(Et)}`);pe.attachShader(this.program,Et);const Zt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Zt,Rt),pe.compileShader(Zt),!pe.getShaderParameter(Zt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Zt)}`);pe.attachShader(this.program,Zt),this.attributes={};const Yt={};this.numAttributes=Ne.length;for(let Xt=0;Xt<this.numAttributes;Xt++)Ne[Xt]&&(pe.bindAttribLocation(this.program,Xt,Ne[Xt]),this.attributes[Ne[Xt]]=Xt);if(pe.linkProgram(this.program),!pe.getProgramParameter(this.program,pe.LINK_STATUS))throw new Error(`Program failed to link: ${pe.getProgramInfoLog(this.program)}`);pe.deleteShader(Zt),pe.deleteShader(Et);for(let Xt=0;Xt<xt.length;Xt++){const hn=xt[Xt];if(hn&&!Yt[hn]){const xn=pe.getUniformLocation(this.program,hn);xn&&(Yt[hn]=xn)}}this.fixedUniforms=j(l,Yt),this.terrainUniforms=((Xt,hn)=>({u_depth:new n.aI(Xt,hn.u_depth),u_terrain:new n.aI(Xt,hn.u_terrain),u_terrain_dim:new n.aJ(Xt,hn.u_terrain_dim),u_terrain_matrix:new n.aK(Xt,hn.u_terrain_matrix),u_terrain_unpack:new n.aL(Xt,hn.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Xt,hn.u_terrain_exaggeration)}))(l,Yt),this.binderUniforms=z?z.getUniforms(l,Yt):[]}draw(l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct,pt,xt,At,Tt,Rt){const Et=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(z),l.setStencilMode(j),l.setColorMode(q),l.setCullFace(ie),be){l.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,be.depthTexture),l.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,be.texture);for(const Yt in this.terrainUniforms)this.terrainUniforms[Yt].set(be[Yt])}for(const Yt in this.fixedUniforms)this.fixedUniforms[Yt].set(pe[Yt]);xt&&xt.setUniforms(l,this.binderUniforms,ct,{zoom:pt});let Zt=0;switch(p){case Et.LINES:Zt=2;break;case Et.TRIANGLES:Zt=3;break;case Et.LINE_STRIP:Zt=1}for(const Yt of at.get()){const Xt=Yt.vaos||(Yt.vaos={});(Xt[Ae]||(Xt[Ae]=new Na)).bind(l,this,Ne,xt?xt.getPaintVertexBuffers():[],Ge,Yt.vertexOffset,At,Tt,Rt),Et.drawElements(p,Yt.primitiveLength*Zt,Et.UNSIGNED_SHORT,Yt.primitiveOffset*Zt*2)}}}function jn(R,l,p){const z=1/St(p,1,l.transform.tileZoom),j=Math.pow(2,p.tileID.overscaledZ),q=p.tileSize*Math.pow(2,l.transform.tileZoom)/j,ie=q*(p.tileID.canonical.x+p.tileID.wrap*j),pe=q*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[z,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[ie>>16,pe>>16],u_pixel_coord_lower:[65535&ie,65535&pe]}}const aa=(R,l,p,z)=>{const j=l.style.light,q=j.properties.get("position"),ie=[q.x,q.y,q.z],pe=function(){var Ae=new n.A(9);return n.A!=Float32Array&&(Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[5]=0,Ae[6]=0,Ae[7]=0),Ae[0]=1,Ae[4]=1,Ae[8]=1,Ae}();j.properties.get("anchor")==="viewport"&&function(Ae,Ne){var Ge=Math.sin(Ne),at=Math.cos(Ne);Ae[0]=at,Ae[1]=Ge,Ae[2]=0,Ae[3]=-Ge,Ae[4]=at,Ae[5]=0,Ae[6]=0,Ae[7]=0,Ae[8]=1}(pe,-l.transform.angle),function(Ae,Ne,Ge){var at=Ne[0],ct=Ne[1],pt=Ne[2];Ae[0]=at*Ge[0]+ct*Ge[3]+pt*Ge[6],Ae[1]=at*Ge[1]+ct*Ge[4]+pt*Ge[7],Ae[2]=at*Ge[2]+ct*Ge[5]+pt*Ge[8]}(ie,ie,pe);const be=j.properties.get("color");return{u_matrix:R,u_lightpos:ie,u_lightintensity:j.properties.get("intensity"),u_lightcolor:[be.r,be.g,be.b],u_vertical_gradient:+p,u_opacity:z}},_a=(R,l,p,z,j,q,ie)=>n.e(aa(R,l,p,z),jn(q,l,ie),{u_height_factor:-Math.pow(2,j.overscaledZ)/ie.tileSize/8}),ga=R=>({u_matrix:R}),Fa=(R,l,p,z)=>n.e(ga(R),jn(p,l,z)),Ua=(R,l)=>({u_matrix:R,u_world:l}),gn=(R,l,p,z,j)=>n.e(Fa(R,l,p,z),{u_world:j}),Un=(R,l,p,z)=>{const j=R.transform;let q,ie;if(z.paint.get("circle-pitch-alignment")==="map"){const pe=St(p,1,j.zoom);q=!0,ie=[pe,pe]}else q=!1,ie=j.pixelsToGLUnits;return{u_camera_to_center_distance:j.cameraToCenterDistance,u_scale_with_map:+(z.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(l.posMatrix,p,z.paint.get("circle-translate"),z.paint.get("circle-translate-anchor")),u_pitch_with_map:+q,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:ie}},tn=(R,l)=>({u_matrix:l,u_pixel_extrude_scale:[1/R.width,1/R.height]}),un=(R,l,p)=>({u_matrix:R,u_inv_matrix:l,u_camera_to_center_distance:p.cameraToCenterDistance,u_viewport_size:[p.width,p.height]}),mn=(R,l,p=1)=>({u_matrix:R,u_color:l,u_overlay:0,u_overlay_scale:p}),zn=R=>({u_matrix:R}),On=(R,l,p,z)=>({u_matrix:R,u_extrude_scale:St(l,1,p),u_intensity:z}),Zn=(R,l,p,z)=>{const j=n.H();n.aQ(j,0,R.width,R.height,0,0,1);const q=R.context.gl;return{u_matrix:j,u_world:[q.drawingBufferWidth,q.drawingBufferHeight],u_image:p,u_color_ramp:z,u_opacity:l.paint.get("heatmap-opacity")}},Vn=(R,l,p,z)=>{const j=p.paint.get("hillshade-shadow-color"),q=p.paint.get("hillshade-highlight-color"),ie=p.paint.get("hillshade-accent-color");let pe=p.paint.get("hillshade-illumination-direction")*(Math.PI/180);p.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=R.transform.angle);const be=!R.options.moving;return{u_matrix:z?z.posMatrix:R.transform.calculatePosMatrix(l.tileID.toUnwrapped(),be),u_image:0,u_latrange:cn(0,l.tileID),u_light:[p.paint.get("hillshade-exaggeration"),pe],u_shadow:j,u_highlight:q,u_accent:ie}},Pn=(R,l)=>{const p=l.stride,z=n.H();return n.aQ(z,0,n.X,-n.X,0,0,1),n.J(z,z,[0,-n.X,0]),{u_matrix:z,u_image:1,u_dimension:[p,p],u_zoom:R.overscaledZ,u_unpack:l.getUnpackVector()}};function cn(R,l){const p=Math.pow(2,l.canonical.z),z=l.canonical.y;return[new n.Z(0,z/p).toLngLat().lat,new n.Z(0,(z+1)/p).toLngLat().lat]}const sn=(R,l,p,z)=>{const j=R.transform;return{u_matrix:ua(R,l,p,z),u_ratio:1/St(l,1,j.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/j.pixelsToGLUnits[0],1/j.pixelsToGLUnits[1]]}},Tn=(R,l,p,z,j)=>n.e(sn(R,l,p,j),{u_image:0,u_image_height:z}),Xn=(R,l,p,z,j)=>{const q=R.transform,ie=la(l,q);return{u_matrix:ua(R,l,p,j),u_texsize:l.imageAtlasTexture.size,u_ratio:1/St(l,1,q.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[ie,z.fromScale,z.toScale],u_fade:z.t,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},ca=(R,l,p,z,j,q)=>{const ie=R.transform,pe=R.lineAtlas,be=la(l,ie),Ae=p.layout.get("line-cap")==="round",Ne=pe.getDash(z.from,Ae),Ge=pe.getDash(z.to,Ae),at=Ne.width*j.fromScale,ct=Ge.width*j.toScale;return n.e(sn(R,l,p,q),{u_patternscale_a:[be/at,-Ne.height/2],u_patternscale_b:[be/ct,-Ge.height/2],u_sdfgamma:pe.width/(256*Math.min(at,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Ne.y,u_tex_y_b:Ge.y,u_mix:j.t})};function la(R,l){return 1/St(R,1,l.tileZoom)}function ua(R,l,p,z){return R.translatePosMatrix(z?z.posMatrix:l.tileID.posMatrix,l,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}const Aa=(R,l,p,z,j)=>{return{u_matrix:R,u_tl_parent:l,u_scale_parent:p,u_buffer_scale:1,u_fade_t:z.mix,u_opacity:z.opacity*j.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:j.paint.get("raster-brightness-min"),u_brightness_high:j.paint.get("raster-brightness-max"),u_saturation_factor:(ie=j.paint.get("raster-saturation"),ie>0?1-1/(1.001-ie):-ie),u_contrast_factor:(q=j.paint.get("raster-contrast"),q>0?1/(1-q):1+q),u_spin_weights:ka(j.paint.get("raster-hue-rotate"))};var q,ie};function ka(R){R*=Math.PI/180;const l=Math.sin(R),p=Math.cos(R);return[(2*p+1)/3,(-Math.sqrt(3)*l-p+1)/3,(Math.sqrt(3)*l-p+1)/3]}const Ba=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct)=>{const pt=ie.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:pt.width/pt.height,u_fade_change:ie.options.fadeDuration?ie.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:be,u_coord_matrix:Ae,u_is_text:+Ge,u_pitch_with_map:+z,u_is_along_line:j,u_is_variable_anchor:q,u_texsize:at,u_texture:0,u_translation:Ne,u_pitched_scale:ct}},xa=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct,pt)=>{const xt=ie.transform;return n.e(Ba(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,pt),{u_gamma_scale:z?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:ie.pixelRatio,u_is_halo:+ct})},Ca=(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct)=>n.e(xa(R,l,p,z,j,q,ie,pe,be,Ae,Ne,!0,Ge,!0,ct),{u_texsize_icon:at,u_texture_icon:1}),za=(R,l,p)=>({u_matrix:R,u_opacity:l,u_color:p}),Ka=(R,l,p,z,j,q)=>n.e(function(ie,pe,be,Ae){const Ne=be.imageManager.getPattern(ie.from.toString()),Ge=be.imageManager.getPattern(ie.to.toString()),{width:at,height:ct}=be.imageManager.getPixelSize(),pt=Math.pow(2,Ae.tileID.overscaledZ),xt=Ae.tileSize*Math.pow(2,be.transform.tileZoom)/pt,At=xt*(Ae.tileID.canonical.x+Ae.tileID.wrap*pt),Tt=xt*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ne.tl,u_pattern_br_a:Ne.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[at,ct],u_mix:pe.t,u_pattern_size_a:Ne.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/St(Ae,1,be.transform.tileZoom),u_pixel_coord_upper:[At>>16,Tt>>16],u_pixel_coord_lower:[65535&At,65535&Tt]}}(z,q,p,j),{u_matrix:R,u_opacity:l}),$a={fillExtrusion:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_lightpos:new n.aO(R,l.u_lightpos),u_lightintensity:new n.aJ(R,l.u_lightintensity),u_lightcolor:new n.aO(R,l.u_lightcolor),u_vertical_gradient:new n.aJ(R,l.u_vertical_gradient),u_opacity:new n.aJ(R,l.u_opacity)}),fillExtrusionPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_lightpos:new n.aO(R,l.u_lightpos),u_lightintensity:new n.aJ(R,l.u_lightintensity),u_lightcolor:new n.aO(R,l.u_lightcolor),u_vertical_gradient:new n.aJ(R,l.u_vertical_gradient),u_height_factor:new n.aJ(R,l.u_height_factor),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade),u_opacity:new n.aJ(R,l.u_opacity)}),fill:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix)}),fillPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),fillOutline:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world)}),fillOutlinePattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world),u_image:new n.aI(R,l.u_image),u_texsize:new n.aP(R,l.u_texsize),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),circle:(R,l)=>({u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_scale_with_map:new n.aI(R,l.u_scale_with_map),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_extrude_scale:new n.aP(R,l.u_extrude_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_matrix:new n.aK(R,l.u_matrix)}),collisionBox:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_pixel_extrude_scale:new n.aP(R,l.u_pixel_extrude_scale)}),collisionCircle:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_inv_matrix:new n.aK(R,l.u_inv_matrix),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_viewport_size:new n.aP(R,l.u_viewport_size)}),debug:(R,l)=>({u_color:new n.aM(R,l.u_color),u_matrix:new n.aK(R,l.u_matrix),u_overlay:new n.aI(R,l.u_overlay),u_overlay_scale:new n.aJ(R,l.u_overlay_scale)}),clippingMask:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix)}),heatmap:(R,l)=>({u_extrude_scale:new n.aJ(R,l.u_extrude_scale),u_intensity:new n.aJ(R,l.u_intensity),u_matrix:new n.aK(R,l.u_matrix)}),heatmapTexture:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_world:new n.aP(R,l.u_world),u_image:new n.aI(R,l.u_image),u_color_ramp:new n.aI(R,l.u_color_ramp),u_opacity:new n.aJ(R,l.u_opacity)}),hillshade:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_latrange:new n.aP(R,l.u_latrange),u_light:new n.aP(R,l.u_light),u_shadow:new n.aM(R,l.u_shadow),u_highlight:new n.aM(R,l.u_highlight),u_accent:new n.aM(R,l.u_accent)}),hillshadePrepare:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_image:new n.aI(R,l.u_image),u_dimension:new n.aP(R,l.u_dimension),u_zoom:new n.aJ(R,l.u_zoom),u_unpack:new n.aL(R,l.u_unpack)}),line:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels)}),lineGradient:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_image:new n.aI(R,l.u_image),u_image_height:new n.aJ(R,l.u_image_height)}),linePattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texsize:new n.aP(R,l.u_texsize),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_image:new n.aI(R,l.u_image),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_scale:new n.aO(R,l.u_scale),u_fade:new n.aJ(R,l.u_fade)}),lineSDF:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ratio:new n.aJ(R,l.u_ratio),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_units_to_pixels:new n.aP(R,l.u_units_to_pixels),u_patternscale_a:new n.aP(R,l.u_patternscale_a),u_patternscale_b:new n.aP(R,l.u_patternscale_b),u_sdfgamma:new n.aJ(R,l.u_sdfgamma),u_image:new n.aI(R,l.u_image),u_tex_y_a:new n.aJ(R,l.u_tex_y_a),u_tex_y_b:new n.aJ(R,l.u_tex_y_b),u_mix:new n.aJ(R,l.u_mix)}),raster:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_tl_parent:new n.aP(R,l.u_tl_parent),u_scale_parent:new n.aJ(R,l.u_scale_parent),u_buffer_scale:new n.aJ(R,l.u_buffer_scale),u_fade_t:new n.aJ(R,l.u_fade_t),u_opacity:new n.aJ(R,l.u_opacity),u_image0:new n.aI(R,l.u_image0),u_image1:new n.aI(R,l.u_image1),u_brightness_low:new n.aJ(R,l.u_brightness_low),u_brightness_high:new n.aJ(R,l.u_brightness_high),u_saturation_factor:new n.aJ(R,l.u_saturation_factor),u_contrast_factor:new n.aJ(R,l.u_contrast_factor),u_spin_weights:new n.aO(R,l.u_spin_weights)}),symbolIcon:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texture:new n.aI(R,l.u_texture),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),symbolSDF:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texture:new n.aI(R,l.u_texture),u_gamma_scale:new n.aJ(R,l.u_gamma_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_is_halo:new n.aI(R,l.u_is_halo),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),symbolTextAndIcon:(R,l)=>({u_is_size_zoom_constant:new n.aI(R,l.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(R,l.u_is_size_feature_constant),u_size_t:new n.aJ(R,l.u_size_t),u_size:new n.aJ(R,l.u_size),u_camera_to_center_distance:new n.aJ(R,l.u_camera_to_center_distance),u_pitch:new n.aJ(R,l.u_pitch),u_rotate_symbol:new n.aI(R,l.u_rotate_symbol),u_aspect_ratio:new n.aJ(R,l.u_aspect_ratio),u_fade_change:new n.aJ(R,l.u_fade_change),u_matrix:new n.aK(R,l.u_matrix),u_label_plane_matrix:new n.aK(R,l.u_label_plane_matrix),u_coord_matrix:new n.aK(R,l.u_coord_matrix),u_is_text:new n.aI(R,l.u_is_text),u_pitch_with_map:new n.aI(R,l.u_pitch_with_map),u_is_along_line:new n.aI(R,l.u_is_along_line),u_is_variable_anchor:new n.aI(R,l.u_is_variable_anchor),u_texsize:new n.aP(R,l.u_texsize),u_texsize_icon:new n.aP(R,l.u_texsize_icon),u_texture:new n.aI(R,l.u_texture),u_texture_icon:new n.aI(R,l.u_texture_icon),u_gamma_scale:new n.aJ(R,l.u_gamma_scale),u_device_pixel_ratio:new n.aJ(R,l.u_device_pixel_ratio),u_is_halo:new n.aI(R,l.u_is_halo),u_translation:new n.aP(R,l.u_translation),u_pitched_scale:new n.aJ(R,l.u_pitched_scale)}),background:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_opacity:new n.aJ(R,l.u_opacity),u_color:new n.aM(R,l.u_color)}),backgroundPattern:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_opacity:new n.aJ(R,l.u_opacity),u_image:new n.aI(R,l.u_image),u_pattern_tl_a:new n.aP(R,l.u_pattern_tl_a),u_pattern_br_a:new n.aP(R,l.u_pattern_br_a),u_pattern_tl_b:new n.aP(R,l.u_pattern_tl_b),u_pattern_br_b:new n.aP(R,l.u_pattern_br_b),u_texsize:new n.aP(R,l.u_texsize),u_mix:new n.aJ(R,l.u_mix),u_pattern_size_a:new n.aP(R,l.u_pattern_size_a),u_pattern_size_b:new n.aP(R,l.u_pattern_size_b),u_scale_a:new n.aJ(R,l.u_scale_a),u_scale_b:new n.aJ(R,l.u_scale_b),u_pixel_coord_upper:new n.aP(R,l.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(R,l.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(R,l.u_tile_units_to_pixels)}),terrain:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texture:new n.aI(R,l.u_texture),u_ele_delta:new n.aJ(R,l.u_ele_delta),u_fog_matrix:new n.aK(R,l.u_fog_matrix),u_fog_color:new n.aM(R,l.u_fog_color),u_fog_ground_blend:new n.aJ(R,l.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(R,l.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(R,l.u_horizon_color),u_horizon_fog_blend:new n.aJ(R,l.u_horizon_fog_blend)}),terrainDepth:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_ele_delta:new n.aJ(R,l.u_ele_delta)}),terrainCoords:(R,l)=>({u_matrix:new n.aK(R,l.u_matrix),u_texture:new n.aI(R,l.u_texture),u_terrain_coords_id:new n.aJ(R,l.u_terrain_coords_id),u_ele_delta:new n.aJ(R,l.u_ele_delta)}),sky:(R,l)=>({u_sky_color:new n.aM(R,l.u_sky_color),u_horizon_color:new n.aM(R,l.u_horizon_color),u_horizon:new n.aJ(R,l.u_horizon),u_sky_horizon_blend:new n.aJ(R,l.u_sky_horizon_blend)})};class Oa{constructor(l,p,z){this.context=l;const j=l.gl;this.buffer=j.createBuffer(),this.dynamicDraw=!!z,this.context.unbindVAO(),l.bindElementBuffer.set(this.buffer),j.bufferData(j.ELEMENT_ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?j.DYNAMIC_DRAW:j.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(l){const p=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),p.bufferSubData(p.ELEMENT_ARRAY_BUFFER,0,l.arrayBuffer)}destroy(){const l=this.context.gl;this.buffer&&(l.deleteBuffer(this.buffer),delete this.buffer)}}const Ha={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ur{constructor(l,p,z,j){this.length=p.length,this.attributes=z,this.itemSize=p.bytesPerElement,this.dynamicDraw=j,this.context=l;const q=l.gl;this.buffer=q.createBuffer(),l.bindVertexBuffer.set(this.buffer),q.bufferData(q.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?q.DYNAMIC_DRAW:q.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){if(l.length!==this.length)throw new Error(`Length of new data is ${l.length}, which doesn't match current length of ${this.length}`);const p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,p){for(let z=0;z<this.attributes.length;z++){const j=this.attributes[z],q=p.attributes[j.name];q!==void 0&&l.enableVertexAttribArray(q)}}setVertexAttribPointers(l,p,z){for(let j=0;j<this.attributes.length;j++){const q=this.attributes[j],ie=p.attributes[q.name];ie!==void 0&&l.vertexAttribPointer(ie,q.components,l[Ha[q.type]],!1,this.itemSize,q.offset+this.itemSize*(z||0))}}destroy(){const l=this.context.gl;this.buffer&&(l.deleteBuffer(this.buffer),delete this.buffer)}}const kr=new WeakMap;function mi(R){var l;if(kr.has(R))return kr.get(R);{const p=(l=R.getParameter(R.VERSION))===null||l===void 0?void 0:l.startsWith("WebGL 2.0");return kr.set(R,p),p}}class xr{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class oo extends xr{getDefault(){return n.aN.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class ki extends xr{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class Ui extends xr{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class Do extends xr{getDefault(){return[!0,!0,!0,!0]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class ai extends xr{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class si extends xr{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class Ko extends xr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){const p=this.current;(l.func!==p.func||l.ref!==p.ref||l.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class fo extends xr{getDefault(){const l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Vo extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=l,this.dirty=!1}}class os extends xr{getDefault(){return[0,1]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class Mo extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=l,this.dirty=!1}}class Tl extends xr{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class Cl extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.BLEND):p.disable(p.BLEND),this.current=l,this.dirty=!1}}class El extends xr{getDefault(){const l=this.gl;return[l.ONE,l.ZERO]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||this.dirty)&&(this.gl.blendFunc(l[0],l[1]),this.current=l,this.dirty=!1)}}class Ro extends xr{getDefault(){return n.aN.transparent}set(l){const p=this.current;(l.r!==p.r||l.g!==p.g||l.b!==p.b||l.a!==p.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class qs extends xr{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class ms extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;l?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=l,this.dirty=!1}}class Si extends xr{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class Ji extends xr{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class Al extends xr{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class Zs extends xr{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class Ls extends xr{getDefault(){const l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){const p=this.current;(l[0]!==p[0]||l[1]!==p[1]||l[2]!==p[2]||l[3]!==p[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class Ml extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class Fs extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Il extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindTexture(p.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class Pl extends xr{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Xs extends xr{getDefault(){return null}set(l){const p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class ko extends xr{getDefault(){return null}set(l){var p;if(l===this.current&&!this.dirty)return;const z=this.gl;mi(z)?z.bindVertexArray(l):(p=z.getExtension("OES_vertex_array_object"))===null||p===void 0||p.bindVertexArrayOES(l),this.current=l,this.dirty=!1}}class Uc extends xr{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class Pc extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class Hl extends xr{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class Gc extends xr{constructor(l,p){super(l),this.context=l,this.parent=p}getDefault(){return null}}class Qc extends Gc{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class gs extends Gc{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class eu extends Gc{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_STENCIL_ATTACHMENT,p.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Pu{constructor(l,p,z,j,q){this.context=l,this.width=p,this.height=z;const ie=l.gl,pe=this.framebuffer=ie.createFramebuffer();if(this.colorAttachment=new Qc(l,pe),j)this.depthAttachment=q?new eu(l,pe):new gs(l,pe);else if(q)throw new Error("Stencil cannot be set without depth");if(ie.checkFramebufferStatus(ie.FRAMEBUFFER)!==ie.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const l=this.context.gl,p=this.colorAttachment.get();if(p&&l.deleteTexture(p),this.depthAttachment){const z=this.depthAttachment.get();z&&l.deleteRenderbuffer(z)}l.deleteFramebuffer(this.framebuffer)}}class Yi{constructor(l,p,z){this.blendFunction=l,this.blendColor=p,this.mask=z}}Yi.Replace=[1,0],Yi.disabled=new Yi(Yi.Replace,n.aN.transparent,[!1,!1,!1,!1]),Yi.unblended=new Yi(Yi.Replace,n.aN.transparent,[!0,!0,!0,!0]),Yi.alphaBlended=new Yi([1,771],n.aN.transparent,[!0,!0,!0,!0]);class bc{constructor(l){var p,z;if(this.gl=l,this.clearColor=new oo(this),this.clearDepth=new ki(this),this.clearStencil=new Ui(this),this.colorMask=new Do(this),this.depthMask=new ai(this),this.stencilMask=new si(this),this.stencilFunc=new Ko(this),this.stencilOp=new fo(this),this.stencilTest=new Vo(this),this.depthRange=new os(this),this.depthTest=new Mo(this),this.depthFunc=new Tl(this),this.blend=new Cl(this),this.blendFunc=new El(this),this.blendColor=new Ro(this),this.blendEquation=new qs(this),this.cullFace=new ms(this),this.cullFaceSide=new Si(this),this.frontFace=new Ji(this),this.program=new Al(this),this.activeTexture=new Zs(this),this.viewport=new Ls(this),this.bindFramebuffer=new Ml(this),this.bindRenderbuffer=new Fs(this),this.bindTexture=new Il(this),this.bindVertexBuffer=new Pl(this),this.bindElementBuffer=new Xs(this),this.bindVertexArray=new ko(this),this.pixelStoreUnpack=new Uc(this),this.pixelStoreUnpackPremultiplyAlpha=new Pc(this),this.pixelStoreUnpackFlipY=new Hl(this),this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=l.getParameter(l.MAX_TEXTURE_SIZE),mi(l)){this.HALF_FLOAT=l.HALF_FLOAT;const j=l.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(p=l.RGBA16F)!==null&&p!==void 0?p:j==null?void 0:j.RGBA16F_EXT,this.RGB16F=(z=l.RGB16F)!==null&&z!==void 0?z:j==null?void 0:j.RGB16F_EXT,l.getExtension("EXT_color_buffer_float")}else{l.getExtension("EXT_color_buffer_half_float"),l.getExtension("OES_texture_half_float_linear");const j=l.getExtension("OES_texture_half_float");this.HALF_FLOAT=j==null?void 0:j.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(l,p){return new Oa(this,l,p)}createVertexBuffer(l,p,z){return new ur(this,l,p,z)}createRenderbuffer(l,p,z){const j=this.gl,q=j.createRenderbuffer();return this.bindRenderbuffer.set(q),j.renderbufferStorage(j.RENDERBUFFER,l,p,z),this.bindRenderbuffer.set(null),q}createFramebuffer(l,p,z,j){return new Pu(this,l,p,z,j)}clear({color:l,depth:p,stencil:z}){const j=this.gl;let q=0;l&&(q|=j.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(q|=j.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),z!==void 0&&(q|=j.STENCIL_BUFFER_BIT,this.clearStencil.set(z),this.stencilMask.set(255)),j.clear(q)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){n.aF(l.blendFunction,Yi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor)),this.colorMask.set(l.mask)}createVertexArray(){var l;return mi(this.gl)?this.gl.createVertexArray():(l=this.gl.getExtension("OES_vertex_array_object"))===null||l===void 0?void 0:l.createVertexArrayOES()}deleteVertexArray(l){var p;return mi(this.gl)?this.gl.deleteVertexArray(l):(p=this.gl.getExtension("OES_vertex_array_object"))===null||p===void 0?void 0:p.deleteVertexArrayOES(l)}unbindVAO(){this.bindVertexArray.set(null)}}class Zr{constructor(l,p,z){this.func=l,this.mask=p,this.range=z}}Zr.ReadOnly=!1,Zr.ReadWrite=!0,Zr.disabled=new Zr(519,Zr.ReadOnly,[0,1]);const Wl=7680;class bi{constructor(l,p,z,j,q,ie){this.test=l,this.ref=p,this.mask=z,this.fail=j,this.depthFail=q,this.pass=ie}}bi.disabled=new bi({func:519,mask:0},0,0,Wl,Wl,Wl);class xi{constructor(l,p,z){this.enable=l,this.mode=p,this.frontFace=z}}let ys;function Yo(R,l,p,z,j){const q=R.context,ie=q.gl,pe=R.useProgram("collisionBox"),be=[];let Ae=0,Ne=0;for(let At=0;At<z.length;At++){const Tt=z[At],Rt=l.getTile(Tt).getBucket(p);if(!Rt)continue;const Et=j?Rt.textCollisionBox:Rt.iconCollisionBox,Zt=Rt.collisionCircleArray;if(Zt.length>0){const Yt=n.H();n.aR(Yt,Rt.placementInvProjMatrix,R.transform.glCoordMatrix),n.aR(Yt,Yt,Rt.placementViewportMatrix),be.push({circleArray:Zt,circleOffset:Ne,transform:Tt.posMatrix,invTransform:Yt,coord:Tt}),Ae+=Zt.length/4,Ne=Ae}Et&&pe.draw(q,ie.LINES,Zr.disabled,bi.disabled,R.colorModeForRenderPass(),xi.disabled,tn(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),p.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!j||!be.length)return;const Ge=R.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Ae),at._trim();let ct=0;for(const At of be)for(let Tt=0;Tt<At.circleArray.length/4;Tt++){const Rt=4*Tt,Et=At.circleArray[Rt+0],Zt=At.circleArray[Rt+1],Yt=At.circleArray[Rt+2],Xt=At.circleArray[Rt+3];at.emplace(ct++,Et,Zt,Yt,Xt,0),at.emplace(ct++,Et,Zt,Yt,Xt,1),at.emplace(ct++,Et,Zt,Yt,Xt,2),at.emplace(ct++,Et,Zt,Yt,Xt,3)}(!ys||ys.length<2*Ae)&&(ys=function(At){const Tt=2*At,Rt=new n.aU;Rt.resize(Tt),Rt._trim();for(let Et=0;Et<Tt;Et++){const Zt=6*Et;Rt.uint16[Zt+0]=4*Et+0,Rt.uint16[Zt+1]=4*Et+1,Rt.uint16[Zt+2]=4*Et+2,Rt.uint16[Zt+3]=4*Et+2,Rt.uint16[Zt+4]=4*Et+3,Rt.uint16[Zt+5]=4*Et+0}return Rt}(Ae));const pt=q.createIndexBuffer(ys,!0),xt=q.createVertexBuffer(at,n.aT.members,!0);for(const At of be){const Tt=un(At.transform,At.invTransform,R.transform);Ge.draw(q,ie.TRIANGLES,Zr.disabled,bi.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(At.coord),p.id,xt,pt,n.a0.simpleSegment(0,2*At.circleOffset,At.circleArray.length,At.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=n.ao(new Float32Array(16));function Bl(R,l,p,z,j){if(R.renderPass!=="translucent")return;const q=bi.disabled,ie=R.colorModeForRenderPass();(p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,be,Ae,Ne,Ge,at,ct,pt,xt){const At=be.transform,Tt=Bn(),Rt=Ge==="map",Et=at==="map";for(const Zt of pe){const Yt=Ne.getTile(Zt),Xt=Yt.getBucket(Ae);if(!Xt||!Xt.text||!Xt.text.segments.get().length)continue;const hn=Xt.textSizeData,xn=n.ah(hn,At.zoom),Nn=St(Yt,1,be.transform.zoom),Dn=Vt(Zt.posMatrix,Et,Rt,be.transform,Nn),Gn=Ae.layout.get("icon-text-fit")!=="none"&&Xt.hasIconData();if(xn){const Yn=Math.pow(2,At.zoom-Yt.tileID.overscaledZ),ya=be.style.map.terrain?(wa,ia)=>be.style.map.terrain.getElevation(Zt,wa,ia):null,ea=Tt.translatePosition(At,Yt,ct,pt);mo(Xt,Rt,Et,xt,At,Dn,Zt.posMatrix,Yn,xn,Gn,Tt,ea,Zt.toUnwrapped(),ya)}}}(z,R,p,l,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),j),p.paint.get("icon-opacity").constantOr(1)!==0&&ic(R,l,p,z,!1,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),p.layout.get("icon-rotation-alignment"),p.layout.get("icon-pitch-alignment"),p.layout.get("icon-keep-upright"),q,ie),p.paint.get("text-opacity").constantOr(1)!==0&&ic(R,l,p,z,!0,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.layout.get("text-keep-upright"),q,ie),l.map.showCollisionBoxes&&(Yo(R,l,p,z,!0),Yo(R,l,p,z,!1))}function Qo(R,l,p,z,j,q){const{horizontalAlign:ie,verticalAlign:pe}=n.av(R),be=-(ie-.5)*l,Ae=-(pe-.5)*p;return new n.P((be/j+z[0])*q,(Ae/j+z[1])*q)}function ss(R,l,p,z,j,q){const ie=l.tileAnchorPoint.add(new n.P(l.translation[0],l.translation[1]));if(l.pitchWithMap){let pe=z.mult(q);return p||(pe=pe.rotate(-j)),Ut(ie.add(pe),l.labelPlaneMatrix,l.getElevation).point}if(p){const pe=Ze(l.tileAnchorPoint.x+1,l.tileAnchorPoint.y,l).point.sub(R),be=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return R.add(z.rotate(be))}return R.add(z)}function mo(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge,at,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,At=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let Rt=0;Rt<pt.length;Rt++){const Et=pt.get(Rt),Zt=R.allowVerticalPlacement&&!Et.placedOrientation,Yt=Et.hidden||!Et.crossTileID||Zt?null:z[Et.crossTileID];if(Yt){const Xt=new n.P(Et.anchorX,Et.anchorY),hn={getElevation:ct,width:j.width,height:j.height,labelPlaneMatrix:q,lineVertexArray:null,pitchWithMap:p,projection:Ne,projectionCache:null,tileAnchorPoint:Xt,translation:Ge,unwrappedTileID:at},xn=p?Ut(Xt,ie,ct):Ze(Xt.x,Xt.y,hn),Nn=ot(j.cameraToCenterDistance,xn.signedDistanceFromCamera);let Dn=n.aj(R.textSizeData,be,Et)*Nn/n.aq;p&&(Dn*=R.tilePixelRatio/pe);const{width:Gn,height:Yn,anchor:ya,textOffset:ea,textBoxScale:wa}=Yt,ia=Qo(ya,Gn,Yn,ea,wa,Dn),Ta=Ne.getPitchedTextCorrection(j,Xt.add(new n.P(Ge[0],Ge[1])),at),fa=ss(xn.point,hn,l,ia,j.angle,Ta),Ia=R.allowVerticalPlacement&&Et.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let qa=0;qa<Et.numGlyphs;qa++)n.ak(xt,fa,Ia);Ae&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:fa,angle:Ia})}else Dt(Et.numGlyphs,xt)}if(Ae){At.clear();const Rt=R.icon.placedSymbolArray;for(let Et=0;Et<Rt.length;Et++){const Zt=Rt.get(Et);if(Zt.hidden)Dt(Zt.numGlyphs,At);else{const Yt=Tt[Et];if(Yt)for(let Xt=0;Xt<Zt.numGlyphs;Xt++)n.ak(At,Yt.shiftedAnchor,Yt.angle);else Dt(Zt.numGlyphs,At)}}R.icon.dynamicLayoutVertexBuffer.updateData(At)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,l,p){return p.iconsInText&&l?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function ic(R,l,p,z,j,q,ie,pe,be,Ae,Ne,Ge){const at=R.context,ct=at.gl,pt=R.transform,xt=Bn(),At=pe==="map",Tt=be==="map",Rt=pe!=="viewport"&&p.layout.get("symbol-placement")!=="point",Et=At&&!Tt&&!Rt,Zt=!Tt&&Rt,Yt=!p.layout.get("symbol-sort-key").isConstant();let Xt=!1;const hn=R.depthModeForSublayer(0,Zr.ReadOnly),xn=p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Nn=[],Dn=xt.getCircleRadiusCorrection(pt);for(const Gn of z){const Yn=l.getTile(Gn),ya=Yn.getBucket(p);if(!ya)continue;const ea=j?ya.text:ya.icon;if(!ea||!ea.segments.get().length||!ea.hasVisibleVertices)continue;const wa=ea.programConfigurations.get(p.id),ia=j||ya.sdfIcons,Ta=j?ya.textSizeData:ya.iconSizeData,fa=Tt||pt.pitch!==0,Ia=R.useProgram(ei(ia,j,ya),wa),qa=n.ah(Ta,pt.zoom),Ma=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Gn);let Ga,nr,Br,yr,Gr=[0,0],$r=null;if(j){if(nr=Yn.glyphAtlasTexture,Br=ct.LINEAR,Ga=Yn.glyphAtlasTexture.size,ya.iconsInText){Gr=Yn.imageAtlasTexture.size,$r=Yn.imageAtlasTexture;const Lr=Ta.kind==="composite"||Ta.kind==="camera";yr=fa||R.options.rotating||R.options.zooming||Lr?ct.LINEAR:ct.NEAREST}}else{const Lr=p.layout.get("icon-size").constantOr(0)!==1||ya.iconsNeedLinear;nr=Yn.imageAtlasTexture,Br=ia||R.options.rotating||R.options.zooming||Lr||fa?ct.LINEAR:ct.NEAREST,Ga=Yn.imageAtlasTexture.size}const Xr=St(Yn,1,R.transform.zoom),oi=Zt?Gn.posMatrix:xc,Ri=Vt(oi,Tt,At,R.transform,Xr),Li=$t(oi,Tt,At,R.transform,Xr),no=$t(Gn.posMatrix,Tt,At,R.transform,Xr),ci=xt.translatePosition(R.transform,Yn,q,ie),Kr=xn&&ya.hasTextData(),Ei=p.layout.get("icon-text-fit")!=="none"&&Kr&&ya.hasIconData();if(Rt){const Lr=R.style.map.terrain?(Xi,us)=>R.style.map.terrain.getElevation(Gn,Xi,us):null,_o=p.layout.get("text-rotation-alignment")==="map";ht(ya,Gn.posMatrix,R,j,Ri,no,Tt,Ae,_o,xt,Gn.toUnwrapped(),pt.width,pt.height,ci,Lr)}const pi=Gn.posMatrix,ni=j&&xn||Ei,ui=Rt||ni?xc:Ri,_i=Li,Yr=ia&&p.paint.get(j?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let As;As=ia?ya.iconsInText?Ca(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,Ga,Gr,Dn):xa(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,j,Ga,!0,Dn):Ba(Ta.kind,qa,Et,Tt,Rt,ni,R,pi,ui,_i,ci,j,Ga,Dn);const Gi={program:Ia,buffers:ea,uniformValues:As,atlasTexture:nr,atlasTextureIcon:$r,atlasInterpolation:Br,atlasInterpolationIcon:yr,isSDF:ia,hasHalo:Yr};if(Yt&&ya.canOverlap){Xt=!0;const Lr=ea.segments.get();for(const _o of Lr)Nn.push({segments:new n.a0([_o]),sortKey:_o.sortKey,state:Gi,terrainData:Ma})}else Nn.push({segments:ea.segments,sortKey:0,state:Gi,terrainData:Ma})}Xt&&Nn.sort((Gn,Yn)=>Gn.sortKey-Yn.sortKey);for(const Gn of Nn){const Yn=Gn.state;if(at.activeTexture.set(ct.TEXTURE0),Yn.atlasTexture.bind(Yn.atlasInterpolation,ct.CLAMP_TO_EDGE),Yn.atlasTextureIcon&&(at.activeTexture.set(ct.TEXTURE1),Yn.atlasTextureIcon&&Yn.atlasTextureIcon.bind(Yn.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),Yn.isSDF){const ya=Yn.uniformValues;Yn.hasHalo&&(ya.u_is_halo=1,tu(Yn.buffers,Gn.segments,p,R,Yn.program,hn,Ne,Ge,ya,Gn.terrainData)),ya.u_is_halo=0}tu(Yn.buffers,Gn.segments,p,R,Yn.program,hn,Ne,Ge,Yn.uniformValues,Gn.terrainData)}}function tu(R,l,p,z,j,q,ie,pe,be,Ae){const Ne=z.context,Ge=Ne.gl;j.draw(Ne,Ge.TRIANGLES,q,ie,pe,xi.disabled,be,Ae,p.id,R.layoutVertexBuffer,R.indexBuffer,l,p.paint,z.transform.zoom,R.programConfigurations.get(p.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function Ll(R,l,p,z){if(p.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const j=R.context,q=j.gl,ie=bi.disabled,pe=new Yi([q.ONE,q.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(be,Ae,Ne){const Ge=be.gl;be.activeTexture.set(Ge.TEXTURE1),be.viewport.set([0,0,Ae.width/4,Ae.height/4]);let at=Ne.heatmapFbo;if(at)Ge.bindTexture(Ge.TEXTURE_2D,at.colorAttachment.get()),be.bindFramebuffer.set(at.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),at=Ne.heatmapFbo=be.createFramebuffer(Ae.width/4,Ae.height/4,!1,!1),function(pt,xt,At,Tt){var Rt,Et;const Zt=pt.gl,Yt=(Rt=pt.HALF_FLOAT)!==null&&Rt!==void 0?Rt:Zt.UNSIGNED_BYTE,Xt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Zt.RGBA;Zt.texImage2D(Zt.TEXTURE_2D,0,Xt,xt.width/4,xt.height/4,0,Zt.RGBA,Yt,null),Tt.colorAttachment.set(At)}(be,Ae,ct,at)}})(j,R,p),j.clear({color:n.aN.transparent});for(let be=0;be<z.length;be++){const Ae=z[be];if(l.hasRenderableParent(Ae))continue;const Ne=l.getTile(Ae),Ge=Ne.getBucket(p);if(!Ge)continue;const at=Ge.programConfigurations.get(p.id),ct=R.useProgram("heatmap",at),{zoom:pt}=R.transform;ct.draw(j,q.TRIANGLES,Zr.disabled,ie,pe,xi.disabled,On(Ae.posMatrix,Ne,pt,p.paint.get("heatmap-intensity")),null,p.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,p.paint,R.transform.zoom,at)}j.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(j,q){const ie=j.context,pe=ie.gl,be=q.heatmapFbo;if(!be)return;ie.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,be.colorAttachment.get()),ie.activeTexture.set(pe.TEXTURE1);let Ae=q.colorRampTexture;Ae||(Ae=q.colorRampTexture=new L(ie,q.colorRamp,pe.RGBA)),Ae.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),j.useProgram("heatmapTexture").draw(ie,pe.TRIANGLES,Zr.disabled,bi.disabled,j.colorModeForRenderPass(),xi.disabled,Zn(j,q,0,1),null,q.id,j.viewportBuffer,j.quadTriangleIndexBuffer,j.viewportSegments,q.paint,j.transform.zoom)}(R,p))}function Fl(R,l,p,z,j){if(!p||!z||!z.imageAtlas)return;const q=z.imageAtlas.patternPositions;let ie=q[p.to.toString()],pe=q[p.from.toString()];if(!ie&&pe&&(ie=pe),!pe&&ie&&(pe=ie),!ie||!pe){const be=j.getPaintProperty(l);ie=q[be],pe=q[be]}ie&&pe&&R.setConstantPatternPositions(ie,pe)}function Bc(R,l,p,z,j,q,ie){const pe=R.context.gl,be="fill-pattern",Ae=p.paint.get(be),Ne=Ae&&Ae.constantOr(1),Ge=p.getCrossfadeParameters();let at,ct,pt,xt,At;ie?(ct=Ne&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=pe.LINES):(ct=Ne?"fillPattern":"fill",at=pe.TRIANGLES);const Tt=Ae.constantOr(null);for(const Rt of z){const Et=l.getTile(Rt);if(Ne&&!Et.patternsLoaded())continue;const Zt=Et.getBucket(p);if(!Zt)continue;const Yt=Zt.programConfigurations.get(p.id),Xt=R.useProgram(ct,Yt),hn=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Rt);Ne&&(R.context.activeTexture.set(pe.TEXTURE0),Et.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Yt.updatePaintBuffers(Ge)),Fl(Yt,be,Tt,Et,p);const xn=hn?Rt:null,Nn=xn?xn.posMatrix:Rt.posMatrix,Dn=R.translatePosMatrix(Nn,Et,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(ie){xt=Zt.indexBuffer2,At=Zt.segments2;const Gn=[pe.drawingBufferWidth,pe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Ne?gn(Dn,R,Ge,Et,Gn):Ua(Dn,Gn)}else xt=Zt.indexBuffer,At=Zt.segments,pt=Ne?Fa(Dn,R,Ge,Et):ga(Dn);Xt.draw(R.context,at,j,R.stencilModeForClipping(Rt),q,xi.disabled,pt,hn,p.id,Zt.layoutVertexBuffer,xt,At,p.paint,R.transform.zoom,Yt)}}function wc(R,l,p,z,j,q,ie){const pe=R.context,be=pe.gl,Ae="fill-extrusion-pattern",Ne=p.paint.get(Ae),Ge=Ne.constantOr(1),at=p.getCrossfadeParameters(),ct=p.paint.get("fill-extrusion-opacity"),pt=Ne.constantOr(null);for(const xt of z){const At=l.getTile(xt),Tt=At.getBucket(p);if(!Tt)continue;const Rt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(p.id),Zt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(be.TEXTURE0),At.imageAtlasTexture.bind(be.LINEAR,be.CLAMP_TO_EDGE),Et.updatePaintBuffers(at)),Fl(Et,Ae,pt,At,p);const Yt=R.translatePosMatrix(xt.posMatrix,At,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Xt=p.paint.get("fill-extrusion-vertical-gradient"),hn=Ge?_a(Yt,R,Xt,ct,xt,at,At):aa(Yt,R,Xt,ct);Zt.draw(pe,pe.gl.TRIANGLES,j,q,ie,xi.backCCW,hn,Rt,p.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,p.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,l,p,z,j,q,ie){const pe=R.context,be=pe.gl,Ae=p.fbo;if(!Ae)return;const Ne=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(l);pe.activeTexture.set(be.TEXTURE0),be.bindTexture(be.TEXTURE_2D,Ae.colorAttachment.get());const at=Ge?l:null;Ne.draw(pe,be.TRIANGLES,j,q,ie,xi.disabled,Vn(R,p,z,at),Ge,z.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function hu(R,l,p,z,j,q){const ie=R.context,pe=ie.gl,be=l.dem;if(be&&be.data){const Ae=be.dim,Ne=be.stride,Ge=be.getPixels();if(ie.activeTexture.set(pe.TEXTURE1),ie.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||R.getTileTexture(Ne),l.demTexture){const ct=l.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else l.demTexture=new L(ie,Ge,pe.RGBA,{premultiply:!1}),l.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);ie.activeTexture.set(pe.TEXTURE0);let at=l.fbo;if(!at){const ct=new L(ie,{width:Ae,height:Ae,data:null},pe.RGBA);ct.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),at=l.fbo=ie.createFramebuffer(Ae,Ae,!0,!1),at.colorAttachment.set(ct.texture)}ie.bindFramebuffer.set(at.framebuffer),ie.viewport.set([0,0,Ae,Ae]),R.useProgram("hillshadePrepare").draw(ie,pe.TRIANGLES,z,j,q,xi.disabled,Pn(l.tileID,be),null,p.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),l.needsHillshadePrepare=!1}}function vs(R,l,p,z,j,q){const ie=z.paint.get("raster-fade-duration");if(!q&&ie>0){const pe=u.now(),be=(pe-R.timeAdded)/ie,Ae=l?(pe-l.timeAdded)/ie:-1,Ne=p.getSource(),Ge=j.coveringZoomLevel({tileSize:Ne.tileSize,roundZoom:Ne.roundZoom}),at=!l||Math.abs(l.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=at&&R.refreshedUponExpiration?1:n.ad(at?be:1-Ae,0,1);return R.refreshedUponExpiration&&be>=1&&(R.refreshedUponExpiration=!1),l?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Os=new n.aN(1,0,0,1),Ol=new n.aN(0,1,0,1),_s=new n.aN(0,0,1,1),ti=new n.aN(1,0,1,1),Hc=new n.aN(0,1,1,1);function Wc(R){const l=R.transform.padding;Lc(R,R.transform.height-(l.top||0),3,Os),Lc(R,l.bottom||0,3,Ol),So(R,l.left||0,3,_s),So(R,R.transform.width-(l.right||0),3,ti);const p=R.transform.centerPoint;(function(z,j,q,ie){Sc(z,j-1,q-10,2,20,ie),Sc(z,j-10,q-1,20,2,ie)})(R,p.x,R.transform.height-p.y,Hc)}function Lc(R,l,p,z){Sc(R,0,l+p/2,R.transform.width,p,z)}function So(R,l,p,z){Sc(R,l-p/2,0,p,R.transform.height,z)}function Sc(R,l,p,z,j,q){const ie=R.context,pe=ie.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(l*R.pixelRatio,p*R.pixelRatio,z*R.pixelRatio,j*R.pixelRatio),ie.clear({color:q}),pe.disable(pe.SCISSOR_TEST)}function xu(R,l,p){const z=R.context,j=z.gl,q=p.posMatrix,ie=R.useProgram("debug"),pe=Zr.disabled,be=bi.disabled,Ae=R.colorModeForRenderPass(),Ne="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(p);z.activeTexture.set(j.TEXTURE0);const at=l.getTileByID(p.key).latestRawTileData,ct=at&&at.byteLength||0,pt=Math.floor(ct/1024),xt=l.getTile(p).tileSize,At=512/Math.min(xt,512)*(p.overscaledZ/R.transform.zoom)*.5;let Tt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Tt+=` => ${p.overscaledZ}`),function(Rt,Et){Rt.initDebugOverlayCanvas();const Zt=Rt.debugOverlayCanvas,Yt=Rt.context.gl,Xt=Rt.debugOverlayCanvas.getContext("2d");Xt.clearRect(0,0,Zt.width,Zt.height),Xt.shadowColor="white",Xt.shadowBlur=2,Xt.lineWidth=1.5,Xt.strokeStyle="white",Xt.textBaseline="top",Xt.font="bold 36px Open Sans, sans-serif",Xt.fillText(Et,5,5),Xt.strokeText(Et,5,5),Rt.debugOverlayTexture.update(Zt),Rt.debugOverlayTexture.bind(Yt.LINEAR,Yt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),ie.draw(z,j.TRIANGLES,pe,be,Yi.alphaBlended,xi.disabled,mn(q,n.aN.transparent,At),null,Ne,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),ie.draw(z,j.LINE_STRIP,pe,be,Ae,xi.disabled,mn(q,n.aN.red),Ge,Ne,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function oc(R,l,p){const z=R.context,j=z.gl,q=R.colorModeForRenderPass(),ie=new Zr(j.LEQUAL,Zr.ReadWrite,R.depthRangeFor3D),pe=R.useProgram("terrain"),be=l.getTerrainMesh();z.bindFramebuffer.set(null),z.viewport.set([0,0,R.width,R.height]);for(const Ae of p){const Ne=R.renderToTexture.getTexture(Ae),Ge=l.getTerrainData(Ae.tileID);z.activeTexture.set(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Ne.texture);const at=R.transform.calculatePosMatrix(Ae.tileID.toUnwrapped()),ct=l.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ae.tileID.toUnwrapped()),xt=_n(at,ct,pt,R.style.sky,R.transform.pitch);pe.draw(z,j.TRIANGLES,ie,bi.disabled,q,xi.backCCW,xt,Ge,"terrain",be.vertexBuffer,be.indexBuffer,be.segments)}}class sc{constructor(l,p,z){this.vertexBuffer=l,this.indexBuffer=p,this.segments=z}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class lc{constructor(l,p){this.context=new bc(l),this.transform=p,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=He.maxUnderzooming+He.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ta}resize(l,p,z){if(this.width=Math.floor(l*z),this.height=Math.floor(p*z),this.pixelRatio=z,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const j of this.style._order)this.style._layers[j].resize()}setup(){const l=this.context,p=new n.aX;p.emplaceBack(0,0),p.emplaceBack(n.X,0),p.emplaceBack(0,n.X),p.emplaceBack(n.X,n.X),this.tileExtentBuffer=l.createVertexBuffer(p,va.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const z=new n.aX;z.emplaceBack(0,0),z.emplaceBack(n.X,0),z.emplaceBack(0,n.X),z.emplaceBack(n.X,n.X),this.debugBuffer=l.createVertexBuffer(z,va.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const j=new n.$;j.emplaceBack(0,0,0,0),j.emplaceBack(n.X,0,n.X,0),j.emplaceBack(0,n.X,0,n.X),j.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=l.createVertexBuffer(j,De.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const q=new n.aX;q.emplaceBack(0,0),q.emplaceBack(1,0),q.emplaceBack(0,1),q.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(q,va.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const ie=new n.aZ;ie.emplaceBack(0),ie.emplaceBack(1),ie.emplaceBack(3),ie.emplaceBack(2),ie.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(ie);const pe=new n.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(pe);const be=this.context.gl;this.stencilClearMode=new bi({func:be.ALWAYS,mask:0},0,255,be.ZERO,be.ZERO,be.ZERO)}clearStencil(){const l=this.context,p=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const z=n.H();n.aQ(z,0,this.width,this.height,0,0,1),n.K(z,z,[p.drawingBufferWidth,p.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(l,p.TRIANGLES,Zr.disabled,this.stencilClearMode,Yi.disabled,xi.disabled,zn(z),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,p){if(this.currentStencilSource===l.source||!l.isTileClipped()||!p||!p.length)return;this.currentStencilSource=l.source;const z=this.context,j=z.gl;this.nextStencilID+p.length>256&&this.clearStencil(),z.setColorMode(Yi.disabled),z.setDepthMode(Zr.disabled);const q=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ie of p){const pe=this._tileClippingMaskIDs[ie.key]=this.nextStencilID++,be=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ie);q.draw(z,j.TRIANGLES,Zr.disabled,new bi({func:j.ALWAYS,mask:0},pe,255,j.KEEP,j.KEEP,j.REPLACE),Yi.disabled,xi.disabled,zn(ie.posMatrix),be,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,p=this.context.gl;return new bi({func:p.NOTEQUAL,mask:255},l,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(l){const p=this.context.gl;return new bi({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(l){const p=this.context.gl,z=l.sort((ie,pe)=>pe.overscaledZ-ie.overscaledZ),j=z[z.length-1].overscaledZ,q=z[0].overscaledZ-j+1;if(q>1){this.currentStencilSource=void 0,this.nextStencilID+q>256&&this.clearStencil();const ie={};for(let pe=0;pe<q;pe++)ie[pe+j]=new bi({func:p.GEQUAL,mask:255},pe+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=q,[ie,z]}return[{[j]:bi.disabled},z]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new Yi([l.CONSTANT_COLOR,l.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Yi.unblended:Yi.alphaBlended}depthModeForSublayer(l,p,z){if(!this.opaquePassEnabledForLayer())return Zr.disabled;const j=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new Zr(z||this.context.gl.LEQUAL,p,[j,j])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,p){var z;this.style=l,this.options=p,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(u.now()),this.imageManager.beginFrame();const j=this.style._order,q=this.style.sourceCaches,ie={},pe={},be={};for(const Ae in q){const Ne=q[Ae];Ne.used&&Ne.prepare(this.context),ie[Ae]=Ne.getVisibleCoordinates(),pe[Ae]=ie[Ae].slice().reverse(),be[Ae]=Ne.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ae=0;Ae<j.length;Ae++){const Ne=j[Ae];if(this.style._layers[Ne].is3D()){this.opaquePassCutoff=Ae;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ae of j){const Ne=this.style._layers[Ae];if(!Ne.hasOffscreenPass()||Ne.isHidden(this.transform.zoom))continue;const Ge=pe[Ne.source];(Ne.type==="custom"||Ge.length)&&this.renderLayer(this,q[Ne.source],Ne,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:p.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((z=this.style.stylesheet)===null||z===void 0)&&z.sky&&function(Ae,Ne){const Ge=Ae.context,at=Ge.gl,ct=((Rt,Et,Zt)=>({u_sky_color:Rt.properties.get("sky-color"),u_horizon_color:Rt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Zt,u_sky_horizon_blend:Rt.properties.get("sky-horizon-blend")*Et.height/2*Zt}))(Ne,Ae.style.map.transform,Ae.pixelRatio),pt=new Zr(at.LEQUAL,Zr.ReadWrite,[0,1]),xt=bi.disabled,At=Ae.colorModeForRenderPass(),Tt=Ae.useProgram("sky");if(!Ne.mesh){const Rt=new n.aX;Rt.emplaceBack(-1,-1),Rt.emplaceBack(1,-1),Rt.emplaceBack(1,1),Rt.emplaceBack(-1,1);const Et=new n.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Ne.mesh=new sc(Ge.createVertexBuffer(Rt,va.members),Ge.createIndexBuffer(Et),n.a0.simpleSegment(0,0,Rt.length,Et.length))}Tt.draw(Ge,at.TRIANGLES,pt,xt,At,xi.disabled,ct,void 0,"sky",Ne.mesh.vertexBuffer,Ne.mesh.indexBuffer,Ne.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=p.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=j.length-1;this.currentLayer>=0;this.currentLayer--){const Ae=this.style._layers[j[this.currentLayer]],Ne=q[Ae.source],Ge=ie[Ae.source];this._renderTileClippingMasks(Ae,Ge),this.renderLayer(this,Ne,Ae,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<j.length;this.currentLayer++){const Ae=this.style._layers[j[this.currentLayer]],Ne=q[Ae.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ae))continue;const Ge=(Ae.type==="symbol"?be:pe)[Ae.source];this._renderTileClippingMasks(Ae,ie[Ae.source]),this.renderLayer(this,Ne,Ae,Ge)}if(this.options.showTileBoundaries){const Ae=function(Ne,Ge){let at=null;const ct=Object.values(Ne._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Ne.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),At=Tt=>{(!at||at.getSource().maxzoom<Tt.getSource().maxzoom)&&(at=Tt)};return pt.forEach(Tt=>At(Tt)),at||xt.forEach(Tt=>At(Tt)),at}(this.style,this.transform.zoom);Ae&&function(Ne,Ge,at){for(let ct=0;ct<at.length;ct++)xu(Ne,Ge,at[ct])}(this,Ae,Ae.getVisibleCoordinates())}this.options.showPadding&&Wc(this),this.context.setDefault()}maybeDrawDepthAndCoords(l){if(!this.style||!this.style.map||!this.style.map.terrain)return;const p=this.terrainFacilitator.matrix,z=this.transform.modelViewProjectionMatrix;let j=this.terrainFacilitator.dirty;j||(j=l?!n.a_(p,z):!n.a$(p,z)),j||(j=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),j&&(n.b0(p,z),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(q,ie){const pe=q.context,be=pe.gl,Ae=Yi.unblended,Ne=new Zr(be.LEQUAL,Zr.ReadWrite,[0,1]),Ge=ie.getTerrainMesh(),at=ie.sourceCache.getRenderableTiles(),ct=q.useProgram("terrainDepth");pe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,q.width/devicePixelRatio,q.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1});for(const pt of at){const xt=ie.getTerrainData(pt.tileID),At={u_matrix:q.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:ie.getMeshFrameDelta(q.transform.zoom)};ct.draw(pe,be.TRIANGLES,Ne,bi.disabled,Ae,xi.backCCW,At,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,q.width,q.height])}(this,this.style.map.terrain),function(q,ie){const pe=q.context,be=pe.gl,Ae=Yi.unblended,Ne=new Zr(be.LEQUAL,Zr.ReadWrite,[0,1]),Ge=ie.getTerrainMesh(),at=ie.getCoordsTexture(),ct=ie.sourceCache.getRenderableTiles(),pt=q.useProgram("terrainCoords");pe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,q.width/devicePixelRatio,q.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1}),ie.coordsIndex=[];for(const xt of ct){const At=ie.getTerrainData(xt.tileID);pe.activeTexture.set(be.TEXTURE0),be.bindTexture(be.TEXTURE_2D,at.texture);const Tt={u_matrix:q.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0,u_ele_delta:ie.getMeshFrameDelta(q.transform.zoom)};pt.draw(pe,be.TRIANGLES,Ne,bi.disabled,Ae,xi.backCCW,Tt,At,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),ie.coordsIndex.push(xt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,q.width,q.height])}(this,this.style.map.terrain))}renderLayer(l,p,z,j){if(!z.isHidden(this.transform.zoom)&&(z.type==="background"||z.type==="custom"||(j||[]).length))switch(this.id=z.id,z.type){case"symbol":Bl(l,p,z,j,this.style.placement.variableOffsets);break;case"circle":(function(q,ie,pe,be){if(q.renderPass!=="translucent")return;const Ae=pe.paint.get("circle-opacity"),Ne=pe.paint.get("circle-stroke-width"),Ge=pe.paint.get("circle-stroke-opacity"),at=!pe.layout.get("circle-sort-key").isConstant();if(Ae.constantOr(1)===0&&(Ne.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=q.context,pt=ct.gl,xt=q.depthModeForSublayer(0,Zr.ReadOnly),At=bi.disabled,Tt=q.colorModeForRenderPass(),Rt=[];for(let Et=0;Et<be.length;Et++){const Zt=be[Et],Yt=ie.getTile(Zt),Xt=Yt.getBucket(pe);if(!Xt)continue;const hn=Xt.programConfigurations.get(pe.id),xn=q.useProgram("circle",hn),Nn=Xt.layoutVertexBuffer,Dn=Xt.indexBuffer,Gn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Zt),Yn={programConfiguration:hn,program:xn,layoutVertexBuffer:Nn,indexBuffer:Dn,uniformValues:Un(q,Zt,Yt,pe),terrainData:Gn};if(at){const ya=Xt.segments.get();for(const ea of ya)Rt.push({segments:new n.a0([ea]),sortKey:ea.sortKey,state:Yn})}else Rt.push({segments:Xt.segments,sortKey:0,state:Yn})}at&&Rt.sort((Et,Zt)=>Et.sortKey-Zt.sortKey);for(const Et of Rt){const{programConfiguration:Zt,program:Yt,layoutVertexBuffer:Xt,indexBuffer:hn,uniformValues:xn,terrainData:Nn}=Et.state,Dn=Et.segments;Yt.draw(ct,pt.TRIANGLES,xt,At,Tt,xi.disabled,xn,Nn,pe.id,Xt,hn,Dn,pe.paint,q.transform.zoom,Zt)}})(l,p,z,j);break;case"heatmap":Ll(l,p,z,j);break;case"line":(function(q,ie,pe,be){if(q.renderPass!=="translucent")return;const Ae=pe.paint.get("line-opacity"),Ne=pe.paint.get("line-width");if(Ae.constantOr(1)===0||Ne.constantOr(1)===0)return;const Ge=q.depthModeForSublayer(0,Zr.ReadOnly),at=q.colorModeForRenderPass(),ct=pe.paint.get("line-dasharray"),pt=pe.paint.get("line-pattern"),xt=pt.constantOr(1),At=pe.paint.get("line-gradient"),Tt=pe.getCrossfadeParameters(),Rt=xt?"linePattern":ct?"lineSDF":At?"lineGradient":"line",Et=q.context,Zt=Et.gl;let Yt=!0;for(const Xt of be){const hn=ie.getTile(Xt);if(xt&&!hn.patternsLoaded())continue;const xn=hn.getBucket(pe);if(!xn)continue;const Nn=xn.programConfigurations.get(pe.id),Dn=q.context.program.get(),Gn=q.useProgram(Rt,Nn),Yn=Yt||Gn.program!==Dn,ya=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Xt),ea=pt.constantOr(null);if(ea&&hn.imageAtlas){const Ta=hn.imageAtlas,fa=Ta.patternPositions[ea.to.toString()],Ia=Ta.patternPositions[ea.from.toString()];fa&&Ia&&Nn.setConstantPatternPositions(fa,Ia)}const wa=ya?Xt:null,ia=xt?Xn(q,hn,pe,Tt,wa):ct?ca(q,hn,pe,ct,Tt,wa):At?Tn(q,hn,pe,xn.lineClipsArray.length,wa):sn(q,hn,pe,wa);if(xt)Et.activeTexture.set(Zt.TEXTURE0),hn.imageAtlasTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE),Nn.updatePaintBuffers(Tt);else if(ct&&(Yn||q.lineAtlas.dirty))Et.activeTexture.set(Zt.TEXTURE0),q.lineAtlas.bind(Et);else if(At){const Ta=xn.gradients[pe.id];let fa=Ta.texture;if(pe.gradientVersion!==Ta.version){let Ia=256;if(pe.stepInterpolant){const qa=ie.getSource().maxzoom,Ma=Xt.canonical.z===qa?Math.ceil(1<<q.transform.maxZoom-Xt.canonical.z):1,Ga=xn.maxLineLength/n.X*1024*Ma;Ia=n.ad(n.aV(Ga),256,Et.maxTextureSize)}Ta.gradient=n.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Ia,image:Ta.gradient||void 0,clips:xn.lineClipsArray}),Ta.texture?Ta.texture.update(Ta.gradient):Ta.texture=new L(Et,Ta.gradient,Zt.RGBA),Ta.version=pe.gradientVersion,fa=Ta.texture}Et.activeTexture.set(Zt.TEXTURE0),fa.bind(pe.stepInterpolant?Zt.NEAREST:Zt.LINEAR,Zt.CLAMP_TO_EDGE)}Gn.draw(Et,Zt.TRIANGLES,Ge,q.stencilModeForClipping(Xt),at,xi.disabled,ia,ya,pe.id,xn.layoutVertexBuffer,xn.indexBuffer,xn.segments,pe.paint,q.transform.zoom,Nn,xn.layoutVertexBuffer2),Yt=!1}})(l,p,z,j);break;case"fill":(function(q,ie,pe,be){const Ae=pe.paint.get("fill-color"),Ne=pe.paint.get("fill-opacity");if(Ne.constantOr(1)===0)return;const Ge=q.colorModeForRenderPass(),at=pe.paint.get("fill-pattern"),ct=q.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Ae.constantOr(n.aN.transparent).a===1&&Ne.constantOr(0)===1?"opaque":"translucent";if(q.renderPass===ct){const pt=q.depthModeForSublayer(1,q.renderPass==="opaque"?Zr.ReadWrite:Zr.ReadOnly);Bc(q,ie,pe,be,pt,Ge,!1)}if(q.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const pt=q.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,Zr.ReadOnly);Bc(q,ie,pe,be,pt,Ge,!0)}})(l,p,z,j);break;case"fill-extrusion":(function(q,ie,pe,be){const Ae=pe.paint.get("fill-extrusion-opacity");if(Ae!==0&&q.renderPass==="translucent"){const Ne=new Zr(q.context.gl.LEQUAL,Zr.ReadWrite,q.depthRangeFor3D);if(Ae!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))wc(q,ie,pe,be,Ne,bi.disabled,Yi.disabled),wc(q,ie,pe,be,Ne,q.stencilModeFor3D(),q.colorModeForRenderPass());else{const Ge=q.colorModeForRenderPass();wc(q,ie,pe,be,Ne,bi.disabled,Ge)}}})(l,p,z,j);break;case"hillshade":(function(q,ie,pe,be){if(q.renderPass!=="offscreen"&&q.renderPass!=="translucent")return;const Ae=q.context,Ne=q.depthModeForSublayer(0,Zr.ReadOnly),Ge=q.colorModeForRenderPass(),[at,ct]=q.renderPass==="translucent"?q.stencilConfigForOverlap(be):[{},be];for(const pt of ct){const xt=ie.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&q.renderPass==="offscreen"?hu(q,xt,pe,Ne,bi.disabled,Ge):q.renderPass==="translucent"&&kc(q,pt,xt,pe,Ne,at[pt.overscaledZ],Ge)}Ae.viewport.set([0,0,q.width,q.height])})(l,p,z,j);break;case"raster":(function(q,ie,pe,be){if(q.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!be.length)return;const Ae=q.context,Ne=Ae.gl,Ge=ie.getSource(),at=q.useProgram("raster"),ct=q.colorModeForRenderPass(),[pt,xt]=Ge instanceof Be?[{},be]:q.stencilConfigForOverlap(be),At=xt[xt.length-1].overscaledZ,Tt=!q.options.moving;for(const Rt of xt){const Et=q.depthModeForSublayer(Rt.overscaledZ-At,pe.paint.get("raster-opacity")===1?Zr.ReadWrite:Zr.ReadOnly,Ne.LESS),Zt=ie.getTile(Rt);Zt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Yt=ie.findLoadedParent(Rt,0),Xt=ie.findLoadedSibling(Rt),hn=vs(Zt,Yt||Xt||null,ie,pe,q.transform,q.style.map.terrain);let xn,Nn;const Dn=pe.paint.get("raster-resampling")==="nearest"?Ne.NEAREST:Ne.LINEAR;Ae.activeTexture.set(Ne.TEXTURE0),Zt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),Ae.activeTexture.set(Ne.TEXTURE1),Yt?(Yt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),xn=Math.pow(2,Yt.tileID.overscaledZ-Zt.tileID.overscaledZ),Nn=[Zt.tileID.canonical.x*xn%1,Zt.tileID.canonical.y*xn%1]):Zt.texture.bind(Dn,Ne.CLAMP_TO_EDGE,Ne.LINEAR_MIPMAP_NEAREST),Zt.texture.useMipmap&&Ae.extTextureFilterAnisotropic&&q.transform.pitch>20&&Ne.texParameterf(Ne.TEXTURE_2D,Ae.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ae.extTextureFilterAnisotropicMax);const Gn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(Rt),Yn=Gn?Rt:null,ya=Yn?Yn.posMatrix:q.transform.calculatePosMatrix(Rt.toUnwrapped(),Tt),ea=Aa(ya,Nn||[0,0],xn||1,hn,pe);Ge instanceof Be?at.draw(Ae,Ne.TRIANGLES,Et,bi.disabled,ct,xi.disabled,ea,Gn,pe.id,Ge.boundsBuffer,q.quadTriangleIndexBuffer,Ge.boundsSegments):at.draw(Ae,Ne.TRIANGLES,Et,pt[Rt.overscaledZ],ct,xi.disabled,ea,Gn,pe.id,q.rasterBoundsBuffer,q.quadTriangleIndexBuffer,q.rasterBoundsSegments)}})(l,p,z,j);break;case"background":(function(q,ie,pe,be){const Ae=pe.paint.get("background-color"),Ne=pe.paint.get("background-opacity");if(Ne===0)return;const Ge=q.context,at=Ge.gl,ct=q.transform,pt=ct.tileSize,xt=pe.paint.get("background-pattern");if(q.isPatternMissing(xt))return;const At=!xt&&Ae.a===1&&Ne===1&&q.opaquePassEnabledForLayer()?"opaque":"translucent";if(q.renderPass!==At)return;const Tt=bi.disabled,Rt=q.depthModeForSublayer(0,At==="opaque"?Zr.ReadWrite:Zr.ReadOnly),Et=q.colorModeForRenderPass(),Zt=q.useProgram(xt?"backgroundPattern":"background"),Yt=be||ct.coveringTiles({tileSize:pt,terrain:q.style.map.terrain});xt&&(Ge.activeTexture.set(at.TEXTURE0),q.imageManager.bind(q.context));const Xt=pe.getCrossfadeParameters();for(const hn of Yt){const xn=be?hn.posMatrix:q.transform.calculatePosMatrix(hn.toUnwrapped()),Nn=xt?Ka(xn,Ne,q,xt,{tileID:hn,tileSize:pt},Xt):za(xn,Ne,Ae),Dn=q.style.map.terrain&&q.style.map.terrain.getTerrainData(hn);Zt.draw(Ge,at.TRIANGLES,Rt,Tt,Et,xi.disabled,Nn,Dn,pe.id,q.tileExtentBuffer,q.quadTriangleIndexBuffer,q.tileExtentSegments)}})(l,0,z,j);break;case"custom":(function(q,ie,pe){const be=q.context,Ae=pe.implementation;if(q.renderPass==="offscreen"){const Ne=Ae.prerender;Ne&&(q.setCustomLayerDefaults(),be.setColorMode(q.colorModeForRenderPass()),Ne.call(Ae,be.gl,q.transform.customLayerMatrix()),be.setDirty(),q.setBaseState())}else if(q.renderPass==="translucent"){q.setCustomLayerDefaults(),be.setColorMode(q.colorModeForRenderPass()),be.setStencilMode(bi.disabled);const Ne=Ae.renderingMode==="3d"?new Zr(q.context.gl.LEQUAL,Zr.ReadWrite,q.depthRangeFor3D):q.depthModeForSublayer(0,Zr.ReadOnly);be.setDepthMode(Ne),Ae.render(be.gl,q.transform.customLayerMatrix(),{farZ:q.transform.farZ,nearZ:q.transform.nearZ,fov:q.transform._fov,modelViewProjectionMatrix:q.transform.modelViewProjectionMatrix,projectionMatrix:q.transform.projectionMatrix}),be.setDirty(),q.setBaseState(),be.bindFramebuffer.set(null)}})(l,0,z)}}translatePosMatrix(l,p,z,j,q){if(!z[0]&&!z[1])return l;const ie=q?j==="map"?this.transform.angle:0:j==="viewport"?-this.transform.angle:0;if(ie){const Ae=Math.sin(ie),Ne=Math.cos(ie);z=[z[0]*Ne-z[1]*Ae,z[0]*Ae+z[1]*Ne]}const pe=[q?z[0]:St(p,z[0],this.transform.zoom),q?z[1]:St(p,z[1],this.transform.zoom),0],be=new Float32Array(16);return n.J(be,l,pe),be}saveTileTexture(l){const p=this._tileTextures[l.size[0]];p?p.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const p=this._tileTextures[l];return p&&p.length>0?p.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const p=this.imageManager.getPattern(l.from.toString()),z=this.imageManager.getPattern(l.to.toString());return!p||!z}useProgram(l,p){this.cache=this.cache||{};const z=l+(p?p.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[z]||(this.cache[z]=new na(this.context,ba[l],p,$a[l],this._showOverdrawInspector,this.style.map.terrain)),this.cache[z]}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 l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const l=this.context.gl;this.debugOverlayTexture=new L(this.context,this.debugOverlayCanvas,l.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:l,drawingBufferHeight:p}=this.context.gl;return this.width!==l||this.height!==p}}class zs{constructor(l,p){this.points=l,this.planes=p}static fromInvProjectionMatrix(l,p,z){const j=Math.pow(2,z),q=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(pe=>{const be=1/(pe=n.ag([],pe,l))[3]/p*j;return n.b1(pe,pe,[be,be,1/pe[3],be])}),ie=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const be=function(at,ct){var pt=ct[0],xt=ct[1],At=ct[2],Tt=pt*pt+xt*xt+At*At;return Tt>0&&(Tt=1/Math.sqrt(Tt)),at[0]=ct[0]*Tt,at[1]=ct[1]*Tt,at[2]=ct[2]*Tt,at}([],function(at,ct,pt){var xt=ct[0],At=ct[1],Tt=ct[2],Rt=pt[0],Et=pt[1],Zt=pt[2];return at[0]=At*Zt-Tt*Et,at[1]=Tt*Rt-xt*Zt,at[2]=xt*Et-At*Rt,at}([],B([],q[pe[0]],q[pe[1]]),B([],q[pe[2]],q[pe[1]]))),Ae=(Ne=be,Ge=q[pe[1]],-(Ne[0]*Ge[0]+Ne[1]*Ge[1]+Ne[2]*Ge[2]));var Ne,Ge;return be.concat(Ae)});return new zs(q,ie)}}class bs{constructor(l,p){this.min=l,this.max=p,this.center=function(z,j,q){return z[0]=j[0]*q,z[1]=j[1]*q,z[2]=j[2]*q,z}([],function(z,j,q){return z[0]=j[0]+q[0],z[1]=j[1]+q[1],z[2]=j[2]+q[2],z}([],this.min,this.max),.5)}quadrant(l){const p=[l%2==0,l<2],z=C(this.min),j=C(this.max);for(let q=0;q<p.length;q++)z[q]=p[q]?this.min[q]:this.center[q],j[q]=p[q]?this.center[q]:this.max[q];return j[2]=this.max[2],new bs(z,j)}distanceX(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]}distanceY(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]}intersects(l){const p=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let z=!0;for(let j=0;j<l.planes.length;j++){const q=l.planes[j];let ie=0;for(let pe=0;pe<p.length;pe++)n.b2(q,p[pe])>=0&&ie++;if(ie===0)return 0;ie!==p.length&&(z=!1)}if(z)return 2;for(let j=0;j<3;j++){let q=Number.MAX_VALUE,ie=-Number.MAX_VALUE;for(let pe=0;pe<l.points.length;pe++){const be=l.points[pe][j]-this.min[j];q=Math.min(q,be),ie=Math.max(ie,be)}if(ie<0||q>this.max[j]-this.min[j])return 0}return 1}}class zl{constructor(l=0,p=0,z=0,j=0){if(isNaN(l)||l<0||isNaN(p)||p<0||isNaN(z)||z<0||isNaN(j)||j<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=p,this.left=z,this.right=j}interpolate(l,p,z){return p.top!=null&&l.top!=null&&(this.top=n.z.number(l.top,p.top,z)),p.bottom!=null&&l.bottom!=null&&(this.bottom=n.z.number(l.bottom,p.bottom,z)),p.left!=null&&l.left!=null&&(this.left=n.z.number(l.left,p.left,z)),p.right!=null&&l.right!=null&&(this.right=n.z.number(l.right,p.right,z)),this}getCenter(l,p){const z=n.ad((this.left+l-this.right)/2,0,l),j=n.ad((this.top+p-this.bottom)/2,0,p);return new n.P(z,j)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new zl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Tc=85.051129;class di{constructor(l,p,z,j,q){this.tileSize=512,this._renderWorldCopies=q===void 0||!!q,this._minZoom=l||0,this._maxZoom=p||22,this._minPitch=z??0,this._maxPitch=j??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new n.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new zl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const l=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return l.apply(this),l}apply(l){this.tileSize=l.tileSize,this.latRange=l.latRange,this.width=l.width,this.height=l.height,this._center=l._center,this._elevation=l._elevation,this.minElevationForCurrentTile=l.minElevationForCurrentTile,this.zoom=l.zoom,this.angle=l.angle,this._fov=l._fov,this._pitch=l._pitch,this._unmodified=l._unmodified,this._edgeInsets=l._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))}get maxZoom(){return this._maxZoom}set maxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))}get minPitch(){return this._minPitch}set minPitch(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))}get maxPitch(){return this._maxPitch}set maxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new n.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(l){const p=-n.b3(l,-180,180)*Math.PI/180;this.angle!==p&&(this._unmodified=!1,this.angle=p,this._calcMatrices(),this.rotationMatrix=function(){var z=new n.A(4);return n.A!=Float32Array&&(z[1]=0,z[2]=0),z[0]=1,z[3]=1,z}(),function(z,j,q){var ie=j[0],pe=j[1],be=j[2],Ae=j[3],Ne=Math.sin(q),Ge=Math.cos(q);z[0]=ie*Ge+be*Ne,z[1]=pe*Ge+Ae*Ne,z[2]=ie*-Ne+be*Ge,z[3]=pe*-Ne+Ae*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(l){const p=n.ad(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==p&&(this._unmodified=!1,this._pitch=p,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=l/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(l){const p=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==p&&(this._unmodified=!1,this._zoom=p,this.tileZoom=Math.max(0,Math.floor(p)),this.scale=this.zoomScale(p),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(l){l!==this._elevation&&(this._elevation=l,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(l){return this._edgeInsets.equals(l)}interpolatePadding(l,p,z){this._unmodified=!1,this._edgeInsets.interpolate(l,p,z),this._constrain(),this._calcMatrices()}coveringZoomLevel(l){const p=(l.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/l.tileSize));return Math.max(0,p)}getVisibleUnwrappedCoordinates(l){const p=[new n.b4(0,l)];if(this._renderWorldCopies){const z=this.pointCoordinate(new n.P(0,0)),j=this.pointCoordinate(new n.P(this.width,0)),q=this.pointCoordinate(new n.P(this.width,this.height)),ie=this.pointCoordinate(new n.P(0,this.height)),pe=Math.floor(Math.min(z.x,j.x,q.x,ie.x)),be=Math.floor(Math.max(z.x,j.x,q.x,ie.x)),Ae=1;for(let Ne=pe-Ae;Ne<=be+Ae;Ne++)Ne!==0&&p.push(new n.b4(Ne,l))}return p}coveringTiles(l){var p,z;let j=this.coveringZoomLevel(l);const q=j;if(l.minzoom!==void 0&&j<l.minzoom)return[];l.maxzoom!==void 0&&j>l.maxzoom&&(j=l.maxzoom);const ie=this.pointCoordinate(this.getCameraPoint()),pe=n.Z.fromLngLat(this.center),be=Math.pow(2,j),Ae=[be*ie.x,be*ie.y,0],Ne=[be*pe.x,be*pe.y,0],Ge=zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,j);let at=l.minzoom||0;!l.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=j);const ct=l.terrain?2/Math.min(this.tileSize,l.tileSize)*this.tileSize:3,pt=Et=>({aabb:new bs([Et*be,0,0],[(Et+1)*be,be,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],At=[],Tt=j,Rt=l.reparseOverscaled?q:j;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Zt=Et.x,Yt=Et.y;let Xt=Et.fullyVisible;if(!Xt){const Yn=Et.aabb.intersects(Ge);if(Yn===0)continue;Xt=Yn===2}const hn=l.terrain?Ae:Ne,xn=Et.aabb.distanceX(hn),Nn=Et.aabb.distanceY(hn),Dn=Math.max(Math.abs(xn),Math.abs(Nn)),Gn=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Dn>Gn&&Et.zoom>=at){const Yn=Tt-Et.zoom,ya=Ae[0]-.5-(Zt<<Yn),ea=Ae[1]-.5-(Yt<<Yn);At.push({tileID:new n.S(Et.zoom===Tt?Rt:Et.zoom,Et.wrap,Et.zoom,Zt,Yt),distanceSq:E([Ne[0]-.5-Zt,Ne[1]-.5-Yt]),tileDistanceToCamera:Math.sqrt(ya*ya+ea*ea)})}else for(let Yn=0;Yn<4;Yn++){const ya=(Zt<<1)+Yn%2,ea=(Yt<<1)+(Yn>>1),wa=Et.zoom+1;let ia=Et.aabb.quadrant(Yn);if(l.terrain){const Ta=new n.S(wa,Et.wrap,wa,ya,ea),fa=l.terrain.getMinMaxElevation(Ta),Ia=(p=fa.minElevation)!==null&&p!==void 0?p:this.elevation,qa=(z=fa.maxElevation)!==null&&z!==void 0?z:this.elevation;ia=new bs([ia.min[0],ia.min[1],Ia],[ia.max[0],ia.max[1],qa])}xt.push({aabb:ia,zoom:wa,x:ya,y:ea,wrap:Et.wrap,fullyVisible:Xt})}}return At.sort((Et,Zt)=>Et.distanceSq-Zt.distanceSq).map(Et=>Et.tileID)}resize(l,p){this.width=l,this.height=p,this.pixelsToGLUnits=[2/l,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(l){return Math.pow(2,l)}scaleZoom(l){return Math.log(l)/Math.LN2}project(l){const p=n.ad(l.lat,-85.051129,Tc);return new n.P(n.O(l.lng)*this.worldSize,n.Q(p)*this.worldSize)}unproject(l){return new n.Z(l.x/this.worldSize,l.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(l){const p=this.elevation,z=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,j=this.pointLocation(this.centerPoint,l),q=l.getElevationForLngLatZoom(j,this.tileZoom);if(!(this.elevation-q))return;const ie=z+p-q,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/ie/n.b5(1,j.lat)/this.tileSize,be=this.scaleZoom(pe);this._elevation=q,this._center=j,this.zoom=be}setLocationAtPoint(l,p){const z=this.pointCoordinate(p),j=this.pointCoordinate(this.centerPoint),q=this.locationCoordinate(l),ie=new n.Z(q.x-(z.x-j.x),q.y-(z.y-j.y));this.center=this.coordinateLocation(ie),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(l,p){return p?this.coordinatePoint(this.locationCoordinate(l),p.getElevationForLngLatZoom(l,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(l))}pointLocation(l,p){return this.coordinateLocation(this.pointCoordinate(l,p))}locationCoordinate(l){return n.Z.fromLngLat(l)}coordinateLocation(l){return l&&l.toLngLat()}pointCoordinate(l,p){if(p){const pt=p.pointCoordinate(l);if(pt!=null)return pt}const z=[l.x,l.y,0,1],j=[l.x,l.y,1,1];n.ag(z,z,this.pixelMatrixInverse),n.ag(j,j,this.pixelMatrixInverse);const q=z[3],ie=j[3],pe=z[0]/q,be=j[0]/ie,Ae=z[1]/q,Ne=j[1]/ie,Ge=z[2]/q,at=j[2]/ie,ct=Ge===at?0:(0-Ge)/(at-Ge);return new n.Z(n.z.number(pe,be,ct)/this.worldSize,n.z.number(Ae,Ne,ct)/this.worldSize)}coordinatePoint(l,p=0,z=this.pixelMatrix){const j=[l.x*this.worldSize,l.y*this.worldSize,p,1];return n.ag(j,j,z),new n.P(j[0]/j[3],j[1]/j[3])}getBounds(){const l=Math.max(0,this.height/2-this.getHorizon());return new Te().extend(this.pointLocation(new n.P(0,l))).extend(this.pointLocation(new n.P(this.width,l))).extend(this.pointLocation(new n.P(this.width,this.height))).extend(this.pointLocation(new n.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Te([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(l){l?(this.lngRange=[l.getWest(),l.getEast()],this.latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(l){const p=l.canonical,z=this.worldSize/this.zoomScale(p.z),j=p.x+Math.pow(2,p.z)*l.wrap,q=n.ao(new Float64Array(16));return n.J(q,q,[j*z,p.y*z,0]),n.K(q,q,[z/n.X,z/n.X,1]),q}calculatePosMatrix(l,p=!1){const z=l.key,j=p?this._alignedPosMatrixCache:this._posMatrixCache;if(j[z])return j[z];const q=this.calculateTileMatrix(l);return n.L(q,p?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,q),j[z]=new Float32Array(q),j[z]}calculateFogMatrix(l){const p=l.key,z=this._fogMatrixCache;if(z[p])return z[p];const j=this.calculateTileMatrix(l);return n.L(j,this.fogMatrix,j),z[p]=new Float32Array(j),z[p]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(l,p){p=n.ad(+p,this.minZoom,this.maxZoom);const z={center:new n.N(l.lng,l.lat),zoom:p};let j=this.lngRange;if(!this._renderWorldCopies&&j===null){const Et=179.9999999999;j=[-Et,Et]}const q=this.tileSize*this.zoomScale(z.zoom);let ie=0,pe=q,be=0,Ae=q,Ne=0,Ge=0;const{x:at,y:ct}=this.size;if(this.latRange){const Et=this.latRange;ie=n.Q(Et[1])*q,pe=n.Q(Et[0])*q,pe-ie<ct&&(Ne=ct/(pe-ie))}j&&(be=n.b3(n.O(j[0])*q,0,q),Ae=n.b3(n.O(j[1])*q,0,q),Ae<be&&(Ae+=q),Ae-be<at&&(Ge=at/(Ae-be)));const{x:pt,y:xt}=this.project.call({worldSize:q},l);let At,Tt;const Rt=Math.max(Ge||0,Ne||0);if(Rt){const Et=new n.P(Ge?(Ae+be)/2:pt,Ne?(pe+ie)/2:xt);return z.center=this.unproject.call({worldSize:q},Et).wrap(),z.zoom+=this.scaleZoom(Rt),z}if(this.latRange){const Et=ct/2;xt-Et<ie&&(Tt=ie+Et),xt+Et>pe&&(Tt=pe-Et)}if(j){const Et=(be+Ae)/2;let Zt=pt;this._renderWorldCopies&&(Zt=n.b3(pt,Et-q/2,Et+q/2));const Yt=at/2;Zt-Yt<be&&(At=be+Yt),Zt+Yt>Ae&&(At=Ae-Yt)}if(At!==void 0||Tt!==void 0){const Et=new n.P(At??pt,Tt??xt);z.center=this.unproject.call({worldSize:q},Et).wrap()}return z}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const l=this._unmodified,{center:p,zoom:z}=this.getConstrained(this.center,this.zoom);this.center=p,this.zoom=z,this._unmodified=l,this._constraining=!1}_calcMatrices(){if(!this.height)return;const l=this._fov/2,p=this.centerOffset,z=this.point.x,j=this.point.y;this.cameraToCenterDistance=.5/Math.tan(l)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let q=n.ao(new Float64Array(16));n.K(q,q,[this.width/2,-this.height/2,1]),n.J(q,q,[1,-1,0]),this.labelPlaneMatrix=q,q=n.ao(new Float64Array(16)),n.K(q,q,[1,-1,1]),n.J(q,q,[-1,-1,0]),n.K(q,q,[2/this.width,2/this.height,1]),this.glCoordMatrix=q;const ie=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),be=ie-pe*this._pixelPerMeter/Math.cos(this._pitch),Ae=pe<0?be:ie,Ne=Math.PI/2+this._pitch,Ge=this._fov*(.5+p.y/this.height),at=Math.sin(Ge)*Ae/Math.sin(n.ad(Math.PI-Ne-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+p.y/(2*ct)),xt=Math.sin(pt)*Ae/Math.sin(n.ad(Math.PI-Ne-pt,.01,Math.PI-.01)),At=Math.min(at,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*At+Ae),this.nearZ=this.height/50,q=new Float64Array(16),n.b6(q,this._fov,this.width/this.height,this.nearZ,this.farZ),q[8]=2*-p.x/this.width,q[9]=2*p.y/this.height,this.projectionMatrix=n.af(q),n.K(q,q,[1,-1,1]),n.J(q,q,[0,0,-this.cameraToCenterDistance]),n.b7(q,q,this._pitch),n.ae(q,q,this.angle),n.J(q,q,[-z,-j,0]),this.mercatorMatrix=n.K([],q,[this.worldSize,this.worldSize,this.worldSize]),n.K(q,q,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,q),n.J(q,q,[0,0,-this.elevation]),this.modelViewProjectionMatrix=q,this.invModelViewProjectionMatrix=n.at([],q),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,ie,this.farZ),this.fogMatrix[8]=2*-p.x/this.width,this.fogMatrix[9]=2*p.y/this.height,n.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),n.b7(this.fogMatrix,this.fogMatrix,this._pitch),n.ae(this.fogMatrix,this.fogMatrix,this.angle),n.J(this.fogMatrix,this.fogMatrix,[-z,-j,0]),n.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=n.L(new Float64Array(16),this.labelPlaneMatrix,q);const Tt=this.width%2/2,Rt=this.height%2/2,Et=Math.cos(this.angle),Zt=Math.sin(this.angle),Yt=z-Math.round(z)+Et*Tt+Zt*Rt,Xt=j-Math.round(j)+Et*Rt+Zt*Tt,hn=new Float64Array(q);if(n.J(hn,hn,[Yt>.5?Yt-1:Yt,Xt>.5?Xt-1:Xt,0]),this.alignedModelViewProjectionMatrix=hn,q=n.at(new Float64Array(16),this.pixelMatrix),!q)throw new Error("failed to invert matrix");this.pixelMatrixInverse=q,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const l=this.pointCoordinate(new n.P(0,0)),p=[l.x*this.worldSize,l.y*this.worldSize,0,1];return n.ag(p,p,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const l=this._pitch,p=Math.tan(l)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,p))}getCameraQueryGeometry(l){const p=this.getCameraPoint();if(l.length===1)return[l[0],p];{let z=p.x,j=p.y,q=p.x,ie=p.y;for(const pe of l)z=Math.min(z,pe.x),j=Math.min(j,pe.y),q=Math.max(q,pe.x),ie=Math.max(ie,pe.y);return[new n.P(z,j),new n.P(q,j),new n.P(q,ie),new n.P(z,ie),new n.P(z,j)]}}lngLatToCameraDepth(l,p){const z=this.locationCoordinate(l),j=[z.x*this.worldSize,z.y*this.worldSize,p,1];return n.ag(j,j,this.modelViewProjectionMatrix),j[2]/j[3]}}function Ns(R,l){let p,z=!1,j=null,q=null;const ie=()=>{j=null,z&&(R.apply(q,p),j=setTimeout(ie,l),z=!1)};return(...pe)=>(z=!0,q=this,p=pe,j||ie(),j)}class Qi{constructor(l){this._getCurrentHash=()=>{const p=window.location.hash.replace("#","");if(this._hashName){let z;return p.split("&").map(j=>j.split("=")).forEach(j=>{j[0]===this._hashName&&(z=j)}),(z&&z[1]||"").split("/")}return p.split("/")},this._onHashChange=()=>{const p=this._getCurrentHash();if(p.length>=3&&!p.some(z=>isNaN(z))){const z=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(p[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+p[2],+p[1]],zoom:+p[0],bearing:z,pitch:+(p[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const p=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,p)},this._removeHash=()=>{const p=this._getCurrentHash();if(p.length===0)return;const z=p.join("/");let j=z;j.split("&").length>0&&(j=j.split("&")[0]),this._hashName&&(j=`${this._hashName}=${z}`);let q=window.location.hash.replace(j,"");q.startsWith("#&")?q=q.slice(0,1)+q.slice(2):q==="#"&&(q="");let ie=window.location.href.replace(/(#.+)?$/,q);ie=ie.replace("&&","&"),window.history.replaceState(window.history.state,null,ie)},this._updateHash=Ns(this._updateHashUnthrottled,300),this._hashName=l&&encodeURIComponent(l)}addTo(l){return this._map=l,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(l){const p=this._map.getCenter(),z=Math.round(100*this._map.getZoom())/100,j=Math.ceil((z*Math.LN2+Math.log(512/360/.5))/Math.LN10),q=Math.pow(10,j),ie=Math.round(p.lng*q)/q,pe=Math.round(p.lat*q)/q,be=this._map.getBearing(),Ae=this._map.getPitch();let Ne="";if(Ne+=l?`/${ie}/${pe}/${z}`:`${z}/${pe}/${ie}`,(be||Ae)&&(Ne+="/"+Math.round(10*be)/10),Ae&&(Ne+=`/${Math.round(Ae)}`),this._hashName){const Ge=this._hashName;let at=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(at=!0,`${xt}=${Ne}`):pt}).filter(pt=>pt);return at||ct.push(`${Ge}=${Ne}`),`#${ct.join("&")}`}return`#${Ne}`}}const jo={linearity:.3,easing:n.b8(0,0,.3,1)},li=n.e({deceleration:2500,maxSpeed:1400},jo),hi=n.e({deceleration:20,maxSpeed:1400},jo),xs=n.e({deceleration:1e3,maxSpeed:360},jo),Cc=n.e({deceleration:1e3,maxSpeed:90},jo);class cc{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,p=u.now();for(;l.length>0&&p-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,pan:new n.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:q}of this._inertiaBuffer)p.zoom+=q.zoomDelta||0,p.bearing+=q.bearingDelta||0,p.pitch+=q.pitchDelta||0,q.panDelta&&p.pan._add(q.panDelta),q.around&&(p.around=q.around),q.pinchAround&&(p.pinchAround=q.pinchAround);const z=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,j={};if(p.pan.mag()){const q=Zl(p.pan.mag(),z,n.e({},li,l||{}));j.offset=p.pan.mult(q.amount/p.pan.mag()),j.center=this._map.transform.center,ql(j,q)}if(p.zoom){const q=Zl(p.zoom,z,hi);j.zoom=this._map.transform.zoom+q.amount,ql(j,q)}if(p.bearing){const q=Zl(p.bearing,z,xs);j.bearing=this._map.transform.bearing+n.ad(q.amount,-179,179),ql(j,q)}if(p.pitch){const q=Zl(p.pitch,z,Cc);j.pitch=this._map.transform.pitch+q.amount,ql(j,q)}if(j.zoom||j.bearing){const q=p.pinchAround===void 0?p.around:p.pinchAround;j.around=q?this._map.unproject(q):this._map.getCenter()}return this.clear(),n.e(j,{noMoveStart:!0})}}function ql(R,l){(!R.duration||R.duration<l.duration)&&(R.duration=l.duration,R.easing=l.easing)}function Zl(R,l,p){const{maxSpeed:z,linearity:j,deceleration:q}=p,ie=n.ad(R*j/(l/1e3),-z,z),pe=Math.abs(ie)/(q*j);return{easing:p.easing,duration:1e3*pe,amount:ie*(pe/2)}}class To extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z,j={}){const q=r.mousePos(p.getCanvas(),z),ie=p.unproject(q);super(l,n.e({point:q,lngLat:ie,originalEvent:z},j)),this._defaultPrevented=!1,this.target=p}}class go extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z){const j=l==="touchend"?z.changedTouches:z.touches,q=r.touchPos(p.getCanvasContainer(),j),ie=q.map(be=>p.unproject(be)),pe=q.reduce((be,Ae,Ne,Ge)=>be.add(Ae.div(Ge.length)),new n.P(0,0));super(l,{points:q,point:pe,lngLats:ie,lngLat:p.unproject(pe),originalEvent:z}),this._defaultPrevented=!1}}class Js extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(l,p,z){super(l,{originalEvent:z}),this._defaultPrevented=!1}}class uc{constructor(l,p){this._map=l,this._clickTolerance=p.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new Js(l.type,this._map,l))}mousedown(l,p){return this._mousedownPos=p,this._firePreventable(new To(l.type,this._map,l))}mouseup(l){this._map.fire(new To(l.type,this._map,l))}click(l,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||this._map.fire(new To(l.type,this._map,l))}dblclick(l){return this._firePreventable(new To(l.type,this._map,l))}mouseover(l){this._map.fire(new To(l.type,this._map,l))}mouseout(l){this._map.fire(new To(l.type,this._map,l))}touchstart(l){return this._firePreventable(new go(l.type,this._map,l))}touchmove(l){this._map.fire(new go(l.type,this._map,l))}touchend(l){this._map.fire(new go(l.type,this._map,l))}touchcancel(l){this._map.fire(new go(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Io{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new To(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new To("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new To(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ti{constructor(l){this._map=l}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(l){return this.transform.pointLocation(n.P.convert(l),this._map.terrain)}}class yo{constructor(l,p){this._map=l,this._tr=new Ti(l),this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=p.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,p){this.isEnabled()&&l.shiftKey&&l.button===0&&(r.disableDrag(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(l,p){if(!this._active)return;const z=p;if(this._lastPos.equals(z)||!this._box&&z.dist(this._startPos)<this._clickTolerance)return;const j=this._startPos;this._lastPos=z,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",l));const q=Math.min(j.x,z.x),ie=Math.max(j.x,z.x),pe=Math.min(j.y,z.y),be=Math.max(j.y,z.y);r.setTransform(this._box,`translate(${q}px,${pe}px)`),this._box.style.width=ie-q+"px",this._box.style.height=be-pe+"px"}mouseupWindow(l,p){if(!this._active||l.button!==0)return;const z=this._startPos,j=p;if(this.reset(),r.suppressClick(),z.x!==j.x||z.y!==j.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:l})),{cameraAnimation:q=>q.fitScreenCoordinates(z,j,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",l)}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(l,p){return this._map.fire(new n.k(l,{originalEvent:p}))}}function gi(R,l){if(R.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${l.length}`);const p={};for(let z=0;z<R.length;z++)p[R[z].identifier]=l[z];return p}class eo{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,p,z){(this.centroid||z.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),z.length===this.numTouches&&(this.centroid=function(j){const q=new n.P(0,0);for(const ie of j)q._add(ie);return q.div(j.length)}(p),this.touches=gi(z,p)))}touchmove(l,p,z){if(this.aborted||!this.centroid)return;const j=gi(z,p);for(const q in this.touches){const ie=this.touches[q],pe=j[q];(!pe||pe.dist(ie)>30)&&(this.aborted=!0)}}touchend(l,p,z){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),z.length===0){const j=!this.aborted&&this.centroid;if(this.reset(),j)return j}}}class yi{constructor(l){this.singleTap=new eo(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,p,z){this.singleTap.touchstart(l,p,z)}touchmove(l,p,z){this.singleTap.touchmove(l,p,z)}touchend(l,p,z){const j=this.singleTap.touchend(l,p,z);if(j){const q=l.timeStamp-this.lastTime<500,ie=!this.lastTap||this.lastTap.dist(j)<30;if(q&&ie||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=j,this.count===this.numTaps)return this.reset(),j}}}class so{constructor(l){this._tr=new Ti(l),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,p,z){this._zoomIn.touchstart(l,p,z),this._zoomOut.touchstart(l,p,z)}touchmove(l,p,z){this._zoomIn.touchmove(l,p,z),this._zoomOut.touchmove(l,p,z)}touchend(l,p,z){const j=this._zoomIn.touchend(l,p,z),q=this._zoomOut.touchend(l,p,z),ie=this._tr;return j?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom+1,around:ie.unproject(j)},{originalEvent:l})}):q?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:ie.zoom-1,around:ie.unproject(q)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class vo{constructor(l){this._enabled=!!l.enable,this._moveStateManager=l.moveStateManager,this._clickTolerance=l.clickTolerance||1,this._moveFunction=l.move,this._activateOnStart=!!l.activateOnStart,l.assignEvents(this),this.reset()}reset(l){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(l)}_move(...l){const p=this._moveFunction(...l);if(p.bearingDelta||p.pitchDelta||p.around||p.panDelta)return this._active=!0,p}dragStart(l,p){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(l)&&(this._moveStateManager.startMove(l),this._lastPoint=p.length?p[0]:p,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(l,p){if(!this.isEnabled())return;const z=this._lastPoint;if(!z)return;if(l.preventDefault(),!this._moveStateManager.isValidMoveEvent(l))return void this.reset(l);const j=p.length?p[0]:p;return!this._moved&&j.dist(z)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=j,this._move(z,j))}dragEnd(l){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(l)&&(this._moved&&r.suppressClick(),this.reset(l))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Ks={0:1,2:2};class es{constructor(l){this._correctEvent=l.checkCorrectEvent}startMove(l){const p=r.mouseButton(l);this._eventButton=p}endMove(l){delete this._eventButton}isValidStartEvent(l){return this._correctEvent(l)}isValidMoveEvent(l){return!function(p,z){const j=Ks[z];return p.buttons===void 0||(p.buttons&j)!==j}(l,this._eventButton)}isValidEndEvent(l){return r.mouseButton(l)===this._eventButton}}class Nl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(l){return l.targetTouches.length===1}_isSameTouchEvent(l){return l.targetTouches[0].identifier===this._firstTouch}startMove(l){const p=l.targetTouches[0].identifier;this._firstTouch=p}endMove(l){delete this._firstTouch}isValidStartEvent(l){return this._isOneFingerTouch(l)}isValidMoveEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}isValidEndEvent(l){return this._isOneFingerTouch(l)&&this._isSameTouchEvent(l)}}const Co=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=l=>{l.preventDefault()}},Xl=({enable:R,clickTolerance:l,bearingDegreesPerPixelMoved:p=.8})=>{const z=new es({checkCorrectEvent:j=>r.mouseButton(j)===0&&j.ctrlKey||r.mouseButton(j)===2});return new vo({clickTolerance:l,move:(j,q)=>({bearingDelta:(q.x-j.x)*p}),moveStateManager:z,enable:R,assignEvents:Co})},Ys=({enable:R,clickTolerance:l,pitchDegreesPerPixelMoved:p=-.5})=>{const z=new es({checkCorrectEvent:j=>r.mouseButton(j)===0&&j.ctrlKey||r.mouseButton(j)===2});return new vo({clickTolerance:l,move:(j,q)=>({pitchDelta:(q.y-j.y)*p}),moveStateManager:z,enable:R,assignEvents:Co})};class ws{constructor(l,p){this._clickTolerance=l.clickTolerance||1,this._map=p,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(l){return l<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(l,p,z){return this._calculateTransform(l,p,z)}touchmove(l,p,z){if(this._active){if(!this._shouldBePrevented(z.length))return l.preventDefault(),this._calculateTransform(l,p,z);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",l)}}touchend(l,p,z){this._calculateTransform(l,p,z),this._active&&this._shouldBePrevented(z.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,p,z){z.length>0&&(this._active=!0);const j=gi(z,p),q=new n.P(0,0),ie=new n.P(0,0);let pe=0;for(const Ae in j){const Ne=j[Ae],Ge=this._touches[Ae];Ge&&(q._add(Ne),ie._add(Ne.sub(Ge)),pe++,j[Ae]=Ne)}if(this._touches=j,this._shouldBePrevented(pe)||!ie.mag())return;const be=ie.div(pe);return this._sum._add(be),this._sum.mag()<this._clickTolerance?void 0:{around:q.div(pe),panDelta:be}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class lo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(l,p,z){this._firstTwoTouches||z.length<2||(this._firstTwoTouches=[z[0].identifier,z[1].identifier],this._start([p[0],p[1]]))}touchmove(l,p,z){if(!this._firstTwoTouches)return;l.preventDefault();const[j,q]=this._firstTwoTouches,ie=vi(z,p,j),pe=vi(z,p,q);if(!ie||!pe)return;const be=this._aroundCenter?null:ie.add(pe).div(2);return this._move([ie,pe],be,l)}touchend(l,p,z){if(!this._firstTwoTouches)return;const[j,q]=this._firstTwoTouches,ie=vi(z,p,j),pe=vi(z,p,q);ie&&pe||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,l,p){for(let z=0;z<R.length;z++)if(R[z].identifier===p)return l[z]}function ks(R,l){return Math.log(R/l)/Math.LN2}class sr extends lo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,p){const z=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(ks(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ks(this._distance,z),pinchAround:p}}}function Ec(R,l){return 180*R.angleWith(l)/Math.PI}class qc extends lo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,p,z){const j=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ec(this._vector,j),pinchAround:p}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const p=25/(Math.PI*this._minDiameter)*360,z=Ec(l,this._startVector);return Math.abs(z)<p}}function Qs(R){return Math.abs(R.y)>Math.abs(R.x)}class Dl extends lo{constructor(l){super(),this._currentTouchCount=0,this._map=l}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(l,p,z){super.touchstart(l,p,z),this._currentTouchCount=z.length}_start(l){this._lastPoints=l,Qs(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,p,z){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const j=l[0].sub(this._lastPoints[0]),q=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(j,q,z.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(j.y+q.y)/2*-.5}):void 0}gestureBeginsVertically(l,p,z){if(this._valid!==void 0)return this._valid;const j=l.mag()>=2,q=p.mag()>=2;if(!j&&!q)return;if(!j||!q)return this._firstMove===void 0&&(this._firstMove=z),z-this._firstMove<100&&void 0;const ie=l.y>0==p.y>0;return Qs(l)&&Qs(p)&&ie}}const Sl={panStep:100,bearingStep:15,pitchStep:10};class dc{constructor(l){this._tr=new Ti(l);const p=Sl;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let p=0,z=0,j=0,q=0,ie=0;switch(l.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:l.shiftKey?z=-1:(l.preventDefault(),q=-1);break;case 39:l.shiftKey?z=1:(l.preventDefault(),q=1);break;case 38:l.shiftKey?j=1:(l.preventDefault(),ie=-1);break;case 40:l.shiftKey?j=-1:(l.preventDefault(),ie=1);break;default:return}return this._rotationDisabled&&(z=0,j=0),{cameraAnimation:pe=>{const be=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:Wa,zoom:p?Math.round(be.zoom)+p*(l.shiftKey?2:1):be.zoom,bearing:be.bearing+z*this._bearingStep,pitch:be.pitch+j*this._pitchStep,offset:[-q*this._panStep,-ie*this._panStep],center:be.center},{originalEvent:l})}}}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 Wa(R){return R*(2-R)}const ts=4.000244140625;class el{constructor(l,p){this._onTimeout=z=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(z)},this._map=l,this._tr=new Ti(l),this._triggerRenderFrame=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!l&&l.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(l){return!!this._map.cooperativeGestures.isEnabled()&&!(l.ctrlKey||this._map.cooperativeGestures.isBypassed(l))}wheel(l){if(!this.isEnabled())return;if(this._shouldBePrevented(l))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",l);let p=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const z=u.now(),j=z-(this._lastWheelEventTime||0);this._lastWheelEventTime=z,p!==0&&p%ts==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":j>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(j*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),l.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=l,this._delta-=p,this._active||this._start(l)),l.preventDefault()}_start(l){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 p=r.mousePos(this._map.getCanvas(),l),z=this._tr;p.y>z.transform.height/2-z.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?z.center:z.unproject(p)):this._around=n.N.convert(z.center),this._aroundPoint=z.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const l=this._tr.transform;if(this._delta!==0){const be=this._type==="wheel"&&Math.abs(this._delta)>ts?this._wheelZoomRate:this._defaultZoomRate;let Ae=2/(1+Math.exp(-Math.abs(this._delta*be)));this._delta<0&&Ae!==0&&(Ae=1/Ae);const Ne=typeof this._targetZoom=="number"?l.zoomScale(this._targetZoom):l.scale;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(Ne*Ae))),this._type==="wheel"&&(this._startZoom=l.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const p=typeof this._targetZoom=="number"?this._targetZoom:l.zoom,z=this._startZoom,j=this._easing;let q,ie=!1;const pe=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&z&&j&&pe){const be=Math.min(pe/200,1),Ae=j(be);q=n.z.number(z,p,Ae),be<1?this._frameId||(this._frameId=!0):ie=!0}else q=p,ie=!0;return this._active=!0,ie&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ie,zoomDelta:q-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let p=n.b9;if(this._prevEase){const z=this._prevEase,j=(u.now()-z.start)/z.duration,q=z.easing(j+.01)-z.easing(j),ie=.27/Math.sqrt(q*q+1e-4)*.01,pe=Math.sqrt(.0729-ie*ie);p=n.b8(ie,pe,.25,1)}return this._prevEase={start:u.now(),duration:l,easing:p},p}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ci{constructor(l,p){this._clickZoom=l,this._tapZoom=p}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 $o{constructor(l){this._tr=new Ti(l),this.reset()}reset(){this._active=!1}dblclick(l,p){return l.preventDefault(),{cameraAnimation:z=>{z.easeTo({duration:300,zoom:this._tr.zoom+(l.shiftKey?-1:1),around:this._tr.unproject(p)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class tl{constructor(){this._tap=new yi({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(l,p,z){if(!this._swipePoint)if(this._tapTime){const j=p[0],q=l.timeStamp-this._tapTime<500,ie=this._tapPoint.dist(j)<30;q&&ie?z.length>0&&(this._swipePoint=j,this._swipeTouch=z[0].identifier):this.reset()}else this._tap.touchstart(l,p,z)}touchmove(l,p,z){if(this._tapTime){if(this._swipePoint){if(z[0].identifier!==this._swipeTouch)return;const j=p[0],q=j.y-this._swipePoint.y;return this._swipePoint=j,l.preventDefault(),this._active=!0,{zoomDelta:q/128}}}else this._tap.touchmove(l,p,z)}touchend(l,p,z){if(this._tapTime)this._swipePoint&&z.length===0&&this.reset();else{const j=this._tap.touchend(l,p,z);j&&(this._tapTime=l.timeStamp,this._tapPoint=j)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(l,p,z){this._el=l,this._mousePan=p,this._touchPan=z}enable(l){this._inertiaOptions=l||{},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 Po{constructor(l,p,z){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=p,this._mousePitch=z}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class nl{constructor(l,p,z,j){this._el=l,this._touchZoom=p,this._touchRotate=z,this._tapDragZoom=j,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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 ls{constructor(l,p){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=l,this._options=p,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const l=this._map.getCanvasContainer();l.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",l);let p=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(p=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const z=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),j=document.createElement("div");j.className="maplibregl-desktop-message",j.textContent=p,this._container.appendChild(j);const q=document.createElement("div");q.className="maplibregl-mobile-message",q.textContent=z,this._container.appendChild(q),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.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(l){return l[this._bypassKey]}notifyGestureBlocked(l,p){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:l,originalEvent:p})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Uo=R=>R.zoom||R.drag||R.pitch||R.rotate;class Ts extends n.k{}function ar(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ri{constructor(l,p){this.handleWindowEvent=j=>{this.handleEvent(j,`${j.type}Window`)},this.handleEvent=(j,q)=>{if(j.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ie=j.type==="renderFrame"?void 0:j,pe={needsRenderFrame:!1},be={},Ae={},Ne=j.touches,Ge=Ne?this._getMapTouches(Ne):void 0,at=Ge?r.touchPos(this._map.getCanvas(),Ge):r.mousePos(this._map.getCanvas(),j);for(const{handlerName:xt,handler:At,allowed:Tt}of this._handlers){if(!At.isEnabled())continue;let Rt;this._blockedByActive(Ae,Tt,xt)?At.reset():At[q||j.type]&&(Rt=At[q||j.type](j,at,Ge),this.mergeHandlerResult(pe,be,Rt,xt,ie),Rt&&Rt.needsRenderFrame&&this._triggerRenderFrame()),(Rt||At.isActive())&&(Ae[xt]=At)}const ct={};for(const xt in this._previousActiveHandlers)Ae[xt]||(ct[xt]=ie);this._previousActiveHandlers=Ae,(Object.keys(ct).length||ar(pe))&&(this._changes.push([pe,be,ct]),this._triggerRenderFrame()),(Object.keys(Ae).length||ar(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=pe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new cc(l),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(p);const z=this._el;this._listeners=[[z,"touchstart",{passive:!0}],[z,"touchmove",{passive:!1}],[z,"touchend",void 0],[z,"touchcancel",void 0],[z,"mousedown",void 0],[z,"mousemove",void 0],[z,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[z,"mouseover",void 0],[z,"mouseout",void 0],[z,"dblclick",void 0],[z,"click",void 0],[z,"keydown",{capture:!1}],[z,"keyup",void 0],[z,"wheel",{passive:!1}],[z,"contextmenu",void 0],[window,"blur",void 0]];for(const[j,q,ie]of this._listeners)r.addEventListener(j,q,j===document?this.handleWindowEvent:this.handleEvent,ie)}destroy(){for(const[l,p,z]of this._listeners)r.removeEventListener(l,p,l===document?this.handleWindowEvent:this.handleEvent,z)}_addDefaultHandlers(l){const p=this._map,z=p.getCanvasContainer();this._add("mapEvent",new uc(p,l));const j=p.boxZoom=new yo(p,l);this._add("boxZoom",j),l.interactive&&l.boxZoom&&j.enable();const q=p.cooperativeGestures=new ls(p,l.cooperativeGestures);this._add("cooperativeGestures",q),l.cooperativeGestures&&q.enable();const ie=new so(p),pe=new $o(p);p.doubleClickZoom=new Ci(pe,ie),this._add("tapZoom",ie),this._add("clickZoom",pe),l.interactive&&l.doubleClickZoom&&p.doubleClickZoom.enable();const be=new tl;this._add("tapDragZoom",be);const Ae=p.touchPitch=new Dl(p);this._add("touchPitch",Ae),l.interactive&&l.touchPitch&&p.touchPitch.enable(l.touchPitch);const Ne=Xl(l),Ge=Ys(l);p.dragRotate=new Po(l,Ne,Ge),this._add("mouseRotate",Ne,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),l.interactive&&l.dragRotate&&p.dragRotate.enable();const at=(({enable:Rt,clickTolerance:Et})=>{const Zt=new es({checkCorrectEvent:Yt=>r.mouseButton(Yt)===0&&!Yt.ctrlKey});return new vo({clickTolerance:Et,move:(Yt,Xt)=>({around:Xt,panDelta:Xt.sub(Yt)}),activateOnStart:!0,moveStateManager:Zt,enable:Rt,assignEvents:Co})})(l),ct=new ws(l,p);p.dragPan=new Ss(z,at,ct),this._add("mousePan",at),this._add("touchPan",ct,["touchZoom","touchRotate"]),l.interactive&&l.dragPan&&p.dragPan.enable(l.dragPan);const pt=new qc,xt=new sr;p.touchZoomRotate=new nl(z,xt,pt,be),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),l.interactive&&l.touchZoomRotate&&p.touchZoomRotate.enable(l.touchZoomRotate);const At=p.scrollZoom=new el(p,()=>this._triggerRenderFrame());this._add("scrollZoom",At,["mousePan"]),l.interactive&&l.scrollZoom&&p.scrollZoom.enable(l.scrollZoom);const Tt=p.keyboard=new dc(p);this._add("keyboard",Tt),l.interactive&&l.keyboard&&p.keyboard.enable(),this._add("blockableMapEvent",new Io(p))}_add(l,p,z){this._handlers.push({handlerName:l,handler:p,allowed:z}),this._handlersById[l]=p}stop(l){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Uo(this._eventsInProgress)||this.isZooming()}_blockedByActive(l,p,z){for(const j in l)if(j!==z&&(!p||p.indexOf(j)<0))return!0;return!1}_getMapTouches(l){const p=[];for(const z of l){const j=z.target;this._el.contains(j)&&p.push(z)}return p}mergeHandlerResult(l,p,z,j,q){if(!z)return;n.e(l,z);const ie={handlerName:j,originalEvent:z.originalEvent||q};z.zoomDelta!==void 0&&(p.zoom=ie),z.panDelta!==void 0&&(p.drag=ie),z.pitchDelta!==void 0&&(p.pitch=ie),z.bearingDelta!==void 0&&(p.rotate=ie)}_applyChanges(){const l={},p={},z={};for(const[j,q,ie]of this._changes)j.panDelta&&(l.panDelta=(l.panDelta||new n.P(0,0))._add(j.panDelta)),j.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+j.zoomDelta),j.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+j.bearingDelta),j.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+j.pitchDelta),j.around!==void 0&&(l.around=j.around),j.pinchAround!==void 0&&(l.pinchAround=j.pinchAround),j.noInertia&&(l.noInertia=j.noInertia),n.e(p,q),n.e(z,ie);this._updateMapTransform(l,p,z),this._changes=[]}_updateMapTransform(l,p,z){const j=this._map,q=j._getTransformForUpdate(),ie=j.terrain;if(!(ar(l)||ie&&this._terrainMovement))return this._fireEvents(p,z,!0);let{panDelta:pe,zoomDelta:be,bearingDelta:Ae,pitchDelta:Ne,around:Ge,pinchAround:at}=l;at!==void 0&&(Ge=at),j._stop(!0),Ge=Ge||j.transform.centerPoint;const ct=q.pointLocation(pe?Ge.sub(pe):Ge);Ae&&(q.bearing+=Ae),Ne&&(q.pitch+=Ne),be&&(q.zoom+=be),ie?this._terrainMovement||!p.drag&&!p.zoom?p.drag&&this._terrainMovement?q.center=q.pointLocation(q.centerPoint.sub(pe)):q.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,q.setLocationAtPoint(ct,Ge)):q.setLocationAtPoint(ct,Ge),j._applyUpdatedTransform(q),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(p,z,!0)}_fireEvents(l,p,z){const j=Uo(this._eventsInProgress),q=Uo(l),ie={};for(const Ge in l){const{originalEvent:at}=l[Ge];this._eventsInProgress[Ge]||(ie[`${Ge}start`]=at),this._eventsInProgress[Ge]=l[Ge]}!j&&q&&this._fireEvent("movestart",q.originalEvent);for(const Ge in ie)this._fireEvent(Ge,ie[Ge]);q&&this._fireEvent("move",q.originalEvent);for(const Ge in l){const{originalEvent:at}=l[Ge];this._fireEvent(Ge,at)}const pe={};let be;for(const Ge in this._eventsInProgress){const{handlerName:at,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[at].isActive()||(delete this._eventsInProgress[Ge],be=p[at]||ct,pe[`${Ge}end`]=be)}for(const Ge in pe)this._fireEvent(Ge,pe[Ge]);const Ae=Uo(this._eventsInProgress),Ne=(j||q)&&!Ae;if(Ne&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(z&&Ne){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&u.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:be})),at(this._map.getBearing())&&this._map.resetNorth()):(at(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:be})),this._updatingCamera=!1}}_fireEvent(l,p){this._map.fire(new n.k(l,p?{originalEvent:p}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(l=>{delete this._frameId,this.handleEvent(new Ts("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class to extends n.E{constructor(l,p){super(),this._renderFrameCallback=()=>{const z=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(z)),z<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=p.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(l,p){return this.jumpTo({center:l},p)}panBy(l,p,z){return l=n.P.convert(l).mult(-1),this.panTo(this.transform.center,n.e({offset:l},p),z)}panTo(l,p,z){return this.easeTo(n.e({center:l},p),z)}getZoom(){return this.transform.zoom}setZoom(l,p){return this.jumpTo({zoom:l},p),this}zoomTo(l,p,z){return this.easeTo(n.e({zoom:l},p),z)}zoomIn(l,p){return this.zoomTo(this.getZoom()+1,l,p),this}zoomOut(l,p){return this.zoomTo(this.getZoom()-1,l,p),this}getBearing(){return this.transform.bearing}setBearing(l,p){return this.jumpTo({bearing:l},p),this}getPadding(){return this.transform.padding}setPadding(l,p){return this.jumpTo({padding:l},p),this}rotateTo(l,p,z){return this.easeTo(n.e({bearing:l},p),z)}resetNorth(l,p){return this.rotateTo(0,n.e({duration:1e3},l),p),this}resetNorthPitch(l,p){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},l),p),this}snapToNorth(l,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(l,p):this}getPitch(){return this.transform.pitch}setPitch(l,p){return this.jumpTo({pitch:l},p),this}cameraForBounds(l,p){l=Te.convert(l);const z=p&&p.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),z,p)}_cameraForBoxAndBearing(l,p,z,j){const q={top:0,bottom:0,right:0,left:0};if(typeof(j=n.e({padding:q,offset:[0,0],maxZoom:this.transform.maxZoom},j)).padding=="number"){const ya=j.padding;j.padding={top:ya,bottom:ya,right:ya,left:ya}}j.padding=n.e(q,j.padding);const ie=this.transform,pe=ie.padding,be=new Te(l,p),Ae=ie.project(be.getNorthWest()),Ne=ie.project(be.getNorthEast()),Ge=ie.project(be.getSouthEast()),at=ie.project(be.getSouthWest()),ct=n.ba(-z),pt=Ae.rotate(ct),xt=Ne.rotate(ct),At=Ge.rotate(ct),Tt=at.rotate(ct),Rt=new n.P(Math.max(pt.x,xt.x,Tt.x,At.x),Math.max(pt.y,xt.y,Tt.y,At.y)),Et=new n.P(Math.min(pt.x,xt.x,Tt.x,At.x),Math.min(pt.y,xt.y,Tt.y,At.y)),Zt=Rt.sub(Et),Yt=(ie.width-(pe.left+pe.right+j.padding.left+j.padding.right))/Zt.x,Xt=(ie.height-(pe.top+pe.bottom+j.padding.top+j.padding.bottom))/Zt.y;if(Xt<0||Yt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const hn=Math.min(ie.scaleZoom(ie.scale*Math.min(Yt,Xt)),j.maxZoom),xn=n.P.convert(j.offset),Nn=(j.padding.left-j.padding.right)/2,Dn=(j.padding.top-j.padding.bottom)/2,Gn=new n.P(Nn,Dn).rotate(n.ba(z)),Yn=xn.add(Gn).mult(ie.scale/ie.zoomScale(hn));return{center:ie.unproject(Ae.add(Ge).div(2).sub(Yn)),zoom:hn,bearing:z}}fitBounds(l,p,z){return this._fitInternal(this.cameraForBounds(l,p),p,z)}fitScreenCoordinates(l,p,z,j,q){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(l)),this.transform.pointLocation(n.P.convert(p)),z,j),j,q)}_fitInternal(l,p,z){return l?(delete(p=n.e(l,p)).padding,p.linear?this.easeTo(p,z):this.flyTo(p,z)):this}jumpTo(l,p){this.stop();const z=this._getTransformForUpdate();let j=!1,q=!1,ie=!1;return"zoom"in l&&z.zoom!==+l.zoom&&(j=!0,z.zoom=+l.zoom),l.center!==void 0&&(z.center=n.N.convert(l.center)),"bearing"in l&&z.bearing!==+l.bearing&&(q=!0,z.bearing=+l.bearing),"pitch"in l&&z.pitch!==+l.pitch&&(ie=!0,z.pitch=+l.pitch),l.padding==null||z.isPaddingEqual(l.padding)||(z.padding=l.padding),this._applyUpdatedTransform(z),this.fire(new n.k("movestart",p)).fire(new n.k("move",p)),j&&this.fire(new n.k("zoomstart",p)).fire(new n.k("zoom",p)).fire(new n.k("zoomend",p)),q&&this.fire(new n.k("rotatestart",p)).fire(new n.k("rotate",p)).fire(new n.k("rotateend",p)),ie&&this.fire(new n.k("pitchstart",p)).fire(new n.k("pitch",p)).fire(new n.k("pitchend",p)),this.fire(new n.k("moveend",p))}calculateCameraOptionsFromTo(l,p,z,j=0){const q=n.Z.fromLngLat(l,p),ie=n.Z.fromLngLat(z,j),pe=ie.x-q.x,be=ie.y-q.y,Ae=ie.z-q.z,Ne=Math.hypot(pe,be,Ae);if(Ne===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(pe,be),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ne/this.transform.tileSize),ct=180*Math.atan2(pe,-be)/Math.PI;let pt=180*Math.acos(Ge/Ne)/Math.PI;return pt=Ae<0?90-pt:90+pt,{center:ie.toLngLat(),zoom:at,pitch:pt,bearing:ct}}easeTo(l,p){var z;this._stop(!1,l.easeId),((l=n.e({offset:[0,0],duration:500,easing:n.b9},l)).animate===!1||!l.essential&&u.prefersReducedMotion)&&(l.duration=0);const j=this._getTransformForUpdate(),q=j.zoom,ie=j.bearing,pe=j.pitch,be=j.padding,Ae="bearing"in l?this._normalizeBearing(l.bearing,ie):ie,Ne="pitch"in l?+l.pitch:pe,Ge="padding"in l?l.padding:j.padding,at=n.P.convert(l.offset);let ct=j.centerPoint.add(at);const pt=j.pointLocation(ct),{center:xt,zoom:At}=j.getConstrained(n.N.convert(l.center||pt),(z=l.zoom)!==null&&z!==void 0?z:q);this._normalizeCenter(xt,j);const Tt=j.project(pt),Rt=j.project(xt).sub(Tt),Et=j.zoomScale(At-q);let Zt,Yt;l.around&&(Zt=n.N.convert(l.around),Yt=j.locationPoint(Zt));const Xt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||At!==q,this._rotating=this._rotating||ie!==Ae,this._pitching=this._pitching||Ne!==pe,this._padding=!j.isPaddingEqual(Ge),this._easeId=l.easeId,this._prepareEase(p,l.noMoveStart,Xt),this.terrain&&this._prepareElevation(xt),this._ease(hn=>{if(this._zooming&&(j.zoom=n.z.number(q,At,hn)),this._rotating&&(j.bearing=n.z.number(ie,Ae,hn)),this._pitching&&(j.pitch=n.z.number(pe,Ne,hn)),this._padding&&(j.interpolatePadding(be,Ge,hn),ct=j.centerPoint.add(at)),this.terrain&&!l.freezeElevation&&this._updateElevation(hn),Zt)j.setLocationAtPoint(Zt,Yt);else{const xn=j.zoomScale(j.zoom-q),Nn=At>q?Math.min(2,Et):Math.max(.5,Et),Dn=Math.pow(Nn,1-hn),Gn=j.unproject(Tt.add(Rt.mult(hn*Dn)).mult(xn));j.setLocationAtPoint(j.renderWorldCopies?Gn.wrap():Gn,ct)}this._applyUpdatedTransform(j),this._fireMoveEvents(p)},hn=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p,hn)},l),this}_prepareEase(l,p,z={}){this._moving=!0,p||z.moving||this.fire(new n.k("movestart",l)),this._zooming&&!z.zooming&&this.fire(new n.k("zoomstart",l)),this._rotating&&!z.rotating&&this.fire(new n.k("rotatestart",l)),this._pitching&&!z.pitching&&this.fire(new n.k("pitchstart",l))}_prepareElevation(l){this._elevationCenter=l,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(l,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(l){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const p=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(l<1&&p!==this._elevationTarget){const z=this._elevationTarget-this._elevationStart,j=(p-(z*l+this._elevationStart))/(1-l);this._elevationStart+=l*(z-j),this._elevationTarget=p}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,l)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(l){const p=l.getCameraPosition(),z=this.terrain.getElevationForLngLatZoom(p.lngLat,l.zoom);if(p.altitude<z){const j=this.calculateCameraOptionsFromTo(p.lngLat,z,l.center,l.elevation);return{pitch:j.pitch,zoom:j.zoom}}return{}}_applyUpdatedTransform(l){const p=[];if(this.terrain&&p.push(j=>this._elevateCameraIfInsideTerrain(j)),this.transformCameraUpdate&&p.push(j=>this.transformCameraUpdate(j)),!p.length)return;const z=l.clone();for(const j of p){const q=z.clone(),{center:ie,zoom:pe,pitch:be,bearing:Ae,elevation:Ne}=j(q);ie&&(q.center=ie),pe!==void 0&&(q.zoom=pe),be!==void 0&&(q.pitch=be),Ae!==void 0&&(q.bearing=Ae),Ne!==void 0&&(q.elevation=Ne),z.apply(q)}this.transform.apply(z)}_fireMoveEvents(l){this.fire(new n.k("move",l)),this._zooming&&this.fire(new n.k("zoom",l)),this._rotating&&this.fire(new n.k("rotate",l)),this._pitching&&this.fire(new n.k("pitch",l))}_afterEase(l,p){if(this._easeId&&p&&this._easeId===p)return;delete this._easeId;const z=this._zooming,j=this._rotating,q=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,z&&this.fire(new n.k("zoomend",l)),j&&this.fire(new n.k("rotateend",l)),q&&this.fire(new n.k("pitchend",l)),this.fire(new n.k("moveend",l))}flyTo(l,p){var z;if(!l.essential&&u.prefersReducedMotion){const ia=n.M(l,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ia,p)}this.stop(),l=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},l);const j=this._getTransformForUpdate(),q=j.zoom,ie=j.bearing,pe=j.pitch,be=j.padding,Ae="bearing"in l?this._normalizeBearing(l.bearing,ie):ie,Ne="pitch"in l?+l.pitch:pe,Ge="padding"in l?l.padding:j.padding,at=n.P.convert(l.offset);let ct=j.centerPoint.add(at);const pt=j.pointLocation(ct),{center:xt,zoom:At}=j.getConstrained(n.N.convert(l.center||pt),(z=l.zoom)!==null&&z!==void 0?z:q);this._normalizeCenter(xt,j);const Tt=j.zoomScale(At-q),Rt=j.project(pt),Et=j.project(xt).sub(Rt);let Zt=l.curve;const Yt=Math.max(j.width,j.height),Xt=Yt/Tt,hn=Et.mag();if("minZoom"in l){const ia=n.ad(Math.min(l.minZoom,q,At),j.minZoom,j.maxZoom),Ta=Yt/j.zoomScale(ia-q);Zt=Math.sqrt(Ta/hn*2)}const xn=Zt*Zt;function Nn(ia){const Ta=(Xt*Xt-Yt*Yt+(ia?-1:1)*xn*xn*hn*hn)/(2*(ia?Xt:Yt)*xn*hn);return Math.log(Math.sqrt(Ta*Ta+1)-Ta)}function Dn(ia){return(Math.exp(ia)-Math.exp(-ia))/2}function Gn(ia){return(Math.exp(ia)+Math.exp(-ia))/2}const Yn=Nn(!1);let ya=function(ia){return Gn(Yn)/Gn(Yn+Zt*ia)},ea=function(ia){return Yt*((Gn(Yn)*(Dn(Ta=Yn+Zt*ia)/Gn(Ta))-Dn(Yn))/xn)/hn;var Ta},wa=(Nn(!0)-Yn)/Zt;if(Math.abs(hn)<1e-6||!isFinite(wa)){if(Math.abs(Yt-Xt)<1e-6)return this.easeTo(l,p);const ia=Xt<Yt?-1:1;wa=Math.abs(Math.log(Xt/Yt))/Zt,ea=()=>0,ya=Ta=>Math.exp(ia*Zt*Ta)}if("duration"in l)l.duration=+l.duration;else{const ia="screenSpeed"in l?+l.screenSpeed/Zt:+l.speed;l.duration=1e3*wa/ia}return l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=ie!==Ae,this._pitching=Ne!==pe,this._padding=!j.isPaddingEqual(Ge),this._prepareEase(p,!1),this.terrain&&this._prepareElevation(xt),this._ease(ia=>{const Ta=ia*wa,fa=1/ya(Ta);j.zoom=ia===1?At:q+j.scaleZoom(fa),this._rotating&&(j.bearing=n.z.number(ie,Ae,ia)),this._pitching&&(j.pitch=n.z.number(pe,Ne,ia)),this._padding&&(j.interpolatePadding(be,Ge,ia),ct=j.centerPoint.add(at)),this.terrain&&!l.freezeElevation&&this._updateElevation(ia);const Ia=ia===1?xt:j.unproject(Rt.add(Et.mult(ea(Ta))).mult(fa));j.setLocationAtPoint(j.renderWorldCopies?Ia.wrap():Ia,ct),this._applyUpdatedTransform(j),this._fireMoveEvents(p)},()=>{this.terrain&&l.freezeElevation&&this._finalizeElevation(),this._afterEase(p)},l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,p){var z;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const j=this._onEaseEnd;delete this._onEaseEnd,j.call(this,p)}return l||(z=this.handlers)===null||z===void 0||z.stop(!1),this}_ease(l,p,z){z.animate===!1||z.duration===0?(l(1),p()):(this._easeStart=u.now(),this._easeOptions=z,this._onEaseFrame=l,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(l,p){l=n.b3(l,-180,180);const z=Math.abs(l-p);return Math.abs(l-360-p)<z&&(l-=360),Math.abs(l+360-p)<z&&(l+=360),l}_normalizeCenter(l,p){if(!p.renderWorldCopies||p.lngRange)return;const z=l.lng-p.center.lng;l.lng+=z>180?-360:z<-180?360:0}queryTerrainElevation(l){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(l),this.transform.tileZoom)-this.transform.elevation:null}}const Bo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ns{constructor(l=Bo){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=p=>{!p||p.sourceDataType!=="metadata"&&p.sourceDataType!=="visibility"&&p.dataType!=="style"&&p.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=l}getDefaultPosition(){return"bottom-right"}onAdd(l){return this._map=l,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.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(){r.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(l,p){const z=this._map._getUIString(`AttributionControl.${p}`);l.title=z,l.setAttribute("aria-label",z)}_updateAttributions(){if(!this._map.style)return;let l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map(j=>typeof j!="string"?"":j)):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){const j=this._map.style.stylesheet;this.styleOwner=j.owner,this.styleId=j.id}const p=this._map.style.sourceCaches;for(const j in p){const q=p[j];if(q.used||q.usedForTerrain){const ie=q.getSource();ie.attribution&&l.indexOf(ie.attribution)<0&&l.push(ie.attribution)}}l=l.filter(j=>String(j).trim()),l.sort((j,q)=>j.length-q.length),l=l.filter((j,q)=>{for(let ie=q+1;ie<l.length;ie++)if(l[ie].indexOf(j)>=0)return!1;return!0});const z=l.join(" | ");z!==this._attribHTML&&(this._attribHTML=z,l.length?(this._innerContainer.innerHTML=z,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class co{constructor(l={}){this._updateCompact=()=>{const p=this._container.children;if(p.length){const z=p[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&z.classList.add("maplibregl-compact"):z.classList.remove("maplibregl-compact")}},this.options=l}getDefaultPosition(){return"bottom-left"}onAdd(l){this._map=l,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const p=r.create("a","maplibregl-ctrl-logo");return p.target="_blank",p.rel="noopener nofollow",p.href="https://maplibre.org/",p.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),p.setAttribute("rel","noopener nofollow"),this._container.appendChild(p),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ac{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const p=++this._id;return this._queue.push({callback:l,id:p,cancelled:!1}),p}remove(l){const p=this._currentlyRunning,z=p?this._queue.concat(p):this._queue;for(const j of z)if(j.id===l)return void(j.cancelled=!0)}run(l=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const p=this._currentlyRunning=this._queue;this._queue=[];for(const z of p)if(!z.cancelled&&(z.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var er=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Lo extends n.E{constructor(l){super(),this.sourceCache=l,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,l.usedForTerrain=!0,l.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(l,p){this.sourceCache.update(l,p),this._renderableTilesKeys=[];const z={};for(const j of l.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:p}))z[j.key]=!0,this._renderableTilesKeys.push(j.key),this._tiles[j.key]||(j.posMatrix=new Float64Array(16),n.aQ(j.posMatrix,0,n.X,0,n.X,0,1),this._tiles[j.key]=new we(j,this.tileSize));for(const j in this._tiles)z[j]||delete this._tiles[j]}freeRtt(l){for(const p in this._tiles){const z=this._tiles[p];(!l||z.tileID.equals(l)||z.tileID.isChildOf(l)||l.isChildOf(z.tileID))&&(z.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(l=>this.getTileByID(l))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l){const p={};for(const z of this._renderableTilesKeys){const j=this._tiles[z].tileID;if(j.canonical.equals(l.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16),n.aQ(q.posMatrix,0,n.X,0,n.X,0,1),p[z]=q}else if(j.canonical.isChildOf(l.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16);const ie=j.canonical.z-l.canonical.z,pe=j.canonical.x-(j.canonical.x>>ie<<ie),be=j.canonical.y-(j.canonical.y>>ie<<ie),Ae=n.X>>ie;n.aQ(q.posMatrix,0,Ae,0,Ae,0,1),n.J(q.posMatrix,q.posMatrix,[-pe*Ae,-be*Ae,0]),p[z]=q}else if(l.canonical.isChildOf(j.canonical)){const q=l.clone();q.posMatrix=new Float64Array(16);const ie=l.canonical.z-j.canonical.z,pe=l.canonical.x-(l.canonical.x>>ie<<ie),be=l.canonical.y-(l.canonical.y>>ie<<ie),Ae=n.X>>ie;n.aQ(q.posMatrix,0,n.X,0,n.X,0,1),n.J(q.posMatrix,q.posMatrix,[pe*Ae,be*Ae,0]),n.K(q.posMatrix,q.posMatrix,[1/2**ie,1/2**ie,0]),p[z]=q}}return p}getSourceTile(l,p){const z=this.sourceCache._source;let j=l.overscaledZ-this.deltaZoom;if(j>z.maxzoom&&(j=z.maxzoom),j<z.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(j).key);let q=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!q||!q.dem)&&p)for(;j>=z.minzoom&&(!q||!q.dem);)q=this.sourceCache.getTileByID(l.scaledTo(j--).key);return q}tilesAfterTime(l=Date.now()){return Object.values(this._tiles).filter(p=>p.timeAdded>=l)}}class ii{constructor(l,p,z){this.painter=l,this.sourceCache=new Lo(p),this.options=z,this.exaggeration=typeof z.exaggeration=="number"?z.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(l,p,z,j=n.X){var q;if(!(p>=0&&p<j&&z>=0&&z<j))return 0;const ie=this.getTerrainData(l),pe=(q=ie.tile)===null||q===void 0?void 0:q.dem;if(!pe)return 0;const be=function(pt,xt,At){var Tt=xt[0],Rt=xt[1];return pt[0]=At[0]*Tt+At[4]*Rt+At[12],pt[1]=At[1]*Tt+At[5]*Rt+At[13],pt}([],[p/j*n.X,z/j*n.X],ie.u_terrain_matrix),Ae=[be[0]*pe.dim,be[1]*pe.dim],Ne=Math.floor(Ae[0]),Ge=Math.floor(Ae[1]),at=Ae[0]-Ne,ct=Ae[1]-Ge;return pe.get(Ne,Ge)*(1-at)*(1-ct)+pe.get(Ne+1,Ge)*at*(1-ct)+pe.get(Ne,Ge+1)*(1-at)*ct+pe.get(Ne+1,Ge+1)*at*ct}getElevationForLngLatZoom(l,p){const{tileID:z,mercatorX:j,mercatorY:q}=this._getOverscaledTileIDFromLngLatZoom(l,p);return this.getElevation(z,j%n.X,q%n.X,n.X)}getElevation(l,p,z,j=n.X){return this.getDEMElevation(l,p,z,j)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const j=this.painter.context,q=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new L(j,q,j.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new L(j,new n.R({width:1,height:1}),j.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const p=this.sourceCache.getSourceTile(l,!0);if(p&&p.dem&&(!p.demTexture||p.needsTerrainPrepare)){const j=this.painter.context;p.demTexture=this.painter.getTileTexture(p.dem.stride),p.demTexture?p.demTexture.update(p.dem.getPixels(),{premultiply:!1}):p.demTexture=new L(j,p.dem.getPixels(),j.gl.RGBA,{premultiply:!1}),p.demTexture.bind(j.gl.NEAREST,j.gl.CLAMP_TO_EDGE),p.needsTerrainPrepare=!1}const z=p&&p+p.tileID.key+l.key;if(z&&!this._demMatrixCache[z]){const j=this.sourceCache.sourceCache._source.maxzoom;let q=l.canonical.z-p.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=j?q=l.canonical.z-j:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ie=l.canonical.x-(l.canonical.x>>q<<q),pe=l.canonical.y-(l.canonical.y>>q<<q),be=n.bb(new Float64Array(16),[1/(n.X<<q),1/(n.X<<q),0]);n.J(be,be,[ie*n.X,pe*n.X,0]),this._demMatrixCache[l.key]={matrix:be,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:p&&p.dem&&p.dem.dim||1,u_terrain_matrix:z?this._demMatrixCache[l.key].matrix:this._emptyDemMatrix,u_terrain_unpack:p&&p.dem&&p.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(p&&p.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:p}}getFramebuffer(l){const p=this.painter,z=p.width/devicePixelRatio,j=p.height/devicePixelRatio;return!this._fbo||this._fbo.width===z&&this._fbo.height===j||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new L(p.context,{width:z,height:j,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new L(p.context,{width:z,height:j,data:null},p.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(p.context.gl.NEAREST,p.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=p.context.createFramebuffer(z,j,!0,!1),this._fbo.depthAttachment.set(p.context.createRenderbuffer(p.context.gl.DEPTH_COMPONENT16,z,j))),this._fbo.colorAttachment.set(l==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const l=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const p=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let q=0,ie=0;q<this._coordsTextureSize;q++)for(let pe=0;pe<this._coordsTextureSize;pe++,ie+=4)p[ie+0]=255&pe,p[ie+1]=255&q,p[ie+2]=pe>>8<<4|q>>8,p[ie+3]=0;const z=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(p.buffer)),j=new L(l,z,l.gl.RGBA,{premultiply:!1});return j.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._coordsTexture=j,j}pointCoordinate(l){this.painter.maybeDrawDepthAndCoords(!0);const p=new Uint8Array(4),z=this.painter.context,j=z.gl,q=Math.round(l.x*this.painter.pixelRatio/devicePixelRatio),ie=Math.round(l.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);z.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),j.readPixels(q,pe-ie-1,1,1,j.RGBA,j.UNSIGNED_BYTE,p),z.bindFramebuffer.set(null);const be=p[0]+(p[2]>>4<<8),Ae=p[1]+((15&p[2])<<8),Ne=this.coordsIndex[255-p[3]],Ge=Ne&&this.sourceCache.getTileByID(Ne);if(!Ge)return null;const at=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*at;return new n.Z((Ge.tileID.canonical.x*at+be)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*at+Ae)/ct,this.getElevation(Ge.tileID,be,Ae,at))}depthAtPoint(l){const p=new Uint8Array(4),z=this.painter.context,j=z.gl;return z.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),j.readPixels(l.x,this.painter.height/devicePixelRatio-l.y-1,1,1,j.RGBA,j.UNSIGNED_BYTE,p),z.bindFramebuffer.set(null),(p[0]/16777216+p[1]/65536+p[2]/256+p[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const l=this.painter.context,p=new n.bc,z=new n.aY,j=this.meshSize,q=n.X/j,ie=j*j;for(let Ge=0;Ge<=j;Ge++)for(let at=0;at<=j;at++)p.emplaceBack(at*q,Ge*q,0);for(let Ge=0;Ge<ie;Ge+=j+1)for(let at=0;at<j;at++)z.emplaceBack(at+Ge,j+at+Ge+1,j+at+Ge+2),z.emplaceBack(at+Ge,j+at+Ge+2,at+Ge+1);const pe=p.length,be=pe+2*(j+1);for(const Ge of[0,1])for(let at=0;at<=j;at++)for(const ct of[0,1])p.emplaceBack(at*q,Ge*n.X,ct);for(let Ge=0;Ge<2*j;Ge+=2)z.emplaceBack(be+Ge,be+Ge+1,be+Ge+3),z.emplaceBack(be+Ge,be+Ge+3,be+Ge+2),z.emplaceBack(pe+Ge,pe+Ge+3,pe+Ge+1),z.emplaceBack(pe+Ge,pe+Ge+2,pe+Ge+3);const Ae=p.length,Ne=Ae+2*(j+1);for(const Ge of[0,1])for(let at=0;at<=j;at++)for(const ct of[0,1])p.emplaceBack(Ge*n.X,at*q,ct);for(let Ge=0;Ge<2*j;Ge+=2)z.emplaceBack(Ae+Ge,Ae+Ge+1,Ae+Ge+3),z.emplaceBack(Ae+Ge,Ae+Ge+3,Ae+Ge+2),z.emplaceBack(Ne+Ge,Ne+Ge+3,Ne+Ge+1),z.emplaceBack(Ne+Ge,Ne+Ge+2,Ne+Ge+3);return this._mesh=new sc(l.createVertexBuffer(p,er.members),l.createIndexBuffer(z),n.a0.simpleSegment(0,0,p.length,z.length)),this._mesh}getMeshFrameDelta(l){return 2*Math.PI*n.bd/Math.pow(2,l)/5}getMinTileElevationForLngLatZoom(l,p){var z;const{tileID:j}=this._getOverscaledTileIDFromLngLatZoom(l,p);return(z=this.getMinMaxElevation(j).minElevation)!==null&&z!==void 0?z:0}getMinMaxElevation(l){const p=this.getTerrainData(l).tile,z={minElevation:null,maxElevation:null};return p&&p.dem&&(z.minElevation=p.dem.min*this.exaggeration,z.maxElevation=p.dem.max*this.exaggeration),z}_getOverscaledTileIDFromLngLatZoom(l,p){const z=n.Z.fromLngLat(l.wrap()),j=(1<<p)*n.X,q=z.x*j,ie=z.y*j,pe=Math.floor(q/n.X),be=Math.floor(ie/n.X);return{tileID:new n.S(p,0,p,pe,be),mercatorX:q,mercatorY:ie}}}class Rl{constructor(l,p,z){this._context=l,this._size=p,this._tileSize=z,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const l of this._objects)l.texture.destroy(),l.fbo.destroy()}_createObject(l){const p=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),z=new L(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return z.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),p.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),p.colorAttachment.set(z.texture),{id:l,fbo:p,texture:z,stamp:-1,inUse:!1}}getObjectForId(l){return this._objects[l]}useObject(l){l.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(p=>l.id!==p),this._recentlyUsed.push(l.id)}stampObject(l){l.stamp=++this._stamp}getOrCreateFreeObject(){for(const p of this._recentlyUsed)if(!this._objects[p].inUse)return this._objects[p];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const l=this._createObject(this._objects.length);return this._objects.push(l),l}freeObject(l){l.inUse=!1}freeAllObjects(){for(const l of this._objects)this.freeObject(l)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(l=>!l.inUse)===!1}}const cs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ds{constructor(l,p){this.painter=l,this.terrain=p,this.pool=new Rl(l.context,30,p.sourceCache.tileSize*p.qualityFactor)}destruct(){this.pool.destruct()}getTexture(l){return this.pool.getObjectForId(l.rtt[this._stacks.length-1].id).texture}prepareForRender(l,p){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=l._order.filter(z=>!l._layers[z].isHidden(p)),this._coordsDescendingInv={};for(const z in l.sourceCaches){this._coordsDescendingInv[z]={};const j=l.sourceCaches[z].getVisibleCoordinates();for(const q of j){const ie=this.terrain.sourceCache.getTerrainCoords(q);for(const pe in ie)this._coordsDescendingInv[z][pe]||(this._coordsDescendingInv[z][pe]=[]),this._coordsDescendingInv[z][pe].push(ie[pe])}}this._coordsDescendingInvStr={};for(const z of l._order){const j=l._layers[z],q=j.source;if(cs[j.type]&&!this._coordsDescendingInvStr[q]){this._coordsDescendingInvStr[q]={};for(const ie in this._coordsDescendingInv[q])this._coordsDescendingInvStr[q][ie]=this._coordsDescendingInv[q][ie].map(pe=>pe.key).sort().join()}}for(const z of this._renderableTiles)for(const j in this._coordsDescendingInvStr){const q=this._coordsDescendingInvStr[j][z.tileID.key];q&&q!==z.rttCoords[j]&&(z.rtt=[])}}renderLayer(l){if(l.isHidden(this.painter.transform.zoom))return!1;const p=l.type,z=this.painter,j=this._renderableLayerIds[this._renderableLayerIds.length-1]===l.id;if(cs[p]&&(this._prevType&&cs[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(l.id),!j))return!0;if(cs[this._prevType]||cs[p]&&j){this._prevType=p;const q=this._stacks.length-1,ie=this._stacks[q]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[q]){const Ae=this.pool.getObjectForId(pe.rtt[q].id);if(Ae.stamp===pe.rtt[q].stamp){this.pool.useObject(Ae);continue}}const be=this.pool.getOrCreateFreeObject();this.pool.useObject(be),this.pool.stampObject(be),pe.rtt[q]={id:be.id,stamp:be.stamp},z.context.bindFramebuffer.set(be.fbo.framebuffer),z.context.clear({color:n.aN.transparent,stencil:0}),z.currentStencilSource=void 0;for(let Ae=0;Ae<ie.length;Ae++){const Ne=z.style._layers[ie[Ae]],Ge=Ne.source?this._coordsDescendingInv[Ne.source][pe.tileID.key]:[pe.tileID];z.context.viewport.set([0,0,be.fbo.width,be.fbo.height]),z._renderTileClippingMasks(Ne,Ge),z.renderLayer(z,z.style.sourceCaches[Ne.source],Ne,Ge),Ne.source&&(pe.rttCoords[Ne.source]=this._coordsDescendingInvStr[Ne.source][pe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),cs[p]}return!1}}const Fc={"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","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"},Mc=x,al={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Bo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!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],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:n.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ai=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Cs={showCompass:!0,showZoom:!0,visualizePitch:!1};class Za{constructor(l,p,z=!1){this.mousedown=ie=>{this.startMouse(n.e({},ie,{ctrlKey:!0,preventDefault:()=>ie.preventDefault()}),r.mousePos(this.element,ie)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ie=>{this.moveMouse(ie,r.mousePos(this.element,ie))},this.mouseup=ie=>{this.mouseRotate.dragEnd(ie),this.mousePitch&&this.mousePitch.dragEnd(ie),this.offTemp()},this.touchstart=ie=>{ie.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.startTouch(ie,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=ie=>{ie.targetTouches.length!==1?this.reset():(this._lastPos=r.touchPos(this.element,ie.targetTouches)[0],this.moveTouch(ie,this._lastPos))},this.touchend=ie=>{ie.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.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const j=l.dragRotate._mouseRotate.getClickTolerance(),q=l.dragRotate._mousePitch.getClickTolerance();this.element=p,this.mouseRotate=Xl({clickTolerance:j,enable:!0}),this.touchRotate=(({enable:ie,clickTolerance:pe,bearingDegreesPerPixelMoved:be=.8})=>{const Ae=new Nl;return new vo({clickTolerance:pe,move:(Ne,Ge)=>({bearingDelta:(Ge.x-Ne.x)*be}),moveStateManager:Ae,enable:ie,assignEvents:Ai})})({clickTolerance:j,enable:!0}),this.map=l,z&&(this.mousePitch=Ys({clickTolerance:q,enable:!0}),this.touchPitch=(({enable:ie,clickTolerance:pe,pitchDegreesPerPixelMoved:be=-.5})=>{const Ae=new Nl;return new vo({clickTolerance:pe,move:(Ne,Ge)=>({pitchDelta:(Ge.y-Ne.y)*be}),moveStateManager:Ae,enable:ie,assignEvents:Ai})})({clickTolerance:q,enable:!0})),r.addEventListener(p,"mousedown",this.mousedown),r.addEventListener(p,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(p,"touchcancel",this.reset)}startMouse(l,p){this.mouseRotate.dragStart(l,p),this.mousePitch&&this.mousePitch.dragStart(l,p),r.disableDrag()}startTouch(l,p){this.touchRotate.dragStart(l,p),this.touchPitch&&this.touchPitch.dragStart(l,p),r.disableDrag()}moveMouse(l,p){const z=this.map,{bearingDelta:j}=this.mouseRotate.dragMove(l,p)||{};if(j&&z.setBearing(z.getBearing()+j),this.mousePitch){const{pitchDelta:q}=this.mousePitch.dragMove(l,p)||{};q&&z.setPitch(z.getPitch()+q)}}moveTouch(l,p){const z=this.map,{bearingDelta:j}=this.touchRotate.dragMove(l,p)||{};if(j&&z.setBearing(z.getBearing()+j),this.touchPitch){const{pitchDelta:q}=this.touchPitch.dragMove(l,p)||{};q&&z.setPitch(z.getPitch()+q)}}off(){const l=this.element;r.removeEventListener(l,"mousedown",this.mousedown),r.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let gr;function Go(R,l,p){const z=new n.N(R.lng,R.lat);if(R=new n.N(R.lng,R.lat),l){const j=new n.N(R.lng-360,R.lat),q=new n.N(R.lng+360,R.lat),ie=p.locationPoint(R).distSqr(l);p.locationPoint(j).distSqr(l)<ie?R=j:p.locationPoint(q).distSqr(l)<ie&&(R=q)}for(;Math.abs(R.lng-p.center.lng)>180;){const j=p.locationPoint(R);if(j.x>=0&&j.y>=0&&j.x<=p.width&&j.y<=p.height)break;R.lng>p.center.lng?R.lng-=360:R.lng+=360}return R.lng!==z.lng&&p.locationPoint(R).y>p.height/2-p.getHorizon()?R:z}const Es={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 rl(R,l,p){const z=R.classList;for(const j in Es)z.remove(`maplibregl-${p}-anchor-${j}`);z.add(`maplibregl-${p}-anchor-${l}`)}class Fi extends n.E{constructor(l){if(super(),this._onKeyPress=p=>{const z=p.code,j=p.charCode||p.keyCode;z!=="Space"&&z!=="Enter"&&j!==32&&j!==13||this.togglePopup()},this._onMapClick=p=>{const z=p.originalEvent.target,j=this._element;this._popup&&(z===j||j.contains(z))&&this.togglePopup()},this._update=p=>{var z;if(!this._map)return;const j=this._map.loaded()&&!this._map.isMoving();((p==null?void 0:p.type)==="terrain"||(p==null?void 0:p.type)==="render"&&!j)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Go(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(z=this._lngLat)===null||z===void 0?void 0:z.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let q="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?q=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(q=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ie="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ie="rotateX(0deg)":this._pitchAlignment==="map"&&(ie=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||p&&p.type!=="moveend"||(this._pos=this._pos.round()),r.setTransform(this._element,`${Es[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ie} ${q}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(p&&p.type==="moveend")}).catch(()=>{})},this._onMove=p=>{if(!this._isDragging){const z=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=z}this._isDragging&&(this._pos=p.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 n.k("dragstart"))),this.fire(new n.k("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 n.k("dragend")),this._state="inactive"},this._addDragHandler=p=>{this._element.contains(p.originalEvent.target)&&(p.preventDefault(),this._positionDelta=p.point.sub(this._pos).add(this._offset),this._pointerdownPos=p.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=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._subpixelPositioning=l&&l.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment!=="auto"?l.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(l==null?void 0:l.opacity,l==null?void 0:l.opacityWhenCovered),l&&l.element)this._element=l.element,this._offset=n.P.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const p=r.createNS("http://www.w3.org/2000/svg","svg"),z=41,j=27;p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height",`${z}px`),p.setAttributeNS(null,"width",`${j}px`),p.setAttributeNS(null,"viewBox",`0 0 ${j} ${z}`);const q=r.createNS("http://www.w3.org/2000/svg","g");q.setAttributeNS(null,"stroke","none"),q.setAttributeNS(null,"stroke-width","1"),q.setAttributeNS(null,"fill","none"),q.setAttributeNS(null,"fill-rule","evenodd");const ie=r.createNS("http://www.w3.org/2000/svg","g");ie.setAttributeNS(null,"fill-rule","nonzero");const pe=r.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const be=[{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 Tt of be){const Rt=r.createNS("http://www.w3.org/2000/svg","ellipse");Rt.setAttributeNS(null,"opacity","0.04"),Rt.setAttributeNS(null,"cx","10.5"),Rt.setAttributeNS(null,"cy","5.80029008"),Rt.setAttributeNS(null,"rx",Tt.rx),Rt.setAttributeNS(null,"ry",Tt.ry),pe.appendChild(Rt)}const Ae=r.createNS("http://www.w3.org/2000/svg","g");Ae.setAttributeNS(null,"fill",this._color);const Ne=r.createNS("http://www.w3.org/2000/svg","path");Ne.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"),Ae.appendChild(Ne);const Ge=r.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const at=r.createNS("http://www.w3.org/2000/svg","path");at.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"),Ge.appendChild(at);const ct=r.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=r.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=r.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const At=r.createNS("http://www.w3.org/2000/svg","circle");At.setAttributeNS(null,"fill","#FFFFFF"),At.setAttributeNS(null,"cx","5.5"),At.setAttributeNS(null,"cy","5.5"),At.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(At),ie.appendChild(pe),ie.appendChild(Ae),ie.appendChild(Ge),ie.appendChild(ct),ie.appendChild(pt),p.appendChild(ie),p.setAttributeNS(null,"height",z*this._scale+"px"),p.setAttributeNS(null,"width",j*this._scale+"px"),this._element.appendChild(p),this._offset=n.P.convert(l&&l.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",p=>{p.preventDefault()}),this._element.addEventListener("mousedown",p=>{p.preventDefault()}),rl(this._element,this._anchor,"marker"),l&&l.className)for(const p of l.className.split(" "))this._element.classList.add(p);this._popup=null}addTo(l){return this.remove(),this._map=l,this._element.setAttribute("aria-label",l._getUIString("Marker.Title")),l.getCanvasContainer().appendChild(this._element),l.on("move",this._update),l.on("moveend",this._update),l.on("terrain",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("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),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=n.N.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const j=Math.abs(13.5)/Math.SQRT2;l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[j,-1*(24.6+j)],"bottom-right":[-j,-1*(24.6+j)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=l,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(l){return this._subpixelPositioning=l,this}getPopup(){return this._popup}togglePopup(){const l=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:l?(l.isOpen()?l.remove():(l.setLngLat(this._lngLat),l.addTo(this._map)),this):this}_updateOpacity(l=!1){var p,z;if(!(!((p=this._map)===null||p===void 0)&&p.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(l)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const j=this._map,q=j.terrain.depthAtPoint(this._pos),ie=j.terrain.getElevationForLngLatZoom(this._lngLat,j.transform.tileZoom);if(j.transform.lngLatToCameraDepth(this._lngLat,ie)-q<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/j.transform._pixelPerMeter,be=Math.sin(j.getPitch()*Math.PI/180)*pe,Ae=j.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ne=j.transform.lngLatToCameraDepth(this._lngLat,ie+be)-Ae>.006;!((z=this._popup)===null||z===void 0)&&z.isOpen()&&Ne&&this._popup.remove(),this._element.style.opacity=Ne?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(l){return this._offset=n.P.convert(l),this._update(),this}addClassName(l){this._element.classList.add(l)}removeClassName(l){this._element.classList.remove(l)}toggleClassName(l){return this._element.classList.toggle(l)}setDraggable(l){return this._draggable=!!l,this._map&&(l?(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(l){return this._rotation=l||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(l){return this._rotationAlignment=l||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(l){return this._pitchAlignment=l&&l!=="auto"?l:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(l,p){return l===void 0&&p===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),l!==void 0&&(this._opacity=l),p!==void 0&&(this._opacityWhenCovered=p),this._map&&this._updateOpacity(!0),this}}const Vl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Jr=0,Jl=!1;class ir extends n.E{constructor(l){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new n.k("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,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(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new n.k("geolocate",p)),this._finish()}},this._updateCamera=p=>{const z=new n.N(p.coords.longitude,p.coords.latitude),j=p.coords.accuracy,q=this._map.getBearing(),ie=n.e({bearing:q},this.options.fitBoundsOptions),pe=Te.fromLngLat(z,j);this._map.fitBounds(pe,ie,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const z=new n.N(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(z).addTo(this._map),this._userLocationDotMarker.setLngLat(z).addTo(this._map),this._accuracy=p.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=p=>{if(this._map){if(this.options.trackUserLocation)if(p.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 z=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Jl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new n.k("error",p)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",p=>p.preventDefault()),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=p=>{if(this._map){if(p===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const z=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z)}else{const z=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=z,this._geolocateButton.setAttribute("aria-label",z)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fi({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fi({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",z=>{const j=z.originalEvent&&z.originalEvent.type==="resize";z.geolocateSource||this._watchState!=="ACTIVE_LOCK"||j||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new n.k("trackuserlocationend")),this.fire(new n.k("userlocationlostfocus")))})}},this.options=n.e({},Vl,l)}onAdd(l){return this._map=l,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(p=!1){if(gr!==void 0&&!p)return gr;if(window.navigator.permissions===void 0)return gr=!!window.navigator.geolocation,gr;try{gr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{gr=!!window.navigator.geolocation}return gr})}().then(p=>this._finishSetupUI(p)),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(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Jr=0,Jl=!1}_isOutOfMapMaxBounds(l){const p=this._map.getMaxBounds(),z=l.coords;return p&&(z.longitude<p.getWest()||z.longitude>p.getEast()||z.latitude<p.getSouth()||z.latitude>p.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 l=this._map.getBounds(),p=l.getSouthEast(),z=l.getNorthEast(),j=p.distanceTo(z),q=this._map._container.clientHeight,ie=Math.ceil(this._accuracy/(j/q)*2);this._circleElement.style.width=`${ie}px`,this._circleElement.style.height=`${ie}px`}trigger(){if(!this._setup)return n.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 n.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Jr--,Jl=!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 n.k("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 n.k("trackuserlocationstart")),this.fire(new n.k("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 l;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Jr++,Jr>1?(l={maximumAge:6e5,timeout:0},Jl=!0):(l=this.options.positionOptions,Jl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,l)}}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)}}const tr={maxWidth:100,unit:"metric"};function wi(R,l,p){const z=p&&p.maxWidth||100,j=R._container.clientHeight/2,q=R.unproject([0,j]),ie=R.unproject([z,j]),pe=q.distanceTo(ie);if(p&&p.unit==="imperial"){const be=3.2808*pe;be>5280?uo(l,z,be/5280,R._getUIString("ScaleControl.Miles")):uo(l,z,be,R._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?uo(l,z,pe/1852,R._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?uo(l,z,pe/1e3,R._getUIString("ScaleControl.Kilometers")):uo(l,z,pe,R._getUIString("ScaleControl.Meters"))}function uo(R,l,p,z){const j=function(ie){const pe=Math.pow(10,`${Math.floor(ie)}`.length-1);let be=ie/pe;return be=be>=10?10:be>=5?5:be>=3?3:be>=2?2:be>=1?1:function(Ae){const Ne=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Ne)/Ne}(be),pe*be}(p),q=j/p;R.style.width=l*q+"px",R.innerHTML=`${j}&nbsp;${z}`}class jl extends n.E{constructor(l={}){super(),this._onFullscreenChange=()=>{var p;let z=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((p=z==null?void 0:z.shadowRoot)===null||p===void 0)&&p.fullscreenElement;)z=z.shadowRoot.fullscreenElement;z===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,l&&l.container&&(l.container instanceof HTMLElement?this._container=l.container:n.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(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const l=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",l).setAttribute("aria-hidden","true"),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.title=l}_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 n.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new n.k("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()}}const Ho={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},yt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class wt extends n.E{constructor(l){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.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 n.k("close"))),this),this._onMouseUp=p=>{this._update(p.point)},this._onMouseMove=p=>{this._update(p.point)},this._onDrag=p=>{this._update(p.point)},this._update=p=>{var z;const j=this._lngLat||this._trackPointer;if(!this._map||!j||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ae of this.options.className.split(" "))this._container.classList.add(Ae);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._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Go(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(z=this._lngLat)===null||z===void 0?void 0:z.wrap(),this._trackPointer&&!p)return;const q=this._flatPos=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&p?p:this._map.transform.locationPoint(this._lngLat));let ie=this.options.anchor;const pe=Lt(this.options.offset);if(!ie){const Ae=this._container.offsetWidth,Ne=this._container.offsetHeight;let Ge;Ge=q.y+pe.bottom.y<Ne?["top"]:q.y>this._map.transform.height-Ne?["bottom"]:[],q.x<Ae/2?Ge.push("left"):q.x>this._map.transform.width-Ae/2&&Ge.push("right"),ie=Ge.length===0?"bottom":Ge.join("-")}let be=q.add(pe[ie]);this.options.subpixelPositioning||(be=be.round()),r.setTransform(this._container,`${Es[ie]} translate(${be.x}px,${be.y}px)`),rl(this._container,ie,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(Ho),l)}addTo(l){return this._map&&this.remove(),this._map=l,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 n.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(l){return this._lngLat=n.N.convert(l),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(l){return this.setDOMContent(document.createTextNode(l))}setHTML(l){const p=document.createDocumentFragment(),z=document.createElement("body");let j;for(z.innerHTML=l;j=z.firstChild,j;)p.appendChild(j);return this.setDOMContent(p)}getMaxWidth(){var l;return(l=this._container)===null||l===void 0?void 0:l.style.maxWidth}setMaxWidth(l){return this.options.maxWidth=l,this._update(),this}setDOMContent(l){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(l),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(l){return this._container&&this._container.classList.add(l),this}removeClassName(l){return this._container&&this._container.classList.remove(l),this}setOffset(l){return this.options.offset=l,this._update(),this}toggleClassName(l){if(this._container)return this._container.classList.toggle(l)}setSubpixelPositioning(l){this.options.subpixelPositioning=l}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const l=this._container.querySelector(yt);l&&l.focus()}}function Lt(R){if(R){if(typeof R=="number"){const l=Math.round(Math.abs(R)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,R),"top-left":new n.P(l,l),"top-right":new n.P(-l,l),bottom:new n.P(0,-R),"bottom-left":new n.P(l,-l),"bottom-right":new n.P(-l,-l),left:new n.P(R,0),right:new n.P(-R,0)}}if(R instanceof n.P||Array.isArray(R)){const l=n.P.convert(R);return{center:l,top:l,"top-left":l,"top-right":l,bottom:l,"bottom-left":l,"bottom-right":l,left:l,right:l}}return{center:n.P.convert(R.center||[0,0]),top:n.P.convert(R.top||[0,0]),"top-left":n.P.convert(R["top-left"]||[0,0]),"top-right":n.P.convert(R["top-right"]||[0,0]),bottom:n.P.convert(R.bottom||[0,0]),"bottom-left":n.P.convert(R["bottom-left"]||[0,0]),"bottom-right":n.P.convert(R["bottom-right"]||[0,0]),left:n.P.convert(R.left||[0,0]),right:n.P.convert(R.right||[0,0])}}return Lt(new n.P(0,0))}const ne=x;h.AJAXError=n.bg,h.Evented=n.E,h.LngLat=n.N,h.MercatorCoordinate=n.Z,h.Point=n.P,h.addProtocol=n.bh,h.config=n.a,h.removeProtocol=n.bi,h.AttributionControl=ns,h.BoxZoomHandler=yo,h.CanvasSource=Me,h.CooperativeGesturesHandler=ls,h.DoubleClickZoomHandler=Ci,h.DragPanHandler=Ss,h.DragRotateHandler=Po,h.EdgeInsets=zl,h.FullscreenControl=jl,h.GeoJSONSource=Pe,h.GeolocateControl=ir,h.Hash=Qi,h.ImageSource=Be,h.KeyboardHandler=dc,h.LngLatBounds=Te,h.LogoControl=co,h.Map=class extends to{constructor(R){n.be.mark(n.bf.create);const l=Object.assign(Object.assign({},al),R);if(l.minZoom!=null&&l.maxZoom!=null&&l.minZoom>l.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(l.minPitch!=null&&l.maxPitch!=null&&l.minPitch>l.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(l.minPitch!=null&&l.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(l.maxPitch!=null&&l.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(l.minZoom,l.maxZoom,l.minPitch,l.maxPitch,l.renderWorldCopies),{bearingSnap:l.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ac,this._controls=[],this._mapId=n.a4(),this._contextLost=z=>{z.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:z}))},this._contextRestored=z=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:z}))},this._onMapScroll=z=>{if(z.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=l.interactive,this._maxTileCacheSize=l.maxTileCacheSize,this._maxTileCacheZoomLevels=l.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=l.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=l.preserveDrawingBuffer===!0,this._antialias=l.antialias===!0,this._trackResize=l.trackResize===!0,this._bearingSnap=l.bearingSnap,this._refreshExpiredTiles=l.refreshExpiredTiles===!0,this._fadeDuration=l.fadeDuration,this._crossSourceCollisions=l.crossSourceCollisions===!0,this._collectResourceTiming=l.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Fc),l.locale),this._clickTolerance=l.clickTolerance,this._overridePixelRatio=l.pixelRatio,this._maxCanvasSize=l.maxCanvasSize,this.transformCameraUpdate=l.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=l.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=T.addThrottleControl(()=>this.isMoving()),this._requestManager=new A(l.transformRequest),typeof l.container=="string"){if(this._container=document.getElementById(l.container),!this._container)throw new Error(`Container '${l.container}' not found.`)}else{if(!(l.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=l.container}if(l.maxBounds&&this.setMaxBounds(l.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let z=!1;const j=Ns(q=>{this._trackResize&&!this._removed&&this.resize(q)._update()},50);this._resizeObserver=new ResizeObserver(q=>{z?j(q):z=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ri(this,l);const p=typeof l.hash=="string"&&l.hash||void 0;this._hash=l.hash&&new Qi(p).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:l.center,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),l.bounds&&(this.resize(),this.fitBounds(l.bounds,n.e({},l.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=l.localIdeographFontFamily,this._validateStyle=l.validateStyle,l.style&&this.setStyle(l.style,{localIdeographFontFamily:l.localIdeographFontFamily}),l.attributionControl&&this.addControl(new ns(typeof l.attributionControl=="boolean"?void 0:l.attributionControl)),l.maplibreLogo&&this.addControl(new co,l.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",z=>{this._update(z.dataType==="style"),this.fire(new n.k(`${z.dataType}data`,z))}),this.on("dataloading",z=>{this.fire(new n.k(`${z.dataType}dataloading`,z))}),this.on("dataabort",z=>{this.fire(new n.k("sourcedataabort",z))})}_getMapId(){return this._mapId}addControl(R,l){if(l===void 0&&(l=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new n.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=R.onAdd(this);this._controls.push(R);const z=this._controlPositions[l];return l.indexOf("bottom")!==-1?z.insertBefore(p,z.firstChild):z.appendChild(p),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new n.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const l=this._controls.indexOf(R);return l>-1&&this._controls.splice(l,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,l,p,z){return z==null&&this.terrain&&(z=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,l,p,z)}resize(R){var l;const p=this._containerDimensions(),z=p[0],j=p[1],q=this._getClampedPixelRatio(z,j);if(this._resizeCanvas(z,j,q),this.painter.resize(z,j,q),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const be=this._getClampedPixelRatio(z,j);this._resizeCanvas(z,j,be),this.painter.resize(z,j,be)}this.transform.resize(z,j),(l=this._requestedCameraState)===null||l===void 0||l.resize(z,j);const ie=!this._moving;return ie&&(this.stop(),this.fire(new n.k("movestart",R)).fire(new n.k("move",R))),this.fire(new n.k("resize",R)),ie&&this.fire(new n.k("moveend",R)),this}_getClampedPixelRatio(R,l){const{0:p,1:z}=this._maxCanvasSize,j=this.getPixelRatio(),q=R*j,ie=l*j,pe=q>p?p/q:1,be=ie>z?z/ie:1;return Math.min(pe,be)*j}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Te.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(n.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(n.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,l,p){if(R==="mouseenter"||R==="mouseover"){let z=!1;return{layer:l,listener:p,delegates:{mousemove:q=>{const ie=this.getLayer(l)?this.queryRenderedFeatures(q.point,{layers:[l]}):[];ie.length?z||(z=!0,p.call(this,new To(R,this,q.originalEvent,{features:ie}))):z=!1},mouseout:()=>{z=!1}}}}if(R==="mouseleave"||R==="mouseout"){let z=!1;return{layer:l,listener:p,delegates:{mousemove:ie=>{(this.getLayer(l)?this.queryRenderedFeatures(ie.point,{layers:[l]}):[]).length?z=!0:z&&(z=!1,p.call(this,new To(R,this,ie.originalEvent)))},mouseout:ie=>{z&&(z=!1,p.call(this,new To(R,this,ie.originalEvent)))}}}}{const z=j=>{const q=this.getLayer(l)?this.queryRenderedFeatures(j.point,{layers:[l]}):[];q.length&&(j.features=q,p.call(this,j),delete j.features)};return{layer:l,listener:p,delegates:{[R]:z}}}}on(R,l,p){if(p===void 0)return super.on(R,l);const z=this._createDelegatedListener(R,l,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(z);for(const j in z.delegates)this.on(j,z.delegates[j]);return this}once(R,l,p){if(p===void 0)return super.once(R,l);const z=this._createDelegatedListener(R,l,p);for(const j in z.delegates)this.once(j,z.delegates[j]);return this}off(R,l,p){return p===void 0?super.off(R,l):(this._delegatedListeners&&this._delegatedListeners[R]&&(z=>{const j=z[R];for(let q=0;q<j.length;q++){const ie=j[q];if(ie.layer===l&&ie.listener===p){for(const pe in ie.delegates)this.off(pe,ie.delegates[pe]);return j.splice(q,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,l){if(!this.style)return[];let p;const z=R instanceof n.P||Array.isArray(R),j=z?R:[[0,0],[this.transform.width,this.transform.height]];if(l=l||(z?{}:R)||{},j instanceof n.P||typeof j[0]=="number")p=[n.P.convert(j)];else{const q=n.P.convert(j[0]),ie=n.P.convert(j[1]);p=[q,new n.P(ie.x,q.y),ie,new n.P(q.x,ie.y),q]}return this.style.queryRenderedFeatures(p,l,this.transform)}querySourceFeatures(R,l){return this.style.querySourceFeatures(R,l)}setStyle(R,l){return(l=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(R,l))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const l=this._locale[R];if(l==null)throw new Error(`Missing UI string '${R}'`);return l}_updateStyle(R,l){if(l.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,l));const p=this.style&&l.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new ja(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,l,p):this.style.loadJSON(R,l,p),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ja(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,l){if(typeof R=="string"){const p=R,z=this._requestManager.transformRequest(p,"Style");n.h(z,new AbortController).then(j=>{this._updateDiff(j.data,l)}).catch(j=>{j&&this.fire(new n.j(j))})}else typeof R=="object"&&this._updateDiff(R,l)}_updateDiff(R,l){try{this.style.setState(R,l)&&this._update(!0)}catch(p){n.w(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(R,l)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():n.w("There is no style added to the map.")}addSource(R,l){return this._lazyInitEmptyStyle(),this.style.addSource(R,l),this._update(!0)}isSourceLoaded(R){const l=this.style&&this.style.sourceCaches[R];if(l!==void 0)return l.loaded();this.fire(new n.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const l=this.style.sourceCaches[R.source];if(!l)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&l.reload();for(const p in this.style._layers){const z=this.style._layers[p];z.type==="hillshade"&&z.source===R.source&&n.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.")}this.terrain=new ii(this.painter,l,R),this.painter.renderToTexture=new Ds(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=p=>{p.dataType==="style"?this.terrain.sourceCache.freeRtt():p.dataType==="source"&&p.tile&&(p.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(p.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.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new n.k("terrain",{terrain:R})),this}getTerrain(){var R,l;return(l=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&l!==void 0?l:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const l in R){const p=R[l]._tiles;for(const z in p){const j=p[z];if(j.state!=="loaded"&&j.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,l,p={}){const{pixelRatio:z=1,sdf:j=!1,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae}=p;if(this._lazyInitEmptyStyle(),!(l instanceof HTMLImageElement||n.b(l))){if(l.width===void 0||l.height===void 0)return this.fire(new n.j(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:Ne,height:Ge,data:at}=l,ct=l;return this.style.addImage(R,{data:new n.R({width:Ne,height:Ge},new Uint8Array(at)),pixelRatio:z,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae,sdf:j,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Ne,height:Ge,data:at}=u.getImageData(l);this.style.addImage(R,{data:new n.R({width:Ne,height:Ge},at),pixelRatio:z,stretchX:q,stretchY:ie,content:pe,textFitWidth:be,textFitHeight:Ae,sdf:j,version:0})}}updateImage(R,l){const p=this.style.getImage(R);if(!p)return this.fire(new n.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const z=l instanceof HTMLImageElement||n.b(l)?u.getImageData(l):l,{width:j,height:q,data:ie}=z;if(j===void 0||q===void 0)return this.fire(new n.j(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(j!==p.data.width||q!==p.data.height)return this.fire(new n.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(l instanceof HTMLImageElement||n.b(l));return p.data.replace(ie,pe),this.style.updateImage(R,p),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return T.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,l){return this._lazyInitEmptyStyle(),this.style.addLayer(R,l),this._update(!0)}moveLayer(R,l){return this.style.moveLayer(R,l),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,l,p){return this.style.setLayerZoomRange(R,l,p),this._update(!0)}setFilter(R,l,p={}){return this.style.setFilter(R,l,p),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,l,p,z={}){return this.style.setPaintProperty(R,l,p,z),this._update(!0)}getPaintProperty(R,l){return this.style.getPaintProperty(R,l)}setLayoutProperty(R,l,p,z={}){return this.style.setLayoutProperty(R,l,p,z),this._update(!0)}getLayoutProperty(R,l){return this.style.getLayoutProperty(R,l)}setGlyphs(R,l={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,l),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,l,p={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,l,p,z=>{z||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,l={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,l,p=>{p||this._update(!0)}),this}setLight(R,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,l),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,l){return this.style.setFeatureState(R,l),this._update()}removeFeatureState(R,l){return this.style.removeFeatureState(R,l),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,l=0;return this._container&&(R=this._container.clientWidth||400,l=this._container.clientHeight||300),[R,l]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const l=this._canvasContainer=r.create("div","maplibregl-canvas-container",R);this._interactive&&l.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",l),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 p=this._containerDimensions(),z=this._getClampedPixelRatio(p[0],p[1]);this._resizeCanvas(p[0],p[1],z);const j=this._controlContainer=r.create("div","maplibregl-control-container",R),q=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ie=>{q[ie]=r.create("div",`maplibregl-ctrl-${ie} `,j)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,l,p){this._canvas.width=Math.floor(p*R),this._canvas.height=Math.floor(p*l),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let l=null;this._canvas.addEventListener("webglcontextcreationerror",z=>{l={requestedAttributes:R},z&&(l.statusMessage=z.statusMessage,l.type=z.type)},{once:!0});const p=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!p){const z="Failed to initialize WebGL";throw l?(l.message=z,new Error(JSON.stringify(l))):new Error(z)}this.painter=new lc(p,this.transform),i.testSupport(p)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const l=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let p=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,q=u.now();this.style.zoomHistory.update(j,q);const ie=new n.a9(j,{now:q,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=ie.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(p=!0,this._crossFadingFactor=pe),this.style.update(ie)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,l,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding}),this.fire(new n.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,n.be.mark(n.bf.load),this.fire(new n.k("load"))),this.style&&(this.style.hasTransitions()||p)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const z=this._sourcesDirty||this._styleDirty||this._placementDirty;return z||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||z||(this._fullyLoaded=!0,n.be.mark(n.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const p of this._controls)p.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),T.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const l=this.painter.context.gl.getExtension("WEBGL_lose_context");l!=null&&l.loseContext&&l.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),n.be.clearMetrics(),this._removed=!0,this.fire(new n.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(R=>{n.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},h.MapMouseEvent=To,h.MapTouchEvent=go,h.MapWheelEvent=Js,h.Marker=Fi,h.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const l=this._map.getZoom(),p=l===this._map.getMaxZoom(),z=l===this._map.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=z,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",z.toString())},this._rotateCompassArrow=()=>{const l=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=l},this._setButtonTitle=(l,p)=>{const z=this._map._getUIString(`NavigationControl.${p}`);l.title=z,l.setAttribute("aria-label",z)},this.options=n.e({},Cs,R),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",l=>this._map.zoomIn({},{originalEvent:l})),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",l=>this._map.zoomOut({},{originalEvent:l})),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",l=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:l}):this._map.resetNorth({},{originalEvent:l})}),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,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._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Za(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.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._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,l){const p=r.create("button",R,this._container);return p.type="button",p.addEventListener("click",l),p}},h.Popup=wt,h.RasterDEMTileSource=Ve,h.RasterTileSource=Le,h.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=l=>{this.options.unit=l,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},tr),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},h.ScrollZoomHandler=el,h.Style=ja,h.TerrainControl=class{constructor(R){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=R}onAdd(R){return this._map=R,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.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(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},h.TwoFingersTouchPitchHandler=Dl,h.TwoFingersTouchRotateHandler=qc,h.TwoFingersTouchZoomHandler=sr,h.TwoFingersTouchZoomRotateHandler=nl,h.VectorTileSource=Ie,h.VideoSource=ye,h.addSourceType=(R,l)=>n._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((p,z)=>{ke[p]=z})(R,l)}),h.clearPrewarmedResources=function(){const R=fe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),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()"))},h.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},h.getRTLTextPluginStatus=function(){return Xe().getRTLTextPluginStatus()},h.getVersion=function(){return ne},h.getWorkerCount=function(){return de.workerCount},h.getWorkerUrl=function(){return n.a.WORKER_URL},h.importScriptInWorkers=function(R){return me().broadcast("IS",R)},h.prewarm=function(){le().acquire(ce)},h.setMaxParallelImageRequests=function(R){n.a.MAX_PARALLEL_IMAGE_REQUESTS=R},h.setRTLTextPlugin=function(R,l){return Xe().setRTLTextPlugin(R,l)},h.setWorkerCount=function(R){de.workerCount=R},h.setWorkerUrl=function(R){n.a.WORKER_URL=R}}),g}()},88640:function(b,g,a){function v(xe,Ce,Te){xe.prototype=Ce.prototype=Te,Te.constructor=xe}function h(xe,Ce){var Te=Object.create(xe.prototype);for(var Ee in Ce)Te[Ee]=Ce[Ee];return Te}function n(){}a.d(g,{GW:function(){return ge},Dj:function(){return de}});var x=.7,_=1/x,y="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,d=new RegExp("^rgb\\(".concat(y,",").concat(y,",").concat(y,"\\)$")),c=new RegExp("^rgb\\(".concat(r,",").concat(r,",").concat(r,"\\)$")),f=new RegExp("^rgba\\(".concat(y,",").concat(y,",").concat(y,",").concat(u,"\\)$")),m=new RegExp("^rgba\\(".concat(r,",").concat(r,",").concat(r,",").concat(u,"\\)$")),w=new RegExp("^hsl\\(".concat(u,",").concat(r,",").concat(r,"\\)$")),T=new RegExp("^hsla\\(".concat(u,",").concat(r,",").concat(r,",").concat(u,"\\)$")),A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function C(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function B(xe){var Ce,Te;return xe=(xe+"").trim().toLowerCase(),(Ce=i.exec(xe))?(Te=Ce[1].length,Ce=parseInt(Ce[1],16),Te===6?E(Ce):Te===3?new S(Ce>>8&15|Ce>>4&240,Ce>>4&15|240&Ce,(15&Ce)<<4|15&Ce,1):Te===8?I(Ce>>24&255,Ce>>16&255,Ce>>8&255,(255&Ce)/255):Te===4?I(Ce>>12&15|Ce>>8&240,Ce>>8&15|Ce>>4&240,Ce>>4&15|240&Ce,((15&Ce)<<4|15&Ce)/255):null):(Ce=d.exec(xe))?new S(Ce[1],Ce[2],Ce[3],1):(Ce=c.exec(xe))?new S(255*Ce[1]/100,255*Ce[2]/100,255*Ce[3]/100,1):(Ce=f.exec(xe))?I(Ce[1],Ce[2],Ce[3],Ce[4]):(Ce=m.exec(xe))?I(255*Ce[1]/100,255*Ce[2]/100,255*Ce[3]/100,Ce[4]):(Ce=w.exec(xe))?$(Ce[1],Ce[2]/100,Ce[3]/100,1):(Ce=T.exec(xe))?$(Ce[1],Ce[2]/100,Ce[3]/100,Ce[4]):A.hasOwnProperty(xe)?E(A[xe]):xe==="transparent"?new S(NaN,NaN,NaN,0):null}function E(xe){return new S(xe>>16&255,xe>>8&255,255&xe,1)}function I(xe,Ce,Te,Ee){return Ee<=0&&(xe=Ce=Te=NaN),new S(xe,Ce,Te,Ee)}function M(xe,Ce,Te,Ee){return arguments.length===1?((Ie=xe)instanceof n||(Ie=B(Ie)),Ie?new S((Ie=Ie.rgb()).r,Ie.g,Ie.b,Ie.opacity):new S):new S(xe,Ce,Te,Ee??1);var Ie}function S(xe,Ce,Te,Ee){this.r=+xe,this.g=+Ce,this.b=+Te,this.opacity=+Ee}function L(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b))}function k(){var xe=F(this.opacity);return"".concat(xe===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(xe===1?")":", ".concat(xe,")"))}function F(xe){return isNaN(xe)?1:Math.max(0,Math.min(1,xe))}function N(xe){return Math.max(0,Math.min(255,Math.round(xe)||0))}function V(xe){return((xe=N(xe))<16?"0":"")+xe.toString(16)}function $(xe,Ce,Te,Ee){return Ee<=0?xe=Ce=Te=NaN:Te<=0||Te>=1?xe=Ce=NaN:Ce<=0&&(xe=NaN),new U(xe,Ce,Te,Ee)}function G(xe){if(xe instanceof U)return new U(xe.h,xe.s,xe.l,xe.opacity);if(xe instanceof n||(xe=B(xe)),!xe)return new U;if(xe instanceof U)return xe;var Ce=(xe=xe.rgb()).r/255,Te=xe.g/255,Ee=xe.b/255,Ie=Math.min(Ce,Te,Ee),Le=Math.max(Ce,Te,Ee),Ve=NaN,Pe=Le-Ie,De=(Le+Ie)/2;return Pe?(Ve=Ce===Le?(Te-Ee)/Pe+6*(Te<Ee):Te===Le?(Ee-Ce)/Pe+2:(Ce-Te)/Pe+4,Pe/=De<.5?Le+Ie:2-Le-Ie,Ve*=60):Pe=De>0&&De<1?0:Ve,new U(Ve,Pe,De,xe.opacity)}function U(xe,Ce,Te,Ee){this.h=+xe,this.s=+Ce,this.l=+Te,this.opacity=+Ee}function K(xe){return(xe=(xe||0)%360)<0?xe+360:xe}function ae(xe){return Math.max(0,Math.min(1,xe||0))}function Z(xe,Ce,Te){return 255*(xe<60?Ce+(Te-Ce)*xe/60:xe<180?Te:xe<240?Ce+(Te-Ce)*(240-xe)/60:Ce)}v(n,B,{copy:function(xe){return Object.assign(new this.constructor,this,xe)},displayable:function(){return this.rgb().displayable()},hex:C,formatHex:C,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return G(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,h(n,{brighter:function(xe){return xe=xe==null?_:Math.pow(_,xe),new S(this.r*xe,this.g*xe,this.b*xe,this.opacity)},darker:function(xe){return xe=xe==null?x:Math.pow(x,xe),new S(this.r*xe,this.g*xe,this.b*xe,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),F(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:L,formatHex:L,formatHex8:function(){return"#".concat(V(this.r)).concat(V(this.g)).concat(V(this.b)).concat(V(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(U,function(xe,Ce,Te,Ee){return arguments.length===1?G(xe):new U(xe,Ce,Te,Ee??1)},h(n,{brighter:function(xe){return xe=xe==null?_:Math.pow(_,xe),new U(this.h,this.s,this.l*xe,this.opacity)},darker:function(xe){return xe=xe==null?x:Math.pow(x,xe),new U(this.h,this.s,this.l*xe,this.opacity)},rgb:function(){var xe=this.h%360+360*(this.h<0),Ce=isNaN(xe)||isNaN(this.s)?0:this.s,Te=this.l,Ee=Te+(Te<.5?Te:1-Te)*Ce,Ie=2*Te-Ee;return new S(Z(xe>=240?xe-240:xe+120,Ie,Ee),Z(xe,Ie,Ee),Z(xe<120?xe+240:xe-120,Ie,Ee),this.opacity)},clamp:function(){return new U(K(this.h),ae(this.s),ae(this.l),F(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var xe=F(this.opacity);return"".concat(xe===1?"hsl(":"hsla(").concat(K(this.h),", ").concat(100*ae(this.s),"%, ").concat(100*ae(this.l),"%").concat(xe===1?")":", ".concat(xe,")"))}}));var te=function(xe){return function(){return xe}};function Q(xe,Ce){var Te=Ce-xe;return Te?function(Ee,Ie){return function(Le){return Ee+Le*Ie}}(xe,Te):te(isNaN(xe)?Ce:xe)}var J=function xe(Ce){var Te=function(Ie){return(Ie=+Ie)==1?Q:function(Le,Ve){return Ve-Le?function(Pe,De,Be){return Pe=Math.pow(Pe,Be),De=Math.pow(De,Be)-Pe,Be=1/Be,function(ye){return Math.pow(Pe+ye*De,Be)}}(Le,Ve,Ie):te(isNaN(Le)?Ve:Le)}}(Ce);function Ee(Ie,Le){var Ve=Te((Ie=M(Ie)).r,(Le=M(Le)).r),Pe=Te(Ie.g,Le.g),De=Te(Ie.b,Le.b),Be=Q(Ie.opacity,Le.opacity);return function(ye){return Ie.r=Ve(ye),Ie.g=Pe(ye),Ie.b=De(ye),Ie.opacity=Be(ye),Ie+""}}return Ee.gamma=xe,Ee}(1);function Y(xe,Ce){var Te,Ee=Ce?Ce.length:0,Ie=xe?Math.min(Ee,xe.length):0,Le=new Array(Ie),Ve=new Array(Ee);for(Te=0;Te<Ie;++Te)Le[Te]=ge(xe[Te],Ce[Te]);for(;Te<Ee;++Te)Ve[Te]=Ce[Te];return function(Pe){for(Te=0;Te<Ie;++Te)Ve[Te]=Le[Te](Pe);return Ve}}function ce(xe,Ce){var Te=new Date;return xe=+xe,Ce=+Ce,function(Ee){return Te.setTime(xe*(1-Ee)+Ce*Ee),Te}}function de(xe,Ce){return xe=+xe,Ce=+Ce,function(Te){return xe*(1-Te)+Ce*Te}}function he(xe){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce},he(xe)}function fe(xe,Ce){var Te,Ee={},Ie={};for(Te in xe!==null&&he(xe)==="object"||(xe={}),Ce!==null&&he(Ce)==="object"||(Ce={}),Ce)Te in xe?Ee[Te]=ge(xe[Te],Ce[Te]):Ie[Te]=Ce[Te];return function(Le){for(Te in Ee)Ie[Te]=Ee[Te](Le);return Ie}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,le=new RegExp(re.source,"g");function se(xe,Ce){var Te,Ee,Ie,Le=re.lastIndex=le.lastIndex=0,Ve=-1,Pe=[],De=[];for(xe+="",Ce+="";(Te=re.exec(xe))&&(Ee=le.exec(Ce));)(Ie=Ee.index)>Le&&(Ie=Ce.slice(Le,Ie),Pe[Ve]?Pe[Ve]+=Ie:Pe[++Ve]=Ie),(Te=Te[0])===(Ee=Ee[0])?Pe[Ve]?Pe[Ve]+=Ee:Pe[++Ve]=Ee:(Pe[++Ve]=null,De.push({i:Ve,x:de(Te,Ee)})),Le=le.lastIndex;return Le<Ce.length&&(Ie=Ce.slice(Le),Pe[Ve]?Pe[Ve]+=Ie:Pe[++Ve]=Ie),Pe.length<2?De[0]?function(Be){return function(ye){return Be(ye)+""}}(De[0].x):function(Be){return function(){return Be}}(Ce):(Ce=De.length,function(Be){for(var ye,Me=0;Me<Ce;++Me)Pe[(ye=De[Me]).i]=ye.x(Be);return Pe.join("")})}function me(xe,Ce){Ce||(Ce=[]);var Te,Ee=xe?Math.min(Ce.length,xe.length):0,Ie=Ce.slice();return function(Le){for(Te=0;Te<Ee;++Te)Ie[Te]=xe[Te]*(1-Le)+Ce[Te]*Le;return Ie}}function ve(xe){return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ce){return typeof Ce}:function(Ce){return Ce&&typeof Symbol=="function"&&Ce.constructor===Symbol&&Ce!==Symbol.prototype?"symbol":typeof Ce},ve(xe)}function ge(xe,Ce){var Te,Ee,Ie=ve(Ce);return Ce==null||Ie==="boolean"?te(Ce):(Ie==="number"?de:Ie==="string"?(Te=B(Ce))?(Ce=Te,J):se:Ce instanceof B?J:Ce instanceof Date?ce:(Ee=Ce,!ArrayBuffer.isView(Ee)||Ee instanceof DataView?Array.isArray(Ce)?Y:typeof Ce.valueOf!="function"&&typeof Ce.toString!="function"||isNaN(Ce)?fe:de:me))(xe,Ce)}},23648:function(b){b.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(b){b.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(b){b.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(b){b.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(b){b.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(b){b.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(b){b.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(b){b.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},O={};function W(b){var g=O[b];if(g!==void 0)return g.exports;var a=O[b]={id:b,exports:{}};return s[b].call(a.exports,a,a.exports,W),a.exports}return W.m=s,W.n=function(b){var g=b&&b.__esModule?function(){return b.default}:function(){return b};return W.d(g,{a:g}),g},W.d=function(b,g){for(var a in g)W.o(g,a)&&!W.o(b,a)&&Object.defineProperty(b,a,{enumerable:!0,get:g[a]})},W.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),W.o=function(b,g){return Object.prototype.hasOwnProperty.call(b,g)},W.r=function(b){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(b,"__esModule",{value:!0})},W.b=document.baseURI||self.location.href,W.nc=void 0,W(20260)}()})})(pD);var mst=pD.exports;const fD=w4(mst),MUt="",IUt="",gst={ref:"card",class:"card-volumetric-field"},mD=1,yst=800,gD=300,vst=-46,yD=100,vD=-14,_st=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const o=e,s=new Set([2,20,308,310]),O=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let W=null;const b=t.ref(null),g=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>o.passesPlays,f=>{const m=f.reduce((w,T)=>(s.has(T[o.playIndexes.categoryId])&&w.push({x1:T[o.playIndexes.coordinate1X],y1:T[o.playIndexes.coordinate1Y],x2:T[o.playIndexes.coordinate2X],y2:T[o.playIndexes.coordinate2Y],x3:T[o.playIndexes.coordinate3X],y3:T[o.playIndexes.coordinate3Y]}),w),[]);c(m)}),t.watch(()=>a.value,(f,m)=>{v.value&&(r(f),g.value.style.height=`${i(f)}px`,v.value.style.top=`${d(i(f))}px`)});function h(){W=new ResizeObserver(f=>{for(const m of f)a.value=m.contentRect.width}),W.observe(b.value)}function n(f){return Array.from({length:f},()=>0)}function x(f,m){let w=.01351,T=.02439,A=0,C=0,P=[];const B=m.length,E=Math.floor(B/10);for(;A<74;)C=m.filter(I=>1-I.y3>=A*w&&1-I.y3<=(A+1)*w&&1-I.x3>=f*T&&1-I.x3<=(f+1)*T).map(I=>I.y3).length,P.push(parseFloat((C/E).toFixed(4))),A++;return P.reverse()}function _(f){let m=[n(74),n(74)],w=[],T=39;for(;T>0&&T<=39;)w=x(T,f),m.push(w),T--;return m.push(n(74),n(74)),m}function y(f,m,w){const T=[];let P=0,B=0;T.push(f[0]);for(let E=1;E<w-1;E++){const I=[];I.push(f[E][0]);for(let M=1;M<m-1;M++)P=f[E][M-1],B=f[E][M+1],I.push(P+.5*(f[E][M]+B-P));I.push(f[E][m-1]),T.push(I)}T.push(f[w-1]);for(let E=1;E<m-1;E++)for(let I=1;I<w-1;I++)P=T[I-1][E],B=T[I+1][E],T[I][E]=P+.5*(T[I][E]+B-P);return T}function u(f){let m=0,w=0;for(let T=0;T<f.length;T++){w=w+f[T].reduce(function(C,P){return C+P});const A=Math.max.apply(null,f[T]);A>m&&(m=A)}return m}function r(f){fD.relayout(b.value,{width:f,height:i(f)})}function i(f){return Math.round(gD/yst*f,0)}function d(f){return vD+(f-yD)/(gD-yD)*(vst-vD)}function c(f){let m=_(f),w=m.length,T=m[0].length;m=y(y(m,T,w),T,w),T=m[0].length,w=m.length;const A=u(m),C=[{z:m,type:"surface",connectgaps:!0,opacity:.25,colorscale:O,autoscale:!1,showscale:!1}],P=[0,T],B=[0,w],E=[0,A*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:B},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:E},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};g.value&&(g.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<T;S++){const L=[],k=[],F=[];for(let N=0;N<w;N++)L.push(S),k.push(N),F.push(C[0].z[N][S]);M.push({x:L,y:k,z:F,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:A,width:mD,color:F,colorscale:O,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const L=[],k=[],F=[];for(let N=0;N<T;N++)L.push(N),k.push(S),F.push(C[0].z[S][N]);M.push({x:L,y:k,z:F,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:A,width:mD,color:F,colorscale:O,shape:"spline",smoothing:.6,dash:"dotline"}})}fD.newPlot("surface-plot",C.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${d(i(a.value))}px`)}return t.onMounted(()=>{b.value&&(b.value.style.pointerEvents="none"),h()}),(f,m)=>(t.openBlock(),t.createElementBlock("div",gst,[t.createElementVNode("div",{ref_key:"volumetricField",ref:g,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:b,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-46439c02"]]),BUt="",_D=e=>(t.pushScopeId("data-v-885deed1"),e=e(),t.popScopeId(),e),bst=_D(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),xst=_D(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),wst=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(O,W)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[bst,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),xst],4))}},[["__scopeId","data-v-885deed1"]]),kst=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let y9=null;function Sst(){return y9||(y9=fy(kst)),y9}const FUt="",Tst=e=>(t.pushScopeId("data-v-b3d91153"),e=e(),t.popScopeId(),e),Cst={class:"volumetric-section-container"},Est=Tst(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),Ast={key:0,class:"volumetric-section-container__switch"},Mst={class:"volumetric-section-container__attack-direction"},Ist={class:"volumetric-section-container__field"},Pst=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=e,s=Sst(),O=new Set([2,20,308,310]),W=new Set([3,21,309]),b=new Set([...O,...W]);let g=null;const a=t.ref(0),v=t.ref(new Map),h=t.ref({teamId:0}),n=t.computed(()=>[{teamId:o.game.homeTeam.team_id,text:o.game.homeTeam.colloquial_name,img:o.game.homeTeam.logo,isHomeTeam:!0},{teamId:o.game.awayTeam.team_id,text:o.game.awayTeam.colloquial_name,img:o.game.awayTeam.logo,isHomeTeam:!1}]),x=t.computed(()=>v.value.get(o.isGamePreMatch?o.teamSelectedPreMatch.teamId:h.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,h.value=n.value[a.value]},{immediate:!0}),t.watch(()=>o.game.gameId,f=>{f&&(c(),y(o.game.is_live&&o.game.game_status===4))},{immediate:!0});function _(){g=setInterval(()=>{y()},1e3*60*o.volumetricFieldIntervalMinutes)}async function y(f=!1){try{const m=await r();v.value.set(o.game.homeTeam.team_id,m.homeTeam),v.value.set(o.game.awayTeam.team_id,m.awayTeam),f&&_()}catch(m){throw new Error(m)}}function u(f){return o.game.game_status===4&&!o.game.is_live?f[s.gameId]!==o.game.gameId:f[s.gameId]===o.game.gameId}async function r(f=0){try{let m={homeTeam:[],awayTeam:[]};if(o.game.is_live||o.game.game_status===0){const w=await vu.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${o.game.gameId}`),T=w.data?w.data.data||[]:[],A=new Set;T.forEach(C=>{A.add(C[s.categoryId]),C[s.teamId]===o.game.homeTeam.team_id&&b.has(C[s.categoryId])&&u(C)?(i(C),m.homeTeam.push(C)):C[s.teamId]===o.game.awayTeam.team_id&&b.has(C[s.categoryId])&&u(C)&&(C[s.coordinate1Y]=1-C[s.coordinate1Y],C[s.coordinate2Y]=1-C[s.coordinate2Y],C[s.coordinate3Y]=1-C[s.coordinate3Y],C[s.coordinate1X]=1-C[s.coordinate1X],C[s.coordinate2X]=1-C[s.coordinate2X],C[s.coordinate3X]=1-C[s.coordinate3X],i(C),m.awayTeam.push(C))})}else{const[w,T]=await Promise.all([vu.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||o.game.seasonId}-${o.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),vu.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${f||o.game.seasonId}-${o.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);if(!w.data.data.posession.length&&!T.data.data.posession.length&&!f)return r(o.game.regularSeasonId);m={homeTeam:w.data.data.posession.filter(A=>A[s.teamId]===o.game.homeTeam.team_id&&b.has(A[s.categoryId])&&u(A)),awayTeam:T.data.data.posession.filter(A=>A[s.teamId]===o.game.awayTeam.team_id&&b.has(A[s.categoryId])&&u(A)?(A[s.coordinate1Y]=1-A[s.coordinate1Y],A[s.coordinate2Y]=1-A[s.coordinate2Y],A[s.coordinate3Y]=1-A[s.coordinate3Y],A[s.coordinate1X]=1-A[s.coordinate1X],A[s.coordinate2X]=1-A[s.coordinate2X],A[s.coordinate3X]=1-A[s.coordinate3X],!0):!1)}}return m}catch(m){throw new Error(m)}}function i(f){const m=f[s.coordinate1X],w=f[s.coordinate2X],T=f[s.coordinate3X];return f[s.coordinate1X]=f[s.coordinate1Y],f[s.coordinate2X]=f[s.coordinate2Y],f[s.coordinate3X]=f[s.coordinate3Y],f[s.coordinate1Y]=m,f[s.coordinate2Y]=w,f[s.coordinate3Y]=T,f}function d(f){a.value=f.index,h.value=f.button}function c(){g&&clearInterval(g)}return t.onUnmounted(()=>{c()}),(f,m)=>(t.openBlock(),t.createElementBlock("div",Cst,[Est,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ast,[t.createVNode(q3,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:d},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",Mst,[t.createVNode(wst,{team:e.isGamePreMatch?e.teamSelectedPreMatch:h.value},null,8,["team"])]),t.createElementVNode("div",Ist,[t.createVNode(_st,{"passes-plays":x.value,"play-indexes":t.unref(s)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-b3d91153"]]),zUt="";let bD=null;const Bst={components:{GSCHighlights:tUe,ToggleButtons:q3,VolumetricSectionContainer:Pst,DataProminentGame:mUe,HighlightsProminentGameLive:BGe,HighlightsProminentGame:mGe,GSCRadioToggle:Nz,FieldPosesion:ZUe,EventsLine:wHe,ChalkboardSectionContainer:fst},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){console.log("SE EMITIO ESTO LLEGO AQUI MERO LERO ",e),this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)bD=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),bD.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},Xm=e=>(t.pushScopeId("data-v-9e8d984c"),e=e(),t.popScopeId(),e),Lst={class:"container-prominent",ref:"prominent"},Fst={key:0,class:"container-prominent-data"},Ost={class:"container-prominent-section"},zst={key:0,class:"highlights-containers"},Nst={class:"highlights-content"},Dst={key:1,class:"highlights-containers"},Rst=Xm(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),Vst={key:0,class:"container-leyend-prematch"},jst=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),$st={key:1,class:"container-leyend-prematch-movil"},Ust=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),Gst=Xm(()=>t.createElementVNode("br",null,null,-1)),Hst=Xm(()=>t.createElementVNode("br",null,null,-1)),Wst={key:2,class:"container-leyend-prematch-movil"},qst=Xm(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),Zst=Xm(()=>t.createElementVNode("br",null,null,-1)),Xst=Xm(()=>t.createElementVNode("br",null,null,-1)),Jst={class:"container-switch-toggle"},Kst={class:"container-prominent-section__chalkboard"},Yst=Xm(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function Qst(e,o,s,O,W,b){const g=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),h=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),x=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),y=t.resolveComponent("FieldPosesion"),u=t.resolveComponent("VolumetricSectionContainer"),r=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",Lst,[s.seasonSelected.incomplete_season==1&&s.game.game_status==4?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Fst,[t.createVNode(g,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:b.openmedia,onLoading:b.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",Ost,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",zst,[t.createElementVNode("div",{class:t.normalizeClass(b.getContainerClass())},[W.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(W.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(W.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(W.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Nst,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(W.showgoalsliveData?W.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:b.showgoalslive,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onIntervalidhighlive:b.intervalidhighlive,onOpenmedia:b.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onIntervalidhighlive:b.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:b.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(W.showsummaryliveData?W.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onShowsummarylive:b.showsummarylive,onIntervalidhighlive:b.intervalidhighlive,onOpenmedia:b.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:b.showsummarylive,onShowleyendlive:b.showleyendlive,onShowgoalslive:b.showgoalslive,onIntervalidhighlive:b.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:b.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Dst,[!W.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(h,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:b.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),b.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(W.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:s.token,game:s.game,widthScreen:W.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:b.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(W.widthSection>760?"fields-section-container":"fields-section-container-movil")},[Rst,s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[W.widthSection>590?(t.openBlock(),t.createElementBlock("div",Vst,[jst,t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),W.widthSection>340&&W.widthSection<=590?(t.openBlock(),t.createElementBlock("div",$st,[Ust,t.createTextVNode("  "),Gst,t.createTextVNode("Con base en las estadisticas de los partidos ya "),Hst,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),W.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Wst,[qst,t.createTextVNode("  "),Zst,t.createTextVNode("Con base en las estadisticas de los "),Xst,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(x,{"selected-button-index":W.teamButtonSelectedIndex,buttons:b.toggleButtons,width:"320px","border-radius":"16px",onChange:b.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Jst,[t.createVNode(_,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:b.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,W.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(y,{"width-Section":W.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:b.intervalidpossesion,"team-selected":W.teamSelected.teamId===0?b.toggleButtons[0]:W.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,W.switchTypeViewFiled==="Porcentajes"||W.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(W.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(u,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":b.isGamePreMatch,"team-selected-pre-match":W.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,W.viewVolumtrica&&W.widthSection>760||W.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Kst,[Yst,W.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":W.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":b.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:b.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const elt=Ki(Bst,[["render",Qst],["__scopeId","data-v-9e8d984c"]]),NUt="",tlt={class:"datagame-container"},nlt=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){function s(g){o("intervalidhighlive",g)}function O(g){o("intervalidpossesion",g)}function W(g){o("openmedia",g)}function b(g){o("openmedia",g)}return(g,a)=>(t.openBlock(),t.createElementBlock("div",tlt,[t.createVNode(elt,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:O,onIntervalidhighlive:s,onOpenmedia:W,onOpenMediaPlayer:b},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-f33283ce"]]),alt={class:"datagame-container"},rlt={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=e,O=t.ref(0);t.watch(()=>s.game,g=>{O.value=g.gameId},{deep:!0,immediate:!0});function W(g){o("openmedia",g)}function b(g){o("intervalidgs",g)}return(g,a)=>(t.openBlock(),t.createElementBlock("div",alt,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:b,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(c2),{key:O.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:W},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},ilt={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function F2(e){const o=t.ref({width:0,height:0});function s(){const O=e.value.getBoundingClientRect();o.value.width=O.width,o.value.height=O.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const olt={containerLeftTitles:"_containerLeftTitles_82svp_119",containerLeftTitles420:"_containerLeftTitles420_82svp_135",containerLeftTitles620:"_containerLeftTitles620_82svp_151",containerLeftTitlesTeam:"_containerLeftTitlesTeam_82svp_169",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_82svp_185",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_82svp_201",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_82svp_217",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_82svp_233",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_82svp_249",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_82svp_265",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_82svp_281",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_82svp_297",headTitlesAvanced:"_headTitlesAvanced_82svp_315",headTitlesAvanced960:"_headTitlesAvanced960_82svp_345",headTitlesAvanced420:"_headTitlesAvanced420_82svp_375",headTitlesAvanced540:"_headTitlesAvanced540_82svp_415",headTitlesAvanced460:"_headTitlesAvanced460_82svp_445",headTitlesAvanced620:"_headTitlesAvanced620_82svp_475",position:"_position_82svp_505",position420:"_position420_82svp_523",player:"_player_82svp_529",player420:"_player420_82svp_551",containerRightTypeAvanced1:"_containerRightTypeAvanced1_82svp_559",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_82svp_573",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_82svp_591",block02Titles:"_block02Titles_82svp_609",block02Titles620:"_block02Titles620_82svp_625",mon1Scouting:"_mon1Scouting_82svp_633",mon1Scouting960:"_mon1Scouting960_82svp_653",mon1:"_mon1_82svp_633",mon1420:"_mon1420_82svp_689",mon1620:"_mon1620_82svp_709",icnIcon:"_icnIcon_82svp_729",icnIcon960:"_icnIcon960_82svp_739",icnIcon420:"_icnIcon420_82svp_751",teamTitle:"_teamTitle_82svp_759",positionTitle:"_positionTitle_82svp_779",ageTitle:"_ageTitle_82svp_795",partidos:"_partidos_82svp_811",playedGamesTitle:"_playedGamesTitle_82svp_819",playedMinutesTitle:"_playedMinutesTitle_82svp_839",block01Titles:"_block01Titles_82svp_857",mon:"_mon_82svp_633",containesOptionsTitles:"_containesOptionsTitles_82svp_889",templateTablaProductividadType1:"_templateTablaProductividadType1_82svp_903",templateTablaProductividadType1400:"_templateTablaProductividadType1400_82svp_927",headTitlesType1:"_headTitlesType1_82svp_955",headTitlesType1420:"_headTitlesType1420_82svp_981",headTitlesType1400:"_headTitlesType1400_82svp_1013",headTitlesType1540:"_headTitlesType1540_82svp_1045",headTitlesType1460:"_headTitlesType1460_82svp_1073",headTitlesType1680:"_headTitlesType1680_82svp_1101",headTitlesType1350:"_headTitlesType1350_82svp_1127",positionType1:"_positionType1_82svp_1157",positionType1400:"_positionType1400_82svp_1175",teamType1:"_teamType1_82svp_1195",teamType1400:"_teamType1400_82svp_1213",frecuenciaType1:"_frecuenciaType1_82svp_1233",frecuenciaType1540:"_frecuenciaType1540_82svp_1249",containerLeftTitlesType1:"_containerLeftTitlesType1_82svp_1267",frecuenciaWrapperType1:"_frecuenciaWrapperType1_82svp_1283",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_82svp_1301",promedioPartidoType1:"_promedioPartidoType1_82svp_1317",promedioEstePartidoType1:"_promedioEstePartidoType1_82svp_1325",promedioEstePartidoType1960:"_promedioEstePartidoType1960_82svp_1341",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_82svp_1349",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_82svp_1365",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_82svp_1383",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_82svp_1403",promedioPartidosType1:"_promedioPartidosType1_82svp_1421",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_82svp_1435",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_82svp_1451",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_82svp_1457",partidosJugadosType1:"_partidosJugadosType1_82svp_1463",partidosJugadosType1960:"_partidosJugadosType1960_82svp_1475",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_82svp_1489",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_82svp_1505",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_82svp_1521",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_82svp_1537",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_82svp_1553",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_82svp_1569",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_82svp_1585",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_82svp_1601",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_82svp_1617",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_82svp_1633",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_82svp_1649",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_82svp_1665",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_82svp_1681",block01TitlesType1:"_block01TitlesType1_82svp_1687",monType1:"_monType1_82svp_1703",monType1960:"_monType1960_82svp_1721",monType1680:"_monType1680_82svp_1741",videosType1:"_videosType1_82svp_1747",videosType1680:"_videosType1680_82svp_1767",videosType1600:"_videosType1600_82svp_1785",videosType1540:"_videosType1540_82svp_1803",videosType1420:"_videosType1420_82svp_1821",videosType1400:"_videosType1400_82svp_1839",containesOptionsTitlesType1:"_containesOptionsTitlesType1_82svp_1863",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_82svp_1879",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_82svp_1893",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_82svp_1907",icnIconType1:"_icnIconType1_82svp_1921",icnIconType1420:"_icnIconType1420_82svp_1933",icnIconType1400:"_icnIconType1400_82svp_1947",block02TitlesType1:"_block02TitlesType1_82svp_1955",block02TitlesType1680:"_block02TitlesType1680_82svp_1969",block02TitlesType1350:"_block02TitlesType1350_82svp_1983",containerRightTitlesType1:"_containerRightTitlesType1_82svp_1997",containerRightTitlesType1420:"_containerRightTitlesType1420_82svp_2015"},v9={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=F2(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},xD=()=>{t.useCssVars(e=>({"32aec1ca":e.background,"4e54a87a":e.height,"448b848c":e.fontSize,"4c061c38":e.fontColor,"3917092f":e.fontFamily,"4a286e80":e.heightTeam}))},wD=v9.setup;v9.setup=wD?(e,o)=>(xD(),wD(e,o)):xD;const slt={ref:"myDivRef"},llt=t.createElementVNode("br",null,null,-1),clt=t.createElementVNode("br",null,null,-1);function ult(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",slt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(b.frecuenciaWrapperType1Class)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),llt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),clt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containesOptionsTitlesType1Class)},[O.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(b.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(b.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const kD=Ki(v9,[["render",ult],["__cssModules",{$style:olt}]]),$Ht="",_9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},SD=()=>{t.useCssVars(e=>({"142f4a30":e.height,"425d470b":e.borderWidthBtn,e390e3e2:e.borderType,"37c60b2e":e.borderColor,"4c69ebb2":e.borderRadius,"1e10a0c6":e.width,64535028:e.backgroundColor,"26a98839":e.cursorType,"0ff73bb9":e.fontSize,"22158e0e":e.fontStyle,"4f1cadc8":e.fontFamily,"38d08a5c":e.marginLeftStat,f38f9ca6:e.fontSizeStat}))},TD=_9.setup;_9.setup=TD?(e,o)=>(SD(),TD(e,o)):SD;const dlt=e=>(t.pushScopeId("data-v-2d2e96b3"),e=e(),t.popScopeId(),e),hlt=["src"],plt={key:1,class:"text"},flt=["src"],mlt={class:"stats"},glt=dlt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ylt={class:"numstats"},vlt={class:"leyend"};function _lt(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,hlt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",plt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,flt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",mlt,[glt,t.createElementVNode("div",ylt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",vlt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const CD=Ki(_9,[["render",_lt],["__scopeId","data-v-2d2e96b3"]]),blt={rotate:"_rotate_1cvqy_5",positionContainer:"_positionContainer_1cvqy_99",positionContainer620:"_positionContainer620_1cvqy_113",rowwPlayerGames:"_rowwPlayerGames_1cvqy_127",rowwPlayer960Games:"_rowwPlayer960Games_1cvqy_159",rowwPlayer420Games:"_rowwPlayer420Games_1cvqy_189",rowwPlayer460Games:"_rowwPlayer460Games_1cvqy_221",containerLeftGames:"_containerLeftGames_1cvqy_255",containerLeft420Games:"_containerLeft420Games_1cvqy_271",containerLeft620Games:"_containerLeft620Games_1cvqy_287",iconFavoritesType1:"_iconFavoritesType1_1cvqy_301",iconFavoritesType1320:"_iconFavoritesType1320_1cvqy_317",iconFavorites:"_iconFavorites_1cvqy_301",iconFavorites420:"_iconFavorites420_1cvqy_349",playerContainerGames:"_playerContainerGames_1cvqy_365",playerContainer420Games:"_playerContainer420Games_1cvqy_389",playerContainer460Games:"_playerContainer460Games_1cvqy_413",playerContainerType1Games:"_playerContainerType1Games_1cvqy_437",playerContainerType1320Games:"_playerContainerType1320Games_1cvqy_457",playerContainerType1460Games:"_playerContainerType1460Games_1cvqy_477",imgPlayerIcon:"_imgPlayerIcon_1cvqy_497",imgPlayerIcon460:"_imgPlayerIcon460_1cvqy_517",imgPlayerIcon420:"_imgPlayerIcon420_1cvqy_537",manchesterUnitedGames:"_manchesterUnitedGames_1cvqy_557",manchesterUnited360Games:"_manchesterUnited360Games_1cvqy_579",manchesterUnited420Games:"_manchesterUnited420Games_1cvqy_601",manchesterUnited460Games:"_manchesterUnited460Games_1cvqy_623",containerRightGames:"_containerRightGames_1cvqy_645",containerRight960Games:"_containerRight960Games_1cvqy_663",containerRight420Games:"_containerRight420Games_1cvqy_683",numberOfVideos:"_numberOfVideos_1cvqy_705",numberOfVideos620:"_numberOfVideos620_1cvqy_717",block02Games:"_block02Games_1cvqy_729",block02960Games:"_block02960Games_1cvqy_749",block02620Games:"_block02620Games_1cvqy_767",block02420Games:"_block02420Games_1cvqy_781",verVideos:"_verVideos_1cvqy_797",verVideos620:"_verVideos620_1cvqy_809",numberPosition:"_numberPosition_1cvqy_815",shapeIcon:"_shapeIcon_1cvqy_827",chivasIcon:"_chivasIcon_1cvqy_837",imgTeamIcon:"_imgTeamIcon_1cvqy_859",teamName:"_teamName_1cvqy_869",nameTeamGames:"_nameTeamGames_1cvqy_881",dfC:"_dfC_1cvqy_899",position:"_position_1cvqy_99",age:"_age_1cvqy_919",manchesterUnitedIcon:"_manchesterUnitedIcon_1cvqy_935",country:"_country_1cvqy_949",playedGames:"_playedGames_1cvqy_963",playedMinutes:"_playedMinutes_1cvqy_977",block01:"_block01_1cvqy_991",leagueName:"_leagueName_1cvqy_1005",roleCharacterIcon:"_roleCharacterIcon_1cvqy_1017",btnVideosGames:"_btnVideosGames_1cvqy_1033",containerBtnVideosGames:"_containerBtnVideosGames_1cvqy_1063",containerBtnVideos620Games:"_containerBtnVideos620Games_1cvqy_1083",containesOptions:"_containesOptions_1cvqy_1101",arrowExpandIcon:"_arrowExpandIcon_1cvqy_1115",rowTeam:"_rowTeam_1cvqy_1133",rowTeam420:"_rowTeam420_1cvqy_1169",rowTeam320:"_rowTeam320_1cvqy_1205",rowTeam460:"_rowTeam460_1cvqy_1243",rowTeam350:"_rowTeam350_1cvqy_1281",containerLeftType1:"_containerLeftType1_1cvqy_1317",containerLeftType1680:"_containerLeftType1680_1cvqy_1329",containerLeftType1320:"_containerLeftType1320_1cvqy_1343",containerLeftType1350:"_containerLeftType1350_1cvqy_1359",positionContainertype1:"_positionContainertype1_1cvqy_1373",positionContainertype1380:"_positionContainertype1380_1cvqy_1389",positionContainertype1680:"_positionContainertype1680_1cvqy_1405",positionContainertype1420:"_positionContainertype1420_1cvqy_1421",manchesterUnitedType1:"_manchesterUnitedType1_1cvqy_1437",manchesterUnitedType1460:"_manchesterUnitedType1460_1cvqy_1449",manchesterUnitedType1320:"_manchesterUnitedType1320_1cvqy_1463",containerRightType1Games:"_containerRightType1Games_1cvqy_1477",containerRightType1420Games:"_containerRightType1420Games_1cvqy_1499",containerRightType1320Games:"_containerRightType1320Games_1cvqy_1521",teamNameWrapperType1:"_teamNameWrapperType1_1cvqy_1543",teamNameWrapperType1960:"_teamNameWrapperType1960_1cvqy_1557",teamNameWrapperType11086:"_teamNameWrapperType11086_1cvqy_1571",ageWrapperType1:"_ageWrapperType1_1cvqy_1585",ageWrapperType1680:"_ageWrapperType1680_1cvqy_1599",ageWrapperType11086:"_ageWrapperType11086_1cvqy_1615",ageType1:"_ageType1_1cvqy_1631",ageType1960:"_ageType1960_1cvqy_1647",playedGamesWrapperType1:"_playedGamesWrapperType1_1cvqy_1653",playedGamesWrapperType1680:"_playedGamesWrapperType1680_1cvqy_1667",playedGamesWrapperType1960:"_playedGamesWrapperType1960_1cvqy_1673",playedGamesType1:"_playedGamesType1_1cvqy_1679",playedGamesType1540:"_playedGamesType1540_1cvqy_1693",playedGamesType1960:"_playedGamesType1960_1cvqy_1701",playedGamesType11086:"_playedGamesType11086_1cvqy_1707",playedMinutesWrapperType1:"_playedMinutesWrapperType1_1cvqy_1713",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_1cvqy_1727",playedMinutesType1:"_playedMinutesType1_1cvqy_1741",playedMinutesType1680:"_playedMinutesType1680_1cvqy_1755",block02Type1Games:"_block02Type1Games_1cvqy_1761",block02Type1680Games:"_block02Type1680Games_1cvqy_1777",block02Type1320Games:"_block02Type1320Games_1cvqy_1793",block02Type1350Games:"_block02Type1350Games_1cvqy_1811",leagueNameWrapperType1:"_leagueNameWrapperType1_1cvqy_1827",leagueNameWrapperType1680:"_leagueNameWrapperType1680_1cvqy_1843",leagueNameWrapperType1960:"_leagueNameWrapperType1960_1cvqy_1849",leagueNameType1:"_leagueNameType1_1cvqy_1865",leagueNameType1960:"_leagueNameType1960_1cvqy_1885",numberOfVideosType1:"_numberOfVideosType1_1cvqy_1905",numberOfVideosType1680:"_numberOfVideosType1680_1cvqy_1919",numberOfVideosType11232:"_numberOfVideosType11232_1cvqy_1933",vectorIconType1:"_vectorIconType1_1cvqy_1947",block01TitlesType1:"_block01TitlesType1_1cvqy_1981",numberPositionType1:"_numberPositionType1_1cvqy_1995",shapeIconType1:"_shapeIconType1_1cvqy_2007",tijuanaIconType1:"_tijuanaIconType1_1cvqy_2019",tijuanaWrapperType1:"_tijuanaWrapperType1_1cvqy_2031",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_1cvqy_2053",teamNameType1:"_teamNameType1_1cvqy_2069",roleCharacterIconType1:"_roleCharacterIconType1_1cvqy_2083",verVideosType1:"_verVideosType1_1cvqy_2097",btnVideosType1Games:"_btnVideosType1Games_1cvqy_2109",containerBtnVideosType1Games:"_containerBtnVideosType1Games_1cvqy_2139",containesOptionsType1Games:"_containesOptionsType1Games_1cvqy_2161",arrowExpandIconType1:"_arrowExpandIconType1_1cvqy_2177",templateTablaProductividadType1:"_templateTablaProductividadType1_1cvqy_2189",verVideosType11232:"_verVideosType11232_1cvqy_2213",templateTablaProductividadType1320:"_templateTablaProductividadType1320_1cvqy_2221",verVideosType1680:"_verVideosType1680_1cvqy_2229"},b9={components:{GSCButton:CD},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=F2(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},ED=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},AD=b9.setup;b9.setup=AD?(e,o)=>(ED(),AD(e,o)):ED;const xlt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},wlt=["src"],klt=["src"],Slt=["src"],Tlt=["src"],Clt=["fill"],Elt=["fill"],Alt=["src"],Mlt=["src"],Ilt=["fill"],Plt=["fill"],Blt=["src"],Llt=["src"],Flt=["src"],Olt=["src"],zlt=["fill"],Nlt=["fill"];function Dlt(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",xlt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(b.imgPlayerIconClass),src:s.data.player_photo},null,10,wlt),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedClass)},[O.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),O.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,klt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[O.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Slt),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,Tlt)],2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(b.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[O.elementSize.width>635?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),O.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Elt)],10,Clt))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.rowTeamClass),style:t.normalizeStyle(O.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(b.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,Alt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,Mlt)],2),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(b.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(b.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(b.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(b.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[O.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>b.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(b.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Plt)],10,Ilt))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(b.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(b.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(b.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(b.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(b.imgPlayerIconClass),src:s.data.player_photo},null,10,Blt),t.createElementVNode("div",{class:t.normalizeClass(b.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),O.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Llt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(b.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[O.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Flt),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),O.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),O.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,Olt)],2)):t.createCommentVNode("",!0),O.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),O.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(b.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(b.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:O.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>b.emitEventMedia(s.data)),style:t.normalizeStyle(O.elementSize.width<=680?O.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>b.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Nlt)],10,zlt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const MD=Ki(b9,[["render",Dlt],["__cssModules",{$style:blt}]]),Rlt=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},x9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},ID=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},PD=x9.setup;x9.setup=PD?(e,o)=>(ID(),PD(e,o)):ID;const Vlt=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),jlt=["src"],$lt={key:1,class:"text"},Ult=["src"],Glt={class:"stats"},Hlt=Vlt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),Wlt={class:"numstats"},qlt={class:"leyend"};function Zlt(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,jlt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",$lt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Ult)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",Glt,[Hlt,t.createElementVNode("div",Wlt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qlt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Xlt=Rlt(x9,[["render",Zlt],["__scopeId","data-v-f3ee6b2b"]]),Jlt=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},w9={components:{GSCButton:Xlt},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},BD=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},LD=w9.setup;w9.setup=LD?(e,o)=>(BD(),LD(e,o)):BD;const Klt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Ylt={class:"gsc-filterperteam__panel-teams__cont-teams"},Qlt=["onClick"],ect=["src","alt","title"];function tct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(b.customStyleContain)},[t.createElementVNode("div",Klt,[t.createElementVNode("div",Ylt,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(b.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(g,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:b.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(b.customStyleTeam),class:t.normalizeClass([a.id==W.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:h=>b.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,ect)],14,Qlt))),128))])],512)],4)}const nct=Jlt(w9,[["render",tct],["__scopeId","data-v-b39cba3b"]]),act={tablePositionGames:"_tablePositionGames_1reko_91",tablePositionWrapperGames:"_tablePositionWrapperGames_1reko_123",imgHenrryIcon:"_imgHenrryIcon_1reko_141",americaIcon:"_americaIcon_1reko_157",playerPhotoGames:"_playerPhotoGames_1reko_181",toniKroosGames:"_toniKroosGames_1reko_199",shapeIcon:"_shapeIcon_1reko_221",menuiconsTeams:"_menuiconsTeams_1reko_233",component31:"_component31_1reko_251",playerNameGames:"_playerNameGames_1reko_273",icnPlayIcon:"_icnPlayIcon_1reko_289",goles:"_goles_1reko_305",americaIcon1:"_americaIcon1_1reko_319",teamsAmerica:"_teamsAmerica_1reko_347",containerData:"_containerData_1reko_359",shapeIcon1:"_shapeIcon1_1reko_375",icnExpand1:"_icnExpand1_1reko_387",icnExpand:"_icnExpand_1reko_387",playerDataGames:"_playerDataGames_1reko_427",playerInfoGames:"_playerInfoGames_1reko_449",headerTopGame:"_headerTopGame_1reko_479",playerRow:"_playerRow_1reko_507",groupsLeague:"_groupsLeague_1reko_529",text:"_text_1reko_547",btnViewFullList:"_btnViewFullList_1reko_563",headerTopsGames:"_headerTopsGames_1reko_597",btnVideosOptions:"_btnVideosOptions_1reko_741",position:"_position_1reko_1095",positionWrapper:"_positionWrapper_1reko_1119",imgNecaxaIcon:"_imgNecaxaIcon_1reko_1135",teamLogo:"_teamLogo_1reko_1147",teamPhoto:"_teamPhoto_1reko_1163",name:"_name_1reko_1179",icnPlayIconType1:"_icnPlayIconType1_1reko_1195",verVideosType1:"_verVideosType1_1reko_1209",btnVideosOptionsType1:"_btnVideosOptionsType1_1reko_1221",btnVideosOptions1Games:"_btnVideosOptions1Games_1reko_1245",leftContainer:"_leftContainer_1reko_1269",shapeIconType1:"_shapeIconType1_1reko_1287",icnExpandType1:"_icnExpandType1_1reko_1297",arrowExpand:"_arrowExpand_1reko_1317",containerInfoGames:"_containerInfoGames_1reko_1333",headerTopTeam:"_headerTopTeam_1reko_1357",containerHeader:"_containerHeader_1reko_1385",goles1:"_goles1_1reko_1403",golesType1:"_golesType1_1reko_1409",golesWrapper:"_golesWrapper_1reko_1419",btnViewAll:"_btnViewAll_1reko_1437",headerTopsTeams:"_headerTopsTeams_1reko_1471",arrowExpandIcon:"_arrowExpandIcon_1reko_1705",rotate:"_rotate_1reko_1715"},k9={components:{GSCButton:CD},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},FD=()=>{t.useCssVars(e=>({"5b159b56":e.fontSizeTopNum,ef81ba90:e.fontFamilyTopNum,"40d5b2de":e.fontColorTopNum,"55ca4106":e.opacityColorTopNum,"488c59aa":e.fontColorName,"7f32ad12":e.fontFamilyName,"081c0022":e.fontSizeName,b1fb7024:e.backgroundColorHeader,"9af157f6":e.fontFamilyCategory,"4777f062":e.fontSizeCategory,e72874c4:e.fontColorCategory,"2ceb71e1":e.borderColorCategory}))},OD=k9.setup;k9.setup=OD?(e,o)=>(FD(),OD(e,o)):FD;const rct=["src"],ict=["src"],oct=["src"],sct=["src"],lct=["fill"],cct=["fill"],uct=["src"],dct=["fill"],hct=["fill"];function pct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,rct),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,ict)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,oct)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(g,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,sct)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>b.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,cct)],10,lct))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,uct)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>b.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>b.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hct)],10,dct))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const fct=Ki(k9,[["render",pct],["__cssModules",{$style:act}]]),mct=(e,o)=>{const s=e.__vccOpts||e;for(const[O,W]of o)s[O]=W;return s},S9={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},zD=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},ND=S9.setup;S9.setup=ND?(e,o)=>(zD(),ND(e,o)):zD;const gct=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),yct=["src"],vct={key:1,class:"text"},_ct=["src"],bct={class:"stats"},xct=gct(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),wct={class:"numstats"},kct={class:"leyend"};function Sct(e,o,s,O,W,b){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",W.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([b.customStyle,W.status&&s.typeOnOff&&b.customActive]),onClick:o[0]||(o[0]=(...g)=>b.btnClick&&b.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,yct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",vct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,_ct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>b.btnClick&&b.btnClick(...g))},[t.createElementVNode("div",bct,[xct,t.createElementVNode("div",wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",kct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Tct=mct(S9,[["render",Sct],["__scopeId","data-v-f3ee6b2b"]]),sXt="",lXt="",Cct={equipoGames:"_equipoGames_fst7d_75",atlasSeleccinGames:"_atlasSeleccinGames_fst7d_85",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_fst7d_93",aosGames:"_aosGames_fst7d_101",span12:"_span12_fst7d_109",nacionalidadMex:"_nacionalidadMex_fst7d_115",manchesterUnited:"_manchesterUnited_fst7d_121",manchesterUnited12:"_manchesterUnited12_fst7d_135",containerInfoGames:"_containerInfoGames_fst7d_155",verPerfil12:"_verPerfil12_fst7d_173",btnProfile:"_btnProfile_fst7d_191",containerButton:"_containerButton_fst7d_223",dataContainer:"_dataContainer_fst7d_237",expandedInfoPlayerGames:"_expandedInfoPlayerGames_fst7d_257",containerDataBg:"_containerDataBg_fst7d_437",containerDataSm:"_containerDataSm_fst7d_459",span:"_span_fst7d_109",manchesterUnited14:"_manchesterUnited14_fst7d_481",filter:"_filter_fst7d_491",verPerfil:"_verPerfil_fst7d_173",manchesterUnited8:"_manchesterUnited8_fst7d_533",manchesterUnitedParent1:"_manchesterUnitedParent1_fst7d_545",manchesterUnited1:"_manchesterUnited1_fst7d_135",manchesterUnitedParent:"_manchesterUnitedParent_fst7d_545",frameDiv:"_frameDiv_fst7d_589",infoExpanded:"_infoExpanded_fst7d_605",countryFlag:"_countryFlag_fst7d_911"},T9={components:{GSCButton:Tct},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=F2(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},DD=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},RD=T9.setup;T9.setup=RD?(e,o)=>(DD(),RD(e,o)):DD;const ap=e=>(t.pushScopeId("data-v-5dd9e88d"),e=e(),t.popScopeId(),e),Ect={ref:"myDivRef"},Act=["src"],Mct=ap(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),Ict=ap(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),Pct=ap(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),Bct=ap(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),Lct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),Fct=ap(()=>t.createElementVNode("span",null,"xG: ",-1)),Oct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),zct=ap(()=>t.createElementVNode("span",null,"xG: ",-1)),Nct=ap(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),Dct=ap(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),Rct=ap(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),Vct=ap(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),jct=ap(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),$ct=ap(()=>t.createElementVNode("span",null,"xG: ",-1));function Uct(e,o,s,O,W,b){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Ect,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,Act)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&O.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>b.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Mct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Ict,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Pct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Bct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[Lct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Fct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[Oct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[zct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Nct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Dct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Rct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[Vct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[jct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[$ct,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&O.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>b.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const VD=Ki(T9,[["render",Uct],["__cssModules",{$style:Cct}],["__scopeId","data-v-5dd9e88d"]]);/**
4121
4121
  * Vue 3 Carousel 0.3.1
4122
4122
  * (c) 2023
4123
4123
  * @license MIT