@golstats/gsc-game-data 1.0.282 → 1.0.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FilterConditions-67a56ee9-Byh7UnF3-941aef7d.js → FilterConditions-67a56ee9-Byh7UnF3-5dc24b7f.js} +1 -1
- package/dist/{FilterConditions-8968e395-2a11494d.js → FilterConditions-8968e395-7f8d6922.js} +1 -1
- package/dist/{FilterField-1d2345af-DewpBlbm-44d183b5.js → FilterField-1d2345af-DewpBlbm-ec629c0b.js} +1 -1
- package/dist/{FilterField-ef44bc20-ab1e5d95.js → FilterField-ef44bc20-9961ef3c.js} +1 -1
- package/dist/{FilterSubcategories-4bc20b72-fac91ec7.js → FilterSubcategories-4bc20b72-edd78e86.js} +1 -1
- package/dist/{FilterSubcategories-92dfe0dc-C1aiPRbE-4d867cbc.js → FilterSubcategories-92dfe0dc-C1aiPRbE-54e09acc.js} +1 -1
- package/dist/gsc-game-data.js +1 -1
- package/dist/gsc-game-data.umd.cjs +1 -1
- package/dist/{index-815242c4.js → index-e6addc30.js} +33 -33
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -4155,7 +4155,7 @@ uniform ${Ge} ${qe} u_${at};
|
|
|
4155
4155
|
#endif
|
|
4156
4156
|
`}),staticAttributes:j,staticUniforms:de}}class Bn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(O,P,j,Y,te,de,fe,Ae,Be){this.context=O;let Ge=this.boundPaintVertexBuffers.length!==Y.length;for(let qe=0;!Ge&&qe<Y.length;qe++)this.boundPaintVertexBuffers[qe]!==Y[qe]&&(Ge=!0);!this.vao||this.boundProgram!==P||this.boundLayoutVertexBuffer!==j||Ge||this.boundIndexBuffer!==te||this.boundVertexOffset!==de||this.boundDynamicVertexBuffer!==fe||this.boundDynamicVertexBuffer2!==Ae||this.boundDynamicVertexBuffer3!==Be?this.freshBind(P,j,Y,te,de,fe,Ae,Be):(O.bindVertexArray.set(this.vao),fe&&fe.bind(),te&&te.dynamicDraw&&te.bind(),Ae&&Ae.bind(),Be&&Be.bind())}freshBind(O,P,j,Y,te,de,fe,Ae){const Be=O.numAttributes,Ge=this.context,qe=Ge.gl;this.vao&&this.destroy(),this.vao=Ge.createVertexArray(),Ge.bindVertexArray.set(this.vao),this.boundProgram=O,this.boundLayoutVertexBuffer=P,this.boundPaintVertexBuffers=j,this.boundIndexBuffer=Y,this.boundVertexOffset=te,this.boundDynamicVertexBuffer=de,this.boundDynamicVertexBuffer2=fe,this.boundDynamicVertexBuffer3=Ae,P.enableAttributes(qe,O);for(const at of j)at.enableAttributes(qe,O);de&&de.enableAttributes(qe,O),fe&&fe.enableAttributes(qe,O),Ae&&Ae.enableAttributes(qe,O),P.bind(),P.setVertexAttribPointers(qe,O,te);for(const at of j)at.bind(),at.setVertexAttribPointers(qe,O,te);de&&(de.bind(),de.setVertexAttribPointers(qe,O,te)),Y&&Y.bind(),fe&&(fe.bind(),fe.setVertexAttribPointers(qe,O,te)),Ae&&(Ae.bind(),Ae.setVertexAttribPointers(qe,O,te)),Ge.currentNumAttributes=Be}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ha=(H,O,P,j,Y)=>({u_matrix:H,u_texture:0,u_ele_delta:O,u_fog_matrix:P,u_fog_color:j?j.properties.get("fog-color"):n.aN.white,u_fog_ground_blend:j?j.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:j?j.calculateFogBlendOpacity(Y):0,u_horizon_color:j?j.properties.get("horizon-color"):n.aN.white,u_horizon_fog_blend:j?j.properties.get("horizon-fog-blend"):1});function ma(H){const O=[];for(let P=0;P<H.length;P++){if(H[P]===null)continue;const j=H[P].split(" ");O.push(j.pop())}return O}class Ya{constructor(O,P,j,Y,te,de){const fe=O.gl;this.program=fe.createProgram();const Ae=ma(P.staticAttributes),Be=j?j.getBinderAttributes():[],Ge=Ae.concat(Be),qe=hn.prelude.staticUniforms?ma(hn.prelude.staticUniforms):[],at=P.staticUniforms?ma(P.staticUniforms):[],lt=j?j.getBinderUniforms():[],ft=qe.concat(at).concat(lt),kt=[];for(const Yt of ft)kt.indexOf(Yt)<0&&kt.push(Yt);const Nt=j?j.defines():[];te&&Nt.push("#define OVERDRAW_INSPECTOR;"),de&&Nt.push("#define TERRAIN3D;");const Mt=Nt.concat(hn.prelude.fragmentSource,P.fragmentSource).join(`
|
|
4157
4157
|
`),Gt=Nt.concat(hn.prelude.vertexSource,P.vertexSource).join(`
|
|
4158
|
-
`),zt=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(zt,Mt),fe.compileShader(zt),!fe.getShaderParameter(zt,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(zt)}`);fe.attachShader(this.program,zt);const Xt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Xt,Gt),fe.compileShader(Xt),!fe.getShaderParameter(Xt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Xt)}`);fe.attachShader(this.program,Xt),this.attributes={};const Zt={};this.numAttributes=Ge.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Ge[Yt]&&(fe.bindAttribLocation(this.program,Yt,Ge[Yt]),this.attributes[Ge[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Xt),fe.deleteShader(zt);for(let Yt=0;Yt<kt.length;Yt++){const ya=kt[Yt];if(ya&&!Zt[ya]){const Ca=fe.getUniformLocation(this.program,ya);Ca&&(Zt[ya]=Ca)}}this.fixedUniforms=Y(O,Zt),this.terrainUniforms=((Yt,ya)=>({u_depth:new n.aI(Yt,ya.u_depth),u_terrain:new n.aI(Yt,ya.u_terrain),u_terrain_dim:new n.aJ(Yt,ya.u_terrain_dim),u_terrain_matrix:new n.aK(Yt,ya.u_terrain_matrix),u_terrain_unpack:new n.aL(Yt,ya.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Yt,ya.u_terrain_exaggeration)}))(O,Zt),this.binderUniforms=j?j.getUniforms(O,Zt):[]}draw(O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt,ft,kt,Nt,Mt,Gt){const zt=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(j),O.setStencilMode(Y),O.setColorMode(te),O.setCullFace(de),Ae){O.activeTexture.set(zt.TEXTURE2),zt.bindTexture(zt.TEXTURE_2D,Ae.depthTexture),O.activeTexture.set(zt.TEXTURE3),zt.bindTexture(zt.TEXTURE_2D,Ae.texture);for(const Zt in this.terrainUniforms)this.terrainUniforms[Zt].set(Ae[Zt])}for(const Zt in this.fixedUniforms)this.fixedUniforms[Zt].set(fe[Zt]);kt&&kt.setUniforms(O,this.binderUniforms,lt,{zoom:ft});let Xt=0;switch(P){case zt.LINES:Xt=2;break;case zt.TRIANGLES:Xt=3;break;case zt.LINE_STRIP:Xt=1}for(const Zt of at.get()){const Yt=Zt.vaos||(Zt.vaos={});(Yt[Be]||(Yt[Be]=new Bn)).bind(O,this,Ge,kt?kt.getPaintVertexBuffers():[],qe,Zt.vertexOffset,Nt,Mt,Gt),zt.drawElements(P,Zt.primitiveLength*Xt,zt.UNSIGNED_SHORT,Zt.primitiveOffset*Xt*2)}}}function Ba(H,O,P){const j=1/yt(P,1,O.transform.tileZoom),Y=Math.pow(2,P.tileID.overscaledZ),te=P.tileSize*Math.pow(2,O.transform.tileZoom)/Y,de=te*(P.tileID.canonical.x+P.tileID.wrap*Y),fe=te*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[j,H.fromScale,H.toScale],u_fade:H.t,u_pixel_coord_upper:[de>>16,fe>>16],u_pixel_coord_lower:[65535&de,65535&fe]}}const Xa=(H,O,P,j)=>{const Y=O.style.light,te=Y.properties.get("position"),de=[te.x,te.y,te.z],fe=function(){var Be=new n.A(9);return n.A!=Float32Array&&(Be[1]=0,Be[2]=0,Be[3]=0,Be[5]=0,Be[6]=0,Be[7]=0),Be[0]=1,Be[4]=1,Be[8]=1,Be}();Y.properties.get("anchor")==="viewport"&&function(Be,Ge){var qe=Math.sin(Ge),at=Math.cos(Ge);Be[0]=at,Be[1]=qe,Be[2]=0,Be[3]=-qe,Be[4]=at,Be[5]=0,Be[6]=0,Be[7]=0,Be[8]=1}(fe,-O.transform.angle),function(Be,Ge,qe){var at=Ge[0],lt=Ge[1],ft=Ge[2];Be[0]=at*qe[0]+lt*qe[3]+ft*qe[6],Be[1]=at*qe[1]+lt*qe[4]+ft*qe[7],Be[2]=at*qe[2]+lt*qe[5]+ft*qe[8]}(de,de,fe);const Ae=Y.properties.get("color");return{u_matrix:H,u_lightpos:de,u_lightintensity:Y.properties.get("intensity"),u_lightcolor:[Ae.r,Ae.g,Ae.b],u_vertical_gradient:+P,u_opacity:j}},dn=(H,O,P,j,Y,te,de)=>n.e(Xa(H,O,P,j),Ba(te,O,de),{u_height_factor:-Math.pow(2,Y.overscaledZ)/de.tileSize/8}),ln=H=>({u_matrix:H}),Cn=(H,O,P,j)=>n.e(ln(H),Ba(P,O,j)),Rn=(H,O)=>({u_matrix:H,u_world:O}),la=(H,O,P,j,Y)=>n.e(Cn(H,O,P,j),{u_world:Y}),za=(H,O,P,j)=>{const Y=H.transform;let te,de;if(j.paint.get("circle-pitch-alignment")==="map"){const fe=yt(P,1,Y.zoom);te=!0,de=[fe,fe]}else te=!1,de=Y.pixelsToGLUnits;return{u_camera_to_center_distance:Y.cameraToCenterDistance,u_scale_with_map:+(j.paint.get("circle-pitch-scale")==="map"),u_matrix:H.translatePosMatrix(O.posMatrix,P,j.paint.get("circle-translate"),j.paint.get("circle-translate-anchor")),u_pitch_with_map:+te,u_device_pixel_ratio:H.pixelRatio,u_extrude_scale:de}},qt=(H,O)=>({u_matrix:O,u_pixel_extrude_scale:[1/H.width,1/H.height]}),ra=(H,O,P)=>({u_matrix:H,u_inv_matrix:O,u_camera_to_center_distance:P.cameraToCenterDistance,u_viewport_size:[P.width,P.height]}),sa=(H,O,P=1)=>({u_matrix:H,u_color:O,u_overlay:0,u_overlay_scale:P}),Ia=H=>({u_matrix:H}),Ma=(H,O,P,j)=>({u_matrix:H,u_extrude_scale:yt(O,1,P),u_intensity:j}),$a=(H,O,P,j)=>{const Y=n.H();n.aQ(Y,0,H.width,H.height,0,0,1);const te=H.context.gl;return{u_matrix:Y,u_world:[te.drawingBufferWidth,te.drawingBufferHeight],u_image:P,u_color_ramp:j,u_opacity:O.paint.get("heatmap-opacity")}},Pa=(H,O,P,j)=>{const Y=P.paint.get("hillshade-shadow-color"),te=P.paint.get("hillshade-highlight-color"),de=P.paint.get("hillshade-accent-color");let fe=P.paint.get("hillshade-illumination-direction")*(Math.PI/180);P.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=H.transform.angle);const Ae=!H.options.moving;return{u_matrix:j?j.posMatrix:H.transform.calculatePosMatrix(O.tileID.toUnwrapped(),Ae),u_image:0,u_latrange:na(0,O.tileID),u_light:[P.paint.get("hillshade-exaggeration"),fe],u_shadow:Y,u_highlight:te,u_accent:de}},Sa=(H,O)=>{const P=O.stride,j=n.H();return n.aQ(j,0,n.X,-n.X,0,0,1),n.J(j,j,[0,-n.X,0]),{u_matrix:j,u_image:1,u_dimension:[P,P],u_zoom:H.overscaledZ,u_unpack:O.getUnpackVector()}};function na(H,O){const P=Math.pow(2,O.canonical.z),j=O.canonical.y;return[new n.Z(0,j/P).toLngLat().lat,new n.Z(0,(j+1)/P).toLngLat().lat]}const ea=(H,O,P,j)=>{const Y=H.transform;return{u_matrix:an(H,O,P,j),u_ratio:1/yt(O,1,Y.zoom),u_device_pixel_ratio:H.pixelRatio,u_units_to_pixels:[1/Y.pixelsToGLUnits[0],1/Y.pixelsToGLUnits[1]]}},ga=(H,O,P,j,Y)=>n.e(ea(H,O,P,Y),{u_image:0,u_image_height:j}),Va=(H,O,P,j,Y)=>{const te=H.transform,de=tn(O,te);return{u_matrix:an(H,O,P,Y),u_texsize:O.imageAtlasTexture.size,u_ratio:1/yt(O,1,te.zoom),u_device_pixel_ratio:H.pixelRatio,u_image:0,u_scale:[de,j.fromScale,j.toScale],u_fade:j.t,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},en=(H,O,P,j,Y,te)=>{const de=H.transform,fe=H.lineAtlas,Ae=tn(O,de),Be=P.layout.get("line-cap")==="round",Ge=fe.getDash(j.from,Be),qe=fe.getDash(j.to,Be),at=Ge.width*Y.fromScale,lt=qe.width*Y.toScale;return n.e(ea(H,O,P,te),{u_patternscale_a:[Ae/at,-Ge.height/2],u_patternscale_b:[Ae/lt,-qe.height/2],u_sdfgamma:fe.width/(256*Math.min(at,lt)*H.pixelRatio)/2,u_image:0,u_tex_y_a:Ge.y,u_tex_y_b:qe.y,u_mix:Y.t})};function tn(H,O){return 1/yt(H,1,O.tileZoom)}function an(H,O,P,j){return H.translatePosMatrix(j?j.posMatrix:O.tileID.posMatrix,O,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}const _n=(H,O,P,j,Y)=>{return{u_matrix:H,u_tl_parent:O,u_scale_parent:P,u_buffer_scale:1,u_fade_t:j.mix,u_opacity:j.opacity*Y.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Y.paint.get("raster-brightness-min"),u_brightness_high:Y.paint.get("raster-brightness-max"),u_saturation_factor:(de=Y.paint.get("raster-saturation"),de>0?1-1/(1.001-de):-de),u_contrast_factor:(te=Y.paint.get("raster-contrast"),te>0?1/(1-te):1+te),u_spin_weights:mn(Y.paint.get("raster-hue-rotate"))};var te,de};function mn(H){H*=Math.PI/180;const O=Math.sin(H),P=Math.cos(H);return[(2*P+1)/3,(-Math.sqrt(3)*O-P+1)/3,(Math.sqrt(3)*O-P+1)/3]}const wn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt)=>{const ft=de.transform;return{u_is_size_zoom_constant:+(H==="constant"||H==="source"),u_is_size_feature_constant:+(H==="constant"||H==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:ft.cameraToCenterDistance,u_pitch:ft.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:ft.width/ft.height,u_fade_change:de.options.fadeDuration?de.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:Ae,u_coord_matrix:Be,u_is_text:+qe,u_pitch_with_map:+j,u_is_along_line:Y,u_is_variable_anchor:te,u_texsize:at,u_texture:0,u_translation:Ge,u_pitched_scale:lt}},pn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt,ft)=>{const kt=de.transform;return n.e(wn(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,ft),{u_gamma_scale:j?Math.cos(kt._pitch)*kt.cameraToCenterDistance:1,u_device_pixel_ratio:de.pixelRatio,u_is_halo:+lt})},yn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt)=>n.e(pn(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,!0,qe,!0,lt),{u_texsize_icon:at,u_texture_icon:1}),Nn=(H,O,P)=>({u_matrix:H,u_opacity:O,u_color:P}),qn=(H,O,P,j,Y,te)=>n.e(function(de,fe,Ae,Be){const Ge=Ae.imageManager.getPattern(de.from.toString()),qe=Ae.imageManager.getPattern(de.to.toString()),{width:at,height:lt}=Ae.imageManager.getPixelSize(),ft=Math.pow(2,Be.tileID.overscaledZ),kt=Be.tileSize*Math.pow(2,Ae.transform.tileZoom)/ft,Nt=kt*(Be.tileID.canonical.x+Be.tileID.wrap*ft),Mt=kt*Be.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ge.tl,u_pattern_br_a:Ge.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[at,lt],u_mix:fe.t,u_pattern_size_a:Ge.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/yt(Be,1,Ae.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Mt>>16],u_pixel_coord_lower:[65535&Nt,65535&Mt]}}(j,te,P,Y),{u_matrix:H,u_opacity:O}),Dn={fillExtrusion:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_opacity:new n.aJ(H,O.u_opacity)}),fillExtrusionPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_height_factor:new n.aJ(H,O.u_height_factor),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade),u_opacity:new n.aJ(H,O.u_opacity)}),fill:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),fillPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),fillOutline:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world)}),fillOutlinePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),circle:(H,O)=>({u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_scale_with_map:new n.aI(H,O.u_scale_with_map),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_extrude_scale:new n.aP(H,O.u_extrude_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_matrix:new n.aK(H,O.u_matrix)}),collisionBox:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_pixel_extrude_scale:new n.aP(H,O.u_pixel_extrude_scale)}),collisionCircle:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_inv_matrix:new n.aK(H,O.u_inv_matrix),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_viewport_size:new n.aP(H,O.u_viewport_size)}),debug:(H,O)=>({u_color:new n.aM(H,O.u_color),u_matrix:new n.aK(H,O.u_matrix),u_overlay:new n.aI(H,O.u_overlay),u_overlay_scale:new n.aJ(H,O.u_overlay_scale)}),clippingMask:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),heatmap:(H,O)=>({u_extrude_scale:new n.aJ(H,O.u_extrude_scale),u_intensity:new n.aJ(H,O.u_intensity),u_matrix:new n.aK(H,O.u_matrix)}),heatmapTexture:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_color_ramp:new n.aI(H,O.u_color_ramp),u_opacity:new n.aJ(H,O.u_opacity)}),hillshade:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_latrange:new n.aP(H,O.u_latrange),u_light:new n.aP(H,O.u_light),u_shadow:new n.aM(H,O.u_shadow),u_highlight:new n.aM(H,O.u_highlight),u_accent:new n.aM(H,O.u_accent)}),hillshadePrepare:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_dimension:new n.aP(H,O.u_dimension),u_zoom:new n.aJ(H,O.u_zoom),u_unpack:new n.aL(H,O.u_unpack)}),line:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels)}),lineGradient:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_image:new n.aI(H,O.u_image),u_image_height:new n.aJ(H,O.u_image_height)}),linePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texsize:new n.aP(H,O.u_texsize),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_image:new n.aI(H,O.u_image),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),lineSDF:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_patternscale_a:new n.aP(H,O.u_patternscale_a),u_patternscale_b:new n.aP(H,O.u_patternscale_b),u_sdfgamma:new n.aJ(H,O.u_sdfgamma),u_image:new n.aI(H,O.u_image),u_tex_y_a:new n.aJ(H,O.u_tex_y_a),u_tex_y_b:new n.aJ(H,O.u_tex_y_b),u_mix:new n.aJ(H,O.u_mix)}),raster:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_tl_parent:new n.aP(H,O.u_tl_parent),u_scale_parent:new n.aJ(H,O.u_scale_parent),u_buffer_scale:new n.aJ(H,O.u_buffer_scale),u_fade_t:new n.aJ(H,O.u_fade_t),u_opacity:new n.aJ(H,O.u_opacity),u_image0:new n.aI(H,O.u_image0),u_image1:new n.aI(H,O.u_image1),u_brightness_low:new n.aJ(H,O.u_brightness_low),u_brightness_high:new n.aJ(H,O.u_brightness_high),u_saturation_factor:new n.aJ(H,O.u_saturation_factor),u_contrast_factor:new n.aJ(H,O.u_contrast_factor),u_spin_weights:new n.aO(H,O.u_spin_weights)}),symbolIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolSDF:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolTextAndIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texsize_icon:new n.aP(H,O.u_texsize_icon),u_texture:new n.aI(H,O.u_texture),u_texture_icon:new n.aI(H,O.u_texture_icon),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),background:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_color:new n.aM(H,O.u_color)}),backgroundPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_image:new n.aI(H,O.u_image),u_pattern_tl_a:new n.aP(H,O.u_pattern_tl_a),u_pattern_br_a:new n.aP(H,O.u_pattern_br_a),u_pattern_tl_b:new n.aP(H,O.u_pattern_tl_b),u_pattern_br_b:new n.aP(H,O.u_pattern_br_b),u_texsize:new n.aP(H,O.u_texsize),u_mix:new n.aJ(H,O.u_mix),u_pattern_size_a:new n.aP(H,O.u_pattern_size_a),u_pattern_size_b:new n.aP(H,O.u_pattern_size_b),u_scale_a:new n.aJ(H,O.u_scale_a),u_scale_b:new n.aJ(H,O.u_scale_b),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(H,O.u_tile_units_to_pixels)}),terrain:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_ele_delta:new n.aJ(H,O.u_ele_delta),u_fog_matrix:new n.aK(H,O.u_fog_matrix),u_fog_color:new n.aM(H,O.u_fog_color),u_fog_ground_blend:new n.aJ(H,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(H,O.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon_fog_blend:new n.aJ(H,O.u_horizon_fog_blend)}),terrainDepth:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),terrainCoords:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_terrain_coords_id:new n.aJ(H,O.u_terrain_coords_id),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),sky:(H,O)=>({u_sky_color:new n.aM(H,O.u_sky_color),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon:new n.aJ(H,O.u_horizon),u_sky_horizon_blend:new n.aJ(H,O.u_sky_horizon_blend)})};class En{constructor(O,P,j){this.context=O;const Y=O.gl;this.buffer=Y.createBuffer(),this.dynamicDraw=!!j,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Y.bufferData(Y.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?Y.DYNAMIC_DRAW:Y.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){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,O.arrayBuffer)}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const Vn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kn{constructor(O,P,j,Y){this.length=P.length,this.attributes=j,this.itemSize=P.bytesPerElement,this.dynamicDraw=Y,this.context=O;const te=O.gl;this.buffer=te.createBuffer(),O.bindVertexBuffer.set(this.buffer),te.bufferData(te.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?te.DYNAMIC_DRAW:te.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,P){for(let j=0;j<this.attributes.length;j++){const Y=this.attributes[j],te=P.attributes[Y.name];te!==void 0&&O.enableVertexAttribArray(te)}}setVertexAttribPointers(O,P,j){for(let Y=0;Y<this.attributes.length;Y++){const te=this.attributes[Y],de=P.attributes[te.name];de!==void 0&&O.vertexAttribPointer(de,te.components,O[Vn[te.type]],!1,this.itemSize,te.offset+this.itemSize*(j||0))}}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const wr=new WeakMap;function li(H){var O;if(wr.has(H))return wr.get(H);{const P=(O=H.getParameter(H.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return wr.set(H,P),P}}class Vr{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class qi extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class gi extends Vr{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class Ni extends Vr{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class mo extends Vr{getDefault(){return[!0,!0,!0,!0]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class Zr extends Vr{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class ei extends Vr{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class Co extends Vr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const P=this.current;(O.func!==P.func||O.ref!==P.ref||O.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class Ki extends Vr{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class bo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=O,this.dirty=!1}}class xs extends Vr{getDefault(){return[0,1]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class lo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=O,this.dirty=!1}}class Ds extends Vr{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Rs extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.BLEND):P.disable(P.BLEND),this.current=O,this.dirty=!1}}class el extends Vr{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class To extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class ws extends Vr{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class ls extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=O,this.dirty=!1}}class pi extends Vr{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class Hi extends Vr{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class tl extends Vr{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Ns extends Vr{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class fs extends Vr{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class vl extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class ks extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class _l extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindTexture(P.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class al extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class nl extends Vr{getDefault(){return null}set(O){const P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class Po extends Vr{getDefault(){return null}set(O){var P;if(O===this.current&&!this.dirty)return;const j=this.gl;li(j)?j.bindVertexArray(O):(P=j.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class Gc extends Vr{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class zc extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class Vl extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class ad extends Vr{constructor(O,P){super(O),this.context=O,this.parent=P}getDefault(){return null}}class sd extends ad{setDirty(){this.dirty=!0}set(O){if(O===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,O,0),this.current=O,this.dirty=!1}}class Vs extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class ld extends ad{set(O){if(O===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,O),this.current=O,this.dirty=!1}}class au{constructor(O,P,j,Y,te){this.context=O,this.width=P,this.height=j;const de=O.gl,fe=this.framebuffer=de.createFramebuffer();if(this.colorAttachment=new sd(O,fe),Y)this.depthAttachment=te?new ld(O,fe):new Vs(O,fe);else if(te)throw new Error("Stencil cannot be set without depth");if(de.checkFramebufferStatus(de.FRAMEBUFFER)!==de.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,P=this.colorAttachment.get();if(P&&O.deleteTexture(P),this.depthAttachment){const j=this.depthAttachment.get();j&&O.deleteRenderbuffer(j)}O.deleteFramebuffer(this.framebuffer)}}class Cs{constructor(O,P,j){this.blendFunction=O,this.blendColor=P,this.mask=j}}Cs.Replace=[1,0],Cs.disabled=new Cs(Cs.Replace,n.aN.transparent,[!1,!1,!1,!1]),Cs.unblended=new Cs(Cs.Replace,n.aN.transparent,[!0,!0,!0,!0]),Cs.alphaBlended=new Cs([1,771],n.aN.transparent,[!0,!0,!0,!0]);class nc{constructor(O){var P,j;if(this.gl=O,this.clearColor=new qi(this),this.clearDepth=new gi(this),this.clearStencil=new Ni(this),this.colorMask=new mo(this),this.depthMask=new Zr(this),this.stencilMask=new ei(this),this.stencilFunc=new Co(this),this.stencilOp=new Ki(this),this.stencilTest=new bo(this),this.depthRange=new xs(this),this.depthTest=new lo(this),this.depthFunc=new Ds(this),this.blend=new Rs(this),this.blendFunc=new el(this),this.blendColor=new To(this),this.blendEquation=new ws(this),this.cullFace=new ls(this),this.cullFaceSide=new pi(this),this.frontFace=new Hi(this),this.program=new tl(this),this.activeTexture=new Ns(this),this.viewport=new fs(this),this.bindFramebuffer=new vl(this),this.bindRenderbuffer=new ks(this),this.bindTexture=new _l(this),this.bindVertexBuffer=new al(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Gc(this),this.pixelStoreUnpackPremultiplyAlpha=new zc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),li(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Y=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=O.RGBA16F)!==null&&P!==void 0?P:Y==null?void 0:Y.RGBA16F_EXT,this.RGB16F=(j=O.RGB16F)!==null&&j!==void 0?j:Y==null?void 0:Y.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Y=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Y==null?void 0:Y.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(O,P){return new En(this,O,P)}createVertexBuffer(O,P,j){return new Kn(this,O,P,j)}createRenderbuffer(O,P,j){const Y=this.gl,te=Y.createRenderbuffer();return this.bindRenderbuffer.set(te),Y.renderbufferStorage(Y.RENDERBUFFER,O,P,j),this.bindRenderbuffer.set(null),te}createFramebuffer(O,P,j,Y){return new au(this,O,P,j,Y)}clear({color:O,depth:P,stencil:j}){const Y=this.gl;let te=0;O&&(te|=Y.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&(te|=Y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),j!==void 0&&(te|=Y.STENCIL_BUFFER_BIT,this.clearStencil.set(j),this.stencilMask.set(255)),Y.clear(te)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){n.aF(O.blendFunction,Cs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return li(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var P;return li(this.gl)?this.gl.deleteVertexArray(O):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class bi{constructor(O,P,j){this.func=O,this.mask=P,this.range=j}}bi.ReadOnly=!1,bi.ReadWrite=!0,bi.disabled=new bi(519,bi.ReadOnly,[0,1]);const Jl=7680;class Qi{constructor(O,P,j,Y,te,de){this.test=O,this.ref=P,this.mask=j,this.fail=Y,this.depthFail=te,this.pass=de}}Qi.disabled=new Qi({func:519,mask:0},0,0,Jl,Jl,Jl);class ao{constructor(O,P,j){this.enable=O,this.mode=P,this.frontFace=j}}let $s;function Do(H,O,P,j,Y){const te=H.context,de=te.gl,fe=H.useProgram("collisionBox"),Ae=[];let Be=0,Ge=0;for(let Nt=0;Nt<j.length;Nt++){const Mt=j[Nt],Gt=O.getTile(Mt).getBucket(P);if(!Gt)continue;const zt=Y?Gt.textCollisionBox:Gt.iconCollisionBox,Xt=Gt.collisionCircleArray;if(Xt.length>0){const Zt=n.H();n.aR(Zt,Gt.placementInvProjMatrix,H.transform.glCoordMatrix),n.aR(Zt,Zt,Gt.placementViewportMatrix),Ae.push({circleArray:Xt,circleOffset:Ge,transform:Mt.posMatrix,invTransform:Zt,coord:Mt}),Be+=Xt.length/4,Ge=Be}zt&&fe.draw(te,de.LINES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,qt(H.transform,Mt.posMatrix),H.style.map.terrain&&H.style.map.terrain.getTerrainData(Mt),P.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,H.transform.zoom,null,null,zt.collisionVertexBuffer)}if(!Y||!Ae.length)return;const qe=H.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Be),at._trim();let lt=0;for(const Nt of Ae)for(let Mt=0;Mt<Nt.circleArray.length/4;Mt++){const Gt=4*Mt,zt=Nt.circleArray[Gt+0],Xt=Nt.circleArray[Gt+1],Zt=Nt.circleArray[Gt+2],Yt=Nt.circleArray[Gt+3];at.emplace(lt++,zt,Xt,Zt,Yt,0),at.emplace(lt++,zt,Xt,Zt,Yt,1),at.emplace(lt++,zt,Xt,Zt,Yt,2),at.emplace(lt++,zt,Xt,Zt,Yt,3)}(!$s||$s.length<2*Be)&&($s=function(Nt){const Mt=2*Nt,Gt=new n.aU;Gt.resize(Mt),Gt._trim();for(let zt=0;zt<Mt;zt++){const Xt=6*zt;Gt.uint16[Xt+0]=4*zt+0,Gt.uint16[Xt+1]=4*zt+1,Gt.uint16[Xt+2]=4*zt+2,Gt.uint16[Xt+3]=4*zt+2,Gt.uint16[Xt+4]=4*zt+3,Gt.uint16[Xt+5]=4*zt+0}return Gt}(Be));const ft=te.createIndexBuffer($s,!0),kt=te.createVertexBuffer(at,n.aT.members,!0);for(const Nt of Ae){const Mt=ra(Nt.transform,Nt.invTransform,H.transform);qe.draw(te,de.TRIANGLES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,Mt,H.style.map.terrain&&H.style.map.terrain.getTerrainData(Nt.coord),P.id,kt,ft,n.a0.simpleSegment(0,2*Nt.circleOffset,Nt.circleArray.length,Nt.circleArray.length/2),null,H.transform.zoom,null,null,null)}kt.destroy(),ft.destroy()}ao.disabled=new ao(!1,1029,2305),ao.backCCW=new ao(!0,1029,2305);const Oc=n.ao(new Float32Array(16));function bl(H,O,P,j,Y){if(H.renderPass!=="translucent")return;const te=Qi.disabled,de=H.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,Ae,Be,Ge,qe,at,lt,ft,kt){const Nt=Ae.transform,Mt=Ea(),Gt=qe==="map",zt=at==="map";for(const Xt of fe){const Zt=Ge.getTile(Xt),Yt=Zt.getBucket(Be);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const ya=Yt.textSizeData,Ca=n.ah(ya,Nt.zoom),La=yt(Zt,1,Ae.transform.zoom),ja=It(Xt.posMatrix,zt,Gt,Ae.transform,La),Wa=Be.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(Ca){const on=Math.pow(2,Nt.zoom-Zt.tileID.overscaledZ),Tn=Ae.style.map.terrain?(Sn,kn)=>Ae.style.map.terrain.getElevation(Xt,Sn,kn):null,Qa=Mt.translatePosition(Nt,Zt,lt,ft);zo(Yt,Gt,zt,kt,Nt,ja,Xt.posMatrix,on,Ca,Wa,Mt,Qa,Xt.toUnwrapped(),Tn)}}}(j,H,P,O,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),Y),P.paint.get("icon-opacity").constantOr(1)!==0&&rc(H,O,P,j,!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"),te,de),P.paint.get("text-opacity").constantOr(1)!==0&&rc(H,O,P,j,!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"),te,de),O.map.showCollisionBoxes&&(Do(H,O,P,j,!0),Do(H,O,P,j,!1))}function cs(H,O,P,j,Y,te){const{horizontalAlign:de,verticalAlign:fe}=n.av(H),Ae=-(de-.5)*O,Be=-(fe-.5)*P;return new n.P((Ae/Y+j[0])*te,(Be/Y+j[1])*te)}function ms(H,O,P,j,Y,te){const de=O.tileAnchorPoint.add(new n.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let fe=j.mult(te);return P||(fe=fe.rotate(-Y)),Ft(de.add(fe),O.labelPlaneMatrix,O.getElevation).point}if(P){const fe=We(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(H),Ae=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return H.add(j.rotate(Ae))}return H.add(j)}function zo(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt){const ft=H.text.placedSymbolArray,kt=H.text.dynamicLayoutVertexArray,Nt=H.icon.dynamicLayoutVertexArray,Mt={};kt.clear();for(let Gt=0;Gt<ft.length;Gt++){const zt=ft.get(Gt),Xt=H.allowVerticalPlacement&&!zt.placedOrientation,Zt=zt.hidden||!zt.crossTileID||Xt?null:j[zt.crossTileID];if(Zt){const Yt=new n.P(zt.anchorX,zt.anchorY),ya={getElevation:lt,width:Y.width,height:Y.height,labelPlaneMatrix:te,lineVertexArray:null,pitchWithMap:P,projection:Ge,projectionCache:null,tileAnchorPoint:Yt,translation:qe,unwrappedTileID:at},Ca=P?Ft(Yt,de,lt):We(Yt.x,Yt.y,ya),La=ot(Y.cameraToCenterDistance,Ca.signedDistanceFromCamera);let ja=n.aj(H.textSizeData,Ae,zt)*La/n.aq;P&&(ja*=H.tilePixelRatio/fe);const{width:Wa,height:on,anchor:Tn,textOffset:Qa,textBoxScale:Sn}=Zt,kn=cs(Tn,Wa,on,Qa,Sn,ja),Ln=Ge.getPitchedTextCorrection(Y,Yt.add(new n.P(qe[0],qe[1])),at),fn=ms(Ca.point,ya,O,kn,Y.angle,Ln),Mn=H.allowVerticalPlacement&&zt.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let Wn=0;Wn<zt.numGlyphs;Wn++)n.ak(kt,fn,Mn);Be&&zt.associatedIconIndex>=0&&(Mt[zt.associatedIconIndex]={shiftedAnchor:fn,angle:Mn})}else Bt(zt.numGlyphs,kt)}if(Be){Nt.clear();const Gt=H.icon.placedSymbolArray;for(let zt=0;zt<Gt.length;zt++){const Xt=Gt.get(zt);if(Xt.hidden)Bt(Xt.numGlyphs,Nt);else{const Zt=Mt[zt];if(Zt)for(let Yt=0;Yt<Xt.numGlyphs;Yt++)n.ak(Nt,Zt.shiftedAnchor,Zt.angle);else Bt(Xt.numGlyphs,Nt)}}H.icon.dynamicLayoutVertexBuffer.updateData(Nt)}H.text.dynamicLayoutVertexBuffer.updateData(kt)}function Gr(H,O,P){return P.iconsInText&&O?"symbolTextAndIcon":H?"symbolSDF":"symbolIcon"}function rc(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe){const at=H.context,lt=at.gl,ft=H.transform,kt=Ea(),Nt=fe==="map",Mt=Ae==="map",Gt=fe!=="viewport"&&P.layout.get("symbol-placement")!=="point",zt=Nt&&!Mt&&!Gt,Xt=!Mt&&Gt,Zt=!P.layout.get("symbol-sort-key").isConstant();let Yt=!1;const ya=H.depthModeForSublayer(0,bi.ReadOnly),Ca=P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"),La=[],ja=kt.getCircleRadiusCorrection(ft);for(const Wa of j){const on=O.getTile(Wa),Tn=on.getBucket(P);if(!Tn)continue;const Qa=Y?Tn.text:Tn.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const Sn=Qa.programConfigurations.get(P.id),kn=Y||Tn.sdfIcons,Ln=Y?Tn.textSizeData:Tn.iconSizeData,fn=Mt||ft.pitch!==0,Mn=H.useProgram(Gr(kn,Y,Tn),Sn),Wn=n.ah(Ln,ft.zoom),In=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Wa);let Hn,Jn,kr,lr,Fr=[0,0],Rr=null;if(Y){if(Jn=on.glyphAtlasTexture,kr=lt.LINEAR,Hn=on.glyphAtlasTexture.size,Tn.iconsInText){Fr=on.imageAtlasTexture.size,Rr=on.imageAtlasTexture;const Lr=Ln.kind==="composite"||Ln.kind==="camera";lr=fn||H.options.rotating||H.options.zooming||Lr?lt.LINEAR:lt.NEAREST}}else{const Lr=P.layout.get("icon-size").constantOr(0)!==1||Tn.iconsNeedLinear;Jn=on.imageAtlasTexture,kr=kn||H.options.rotating||H.options.zooming||Lr||fn?lt.LINEAR:lt.NEAREST,Hn=on.imageAtlasTexture.size}const qr=yt(on,1,H.transform.zoom),fi=Xt?Wa.posMatrix:Oc,Wi=It(fi,Mt,Nt,H.transform,qr),Vi=Ot(fi,Mt,Nt,H.transform,qr),to=Ot(Wa.posMatrix,Mt,Nt,H.transform,qr),hi=kt.translatePosition(H.transform,on,te,de),Ur=Ca&&Tn.hasTextData(),Si=P.layout.get("icon-text-fit")!=="none"&&Ur&&Tn.hasIconData();if(Gt){const Lr=H.style.map.terrain?(Fo,bs)=>H.style.map.terrain.getElevation(Wa,Fo,bs):null,_s=P.layout.get("text-rotation-alignment")==="map";vt(Tn,Wa.posMatrix,H,Y,Wi,to,Mt,Be,_s,kt,Wa.toUnwrapped(),ft.width,ft.height,hi,Lr)}const ci=Wa.posMatrix,Qr=Y&&Ca||Si,vi=Gt||Qr?Oc:Wi,ki=Vi,di=kn&&P.paint.get(Y?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let dl;dl=kn?Tn.iconsInText?yn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Hn,Fr,ja):pn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,!0,ja):wn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,ja);const So={program:Mn,buffers:Qa,uniformValues:dl,atlasTexture:Jn,atlasTextureIcon:Rr,atlasInterpolation:kr,atlasInterpolationIcon:lr,isSDF:kn,hasHalo:di};if(Zt&&Tn.canOverlap){Yt=!0;const Lr=Qa.segments.get();for(const _s of Lr)La.push({segments:new n.a0([_s]),sortKey:_s.sortKey,state:So,terrainData:In})}else La.push({segments:Qa.segments,sortKey:0,state:So,terrainData:In})}Yt&&La.sort((Wa,on)=>Wa.sortKey-on.sortKey);for(const Wa of La){const on=Wa.state;if(at.activeTexture.set(lt.TEXTURE0),on.atlasTexture.bind(on.atlasInterpolation,lt.CLAMP_TO_EDGE),on.atlasTextureIcon&&(at.activeTexture.set(lt.TEXTURE1),on.atlasTextureIcon&&on.atlasTextureIcon.bind(on.atlasInterpolationIcon,lt.CLAMP_TO_EDGE)),on.isSDF){const Tn=on.uniformValues;on.hasHalo&&(Tn.u_is_halo=1,pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,Tn,Wa.terrainData)),Tn.u_is_halo=0}pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,on.uniformValues,Wa.terrainData)}}function pd(H,O,P,j,Y,te,de,fe,Ae,Be){const Ge=j.context,qe=Ge.gl;Y.draw(Ge,qe.TRIANGLES,te,de,fe,ao.disabled,Ae,Be,P.id,H.layoutVertexBuffer,H.indexBuffer,O,P.paint,j.transform.zoom,H.programConfigurations.get(P.id),H.dynamicLayoutVertexBuffer,H.opacityVertexBuffer)}function ic(H,O,P,j){if(P.paint.get("heatmap-opacity")!==0)if(H.renderPass==="offscreen"){const Y=H.context,te=Y.gl,de=Qi.disabled,fe=new Cs([te.ONE,te.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(Ae,Be,Ge){const qe=Ae.gl;Ae.activeTexture.set(qe.TEXTURE1),Ae.viewport.set([0,0,Be.width/4,Be.height/4]);let at=Ge.heatmapFbo;if(at)qe.bindTexture(qe.TEXTURE_2D,at.colorAttachment.get()),Ae.bindFramebuffer.set(at.framebuffer);else{const lt=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,lt),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),at=Ge.heatmapFbo=Ae.createFramebuffer(Be.width/4,Be.height/4,!1,!1),function(ft,kt,Nt,Mt){var Gt,zt;const Xt=ft.gl,Zt=(Gt=ft.HALF_FLOAT)!==null&&Gt!==void 0?Gt:Xt.UNSIGNED_BYTE,Yt=(zt=ft.RGBA16F)!==null&&zt!==void 0?zt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Yt,kt.width/4,kt.height/4,0,Xt.RGBA,Zt,null),Mt.colorAttachment.set(Nt)}(Ae,Be,lt,at)}})(Y,H,P),Y.clear({color:n.aN.transparent});for(let Ae=0;Ae<j.length;Ae++){const Be=j[Ae];if(O.hasRenderableParent(Be))continue;const Ge=O.getTile(Be),qe=Ge.getBucket(P);if(!qe)continue;const at=qe.programConfigurations.get(P.id),lt=H.useProgram("heatmap",at),{zoom:ft}=H.transform;lt.draw(Y,te.TRIANGLES,bi.disabled,de,fe,ao.disabled,Ma(Be.posMatrix,Ge,ft,P.paint.get("heatmap-intensity")),null,P.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,P.paint,H.transform.zoom,at)}Y.viewport.set([0,0,H.width,H.height])}else H.renderPass==="translucent"&&(H.context.setColorMode(H.colorModeForRenderPass()),function(Y,te){const de=Y.context,fe=de.gl,Ae=te.heatmapFbo;if(!Ae)return;de.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,Ae.colorAttachment.get()),de.activeTexture.set(fe.TEXTURE1);let Be=te.colorRampTexture;Be||(Be=te.colorRampTexture=new I(de,te.colorRamp,fe.RGBA)),Be.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(de,fe.TRIANGLES,bi.disabled,Qi.disabled,Y.colorModeForRenderPass(),ao.disabled,$a(Y,te,0,1),null,te.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,te.paint,Y.transform.zoom)}(H,P))}function $l(H,O,P,j,Y){if(!P||!j||!j.imageAtlas)return;const te=j.imageAtlas.patternPositions;let de=te[P.to.toString()],fe=te[P.from.toString()];if(!de&&fe&&(de=fe),!fe&&de&&(fe=de),!de||!fe){const Ae=Y.getPaintProperty(O);de=te[Ae],fe=te[Ae]}de&&fe&&H.setConstantPatternPositions(de,fe)}function Hc(H,O,P,j,Y,te,de){const fe=H.context.gl,Ae="fill-pattern",Be=P.paint.get(Ae),Ge=Be&&Be.constantOr(1),qe=P.getCrossfadeParameters();let at,lt,ft,kt,Nt;de?(lt=Ge&&!P.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=fe.LINES):(lt=Ge?"fillPattern":"fill",at=fe.TRIANGLES);const Mt=Be.constantOr(null);for(const Gt of j){const zt=O.getTile(Gt);if(Ge&&!zt.patternsLoaded())continue;const Xt=zt.getBucket(P);if(!Xt)continue;const Zt=Xt.programConfigurations.get(P.id),Yt=H.useProgram(lt,Zt),ya=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Gt);Ge&&(H.context.activeTexture.set(fe.TEXTURE0),zt.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Zt.updatePaintBuffers(qe)),$l(Zt,Ae,Mt,zt,P);const Ca=ya?Gt:null,La=Ca?Ca.posMatrix:Gt.posMatrix,ja=H.translatePosMatrix(La,zt,P.paint.get("fill-translate"),P.paint.get("fill-translate-anchor"));if(de){kt=Xt.indexBuffer2,Nt=Xt.segments2;const Wa=[fe.drawingBufferWidth,fe.drawingBufferHeight];ft=lt==="fillOutlinePattern"&&Ge?la(ja,H,qe,zt,Wa):Rn(ja,Wa)}else kt=Xt.indexBuffer,Nt=Xt.segments,ft=Ge?Cn(ja,H,qe,zt):ln(ja);Yt.draw(H.context,at,Y,H.stencilModeForClipping(Gt),te,ao.disabled,ft,ya,P.id,Xt.layoutVertexBuffer,kt,Nt,P.paint,H.transform.zoom,Zt)}}function Wc(H,O,P,j,Y,te,de){const fe=H.context,Ae=fe.gl,Be="fill-extrusion-pattern",Ge=P.paint.get(Be),qe=Ge.constantOr(1),at=P.getCrossfadeParameters(),lt=P.paint.get("fill-extrusion-opacity"),ft=Ge.constantOr(null);for(const kt of j){const Nt=O.getTile(kt),Mt=Nt.getBucket(P);if(!Mt)continue;const Gt=H.style.map.terrain&&H.style.map.terrain.getTerrainData(kt),zt=Mt.programConfigurations.get(P.id),Xt=H.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",zt);qe&&(H.context.activeTexture.set(Ae.TEXTURE0),Nt.imageAtlasTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),zt.updatePaintBuffers(at)),$l(zt,Be,ft,Nt,P);const Zt=H.translatePosMatrix(kt.posMatrix,Nt,P.paint.get("fill-extrusion-translate"),P.paint.get("fill-extrusion-translate-anchor")),Yt=P.paint.get("fill-extrusion-vertical-gradient"),ya=qe?dn(Zt,H,Yt,lt,kt,at,Nt):Xa(Zt,H,Yt,lt);Xt.draw(fe,fe.gl.TRIANGLES,Y,te,de,ao.backCCW,ya,Gt,P.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,P.paint,H.transform.zoom,zt,H.style.map.terrain&&Mt.centroidVertexBuffer)}}function Cc(H,O,P,j,Y,te,de){const fe=H.context,Ae=fe.gl,Be=P.fbo;if(!Be)return;const Ge=H.useProgram("hillshade"),qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(O);fe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,Be.colorAttachment.get());const at=qe?O:null;Ge.draw(fe,Ae.TRIANGLES,Y,te,de,ao.disabled,Pa(H,P,j,at),qe,j.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}function xd(H,O,P,j,Y,te){const de=H.context,fe=de.gl,Ae=O.dem;if(Ae&&Ae.data){const Be=Ae.dim,Ge=Ae.stride,qe=Ae.getPixels();if(de.activeTexture.set(fe.TEXTURE1),de.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||H.getTileTexture(Ge),O.demTexture){const lt=O.demTexture;lt.update(qe,{premultiply:!1}),lt.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else O.demTexture=new I(de,qe,fe.RGBA,{premultiply:!1}),O.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);de.activeTexture.set(fe.TEXTURE0);let at=O.fbo;if(!at){const lt=new I(de,{width:Be,height:Be,data:null},fe.RGBA);lt.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),at=O.fbo=de.createFramebuffer(Be,Be,!0,!1),at.colorAttachment.set(lt.texture)}de.bindFramebuffer.set(at.framebuffer),de.viewport.set([0,0,Be,Be]),H.useProgram("hillshadePrepare").draw(de,fe.TRIANGLES,j,Y,te,ao.disabled,Sa(O.tileID,Ae),null,P.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function zs(H,O,P,j,Y,te){const de=j.paint.get("raster-fade-duration");if(!te&&de>0){const fe=l.now(),Ae=(fe-H.timeAdded)/de,Be=O?(fe-O.timeAdded)/de:-1,Ge=P.getSource(),qe=Y.coveringZoomLevel({tileSize:Ge.tileSize,roundZoom:Ge.roundZoom}),at=!O||Math.abs(O.tileID.overscaledZ-qe)>Math.abs(H.tileID.overscaledZ-qe),lt=at&&H.refreshedUponExpiration?1:n.ad(at?Ae:1-Be,0,1);return H.refreshedUponExpiration&&Ae>=1&&(H.refreshedUponExpiration=!1),O?{opacity:1,mix:1-lt}:{opacity:lt,mix:0}}return{opacity:1,mix:0}}const rl=new n.aN(1,0,0,1),il=new n.aN(0,1,0,1),ds=new n.aN(0,0,1,1),ji=new n.aN(1,0,1,1),nd=new n.aN(0,1,1,1);function Fc(H){const O=H.transform.padding;Lc(H,H.transform.height-(O.top||0),3,rl),Lc(H,O.bottom||0,3,il),xo(H,O.left||0,3,ds),xo(H,H.transform.width-(O.right||0),3,ji);const P=H.transform.centerPoint;(function(j,Y,te,de){Sc(j,Y-1,te-10,2,20,de),Sc(j,Y-10,te-1,20,2,de)})(H,P.x,H.transform.height-P.y,nd)}function Lc(H,O,P,j){Sc(H,0,O+P/2,H.transform.width,P,j)}function xo(H,O,P,j){Sc(H,O-P/2,0,P,H.transform.height,j)}function Sc(H,O,P,j,Y,te){const de=H.context,fe=de.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(O*H.pixelRatio,P*H.pixelRatio,j*H.pixelRatio,Y*H.pixelRatio),de.clear({color:te}),fe.disable(fe.SCISSOR_TEST)}function wd(H,O,P){const j=H.context,Y=j.gl,te=P.posMatrix,de=H.useProgram("debug"),fe=bi.disabled,Ae=Qi.disabled,Be=H.colorModeForRenderPass(),Ge="$debug",qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(P);j.activeTexture.set(Y.TEXTURE0);const at=O.getTileByID(P.key).latestRawTileData,lt=at&&at.byteLength||0,ft=Math.floor(lt/1024),kt=O.getTile(P).tileSize,Nt=512/Math.min(kt,512)*(P.overscaledZ/H.transform.zoom)*.5;let Mt=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(Mt+=` => ${P.overscaledZ}`),function(Gt,zt){Gt.initDebugOverlayCanvas();const Xt=Gt.debugOverlayCanvas,Zt=Gt.context.gl,Yt=Gt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Xt.width,Xt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(zt,5,5),Yt.strokeText(zt,5,5),Gt.debugOverlayTexture.update(Xt),Gt.debugOverlayTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE)}(H,`${Mt} ${ft}kB`),de.draw(j,Y.TRIANGLES,fe,Ae,Cs.alphaBlended,ao.disabled,sa(te,n.aN.transparent,Nt),null,Ge,H.debugBuffer,H.quadTriangleIndexBuffer,H.debugSegments),de.draw(j,Y.LINE_STRIP,fe,Ae,Be,ao.disabled,sa(te,n.aN.red),qe,Ge,H.debugBuffer,H.tileBorderIndexBuffer,H.debugSegments)}function oc(H,O,P){const j=H.context,Y=j.gl,te=H.colorModeForRenderPass(),de=new bi(Y.LEQUAL,bi.ReadWrite,H.depthRangeFor3D),fe=H.useProgram("terrain"),Ae=O.getTerrainMesh();j.bindFramebuffer.set(null),j.viewport.set([0,0,H.width,H.height]);for(const Be of P){const Ge=H.renderToTexture.getTexture(Be),qe=O.getTerrainData(Be.tileID);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,Ge.texture);const at=H.transform.calculatePosMatrix(Be.tileID.toUnwrapped()),lt=O.getMeshFrameDelta(H.transform.zoom),ft=H.transform.calculateFogMatrix(Be.tileID.toUnwrapped()),kt=ha(at,lt,ft,H.style.sky,H.transform.pitch);fe.draw(j,Y.TRIANGLES,de,Qi.disabled,te,ao.backCCW,kt,qe,"terrain",Ae.vertexBuffer,Ae.indexBuffer,Ae.segments)}}class Kl{constructor(O,P,j){this.vertexBuffer=O,this.indexBuffer=P,this.segments=j}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class sc{constructor(O,P){this.context=new nc(O),this.transform=P,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=je.maxUnderzooming+je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qa}resize(O,P,j){if(this.width=Math.floor(O*j),this.height=Math.floor(P*j),this.pixelRatio=j,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Y of this.style._order)this.style._layers[Y].resize()}setup(){const O=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=O.createVertexBuffer(P,cn.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const j=new n.aX;j.emplaceBack(0,0),j.emplaceBack(n.X,0),j.emplaceBack(0,n.X),j.emplaceBack(n.X,n.X),this.debugBuffer=O.createVertexBuffer(j,cn.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const Y=new n.$;Y.emplaceBack(0,0,0,0),Y.emplaceBack(n.X,0,n.X,0),Y.emplaceBack(0,n.X,0,n.X),Y.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=O.createVertexBuffer(Y,Ce.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const te=new n.aX;te.emplaceBack(0,0),te.emplaceBack(1,0),te.emplaceBack(0,1),te.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(te,cn.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const de=new n.aZ;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(de);const fe=new n.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(fe);const Ae=this.context.gl;this.stencilClearMode=new Qi({func:Ae.ALWAYS,mask:0},0,255,Ae.ZERO,Ae.ZERO,Ae.ZERO)}clearStencil(){const O=this.context,P=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const j=n.H();n.aQ(j,0,this.width,this.height,0,0,1),n.K(j,j,[P.drawingBufferWidth,P.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,P.TRIANGLES,bi.disabled,this.stencilClearMode,Cs.disabled,ao.disabled,Ia(j),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,P){if(this.currentStencilSource===O.source||!O.isTileClipped()||!P||!P.length)return;this.currentStencilSource=O.source;const j=this.context,Y=j.gl;this.nextStencilID+P.length>256&&this.clearStencil(),j.setColorMode(Cs.disabled),j.setDepthMode(bi.disabled);const te=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const de of P){const fe=this._tileClippingMaskIDs[de.key]=this.nextStencilID++,Ae=this.style.map.terrain&&this.style.map.terrain.getTerrainData(de);te.draw(j,Y.TRIANGLES,bi.disabled,new Qi({func:Y.ALWAYS,mask:0},fe,255,Y.KEEP,Y.KEEP,Y.REPLACE),Cs.disabled,ao.disabled,Ia(de.posMatrix),Ae,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,P=this.context.gl;return new Qi({func:P.NOTEQUAL,mask:255},O,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(O){const P=this.context.gl;return new Qi({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,P.KEEP,P.KEEP,P.REPLACE)}stencilConfigForOverlap(O){const P=this.context.gl,j=O.sort((de,fe)=>fe.overscaledZ-de.overscaledZ),Y=j[j.length-1].overscaledZ,te=j[0].overscaledZ-Y+1;if(te>1){this.currentStencilSource=void 0,this.nextStencilID+te>256&&this.clearStencil();const de={};for(let fe=0;fe<te;fe++)de[fe+Y]=new Qi({func:P.GEQUAL,mask:255},fe+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=te,[de,j]}return[{[Y]:Qi.disabled},j]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new Cs([O.CONSTANT_COLOR,O.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Cs.unblended:Cs.alphaBlended}depthModeForSublayer(O,P,j){if(!this.opaquePassEnabledForLayer())return bi.disabled;const Y=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new bi(j||this.context.gl.LEQUAL,P,[Y,Y])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,P){var j;this.style=O,this.options=P,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(l.now()),this.imageManager.beginFrame();const Y=this.style._order,te=this.style.sourceCaches,de={},fe={},Ae={};for(const Be in te){const Ge=te[Be];Ge.used&&Ge.prepare(this.context),de[Be]=Ge.getVisibleCoordinates(),fe[Be]=de[Be].slice().reverse(),Ae[Be]=Ge.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Be=0;Be<Y.length;Be++){const Ge=Y[Be];if(this.style._layers[Ge].is3D()){this.opaquePassCutoff=Be;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Be of Y){const Ge=this.style._layers[Be];if(!Ge.hasOffscreenPass()||Ge.isHidden(this.transform.zoom))continue;const qe=fe[Ge.source];(Ge.type==="custom"||qe.length)&&this.renderLayer(this,te[Ge.source],Ge,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((j=this.style.stylesheet)===null||j===void 0)&&j.sky&&function(Be,Ge){const qe=Be.context,at=qe.gl,lt=((Gt,zt,Xt)=>({u_sky_color:Gt.properties.get("sky-color"),u_horizon_color:Gt.properties.get("horizon-color"),u_horizon:(zt.height/2+zt.getHorizon())*Xt,u_sky_horizon_blend:Gt.properties.get("sky-horizon-blend")*zt.height/2*Xt}))(Ge,Be.style.map.transform,Be.pixelRatio),ft=new bi(at.LEQUAL,bi.ReadWrite,[0,1]),kt=Qi.disabled,Nt=Be.colorModeForRenderPass(),Mt=Be.useProgram("sky");if(!Ge.mesh){const Gt=new n.aX;Gt.emplaceBack(-1,-1),Gt.emplaceBack(1,-1),Gt.emplaceBack(1,1),Gt.emplaceBack(-1,1);const zt=new n.aY;zt.emplaceBack(0,1,2),zt.emplaceBack(0,2,3),Ge.mesh=new Kl(qe.createVertexBuffer(Gt,cn.members),qe.createIndexBuffer(zt),n.a0.simpleSegment(0,0,Gt.length,zt.length))}Mt.draw(qe,at.TRIANGLES,ft,kt,Nt,ao.disabled,lt,void 0,"sky",Ge.mesh.vertexBuffer,Ge.mesh.indexBuffer,Ge.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Y.length-1;this.currentLayer>=0;this.currentLayer--){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source],qe=de[Be.source];this._renderTileClippingMasks(Be,qe),this.renderLayer(this,Ge,Be,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Y.length;this.currentLayer++){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Be))continue;const qe=(Be.type==="symbol"?Ae:fe)[Be.source];this._renderTileClippingMasks(Be,de[Be.source]),this.renderLayer(this,Ge,Be,qe)}if(this.options.showTileBoundaries){const Be=function(Ge,qe){let at=null;const lt=Object.values(Ge._layers).flatMap(Mt=>Mt.source&&!Mt.isHidden(qe)?[Ge.sourceCaches[Mt.source]]:[]),ft=lt.filter(Mt=>Mt.getSource().type==="vector"),kt=lt.filter(Mt=>Mt.getSource().type!=="vector"),Nt=Mt=>{(!at||at.getSource().maxzoom<Mt.getSource().maxzoom)&&(at=Mt)};return ft.forEach(Mt=>Nt(Mt)),at||kt.forEach(Mt=>Nt(Mt)),at}(this.style,this.transform.zoom);Be&&function(Ge,qe,at){for(let lt=0;lt<at.length;lt++)wd(Ge,qe,at[lt])}(this,Be,Be.getVisibleCoordinates())}this.options.showPadding&&Fc(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const P=this.terrainFacilitator.matrix,j=this.transform.modelViewProjectionMatrix;let Y=this.terrainFacilitator.dirty;Y||(Y=O?!n.a_(P,j):!n.a$(P,j)),Y||(Y=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Y&&(n.b0(P,j),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(te,de){const fe=te.context,Ae=fe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.sourceCache.getRenderableTiles(),lt=te.useProgram("terrainDepth");fe.bindFramebuffer.set(de.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),fe.clear({color:n.aN.transparent,depth:1});for(const ft of at){const kt=de.getTerrainData(ft.tileID),Nt={u_matrix:te.transform.calculatePosMatrix(ft.tileID.toUnwrapped()),u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};lt.draw(fe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Nt,kt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain),function(te,de){const fe=te.context,Ae=fe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.getCoordsTexture(),lt=de.sourceCache.getRenderableTiles(),ft=te.useProgram("terrainCoords");fe.bindFramebuffer.set(de.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),fe.clear({color:n.aN.transparent,depth:1}),de.coordsIndex=[];for(const kt of lt){const Nt=de.getTerrainData(kt.tileID);fe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,at.texture);const Mt={u_matrix:te.transform.calculatePosMatrix(kt.tileID.toUnwrapped()),u_terrain_coords_id:(255-de.coordsIndex.length)/255,u_texture:0,u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};ft.draw(fe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Mt,Nt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),de.coordsIndex.push(kt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain))}renderLayer(O,P,j,Y){if(!j.isHidden(this.transform.zoom)&&(j.type==="background"||j.type==="custom"||(Y||[]).length))switch(this.id=j.id,j.type){case"symbol":bl(O,P,j,Y,this.style.placement.variableOffsets);break;case"circle":(function(te,de,fe,Ae){if(te.renderPass!=="translucent")return;const Be=fe.paint.get("circle-opacity"),Ge=fe.paint.get("circle-stroke-width"),qe=fe.paint.get("circle-stroke-opacity"),at=!fe.layout.get("circle-sort-key").isConstant();if(Be.constantOr(1)===0&&(Ge.constantOr(1)===0||qe.constantOr(1)===0))return;const lt=te.context,ft=lt.gl,kt=te.depthModeForSublayer(0,bi.ReadOnly),Nt=Qi.disabled,Mt=te.colorModeForRenderPass(),Gt=[];for(let zt=0;zt<Ae.length;zt++){const Xt=Ae[zt],Zt=de.getTile(Xt),Yt=Zt.getBucket(fe);if(!Yt)continue;const ya=Yt.programConfigurations.get(fe.id),Ca=te.useProgram("circle",ya),La=Yt.layoutVertexBuffer,ja=Yt.indexBuffer,Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Xt),on={programConfiguration:ya,program:Ca,layoutVertexBuffer:La,indexBuffer:ja,uniformValues:za(te,Xt,Zt,fe),terrainData:Wa};if(at){const Tn=Yt.segments.get();for(const Qa of Tn)Gt.push({segments:new n.a0([Qa]),sortKey:Qa.sortKey,state:on})}else Gt.push({segments:Yt.segments,sortKey:0,state:on})}at&&Gt.sort((zt,Xt)=>zt.sortKey-Xt.sortKey);for(const zt of Gt){const{programConfiguration:Xt,program:Zt,layoutVertexBuffer:Yt,indexBuffer:ya,uniformValues:Ca,terrainData:La}=zt.state,ja=zt.segments;Zt.draw(lt,ft.TRIANGLES,kt,Nt,Mt,ao.disabled,Ca,La,fe.id,Yt,ya,ja,fe.paint,te.transform.zoom,Xt)}})(O,P,j,Y);break;case"heatmap":ic(O,P,j,Y);break;case"line":(function(te,de,fe,Ae){if(te.renderPass!=="translucent")return;const Be=fe.paint.get("line-opacity"),Ge=fe.paint.get("line-width");if(Be.constantOr(1)===0||Ge.constantOr(1)===0)return;const qe=te.depthModeForSublayer(0,bi.ReadOnly),at=te.colorModeForRenderPass(),lt=fe.paint.get("line-dasharray"),ft=fe.paint.get("line-pattern"),kt=ft.constantOr(1),Nt=fe.paint.get("line-gradient"),Mt=fe.getCrossfadeParameters(),Gt=kt?"linePattern":lt?"lineSDF":Nt?"lineGradient":"line",zt=te.context,Xt=zt.gl;let Zt=!0;for(const Yt of Ae){const ya=de.getTile(Yt);if(kt&&!ya.patternsLoaded())continue;const Ca=ya.getBucket(fe);if(!Ca)continue;const La=Ca.programConfigurations.get(fe.id),ja=te.context.program.get(),Wa=te.useProgram(Gt,La),on=Zt||Wa.program!==ja,Tn=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Yt),Qa=ft.constantOr(null);if(Qa&&ya.imageAtlas){const Ln=ya.imageAtlas,fn=Ln.patternPositions[Qa.to.toString()],Mn=Ln.patternPositions[Qa.from.toString()];fn&&Mn&&La.setConstantPatternPositions(fn,Mn)}const Sn=Tn?Yt:null,kn=kt?Va(te,ya,fe,Mt,Sn):lt?en(te,ya,fe,lt,Mt,Sn):Nt?ga(te,ya,fe,Ca.lineClipsArray.length,Sn):ea(te,ya,fe,Sn);if(kt)zt.activeTexture.set(Xt.TEXTURE0),ya.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),La.updatePaintBuffers(Mt);else if(lt&&(on||te.lineAtlas.dirty))zt.activeTexture.set(Xt.TEXTURE0),te.lineAtlas.bind(zt);else if(Nt){const Ln=Ca.gradients[fe.id];let fn=Ln.texture;if(fe.gradientVersion!==Ln.version){let Mn=256;if(fe.stepInterpolant){const Wn=de.getSource().maxzoom,In=Yt.canonical.z===Wn?Math.ceil(1<<te.transform.maxZoom-Yt.canonical.z):1,Hn=Ca.maxLineLength/n.X*1024*In;Mn=n.ad(n.aV(Hn),256,zt.maxTextureSize)}Ln.gradient=n.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mn,image:Ln.gradient||void 0,clips:Ca.lineClipsArray}),Ln.texture?Ln.texture.update(Ln.gradient):Ln.texture=new I(zt,Ln.gradient,Xt.RGBA),Ln.version=fe.gradientVersion,fn=Ln.texture}zt.activeTexture.set(Xt.TEXTURE0),fn.bind(fe.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Wa.draw(zt,Xt.TRIANGLES,qe,te.stencilModeForClipping(Yt),at,ao.disabled,kn,Tn,fe.id,Ca.layoutVertexBuffer,Ca.indexBuffer,Ca.segments,fe.paint,te.transform.zoom,La,Ca.layoutVertexBuffer2),Zt=!1}})(O,P,j,Y);break;case"fill":(function(te,de,fe,Ae){const Be=fe.paint.get("fill-color"),Ge=fe.paint.get("fill-opacity");if(Ge.constantOr(1)===0)return;const qe=te.colorModeForRenderPass(),at=fe.paint.get("fill-pattern"),lt=te.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Be.constantOr(n.aN.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(te.renderPass===lt){const ft=te.depthModeForSublayer(1,te.renderPass==="opaque"?bi.ReadWrite:bi.ReadOnly);Hc(te,de,fe,Ae,ft,qe,!1)}if(te.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const ft=te.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,bi.ReadOnly);Hc(te,de,fe,Ae,ft,qe,!0)}})(O,P,j,Y);break;case"fill-extrusion":(function(te,de,fe,Ae){const Be=fe.paint.get("fill-extrusion-opacity");if(Be!==0&&te.renderPass==="translucent"){const Ge=new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D);if(Be!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))Wc(te,de,fe,Ae,Ge,Qi.disabled,Cs.disabled),Wc(te,de,fe,Ae,Ge,te.stencilModeFor3D(),te.colorModeForRenderPass());else{const qe=te.colorModeForRenderPass();Wc(te,de,fe,Ae,Ge,Qi.disabled,qe)}}})(O,P,j,Y);break;case"hillshade":(function(te,de,fe,Ae){if(te.renderPass!=="offscreen"&&te.renderPass!=="translucent")return;const Be=te.context,Ge=te.depthModeForSublayer(0,bi.ReadOnly),qe=te.colorModeForRenderPass(),[at,lt]=te.renderPass==="translucent"?te.stencilConfigForOverlap(Ae):[{},Ae];for(const ft of lt){const kt=de.getTile(ft);kt.needsHillshadePrepare!==void 0&&kt.needsHillshadePrepare&&te.renderPass==="offscreen"?xd(te,kt,fe,Ge,Qi.disabled,qe):te.renderPass==="translucent"&&Cc(te,ft,kt,fe,Ge,at[ft.overscaledZ],qe)}Be.viewport.set([0,0,te.width,te.height])})(O,P,j,Y);break;case"raster":(function(te,de,fe,Ae){if(te.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!Ae.length)return;const Be=te.context,Ge=Be.gl,qe=de.getSource(),at=te.useProgram("raster"),lt=te.colorModeForRenderPass(),[ft,kt]=qe instanceof ye?[{},Ae]:te.stencilConfigForOverlap(Ae),Nt=kt[kt.length-1].overscaledZ,Mt=!te.options.moving;for(const Gt of kt){const zt=te.depthModeForSublayer(Gt.overscaledZ-Nt,fe.paint.get("raster-opacity")===1?bi.ReadWrite:bi.ReadOnly,Ge.LESS),Xt=de.getTile(Gt);Xt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Zt=de.findLoadedParent(Gt,0),Yt=de.findLoadedSibling(Gt),ya=zs(Xt,Zt||Yt||null,de,fe,te.transform,te.style.map.terrain);let Ca,La;const ja=fe.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;Be.activeTexture.set(Ge.TEXTURE0),Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Be.activeTexture.set(Ge.TEXTURE1),Zt?(Zt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Ca=Math.pow(2,Zt.tileID.overscaledZ-Xt.tileID.overscaledZ),La=[Xt.tileID.canonical.x*Ca%1,Xt.tileID.canonical.y*Ca%1]):Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Be.extTextureFilterAnisotropic&&te.transform.pitch>20&&Ge.texParameterf(Ge.TEXTURE_2D,Be.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Be.extTextureFilterAnisotropicMax);const Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Gt),on=Wa?Gt:null,Tn=on?on.posMatrix:te.transform.calculatePosMatrix(Gt.toUnwrapped(),Mt),Qa=_n(Tn,La||[0,0],Ca||1,ya,fe);qe instanceof ye?at.draw(Be,Ge.TRIANGLES,zt,Qi.disabled,lt,ao.disabled,Qa,Wa,fe.id,qe.boundsBuffer,te.quadTriangleIndexBuffer,qe.boundsSegments):at.draw(Be,Ge.TRIANGLES,zt,ft[Gt.overscaledZ],lt,ao.disabled,Qa,Wa,fe.id,te.rasterBoundsBuffer,te.quadTriangleIndexBuffer,te.rasterBoundsSegments)}})(O,P,j,Y);break;case"background":(function(te,de,fe,Ae){const Be=fe.paint.get("background-color"),Ge=fe.paint.get("background-opacity");if(Ge===0)return;const qe=te.context,at=qe.gl,lt=te.transform,ft=lt.tileSize,kt=fe.paint.get("background-pattern");if(te.isPatternMissing(kt))return;const Nt=!kt&&Be.a===1&&Ge===1&&te.opaquePassEnabledForLayer()?"opaque":"translucent";if(te.renderPass!==Nt)return;const Mt=Qi.disabled,Gt=te.depthModeForSublayer(0,Nt==="opaque"?bi.ReadWrite:bi.ReadOnly),zt=te.colorModeForRenderPass(),Xt=te.useProgram(kt?"backgroundPattern":"background"),Zt=Ae||lt.coveringTiles({tileSize:ft,terrain:te.style.map.terrain});kt&&(qe.activeTexture.set(at.TEXTURE0),te.imageManager.bind(te.context));const Yt=fe.getCrossfadeParameters();for(const ya of Zt){const Ca=Ae?ya.posMatrix:te.transform.calculatePosMatrix(ya.toUnwrapped()),La=kt?qn(Ca,Ge,te,kt,{tileID:ya,tileSize:ft},Yt):Nn(Ca,Ge,Be),ja=te.style.map.terrain&&te.style.map.terrain.getTerrainData(ya);Xt.draw(qe,at.TRIANGLES,Gt,Mt,zt,ao.disabled,La,ja,fe.id,te.tileExtentBuffer,te.quadTriangleIndexBuffer,te.tileExtentSegments)}})(O,0,j,Y);break;case"custom":(function(te,de,fe){const Ae=te.context,Be=fe.implementation;if(te.renderPass==="offscreen"){const Ge=Be.prerender;Ge&&(te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ge.call(Be,Ae.gl,te.transform.customLayerMatrix()),Ae.setDirty(),te.setBaseState())}else if(te.renderPass==="translucent"){te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ae.setStencilMode(Qi.disabled);const Ge=Be.renderingMode==="3d"?new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D):te.depthModeForSublayer(0,bi.ReadOnly);Ae.setDepthMode(Ge),Be.render(Ae.gl,te.transform.customLayerMatrix(),{farZ:te.transform.farZ,nearZ:te.transform.nearZ,fov:te.transform._fov,modelViewProjectionMatrix:te.transform.modelViewProjectionMatrix,projectionMatrix:te.transform.projectionMatrix}),Ae.setDirty(),te.setBaseState(),Ae.bindFramebuffer.set(null)}})(O,0,j)}}translatePosMatrix(O,P,j,Y,te){if(!j[0]&&!j[1])return O;const de=te?Y==="map"?this.transform.angle:0:Y==="viewport"?-this.transform.angle:0;if(de){const Be=Math.sin(de),Ge=Math.cos(de);j=[j[0]*Ge-j[1]*Be,j[0]*Be+j[1]*Ge]}const fe=[te?j[0]:yt(P,j[0],this.transform.zoom),te?j[1]:yt(P,j[1],this.transform.zoom),0],Ae=new Float32Array(16);return n.J(Ae,O,fe),Ae}saveTileTexture(O){const P=this._tileTextures[O.size[0]];P?P.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const P=this._tileTextures[O];return P&&P.length>0?P.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const P=this.imageManager.getPattern(O.from.toString()),j=this.imageManager.getPattern(O.to.toString());return!P||!j}useProgram(O,P){this.cache=this.cache||{};const j=O+(P?P.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[j]||(this.cache[j]=new Ya(this.context,hn[O],P,Dn[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const O=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,O.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:P}=this.context.gl;return this.width!==O||this.height!==P}}class ol{constructor(O,P){this.points=O,this.planes=P}static fromInvProjectionMatrix(O,P,j){const Y=Math.pow(2,j),te=[[-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(fe=>{const Ae=1/(fe=n.ag([],fe,O))[3]/P*Y;return n.b1(fe,fe,[Ae,Ae,1/fe[3],Ae])}),de=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const Ae=function(at,lt){var ft=lt[0],kt=lt[1],Nt=lt[2],Mt=ft*ft+kt*kt+Nt*Nt;return Mt>0&&(Mt=1/Math.sqrt(Mt)),at[0]=lt[0]*Mt,at[1]=lt[1]*Mt,at[2]=lt[2]*Mt,at}([],function(at,lt,ft){var kt=lt[0],Nt=lt[1],Mt=lt[2],Gt=ft[0],zt=ft[1],Xt=ft[2];return at[0]=Nt*Xt-Mt*zt,at[1]=Mt*Gt-kt*Xt,at[2]=kt*zt-Nt*Gt,at}([],T([],te[fe[0]],te[fe[1]]),T([],te[fe[2]],te[fe[1]]))),Be=(Ge=Ae,qe=te[fe[1]],-(Ge[0]*qe[0]+Ge[1]*qe[1]+Ge[2]*qe[2]));var Ge,qe;return Ae.concat(Be)});return new ol(te,de)}}class js{constructor(O,P){this.min=O,this.max=P,this.center=function(j,Y,te){return j[0]=Y[0]*te,j[1]=Y[1]*te,j[2]=Y[2]*te,j}([],function(j,Y,te){return j[0]=Y[0]+te[0],j[1]=Y[1]+te[1],j[2]=Y[2]+te[2],j}([],this.min,this.max),.5)}quadrant(O){const P=[O%2==0,O<2],j=S(this.min),Y=S(this.max);for(let te=0;te<P.length;te++)j[te]=P[te]?this.min[te]:this.center[te],Y[te]=P[te]?this.center[te]:this.max[te];return Y[2]=this.max[2],new js(j,Y)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){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 j=!0;for(let Y=0;Y<O.planes.length;Y++){const te=O.planes[Y];let de=0;for(let fe=0;fe<P.length;fe++)n.b2(te,P[fe])>=0&&de++;if(de===0)return 0;de!==P.length&&(j=!1)}if(j)return 2;for(let Y=0;Y<3;Y++){let te=Number.MAX_VALUE,de=-Number.MAX_VALUE;for(let fe=0;fe<O.points.length;fe++){const Ae=O.points[fe][Y]-this.min[Y];te=Math.min(te,Ae),de=Math.max(de,Ae)}if(de<0||te>this.max[Y]-this.min[Y])return 0}return 1}}class Ql{constructor(O=0,P=0,j=0,Y=0){if(isNaN(O)||O<0||isNaN(P)||P<0||isNaN(j)||j<0||isNaN(Y)||Y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=P,this.left=j,this.right=Y}interpolate(O,P,j){return P.top!=null&&O.top!=null&&(this.top=n.z.number(O.top,P.top,j)),P.bottom!=null&&O.bottom!=null&&(this.bottom=n.z.number(O.bottom,P.bottom,j)),P.left!=null&&O.left!=null&&(this.left=n.z.number(O.left,P.left,j)),P.right!=null&&O.right!=null&&(this.right=n.z.number(O.right,P.right,j)),this}getCenter(O,P){const j=n.ad((this.left+O-this.right)/2,0,O),Y=n.ad((this.top+P-this.bottom)/2,0,P);return new n.P(j,Y)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new Ql(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 oi{constructor(O,P,j,Y,te){this.tileSize=512,this._renderWorldCopies=te===void 0||!!te,this._minZoom=O||0,this._maxZoom=P||22,this._minPitch=j??0,this._maxPitch=Y??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 Ql,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}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(O){const P=-n.b3(O,-180,180)*Math.PI/180;this.angle!==P&&(this._unmodified=!1,this.angle=P,this._calcMatrices(),this.rotationMatrix=function(){var j=new n.A(4);return n.A!=Float32Array&&(j[1]=0,j[2]=0),j[0]=1,j[3]=1,j}(),function(j,Y,te){var de=Y[0],fe=Y[1],Ae=Y[2],Be=Y[3],Ge=Math.sin(te),qe=Math.cos(te);j[0]=de*qe+Ae*Ge,j[1]=fe*qe+Be*Ge,j[2]=de*-Ge+Ae*qe,j[3]=fe*-Ge+Be*qe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const P=n.ad(O,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(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const P=Math.min(Math.max(O,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(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,P,j){this._unmodified=!1,this._edgeInsets.interpolate(O,P,j),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const P=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,P)}getVisibleUnwrappedCoordinates(O){const P=[new n.b4(0,O)];if(this._renderWorldCopies){const j=this.pointCoordinate(new n.P(0,0)),Y=this.pointCoordinate(new n.P(this.width,0)),te=this.pointCoordinate(new n.P(this.width,this.height)),de=this.pointCoordinate(new n.P(0,this.height)),fe=Math.floor(Math.min(j.x,Y.x,te.x,de.x)),Ae=Math.floor(Math.max(j.x,Y.x,te.x,de.x)),Be=1;for(let Ge=fe-Be;Ge<=Ae+Be;Ge++)Ge!==0&&P.push(new n.b4(Ge,O))}return P}coveringTiles(O){var P,j;let Y=this.coveringZoomLevel(O);const te=Y;if(O.minzoom!==void 0&&Y<O.minzoom)return[];O.maxzoom!==void 0&&Y>O.maxzoom&&(Y=O.maxzoom);const de=this.pointCoordinate(this.getCameraPoint()),fe=n.Z.fromLngLat(this.center),Ae=Math.pow(2,Y),Be=[Ae*de.x,Ae*de.y,0],Ge=[Ae*fe.x,Ae*fe.y,0],qe=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Y);let at=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=Y);const lt=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,ft=zt=>({aabb:new js([zt*Ae,0,0],[(zt+1)*Ae,Ae,0]),zoom:0,x:0,y:0,wrap:zt,fullyVisible:!1}),kt=[],Nt=[],Mt=Y,Gt=O.reparseOverscaled?te:Y;if(this._renderWorldCopies)for(let zt=1;zt<=3;zt++)kt.push(ft(-zt)),kt.push(ft(zt));for(kt.push(ft(0));kt.length>0;){const zt=kt.pop(),Xt=zt.x,Zt=zt.y;let Yt=zt.fullyVisible;if(!Yt){const on=zt.aabb.intersects(qe);if(on===0)continue;Yt=on===2}const ya=O.terrain?Be:Ge,Ca=zt.aabb.distanceX(ya),La=zt.aabb.distanceY(ya),ja=Math.max(Math.abs(Ca),Math.abs(La)),Wa=lt+(1<<Mt-zt.zoom)-2;if(zt.zoom===Mt||ja>Wa&&zt.zoom>=at){const on=Mt-zt.zoom,Tn=Be[0]-.5-(Xt<<on),Qa=Be[1]-.5-(Zt<<on);Nt.push({tileID:new n.S(zt.zoom===Mt?Gt:zt.zoom,zt.wrap,zt.zoom,Xt,Zt),distanceSq:C([Ge[0]-.5-Xt,Ge[1]-.5-Zt]),tileDistanceToCamera:Math.sqrt(Tn*Tn+Qa*Qa)})}else for(let on=0;on<4;on++){const Tn=(Xt<<1)+on%2,Qa=(Zt<<1)+(on>>1),Sn=zt.zoom+1;let kn=zt.aabb.quadrant(on);if(O.terrain){const Ln=new n.S(Sn,zt.wrap,Sn,Tn,Qa),fn=O.terrain.getMinMaxElevation(Ln),Mn=(P=fn.minElevation)!==null&&P!==void 0?P:this.elevation,Wn=(j=fn.maxElevation)!==null&&j!==void 0?j:this.elevation;kn=new js([kn.min[0],kn.min[1],Mn],[kn.max[0],kn.max[1],Wn])}kt.push({aabb:kn,zoom:Sn,x:Tn,y:Qa,wrap:zt.wrap,fullyVisible:Yt})}}return Nt.sort((zt,Xt)=>zt.distanceSq-Xt.distanceSq).map(zt=>zt.tileID)}resize(O,P){this.width=O,this.height=P,this.pixelsToGLUnits=[2/O,-2/P],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const P=n.ad(O.lat,-85.051129,Tc);return new n.P(n.O(O.lng)*this.worldSize,n.Q(P)*this.worldSize)}unproject(O){return new n.Z(O.x/this.worldSize,O.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(O){const P=this.elevation,j=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Y=this.pointLocation(this.centerPoint,O),te=O.getElevationForLngLatZoom(Y,this.tileZoom);if(!(this.elevation-te))return;const de=j+P-te,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/de/n.b5(1,Y.lat)/this.tileSize,Ae=this.scaleZoom(fe);this._elevation=te,this._center=Y,this.zoom=Ae}setLocationAtPoint(O,P){const j=this.pointCoordinate(P),Y=this.pointCoordinate(this.centerPoint),te=this.locationCoordinate(O),de=new n.Z(te.x-(j.x-Y.x),te.y-(j.y-Y.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,P){return P?this.coordinatePoint(this.locationCoordinate(O),P.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,P){return this.coordinateLocation(this.pointCoordinate(O,P))}locationCoordinate(O){return n.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,P){if(P){const ft=P.pointCoordinate(O);if(ft!=null)return ft}const j=[O.x,O.y,0,1],Y=[O.x,O.y,1,1];n.ag(j,j,this.pixelMatrixInverse),n.ag(Y,Y,this.pixelMatrixInverse);const te=j[3],de=Y[3],fe=j[0]/te,Ae=Y[0]/de,Be=j[1]/te,Ge=Y[1]/de,qe=j[2]/te,at=Y[2]/de,lt=qe===at?0:(0-qe)/(at-qe);return new n.Z(n.z.number(fe,Ae,lt)/this.worldSize,n.z.number(Be,Ge,lt)/this.worldSize)}coordinatePoint(O,P=0,j=this.pixelMatrix){const Y=[O.x*this.worldSize,O.y*this.worldSize,P,1];return n.ag(Y,Y,j),new n.P(Y[0]/Y[3],Y[1]/Y[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new xe().extend(this.pointLocation(new n.P(0,O))).extend(this.pointLocation(new n.P(this.width,O))).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 xe([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(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(O){const P=O.canonical,j=this.worldSize/this.zoomScale(P.z),Y=P.x+Math.pow(2,P.z)*O.wrap,te=n.ao(new Float64Array(16));return n.J(te,te,[Y*j,P.y*j,0]),n.K(te,te,[j/n.X,j/n.X,1]),te}calculatePosMatrix(O,P=!1){const j=O.key,Y=P?this._alignedPosMatrixCache:this._posMatrixCache;if(Y[j])return Y[j];const te=this.calculateTileMatrix(O);return n.L(te,P?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,te),Y[j]=new Float32Array(te),Y[j]}calculateFogMatrix(O){const P=O.key,j=this._fogMatrixCache;if(j[P])return j[P];const Y=this.calculateTileMatrix(O);return n.L(Y,this.fogMatrix,Y),j[P]=new Float32Array(Y),j[P]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,P){P=n.ad(+P,this.minZoom,this.maxZoom);const j={center:new n.N(O.lng,O.lat),zoom:P};let Y=this.lngRange;if(!this._renderWorldCopies&&Y===null){const zt=179.9999999999;Y=[-zt,zt]}const te=this.tileSize*this.zoomScale(j.zoom);let de=0,fe=te,Ae=0,Be=te,Ge=0,qe=0;const{x:at,y:lt}=this.size;if(this.latRange){const zt=this.latRange;de=n.Q(zt[1])*te,fe=n.Q(zt[0])*te,fe-de<lt&&(Ge=lt/(fe-de))}Y&&(Ae=n.b3(n.O(Y[0])*te,0,te),Be=n.b3(n.O(Y[1])*te,0,te),Be<Ae&&(Be+=te),Be-Ae<at&&(qe=at/(Be-Ae)));const{x:ft,y:kt}=this.project.call({worldSize:te},O);let Nt,Mt;const Gt=Math.max(qe||0,Ge||0);if(Gt){const zt=new n.P(qe?(Be+Ae)/2:ft,Ge?(fe+de)/2:kt);return j.center=this.unproject.call({worldSize:te},zt).wrap(),j.zoom+=this.scaleZoom(Gt),j}if(this.latRange){const zt=lt/2;kt-zt<de&&(Mt=de+zt),kt+zt>fe&&(Mt=fe-zt)}if(Y){const zt=(Ae+Be)/2;let Xt=ft;this._renderWorldCopies&&(Xt=n.b3(ft,zt-te/2,zt+te/2));const Zt=at/2;Xt-Zt<Ae&&(Nt=Ae+Zt),Xt+Zt>Be&&(Nt=Be-Zt)}if(Nt!==void 0||Mt!==void 0){const zt=new n.P(Nt??ft,Mt??kt);j.center=this.unproject.call({worldSize:te},zt).wrap()}return j}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:P,zoom:j}=this.getConstrained(this.center,this.zoom);this.center=P,this.zoom=j,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this._fov/2,P=this.centerOffset,j=this.point.x,Y=this.point.y;this.cameraToCenterDistance=.5/Math.tan(O)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let te=n.ao(new Float64Array(16));n.K(te,te,[this.width/2,-this.height/2,1]),n.J(te,te,[1,-1,0]),this.labelPlaneMatrix=te,te=n.ao(new Float64Array(16)),n.K(te,te,[1,-1,1]),n.J(te,te,[-1,-1,0]),n.K(te,te,[2/this.width,2/this.height,1]),this.glCoordMatrix=te;const de=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),Ae=de-fe*this._pixelPerMeter/Math.cos(this._pitch),Be=fe<0?Ae:de,Ge=Math.PI/2+this._pitch,qe=this._fov*(.5+P.y/this.height),at=Math.sin(qe)*Be/Math.sin(n.ad(Math.PI-Ge-qe,.01,Math.PI-.01)),lt=this.getHorizon(),ft=2*Math.atan(lt/this.cameraToCenterDistance)*(.5+P.y/(2*lt)),kt=Math.sin(ft)*Be/Math.sin(n.ad(Math.PI-Ge-ft,.01,Math.PI-.01)),Nt=Math.min(at,kt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Nt+Be),this.nearZ=this.height/50,te=new Float64Array(16),n.b6(te,this._fov,this.width/this.height,this.nearZ,this.farZ),te[8]=2*-P.x/this.width,te[9]=2*P.y/this.height,this.projectionMatrix=n.af(te),n.K(te,te,[1,-1,1]),n.J(te,te,[0,0,-this.cameraToCenterDistance]),n.b7(te,te,this._pitch),n.ae(te,te,this.angle),n.J(te,te,[-j,-Y,0]),this.mercatorMatrix=n.K([],te,[this.worldSize,this.worldSize,this.worldSize]),n.K(te,te,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,te),n.J(te,te,[0,0,-this.elevation]),this.modelViewProjectionMatrix=te,this.invModelViewProjectionMatrix=n.at([],te),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,de,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,[-j,-Y,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,te);const Mt=this.width%2/2,Gt=this.height%2/2,zt=Math.cos(this.angle),Xt=Math.sin(this.angle),Zt=j-Math.round(j)+zt*Mt+Xt*Gt,Yt=Y-Math.round(Y)+zt*Gt+Xt*Mt,ya=new Float64Array(te);if(n.J(ya,ya,[Zt>.5?Zt-1:Zt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=ya,te=n.at(new Float64Array(16),this.pixelMatrix),!te)throw new Error("failed to invert matrix");this.pixelMatrixInverse=te,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new n.P(0,0)),P=[O.x*this.worldSize,O.y*this.worldSize,0,1];return n.ag(P,P,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=this._pitch,P=Math.tan(O)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,P))}getCameraQueryGeometry(O){const P=this.getCameraPoint();if(O.length===1)return[O[0],P];{let j=P.x,Y=P.y,te=P.x,de=P.y;for(const fe of O)j=Math.min(j,fe.x),Y=Math.min(Y,fe.y),te=Math.max(te,fe.x),de=Math.max(de,fe.y);return[new n.P(j,Y),new n.P(te,Y),new n.P(te,de),new n.P(j,de),new n.P(j,Y)]}}lngLatToCameraDepth(O,P){const j=this.locationCoordinate(O),Y=[j.x*this.worldSize,j.y*this.worldSize,P,1];return n.ag(Y,Y,this.modelViewProjectionMatrix),Y[2]/Y[3]}}function Us(H,O){let P,j=!1,Y=null,te=null;const de=()=>{Y=null,j&&(H.apply(te,P),Y=setTimeout(de,O),j=!1)};return(...fe)=>(j=!0,te=this,P=fe,Y||de(),Y)}class eo{constructor(O){this._getCurrentHash=()=>{const P=window.location.hash.replace("#","");if(this._hashName){let j;return P.split("&").map(Y=>Y.split("=")).forEach(Y=>{Y[0]===this._hashName&&(j=Y)}),(j&&j[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{const P=this._getCurrentHash();if(P.length>=3&&!P.some(j=>isNaN(j))){const j=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:j,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 j=P.join("/");let Y=j;Y.split("&").length>0&&(Y=Y.split("&")[0]),this._hashName&&(Y=`${this._hashName}=${j}`);let te=window.location.hash.replace(Y,"");te.startsWith("#&")?te=te.slice(0,1)+te.slice(2):te==="#"&&(te="");let de=window.location.href.replace(/(#.+)?$/,te);de=de.replace("&&","&"),window.history.replaceState(window.history.state,null,de)},this._updateHash=Us(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,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(O){const P=this._map.getCenter(),j=Math.round(100*this._map.getZoom())/100,Y=Math.ceil((j*Math.LN2+Math.log(512/360/.5))/Math.LN10),te=Math.pow(10,Y),de=Math.round(P.lng*te)/te,fe=Math.round(P.lat*te)/te,Ae=this._map.getBearing(),Be=this._map.getPitch();let Ge="";if(Ge+=O?`/${de}/${fe}/${j}`:`${j}/${fe}/${de}`,(Ae||Be)&&(Ge+="/"+Math.round(10*Ae)/10),Be&&(Ge+=`/${Math.round(Be)}`),this._hashName){const qe=this._hashName;let at=!1;const lt=window.location.hash.slice(1).split("&").map(ft=>{const kt=ft.split("=")[0];return kt===qe?(at=!0,`${kt}=${Ge}`):ft}).filter(ft=>ft);return at||lt.push(`${qe}=${Ge}`),`#${lt.join("&")}`}return`#${Ge}`}}const Oo={linearity:.3,easing:n.b8(0,0,.3,1)},ai=n.e({deceleration:2500,maxSpeed:1400},Oo),ii=n.e({deceleration:20,maxSpeed:1400},Oo),Ro=n.e({deceleration:1e3,maxSpeed:360},Oo),pc=n.e({deceleration:1e3,maxSpeed:90},Oo);class fc{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,P=l.now();for(;O.length>0&&P-O[0].time>160;)O.shift()}_onMoveEnd(O){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:te}of this._inertiaBuffer)P.zoom+=te.zoomDelta||0,P.bearing+=te.bearingDelta||0,P.pitch+=te.pitchDelta||0,te.panDelta&&P.pan._add(te.panDelta),te.around&&(P.around=te.around),te.pinchAround&&(P.pinchAround=te.pinchAround);const j=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Y={};if(P.pan.mag()){const te=lc(P.pan.mag(),j,n.e({},ai,O||{}));Y.offset=P.pan.mult(te.amount/P.pan.mag()),Y.center=this._map.transform.center,mc(Y,te)}if(P.zoom){const te=lc(P.zoom,j,ii);Y.zoom=this._map.transform.zoom+te.amount,mc(Y,te)}if(P.bearing){const te=lc(P.bearing,j,Ro);Y.bearing=this._map.transform.bearing+n.ad(te.amount,-179,179),mc(Y,te)}if(P.pitch){const te=lc(P.pitch,j,pc);Y.pitch=this._map.transform.pitch+te.amount,mc(Y,te)}if(Y.zoom||Y.bearing){const te=P.pinchAround===void 0?P.around:P.pinchAround;Y.around=te?this._map.unproject(te):this._map.getCenter()}return this.clear(),n.e(Y,{noMoveStart:!0})}}function mc(H,O){(!H.duration||H.duration<O.duration)&&(H.duration=O.duration,H.easing=O.easing)}function lc(H,O,P){const{maxSpeed:j,linearity:Y,deceleration:te}=P,de=n.ad(H*Y/(O/1e3),-j,j),fe=Math.abs(de)/(te*Y);return{easing:P.easing,duration:1e3*fe,amount:de*(fe/2)}}class gs extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j,Y={}){const te=o.mousePos(P.getCanvas(),j),de=P.unproject(te);super(O,n.e({point:te,lngLat:de,originalEvent:j},Y)),this._defaultPrevented=!1,this.target=P}}class wo extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){const Y=O==="touchend"?j.changedTouches:j.touches,te=o.touchPos(P.getCanvasContainer(),Y),de=te.map(Ae=>P.unproject(Ae)),fe=te.reduce((Ae,Be,Ge,qe)=>Ae.add(Be.div(qe.length)),new n.P(0,0));super(O,{points:te,point:fe,lngLats:de,lngLat:P.unproject(fe),originalEvent:j}),this._defaultPrevented=!1}}class sl extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){super(O,{originalEvent:j}),this._defaultPrevented=!1}}class jl{constructor(O,P){this._map=O,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new sl(O.type,this._map,O))}mousedown(O,P){return this._mousedownPos=P,this._firePreventable(new gs(O.type,this._map,O))}mouseup(O){this._map.fire(new gs(O.type,this._map,O))}click(O,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new gs(O.type,this._map,O))}dblclick(O){return this._firePreventable(new gs(O.type,this._map,O))}mouseover(O){this._map.fire(new gs(O.type,this._map,O))}mouseout(O){this._map.fire(new gs(O.type,this._map,O))}touchstart(O){return this._firePreventable(new wo(O.type,this._map,O))}touchmove(O){this._map.fire(new wo(O.type,this._map,O))}touchend(O){this._map.fire(new wo(O.type,this._map,O))}touchcancel(O){this._map.fire(new wo(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class co{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new gs(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gs("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new gs(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class no{constructor(O){this._map=O}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(O){return this.transform.pointLocation(n.P.convert(O),this._map.terrain)}}class ko{constructor(O,P){this._map=O,this._tr=new no(O),this._el=O.getCanvasContainer(),this._container=O.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(O,P){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(O,P){if(!this._active)return;const j=P;if(this._lastPos.equals(j)||!this._box&&j.dist(this._startPos)<this._clickTolerance)return;const Y=this._startPos;this._lastPos=j,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const te=Math.min(Y.x,j.x),de=Math.max(Y.x,j.x),fe=Math.min(Y.y,j.y),Ae=Math.max(Y.y,j.y);o.setTransform(this._box,`translate(${te}px,${fe}px)`),this._box.style.width=de-te+"px",this._box.style.height=Ae-fe+"px"}mouseupWindow(O,P){if(!this._active||O.button!==0)return;const j=this._startPos,Y=P;if(this.reset(),o.suppressClick(),j.x!==Y.x||j.y!==Y.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:O})),{cameraAnimation:te=>te.fitScreenCoordinates(j,Y,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,P){return this._map.fire(new n.k(O,{originalEvent:P}))}}function Ei(H,O){if(H.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${H.length}, points ${O.length}`);const P={};for(let j=0;j<H.length;j++)P[H[j].identifier]=O[j];return P}class Yi{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,P,j){(this.centroid||j.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),j.length===this.numTouches&&(this.centroid=function(Y){const te=new n.P(0,0);for(const de of Y)te._add(de);return te.div(Y.length)}(P),this.touches=Ei(j,P)))}touchmove(O,P,j){if(this.aborted||!this.centroid)return;const Y=Ei(j,P);for(const te in this.touches){const de=this.touches[te],fe=Y[te];(!fe||fe.dist(de)>30)&&(this.aborted=!0)}}touchend(O,P,j){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),j.length===0){const Y=!this.aborted&&this.centroid;if(this.reset(),Y)return Y}}}class ui{constructor(O){this.singleTap=new Yi(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,P,j){this.singleTap.touchstart(O,P,j)}touchmove(O,P,j){this.singleTap.touchmove(O,P,j)}touchend(O,P,j){const Y=this.singleTap.touchend(O,P,j);if(Y){const te=O.timeStamp-this.lastTime<500,de=!this.lastTap||this.lastTap.dist(Y)<30;if(te&&de||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Y,this.count===this.numTaps)return this.reset(),Y}}}class Ji{constructor(O){this._tr=new no(O),this._zoomIn=new ui({numTouches:1,numTaps:2}),this._zoomOut=new ui({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,P,j){this._zoomIn.touchstart(O,P,j),this._zoomOut.touchstart(O,P,j)}touchmove(O,P,j){this._zoomIn.touchmove(O,P,j),this._zoomOut.touchmove(O,P,j)}touchend(O,P,j){const Y=this._zoomIn.touchend(O,P,j),te=this._zoomOut.touchend(O,P,j),de=this._tr;return Y?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:de.zoom+1,around:de.unproject(Y)},{originalEvent:O})}):te?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:de.zoom-1,around:de.unproject(te)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eo{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const P=this._moveFunction(...O);if(P.bearingDelta||P.pitchDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(O,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=P.length?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,P){if(!this.isEnabled())return;const j=this._lastPoint;if(!j)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Y=P.length?P[0]:P;return!this._moved&&Y.dist(j)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Y,this._move(j,Y))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const xl={0:1,2:2};class Vo{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const P=o.mouseButton(O);this._eventButton=P}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!function(P,j){const Y=xl[j];return P.buttons===void 0||(P.buttons&Y)!==Y}(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class wl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){const P=O.targetTouches[0].identifier;this._firstTouch=P}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const uo=H=>{H.mousedown=H.dragStart,H.mousemoveWindow=H.dragMove,H.mouseup=H.dragEnd,H.contextmenu=O=>{O.preventDefault()}},Ul=({enable:H,clickTolerance:O,bearingDegreesPerPixelMoved:P=.8})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({bearingDelta:(te.x-Y.x)*P}),moveStateManager:j,enable:H,assignEvents:uo})},Gs=({enable:H,clickTolerance:O,pitchDegreesPerPixelMoved:P=-.5})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({pitchDelta:(te.y-Y.y)*P}),moveStateManager:j,enable:H,assignEvents:uo})};class rs{constructor(O,P){this._clickTolerance=O.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,P,j){return this._calculateTransform(O,P,j)}touchmove(O,P,j){if(this._active){if(!this._shouldBePrevented(j.length))return O.preventDefault(),this._calculateTransform(O,P,j);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,P,j){this._calculateTransform(O,P,j),this._active&&this._shouldBePrevented(j.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,P,j){j.length>0&&(this._active=!0);const Y=Ei(j,P),te=new n.P(0,0),de=new n.P(0,0);let fe=0;for(const Be in Y){const Ge=Y[Be],qe=this._touches[Be];qe&&(te._add(Ge),de._add(Ge.sub(qe)),fe++,Y[Be]=Ge)}if(this._touches=Y,this._shouldBePrevented(fe)||!de.mag())return;const Ae=de.div(fe);return this._sum._add(Ae),this._sum.mag()<this._clickTolerance?void 0:{around:te.div(fe),panDelta:Ae}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,P,j){this._firstTwoTouches||j.length<2||(this._firstTwoTouches=[j[0].identifier,j[1].identifier],this._start([P[0],P[1]]))}touchmove(O,P,j){if(!this._firstTwoTouches)return;O.preventDefault();const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),fe=yi(j,P,te);if(!de||!fe)return;const Ae=this._aroundCenter?null:de.add(fe).div(2);return this._move([de,fe],Ae,O)}touchend(O,P,j){if(!this._firstTwoTouches)return;const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),fe=yi(j,P,te);de&&fe||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function yi(H,O,P){for(let j=0;j<H.length;j++)if(H[j].identifier===P)return O[j]}function us(H,O){return Math.log(H/O)/Math.LN2}class Qn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,P){const j=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(us(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:us(this._distance,j),pinchAround:P}}}function _c(H,O){return 180*H.angleWith(O)/Math.PI}class qc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,P,j){const Y=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:_c(this._vector,Y),pinchAround:P}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const P=25/(Math.PI*this._minDiameter)*360,j=_c(O,this._startVector);return Math.abs(j)<P}}function ll(H){return Math.abs(H.y)>Math.abs(H.x)}class kl extends go{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,P,j){super.touchstart(O,P,j),this._currentTouchCount=j.length}_start(O){this._lastPoints=O,ll(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,P,j){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Y=O[0].sub(this._lastPoints[0]),te=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Y,te,j.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Y.y+te.y)/2*-.5}):void 0}gestureBeginsVertically(O,P,j){if(this._valid!==void 0)return this._valid;const Y=O.mag()>=2,te=P.mag()>=2;if(!Y&&!te)return;if(!Y||!te)return this._firstMove===void 0&&(this._firstMove=j),j-this._firstMove<100&&void 0;const de=O.y>0==P.y>0;return ll(O)&&ll(P)&&de}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class cc{constructor(O){this._tr=new no(O);const P=Cl;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let P=0,j=0,Y=0,te=0,de=0;switch(O.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:O.shiftKey?j=-1:(O.preventDefault(),te=-1);break;case 39:O.shiftKey?j=1:(O.preventDefault(),te=1);break;case 38:O.shiftKey?Y=1:(O.preventDefault(),de=-1);break;case 40:O.shiftKey?Y=-1:(O.preventDefault(),de=1);break;default:return}return this._rotationDisabled&&(j=0,Y=0),{cameraAnimation:fe=>{const Ae=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:jn,zoom:P?Math.round(Ae.zoom)+P*(O.shiftKey?2:1):Ae.zoom,bearing:Ae.bearing+j*this._bearingStep,pitch:Ae.pitch+Y*this._pitchStep,offset:[-te*this._panStep,-de*this._panStep],center:Ae.center},{originalEvent:O})}}}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 jn(H){return H*(2-H)}const Hs=4.000244140625;class Ws{constructor(O,P){this._onTimeout=j=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(j)},this._map=O,this._tr=new no(O),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let P=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const j=l.now(),Y=j-(this._lastWheelEventTime||0);this._lastWheelEventTime=j,P!==0&&P%Hs==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":Y>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Y*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),O.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=O,this._delta-=P,this._active||this._start(O)),O.preventDefault()}_start(O){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=o.mousePos(this._map.getCanvas(),O),j=this._tr;P.y>j.transform.height/2-j.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?j.center:j.unproject(P)):this._around=n.N.convert(j.center),this._aroundPoint=j.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const Ae=this._type==="wheel"&&Math.abs(this._delta)>Hs?this._wheelZoomRate:this._defaultZoomRate;let Be=2/(1+Math.exp(-Math.abs(this._delta*Ae)));this._delta<0&&Be!==0&&(Be=1/Be);const Ge=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(Ge*Be))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const P=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,j=this._startZoom,Y=this._easing;let te,de=!1;const fe=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&j&&Y&&fe){const Ae=Math.min(fe/200,1),Be=Y(Ae);te=n.z.number(j,P,Be),Ae<1?this._frameId||(this._frameId=!0):de=!0}else te=P,de=!0;return this._active=!0,de&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!de,zoomDelta:te-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let P=n.b9;if(this._prevEase){const j=this._prevEase,Y=(l.now()-j.start)/j.duration,te=j.easing(Y+.01)-j.easing(Y),de=.27/Math.sqrt(te*te+1e-4)*.01,fe=Math.sqrt(.0729-de*de);P=n.b8(de,fe,.25,1)}return this._prevEase={start:l.now(),duration:O,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Pi{constructor(O,P){this._clickZoom=O,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 hs{constructor(O){this._tr=new no(O),this.reset()}reset(){this._active=!1}dblclick(O,P){return O.preventDefault(),{cameraAnimation:j=>{j.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(P)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(){this._tap=new ui({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(O,P,j){if(!this._swipePoint)if(this._tapTime){const Y=P[0],te=O.timeStamp-this._tapTime<500,de=this._tapPoint.dist(Y)<30;te&&de?j.length>0&&(this._swipePoint=Y,this._swipeTouch=j[0].identifier):this.reset()}else this._tap.touchstart(O,P,j)}touchmove(O,P,j){if(this._tapTime){if(this._swipePoint){if(j[0].identifier!==this._swipeTouch)return;const Y=P[0],te=Y.y-this._swipePoint.y;return this._swipePoint=Y,O.preventDefault(),this._active=!0,{zoomDelta:te/128}}}else this._tap.touchmove(O,P,j)}touchend(O,P,j){if(this._tapTime)this._swipePoint&&j.length===0&&this.reset();else{const Y=this._tap.touchend(O,P,j);Y&&(this._tapTime=O.timeStamp,this._tapPoint=Y)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class is{constructor(O,P,j){this._el=O,this._mousePan=P,this._touchPan=j}enable(O){this._inertiaOptions=O||{},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 ho{constructor(O,P,j){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=P,this._mousePitch=j}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 Os{constructor(O,P,j,Y){this._el=O,this._touchZoom=P,this._touchRotate=j,this._tapDragZoom=Y,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),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 $o{constructor(O,P){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const j=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Y=document.createElement("div");Y.className="maplibregl-desktop-message",Y.textContent=P,this._container.appendChild(Y);const te=document.createElement("div");te.className="maplibregl-mobile-message",te.textContent=j,this._container.appendChild(te),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.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(O){return O[this._bypassKey]}notifyGestureBlocked(O,P){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:O,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const os=H=>H.zoom||H.drag||H.pitch||H.rotate;class Sl extends n.k{}function zr(H){return H.panDelta&&H.panDelta.mag()||H.zoomDelta||H.bearingDelta||H.pitchDelta}class Kr{constructor(O,P){this.handleWindowEvent=Y=>{this.handleEvent(Y,`${Y.type}Window`)},this.handleEvent=(Y,te)=>{if(Y.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const de=Y.type==="renderFrame"?void 0:Y,fe={needsRenderFrame:!1},Ae={},Be={},Ge=Y.touches,qe=Ge?this._getMapTouches(Ge):void 0,at=qe?o.touchPos(this._map.getCanvas(),qe):o.mousePos(this._map.getCanvas(),Y);for(const{handlerName:kt,handler:Nt,allowed:Mt}of this._handlers){if(!Nt.isEnabled())continue;let Gt;this._blockedByActive(Be,Mt,kt)?Nt.reset():Nt[te||Y.type]&&(Gt=Nt[te||Y.type](Y,at,qe),this.mergeHandlerResult(fe,Ae,Gt,kt,de),Gt&&Gt.needsRenderFrame&&this._triggerRenderFrame()),(Gt||Nt.isActive())&&(Be[kt]=Nt)}const lt={};for(const kt in this._previousActiveHandlers)Be[kt]||(lt[kt]=de);this._previousActiveHandlers=Be,(Object.keys(lt).length||zr(fe))&&(this._changes.push([fe,Ae,lt]),this._triggerRenderFrame()),(Object.keys(Be).length||zr(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ft}=fe;ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ft(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fc(O),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);const j=this._el;this._listeners=[[j,"touchstart",{passive:!0}],[j,"touchmove",{passive:!1}],[j,"touchend",void 0],[j,"touchcancel",void 0],[j,"mousedown",void 0],[j,"mousemove",void 0],[j,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[j,"mouseover",void 0],[j,"mouseout",void 0],[j,"dblclick",void 0],[j,"click",void 0],[j,"keydown",{capture:!1}],[j,"keyup",void 0],[j,"wheel",{passive:!1}],[j,"contextmenu",void 0],[window,"blur",void 0]];for(const[Y,te,de]of this._listeners)o.addEventListener(Y,te,Y===document?this.handleWindowEvent:this.handleEvent,de)}destroy(){for(const[O,P,j]of this._listeners)o.removeEventListener(O,P,O===document?this.handleWindowEvent:this.handleEvent,j)}_addDefaultHandlers(O){const P=this._map,j=P.getCanvasContainer();this._add("mapEvent",new jl(P,O));const Y=P.boxZoom=new ko(P,O);this._add("boxZoom",Y),O.interactive&&O.boxZoom&&Y.enable();const te=P.cooperativeGestures=new $o(P,O.cooperativeGestures);this._add("cooperativeGestures",te),O.cooperativeGestures&&te.enable();const de=new Ji(P),fe=new hs(P);P.doubleClickZoom=new Pi(fe,de),this._add("tapZoom",de),this._add("clickZoom",fe),O.interactive&&O.doubleClickZoom&&P.doubleClickZoom.enable();const Ae=new Ss;this._add("tapDragZoom",Ae);const Be=P.touchPitch=new kl(P);this._add("touchPitch",Be),O.interactive&&O.touchPitch&&P.touchPitch.enable(O.touchPitch);const Ge=Ul(O),qe=Gs(O);P.dragRotate=new ho(O,Ge,qe),this._add("mouseRotate",Ge,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),O.interactive&&O.dragRotate&&P.dragRotate.enable();const at=(({enable:Gt,clickTolerance:zt})=>{const Xt=new Vo({checkCorrectEvent:Zt=>o.mouseButton(Zt)===0&&!Zt.ctrlKey});return new Eo({clickTolerance:zt,move:(Zt,Yt)=>({around:Yt,panDelta:Yt.sub(Zt)}),activateOnStart:!0,moveStateManager:Xt,enable:Gt,assignEvents:uo})})(O),lt=new rs(O,P);P.dragPan=new is(j,at,lt),this._add("mousePan",at),this._add("touchPan",lt,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&P.dragPan.enable(O.dragPan);const ft=new qc,kt=new Qn;P.touchZoomRotate=new Os(j,kt,ft,Ae),this._add("touchRotate",ft,["touchPan","touchZoom"]),this._add("touchZoom",kt,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&P.touchZoomRotate.enable(O.touchZoomRotate);const Nt=P.scrollZoom=new Ws(P,()=>this._triggerRenderFrame());this._add("scrollZoom",Nt,["mousePan"]),O.interactive&&O.scrollZoom&&P.scrollZoom.enable(O.scrollZoom);const Mt=P.keyboard=new cc(P);this._add("keyboard",Mt),O.interactive&&O.keyboard&&P.keyboard.enable(),this._add("blockableMapEvent",new co(P))}_add(O,P,j){this._handlers.push({handlerName:O,handler:P,allowed:j}),this._handlersById[O]=P}stop(O){if(!this._updatingCamera){for(const{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!os(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,P,j){for(const Y in O)if(Y!==j&&(!P||P.indexOf(Y)<0))return!0;return!1}_getMapTouches(O){const P=[];for(const j of O){const Y=j.target;this._el.contains(Y)&&P.push(j)}return P}mergeHandlerResult(O,P,j,Y,te){if(!j)return;n.e(O,j);const de={handlerName:Y,originalEvent:j.originalEvent||te};j.zoomDelta!==void 0&&(P.zoom=de),j.panDelta!==void 0&&(P.drag=de),j.pitchDelta!==void 0&&(P.pitch=de),j.bearingDelta!==void 0&&(P.rotate=de)}_applyChanges(){const O={},P={},j={};for(const[Y,te,de]of this._changes)Y.panDelta&&(O.panDelta=(O.panDelta||new n.P(0,0))._add(Y.panDelta)),Y.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Y.zoomDelta),Y.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Y.bearingDelta),Y.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Y.pitchDelta),Y.around!==void 0&&(O.around=Y.around),Y.pinchAround!==void 0&&(O.pinchAround=Y.pinchAround),Y.noInertia&&(O.noInertia=Y.noInertia),n.e(P,te),n.e(j,de);this._updateMapTransform(O,P,j),this._changes=[]}_updateMapTransform(O,P,j){const Y=this._map,te=Y._getTransformForUpdate(),de=Y.terrain;if(!(zr(O)||de&&this._terrainMovement))return this._fireEvents(P,j,!0);let{panDelta:fe,zoomDelta:Ae,bearingDelta:Be,pitchDelta:Ge,around:qe,pinchAround:at}=O;at!==void 0&&(qe=at),Y._stop(!0),qe=qe||Y.transform.centerPoint;const lt=te.pointLocation(fe?qe.sub(fe):qe);Be&&(te.bearing+=Be),Ge&&(te.pitch+=Ge),Ae&&(te.zoom+=Ae),de?this._terrainMovement||!P.drag&&!P.zoom?P.drag&&this._terrainMovement?te.center=te.pointLocation(te.centerPoint.sub(fe)):te.setLocationAtPoint(lt,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,te.setLocationAtPoint(lt,qe)):te.setLocationAtPoint(lt,qe),Y._applyUpdatedTransform(te),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(P,j,!0)}_fireEvents(O,P,j){const Y=os(this._eventsInProgress),te=os(O),de={};for(const qe in O){const{originalEvent:at}=O[qe];this._eventsInProgress[qe]||(de[`${qe}start`]=at),this._eventsInProgress[qe]=O[qe]}!Y&&te&&this._fireEvent("movestart",te.originalEvent);for(const qe in de)this._fireEvent(qe,de[qe]);te&&this._fireEvent("move",te.originalEvent);for(const qe in O){const{originalEvent:at}=O[qe];this._fireEvent(qe,at)}const fe={};let Ae;for(const qe in this._eventsInProgress){const{handlerName:at,originalEvent:lt}=this._eventsInProgress[qe];this._handlersById[at].isActive()||(delete this._eventsInProgress[qe],Ae=P[at]||lt,fe[`${qe}end`]=Ae)}for(const qe in fe)this._fireEvent(qe,fe[qe]);const Be=os(this._eventsInProgress),Ge=(Y||te)&&!Be;if(Ge&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(j&&Ge){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=lt=>lt!==0&&-this._bearingSnap<lt&<<this._bearingSnap;!qe||!qe.essential&&l.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:Ae})),at(this._map.getBearing())&&this._map.resetNorth()):(at(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:Ae})),this._updatingCamera=!1}}_fireEvent(O,P){this._map.fire(new n.k(O,P?{originalEvent:P}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new Sl("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xi extends n.E{constructor(O,P){super(),this._renderFrameCallback=()=>{const j=Math.min((l.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(j)),j<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=P.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,P){return this.jumpTo({center:O},P)}panBy(O,P,j){return O=n.P.convert(O).mult(-1),this.panTo(this.transform.center,n.e({offset:O},P),j)}panTo(O,P,j){return this.easeTo(n.e({center:O},P),j)}getZoom(){return this.transform.zoom}setZoom(O,P){return this.jumpTo({zoom:O},P),this}zoomTo(O,P,j){return this.easeTo(n.e({zoom:O},P),j)}zoomIn(O,P){return this.zoomTo(this.getZoom()+1,O,P),this}zoomOut(O,P){return this.zoomTo(this.getZoom()-1,O,P),this}getBearing(){return this.transform.bearing}setBearing(O,P){return this.jumpTo({bearing:O},P),this}getPadding(){return this.transform.padding}setPadding(O,P){return this.jumpTo({padding:O},P),this}rotateTo(O,P,j){return this.easeTo(n.e({bearing:O},P),j)}resetNorth(O,P){return this.rotateTo(0,n.e({duration:1e3},O),P),this}resetNorthPitch(O,P){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},O),P),this}snapToNorth(O,P){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,P):this}getPitch(){return this.transform.pitch}setPitch(O,P){return this.jumpTo({pitch:O},P),this}cameraForBounds(O,P){O=xe.convert(O);const j=P&&P.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),j,P)}_cameraForBoxAndBearing(O,P,j,Y){const te={top:0,bottom:0,right:0,left:0};if(typeof(Y=n.e({padding:te,offset:[0,0],maxZoom:this.transform.maxZoom},Y)).padding=="number"){const Tn=Y.padding;Y.padding={top:Tn,bottom:Tn,right:Tn,left:Tn}}Y.padding=n.e(te,Y.padding);const de=this.transform,fe=de.padding,Ae=new xe(O,P),Be=de.project(Ae.getNorthWest()),Ge=de.project(Ae.getNorthEast()),qe=de.project(Ae.getSouthEast()),at=de.project(Ae.getSouthWest()),lt=n.ba(-j),ft=Be.rotate(lt),kt=Ge.rotate(lt),Nt=qe.rotate(lt),Mt=at.rotate(lt),Gt=new n.P(Math.max(ft.x,kt.x,Mt.x,Nt.x),Math.max(ft.y,kt.y,Mt.y,Nt.y)),zt=new n.P(Math.min(ft.x,kt.x,Mt.x,Nt.x),Math.min(ft.y,kt.y,Mt.y,Nt.y)),Xt=Gt.sub(zt),Zt=(de.width-(fe.left+fe.right+Y.padding.left+Y.padding.right))/Xt.x,Yt=(de.height-(fe.top+fe.bottom+Y.padding.top+Y.padding.bottom))/Xt.y;if(Yt<0||Zt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ya=Math.min(de.scaleZoom(de.scale*Math.min(Zt,Yt)),Y.maxZoom),Ca=n.P.convert(Y.offset),La=(Y.padding.left-Y.padding.right)/2,ja=(Y.padding.top-Y.padding.bottom)/2,Wa=new n.P(La,ja).rotate(n.ba(j)),on=Ca.add(Wa).mult(de.scale/de.zoomScale(ya));return{center:de.unproject(Be.add(qe).div(2).sub(on)),zoom:ya,bearing:j}}fitBounds(O,P,j){return this._fitInternal(this.cameraForBounds(O,P),P,j)}fitScreenCoordinates(O,P,j,Y,te){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(O)),this.transform.pointLocation(n.P.convert(P)),j,Y),Y,te)}_fitInternal(O,P,j){return O?(delete(P=n.e(O,P)).padding,P.linear?this.easeTo(P,j):this.flyTo(P,j)):this}jumpTo(O,P){this.stop();const j=this._getTransformForUpdate();let Y=!1,te=!1,de=!1;return"zoom"in O&&j.zoom!==+O.zoom&&(Y=!0,j.zoom=+O.zoom),O.center!==void 0&&(j.center=n.N.convert(O.center)),"bearing"in O&&j.bearing!==+O.bearing&&(te=!0,j.bearing=+O.bearing),"pitch"in O&&j.pitch!==+O.pitch&&(de=!0,j.pitch=+O.pitch),O.padding==null||j.isPaddingEqual(O.padding)||(j.padding=O.padding),this._applyUpdatedTransform(j),this.fire(new n.k("movestart",P)).fire(new n.k("move",P)),Y&&this.fire(new n.k("zoomstart",P)).fire(new n.k("zoom",P)).fire(new n.k("zoomend",P)),te&&this.fire(new n.k("rotatestart",P)).fire(new n.k("rotate",P)).fire(new n.k("rotateend",P)),de&&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(O,P,j,Y=0){const te=n.Z.fromLngLat(O,P),de=n.Z.fromLngLat(j,Y),fe=de.x-te.x,Ae=de.y-te.y,Be=de.z-te.z,Ge=Math.hypot(fe,Ae,Be);if(Ge===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(fe,Ae),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ge/this.transform.tileSize),lt=180*Math.atan2(fe,-Ae)/Math.PI;let ft=180*Math.acos(qe/Ge)/Math.PI;return ft=Be<0?90-ft:90+ft,{center:de.toLngLat(),zoom:at,pitch:ft,bearing:lt}}easeTo(O,P){var j;this._stop(!1,O.easeId),((O=n.e({offset:[0,0],duration:500,easing:n.b9},O)).animate===!1||!O.essential&&l.prefersReducedMotion)&&(O.duration=0);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,fe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:fe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.project(ft),Gt=Y.project(kt).sub(Mt),zt=Y.zoomScale(Nt-te);let Xt,Zt;O.around&&(Xt=n.N.convert(O.around),Zt=Y.locationPoint(Xt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nt!==te,this._rotating=this._rotating||de!==Be,this._pitching=this._pitching||Ge!==fe,this._padding=!Y.isPaddingEqual(qe),this._easeId=O.easeId,this._prepareEase(P,O.noMoveStart,Yt),this.terrain&&this._prepareElevation(kt),this._ease(ya=>{if(this._zooming&&(Y.zoom=n.z.number(te,Nt,ya)),this._rotating&&(Y.bearing=n.z.number(de,Be,ya)),this._pitching&&(Y.pitch=n.z.number(fe,Ge,ya)),this._padding&&(Y.interpolatePadding(Ae,qe,ya),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(ya),Xt)Y.setLocationAtPoint(Xt,Zt);else{const Ca=Y.zoomScale(Y.zoom-te),La=Nt>te?Math.min(2,zt):Math.max(.5,zt),ja=Math.pow(La,1-ya),Wa=Y.unproject(Mt.add(Gt.mult(ya*ja)).mult(Ca));Y.setLocationAtPoint(Y.renderWorldCopies?Wa.wrap():Wa,lt)}this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},ya=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P,ya)},O),this}_prepareEase(O,P,j={}){this._moving=!0,P||j.moving||this.fire(new n.k("movestart",O)),this._zooming&&!j.zooming&&this.fire(new n.k("zoomstart",O)),this._rotating&&!j.rotating&&this.fire(new n.k("rotatestart",O)),this._pitching&&!j.pitching&&this.fire(new n.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&P!==this._elevationTarget){const j=this._elevationTarget-this._elevationStart,Y=(P-(j*O+this._elevationStart))/(1-O);this._elevationStart+=O*(j-Y),this._elevationTarget=P}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,O)}_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(O){const P=O.getCameraPosition(),j=this.terrain.getElevationForLngLatZoom(P.lngLat,O.zoom);if(P.altitude<j){const Y=this.calculateCameraOptionsFromTo(P.lngLat,j,O.center,O.elevation);return{pitch:Y.pitch,zoom:Y.zoom}}return{}}_applyUpdatedTransform(O){const P=[];if(this.terrain&&P.push(Y=>this._elevateCameraIfInsideTerrain(Y)),this.transformCameraUpdate&&P.push(Y=>this.transformCameraUpdate(Y)),!P.length)return;const j=O.clone();for(const Y of P){const te=j.clone(),{center:de,zoom:fe,pitch:Ae,bearing:Be,elevation:Ge}=Y(te);de&&(te.center=de),fe!==void 0&&(te.zoom=fe),Ae!==void 0&&(te.pitch=Ae),Be!==void 0&&(te.bearing=Be),Ge!==void 0&&(te.elevation=Ge),j.apply(te)}this.transform.apply(j)}_fireMoveEvents(O){this.fire(new n.k("move",O)),this._zooming&&this.fire(new n.k("zoom",O)),this._rotating&&this.fire(new n.k("rotate",O)),this._pitching&&this.fire(new n.k("pitch",O))}_afterEase(O,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;const j=this._zooming,Y=this._rotating,te=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,j&&this.fire(new n.k("zoomend",O)),Y&&this.fire(new n.k("rotateend",O)),te&&this.fire(new n.k("pitchend",O)),this.fire(new n.k("moveend",O))}flyTo(O,P){var j;if(!O.essential&&l.prefersReducedMotion){const kn=n.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,P)}this.stop(),O=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},O);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,fe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:fe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.zoomScale(Nt-te),Gt=Y.project(ft),zt=Y.project(kt).sub(Gt);let Xt=O.curve;const Zt=Math.max(Y.width,Y.height),Yt=Zt/Mt,ya=zt.mag();if("minZoom"in O){const kn=n.ad(Math.min(O.minZoom,te,Nt),Y.minZoom,Y.maxZoom),Ln=Zt/Y.zoomScale(kn-te);Xt=Math.sqrt(Ln/ya*2)}const Ca=Xt*Xt;function La(kn){const Ln=(Yt*Yt-Zt*Zt+(kn?-1:1)*Ca*Ca*ya*ya)/(2*(kn?Yt:Zt)*Ca*ya);return Math.log(Math.sqrt(Ln*Ln+1)-Ln)}function ja(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function Wa(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const on=La(!1);let Tn=function(kn){return Wa(on)/Wa(on+Xt*kn)},Qa=function(kn){return Zt*((Wa(on)*(ja(Ln=on+Xt*kn)/Wa(Ln))-ja(on))/Ca)/ya;var Ln},Sn=(La(!0)-on)/Xt;if(Math.abs(ya)<1e-6||!isFinite(Sn)){if(Math.abs(Zt-Yt)<1e-6)return this.easeTo(O,P);const kn=Yt<Zt?-1:1;Sn=Math.abs(Math.log(Yt/Zt))/Xt,Qa=()=>0,Tn=Ln=>Math.exp(kn*Xt*Ln)}if("duration"in O)O.duration=+O.duration;else{const kn="screenSpeed"in O?+O.screenSpeed/Xt:+O.speed;O.duration=1e3*Sn/kn}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=de!==Be,this._pitching=Ge!==fe,this._padding=!Y.isPaddingEqual(qe),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(kt),this._ease(kn=>{const Ln=kn*Sn,fn=1/Tn(Ln);Y.zoom=kn===1?Nt:te+Y.scaleZoom(fn),this._rotating&&(Y.bearing=n.z.number(de,Be,kn)),this._pitching&&(Y.pitch=n.z.number(fe,Ge,kn)),this._padding&&(Y.interpolatePadding(Ae,qe,kn),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(kn);const Mn=kn===1?kt:Y.unproject(Gt.add(zt.mult(Qa(Ln))).mult(fn));Y.setLocationAtPoint(Y.renderWorldCopies?Mn.wrap():Mn,lt),this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,P){var j;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Y=this._onEaseEnd;delete this._onEaseEnd,Y.call(this,P)}return O||(j=this.handlers)===null||j===void 0||j.stop(!1),this}_ease(O,P,j){j.animate===!1||j.duration===0?(O(1),P()):(this._easeStart=l.now(),this._easeOptions=j,this._onEaseFrame=O,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,P){O=n.b3(O,-180,180);const j=Math.abs(O-P);return Math.abs(O-360-P)<j&&(O-=360),Math.abs(O+360-P)<j&&(O+=360),O}_normalizeCenter(O,P){if(!P.renderWorldCopies||P.lngRange)return;const j=O.lng-P.center.lng;O.lng+=j>180?-360:j<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const yo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ss{constructor(O=yo){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=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.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(){o.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(O,P){const j=this._map._getUIString(`AttributionControl.${P}`);O.title=j,O.setAttribute("aria-label",j)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Y=>typeof Y!="string"?"":Y)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Y=this._map.style.stylesheet;this.styleOwner=Y.owner,this.styleId=Y.id}const P=this._map.style.sourceCaches;for(const Y in P){const te=P[Y];if(te.used||te.usedForTerrain){const de=te.getSource();de.attribution&&O.indexOf(de.attribution)<0&&O.push(de.attribution)}}O=O.filter(Y=>String(Y).trim()),O.sort((Y,te)=>Y.length-te.length),O=O.filter((Y,te)=>{for(let de=te+1;de<O.length;de++)if(O[de].indexOf(Y)>=0)return!1;return!0});const j=O.join(" | ");j!==this._attribHTML&&(this._attribHTML=j,O.length?(this._innerContainer.innerHTML=j,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ro{constructor(O={}){this._updateCompact=()=>{const P=this._container.children;if(P.length){const j=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&j.classList.add("maplibregl-compact"):j.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const P=o.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(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class gc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const P=++this._id;return this._queue.push({callback:O,id:P,cancelled:!1}),P}remove(O){const P=this._currentlyRunning,j=P?this._queue.concat(P):this._queue;for(const Y of j)if(Y.id===O)return void(Y.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const P=this._currentlyRunning=this._queue;this._queue=[];for(const j of P)if(!j.cancelled&&(j.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Or=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class vo extends n.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,P){this.sourceCache.update(O,P),this._renderableTilesKeys=[];const j={};for(const Y of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P}))j[Y.key]=!0,this._renderableTilesKeys.push(Y.key),this._tiles[Y.key]||(Y.posMatrix=new Float64Array(16),n.aQ(Y.posMatrix,0,n.X,0,n.X,0,1),this._tiles[Y.key]=new ke(Y,this.tileSize));for(const Y in this._tiles)j[Y]||delete this._tiles[Y]}freeRtt(O){for(const P in this._tiles){const j=this._tiles[P];(!O||j.tileID.equals(O)||j.tileID.isChildOf(O)||O.isChildOf(j.tileID))&&(j.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const P={};for(const j of this._renderableTilesKeys){const Y=this._tiles[j].tileID;if(Y.canonical.equals(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16),n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),P[j]=te}else if(Y.canonical.isChildOf(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=Y.canonical.z-O.canonical.z,fe=Y.canonical.x-(Y.canonical.x>>de<<de),Ae=Y.canonical.y-(Y.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,Be,0,Be,0,1),n.J(te.posMatrix,te.posMatrix,[-fe*Be,-Ae*Be,0]),P[j]=te}else if(O.canonical.isChildOf(Y.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=O.canonical.z-Y.canonical.z,fe=O.canonical.x-(O.canonical.x>>de<<de),Ae=O.canonical.y-(O.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),n.J(te.posMatrix,te.posMatrix,[fe*Be,Ae*Be,0]),n.K(te.posMatrix,te.posMatrix,[1/2**de,1/2**de,0]),P[j]=te}}return P}getSourceTile(O,P){const j=this.sourceCache._source;let Y=O.overscaledZ-this.deltaZoom;if(Y>j.maxzoom&&(Y=j.maxzoom),Y<j.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Y).key);let te=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!te||!te.dem)&&P)for(;Y>=j.minzoom&&(!te||!te.dem);)te=this.sourceCache.getTileByID(O.scaledTo(Y--).key);return te}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(P=>P.timeAdded>=O)}}class Jr{constructor(O,P,j){this.painter=O,this.sourceCache=new vo(P),this.options=j,this.exaggeration=typeof j.exaggeration=="number"?j.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,P,j,Y=n.X){var te;if(!(P>=0&&P<Y&&j>=0&&j<Y))return 0;const de=this.getTerrainData(O),fe=(te=de.tile)===null||te===void 0?void 0:te.dem;if(!fe)return 0;const Ae=function(ft,kt,Nt){var Mt=kt[0],Gt=kt[1];return ft[0]=Nt[0]*Mt+Nt[4]*Gt+Nt[12],ft[1]=Nt[1]*Mt+Nt[5]*Gt+Nt[13],ft}([],[P/Y*n.X,j/Y*n.X],de.u_terrain_matrix),Be=[Ae[0]*fe.dim,Ae[1]*fe.dim],Ge=Math.floor(Be[0]),qe=Math.floor(Be[1]),at=Be[0]-Ge,lt=Be[1]-qe;return fe.get(Ge,qe)*(1-at)*(1-lt)+fe.get(Ge+1,qe)*at*(1-lt)+fe.get(Ge,qe+1)*(1-at)*lt+fe.get(Ge+1,qe+1)*at*lt}getElevationForLngLatZoom(O,P){const{tileID:j,mercatorX:Y,mercatorY:te}=this._getOverscaledTileIDFromLngLatZoom(O,P);return this.getElevation(j,Y%n.X,te%n.X,n.X)}getElevation(O,P,j,Y=n.X){return this.getDEMElevation(O,P,j,Y)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Y=this.painter.context,te=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(Y,te,Y.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(Y,new n.R({width:1,height:1}),Y.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const P=this.sourceCache.getSourceTile(O,!0);if(P&&P.dem&&(!P.demTexture||P.needsTerrainPrepare)){const Y=this.painter.context;P.demTexture=this.painter.getTileTexture(P.dem.stride),P.demTexture?P.demTexture.update(P.dem.getPixels(),{premultiply:!1}):P.demTexture=new I(Y,P.dem.getPixels(),Y.gl.RGBA,{premultiply:!1}),P.demTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),P.needsTerrainPrepare=!1}const j=P&&P+P.tileID.key+O.key;if(j&&!this._demMatrixCache[j]){const Y=this.sourceCache.sourceCache._source.maxzoom;let te=O.canonical.z-P.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Y?te=O.canonical.z-Y:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const de=O.canonical.x-(O.canonical.x>>te<<te),fe=O.canonical.y-(O.canonical.y>>te<<te),Ae=n.bb(new Float64Array(16),[1/(n.X<<te),1/(n.X<<te),0]);n.J(Ae,Ae,[de*n.X,fe*n.X,0]),this._demMatrixCache[O.key]={matrix:Ae,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:P&&P.dem&&P.dem.dim||1,u_terrain_matrix:j?this._demMatrixCache[O.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(O){const P=this.painter,j=P.width/devicePixelRatio,Y=P.height/devicePixelRatio;return!this._fbo||this._fbo.width===j&&this._fbo.height===Y||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(P.context,{width:j,height:Y,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 I(P.context,{width:j,height:Y,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(j,Y,!0,!1),this._fbo.depthAttachment.set(P.context.createRenderbuffer(P.context.gl.DEPTH_COMPONENT16,j,Y))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const P=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let te=0,de=0;te<this._coordsTextureSize;te++)for(let fe=0;fe<this._coordsTextureSize;fe++,de+=4)P[de+0]=255&fe,P[de+1]=255&te,P[de+2]=fe>>8<<4|te>>8,P[de+3]=0;const j=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),Y=new I(O,j,O.gl.RGBA,{premultiply:!1});return Y.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Y,Y}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const P=new Uint8Array(4),j=this.painter.context,Y=j.gl,te=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),de=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);j.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Y.readPixels(te,fe-de-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null);const Ae=P[0]+(P[2]>>4<<8),Be=P[1]+((15&P[2])<<8),Ge=this.coordsIndex[255-P[3]],qe=Ge&&this.sourceCache.getTileByID(Ge);if(!qe)return null;const at=this._coordsTextureSize,lt=(1<<qe.tileID.canonical.z)*at;return new n.Z((qe.tileID.canonical.x*at+Ae)/lt+qe.tileID.wrap,(qe.tileID.canonical.y*at+Be)/lt,this.getElevation(qe.tileID,Ae,Be,at))}depthAtPoint(O){const P=new Uint8Array(4),j=this.painter.context,Y=j.gl;return j.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Y.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null),(P[0]/16777216+P[1]/65536+P[2]/256+P[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,P=new n.bc,j=new n.aY,Y=this.meshSize,te=n.X/Y,de=Y*Y;for(let qe=0;qe<=Y;qe++)for(let at=0;at<=Y;at++)P.emplaceBack(at*te,qe*te,0);for(let qe=0;qe<de;qe+=Y+1)for(let at=0;at<Y;at++)j.emplaceBack(at+qe,Y+at+qe+1,Y+at+qe+2),j.emplaceBack(at+qe,Y+at+qe+2,at+qe+1);const fe=P.length,Ae=fe+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(at*te,qe*n.X,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Ae+qe,Ae+qe+1,Ae+qe+3),j.emplaceBack(Ae+qe,Ae+qe+3,Ae+qe+2),j.emplaceBack(fe+qe,fe+qe+3,fe+qe+1),j.emplaceBack(fe+qe,fe+qe+2,fe+qe+3);const Be=P.length,Ge=Be+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(qe*n.X,at*te,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Be+qe,Be+qe+1,Be+qe+3),j.emplaceBack(Be+qe,Be+qe+3,Be+qe+2),j.emplaceBack(Ge+qe,Ge+qe+3,Ge+qe+1),j.emplaceBack(Ge+qe,Ge+qe+2,Ge+qe+3);return this._mesh=new Kl(O.createVertexBuffer(P,Or.members),O.createIndexBuffer(j),n.a0.simpleSegment(0,0,P.length,j.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*n.bd/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,P){var j;const{tileID:Y}=this._getOverscaledTileIDFromLngLatZoom(O,P);return(j=this.getMinMaxElevation(Y).minElevation)!==null&&j!==void 0?j:0}getMinMaxElevation(O){const P=this.getTerrainData(O).tile,j={minElevation:null,maxElevation:null};return P&&P.dem&&(j.minElevation=P.dem.min*this.exaggeration,j.maxElevation=P.dem.max*this.exaggeration),j}_getOverscaledTileIDFromLngLatZoom(O,P){const j=n.Z.fromLngLat(O.wrap()),Y=(1<<P)*n.X,te=j.x*Y,de=j.y*Y,fe=Math.floor(te/n.X),Ae=Math.floor(de/n.X);return{tileID:new n.S(P,0,P,fe,Ae),mercatorX:te,mercatorY:de}}}class qs{constructor(O,P,j){this._context=O,this._size=P,this._tileSize=j,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const P=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),j=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return j.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(j.texture),{id:O,fbo:P,texture:j,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(P=>O.id!==P),this._recentlyUsed.push(O.id)}stampObject(O){O.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 O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Fs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(O,P){this.painter=O,this.terrain=P,this.pool=new qs(O.context,30,P.sourceCache.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,P){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(j=>!O._layers[j].isHidden(P)),this._coordsDescendingInv={};for(const j in O.sourceCaches){this._coordsDescendingInv[j]={};const Y=O.sourceCaches[j].getVisibleCoordinates();for(const te of Y){const de=this.terrain.sourceCache.getTerrainCoords(te);for(const fe in de)this._coordsDescendingInv[j][fe]||(this._coordsDescendingInv[j][fe]=[]),this._coordsDescendingInv[j][fe].push(de[fe])}}this._coordsDescendingInvStr={};for(const j of O._order){const Y=O._layers[j],te=Y.source;if(Fs[Y.type]&&!this._coordsDescendingInvStr[te]){this._coordsDescendingInvStr[te]={};for(const de in this._coordsDescendingInv[te])this._coordsDescendingInvStr[te][de]=this._coordsDescendingInv[te][de].map(fe=>fe.key).sort().join()}}for(const j of this._renderableTiles)for(const Y in this._coordsDescendingInvStr){const te=this._coordsDescendingInvStr[Y][j.tileID.key];te&&te!==j.rttCoords[Y]&&(j.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const P=O.type,j=this.painter,Y=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Fs[P]&&(this._prevType&&Fs[this._prevType]||this._stacks.push([]),this._prevType=P,this._stacks[this._stacks.length-1].push(O.id),!Y))return!0;if(Fs[this._prevType]||Fs[P]&&Y){this._prevType=P;const te=this._stacks.length-1,de=this._stacks[te]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[te]){const Be=this.pool.getObjectForId(fe.rtt[te].id);if(Be.stamp===fe.rtt[te].stamp){this.pool.useObject(Be);continue}}const Ae=this.pool.getOrCreateFreeObject();this.pool.useObject(Ae),this.pool.stampObject(Ae),fe.rtt[te]={id:Ae.id,stamp:Ae.stamp},j.context.bindFramebuffer.set(Ae.fbo.framebuffer),j.context.clear({color:n.aN.transparent,stencil:0}),j.currentStencilSource=void 0;for(let Be=0;Be<de.length;Be++){const Ge=j.style._layers[de[Be]],qe=Ge.source?this._coordsDescendingInv[Ge.source][fe.tileID.key]:[fe.tileID];j.context.viewport.set([0,0,Ae.fbo.width,Ae.fbo.height]),j._renderTileClippingMasks(Ge,qe),j.renderLayer(j,j.style.sourceCaches[Ge.source],Ge,qe),Ge.source&&(fe.rttCoords[Ge.source]=this._coordsDescendingInvStr[Ge.source][fe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Fs[P]}return!1}}const bc={"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"},yc=y,Ts={hash:!1,interactive:!0,bearingSnap:7,attributionControl:yo,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},wi=H=>{H.touchstart=H.dragStart,H.touchmoveWindow=H.dragMove,H.touchend=H.dragEnd},Ys={showCompass:!0,showZoom:!0,visualizePitch:!1};class Yn{constructor(O,P,j=!1){this.mousedown=de=>{this.startMouse(n.e({},de,{ctrlKey:!0,preventDefault:()=>de.preventDefault()}),o.mousePos(this.element,de)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=de=>{this.moveMouse(de,o.mousePos(this.element,de))},this.mouseup=de=>{this.mouseRotate.dragEnd(de),this.mousePitch&&this.mousePitch.dragEnd(de),this.offTemp()},this.touchstart=de=>{de.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.startTouch(de,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=de=>{de.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.moveTouch(de,this._lastPos))},this.touchend=de=>{de.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 Y=O.dragRotate._mouseRotate.getClickTolerance(),te=O.dragRotate._mousePitch.getClickTolerance();this.element=P,this.mouseRotate=Ul({clickTolerance:Y,enable:!0}),this.touchRotate=(({enable:de,clickTolerance:fe,bearingDegreesPerPixelMoved:Ae=.8})=>{const Be=new wl;return new Eo({clickTolerance:fe,move:(Ge,qe)=>({bearingDelta:(qe.x-Ge.x)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:Y,enable:!0}),this.map=O,j&&(this.mousePitch=Gs({clickTolerance:te,enable:!0}),this.touchPitch=(({enable:de,clickTolerance:fe,pitchDegreesPerPixelMoved:Ae=-.5})=>{const Be=new wl;return new Eo({clickTolerance:fe,move:(Ge,qe)=>({pitchDelta:(qe.y-Ge.y)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:te,enable:!0})),o.addEventListener(P,"mousedown",this.mousedown),o.addEventListener(P,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(P,"touchcancel",this.reset)}startMouse(O,P){this.mouseRotate.dragStart(O,P),this.mousePitch&&this.mousePitch.dragStart(O,P),o.disableDrag()}startTouch(O,P){this.touchRotate.dragStart(O,P),this.touchPitch&&this.touchPitch.dragStart(O,P),o.disableDrag()}moveMouse(O,P){const j=this.map,{bearingDelta:Y}=this.mouseRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.mousePitch){const{pitchDelta:te}=this.mousePitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}moveTouch(O,P){const j=this.map,{bearingDelta:Y}=this.touchRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.touchPitch){const{pitchDelta:te}=this.touchPitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let ir;function Ao(H,O,P){const j=new n.N(H.lng,H.lat);if(H=new n.N(H.lng,H.lat),O){const Y=new n.N(H.lng-360,H.lat),te=new n.N(H.lng+360,H.lat),de=P.locationPoint(H).distSqr(O);P.locationPoint(Y).distSqr(O)<de?H=Y:P.locationPoint(te).distSqr(O)<de&&(H=te)}for(;Math.abs(H.lng-P.center.lng)>180;){const Y=P.locationPoint(H);if(Y.x>=0&&Y.y>=0&&Y.x<=P.width&&Y.y<=P.height)break;H.lng>P.center.lng?H.lng-=360:H.lng+=360}return H.lng!==j.lng&&P.locationPoint(H).y>P.height/2-P.getHorizon()?H:j}const vs={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 Xs(H,O,P){const j=H.classList;for(const Y in vs)j.remove(`maplibregl-${P}-anchor-${Y}`);j.add(`maplibregl-${P}-anchor-${O}`)}class zi extends n.E{constructor(O){if(super(),this._onKeyPress=P=>{const j=P.code,Y=P.charCode||P.keyCode;j!=="Space"&&j!=="Enter"&&Y!==32&&Y!==13||this.togglePopup()},this._onMapClick=P=>{const j=P.originalEvent.target,Y=this._element;this._popup&&(j===Y||Y.contains(j))&&this.togglePopup()},this._update=P=>{var j;if(!this._map)return;const Y=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!Y)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.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 te="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?te=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(te=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${vs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${de} ${te}`),l.frameAsync(new AbortController).then(()=>{this._updateOpacity(P&&P.type==="moveend")}).catch(()=>{})},this._onMove=P=>{if(!this._isDragging){const j=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=j}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=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O==null?void 0:O.opacity,O==null?void 0:O.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=n.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const P=o.createNS("http://www.w3.org/2000/svg","svg"),j=41,Y=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${j}px`),P.setAttributeNS(null,"width",`${Y}px`),P.setAttributeNS(null,"viewBox",`0 0 ${Y} ${j}`);const te=o.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"stroke","none"),te.setAttributeNS(null,"stroke-width","1"),te.setAttributeNS(null,"fill","none"),te.setAttributeNS(null,"fill-rule","evenodd");const de=o.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"fill-rule","nonzero");const fe=o.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const Ae=[{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 Mt of Ae){const Gt=o.createNS("http://www.w3.org/2000/svg","ellipse");Gt.setAttributeNS(null,"opacity","0.04"),Gt.setAttributeNS(null,"cx","10.5"),Gt.setAttributeNS(null,"cy","5.80029008"),Gt.setAttributeNS(null,"rx",Mt.rx),Gt.setAttributeNS(null,"ry",Mt.ry),fe.appendChild(Gt)}const Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill",this._color);const Ge=o.createNS("http://www.w3.org/2000/svg","path");Ge.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"),Be.appendChild(Ge);const qe=o.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const at=o.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"),qe.appendChild(at);const lt=o.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),lt.setAttributeNS(null,"fill","#FFFFFF");const ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(8.0, 8.0)");const kt=o.createNS("http://www.w3.org/2000/svg","circle");kt.setAttributeNS(null,"fill","#000000"),kt.setAttributeNS(null,"opacity","0.25"),kt.setAttributeNS(null,"cx","5.5"),kt.setAttributeNS(null,"cy","5.5"),kt.setAttributeNS(null,"r","5.4999962");const Nt=o.createNS("http://www.w3.org/2000/svg","circle");Nt.setAttributeNS(null,"fill","#FFFFFF"),Nt.setAttributeNS(null,"cx","5.5"),Nt.setAttributeNS(null,"cy","5.5"),Nt.setAttributeNS(null,"r","5.4999962"),ft.appendChild(kt),ft.appendChild(Nt),de.appendChild(fe),de.appendChild(Be),de.appendChild(qe),de.appendChild(lt),de.appendChild(ft),P.appendChild(de),P.setAttributeNS(null,"height",j*this._scale+"px"),P.setAttributeNS(null,"width",Y*this._scale+"px"),this._element.appendChild(P),this._offset=n.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",P=>{P.preventDefault()}),this._element.addEventListener("mousedown",P=>{P.preventDefault()}),Xs(this._element,this._anchor,"marker"),O&&O.className)for(const P of O.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.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),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Y=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Y,-1*(24.6+Y)],"bottom-right":[-Y,-1*(24.6+Y)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var P,j;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(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Y=this._map,te=Y.terrain.depthAtPoint(this._pos),de=Y.terrain.getElevationForLngLatZoom(this._lngLat,Y.transform.tileZoom);if(Y.transform.lngLatToCameraDepth(this._lngLat,de)-te<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/Y.transform._pixelPerMeter,Ae=Math.sin(Y.getPitch()*Math.PI/180)*fe,Be=Y.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ge=Y.transform.lngLatToCameraDepth(this._lngLat,de+Ae)-Be>.006;!((j=this._popup)===null||j===void 0)&&j.isOpen()&&Ge&&this._popup.remove(),this._element.style.opacity=Ge?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=n.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(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(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,P){return O===void 0&&P===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),P!==void 0&&(this._opacityWhenCovered=P),this._map&&this._updateOpacity(!0),this}}const Zs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Yr=0,Ec=!1;class Dr extends n.E{constructor(O){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 j=new n.N(P.coords.longitude,P.coords.latitude),Y=P.coords.accuracy,te=this._map.getBearing(),de=n.e({bearing:te},this.options.fitBoundsOptions),fe=xe.fromLngLat(j,Y);this._map.fitBounds(fe,de,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const j=new n.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(j).addTo(this._map),this._userLocationDotMarker.setLngLat(j).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 j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Ec)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=o.create("button","maplibregl-ctrl-geolocate",this._container),o.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 j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}else{const j=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new zi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zi({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",j=>{const Y=j.originalEvent&&j.originalEvent.type==="resize";j.geolocateSource||this._watchState!=="ACTIVE_LOCK"||Y||(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({},Zs,O)}onAdd(O){return this._map=O,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(P=!1){if(ir!==void 0&&!P)return ir;if(window.navigator.permissions===void 0)return ir=!!window.navigator.geolocation,ir;try{ir=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ir=!!window.navigator.geolocation}return ir})}().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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yr=0,Ec=!1}_isOutOfMapMaxBounds(O){const P=this._map.getMaxBounds(),j=O.coords;return P&&(j.longitude<P.getWest()||j.longitude>P.getEast()||j.latitude<P.getSouth()||j.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 O=this._map.getBounds(),P=O.getSouthEast(),j=O.getNorthEast(),Y=P.distanceTo(j),te=this._map._container.clientHeight,de=Math.ceil(this._accuracy/(Y/te)*2);this._circleElement.style.width=`${de}px`,this._circleElement.style.height=`${de}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":Yr--,Ec=!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 O;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yr++,Yr>1?(O={maximumAge:6e5,timeout:0},Ec=!0):(O=this.options.positionOptions,Ec=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}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 pr={maxWidth:100,unit:"metric"};function xi(H,O,P){const j=P&&P.maxWidth||100,Y=H._container.clientHeight/2,te=H.unproject([0,Y]),de=H.unproject([j,Y]),fe=te.distanceTo(de);if(P&&P.unit==="imperial"){const Ae=3.2808*fe;Ae>5280?oo(O,j,Ae/5280,H._getUIString("ScaleControl.Miles")):oo(O,j,Ae,H._getUIString("ScaleControl.Feet"))}else P&&P.unit==="nautical"?oo(O,j,fe/1852,H._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?oo(O,j,fe/1e3,H._getUIString("ScaleControl.Kilometers")):oo(O,j,fe,H._getUIString("ScaleControl.Meters"))}function oo(H,O,P,j){const Y=function(de){const fe=Math.pow(10,`${Math.floor(de)}`.length-1);let Ae=de/fe;return Ae=Ae>=10?10:Ae>=5?5:Ae>=3?3:Ae>=2?2:Ae>=1?1:function(Be){const Ge=Math.pow(10,Math.ceil(-Math.log(Be)/Math.LN10));return Math.round(Be*Ge)/Ge}(Ae),fe*Ae}(P),te=Y/P;H.style.width=O*te+"px",H.innerHTML=`${Y} ${j}`}class Tl extends n.E{constructor(O={}){super(),this._onFullscreenChange=()=>{var P;let j=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=j==null?void 0:j.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)j=j.shadowRoot.fullscreenElement;j===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,O&&O.container&&(O.container instanceof HTMLElement?this._container=O.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(O){return this._map=O,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const O=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",O).setAttribute("aria-hidden","true"),O.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const O=this._getTitle();this._fullscreenButton.setAttribute("aria-label",O),this._fullscreenButton.title=O}_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 cl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ct=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class pt extends n.E{constructor(O){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.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 j;const Y=this._lngLat||this._trackPointer;if(!this._map||!Y||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Be of this.options.className.split(" "))this._container.classList.add(Be);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=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._trackPointer&&!P)return;const te=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 de=this.options.anchor;const fe=xt(this.options.offset);if(!de){const Be=this._container.offsetWidth,Ge=this._container.offsetHeight;let qe;qe=te.y+fe.bottom.y<Ge?["top"]:te.y>this._map.transform.height-Ge?["bottom"]:[],te.x<Be/2?qe.push("left"):te.x>this._map.transform.width-Be/2&&qe.push("right"),de=qe.length===0?"bottom":qe.join("-")}let Ae=te.add(fe[de]);this.options.subpixelPositioning||(Ae=Ae.round()),o.setTransform(this._container,`${vs[de]} translate(${Ae.x}px,${Ae.y}px)`),Xs(this._container,de,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(cl),O)}addTo(O){return this._map&&this.remove(),this._map=O,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(O){return this._lngLat=n.N.convert(O),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(O){return this.setDOMContent(document.createTextNode(O))}setHTML(O){const P=document.createDocumentFragment(),j=document.createElement("body");let Y;for(j.innerHTML=O;Y=j.firstChild,Y;)P.appendChild(Y);return this.setDOMContent(P)}getMaxWidth(){var O;return(O=this._container)===null||O===void 0?void 0:O.style.maxWidth}setMaxWidth(O){return this.options.maxWidth=O,this._update(),this}setDOMContent(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(O){return this._container&&this._container.classList.add(O),this}removeClassName(O){return this._container&&this._container.classList.remove(O),this}setOffset(O){return this.options.offset=O,this._update(),this}toggleClassName(O){if(this._container)return this._container.classList.toggle(O)}setSubpixelPositioning(O){this.options.subpixelPositioning=O}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const O=this._container.querySelector(ct);O&&O.focus()}}function xt(H){if(H){if(typeof H=="number"){const O=Math.round(Math.abs(H)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,H),"top-left":new n.P(O,O),"top-right":new n.P(-O,O),bottom:new n.P(0,-H),"bottom-left":new n.P(O,-O),"bottom-right":new n.P(-O,-O),left:new n.P(H,0),right:new n.P(-H,0)}}if(H instanceof n.P||Array.isArray(H)){const O=n.P.convert(H);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:n.P.convert(H.center||[0,0]),top:n.P.convert(H.top||[0,0]),"top-left":n.P.convert(H["top-left"]||[0,0]),"top-right":n.P.convert(H["top-right"]||[0,0]),bottom:n.P.convert(H.bottom||[0,0]),"bottom-left":n.P.convert(H["bottom-left"]||[0,0]),"bottom-right":n.P.convert(H["bottom-right"]||[0,0]),left:n.P.convert(H.left||[0,0]),right:n.P.convert(H.right||[0,0])}}return xt(new n.P(0,0))}const K=y;f.AJAXError=n.bg,f.Evented=n.E,f.LngLat=n.N,f.MercatorCoordinate=n.Z,f.Point=n.P,f.addProtocol=n.bh,f.config=n.a,f.removeProtocol=n.bi,f.AttributionControl=ss,f.BoxZoomHandler=ko,f.CanvasSource=Me,f.CooperativeGesturesHandler=$o,f.DoubleClickZoomHandler=Pi,f.DragPanHandler=is,f.DragRotateHandler=ho,f.EdgeInsets=Ql,f.FullscreenControl=Tl,f.GeoJSONSource=Te,f.GeolocateControl=Dr,f.Hash=eo,f.ImageSource=ye,f.KeyboardHandler=cc,f.LngLatBounds=xe,f.LogoControl=ro,f.Map=class extends Xi{constructor(H){n.be.mark(n.bf.create);const O=Object.assign(Object.assign({},Ts),H);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new oi(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new gc,this._controls=[],this._mapId=n.a4(),this._contextLost=j=>{j.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:j}))},this._contextRestored=j=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:j}))},this._onMapScroll=j=>{if(j.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bc),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.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 j=!1;const Y=Us(te=>{this._trackResize&&!this._removed&&this.resize(te)._update()},50);this._resizeObserver=new ResizeObserver(te=>{j?Y(te):j=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Kr(this,O);const P=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new eo(P).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,n.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new ss(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new ro,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",j=>{this._update(j.dataType==="style"),this.fire(new n.k(`${j.dataType}data`,j))}),this.on("dataloading",j=>{this.fire(new n.k(`${j.dataType}dataloading`,j))}),this.on("dataabort",j=>{this.fire(new n.k("sourcedataabort",j))})}_getMapId(){return this._mapId}addControl(H,O){if(O===void 0&&(O=H.getDefaultPosition?H.getDefaultPosition():"top-right"),!H||!H.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=H.onAdd(this);this._controls.push(H);const j=this._controlPositions[O];return O.indexOf("bottom")!==-1?j.insertBefore(P,j.firstChild):j.appendChild(P),this}removeControl(H){if(!H||!H.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 O=this._controls.indexOf(H);return O>-1&&this._controls.splice(O,1),H.onRemove(this),this}hasControl(H){return this._controls.indexOf(H)>-1}calculateCameraOptionsFromTo(H,O,P,j){return j==null&&this.terrain&&(j=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(H,O,P,j)}resize(H){var O;const P=this._containerDimensions(),j=P[0],Y=P[1],te=this._getClampedPixelRatio(j,Y);if(this._resizeCanvas(j,Y,te),this.painter.resize(j,Y,te),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const Ae=this._getClampedPixelRatio(j,Y);this._resizeCanvas(j,Y,Ae),this.painter.resize(j,Y,Ae)}this.transform.resize(j,Y),(O=this._requestedCameraState)===null||O===void 0||O.resize(j,Y);const de=!this._moving;return de&&(this.stop(),this.fire(new n.k("movestart",H)).fire(new n.k("move",H))),this.fire(new n.k("resize",H)),de&&this.fire(new n.k("moveend",H)),this}_getClampedPixelRatio(H,O){const{0:P,1:j}=this._maxCanvasSize,Y=this.getPixelRatio(),te=H*Y,de=O*Y,fe=te>P?P/te:1,Ae=de>j?j/de:1;return Math.min(fe,Ae)*Y}getPixelRatio(){var H;return(H=this._overridePixelRatio)!==null&&H!==void 0?H:devicePixelRatio}setPixelRatio(H){this._overridePixelRatio=H,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(H){return this.transform.setMaxBounds(xe.convert(H)),this._update()}setMinZoom(H){if((H=H??-2)>=-2&&H<=this.transform.maxZoom)return this.transform.minZoom=H,this._update(),this.getZoom()<H&&this.setZoom(H),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(H){if((H=H??22)>=this.transform.minZoom)return this.transform.maxZoom=H,this._update(),this.getZoom()>H&&this.setZoom(H),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(H){if((H=H??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(H>=0&&H<=this.transform.maxPitch)return this.transform.minPitch=H,this._update(),this.getPitch()<H&&this.setPitch(H),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(H){if((H=H??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(H>=this.transform.minPitch)return this.transform.maxPitch=H,this._update(),this.getPitch()>H&&this.setPitch(H),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(H){return this.transform.renderWorldCopies=H,this._update()}project(H){return this.transform.locationPoint(n.N.convert(H),this.style&&this.terrain)}unproject(H){return this.transform.pointLocation(n.P.convert(H),this.terrain)}isMoving(){var H;return this._moving||((H=this.handlers)===null||H===void 0?void 0:H.isMoving())}isZooming(){var H;return this._zooming||((H=this.handlers)===null||H===void 0?void 0:H.isZooming())}isRotating(){var H;return this._rotating||((H=this.handlers)===null||H===void 0?void 0:H.isRotating())}_createDelegatedListener(H,O,P){if(H==="mouseenter"||H==="mouseover"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:te=>{const de=this.getLayer(O)?this.queryRenderedFeatures(te.point,{layers:[O]}):[];de.length?j||(j=!0,P.call(this,new gs(H,this,te.originalEvent,{features:de}))):j=!1},mouseout:()=>{j=!1}}}}if(H==="mouseleave"||H==="mouseout"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:de=>{(this.getLayer(O)?this.queryRenderedFeatures(de.point,{layers:[O]}):[]).length?j=!0:j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))},mouseout:de=>{j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))}}}}{const j=Y=>{const te=this.getLayer(O)?this.queryRenderedFeatures(Y.point,{layers:[O]}):[];te.length&&(Y.features=te,P.call(this,Y),delete Y.features)};return{layer:O,listener:P,delegates:{[H]:j}}}}on(H,O,P){if(P===void 0)return super.on(H,O);const j=this._createDelegatedListener(H,O,P);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[H]=this._delegatedListeners[H]||[],this._delegatedListeners[H].push(j);for(const Y in j.delegates)this.on(Y,j.delegates[Y]);return this}once(H,O,P){if(P===void 0)return super.once(H,O);const j=this._createDelegatedListener(H,O,P);for(const Y in j.delegates)this.once(Y,j.delegates[Y]);return this}off(H,O,P){return P===void 0?super.off(H,O):(this._delegatedListeners&&this._delegatedListeners[H]&&(j=>{const Y=j[H];for(let te=0;te<Y.length;te++){const de=Y[te];if(de.layer===O&&de.listener===P){for(const fe in de.delegates)this.off(fe,de.delegates[fe]);return Y.splice(te,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(H,O){if(!this.style)return[];let P;const j=H instanceof n.P||Array.isArray(H),Y=j?H:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(j?{}:H)||{},Y instanceof n.P||typeof Y[0]=="number")P=[n.P.convert(Y)];else{const te=n.P.convert(Y[0]),de=n.P.convert(Y[1]);P=[te,new n.P(de.x,te.y),de,new n.P(te.x,de.y),te]}return this.style.queryRenderedFeatures(P,O,this.transform)}querySourceFeatures(H,O){return this.style.querySourceFeatures(H,O)}setStyle(H,O){return(O=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&H?(this._diffStyle(H,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(H,O))}setTransformRequest(H){return this._requestManager.setTransformRequest(H),this}_getUIString(H){const O=this._locale[H];if(O==null)throw new Error(`Missing UI string '${H}'`);return O}_updateStyle(H,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(H,O));const P=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!H)),H?(this.style=new zn(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof H=="string"?this.style.loadURL(H,O,P):this.style.loadJSON(H,O,P),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(H,O){if(typeof H=="string"){const P=H,j=this._requestManager.transformRequest(P,"Style");n.h(j,new AbortController).then(Y=>{this._updateDiff(Y.data,O)}).catch(Y=>{Y&&this.fire(new n.j(Y))})}else typeof H=="object"&&this._updateDiff(H,O)}_updateDiff(H,O){try{this.style.setState(H,O)&&this._update(!0)}catch(P){n.w(`Unable to perform style diff: ${P.message||P.error||P}. Rebuilding the style from scratch.`),this._updateStyle(H,O)}}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(H,O){return this._lazyInitEmptyStyle(),this.style.addSource(H,O),this._update(!0)}isSourceLoaded(H){const O=this.style&&this.style.sourceCaches[H];if(O!==void 0)return O.loaded();this.fire(new n.j(new Error(`There is no source with ID '${H}'`)))}setTerrain(H){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),H){const O=this.style.sourceCaches[H.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${H.source}`);this.terrain===null&&O.reload();for(const P in this.style._layers){const j=this.style._layers[P];j.type==="hillshade"&&j.source===H.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 Jr(this.painter,O,H),this.painter.renderToTexture=new ys(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!==H.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:H})),this}getTerrain(){var H,O;return(O=(H=this.terrain)===null||H===void 0?void 0:H.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const H=this.style&&this.style.sourceCaches;for(const O in H){const P=H[O]._tiles;for(const j in P){const Y=P[j];if(Y.state!=="loaded"&&Y.state!=="errored")return!1}}return!0}removeSource(H){return this.style.removeSource(H),this._update(!0)}getSource(H){return this.style.getSource(H)}addImage(H,O,P={}){const{pixelRatio:j=1,sdf:Y=!1,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be}=P;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||n.b(O))){if(O.width===void 0||O.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:Ge,height:qe,data:at}=O,lt=O;return this.style.addImage(H,{data:new n.R({width:Ge,height:qe},new Uint8Array(at)),pixelRatio:j,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0,userImage:lt}),lt.onAdd&<.onAdd(this,H),this}}{const{width:Ge,height:qe,data:at}=l.getImageData(O);this.style.addImage(H,{data:new n.R({width:Ge,height:qe},at),pixelRatio:j,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0})}}updateImage(H,O){const P=this.style.getImage(H);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 j=O instanceof HTMLImageElement||n.b(O)?l.getImageData(O):O,{width:Y,height:te,data:de}=j;if(Y===void 0||te===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(Y!==P.data.width||te!==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 fe=!(O instanceof HTMLImageElement||n.b(O));return P.data.replace(de,fe),this.style.updateImage(H,P),this}getImage(H){return this.style.getImage(H)}hasImage(H){return H?!!this.style.getImage(H):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(H){this.style.removeImage(H)}loadImage(H){return w.getImage(this._requestManager.transformRequest(H,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(H,O){return this._lazyInitEmptyStyle(),this.style.addLayer(H,O),this._update(!0)}moveLayer(H,O){return this.style.moveLayer(H,O),this._update(!0)}removeLayer(H){return this.style.removeLayer(H),this._update(!0)}getLayer(H){return this.style.getLayer(H)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(H,O,P){return this.style.setLayerZoomRange(H,O,P),this._update(!0)}setFilter(H,O,P={}){return this.style.setFilter(H,O,P),this._update(!0)}getFilter(H){return this.style.getFilter(H)}setPaintProperty(H,O,P,j={}){return this.style.setPaintProperty(H,O,P,j),this._update(!0)}getPaintProperty(H,O){return this.style.getPaintProperty(H,O)}setLayoutProperty(H,O,P,j={}){return this.style.setLayoutProperty(H,O,P,j),this._update(!0)}getLayoutProperty(H,O){return this.style.getLayoutProperty(H,O)}setGlyphs(H,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(H,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(H,O,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(H,O,P,j=>{j||this._update(!0)}),this}removeSprite(H){return this._lazyInitEmptyStyle(),this.style.removeSprite(H),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(H,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(H,O,P=>{P||this._update(!0)}),this}setLight(H,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(H,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(H){return this._lazyInitEmptyStyle(),this.style.setSky(H),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(H,O){return this.style.setFeatureState(H,O),this._update()}removeFeatureState(H,O){return this.style.removeFeatureState(H,O),this._update()}getFeatureState(H){return this.style.getFeatureState(H)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let H=0,O=0;return this._container&&(H=this._container.clientWidth||400,O=this._container.clientHeight||300),[H,O]}_setupContainer(){const H=this._container;H.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",H);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),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(),j=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],j);const Y=this._controlContainer=o.create("div","maplibregl-control-container",H),te=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(de=>{te[de]=o.create("div",`maplibregl-ctrl-${de} `,Y)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(H,O,P){this._canvas.width=Math.floor(P*H),this._canvas.height=Math.floor(P*O),this._canvas.style.width=`${H}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const H={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",j=>{O={requestedAttributes:H},j&&(O.statusMessage=j.statusMessage,O.type=j.type)},{once:!0});const P=this._canvas.getContext("webgl2",H)||this._canvas.getContext("webgl",H);if(!P){const j="Failed to initialize WebGL";throw O?(O.message=j,new Error(JSON.stringify(O))):new Error(j)}this.painter=new sc(P,this.transform),s.testSupport(P)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(H){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||H,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(H){return this._update(),this._renderTaskQueue.add(H)}_cancelRenderFrame(H){this._renderTaskQueue.remove(H)}_render(H){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(H),this._removed)return;let P=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Y=this.transform.zoom,te=l.now();this.style.zoomHistory.update(Y,te);const de=new n.a9(Y,{now:te,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=de.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(P=!0,this._crossFadingFactor=fe),this.style.update(de)}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,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,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 j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||j||(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 H;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),w.removeThrottleControl(this._imageQueueHandle),(H=this._resizeObserver)===null||H===void 0||H.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O!=null&&O.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.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,l.frameAsync(this._frameRequest).then(H=>{n.be.frame(H),this._frameRequest=null,this._render(H)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(H){this._showTileBoundaries!==H&&(this._showTileBoundaries=H,this._update())}get showPadding(){return!!this._showPadding}set showPadding(H){this._showPadding!==H&&(this._showPadding=H,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(H){this._showCollisionBoxes!==H&&(this._showCollisionBoxes=H,H?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(H){this._showOverdrawInspector!==H&&(this._showOverdrawInspector=H,this._update())}get repaint(){return!!this._repaint}set repaint(H){this._repaint!==H&&(this._repaint=H,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(H){this._vertices=H,this._update()}get version(){return yc}getCameraTargetElevation(){return this.transform.elevation}},f.MapMouseEvent=gs,f.MapTouchEvent=wo,f.MapWheelEvent=sl,f.Marker=zi,f.NavigationControl=class{constructor(H){this._updateZoomButtons=()=>{const O=this._map.getZoom(),P=O===this._map.getMaxZoom(),j=O===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=j,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",j.toString())},this._rotateCompassArrow=()=>{const O=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=O},this._setButtonTitle=(O,P)=>{const j=this._map._getUIString(`NavigationControl.${P}`);O.title=j,O.setAttribute("aria-label",j)},this.options=n.e({},Ys,H),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(H){return this._map=H,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 Yn(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.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(H,O){const P=o.create("button",H,this._container);return P.type="button",P.addEventListener("click",O),P}},f.Popup=pt,f.RasterDEMTileSource=$e,f.RasterTileSource=Pe,f.ScaleControl=class{constructor(H){this._onMove=()=>{xi(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,xi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},pr),H)}getDefaultPosition(){return"bottom-left"}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",H.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Ws,f.Style=zn,f.TerrainControl=class{constructor(H){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=H}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.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(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=kl,f.TwoFingersTouchRotateHandler=qc,f.TwoFingersTouchZoomHandler=Qn,f.TwoFingersTouchZoomRotateHandler=Os,f.VectorTileSource=Ee,f.VideoSource=ge,f.addSourceType=(H,O)=>n._(void 0,void 0,void 0,function*(){if(ze(H))throw new Error(`A source type called "${H}" already exists.`);((P,j)=>{Se[P]=j})(H,O)}),f.clearPrewarmedResources=function(){const H=ce;H&&(H.isPreloaded()&&H.numActive()===1?(H.release(le),ce=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Ne().getRTLTextPluginStatus()},f.getVersion=function(){return K},f.getWorkerCount=function(){return oe.workerCount},f.getWorkerUrl=function(){return n.a.WORKER_URL},f.importScriptInWorkers=function(H){return ue().broadcast("IS",H)},f.prewarm=function(){ne().acquire(le)},f.setMaxParallelImageRequests=function(H){n.a.MAX_PARALLEL_IMAGE_REQUESTS=H},f.setRTLTextPlugin=function(H,O){return Ne().setRTLTextPlugin(H,O)},f.setWorkerCount=function(H){oe.workerCount=H},f.setWorkerUrl=function(H){n.a.WORKER_URL=H}}),m}()},88640:function(c,m,a){function v(me,_e,xe){me.prototype=_e.prototype=xe,xe.constructor=me}function f(me,_e){var xe=Object.create(me.prototype);for(var we in _e)xe[we]=_e[we];return xe}function n(){}a.d(m,{GW:function(){return pe},Dj:function(){return oe}});var y=.7,_=1/y,p="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\(".concat(p,",").concat(p,",").concat(p,"\\)$")),d=new RegExp("^rgb\\(".concat(o,",").concat(o,",").concat(o,"\\)$")),h=new RegExp("^rgba\\(".concat(p,",").concat(p,",").concat(p,",").concat(l,"\\)$")),g=new RegExp("^rgba\\(".concat(o,",").concat(o,",").concat(o,",").concat(l,"\\)$")),b=new RegExp("^hsl\\(".concat(l,",").concat(o,",").concat(o,"\\)$")),w=new RegExp("^hsla\\(".concat(l,",").concat(o,",").concat(o,",").concat(l,"\\)$")),x={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 S(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function T(me){var _e,xe;return me=(me+"").trim().toLowerCase(),(_e=s.exec(me))?(xe=_e[1].length,_e=parseInt(_e[1],16),xe===6?C(_e):xe===3?new M(_e>>8&15|_e>>4&240,_e>>4&15|240&_e,(15&_e)<<4|15&_e,1):xe===8?A(_e>>24&255,_e>>16&255,_e>>8&255,(255&_e)/255):xe===4?A(_e>>12&15|_e>>8&240,_e>>8&15|_e>>4&240,_e>>4&15|240&_e,((15&_e)<<4|15&_e)/255):null):(_e=u.exec(me))?new M(_e[1],_e[2],_e[3],1):(_e=d.exec(me))?new M(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,1):(_e=h.exec(me))?A(_e[1],_e[2],_e[3],_e[4]):(_e=g.exec(me))?A(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,_e[4]):(_e=b.exec(me))?V(_e[1],_e[2]/100,_e[3]/100,1):(_e=w.exec(me))?V(_e[1],_e[2]/100,_e[3]/100,_e[4]):x.hasOwnProperty(me)?C(x[me]):me==="transparent"?new M(NaN,NaN,NaN,0):null}function C(me){return new M(me>>16&255,me>>8&255,255&me,1)}function A(me,_e,xe,we){return we<=0&&(me=_e=xe=NaN),new M(me,_e,xe,we)}function E(me,_e,xe,we){return arguments.length===1?((Ee=me)instanceof n||(Ee=T(Ee)),Ee?new M((Ee=Ee.rgb()).r,Ee.g,Ee.b,Ee.opacity):new M):new M(me,_e,xe,we??1);var Ee}function M(me,_e,xe,we){this.r=+me,this.g=+_e,this.b=+xe,this.opacity=+we}function I(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b))}function N(){var me=z(this.opacity);return"".concat(me===1?"rgb(":"rgba(").concat(F(this.r),", ").concat(F(this.g),", ").concat(F(this.b)).concat(me===1?")":", ".concat(me,")"))}function z(me){return isNaN(me)?1:Math.max(0,Math.min(1,me))}function F(me){return Math.max(0,Math.min(255,Math.round(me)||0))}function R(me){return((me=F(me))<16?"0":"")+me.toString(16)}function V(me,_e,xe,we){return we<=0?me=_e=xe=NaN:xe<=0||xe>=1?me=_e=NaN:_e<=0&&(me=NaN),new U(me,_e,xe,we)}function $(me){if(me instanceof U)return new U(me.h,me.s,me.l,me.opacity);if(me instanceof n||(me=T(me)),!me)return new U;if(me instanceof U)return me;var _e=(me=me.rgb()).r/255,xe=me.g/255,we=me.b/255,Ee=Math.min(_e,xe,we),Pe=Math.max(_e,xe,we),$e=NaN,Te=Pe-Ee,Ce=(Pe+Ee)/2;return Te?($e=_e===Pe?(xe-we)/Te+6*(xe<we):xe===Pe?(we-_e)/Te+2:(_e-xe)/Te+4,Te/=Ce<.5?Pe+Ee:2-Pe-Ee,$e*=60):Te=Ce>0&&Ce<1?0:$e,new U($e,Te,Ce,me.opacity)}function U(me,_e,xe,we){this.h=+me,this.s=+_e,this.l=+xe,this.opacity=+we}function Z(me){return(me=(me||0)%360)<0?me+360:me}function q(me){return Math.max(0,Math.min(1,me||0))}function W(me,_e,xe){return 255*(me<60?_e+(xe-_e)*me/60:me<180?xe:me<240?_e+(xe-_e)*(240-me)/60:_e)}v(n,T,{copy:function(me){return Object.assign(new this.constructor,this,me)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $(this).formatHsl()},formatRgb:k,toString:k}),v(M,E,f(n,{brighter:function(me){return me=me==null?_:Math.pow(_,me),new M(this.r*me,this.g*me,this.b*me,this.opacity)},darker:function(me){return me=me==null?y:Math.pow(y,me),new M(this.r*me,this.g*me,this.b*me,this.opacity)},rgb:function(){return this},clamp:function(){return new M(F(this.r),F(this.g),F(this.b),z(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:I,formatHex:I,formatHex8:function(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b)).concat(R(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N,toString:N})),v(U,function(me,_e,xe,we){return arguments.length===1?$(me):new U(me,_e,xe,we??1)},f(n,{brighter:function(me){return me=me==null?_:Math.pow(_,me),new U(this.h,this.s,this.l*me,this.opacity)},darker:function(me){return me=me==null?y:Math.pow(y,me),new U(this.h,this.s,this.l*me,this.opacity)},rgb:function(){var me=this.h%360+360*(this.h<0),_e=isNaN(me)||isNaN(this.s)?0:this.s,xe=this.l,we=xe+(xe<.5?xe:1-xe)*_e,Ee=2*xe-we;return new M(W(me>=240?me-240:me+120,Ee,we),W(me,Ee,we),W(me<120?me+240:me-120,Ee,we),this.opacity)},clamp:function(){return new U(Z(this.h),q(this.s),q(this.l),z(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 me=z(this.opacity);return"".concat(me===1?"hsl(":"hsla(").concat(Z(this.h),", ").concat(100*q(this.s),"%, ").concat(100*q(this.l),"%").concat(me===1?")":", ".concat(me,")"))}}));var Q=function(me){return function(){return me}};function X(me,_e){var xe=_e-me;return xe?function(we,Ee){return function(Pe){return we+Pe*Ee}}(me,xe):Q(isNaN(me)?_e:me)}var J=function me(_e){var xe=function(Ee){return(Ee=+Ee)==1?X:function(Pe,$e){return $e-Pe?function(Te,Ce,ye){return Te=Math.pow(Te,ye),Ce=Math.pow(Ce,ye)-Te,ye=1/ye,function(ge){return Math.pow(Te+ge*Ce,ye)}}(Pe,$e,Ee):Q(isNaN(Pe)?$e:Pe)}}(_e);function we(Ee,Pe){var $e=xe((Ee=E(Ee)).r,(Pe=E(Pe)).r),Te=xe(Ee.g,Pe.g),Ce=xe(Ee.b,Pe.b),ye=X(Ee.opacity,Pe.opacity);return function(ge){return Ee.r=$e(ge),Ee.g=Te(ge),Ee.b=Ce(ge),Ee.opacity=ye(ge),Ee+""}}return we.gamma=me,we}(1);function ee(me,_e){var xe,we=_e?_e.length:0,Ee=me?Math.min(we,me.length):0,Pe=new Array(Ee),$e=new Array(we);for(xe=0;xe<Ee;++xe)Pe[xe]=pe(me[xe],_e[xe]);for(;xe<we;++xe)$e[xe]=_e[xe];return function(Te){for(xe=0;xe<Ee;++xe)$e[xe]=Pe[xe](Te);return $e}}function le(me,_e){var xe=new Date;return me=+me,_e=+_e,function(we){return xe.setTime(me*(1-we)+_e*we),xe}}function oe(me,_e){return me=+me,_e=+_e,function(xe){return me*(1-xe)+_e*xe}}function se(me){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},se(me)}function ce(me,_e){var xe,we={},Ee={};for(xe in me!==null&&se(me)==="object"||(me={}),_e!==null&&se(_e)==="object"||(_e={}),_e)xe in me?we[xe]=pe(me[xe],_e[xe]):Ee[xe]=_e[xe];return function(Pe){for(xe in we)Ee[xe]=we[xe](Pe);return Ee}}var ae=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ae.source,"g");function ie(me,_e){var xe,we,Ee,Pe=ae.lastIndex=ne.lastIndex=0,$e=-1,Te=[],Ce=[];for(me+="",_e+="";(xe=ae.exec(me))&&(we=ne.exec(_e));)(Ee=we.index)>Pe&&(Ee=_e.slice(Pe,Ee),Te[$e]?Te[$e]+=Ee:Te[++$e]=Ee),(xe=xe[0])===(we=we[0])?Te[$e]?Te[$e]+=we:Te[++$e]=we:(Te[++$e]=null,Ce.push({i:$e,x:oe(xe,we)})),Pe=ne.lastIndex;return Pe<_e.length&&(Ee=_e.slice(Pe),Te[$e]?Te[$e]+=Ee:Te[++$e]=Ee),Te.length<2?Ce[0]?function(ye){return function(ge){return ye(ge)+""}}(Ce[0].x):function(ye){return function(){return ye}}(_e):(_e=Ce.length,function(ye){for(var ge,Me=0;Me<_e;++Me)Te[(ge=Ce[Me]).i]=ge.x(ye);return Te.join("")})}function ue(me,_e){_e||(_e=[]);var xe,we=me?Math.min(_e.length,me.length):0,Ee=_e.slice();return function(Pe){for(xe=0;xe<we;++xe)Ee[xe]=me[xe]*(1-Pe)+_e[xe]*Pe;return Ee}}function he(me){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},he(me)}function pe(me,_e){var xe,we,Ee=he(_e);return _e==null||Ee==="boolean"?Q(_e):(Ee==="number"?oe:Ee==="string"?(xe=T(_e))?(_e=xe,J):ie:_e instanceof T?J:_e instanceof Date?le:(we=_e,!ArrayBuffer.isView(we)||we instanceof DataView?Array.isArray(_e)?ee:typeof _e.valueOf!="function"&&typeof _e.toString!="function"||isNaN(_e)?ce:oe:ue))(me,_e)}},23648:function(c){c.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(c){c.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(c){c.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(c){c.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(c){c.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(c){c.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(c){c.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 © <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(c){c.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 © <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"}}]}`)}},B={};function D(c){var m=B[c];if(m!==void 0)return m.exports;var a=B[c]={id:c,exports:{}};return i[c].call(a.exports,a,a.exports,D),a.exports}return D.m=i,D.n=function(c){var m=c&&c.__esModule?function(){return c.default}:function(){return c};return D.d(m,{a:m}),m},D.d=function(c,m){for(var a in m)D.o(m,a)&&!D.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:m[a]})},D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D.o=function(c,m){return Object.prototype.hasOwnProperty.call(c,m)},D.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},D.b=document.baseURI||self.location.href,D.nc=void 0,D(20260)}()})})(dq);var vNt=dq.exports;const uq=d8(vNt),nga="",rga="",_Nt={ref:"card",class:"card-volumetric-field"},hq=1,bNt=800,pq=300,xNt=-46,fq=100,mq=-14,wNt=$i({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const r=e,i=new Set([2,20,308,310]),B=[[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 D=null;const c=t.ref(null),m=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>r.passesPlays,h=>{const g=h.reduce((b,w)=>(i.has(w[r.playIndexes.categoryId])&&b.push({x1:w[r.playIndexes.coordinate1X],y1:w[r.playIndexes.coordinate1Y],x2:w[r.playIndexes.coordinate2X],y2:w[r.playIndexes.coordinate2Y],x3:w[r.playIndexes.coordinate3X],y3:w[r.playIndexes.coordinate3Y]}),b),[]);d(g)}),t.watch(()=>a.value,(h,g)=>{v.value&&(o(h),m.value.style.height=`${s(h)}px`,v.value.style.top=`${u(s(h))}px`)});function f(){D=new ResizeObserver(h=>{for(const g of h)a.value=g.contentRect.width}),D.observe(c.value)}function n(h){return Array.from({length:h},()=>0)}function y(h,g){let b=.01351,w=.02439,x=0,S=0,k=[];const T=g.length,C=Math.floor(T/10);for(;x<74;)S=g.filter(A=>1-A.y3>=x*b&&1-A.y3<=(x+1)*b&&1-A.x3>=h*w&&1-A.x3<=(h+1)*w).map(A=>A.y3).length,k.push(parseFloat((S/C).toFixed(4))),x++;return k.reverse()}function _(h){let g=[n(74),n(74)],b=[],w=39;for(;w>0&&w<=39;)b=y(w,h),g.push(b),w--;return g.push(n(74),n(74)),g}function p(h,g,b){const w=[];let k=0,T=0;w.push(h[0]);for(let C=1;C<b-1;C++){const A=[];A.push(h[C][0]);for(let E=1;E<g-1;E++)k=h[C][E-1],T=h[C][E+1],A.push(k+.5*(h[C][E]+T-k));A.push(h[C][g-1]),w.push(A)}w.push(h[b-1]);for(let C=1;C<g-1;C++)for(let A=1;A<b-1;A++)k=w[A-1][C],T=w[A+1][C],w[A][C]=k+.5*(w[A][C]+T-k);return w}function l(h){let g=0,b=0;for(let w=0;w<h.length;w++){b=b+h[w].reduce(function(S,k){return S+k});const x=Math.max.apply(null,h[w]);x>g&&(g=x)}return g}function o(h){uq.relayout(c.value,{width:h,height:s(h)})}function s(h){return Math.round(pq/bNt*h,0)}function u(h){return mq+(h-fq)/(pq-fq)*(xNt-mq)}function d(h){let g=_(h),b=g.length,w=g[0].length;g=p(p(g,w,b),w,b),w=g[0].length,b=g.length;const x=l(g),S=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:B,autoscale:!1,showscale:!1}],k=[0,w],T=[0,b],C=[0,x*5],A={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:C},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:s(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};m.value&&(m.value.style.height=`${s(a.value)}px`);const E=[];for(let M=0;M<w;M++){const I=[],N=[],z=[];for(let F=0;F<b;F++)I.push(M),N.push(F),z.push(S[0].z[F][M]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:hq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let M=0;M<b;M++){const I=[],N=[],z=[];for(let F=0;F<w;F++)I.push(F),N.push(M),z.push(S[0].z[M][F]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:hq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}uq.newPlot("surface-plot",S.concat(E),A,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${u(s(a.value))}px`)}return t.onMounted(()=>{c.value&&(c.value.style.pointerEvents="none"),f()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",_Nt,[t.createElementVNode("div",{ref_key:"volumetricField",ref:m,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:c,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-46439c02"]]),oga="",gq=e=>(t.pushScopeId("data-v-885deed1"),e=e(),t.popScopeId(),e),kNt=gq(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),CNt=gq(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),SNt=$i({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const r=e,i=t.computed(()=>({"--flex-direction-info":r.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":r.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":r.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,D)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(i.value)},[kNt,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),CNt],4))}},[["__scopeId","data-v-885deed1"]]),TNt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let YE=null;function ENt(){return YE||(YE=qg(TNt)),YE}const lga="",ANt=e=>(t.pushScopeId("data-v-045241b6"),e=e(),t.popScopeId(),e),MNt={class:"volumetric-section-container"},INt=ANt(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),PNt={key:0,class:"volumetric-section-container__switch"},BNt={class:"volumetric-section-container__attack-direction"},NNt={class:"volumetric-section-container__field"},zNt=$i({__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 r=e,i=ENt(),B=new Set([2,20,308,310]),D=new Set([3,21,309]),c=new Set([...B,...D]);let m=null;const a=t.ref(0),v=t.ref(new Map),f=t.ref({teamId:0}),n=t.computed(()=>[{teamId:r.game.homeTeam.team_id,text:r.game.homeTeam.colloquial_name,img:r.game.homeTeam.logo,isHomeTeam:!0},{teamId:r.game.awayTeam.team_id,text:r.game.awayTeam.colloquial_name,img:r.game.awayTeam.logo,isHomeTeam:!1}]),y=t.computed(()=>v.value.get(r.isGamePreMatch?r.teamSelectedPreMatch.teamId:f.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,f.value=n.value[a.value]},{immediate:!0}),t.watch(()=>r.game.gameId,h=>{h&&(d(),p(r.game.is_live&&r.game.game_status===4))},{immediate:!0});function _(){m=setInterval(()=>{p()},1e3*60*r.volumetricFieldIntervalMinutes)}async function p(h=!1){try{const g=await o();v.value.set(r.game.homeTeam.team_id,g.homeTeam),v.value.set(r.game.awayTeam.team_id,g.awayTeam),h&&_()}catch(g){throw new Error(g)}}function l(h){return r.game.game_status===4&&!r.game.is_live?h[i.gameId]!==r.game.gameId:h[i.gameId]===r.game.gameId}async function o(){try{let h={homeTeam:[],awayTeam:[]};if(r.game.is_live||r.game.game_status===0){const g=await $c.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${r.game.gameId}`),b=g.data?g.data.data||[]:[],w=new Set;b.forEach(x=>{w.add(x[i.categoryId]),x[i.teamId]===r.game.homeTeam.team_id&&c.has(x[i.categoryId])&&l(x)?(s(x),h.homeTeam.push(x)):x[i.teamId]===r.game.awayTeam.team_id&&c.has(x[i.categoryId])&&l(x)&&(x[i.coordinate1Y]=1-x[i.coordinate1Y],x[i.coordinate2Y]=1-x[i.coordinate2Y],x[i.coordinate3Y]=1-x[i.coordinate3Y],x[i.coordinate1X]=1-x[i.coordinate1X],x[i.coordinate2X]=1-x[i.coordinate2X],x[i.coordinate3X]=1-x[i.coordinate3X],s(x),h.awayTeam.push(x))})}else{const[g,b]=await Promise.all([$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${r.game.seasonId}-${r.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${r.game.seasonId}-${r.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);h={homeTeam:g.data.data.posession.filter(w=>w[i.teamId]===r.game.homeTeam.team_id&&c.has(w[i.categoryId])&&l(w)),awayTeam:b.data.data.posession.filter(w=>w[i.teamId]===r.game.awayTeam.team_id&&c.has(w[i.categoryId])&&l(w)?(w[i.coordinate1Y]=1-w[i.coordinate1Y],w[i.coordinate2Y]=1-w[i.coordinate2Y],w[i.coordinate3Y]=1-w[i.coordinate3Y],w[i.coordinate1X]=1-w[i.coordinate1X],w[i.coordinate2X]=1-w[i.coordinate2X],w[i.coordinate3X]=1-w[i.coordinate3X],!0):!1)}}return h}catch(h){throw new Error(h)}}function s(h){const g=h[i.coordinate1X],b=h[i.coordinate2X],w=h[i.coordinate3X];return h[i.coordinate1X]=h[i.coordinate1Y],h[i.coordinate2X]=h[i.coordinate2Y],h[i.coordinate3X]=h[i.coordinate3Y],h[i.coordinate1Y]=g,h[i.coordinate2Y]=b,h[i.coordinate3Y]=w,h}function u(h){a.value=h.index,f.value=h.button}function d(){m&&clearInterval(m)}return t.onUnmounted(()=>{d()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",MNt,[INt,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",PNt,[t.createVNode(g4,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:u},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",BNt,[t.createVNode(SNt,{team:e.isGamePreMatch?e.teamSelectedPreMatch:f.value},null,8,["team"])]),t.createElementVNode("div",NNt,[t.createVNode(wNt,{"passes-plays":y.value,"play-indexes":t.unref(i)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-045241b6"]]),dga="";let yq=null;const ONt={components:{GSCHighlights:W3t,ToggleButtons:g4,VolumetricSectionContainer:zNt,DataProminentGame:owt,HighlightsProminentGameLive:k5t,HighlightsProminentGame:o5t,GSCRadioToggle:RH,FieldPosesion:Rwt,EventsLine:p4t,ChalkboardSectionContainer:yNt},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)yq=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),yq.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 r={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",r)},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)}},om=e=>(t.pushScopeId("data-v-f677ec62"),e=e(),t.popScopeId(),e),FNt={class:"container-prominent",ref:"prominent"},LNt={class:"container-prominent-data"},DNt={class:"container-prominent-section"},RNt={key:0,class:"highlights-containers"},VNt={class:"highlights-content"},$Nt={key:1,class:"highlights-containers"},jNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),UNt={key:0,class:"container-leyend-prematch"},GNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),HNt={key:1,class:"container-leyend-prematch-movil"},WNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),qNt=om(()=>t.createElementVNode("br",null,null,-1)),YNt=om(()=>t.createElementVNode("br",null,null,-1)),XNt={key:2,class:"container-leyend-prematch-movil"},ZNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),JNt=om(()=>t.createElementVNode("br",null,null,-1)),KNt=om(()=>t.createElementVNode("br",null,null,-1)),QNt={class:"container-switch-toggle"},ezt={class:"container-prominent-section__chalkboard"},tzt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function azt(e,r,i,B,D,c){const m=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),f=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),y=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("FieldPosesion"),l=t.resolveComponent("VolumetricSectionContainer"),o=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",FNt,[t.createElementVNode("div",LNt,[t.createVNode(m,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-prominent-data":i.timeLiveProminentData,game:i.game,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onLoading:c.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])]),t.createElementVNode("div",DNt,[i.game.is_live===1||i.game.game_status===0||i.game.game_status===1?(t.openBlock(),t.createElementBlock("div",RNt,[t.createElementVNode("div",{class:t.normalizeClass(c.getContainerClass())},[D.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(i.game).length>0&&Object.keys(i.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(i.tournamentSelected.id!=41?i.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"):i.game.matchday_name=="Matchday 10"?"Final":i.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(D.widthSection>830?"highlights-title":"highlights-title-mobile")},"HIGHLIGHTS DEL PARTIDO",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",VNt,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showgoalsliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,"title-card":"GOLES",onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.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},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"title-card":"GOLES","can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.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(D.showsummaryliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.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},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",$Nt,[!D.isDataProminentGameLoading&&(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.canPlayVideos?(t.openBlock(),t.createBlock(f,{key:0,data:{game:i.game.gameId,season:i.game.seasonId,type:"historic"},"can-play-videos":i.canPlayVideos,"video-privileges-playing-as":i.videoPrivilegesPlayingAs,"privileges-team-id":i.playVideosPrivileges?i.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:c.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),c.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(D.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:i.token,game:i.game,widthScreen:D.widthSection,"can-play-videos":i.canPlayVideos,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onPlayVideo:c.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(D.widthSection>760?"fields-section-container":"fields-section-container-movil")},[jNt,i.game.game_status===4&&i.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.widthSection>590?(t.openBlock(),t.createElementBlock("div",UNt,[GNt,t.createTextVNode(" Es en base a las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection>340&&D.widthSection<=590?(t.openBlock(),t.createElementBlock("div",HNt,[WNt,t.createTextVNode(" "),qNt,t.createTextVNode("Es en base a las estadisticas de los partidos ya "),YNt,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection<=340?(t.openBlock(),t.createElementBlock("div",XNt,[ZNt,t.createTextVNode(" "),JNt,t.createTextVNode("Es en base a las estadisticas de los "),KNt,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(y,{"selected-button-index":D.teamButtonSelectedIndex,buttons:c.toggleButtons,width:"320px","border-radius":"16px",onChange:c.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",QNt,[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:c.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,D.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(p,{"width-Section":D.widthSection,game:i.game,"time-live-possesion":i.timeLivePossesion,onIntervalidpossesion:c.intervalidpossesion,"team-selected":D.teamSelected.teamId===0?c.toggleButtons[0]:D.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,D.switchTypeViewFiled==="Porcentajes"||D.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(l,{game:i.game,"season-selected":i.seasonSelected,token:i.token,"is-game-pre-match":c.isGamePreMatch,"team-selected-pre-match":D.teamSelected,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,D.viewVolumtrica&&D.widthSection>760||D.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",ezt,[tzt,D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(o,{key:0,"is-female":i.tournamentSelected.is_female===1,game:i.game,"season-selected":i.seasonSelected,"tournament-selected":i.tournamentSelected,token:i.token,"width-section":D.widthSection,"can-play-videos":i.canPlayVideos,"is-game-pre-match":c.isGamePreMatch,"play-videos-privileges":i.playVideosPrivileges,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":i.chalkboardIntervalMinutes,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onOpenMediaPlayer:c.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 nzt=$i(ONt,[["render",azt],["__scopeId","data-v-f677ec62"]]),uga="",rzt={class:"datagame-container"},izt=$i({__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:r}){function i(m){r("intervalidhighlive",m)}function B(m){r("intervalidpossesion",m)}function D(m){r("openmedia",m)}function c(m){r("openmedia",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",rzt,[t.createVNode(nzt,{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:B,onIntervalidhighlive:i,onOpenmedia:D,onOpenMediaPlayer:c},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-a8ac4916"]]),ozt={class:"datagame-container"},szt={__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://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.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:r}){const i=e,B=t.ref(0);t.watch(()=>i.game,m=>{B.value=m.gameId},{deep:!0,immediate:!0});function D(m){r("openmedia",m)}function c(m){r("intervalidgs",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",ozt,[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(w2),{key:B.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:c,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},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(w2),{key:B.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:D},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(w2),{key:B.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:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},lzt={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 A_(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const czt={containerLeftTitles:"_containerLeftTitles_zc6z8_119",containerLeftTitles420:"_containerLeftTitles420_zc6z8_135",containerLeftTitles620:"_containerLeftTitles620_zc6z8_151",containerLeftTitlesTeam:"_containerLeftTitlesTeam_zc6z8_169",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_zc6z8_185",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_zc6z8_201",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_zc6z8_217",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_zc6z8_233",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_zc6z8_249",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_zc6z8_265",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_zc6z8_281",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_zc6z8_297",headTitles:"_headTitles_zc6z8_315",headTitles960:"_headTitles960_zc6z8_345",headTitles420:"_headTitles420_zc6z8_375",headTitles540:"_headTitles540_zc6z8_415",headTitles460:"_headTitles460_zc6z8_445",headTitles620:"_headTitles620_zc6z8_475",position:"_position_zc6z8_505",position420:"_position420_zc6z8_523",player:"_player_zc6z8_529",player420:"_player420_zc6z8_551",containerRightType1:"_containerRightType1_zc6z8_559",containerRightTitles:"_containerRightTitles_zc6z8_573",containerRightTitles960:"_containerRightTitles960_zc6z8_591",block02Titles:"_block02Titles_zc6z8_609",block02Titles620:"_block02Titles620_zc6z8_625",mon1Scouting:"_mon1Scouting_zc6z8_633",mon1Scouting960:"_mon1Scouting960_zc6z8_653",mon1:"_mon1_zc6z8_633",mon1420:"_mon1420_zc6z8_689",mon1620:"_mon1620_zc6z8_709",icnIcon:"_icnIcon_zc6z8_729",icnIcon960:"_icnIcon960_zc6z8_739",icnIcon420:"_icnIcon420_zc6z8_751",teamTitle:"_teamTitle_zc6z8_759",positionTitle:"_positionTitle_zc6z8_779",ageTitle:"_ageTitle_zc6z8_795",partidos:"_partidos_zc6z8_811",playedGamesTitle:"_playedGamesTitle_zc6z8_819",playedMinutesTitle:"_playedMinutesTitle_zc6z8_839",block01Titles:"_block01Titles_zc6z8_857",mon:"_mon_zc6z8_633",containesOptionsTitles:"_containesOptionsTitles_zc6z8_889",templateTablaProductividadType1:"_templateTablaProductividadType1_zc6z8_903",templateTablaProductividadType1400:"_templateTablaProductividadType1400_zc6z8_927",headTitlesType1:"_headTitlesType1_zc6z8_955",headTitlesType1420:"_headTitlesType1420_zc6z8_981",headTitlesType1400:"_headTitlesType1400_zc6z8_1013",headTitlesType1540:"_headTitlesType1540_zc6z8_1045",headTitlesType1460:"_headTitlesType1460_zc6z8_1073",headTitlesType1680:"_headTitlesType1680_zc6z8_1101",headTitlesType1350:"_headTitlesType1350_zc6z8_1127",positionType1:"_positionType1_zc6z8_1157",positionType1400:"_positionType1400_zc6z8_1175",teamType1:"_teamType1_zc6z8_1195",teamType1400:"_teamType1400_zc6z8_1213",frecuenciaType1:"_frecuenciaType1_zc6z8_1233",frecuenciaType1540:"_frecuenciaType1540_zc6z8_1249",containerLeftTitlesType1:"_containerLeftTitlesType1_zc6z8_1267",frecuenciaWrapperType1:"_frecuenciaWrapperType1_zc6z8_1283",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_zc6z8_1301",promedioPartidoType1:"_promedioPartidoType1_zc6z8_1317",promedioEstePartidoType1:"_promedioEstePartidoType1_zc6z8_1325",promedioEstePartidoType1960:"_promedioEstePartidoType1960_zc6z8_1341",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_zc6z8_1349",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_zc6z8_1365",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_zc6z8_1383",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_zc6z8_1403",promedioPartidosType1:"_promedioPartidosType1_zc6z8_1421",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_zc6z8_1435",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_zc6z8_1451",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_zc6z8_1457",partidosJugadosType1:"_partidosJugadosType1_zc6z8_1463",partidosJugadosType1960:"_partidosJugadosType1960_zc6z8_1475",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_zc6z8_1489",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_zc6z8_1505",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_zc6z8_1521",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_zc6z8_1537",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_zc6z8_1553",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_zc6z8_1569",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_zc6z8_1585",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_zc6z8_1601",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_zc6z8_1617",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_zc6z8_1633",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_zc6z8_1649",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_zc6z8_1665",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_zc6z8_1681",block01TitlesType1:"_block01TitlesType1_zc6z8_1687",monType1:"_monType1_zc6z8_1703",monType1960:"_monType1960_zc6z8_1721",monType1680:"_monType1680_zc6z8_1741",videosType1:"_videosType1_zc6z8_1747",videosType1680:"_videosType1680_zc6z8_1767",videosType1600:"_videosType1600_zc6z8_1785",videosType1540:"_videosType1540_zc6z8_1803",videosType1420:"_videosType1420_zc6z8_1821",videosType1400:"_videosType1400_zc6z8_1839",containesOptionsTitlesType1:"_containesOptionsTitlesType1_zc6z8_1863",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_zc6z8_1879",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_zc6z8_1893",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_zc6z8_1907",icnIconType1:"_icnIconType1_zc6z8_1921",icnIconType1420:"_icnIconType1420_zc6z8_1933",icnIconType1400:"_icnIconType1400_zc6z8_1947",block02TitlesType1:"_block02TitlesType1_zc6z8_1955",block02TitlesType1680:"_block02TitlesType1680_zc6z8_1969",block02TitlesType1350:"_block02TitlesType1350_zc6z8_1983",containerRightTitlesType1:"_containerRightTitlesType1_zc6z8_1997",containerRightTitlesType1420:"_containerRightTitlesType1420_zc6z8_2015"},XE={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},headTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.headTitles420:e<=460?this.$style.headTitles460:e<=540?this.$style.headTitles540:e<=620?this.$style.headTitles620:e<=960?this.$style.headTitles960:this.$style.headTitles},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},containerRightType1Class(){return this.elementSize.width<=420?this.$style.containerRightType1420:this.$style.containerRightType1},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},containerRightTitlesClass(){return this.elementSize.width<=960?this.$style.containerRightTitles960:this.$style.containerRightTitles},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:r}=A_(e);return{myDivRef:e,elementSize:r}},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:{}},vq=()=>{t.useCssVars(e=>({"36b4a6f1":e.background,"14723c6a":e.height,"0b468773":e.fontSize,"5cab7631":e.fontColor,"3d1cee56":e.fontFamily,"421ca432":e.heightTeam}))},_q=XE.setup;XE.setup=_q?(e,r)=>(vq(),_q(e,r)):vq;const dzt={ref:"myDivRef"},uzt=t.createElementVNode("br",null,null,-1),hzt=t.createElementVNode("br",null,null,-1);function pzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",dzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.headTitlesClass),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClass),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.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),B.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(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.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(c.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.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),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),uzt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),hzt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.headTitlesClass),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClass),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.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),B.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),B.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(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(c.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const bq=$i(XE,[["render",pzt],["__cssModules",{$style:czt}]]),gva="",ZE={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))}}},xq=()=>{t.useCssVars(e=>({"124740d4":e.height,"10134ca2":e.borderWidthBtn,"3c6b92b3":e.borderType,"50129b0a":e.borderColor,"69df146a":e.borderRadius,22745479:e.width,"6940cc70":e.backgroundColor,"5644e646":e.cursorType,"3027cd46":e.fontSize,"159c0fd5":e.fontStyle,f2b4a480:e.fontFamily,cd9e6514:e.marginLeftStat,"777d9d51":e.fontSizeStat}))},wq=ZE.setup;ZE.setup=wq?(e,r)=>(xq(),wq(e,r)):xq;const fzt=e=>(t.pushScopeId("data-v-04a0bdbd"),e=e(),t.popScopeId(),e),mzt=["src"],gzt={key:1,class:"text"},yzt=["src"],vzt={class:"stats"},_zt=fzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),bzt={class:"numstats"},xzt={class:"leyend"};function wzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(i.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,14,mzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",gzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,yzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",vzt,[_zt,t.createElementVNode("div",bzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",xzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const kq=$i(ZE,[["render",wzt],["__scopeId","data-v-04a0bdbd"]]),kzt={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"},JE={components:{GSCButton:kq},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:r}=A_(e);return{myDivRef2:e,elementSize:r}},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)}}},Cq=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},Sq=JE.setup;JE.setup=Sq?(e,r)=>(Cq(),Sq(e,r)):Cq;const Czt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},Szt=["src"],Tzt=["src"],Ezt=["src"],Azt=["src"],Mzt=["fill"],Izt=["fill"],Pzt=["src"],Bzt=["src"],Nzt=["fill"],zzt=["fill"],Ozt=["src"],Fzt=["src"],Lzt=["src"],Dzt=["src"],Rzt=["fill"],Vzt=["fill"];function $zt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Czt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Szt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(i.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(i.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Tzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.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:i.data.team_logo},null,10,Ezt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.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(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.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:i.data.player_country_flag},null,10,Azt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.emitEventMedia(i.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(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[1]||(r[1]=a=>c.emitEventMedia(i.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),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.numberOfVideosClass)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[2]||(r[2]=a=>c.clickExpand(i.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:i.colorArrow},null,8,Izt)],10,Mzt))],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(i.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(c.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:i.data.team_logo},null,10,Pzt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(i.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:i.data.team_logo},null,10,Bzt)],2),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedType1Class)},t.toDisplayString(i.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(i.data.frequency)+" ",1),i.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),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.ageType1Class)},t.toDisplayString(i.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedGamesType1Class)},t.toDisplayString(i.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(c.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedMinutesType1Class)},t.toDisplayString(i.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameType1Class)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.emitEventMedia(i.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(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[4]||(r[4]=a=>c.emitEventMedia(i.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(c.numberOfVideosType1Class)},t.toDisplayString(i.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[5]||(r[5]=a=>c.clickExpand(i.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:i.colorArrow},null,8,zzt)],10,Nzt))],2)],2)],6)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Ozt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},t.toDisplayString(i.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Fzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.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:i.data.team_logo},null,10,Lzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.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(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.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:i.data.player_country_flag},null,10,Dzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:B.elementSize.width<=680?"83px":i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[6]||(r[6]=a=>c.emitEventMedia(i.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.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,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[7]||(r[7]=a=>c.clickExpand(i.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:i.colorArrow},null,8,Vzt)],10,Rzt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const Tq=$i(JE,[["render",$zt],["__cssModules",{$style:kzt}]]),jzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},KE={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))}}},Eq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Aq=KE.setup;KE.setup=Aq?(e,r)=>(Eq(),Aq(e,r)):Eq;const Uzt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),Gzt=["src"],Hzt={key:1,class:"text"},Wzt=["src"],qzt={class:"stats"},Yzt=Uzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Xzt={class:"numstats"},Zzt={class:"leyend"};function Jzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Gzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",Hzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Wzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",qzt,[Yzt,t.createElementVNode("div",Xzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",Zzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const Kzt=jzt(KE,[["render",Jzt],["__scopeId","data-v-fb269a1e"]]),Qzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},QE={components:{GSCButton:Kzt},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)}},Mq=()=>{t.useCssVars(e=>({"132156c0":e.centerTextCustom,"096d3ecc":e.marginCustom}))},Iq=QE.setup;QE.setup=Iq?(e,r)=>(Mq(),Iq(e,r)):Mq;const eOt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},tOt={class:"gsc-filterperteam__panel-teams__cont-teams"},aOt=["onClick"],nOt=["src","alt","title"];function rOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(c.customStyleContain)},[t.createElementVNode("div",eOt,[t.createElementVNode("div",tOt,[i.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(m,{"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:c.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass([a.id==D.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:f=>c.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,nOt)],14,aOt))),128))])],512)],4)}const iOt=Qzt(QE,[["render",rOt],["__scopeId","data-v-ab79352d"]]),oOt={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"},eA={components:{GSCButton:kq},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)}}},Pq=()=>{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}))},Bq=eA.setup;eA.setup=Bq?(e,r)=>(Pq(),Bq(e,r)):Pq;const sOt=["src"],lOt=["src"],cOt=["src"],dOt=["src"],uOt=["fill"],hOt=["fill"],pOt=["src"],fOt=["fill"],mOt=["fill"];function gOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[i.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(i.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:i.data.photo},null,10,sOt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:i.data.logo},null,10,lOt)],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(i.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.clickEventMedia(i.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:i.data.logo},null,10,cOt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(m,{icon:"","icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.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:i.data.logo},null,10,dOt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:r[1]||(r[1]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.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:i.colorArrow},null,8,hOt)],10,uOt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.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(i.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:i.data.logo},null,10,pOt)],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(i.data.name_team),3),t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[2]||(r[2]=a=>c.clickEventMedia(i.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(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.clickEventMedia(i.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(i.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:r[4]||(r[4]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.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:i.colorArrow},null,8,mOt)],10,fOt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const yOt=$i(eA,[["render",gOt],["__cssModules",{$style:oOt}]]),vOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},tA={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))}}},Nq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},zq=tA.setup;tA.setup=zq?(e,r)=>(Nq(),zq(e,r)):Nq;const _Ot=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),bOt=["src"],xOt={key:1,class:"text"},wOt=["src"],kOt={class:"stats"},COt=_Ot(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),SOt={class:"numstats"},TOt={class:"leyend"};function EOt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,bOt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",xOt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,wOt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",kOt,[COt,t.createElementVNode("div",SOt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",TOt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const AOt=vOt(tA,[["render",EOt],["__scopeId","data-v-fb269a1e"]]),Oba="",Fba="",MOt={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"},aA={components:{GSCButton:AOt},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:r}=A_(e);return{myDivRef:e,elementSize:r}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},Oq=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},Fq=aA.setup;aA.setup=Fq?(e,r)=>(Oq(),Fq(e,r)):Oq;const ch=e=>(t.pushScopeId("data-v-5dd9e88d"),e=e(),t.popScopeId(),e),IOt={ref:"myDivRef"},POt=["src"],BOt=ch(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),NOt=ch(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),zOt=ch(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),OOt=ch(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),FOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),LOt=ch(()=>t.createElementVNode("span",null,"xG: ",-1)),DOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),ROt=ch(()=>t.createElementVNode("span",null,"xG: ",-1)),VOt=ch(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),$Ot=ch(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),jOt=ch(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),UOt=ch(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),GOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),HOt=ch(()=>t.createElementVNode("span",null,"xG: ",-1));function WOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",IOt,[i.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,i.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[i.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(i.data.teams),3)],2)):t.createCommentVNode("",!0),i.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(i.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(i.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),i.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(i.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:i.data.countryFlag},null,8,POt)],2)],2)],2)):t.createCommentVNode("",!0),i.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(i.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[i.viewGames&&!i.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(i.data.games),3)],2)):t.createCommentVNode("",!0),i.viewMin&&!i.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(i.data.min),3)],2)):t.createCommentVNode("",!0),i.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(i.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.goals),3)],2)):t.createCommentVNode("",!0),i.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(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.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:r[0]||(r[0]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,i.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[BOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[NOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[zOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[OOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[FOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[LOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.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(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[DOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[ROt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.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)},[VOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[$Ot,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[jOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[UOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[GOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[HOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2)],2)],2),i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.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:r[1]||(r[1]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const Lq=$i(aA,[["render",WOt],["__cssModules",{$style:MOt}],["__scopeId","data-v-5dd9e88d"]]);/**
|
|
4158
|
+
`),zt=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(zt,Mt),fe.compileShader(zt),!fe.getShaderParameter(zt,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(zt)}`);fe.attachShader(this.program,zt);const Xt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Xt,Gt),fe.compileShader(Xt),!fe.getShaderParameter(Xt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Xt)}`);fe.attachShader(this.program,Xt),this.attributes={};const Zt={};this.numAttributes=Ge.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Ge[Yt]&&(fe.bindAttribLocation(this.program,Yt,Ge[Yt]),this.attributes[Ge[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Xt),fe.deleteShader(zt);for(let Yt=0;Yt<kt.length;Yt++){const ya=kt[Yt];if(ya&&!Zt[ya]){const Ca=fe.getUniformLocation(this.program,ya);Ca&&(Zt[ya]=Ca)}}this.fixedUniforms=Y(O,Zt),this.terrainUniforms=((Yt,ya)=>({u_depth:new n.aI(Yt,ya.u_depth),u_terrain:new n.aI(Yt,ya.u_terrain),u_terrain_dim:new n.aJ(Yt,ya.u_terrain_dim),u_terrain_matrix:new n.aK(Yt,ya.u_terrain_matrix),u_terrain_unpack:new n.aL(Yt,ya.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Yt,ya.u_terrain_exaggeration)}))(O,Zt),this.binderUniforms=j?j.getUniforms(O,Zt):[]}draw(O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt,ft,kt,Nt,Mt,Gt){const zt=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(j),O.setStencilMode(Y),O.setColorMode(te),O.setCullFace(de),Ae){O.activeTexture.set(zt.TEXTURE2),zt.bindTexture(zt.TEXTURE_2D,Ae.depthTexture),O.activeTexture.set(zt.TEXTURE3),zt.bindTexture(zt.TEXTURE_2D,Ae.texture);for(const Zt in this.terrainUniforms)this.terrainUniforms[Zt].set(Ae[Zt])}for(const Zt in this.fixedUniforms)this.fixedUniforms[Zt].set(fe[Zt]);kt&&kt.setUniforms(O,this.binderUniforms,lt,{zoom:ft});let Xt=0;switch(P){case zt.LINES:Xt=2;break;case zt.TRIANGLES:Xt=3;break;case zt.LINE_STRIP:Xt=1}for(const Zt of at.get()){const Yt=Zt.vaos||(Zt.vaos={});(Yt[Be]||(Yt[Be]=new Bn)).bind(O,this,Ge,kt?kt.getPaintVertexBuffers():[],qe,Zt.vertexOffset,Nt,Mt,Gt),zt.drawElements(P,Zt.primitiveLength*Xt,zt.UNSIGNED_SHORT,Zt.primitiveOffset*Xt*2)}}}function Ba(H,O,P){const j=1/yt(P,1,O.transform.tileZoom),Y=Math.pow(2,P.tileID.overscaledZ),te=P.tileSize*Math.pow(2,O.transform.tileZoom)/Y,de=te*(P.tileID.canonical.x+P.tileID.wrap*Y),fe=te*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[j,H.fromScale,H.toScale],u_fade:H.t,u_pixel_coord_upper:[de>>16,fe>>16],u_pixel_coord_lower:[65535&de,65535&fe]}}const Xa=(H,O,P,j)=>{const Y=O.style.light,te=Y.properties.get("position"),de=[te.x,te.y,te.z],fe=function(){var Be=new n.A(9);return n.A!=Float32Array&&(Be[1]=0,Be[2]=0,Be[3]=0,Be[5]=0,Be[6]=0,Be[7]=0),Be[0]=1,Be[4]=1,Be[8]=1,Be}();Y.properties.get("anchor")==="viewport"&&function(Be,Ge){var qe=Math.sin(Ge),at=Math.cos(Ge);Be[0]=at,Be[1]=qe,Be[2]=0,Be[3]=-qe,Be[4]=at,Be[5]=0,Be[6]=0,Be[7]=0,Be[8]=1}(fe,-O.transform.angle),function(Be,Ge,qe){var at=Ge[0],lt=Ge[1],ft=Ge[2];Be[0]=at*qe[0]+lt*qe[3]+ft*qe[6],Be[1]=at*qe[1]+lt*qe[4]+ft*qe[7],Be[2]=at*qe[2]+lt*qe[5]+ft*qe[8]}(de,de,fe);const Ae=Y.properties.get("color");return{u_matrix:H,u_lightpos:de,u_lightintensity:Y.properties.get("intensity"),u_lightcolor:[Ae.r,Ae.g,Ae.b],u_vertical_gradient:+P,u_opacity:j}},dn=(H,O,P,j,Y,te,de)=>n.e(Xa(H,O,P,j),Ba(te,O,de),{u_height_factor:-Math.pow(2,Y.overscaledZ)/de.tileSize/8}),ln=H=>({u_matrix:H}),Cn=(H,O,P,j)=>n.e(ln(H),Ba(P,O,j)),Rn=(H,O)=>({u_matrix:H,u_world:O}),la=(H,O,P,j,Y)=>n.e(Cn(H,O,P,j),{u_world:Y}),za=(H,O,P,j)=>{const Y=H.transform;let te,de;if(j.paint.get("circle-pitch-alignment")==="map"){const fe=yt(P,1,Y.zoom);te=!0,de=[fe,fe]}else te=!1,de=Y.pixelsToGLUnits;return{u_camera_to_center_distance:Y.cameraToCenterDistance,u_scale_with_map:+(j.paint.get("circle-pitch-scale")==="map"),u_matrix:H.translatePosMatrix(O.posMatrix,P,j.paint.get("circle-translate"),j.paint.get("circle-translate-anchor")),u_pitch_with_map:+te,u_device_pixel_ratio:H.pixelRatio,u_extrude_scale:de}},qt=(H,O)=>({u_matrix:O,u_pixel_extrude_scale:[1/H.width,1/H.height]}),ra=(H,O,P)=>({u_matrix:H,u_inv_matrix:O,u_camera_to_center_distance:P.cameraToCenterDistance,u_viewport_size:[P.width,P.height]}),sa=(H,O,P=1)=>({u_matrix:H,u_color:O,u_overlay:0,u_overlay_scale:P}),Ia=H=>({u_matrix:H}),Ma=(H,O,P,j)=>({u_matrix:H,u_extrude_scale:yt(O,1,P),u_intensity:j}),$a=(H,O,P,j)=>{const Y=n.H();n.aQ(Y,0,H.width,H.height,0,0,1);const te=H.context.gl;return{u_matrix:Y,u_world:[te.drawingBufferWidth,te.drawingBufferHeight],u_image:P,u_color_ramp:j,u_opacity:O.paint.get("heatmap-opacity")}},Pa=(H,O,P,j)=>{const Y=P.paint.get("hillshade-shadow-color"),te=P.paint.get("hillshade-highlight-color"),de=P.paint.get("hillshade-accent-color");let fe=P.paint.get("hillshade-illumination-direction")*(Math.PI/180);P.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=H.transform.angle);const Ae=!H.options.moving;return{u_matrix:j?j.posMatrix:H.transform.calculatePosMatrix(O.tileID.toUnwrapped(),Ae),u_image:0,u_latrange:na(0,O.tileID),u_light:[P.paint.get("hillshade-exaggeration"),fe],u_shadow:Y,u_highlight:te,u_accent:de}},Sa=(H,O)=>{const P=O.stride,j=n.H();return n.aQ(j,0,n.X,-n.X,0,0,1),n.J(j,j,[0,-n.X,0]),{u_matrix:j,u_image:1,u_dimension:[P,P],u_zoom:H.overscaledZ,u_unpack:O.getUnpackVector()}};function na(H,O){const P=Math.pow(2,O.canonical.z),j=O.canonical.y;return[new n.Z(0,j/P).toLngLat().lat,new n.Z(0,(j+1)/P).toLngLat().lat]}const ea=(H,O,P,j)=>{const Y=H.transform;return{u_matrix:an(H,O,P,j),u_ratio:1/yt(O,1,Y.zoom),u_device_pixel_ratio:H.pixelRatio,u_units_to_pixels:[1/Y.pixelsToGLUnits[0],1/Y.pixelsToGLUnits[1]]}},ga=(H,O,P,j,Y)=>n.e(ea(H,O,P,Y),{u_image:0,u_image_height:j}),Va=(H,O,P,j,Y)=>{const te=H.transform,de=tn(O,te);return{u_matrix:an(H,O,P,Y),u_texsize:O.imageAtlasTexture.size,u_ratio:1/yt(O,1,te.zoom),u_device_pixel_ratio:H.pixelRatio,u_image:0,u_scale:[de,j.fromScale,j.toScale],u_fade:j.t,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},en=(H,O,P,j,Y,te)=>{const de=H.transform,fe=H.lineAtlas,Ae=tn(O,de),Be=P.layout.get("line-cap")==="round",Ge=fe.getDash(j.from,Be),qe=fe.getDash(j.to,Be),at=Ge.width*Y.fromScale,lt=qe.width*Y.toScale;return n.e(ea(H,O,P,te),{u_patternscale_a:[Ae/at,-Ge.height/2],u_patternscale_b:[Ae/lt,-qe.height/2],u_sdfgamma:fe.width/(256*Math.min(at,lt)*H.pixelRatio)/2,u_image:0,u_tex_y_a:Ge.y,u_tex_y_b:qe.y,u_mix:Y.t})};function tn(H,O){return 1/yt(H,1,O.tileZoom)}function an(H,O,P,j){return H.translatePosMatrix(j?j.posMatrix:O.tileID.posMatrix,O,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}const _n=(H,O,P,j,Y)=>{return{u_matrix:H,u_tl_parent:O,u_scale_parent:P,u_buffer_scale:1,u_fade_t:j.mix,u_opacity:j.opacity*Y.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Y.paint.get("raster-brightness-min"),u_brightness_high:Y.paint.get("raster-brightness-max"),u_saturation_factor:(de=Y.paint.get("raster-saturation"),de>0?1-1/(1.001-de):-de),u_contrast_factor:(te=Y.paint.get("raster-contrast"),te>0?1/(1-te):1+te),u_spin_weights:mn(Y.paint.get("raster-hue-rotate"))};var te,de};function mn(H){H*=Math.PI/180;const O=Math.sin(H),P=Math.cos(H);return[(2*P+1)/3,(-Math.sqrt(3)*O-P+1)/3,(Math.sqrt(3)*O-P+1)/3]}const wn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt)=>{const ft=de.transform;return{u_is_size_zoom_constant:+(H==="constant"||H==="source"),u_is_size_feature_constant:+(H==="constant"||H==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:ft.cameraToCenterDistance,u_pitch:ft.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:ft.width/ft.height,u_fade_change:de.options.fadeDuration?de.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:Ae,u_coord_matrix:Be,u_is_text:+qe,u_pitch_with_map:+j,u_is_along_line:Y,u_is_variable_anchor:te,u_texsize:at,u_texture:0,u_translation:Ge,u_pitched_scale:lt}},pn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt,ft)=>{const kt=de.transform;return n.e(wn(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,ft),{u_gamma_scale:j?Math.cos(kt._pitch)*kt.cameraToCenterDistance:1,u_device_pixel_ratio:de.pixelRatio,u_is_halo:+lt})},yn=(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt)=>n.e(pn(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,!0,qe,!0,lt),{u_texsize_icon:at,u_texture_icon:1}),Nn=(H,O,P)=>({u_matrix:H,u_opacity:O,u_color:P}),qn=(H,O,P,j,Y,te)=>n.e(function(de,fe,Ae,Be){const Ge=Ae.imageManager.getPattern(de.from.toString()),qe=Ae.imageManager.getPattern(de.to.toString()),{width:at,height:lt}=Ae.imageManager.getPixelSize(),ft=Math.pow(2,Be.tileID.overscaledZ),kt=Be.tileSize*Math.pow(2,Ae.transform.tileZoom)/ft,Nt=kt*(Be.tileID.canonical.x+Be.tileID.wrap*ft),Mt=kt*Be.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ge.tl,u_pattern_br_a:Ge.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[at,lt],u_mix:fe.t,u_pattern_size_a:Ge.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/yt(Be,1,Ae.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Mt>>16],u_pixel_coord_lower:[65535&Nt,65535&Mt]}}(j,te,P,Y),{u_matrix:H,u_opacity:O}),Dn={fillExtrusion:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_opacity:new n.aJ(H,O.u_opacity)}),fillExtrusionPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_height_factor:new n.aJ(H,O.u_height_factor),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade),u_opacity:new n.aJ(H,O.u_opacity)}),fill:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),fillPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),fillOutline:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world)}),fillOutlinePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),circle:(H,O)=>({u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_scale_with_map:new n.aI(H,O.u_scale_with_map),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_extrude_scale:new n.aP(H,O.u_extrude_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_matrix:new n.aK(H,O.u_matrix)}),collisionBox:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_pixel_extrude_scale:new n.aP(H,O.u_pixel_extrude_scale)}),collisionCircle:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_inv_matrix:new n.aK(H,O.u_inv_matrix),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_viewport_size:new n.aP(H,O.u_viewport_size)}),debug:(H,O)=>({u_color:new n.aM(H,O.u_color),u_matrix:new n.aK(H,O.u_matrix),u_overlay:new n.aI(H,O.u_overlay),u_overlay_scale:new n.aJ(H,O.u_overlay_scale)}),clippingMask:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),heatmap:(H,O)=>({u_extrude_scale:new n.aJ(H,O.u_extrude_scale),u_intensity:new n.aJ(H,O.u_intensity),u_matrix:new n.aK(H,O.u_matrix)}),heatmapTexture:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_color_ramp:new n.aI(H,O.u_color_ramp),u_opacity:new n.aJ(H,O.u_opacity)}),hillshade:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_latrange:new n.aP(H,O.u_latrange),u_light:new n.aP(H,O.u_light),u_shadow:new n.aM(H,O.u_shadow),u_highlight:new n.aM(H,O.u_highlight),u_accent:new n.aM(H,O.u_accent)}),hillshadePrepare:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_dimension:new n.aP(H,O.u_dimension),u_zoom:new n.aJ(H,O.u_zoom),u_unpack:new n.aL(H,O.u_unpack)}),line:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels)}),lineGradient:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_image:new n.aI(H,O.u_image),u_image_height:new n.aJ(H,O.u_image_height)}),linePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texsize:new n.aP(H,O.u_texsize),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_image:new n.aI(H,O.u_image),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),lineSDF:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_patternscale_a:new n.aP(H,O.u_patternscale_a),u_patternscale_b:new n.aP(H,O.u_patternscale_b),u_sdfgamma:new n.aJ(H,O.u_sdfgamma),u_image:new n.aI(H,O.u_image),u_tex_y_a:new n.aJ(H,O.u_tex_y_a),u_tex_y_b:new n.aJ(H,O.u_tex_y_b),u_mix:new n.aJ(H,O.u_mix)}),raster:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_tl_parent:new n.aP(H,O.u_tl_parent),u_scale_parent:new n.aJ(H,O.u_scale_parent),u_buffer_scale:new n.aJ(H,O.u_buffer_scale),u_fade_t:new n.aJ(H,O.u_fade_t),u_opacity:new n.aJ(H,O.u_opacity),u_image0:new n.aI(H,O.u_image0),u_image1:new n.aI(H,O.u_image1),u_brightness_low:new n.aJ(H,O.u_brightness_low),u_brightness_high:new n.aJ(H,O.u_brightness_high),u_saturation_factor:new n.aJ(H,O.u_saturation_factor),u_contrast_factor:new n.aJ(H,O.u_contrast_factor),u_spin_weights:new n.aO(H,O.u_spin_weights)}),symbolIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolSDF:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolTextAndIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texsize_icon:new n.aP(H,O.u_texsize_icon),u_texture:new n.aI(H,O.u_texture),u_texture_icon:new n.aI(H,O.u_texture_icon),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),background:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_color:new n.aM(H,O.u_color)}),backgroundPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_image:new n.aI(H,O.u_image),u_pattern_tl_a:new n.aP(H,O.u_pattern_tl_a),u_pattern_br_a:new n.aP(H,O.u_pattern_br_a),u_pattern_tl_b:new n.aP(H,O.u_pattern_tl_b),u_pattern_br_b:new n.aP(H,O.u_pattern_br_b),u_texsize:new n.aP(H,O.u_texsize),u_mix:new n.aJ(H,O.u_mix),u_pattern_size_a:new n.aP(H,O.u_pattern_size_a),u_pattern_size_b:new n.aP(H,O.u_pattern_size_b),u_scale_a:new n.aJ(H,O.u_scale_a),u_scale_b:new n.aJ(H,O.u_scale_b),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(H,O.u_tile_units_to_pixels)}),terrain:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_ele_delta:new n.aJ(H,O.u_ele_delta),u_fog_matrix:new n.aK(H,O.u_fog_matrix),u_fog_color:new n.aM(H,O.u_fog_color),u_fog_ground_blend:new n.aJ(H,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(H,O.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon_fog_blend:new n.aJ(H,O.u_horizon_fog_blend)}),terrainDepth:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),terrainCoords:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_terrain_coords_id:new n.aJ(H,O.u_terrain_coords_id),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),sky:(H,O)=>({u_sky_color:new n.aM(H,O.u_sky_color),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon:new n.aJ(H,O.u_horizon),u_sky_horizon_blend:new n.aJ(H,O.u_sky_horizon_blend)})};class En{constructor(O,P,j){this.context=O;const Y=O.gl;this.buffer=Y.createBuffer(),this.dynamicDraw=!!j,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Y.bufferData(Y.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?Y.DYNAMIC_DRAW:Y.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){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,O.arrayBuffer)}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const Vn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kn{constructor(O,P,j,Y){this.length=P.length,this.attributes=j,this.itemSize=P.bytesPerElement,this.dynamicDraw=Y,this.context=O;const te=O.gl;this.buffer=te.createBuffer(),O.bindVertexBuffer.set(this.buffer),te.bufferData(te.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?te.DYNAMIC_DRAW:te.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,P){for(let j=0;j<this.attributes.length;j++){const Y=this.attributes[j],te=P.attributes[Y.name];te!==void 0&&O.enableVertexAttribArray(te)}}setVertexAttribPointers(O,P,j){for(let Y=0;Y<this.attributes.length;Y++){const te=this.attributes[Y],de=P.attributes[te.name];de!==void 0&&O.vertexAttribPointer(de,te.components,O[Vn[te.type]],!1,this.itemSize,te.offset+this.itemSize*(j||0))}}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const wr=new WeakMap;function li(H){var O;if(wr.has(H))return wr.get(H);{const P=(O=H.getParameter(H.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return wr.set(H,P),P}}class Vr{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class qi extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class gi extends Vr{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class Ni extends Vr{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class mo extends Vr{getDefault(){return[!0,!0,!0,!0]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class Zr extends Vr{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class ei extends Vr{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class Co extends Vr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const P=this.current;(O.func!==P.func||O.ref!==P.ref||O.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class Ki extends Vr{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class bo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=O,this.dirty=!1}}class xs extends Vr{getDefault(){return[0,1]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class lo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=O,this.dirty=!1}}class Ds extends Vr{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Rs extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.BLEND):P.disable(P.BLEND),this.current=O,this.dirty=!1}}class el extends Vr{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class To extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class ws extends Vr{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class ls extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=O,this.dirty=!1}}class pi extends Vr{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class Hi extends Vr{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class tl extends Vr{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Ns extends Vr{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class fs extends Vr{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class vl extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class ks extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class _l extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindTexture(P.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class al extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class nl extends Vr{getDefault(){return null}set(O){const P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class Po extends Vr{getDefault(){return null}set(O){var P;if(O===this.current&&!this.dirty)return;const j=this.gl;li(j)?j.bindVertexArray(O):(P=j.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class Gc extends Vr{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class zc extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class Vl extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class ad extends Vr{constructor(O,P){super(O),this.context=O,this.parent=P}getDefault(){return null}}class sd extends ad{setDirty(){this.dirty=!0}set(O){if(O===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,O,0),this.current=O,this.dirty=!1}}class Vs extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class ld extends ad{set(O){if(O===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,O),this.current=O,this.dirty=!1}}class au{constructor(O,P,j,Y,te){this.context=O,this.width=P,this.height=j;const de=O.gl,fe=this.framebuffer=de.createFramebuffer();if(this.colorAttachment=new sd(O,fe),Y)this.depthAttachment=te?new ld(O,fe):new Vs(O,fe);else if(te)throw new Error("Stencil cannot be set without depth");if(de.checkFramebufferStatus(de.FRAMEBUFFER)!==de.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,P=this.colorAttachment.get();if(P&&O.deleteTexture(P),this.depthAttachment){const j=this.depthAttachment.get();j&&O.deleteRenderbuffer(j)}O.deleteFramebuffer(this.framebuffer)}}class Cs{constructor(O,P,j){this.blendFunction=O,this.blendColor=P,this.mask=j}}Cs.Replace=[1,0],Cs.disabled=new Cs(Cs.Replace,n.aN.transparent,[!1,!1,!1,!1]),Cs.unblended=new Cs(Cs.Replace,n.aN.transparent,[!0,!0,!0,!0]),Cs.alphaBlended=new Cs([1,771],n.aN.transparent,[!0,!0,!0,!0]);class nc{constructor(O){var P,j;if(this.gl=O,this.clearColor=new qi(this),this.clearDepth=new gi(this),this.clearStencil=new Ni(this),this.colorMask=new mo(this),this.depthMask=new Zr(this),this.stencilMask=new ei(this),this.stencilFunc=new Co(this),this.stencilOp=new Ki(this),this.stencilTest=new bo(this),this.depthRange=new xs(this),this.depthTest=new lo(this),this.depthFunc=new Ds(this),this.blend=new Rs(this),this.blendFunc=new el(this),this.blendColor=new To(this),this.blendEquation=new ws(this),this.cullFace=new ls(this),this.cullFaceSide=new pi(this),this.frontFace=new Hi(this),this.program=new tl(this),this.activeTexture=new Ns(this),this.viewport=new fs(this),this.bindFramebuffer=new vl(this),this.bindRenderbuffer=new ks(this),this.bindTexture=new _l(this),this.bindVertexBuffer=new al(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Gc(this),this.pixelStoreUnpackPremultiplyAlpha=new zc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),li(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Y=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=O.RGBA16F)!==null&&P!==void 0?P:Y==null?void 0:Y.RGBA16F_EXT,this.RGB16F=(j=O.RGB16F)!==null&&j!==void 0?j:Y==null?void 0:Y.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Y=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Y==null?void 0:Y.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(O,P){return new En(this,O,P)}createVertexBuffer(O,P,j){return new Kn(this,O,P,j)}createRenderbuffer(O,P,j){const Y=this.gl,te=Y.createRenderbuffer();return this.bindRenderbuffer.set(te),Y.renderbufferStorage(Y.RENDERBUFFER,O,P,j),this.bindRenderbuffer.set(null),te}createFramebuffer(O,P,j,Y){return new au(this,O,P,j,Y)}clear({color:O,depth:P,stencil:j}){const Y=this.gl;let te=0;O&&(te|=Y.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&(te|=Y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),j!==void 0&&(te|=Y.STENCIL_BUFFER_BIT,this.clearStencil.set(j),this.stencilMask.set(255)),Y.clear(te)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){n.aF(O.blendFunction,Cs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return li(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var P;return li(this.gl)?this.gl.deleteVertexArray(O):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class bi{constructor(O,P,j){this.func=O,this.mask=P,this.range=j}}bi.ReadOnly=!1,bi.ReadWrite=!0,bi.disabled=new bi(519,bi.ReadOnly,[0,1]);const Jl=7680;class Qi{constructor(O,P,j,Y,te,de){this.test=O,this.ref=P,this.mask=j,this.fail=Y,this.depthFail=te,this.pass=de}}Qi.disabled=new Qi({func:519,mask:0},0,0,Jl,Jl,Jl);class ao{constructor(O,P,j){this.enable=O,this.mode=P,this.frontFace=j}}let $s;function Do(H,O,P,j,Y){const te=H.context,de=te.gl,fe=H.useProgram("collisionBox"),Ae=[];let Be=0,Ge=0;for(let Nt=0;Nt<j.length;Nt++){const Mt=j[Nt],Gt=O.getTile(Mt).getBucket(P);if(!Gt)continue;const zt=Y?Gt.textCollisionBox:Gt.iconCollisionBox,Xt=Gt.collisionCircleArray;if(Xt.length>0){const Zt=n.H();n.aR(Zt,Gt.placementInvProjMatrix,H.transform.glCoordMatrix),n.aR(Zt,Zt,Gt.placementViewportMatrix),Ae.push({circleArray:Xt,circleOffset:Ge,transform:Mt.posMatrix,invTransform:Zt,coord:Mt}),Be+=Xt.length/4,Ge=Be}zt&&fe.draw(te,de.LINES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,qt(H.transform,Mt.posMatrix),H.style.map.terrain&&H.style.map.terrain.getTerrainData(Mt),P.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,H.transform.zoom,null,null,zt.collisionVertexBuffer)}if(!Y||!Ae.length)return;const qe=H.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Be),at._trim();let lt=0;for(const Nt of Ae)for(let Mt=0;Mt<Nt.circleArray.length/4;Mt++){const Gt=4*Mt,zt=Nt.circleArray[Gt+0],Xt=Nt.circleArray[Gt+1],Zt=Nt.circleArray[Gt+2],Yt=Nt.circleArray[Gt+3];at.emplace(lt++,zt,Xt,Zt,Yt,0),at.emplace(lt++,zt,Xt,Zt,Yt,1),at.emplace(lt++,zt,Xt,Zt,Yt,2),at.emplace(lt++,zt,Xt,Zt,Yt,3)}(!$s||$s.length<2*Be)&&($s=function(Nt){const Mt=2*Nt,Gt=new n.aU;Gt.resize(Mt),Gt._trim();for(let zt=0;zt<Mt;zt++){const Xt=6*zt;Gt.uint16[Xt+0]=4*zt+0,Gt.uint16[Xt+1]=4*zt+1,Gt.uint16[Xt+2]=4*zt+2,Gt.uint16[Xt+3]=4*zt+2,Gt.uint16[Xt+4]=4*zt+3,Gt.uint16[Xt+5]=4*zt+0}return Gt}(Be));const ft=te.createIndexBuffer($s,!0),kt=te.createVertexBuffer(at,n.aT.members,!0);for(const Nt of Ae){const Mt=ra(Nt.transform,Nt.invTransform,H.transform);qe.draw(te,de.TRIANGLES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,Mt,H.style.map.terrain&&H.style.map.terrain.getTerrainData(Nt.coord),P.id,kt,ft,n.a0.simpleSegment(0,2*Nt.circleOffset,Nt.circleArray.length,Nt.circleArray.length/2),null,H.transform.zoom,null,null,null)}kt.destroy(),ft.destroy()}ao.disabled=new ao(!1,1029,2305),ao.backCCW=new ao(!0,1029,2305);const Oc=n.ao(new Float32Array(16));function bl(H,O,P,j,Y){if(H.renderPass!=="translucent")return;const te=Qi.disabled,de=H.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,Ae,Be,Ge,qe,at,lt,ft,kt){const Nt=Ae.transform,Mt=Ea(),Gt=qe==="map",zt=at==="map";for(const Xt of fe){const Zt=Ge.getTile(Xt),Yt=Zt.getBucket(Be);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const ya=Yt.textSizeData,Ca=n.ah(ya,Nt.zoom),La=yt(Zt,1,Ae.transform.zoom),ja=It(Xt.posMatrix,zt,Gt,Ae.transform,La),Wa=Be.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(Ca){const on=Math.pow(2,Nt.zoom-Zt.tileID.overscaledZ),Tn=Ae.style.map.terrain?(Sn,kn)=>Ae.style.map.terrain.getElevation(Xt,Sn,kn):null,Qa=Mt.translatePosition(Nt,Zt,lt,ft);zo(Yt,Gt,zt,kt,Nt,ja,Xt.posMatrix,on,Ca,Wa,Mt,Qa,Xt.toUnwrapped(),Tn)}}}(j,H,P,O,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),Y),P.paint.get("icon-opacity").constantOr(1)!==0&&rc(H,O,P,j,!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"),te,de),P.paint.get("text-opacity").constantOr(1)!==0&&rc(H,O,P,j,!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"),te,de),O.map.showCollisionBoxes&&(Do(H,O,P,j,!0),Do(H,O,P,j,!1))}function cs(H,O,P,j,Y,te){const{horizontalAlign:de,verticalAlign:fe}=n.av(H),Ae=-(de-.5)*O,Be=-(fe-.5)*P;return new n.P((Ae/Y+j[0])*te,(Be/Y+j[1])*te)}function ms(H,O,P,j,Y,te){const de=O.tileAnchorPoint.add(new n.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let fe=j.mult(te);return P||(fe=fe.rotate(-Y)),Ft(de.add(fe),O.labelPlaneMatrix,O.getElevation).point}if(P){const fe=We(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(H),Ae=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return H.add(j.rotate(Ae))}return H.add(j)}function zo(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe,at,lt){const ft=H.text.placedSymbolArray,kt=H.text.dynamicLayoutVertexArray,Nt=H.icon.dynamicLayoutVertexArray,Mt={};kt.clear();for(let Gt=0;Gt<ft.length;Gt++){const zt=ft.get(Gt),Xt=H.allowVerticalPlacement&&!zt.placedOrientation,Zt=zt.hidden||!zt.crossTileID||Xt?null:j[zt.crossTileID];if(Zt){const Yt=new n.P(zt.anchorX,zt.anchorY),ya={getElevation:lt,width:Y.width,height:Y.height,labelPlaneMatrix:te,lineVertexArray:null,pitchWithMap:P,projection:Ge,projectionCache:null,tileAnchorPoint:Yt,translation:qe,unwrappedTileID:at},Ca=P?Ft(Yt,de,lt):We(Yt.x,Yt.y,ya),La=ot(Y.cameraToCenterDistance,Ca.signedDistanceFromCamera);let ja=n.aj(H.textSizeData,Ae,zt)*La/n.aq;P&&(ja*=H.tilePixelRatio/fe);const{width:Wa,height:on,anchor:Tn,textOffset:Qa,textBoxScale:Sn}=Zt,kn=cs(Tn,Wa,on,Qa,Sn,ja),Ln=Ge.getPitchedTextCorrection(Y,Yt.add(new n.P(qe[0],qe[1])),at),fn=ms(Ca.point,ya,O,kn,Y.angle,Ln),Mn=H.allowVerticalPlacement&&zt.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let Wn=0;Wn<zt.numGlyphs;Wn++)n.ak(kt,fn,Mn);Be&&zt.associatedIconIndex>=0&&(Mt[zt.associatedIconIndex]={shiftedAnchor:fn,angle:Mn})}else Bt(zt.numGlyphs,kt)}if(Be){Nt.clear();const Gt=H.icon.placedSymbolArray;for(let zt=0;zt<Gt.length;zt++){const Xt=Gt.get(zt);if(Xt.hidden)Bt(Xt.numGlyphs,Nt);else{const Zt=Mt[zt];if(Zt)for(let Yt=0;Yt<Xt.numGlyphs;Yt++)n.ak(Nt,Zt.shiftedAnchor,Zt.angle);else Bt(Xt.numGlyphs,Nt)}}H.icon.dynamicLayoutVertexBuffer.updateData(Nt)}H.text.dynamicLayoutVertexBuffer.updateData(kt)}function Gr(H,O,P){return P.iconsInText&&O?"symbolTextAndIcon":H?"symbolSDF":"symbolIcon"}function rc(H,O,P,j,Y,te,de,fe,Ae,Be,Ge,qe){const at=H.context,lt=at.gl,ft=H.transform,kt=Ea(),Nt=fe==="map",Mt=Ae==="map",Gt=fe!=="viewport"&&P.layout.get("symbol-placement")!=="point",zt=Nt&&!Mt&&!Gt,Xt=!Mt&&Gt,Zt=!P.layout.get("symbol-sort-key").isConstant();let Yt=!1;const ya=H.depthModeForSublayer(0,bi.ReadOnly),Ca=P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"),La=[],ja=kt.getCircleRadiusCorrection(ft);for(const Wa of j){const on=O.getTile(Wa),Tn=on.getBucket(P);if(!Tn)continue;const Qa=Y?Tn.text:Tn.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const Sn=Qa.programConfigurations.get(P.id),kn=Y||Tn.sdfIcons,Ln=Y?Tn.textSizeData:Tn.iconSizeData,fn=Mt||ft.pitch!==0,Mn=H.useProgram(Gr(kn,Y,Tn),Sn),Wn=n.ah(Ln,ft.zoom),In=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Wa);let Hn,Jn,kr,lr,Fr=[0,0],Rr=null;if(Y){if(Jn=on.glyphAtlasTexture,kr=lt.LINEAR,Hn=on.glyphAtlasTexture.size,Tn.iconsInText){Fr=on.imageAtlasTexture.size,Rr=on.imageAtlasTexture;const Lr=Ln.kind==="composite"||Ln.kind==="camera";lr=fn||H.options.rotating||H.options.zooming||Lr?lt.LINEAR:lt.NEAREST}}else{const Lr=P.layout.get("icon-size").constantOr(0)!==1||Tn.iconsNeedLinear;Jn=on.imageAtlasTexture,kr=kn||H.options.rotating||H.options.zooming||Lr||fn?lt.LINEAR:lt.NEAREST,Hn=on.imageAtlasTexture.size}const qr=yt(on,1,H.transform.zoom),fi=Xt?Wa.posMatrix:Oc,Wi=It(fi,Mt,Nt,H.transform,qr),Vi=Ot(fi,Mt,Nt,H.transform,qr),to=Ot(Wa.posMatrix,Mt,Nt,H.transform,qr),hi=kt.translatePosition(H.transform,on,te,de),Ur=Ca&&Tn.hasTextData(),Si=P.layout.get("icon-text-fit")!=="none"&&Ur&&Tn.hasIconData();if(Gt){const Lr=H.style.map.terrain?(Fo,bs)=>H.style.map.terrain.getElevation(Wa,Fo,bs):null,_s=P.layout.get("text-rotation-alignment")==="map";vt(Tn,Wa.posMatrix,H,Y,Wi,to,Mt,Be,_s,kt,Wa.toUnwrapped(),ft.width,ft.height,hi,Lr)}const ci=Wa.posMatrix,Qr=Y&&Ca||Si,vi=Gt||Qr?Oc:Wi,ki=Vi,di=kn&&P.paint.get(Y?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let dl;dl=kn?Tn.iconsInText?yn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Hn,Fr,ja):pn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,!0,ja):wn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,ja);const So={program:Mn,buffers:Qa,uniformValues:dl,atlasTexture:Jn,atlasTextureIcon:Rr,atlasInterpolation:kr,atlasInterpolationIcon:lr,isSDF:kn,hasHalo:di};if(Zt&&Tn.canOverlap){Yt=!0;const Lr=Qa.segments.get();for(const _s of Lr)La.push({segments:new n.a0([_s]),sortKey:_s.sortKey,state:So,terrainData:In})}else La.push({segments:Qa.segments,sortKey:0,state:So,terrainData:In})}Yt&&La.sort((Wa,on)=>Wa.sortKey-on.sortKey);for(const Wa of La){const on=Wa.state;if(at.activeTexture.set(lt.TEXTURE0),on.atlasTexture.bind(on.atlasInterpolation,lt.CLAMP_TO_EDGE),on.atlasTextureIcon&&(at.activeTexture.set(lt.TEXTURE1),on.atlasTextureIcon&&on.atlasTextureIcon.bind(on.atlasInterpolationIcon,lt.CLAMP_TO_EDGE)),on.isSDF){const Tn=on.uniformValues;on.hasHalo&&(Tn.u_is_halo=1,pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,Tn,Wa.terrainData)),Tn.u_is_halo=0}pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,on.uniformValues,Wa.terrainData)}}function pd(H,O,P,j,Y,te,de,fe,Ae,Be){const Ge=j.context,qe=Ge.gl;Y.draw(Ge,qe.TRIANGLES,te,de,fe,ao.disabled,Ae,Be,P.id,H.layoutVertexBuffer,H.indexBuffer,O,P.paint,j.transform.zoom,H.programConfigurations.get(P.id),H.dynamicLayoutVertexBuffer,H.opacityVertexBuffer)}function ic(H,O,P,j){if(P.paint.get("heatmap-opacity")!==0)if(H.renderPass==="offscreen"){const Y=H.context,te=Y.gl,de=Qi.disabled,fe=new Cs([te.ONE,te.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(Ae,Be,Ge){const qe=Ae.gl;Ae.activeTexture.set(qe.TEXTURE1),Ae.viewport.set([0,0,Be.width/4,Be.height/4]);let at=Ge.heatmapFbo;if(at)qe.bindTexture(qe.TEXTURE_2D,at.colorAttachment.get()),Ae.bindFramebuffer.set(at.framebuffer);else{const lt=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,lt),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),at=Ge.heatmapFbo=Ae.createFramebuffer(Be.width/4,Be.height/4,!1,!1),function(ft,kt,Nt,Mt){var Gt,zt;const Xt=ft.gl,Zt=(Gt=ft.HALF_FLOAT)!==null&&Gt!==void 0?Gt:Xt.UNSIGNED_BYTE,Yt=(zt=ft.RGBA16F)!==null&&zt!==void 0?zt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Yt,kt.width/4,kt.height/4,0,Xt.RGBA,Zt,null),Mt.colorAttachment.set(Nt)}(Ae,Be,lt,at)}})(Y,H,P),Y.clear({color:n.aN.transparent});for(let Ae=0;Ae<j.length;Ae++){const Be=j[Ae];if(O.hasRenderableParent(Be))continue;const Ge=O.getTile(Be),qe=Ge.getBucket(P);if(!qe)continue;const at=qe.programConfigurations.get(P.id),lt=H.useProgram("heatmap",at),{zoom:ft}=H.transform;lt.draw(Y,te.TRIANGLES,bi.disabled,de,fe,ao.disabled,Ma(Be.posMatrix,Ge,ft,P.paint.get("heatmap-intensity")),null,P.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,P.paint,H.transform.zoom,at)}Y.viewport.set([0,0,H.width,H.height])}else H.renderPass==="translucent"&&(H.context.setColorMode(H.colorModeForRenderPass()),function(Y,te){const de=Y.context,fe=de.gl,Ae=te.heatmapFbo;if(!Ae)return;de.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,Ae.colorAttachment.get()),de.activeTexture.set(fe.TEXTURE1);let Be=te.colorRampTexture;Be||(Be=te.colorRampTexture=new I(de,te.colorRamp,fe.RGBA)),Be.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(de,fe.TRIANGLES,bi.disabled,Qi.disabled,Y.colorModeForRenderPass(),ao.disabled,$a(Y,te,0,1),null,te.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,te.paint,Y.transform.zoom)}(H,P))}function $l(H,O,P,j,Y){if(!P||!j||!j.imageAtlas)return;const te=j.imageAtlas.patternPositions;let de=te[P.to.toString()],fe=te[P.from.toString()];if(!de&&fe&&(de=fe),!fe&&de&&(fe=de),!de||!fe){const Ae=Y.getPaintProperty(O);de=te[Ae],fe=te[Ae]}de&&fe&&H.setConstantPatternPositions(de,fe)}function Hc(H,O,P,j,Y,te,de){const fe=H.context.gl,Ae="fill-pattern",Be=P.paint.get(Ae),Ge=Be&&Be.constantOr(1),qe=P.getCrossfadeParameters();let at,lt,ft,kt,Nt;de?(lt=Ge&&!P.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=fe.LINES):(lt=Ge?"fillPattern":"fill",at=fe.TRIANGLES);const Mt=Be.constantOr(null);for(const Gt of j){const zt=O.getTile(Gt);if(Ge&&!zt.patternsLoaded())continue;const Xt=zt.getBucket(P);if(!Xt)continue;const Zt=Xt.programConfigurations.get(P.id),Yt=H.useProgram(lt,Zt),ya=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Gt);Ge&&(H.context.activeTexture.set(fe.TEXTURE0),zt.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Zt.updatePaintBuffers(qe)),$l(Zt,Ae,Mt,zt,P);const Ca=ya?Gt:null,La=Ca?Ca.posMatrix:Gt.posMatrix,ja=H.translatePosMatrix(La,zt,P.paint.get("fill-translate"),P.paint.get("fill-translate-anchor"));if(de){kt=Xt.indexBuffer2,Nt=Xt.segments2;const Wa=[fe.drawingBufferWidth,fe.drawingBufferHeight];ft=lt==="fillOutlinePattern"&&Ge?la(ja,H,qe,zt,Wa):Rn(ja,Wa)}else kt=Xt.indexBuffer,Nt=Xt.segments,ft=Ge?Cn(ja,H,qe,zt):ln(ja);Yt.draw(H.context,at,Y,H.stencilModeForClipping(Gt),te,ao.disabled,ft,ya,P.id,Xt.layoutVertexBuffer,kt,Nt,P.paint,H.transform.zoom,Zt)}}function Wc(H,O,P,j,Y,te,de){const fe=H.context,Ae=fe.gl,Be="fill-extrusion-pattern",Ge=P.paint.get(Be),qe=Ge.constantOr(1),at=P.getCrossfadeParameters(),lt=P.paint.get("fill-extrusion-opacity"),ft=Ge.constantOr(null);for(const kt of j){const Nt=O.getTile(kt),Mt=Nt.getBucket(P);if(!Mt)continue;const Gt=H.style.map.terrain&&H.style.map.terrain.getTerrainData(kt),zt=Mt.programConfigurations.get(P.id),Xt=H.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",zt);qe&&(H.context.activeTexture.set(Ae.TEXTURE0),Nt.imageAtlasTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),zt.updatePaintBuffers(at)),$l(zt,Be,ft,Nt,P);const Zt=H.translatePosMatrix(kt.posMatrix,Nt,P.paint.get("fill-extrusion-translate"),P.paint.get("fill-extrusion-translate-anchor")),Yt=P.paint.get("fill-extrusion-vertical-gradient"),ya=qe?dn(Zt,H,Yt,lt,kt,at,Nt):Xa(Zt,H,Yt,lt);Xt.draw(fe,fe.gl.TRIANGLES,Y,te,de,ao.backCCW,ya,Gt,P.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,P.paint,H.transform.zoom,zt,H.style.map.terrain&&Mt.centroidVertexBuffer)}}function Cc(H,O,P,j,Y,te,de){const fe=H.context,Ae=fe.gl,Be=P.fbo;if(!Be)return;const Ge=H.useProgram("hillshade"),qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(O);fe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,Be.colorAttachment.get());const at=qe?O:null;Ge.draw(fe,Ae.TRIANGLES,Y,te,de,ao.disabled,Pa(H,P,j,at),qe,j.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}function xd(H,O,P,j,Y,te){const de=H.context,fe=de.gl,Ae=O.dem;if(Ae&&Ae.data){const Be=Ae.dim,Ge=Ae.stride,qe=Ae.getPixels();if(de.activeTexture.set(fe.TEXTURE1),de.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||H.getTileTexture(Ge),O.demTexture){const lt=O.demTexture;lt.update(qe,{premultiply:!1}),lt.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else O.demTexture=new I(de,qe,fe.RGBA,{premultiply:!1}),O.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);de.activeTexture.set(fe.TEXTURE0);let at=O.fbo;if(!at){const lt=new I(de,{width:Be,height:Be,data:null},fe.RGBA);lt.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),at=O.fbo=de.createFramebuffer(Be,Be,!0,!1),at.colorAttachment.set(lt.texture)}de.bindFramebuffer.set(at.framebuffer),de.viewport.set([0,0,Be,Be]),H.useProgram("hillshadePrepare").draw(de,fe.TRIANGLES,j,Y,te,ao.disabled,Sa(O.tileID,Ae),null,P.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function zs(H,O,P,j,Y,te){const de=j.paint.get("raster-fade-duration");if(!te&&de>0){const fe=l.now(),Ae=(fe-H.timeAdded)/de,Be=O?(fe-O.timeAdded)/de:-1,Ge=P.getSource(),qe=Y.coveringZoomLevel({tileSize:Ge.tileSize,roundZoom:Ge.roundZoom}),at=!O||Math.abs(O.tileID.overscaledZ-qe)>Math.abs(H.tileID.overscaledZ-qe),lt=at&&H.refreshedUponExpiration?1:n.ad(at?Ae:1-Be,0,1);return H.refreshedUponExpiration&&Ae>=1&&(H.refreshedUponExpiration=!1),O?{opacity:1,mix:1-lt}:{opacity:lt,mix:0}}return{opacity:1,mix:0}}const rl=new n.aN(1,0,0,1),il=new n.aN(0,1,0,1),ds=new n.aN(0,0,1,1),ji=new n.aN(1,0,1,1),nd=new n.aN(0,1,1,1);function Fc(H){const O=H.transform.padding;Lc(H,H.transform.height-(O.top||0),3,rl),Lc(H,O.bottom||0,3,il),xo(H,O.left||0,3,ds),xo(H,H.transform.width-(O.right||0),3,ji);const P=H.transform.centerPoint;(function(j,Y,te,de){Sc(j,Y-1,te-10,2,20,de),Sc(j,Y-10,te-1,20,2,de)})(H,P.x,H.transform.height-P.y,nd)}function Lc(H,O,P,j){Sc(H,0,O+P/2,H.transform.width,P,j)}function xo(H,O,P,j){Sc(H,O-P/2,0,P,H.transform.height,j)}function Sc(H,O,P,j,Y,te){const de=H.context,fe=de.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(O*H.pixelRatio,P*H.pixelRatio,j*H.pixelRatio,Y*H.pixelRatio),de.clear({color:te}),fe.disable(fe.SCISSOR_TEST)}function wd(H,O,P){const j=H.context,Y=j.gl,te=P.posMatrix,de=H.useProgram("debug"),fe=bi.disabled,Ae=Qi.disabled,Be=H.colorModeForRenderPass(),Ge="$debug",qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(P);j.activeTexture.set(Y.TEXTURE0);const at=O.getTileByID(P.key).latestRawTileData,lt=at&&at.byteLength||0,ft=Math.floor(lt/1024),kt=O.getTile(P).tileSize,Nt=512/Math.min(kt,512)*(P.overscaledZ/H.transform.zoom)*.5;let Mt=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(Mt+=` => ${P.overscaledZ}`),function(Gt,zt){Gt.initDebugOverlayCanvas();const Xt=Gt.debugOverlayCanvas,Zt=Gt.context.gl,Yt=Gt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Xt.width,Xt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(zt,5,5),Yt.strokeText(zt,5,5),Gt.debugOverlayTexture.update(Xt),Gt.debugOverlayTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE)}(H,`${Mt} ${ft}kB`),de.draw(j,Y.TRIANGLES,fe,Ae,Cs.alphaBlended,ao.disabled,sa(te,n.aN.transparent,Nt),null,Ge,H.debugBuffer,H.quadTriangleIndexBuffer,H.debugSegments),de.draw(j,Y.LINE_STRIP,fe,Ae,Be,ao.disabled,sa(te,n.aN.red),qe,Ge,H.debugBuffer,H.tileBorderIndexBuffer,H.debugSegments)}function oc(H,O,P){const j=H.context,Y=j.gl,te=H.colorModeForRenderPass(),de=new bi(Y.LEQUAL,bi.ReadWrite,H.depthRangeFor3D),fe=H.useProgram("terrain"),Ae=O.getTerrainMesh();j.bindFramebuffer.set(null),j.viewport.set([0,0,H.width,H.height]);for(const Be of P){const Ge=H.renderToTexture.getTexture(Be),qe=O.getTerrainData(Be.tileID);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,Ge.texture);const at=H.transform.calculatePosMatrix(Be.tileID.toUnwrapped()),lt=O.getMeshFrameDelta(H.transform.zoom),ft=H.transform.calculateFogMatrix(Be.tileID.toUnwrapped()),kt=ha(at,lt,ft,H.style.sky,H.transform.pitch);fe.draw(j,Y.TRIANGLES,de,Qi.disabled,te,ao.backCCW,kt,qe,"terrain",Ae.vertexBuffer,Ae.indexBuffer,Ae.segments)}}class Kl{constructor(O,P,j){this.vertexBuffer=O,this.indexBuffer=P,this.segments=j}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class sc{constructor(O,P){this.context=new nc(O),this.transform=P,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=je.maxUnderzooming+je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qa}resize(O,P,j){if(this.width=Math.floor(O*j),this.height=Math.floor(P*j),this.pixelRatio=j,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Y of this.style._order)this.style._layers[Y].resize()}setup(){const O=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=O.createVertexBuffer(P,cn.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const j=new n.aX;j.emplaceBack(0,0),j.emplaceBack(n.X,0),j.emplaceBack(0,n.X),j.emplaceBack(n.X,n.X),this.debugBuffer=O.createVertexBuffer(j,cn.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const Y=new n.$;Y.emplaceBack(0,0,0,0),Y.emplaceBack(n.X,0,n.X,0),Y.emplaceBack(0,n.X,0,n.X),Y.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=O.createVertexBuffer(Y,Ce.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const te=new n.aX;te.emplaceBack(0,0),te.emplaceBack(1,0),te.emplaceBack(0,1),te.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(te,cn.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const de=new n.aZ;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(de);const fe=new n.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(fe);const Ae=this.context.gl;this.stencilClearMode=new Qi({func:Ae.ALWAYS,mask:0},0,255,Ae.ZERO,Ae.ZERO,Ae.ZERO)}clearStencil(){const O=this.context,P=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const j=n.H();n.aQ(j,0,this.width,this.height,0,0,1),n.K(j,j,[P.drawingBufferWidth,P.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,P.TRIANGLES,bi.disabled,this.stencilClearMode,Cs.disabled,ao.disabled,Ia(j),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,P){if(this.currentStencilSource===O.source||!O.isTileClipped()||!P||!P.length)return;this.currentStencilSource=O.source;const j=this.context,Y=j.gl;this.nextStencilID+P.length>256&&this.clearStencil(),j.setColorMode(Cs.disabled),j.setDepthMode(bi.disabled);const te=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const de of P){const fe=this._tileClippingMaskIDs[de.key]=this.nextStencilID++,Ae=this.style.map.terrain&&this.style.map.terrain.getTerrainData(de);te.draw(j,Y.TRIANGLES,bi.disabled,new Qi({func:Y.ALWAYS,mask:0},fe,255,Y.KEEP,Y.KEEP,Y.REPLACE),Cs.disabled,ao.disabled,Ia(de.posMatrix),Ae,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,P=this.context.gl;return new Qi({func:P.NOTEQUAL,mask:255},O,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(O){const P=this.context.gl;return new Qi({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,P.KEEP,P.KEEP,P.REPLACE)}stencilConfigForOverlap(O){const P=this.context.gl,j=O.sort((de,fe)=>fe.overscaledZ-de.overscaledZ),Y=j[j.length-1].overscaledZ,te=j[0].overscaledZ-Y+1;if(te>1){this.currentStencilSource=void 0,this.nextStencilID+te>256&&this.clearStencil();const de={};for(let fe=0;fe<te;fe++)de[fe+Y]=new Qi({func:P.GEQUAL,mask:255},fe+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=te,[de,j]}return[{[Y]:Qi.disabled},j]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new Cs([O.CONSTANT_COLOR,O.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Cs.unblended:Cs.alphaBlended}depthModeForSublayer(O,P,j){if(!this.opaquePassEnabledForLayer())return bi.disabled;const Y=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new bi(j||this.context.gl.LEQUAL,P,[Y,Y])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,P){var j;this.style=O,this.options=P,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(l.now()),this.imageManager.beginFrame();const Y=this.style._order,te=this.style.sourceCaches,de={},fe={},Ae={};for(const Be in te){const Ge=te[Be];Ge.used&&Ge.prepare(this.context),de[Be]=Ge.getVisibleCoordinates(),fe[Be]=de[Be].slice().reverse(),Ae[Be]=Ge.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Be=0;Be<Y.length;Be++){const Ge=Y[Be];if(this.style._layers[Ge].is3D()){this.opaquePassCutoff=Be;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Be of Y){const Ge=this.style._layers[Be];if(!Ge.hasOffscreenPass()||Ge.isHidden(this.transform.zoom))continue;const qe=fe[Ge.source];(Ge.type==="custom"||qe.length)&&this.renderLayer(this,te[Ge.source],Ge,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((j=this.style.stylesheet)===null||j===void 0)&&j.sky&&function(Be,Ge){const qe=Be.context,at=qe.gl,lt=((Gt,zt,Xt)=>({u_sky_color:Gt.properties.get("sky-color"),u_horizon_color:Gt.properties.get("horizon-color"),u_horizon:(zt.height/2+zt.getHorizon())*Xt,u_sky_horizon_blend:Gt.properties.get("sky-horizon-blend")*zt.height/2*Xt}))(Ge,Be.style.map.transform,Be.pixelRatio),ft=new bi(at.LEQUAL,bi.ReadWrite,[0,1]),kt=Qi.disabled,Nt=Be.colorModeForRenderPass(),Mt=Be.useProgram("sky");if(!Ge.mesh){const Gt=new n.aX;Gt.emplaceBack(-1,-1),Gt.emplaceBack(1,-1),Gt.emplaceBack(1,1),Gt.emplaceBack(-1,1);const zt=new n.aY;zt.emplaceBack(0,1,2),zt.emplaceBack(0,2,3),Ge.mesh=new Kl(qe.createVertexBuffer(Gt,cn.members),qe.createIndexBuffer(zt),n.a0.simpleSegment(0,0,Gt.length,zt.length))}Mt.draw(qe,at.TRIANGLES,ft,kt,Nt,ao.disabled,lt,void 0,"sky",Ge.mesh.vertexBuffer,Ge.mesh.indexBuffer,Ge.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Y.length-1;this.currentLayer>=0;this.currentLayer--){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source],qe=de[Be.source];this._renderTileClippingMasks(Be,qe),this.renderLayer(this,Ge,Be,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Y.length;this.currentLayer++){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Be))continue;const qe=(Be.type==="symbol"?Ae:fe)[Be.source];this._renderTileClippingMasks(Be,de[Be.source]),this.renderLayer(this,Ge,Be,qe)}if(this.options.showTileBoundaries){const Be=function(Ge,qe){let at=null;const lt=Object.values(Ge._layers).flatMap(Mt=>Mt.source&&!Mt.isHidden(qe)?[Ge.sourceCaches[Mt.source]]:[]),ft=lt.filter(Mt=>Mt.getSource().type==="vector"),kt=lt.filter(Mt=>Mt.getSource().type!=="vector"),Nt=Mt=>{(!at||at.getSource().maxzoom<Mt.getSource().maxzoom)&&(at=Mt)};return ft.forEach(Mt=>Nt(Mt)),at||kt.forEach(Mt=>Nt(Mt)),at}(this.style,this.transform.zoom);Be&&function(Ge,qe,at){for(let lt=0;lt<at.length;lt++)wd(Ge,qe,at[lt])}(this,Be,Be.getVisibleCoordinates())}this.options.showPadding&&Fc(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const P=this.terrainFacilitator.matrix,j=this.transform.modelViewProjectionMatrix;let Y=this.terrainFacilitator.dirty;Y||(Y=O?!n.a_(P,j):!n.a$(P,j)),Y||(Y=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Y&&(n.b0(P,j),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(te,de){const fe=te.context,Ae=fe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.sourceCache.getRenderableTiles(),lt=te.useProgram("terrainDepth");fe.bindFramebuffer.set(de.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),fe.clear({color:n.aN.transparent,depth:1});for(const ft of at){const kt=de.getTerrainData(ft.tileID),Nt={u_matrix:te.transform.calculatePosMatrix(ft.tileID.toUnwrapped()),u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};lt.draw(fe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Nt,kt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain),function(te,de){const fe=te.context,Ae=fe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.getCoordsTexture(),lt=de.sourceCache.getRenderableTiles(),ft=te.useProgram("terrainCoords");fe.bindFramebuffer.set(de.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),fe.clear({color:n.aN.transparent,depth:1}),de.coordsIndex=[];for(const kt of lt){const Nt=de.getTerrainData(kt.tileID);fe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,at.texture);const Mt={u_matrix:te.transform.calculatePosMatrix(kt.tileID.toUnwrapped()),u_terrain_coords_id:(255-de.coordsIndex.length)/255,u_texture:0,u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};ft.draw(fe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Mt,Nt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),de.coordsIndex.push(kt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain))}renderLayer(O,P,j,Y){if(!j.isHidden(this.transform.zoom)&&(j.type==="background"||j.type==="custom"||(Y||[]).length))switch(this.id=j.id,j.type){case"symbol":bl(O,P,j,Y,this.style.placement.variableOffsets);break;case"circle":(function(te,de,fe,Ae){if(te.renderPass!=="translucent")return;const Be=fe.paint.get("circle-opacity"),Ge=fe.paint.get("circle-stroke-width"),qe=fe.paint.get("circle-stroke-opacity"),at=!fe.layout.get("circle-sort-key").isConstant();if(Be.constantOr(1)===0&&(Ge.constantOr(1)===0||qe.constantOr(1)===0))return;const lt=te.context,ft=lt.gl,kt=te.depthModeForSublayer(0,bi.ReadOnly),Nt=Qi.disabled,Mt=te.colorModeForRenderPass(),Gt=[];for(let zt=0;zt<Ae.length;zt++){const Xt=Ae[zt],Zt=de.getTile(Xt),Yt=Zt.getBucket(fe);if(!Yt)continue;const ya=Yt.programConfigurations.get(fe.id),Ca=te.useProgram("circle",ya),La=Yt.layoutVertexBuffer,ja=Yt.indexBuffer,Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Xt),on={programConfiguration:ya,program:Ca,layoutVertexBuffer:La,indexBuffer:ja,uniformValues:za(te,Xt,Zt,fe),terrainData:Wa};if(at){const Tn=Yt.segments.get();for(const Qa of Tn)Gt.push({segments:new n.a0([Qa]),sortKey:Qa.sortKey,state:on})}else Gt.push({segments:Yt.segments,sortKey:0,state:on})}at&&Gt.sort((zt,Xt)=>zt.sortKey-Xt.sortKey);for(const zt of Gt){const{programConfiguration:Xt,program:Zt,layoutVertexBuffer:Yt,indexBuffer:ya,uniformValues:Ca,terrainData:La}=zt.state,ja=zt.segments;Zt.draw(lt,ft.TRIANGLES,kt,Nt,Mt,ao.disabled,Ca,La,fe.id,Yt,ya,ja,fe.paint,te.transform.zoom,Xt)}})(O,P,j,Y);break;case"heatmap":ic(O,P,j,Y);break;case"line":(function(te,de,fe,Ae){if(te.renderPass!=="translucent")return;const Be=fe.paint.get("line-opacity"),Ge=fe.paint.get("line-width");if(Be.constantOr(1)===0||Ge.constantOr(1)===0)return;const qe=te.depthModeForSublayer(0,bi.ReadOnly),at=te.colorModeForRenderPass(),lt=fe.paint.get("line-dasharray"),ft=fe.paint.get("line-pattern"),kt=ft.constantOr(1),Nt=fe.paint.get("line-gradient"),Mt=fe.getCrossfadeParameters(),Gt=kt?"linePattern":lt?"lineSDF":Nt?"lineGradient":"line",zt=te.context,Xt=zt.gl;let Zt=!0;for(const Yt of Ae){const ya=de.getTile(Yt);if(kt&&!ya.patternsLoaded())continue;const Ca=ya.getBucket(fe);if(!Ca)continue;const La=Ca.programConfigurations.get(fe.id),ja=te.context.program.get(),Wa=te.useProgram(Gt,La),on=Zt||Wa.program!==ja,Tn=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Yt),Qa=ft.constantOr(null);if(Qa&&ya.imageAtlas){const Ln=ya.imageAtlas,fn=Ln.patternPositions[Qa.to.toString()],Mn=Ln.patternPositions[Qa.from.toString()];fn&&Mn&&La.setConstantPatternPositions(fn,Mn)}const Sn=Tn?Yt:null,kn=kt?Va(te,ya,fe,Mt,Sn):lt?en(te,ya,fe,lt,Mt,Sn):Nt?ga(te,ya,fe,Ca.lineClipsArray.length,Sn):ea(te,ya,fe,Sn);if(kt)zt.activeTexture.set(Xt.TEXTURE0),ya.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),La.updatePaintBuffers(Mt);else if(lt&&(on||te.lineAtlas.dirty))zt.activeTexture.set(Xt.TEXTURE0),te.lineAtlas.bind(zt);else if(Nt){const Ln=Ca.gradients[fe.id];let fn=Ln.texture;if(fe.gradientVersion!==Ln.version){let Mn=256;if(fe.stepInterpolant){const Wn=de.getSource().maxzoom,In=Yt.canonical.z===Wn?Math.ceil(1<<te.transform.maxZoom-Yt.canonical.z):1,Hn=Ca.maxLineLength/n.X*1024*In;Mn=n.ad(n.aV(Hn),256,zt.maxTextureSize)}Ln.gradient=n.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mn,image:Ln.gradient||void 0,clips:Ca.lineClipsArray}),Ln.texture?Ln.texture.update(Ln.gradient):Ln.texture=new I(zt,Ln.gradient,Xt.RGBA),Ln.version=fe.gradientVersion,fn=Ln.texture}zt.activeTexture.set(Xt.TEXTURE0),fn.bind(fe.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Wa.draw(zt,Xt.TRIANGLES,qe,te.stencilModeForClipping(Yt),at,ao.disabled,kn,Tn,fe.id,Ca.layoutVertexBuffer,Ca.indexBuffer,Ca.segments,fe.paint,te.transform.zoom,La,Ca.layoutVertexBuffer2),Zt=!1}})(O,P,j,Y);break;case"fill":(function(te,de,fe,Ae){const Be=fe.paint.get("fill-color"),Ge=fe.paint.get("fill-opacity");if(Ge.constantOr(1)===0)return;const qe=te.colorModeForRenderPass(),at=fe.paint.get("fill-pattern"),lt=te.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Be.constantOr(n.aN.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(te.renderPass===lt){const ft=te.depthModeForSublayer(1,te.renderPass==="opaque"?bi.ReadWrite:bi.ReadOnly);Hc(te,de,fe,Ae,ft,qe,!1)}if(te.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const ft=te.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,bi.ReadOnly);Hc(te,de,fe,Ae,ft,qe,!0)}})(O,P,j,Y);break;case"fill-extrusion":(function(te,de,fe,Ae){const Be=fe.paint.get("fill-extrusion-opacity");if(Be!==0&&te.renderPass==="translucent"){const Ge=new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D);if(Be!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))Wc(te,de,fe,Ae,Ge,Qi.disabled,Cs.disabled),Wc(te,de,fe,Ae,Ge,te.stencilModeFor3D(),te.colorModeForRenderPass());else{const qe=te.colorModeForRenderPass();Wc(te,de,fe,Ae,Ge,Qi.disabled,qe)}}})(O,P,j,Y);break;case"hillshade":(function(te,de,fe,Ae){if(te.renderPass!=="offscreen"&&te.renderPass!=="translucent")return;const Be=te.context,Ge=te.depthModeForSublayer(0,bi.ReadOnly),qe=te.colorModeForRenderPass(),[at,lt]=te.renderPass==="translucent"?te.stencilConfigForOverlap(Ae):[{},Ae];for(const ft of lt){const kt=de.getTile(ft);kt.needsHillshadePrepare!==void 0&&kt.needsHillshadePrepare&&te.renderPass==="offscreen"?xd(te,kt,fe,Ge,Qi.disabled,qe):te.renderPass==="translucent"&&Cc(te,ft,kt,fe,Ge,at[ft.overscaledZ],qe)}Be.viewport.set([0,0,te.width,te.height])})(O,P,j,Y);break;case"raster":(function(te,de,fe,Ae){if(te.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!Ae.length)return;const Be=te.context,Ge=Be.gl,qe=de.getSource(),at=te.useProgram("raster"),lt=te.colorModeForRenderPass(),[ft,kt]=qe instanceof ye?[{},Ae]:te.stencilConfigForOverlap(Ae),Nt=kt[kt.length-1].overscaledZ,Mt=!te.options.moving;for(const Gt of kt){const zt=te.depthModeForSublayer(Gt.overscaledZ-Nt,fe.paint.get("raster-opacity")===1?bi.ReadWrite:bi.ReadOnly,Ge.LESS),Xt=de.getTile(Gt);Xt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Zt=de.findLoadedParent(Gt,0),Yt=de.findLoadedSibling(Gt),ya=zs(Xt,Zt||Yt||null,de,fe,te.transform,te.style.map.terrain);let Ca,La;const ja=fe.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;Be.activeTexture.set(Ge.TEXTURE0),Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Be.activeTexture.set(Ge.TEXTURE1),Zt?(Zt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Ca=Math.pow(2,Zt.tileID.overscaledZ-Xt.tileID.overscaledZ),La=[Xt.tileID.canonical.x*Ca%1,Xt.tileID.canonical.y*Ca%1]):Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Be.extTextureFilterAnisotropic&&te.transform.pitch>20&&Ge.texParameterf(Ge.TEXTURE_2D,Be.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Be.extTextureFilterAnisotropicMax);const Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Gt),on=Wa?Gt:null,Tn=on?on.posMatrix:te.transform.calculatePosMatrix(Gt.toUnwrapped(),Mt),Qa=_n(Tn,La||[0,0],Ca||1,ya,fe);qe instanceof ye?at.draw(Be,Ge.TRIANGLES,zt,Qi.disabled,lt,ao.disabled,Qa,Wa,fe.id,qe.boundsBuffer,te.quadTriangleIndexBuffer,qe.boundsSegments):at.draw(Be,Ge.TRIANGLES,zt,ft[Gt.overscaledZ],lt,ao.disabled,Qa,Wa,fe.id,te.rasterBoundsBuffer,te.quadTriangleIndexBuffer,te.rasterBoundsSegments)}})(O,P,j,Y);break;case"background":(function(te,de,fe,Ae){const Be=fe.paint.get("background-color"),Ge=fe.paint.get("background-opacity");if(Ge===0)return;const qe=te.context,at=qe.gl,lt=te.transform,ft=lt.tileSize,kt=fe.paint.get("background-pattern");if(te.isPatternMissing(kt))return;const Nt=!kt&&Be.a===1&&Ge===1&&te.opaquePassEnabledForLayer()?"opaque":"translucent";if(te.renderPass!==Nt)return;const Mt=Qi.disabled,Gt=te.depthModeForSublayer(0,Nt==="opaque"?bi.ReadWrite:bi.ReadOnly),zt=te.colorModeForRenderPass(),Xt=te.useProgram(kt?"backgroundPattern":"background"),Zt=Ae||lt.coveringTiles({tileSize:ft,terrain:te.style.map.terrain});kt&&(qe.activeTexture.set(at.TEXTURE0),te.imageManager.bind(te.context));const Yt=fe.getCrossfadeParameters();for(const ya of Zt){const Ca=Ae?ya.posMatrix:te.transform.calculatePosMatrix(ya.toUnwrapped()),La=kt?qn(Ca,Ge,te,kt,{tileID:ya,tileSize:ft},Yt):Nn(Ca,Ge,Be),ja=te.style.map.terrain&&te.style.map.terrain.getTerrainData(ya);Xt.draw(qe,at.TRIANGLES,Gt,Mt,zt,ao.disabled,La,ja,fe.id,te.tileExtentBuffer,te.quadTriangleIndexBuffer,te.tileExtentSegments)}})(O,0,j,Y);break;case"custom":(function(te,de,fe){const Ae=te.context,Be=fe.implementation;if(te.renderPass==="offscreen"){const Ge=Be.prerender;Ge&&(te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ge.call(Be,Ae.gl,te.transform.customLayerMatrix()),Ae.setDirty(),te.setBaseState())}else if(te.renderPass==="translucent"){te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ae.setStencilMode(Qi.disabled);const Ge=Be.renderingMode==="3d"?new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D):te.depthModeForSublayer(0,bi.ReadOnly);Ae.setDepthMode(Ge),Be.render(Ae.gl,te.transform.customLayerMatrix(),{farZ:te.transform.farZ,nearZ:te.transform.nearZ,fov:te.transform._fov,modelViewProjectionMatrix:te.transform.modelViewProjectionMatrix,projectionMatrix:te.transform.projectionMatrix}),Ae.setDirty(),te.setBaseState(),Ae.bindFramebuffer.set(null)}})(O,0,j)}}translatePosMatrix(O,P,j,Y,te){if(!j[0]&&!j[1])return O;const de=te?Y==="map"?this.transform.angle:0:Y==="viewport"?-this.transform.angle:0;if(de){const Be=Math.sin(de),Ge=Math.cos(de);j=[j[0]*Ge-j[1]*Be,j[0]*Be+j[1]*Ge]}const fe=[te?j[0]:yt(P,j[0],this.transform.zoom),te?j[1]:yt(P,j[1],this.transform.zoom),0],Ae=new Float32Array(16);return n.J(Ae,O,fe),Ae}saveTileTexture(O){const P=this._tileTextures[O.size[0]];P?P.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const P=this._tileTextures[O];return P&&P.length>0?P.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const P=this.imageManager.getPattern(O.from.toString()),j=this.imageManager.getPattern(O.to.toString());return!P||!j}useProgram(O,P){this.cache=this.cache||{};const j=O+(P?P.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[j]||(this.cache[j]=new Ya(this.context,hn[O],P,Dn[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const O=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,O.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:P}=this.context.gl;return this.width!==O||this.height!==P}}class ol{constructor(O,P){this.points=O,this.planes=P}static fromInvProjectionMatrix(O,P,j){const Y=Math.pow(2,j),te=[[-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(fe=>{const Ae=1/(fe=n.ag([],fe,O))[3]/P*Y;return n.b1(fe,fe,[Ae,Ae,1/fe[3],Ae])}),de=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const Ae=function(at,lt){var ft=lt[0],kt=lt[1],Nt=lt[2],Mt=ft*ft+kt*kt+Nt*Nt;return Mt>0&&(Mt=1/Math.sqrt(Mt)),at[0]=lt[0]*Mt,at[1]=lt[1]*Mt,at[2]=lt[2]*Mt,at}([],function(at,lt,ft){var kt=lt[0],Nt=lt[1],Mt=lt[2],Gt=ft[0],zt=ft[1],Xt=ft[2];return at[0]=Nt*Xt-Mt*zt,at[1]=Mt*Gt-kt*Xt,at[2]=kt*zt-Nt*Gt,at}([],T([],te[fe[0]],te[fe[1]]),T([],te[fe[2]],te[fe[1]]))),Be=(Ge=Ae,qe=te[fe[1]],-(Ge[0]*qe[0]+Ge[1]*qe[1]+Ge[2]*qe[2]));var Ge,qe;return Ae.concat(Be)});return new ol(te,de)}}class js{constructor(O,P){this.min=O,this.max=P,this.center=function(j,Y,te){return j[0]=Y[0]*te,j[1]=Y[1]*te,j[2]=Y[2]*te,j}([],function(j,Y,te){return j[0]=Y[0]+te[0],j[1]=Y[1]+te[1],j[2]=Y[2]+te[2],j}([],this.min,this.max),.5)}quadrant(O){const P=[O%2==0,O<2],j=S(this.min),Y=S(this.max);for(let te=0;te<P.length;te++)j[te]=P[te]?this.min[te]:this.center[te],Y[te]=P[te]?this.center[te]:this.max[te];return Y[2]=this.max[2],new js(j,Y)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){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 j=!0;for(let Y=0;Y<O.planes.length;Y++){const te=O.planes[Y];let de=0;for(let fe=0;fe<P.length;fe++)n.b2(te,P[fe])>=0&&de++;if(de===0)return 0;de!==P.length&&(j=!1)}if(j)return 2;for(let Y=0;Y<3;Y++){let te=Number.MAX_VALUE,de=-Number.MAX_VALUE;for(let fe=0;fe<O.points.length;fe++){const Ae=O.points[fe][Y]-this.min[Y];te=Math.min(te,Ae),de=Math.max(de,Ae)}if(de<0||te>this.max[Y]-this.min[Y])return 0}return 1}}class Ql{constructor(O=0,P=0,j=0,Y=0){if(isNaN(O)||O<0||isNaN(P)||P<0||isNaN(j)||j<0||isNaN(Y)||Y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=P,this.left=j,this.right=Y}interpolate(O,P,j){return P.top!=null&&O.top!=null&&(this.top=n.z.number(O.top,P.top,j)),P.bottom!=null&&O.bottom!=null&&(this.bottom=n.z.number(O.bottom,P.bottom,j)),P.left!=null&&O.left!=null&&(this.left=n.z.number(O.left,P.left,j)),P.right!=null&&O.right!=null&&(this.right=n.z.number(O.right,P.right,j)),this}getCenter(O,P){const j=n.ad((this.left+O-this.right)/2,0,O),Y=n.ad((this.top+P-this.bottom)/2,0,P);return new n.P(j,Y)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new Ql(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 oi{constructor(O,P,j,Y,te){this.tileSize=512,this._renderWorldCopies=te===void 0||!!te,this._minZoom=O||0,this._maxZoom=P||22,this._minPitch=j??0,this._maxPitch=Y??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 Ql,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}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(O){const P=-n.b3(O,-180,180)*Math.PI/180;this.angle!==P&&(this._unmodified=!1,this.angle=P,this._calcMatrices(),this.rotationMatrix=function(){var j=new n.A(4);return n.A!=Float32Array&&(j[1]=0,j[2]=0),j[0]=1,j[3]=1,j}(),function(j,Y,te){var de=Y[0],fe=Y[1],Ae=Y[2],Be=Y[3],Ge=Math.sin(te),qe=Math.cos(te);j[0]=de*qe+Ae*Ge,j[1]=fe*qe+Be*Ge,j[2]=de*-Ge+Ae*qe,j[3]=fe*-Ge+Be*qe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const P=n.ad(O,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(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const P=Math.min(Math.max(O,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(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,P,j){this._unmodified=!1,this._edgeInsets.interpolate(O,P,j),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const P=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,P)}getVisibleUnwrappedCoordinates(O){const P=[new n.b4(0,O)];if(this._renderWorldCopies){const j=this.pointCoordinate(new n.P(0,0)),Y=this.pointCoordinate(new n.P(this.width,0)),te=this.pointCoordinate(new n.P(this.width,this.height)),de=this.pointCoordinate(new n.P(0,this.height)),fe=Math.floor(Math.min(j.x,Y.x,te.x,de.x)),Ae=Math.floor(Math.max(j.x,Y.x,te.x,de.x)),Be=1;for(let Ge=fe-Be;Ge<=Ae+Be;Ge++)Ge!==0&&P.push(new n.b4(Ge,O))}return P}coveringTiles(O){var P,j;let Y=this.coveringZoomLevel(O);const te=Y;if(O.minzoom!==void 0&&Y<O.minzoom)return[];O.maxzoom!==void 0&&Y>O.maxzoom&&(Y=O.maxzoom);const de=this.pointCoordinate(this.getCameraPoint()),fe=n.Z.fromLngLat(this.center),Ae=Math.pow(2,Y),Be=[Ae*de.x,Ae*de.y,0],Ge=[Ae*fe.x,Ae*fe.y,0],qe=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Y);let at=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=Y);const lt=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,ft=zt=>({aabb:new js([zt*Ae,0,0],[(zt+1)*Ae,Ae,0]),zoom:0,x:0,y:0,wrap:zt,fullyVisible:!1}),kt=[],Nt=[],Mt=Y,Gt=O.reparseOverscaled?te:Y;if(this._renderWorldCopies)for(let zt=1;zt<=3;zt++)kt.push(ft(-zt)),kt.push(ft(zt));for(kt.push(ft(0));kt.length>0;){const zt=kt.pop(),Xt=zt.x,Zt=zt.y;let Yt=zt.fullyVisible;if(!Yt){const on=zt.aabb.intersects(qe);if(on===0)continue;Yt=on===2}const ya=O.terrain?Be:Ge,Ca=zt.aabb.distanceX(ya),La=zt.aabb.distanceY(ya),ja=Math.max(Math.abs(Ca),Math.abs(La)),Wa=lt+(1<<Mt-zt.zoom)-2;if(zt.zoom===Mt||ja>Wa&&zt.zoom>=at){const on=Mt-zt.zoom,Tn=Be[0]-.5-(Xt<<on),Qa=Be[1]-.5-(Zt<<on);Nt.push({tileID:new n.S(zt.zoom===Mt?Gt:zt.zoom,zt.wrap,zt.zoom,Xt,Zt),distanceSq:C([Ge[0]-.5-Xt,Ge[1]-.5-Zt]),tileDistanceToCamera:Math.sqrt(Tn*Tn+Qa*Qa)})}else for(let on=0;on<4;on++){const Tn=(Xt<<1)+on%2,Qa=(Zt<<1)+(on>>1),Sn=zt.zoom+1;let kn=zt.aabb.quadrant(on);if(O.terrain){const Ln=new n.S(Sn,zt.wrap,Sn,Tn,Qa),fn=O.terrain.getMinMaxElevation(Ln),Mn=(P=fn.minElevation)!==null&&P!==void 0?P:this.elevation,Wn=(j=fn.maxElevation)!==null&&j!==void 0?j:this.elevation;kn=new js([kn.min[0],kn.min[1],Mn],[kn.max[0],kn.max[1],Wn])}kt.push({aabb:kn,zoom:Sn,x:Tn,y:Qa,wrap:zt.wrap,fullyVisible:Yt})}}return Nt.sort((zt,Xt)=>zt.distanceSq-Xt.distanceSq).map(zt=>zt.tileID)}resize(O,P){this.width=O,this.height=P,this.pixelsToGLUnits=[2/O,-2/P],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const P=n.ad(O.lat,-85.051129,Tc);return new n.P(n.O(O.lng)*this.worldSize,n.Q(P)*this.worldSize)}unproject(O){return new n.Z(O.x/this.worldSize,O.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(O){const P=this.elevation,j=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Y=this.pointLocation(this.centerPoint,O),te=O.getElevationForLngLatZoom(Y,this.tileZoom);if(!(this.elevation-te))return;const de=j+P-te,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/de/n.b5(1,Y.lat)/this.tileSize,Ae=this.scaleZoom(fe);this._elevation=te,this._center=Y,this.zoom=Ae}setLocationAtPoint(O,P){const j=this.pointCoordinate(P),Y=this.pointCoordinate(this.centerPoint),te=this.locationCoordinate(O),de=new n.Z(te.x-(j.x-Y.x),te.y-(j.y-Y.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,P){return P?this.coordinatePoint(this.locationCoordinate(O),P.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,P){return this.coordinateLocation(this.pointCoordinate(O,P))}locationCoordinate(O){return n.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,P){if(P){const ft=P.pointCoordinate(O);if(ft!=null)return ft}const j=[O.x,O.y,0,1],Y=[O.x,O.y,1,1];n.ag(j,j,this.pixelMatrixInverse),n.ag(Y,Y,this.pixelMatrixInverse);const te=j[3],de=Y[3],fe=j[0]/te,Ae=Y[0]/de,Be=j[1]/te,Ge=Y[1]/de,qe=j[2]/te,at=Y[2]/de,lt=qe===at?0:(0-qe)/(at-qe);return new n.Z(n.z.number(fe,Ae,lt)/this.worldSize,n.z.number(Be,Ge,lt)/this.worldSize)}coordinatePoint(O,P=0,j=this.pixelMatrix){const Y=[O.x*this.worldSize,O.y*this.worldSize,P,1];return n.ag(Y,Y,j),new n.P(Y[0]/Y[3],Y[1]/Y[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new xe().extend(this.pointLocation(new n.P(0,O))).extend(this.pointLocation(new n.P(this.width,O))).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 xe([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(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(O){const P=O.canonical,j=this.worldSize/this.zoomScale(P.z),Y=P.x+Math.pow(2,P.z)*O.wrap,te=n.ao(new Float64Array(16));return n.J(te,te,[Y*j,P.y*j,0]),n.K(te,te,[j/n.X,j/n.X,1]),te}calculatePosMatrix(O,P=!1){const j=O.key,Y=P?this._alignedPosMatrixCache:this._posMatrixCache;if(Y[j])return Y[j];const te=this.calculateTileMatrix(O);return n.L(te,P?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,te),Y[j]=new Float32Array(te),Y[j]}calculateFogMatrix(O){const P=O.key,j=this._fogMatrixCache;if(j[P])return j[P];const Y=this.calculateTileMatrix(O);return n.L(Y,this.fogMatrix,Y),j[P]=new Float32Array(Y),j[P]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,P){P=n.ad(+P,this.minZoom,this.maxZoom);const j={center:new n.N(O.lng,O.lat),zoom:P};let Y=this.lngRange;if(!this._renderWorldCopies&&Y===null){const zt=179.9999999999;Y=[-zt,zt]}const te=this.tileSize*this.zoomScale(j.zoom);let de=0,fe=te,Ae=0,Be=te,Ge=0,qe=0;const{x:at,y:lt}=this.size;if(this.latRange){const zt=this.latRange;de=n.Q(zt[1])*te,fe=n.Q(zt[0])*te,fe-de<lt&&(Ge=lt/(fe-de))}Y&&(Ae=n.b3(n.O(Y[0])*te,0,te),Be=n.b3(n.O(Y[1])*te,0,te),Be<Ae&&(Be+=te),Be-Ae<at&&(qe=at/(Be-Ae)));const{x:ft,y:kt}=this.project.call({worldSize:te},O);let Nt,Mt;const Gt=Math.max(qe||0,Ge||0);if(Gt){const zt=new n.P(qe?(Be+Ae)/2:ft,Ge?(fe+de)/2:kt);return j.center=this.unproject.call({worldSize:te},zt).wrap(),j.zoom+=this.scaleZoom(Gt),j}if(this.latRange){const zt=lt/2;kt-zt<de&&(Mt=de+zt),kt+zt>fe&&(Mt=fe-zt)}if(Y){const zt=(Ae+Be)/2;let Xt=ft;this._renderWorldCopies&&(Xt=n.b3(ft,zt-te/2,zt+te/2));const Zt=at/2;Xt-Zt<Ae&&(Nt=Ae+Zt),Xt+Zt>Be&&(Nt=Be-Zt)}if(Nt!==void 0||Mt!==void 0){const zt=new n.P(Nt??ft,Mt??kt);j.center=this.unproject.call({worldSize:te},zt).wrap()}return j}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:P,zoom:j}=this.getConstrained(this.center,this.zoom);this.center=P,this.zoom=j,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this._fov/2,P=this.centerOffset,j=this.point.x,Y=this.point.y;this.cameraToCenterDistance=.5/Math.tan(O)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let te=n.ao(new Float64Array(16));n.K(te,te,[this.width/2,-this.height/2,1]),n.J(te,te,[1,-1,0]),this.labelPlaneMatrix=te,te=n.ao(new Float64Array(16)),n.K(te,te,[1,-1,1]),n.J(te,te,[-1,-1,0]),n.K(te,te,[2/this.width,2/this.height,1]),this.glCoordMatrix=te;const de=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),Ae=de-fe*this._pixelPerMeter/Math.cos(this._pitch),Be=fe<0?Ae:de,Ge=Math.PI/2+this._pitch,qe=this._fov*(.5+P.y/this.height),at=Math.sin(qe)*Be/Math.sin(n.ad(Math.PI-Ge-qe,.01,Math.PI-.01)),lt=this.getHorizon(),ft=2*Math.atan(lt/this.cameraToCenterDistance)*(.5+P.y/(2*lt)),kt=Math.sin(ft)*Be/Math.sin(n.ad(Math.PI-Ge-ft,.01,Math.PI-.01)),Nt=Math.min(at,kt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Nt+Be),this.nearZ=this.height/50,te=new Float64Array(16),n.b6(te,this._fov,this.width/this.height,this.nearZ,this.farZ),te[8]=2*-P.x/this.width,te[9]=2*P.y/this.height,this.projectionMatrix=n.af(te),n.K(te,te,[1,-1,1]),n.J(te,te,[0,0,-this.cameraToCenterDistance]),n.b7(te,te,this._pitch),n.ae(te,te,this.angle),n.J(te,te,[-j,-Y,0]),this.mercatorMatrix=n.K([],te,[this.worldSize,this.worldSize,this.worldSize]),n.K(te,te,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,te),n.J(te,te,[0,0,-this.elevation]),this.modelViewProjectionMatrix=te,this.invModelViewProjectionMatrix=n.at([],te),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,de,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,[-j,-Y,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,te);const Mt=this.width%2/2,Gt=this.height%2/2,zt=Math.cos(this.angle),Xt=Math.sin(this.angle),Zt=j-Math.round(j)+zt*Mt+Xt*Gt,Yt=Y-Math.round(Y)+zt*Gt+Xt*Mt,ya=new Float64Array(te);if(n.J(ya,ya,[Zt>.5?Zt-1:Zt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=ya,te=n.at(new Float64Array(16),this.pixelMatrix),!te)throw new Error("failed to invert matrix");this.pixelMatrixInverse=te,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new n.P(0,0)),P=[O.x*this.worldSize,O.y*this.worldSize,0,1];return n.ag(P,P,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=this._pitch,P=Math.tan(O)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,P))}getCameraQueryGeometry(O){const P=this.getCameraPoint();if(O.length===1)return[O[0],P];{let j=P.x,Y=P.y,te=P.x,de=P.y;for(const fe of O)j=Math.min(j,fe.x),Y=Math.min(Y,fe.y),te=Math.max(te,fe.x),de=Math.max(de,fe.y);return[new n.P(j,Y),new n.P(te,Y),new n.P(te,de),new n.P(j,de),new n.P(j,Y)]}}lngLatToCameraDepth(O,P){const j=this.locationCoordinate(O),Y=[j.x*this.worldSize,j.y*this.worldSize,P,1];return n.ag(Y,Y,this.modelViewProjectionMatrix),Y[2]/Y[3]}}function Us(H,O){let P,j=!1,Y=null,te=null;const de=()=>{Y=null,j&&(H.apply(te,P),Y=setTimeout(de,O),j=!1)};return(...fe)=>(j=!0,te=this,P=fe,Y||de(),Y)}class eo{constructor(O){this._getCurrentHash=()=>{const P=window.location.hash.replace("#","");if(this._hashName){let j;return P.split("&").map(Y=>Y.split("=")).forEach(Y=>{Y[0]===this._hashName&&(j=Y)}),(j&&j[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{const P=this._getCurrentHash();if(P.length>=3&&!P.some(j=>isNaN(j))){const j=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:j,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 j=P.join("/");let Y=j;Y.split("&").length>0&&(Y=Y.split("&")[0]),this._hashName&&(Y=`${this._hashName}=${j}`);let te=window.location.hash.replace(Y,"");te.startsWith("#&")?te=te.slice(0,1)+te.slice(2):te==="#"&&(te="");let de=window.location.href.replace(/(#.+)?$/,te);de=de.replace("&&","&"),window.history.replaceState(window.history.state,null,de)},this._updateHash=Us(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,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(O){const P=this._map.getCenter(),j=Math.round(100*this._map.getZoom())/100,Y=Math.ceil((j*Math.LN2+Math.log(512/360/.5))/Math.LN10),te=Math.pow(10,Y),de=Math.round(P.lng*te)/te,fe=Math.round(P.lat*te)/te,Ae=this._map.getBearing(),Be=this._map.getPitch();let Ge="";if(Ge+=O?`/${de}/${fe}/${j}`:`${j}/${fe}/${de}`,(Ae||Be)&&(Ge+="/"+Math.round(10*Ae)/10),Be&&(Ge+=`/${Math.round(Be)}`),this._hashName){const qe=this._hashName;let at=!1;const lt=window.location.hash.slice(1).split("&").map(ft=>{const kt=ft.split("=")[0];return kt===qe?(at=!0,`${kt}=${Ge}`):ft}).filter(ft=>ft);return at||lt.push(`${qe}=${Ge}`),`#${lt.join("&")}`}return`#${Ge}`}}const Oo={linearity:.3,easing:n.b8(0,0,.3,1)},ai=n.e({deceleration:2500,maxSpeed:1400},Oo),ii=n.e({deceleration:20,maxSpeed:1400},Oo),Ro=n.e({deceleration:1e3,maxSpeed:360},Oo),pc=n.e({deceleration:1e3,maxSpeed:90},Oo);class fc{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,P=l.now();for(;O.length>0&&P-O[0].time>160;)O.shift()}_onMoveEnd(O){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:te}of this._inertiaBuffer)P.zoom+=te.zoomDelta||0,P.bearing+=te.bearingDelta||0,P.pitch+=te.pitchDelta||0,te.panDelta&&P.pan._add(te.panDelta),te.around&&(P.around=te.around),te.pinchAround&&(P.pinchAround=te.pinchAround);const j=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Y={};if(P.pan.mag()){const te=lc(P.pan.mag(),j,n.e({},ai,O||{}));Y.offset=P.pan.mult(te.amount/P.pan.mag()),Y.center=this._map.transform.center,mc(Y,te)}if(P.zoom){const te=lc(P.zoom,j,ii);Y.zoom=this._map.transform.zoom+te.amount,mc(Y,te)}if(P.bearing){const te=lc(P.bearing,j,Ro);Y.bearing=this._map.transform.bearing+n.ad(te.amount,-179,179),mc(Y,te)}if(P.pitch){const te=lc(P.pitch,j,pc);Y.pitch=this._map.transform.pitch+te.amount,mc(Y,te)}if(Y.zoom||Y.bearing){const te=P.pinchAround===void 0?P.around:P.pinchAround;Y.around=te?this._map.unproject(te):this._map.getCenter()}return this.clear(),n.e(Y,{noMoveStart:!0})}}function mc(H,O){(!H.duration||H.duration<O.duration)&&(H.duration=O.duration,H.easing=O.easing)}function lc(H,O,P){const{maxSpeed:j,linearity:Y,deceleration:te}=P,de=n.ad(H*Y/(O/1e3),-j,j),fe=Math.abs(de)/(te*Y);return{easing:P.easing,duration:1e3*fe,amount:de*(fe/2)}}class gs extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j,Y={}){const te=o.mousePos(P.getCanvas(),j),de=P.unproject(te);super(O,n.e({point:te,lngLat:de,originalEvent:j},Y)),this._defaultPrevented=!1,this.target=P}}class wo extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){const Y=O==="touchend"?j.changedTouches:j.touches,te=o.touchPos(P.getCanvasContainer(),Y),de=te.map(Ae=>P.unproject(Ae)),fe=te.reduce((Ae,Be,Ge,qe)=>Ae.add(Be.div(qe.length)),new n.P(0,0));super(O,{points:te,point:fe,lngLats:de,lngLat:P.unproject(fe),originalEvent:j}),this._defaultPrevented=!1}}class sl extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){super(O,{originalEvent:j}),this._defaultPrevented=!1}}class jl{constructor(O,P){this._map=O,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new sl(O.type,this._map,O))}mousedown(O,P){return this._mousedownPos=P,this._firePreventable(new gs(O.type,this._map,O))}mouseup(O){this._map.fire(new gs(O.type,this._map,O))}click(O,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new gs(O.type,this._map,O))}dblclick(O){return this._firePreventable(new gs(O.type,this._map,O))}mouseover(O){this._map.fire(new gs(O.type,this._map,O))}mouseout(O){this._map.fire(new gs(O.type,this._map,O))}touchstart(O){return this._firePreventable(new wo(O.type,this._map,O))}touchmove(O){this._map.fire(new wo(O.type,this._map,O))}touchend(O){this._map.fire(new wo(O.type,this._map,O))}touchcancel(O){this._map.fire(new wo(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class co{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new gs(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gs("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new gs(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class no{constructor(O){this._map=O}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(O){return this.transform.pointLocation(n.P.convert(O),this._map.terrain)}}class ko{constructor(O,P){this._map=O,this._tr=new no(O),this._el=O.getCanvasContainer(),this._container=O.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(O,P){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(O,P){if(!this._active)return;const j=P;if(this._lastPos.equals(j)||!this._box&&j.dist(this._startPos)<this._clickTolerance)return;const Y=this._startPos;this._lastPos=j,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const te=Math.min(Y.x,j.x),de=Math.max(Y.x,j.x),fe=Math.min(Y.y,j.y),Ae=Math.max(Y.y,j.y);o.setTransform(this._box,`translate(${te}px,${fe}px)`),this._box.style.width=de-te+"px",this._box.style.height=Ae-fe+"px"}mouseupWindow(O,P){if(!this._active||O.button!==0)return;const j=this._startPos,Y=P;if(this.reset(),o.suppressClick(),j.x!==Y.x||j.y!==Y.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:O})),{cameraAnimation:te=>te.fitScreenCoordinates(j,Y,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,P){return this._map.fire(new n.k(O,{originalEvent:P}))}}function Ei(H,O){if(H.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${H.length}, points ${O.length}`);const P={};for(let j=0;j<H.length;j++)P[H[j].identifier]=O[j];return P}class Yi{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,P,j){(this.centroid||j.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),j.length===this.numTouches&&(this.centroid=function(Y){const te=new n.P(0,0);for(const de of Y)te._add(de);return te.div(Y.length)}(P),this.touches=Ei(j,P)))}touchmove(O,P,j){if(this.aborted||!this.centroid)return;const Y=Ei(j,P);for(const te in this.touches){const de=this.touches[te],fe=Y[te];(!fe||fe.dist(de)>30)&&(this.aborted=!0)}}touchend(O,P,j){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),j.length===0){const Y=!this.aborted&&this.centroid;if(this.reset(),Y)return Y}}}class ui{constructor(O){this.singleTap=new Yi(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,P,j){this.singleTap.touchstart(O,P,j)}touchmove(O,P,j){this.singleTap.touchmove(O,P,j)}touchend(O,P,j){const Y=this.singleTap.touchend(O,P,j);if(Y){const te=O.timeStamp-this.lastTime<500,de=!this.lastTap||this.lastTap.dist(Y)<30;if(te&&de||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Y,this.count===this.numTaps)return this.reset(),Y}}}class Ji{constructor(O){this._tr=new no(O),this._zoomIn=new ui({numTouches:1,numTaps:2}),this._zoomOut=new ui({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,P,j){this._zoomIn.touchstart(O,P,j),this._zoomOut.touchstart(O,P,j)}touchmove(O,P,j){this._zoomIn.touchmove(O,P,j),this._zoomOut.touchmove(O,P,j)}touchend(O,P,j){const Y=this._zoomIn.touchend(O,P,j),te=this._zoomOut.touchend(O,P,j),de=this._tr;return Y?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:de.zoom+1,around:de.unproject(Y)},{originalEvent:O})}):te?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:de.zoom-1,around:de.unproject(te)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eo{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const P=this._moveFunction(...O);if(P.bearingDelta||P.pitchDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(O,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=P.length?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,P){if(!this.isEnabled())return;const j=this._lastPoint;if(!j)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Y=P.length?P[0]:P;return!this._moved&&Y.dist(j)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Y,this._move(j,Y))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const xl={0:1,2:2};class Vo{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const P=o.mouseButton(O);this._eventButton=P}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!function(P,j){const Y=xl[j];return P.buttons===void 0||(P.buttons&Y)!==Y}(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class wl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){const P=O.targetTouches[0].identifier;this._firstTouch=P}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const uo=H=>{H.mousedown=H.dragStart,H.mousemoveWindow=H.dragMove,H.mouseup=H.dragEnd,H.contextmenu=O=>{O.preventDefault()}},Ul=({enable:H,clickTolerance:O,bearingDegreesPerPixelMoved:P=.8})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({bearingDelta:(te.x-Y.x)*P}),moveStateManager:j,enable:H,assignEvents:uo})},Gs=({enable:H,clickTolerance:O,pitchDegreesPerPixelMoved:P=-.5})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({pitchDelta:(te.y-Y.y)*P}),moveStateManager:j,enable:H,assignEvents:uo})};class rs{constructor(O,P){this._clickTolerance=O.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,P,j){return this._calculateTransform(O,P,j)}touchmove(O,P,j){if(this._active){if(!this._shouldBePrevented(j.length))return O.preventDefault(),this._calculateTransform(O,P,j);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,P,j){this._calculateTransform(O,P,j),this._active&&this._shouldBePrevented(j.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,P,j){j.length>0&&(this._active=!0);const Y=Ei(j,P),te=new n.P(0,0),de=new n.P(0,0);let fe=0;for(const Be in Y){const Ge=Y[Be],qe=this._touches[Be];qe&&(te._add(Ge),de._add(Ge.sub(qe)),fe++,Y[Be]=Ge)}if(this._touches=Y,this._shouldBePrevented(fe)||!de.mag())return;const Ae=de.div(fe);return this._sum._add(Ae),this._sum.mag()<this._clickTolerance?void 0:{around:te.div(fe),panDelta:Ae}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,P,j){this._firstTwoTouches||j.length<2||(this._firstTwoTouches=[j[0].identifier,j[1].identifier],this._start([P[0],P[1]]))}touchmove(O,P,j){if(!this._firstTwoTouches)return;O.preventDefault();const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),fe=yi(j,P,te);if(!de||!fe)return;const Ae=this._aroundCenter?null:de.add(fe).div(2);return this._move([de,fe],Ae,O)}touchend(O,P,j){if(!this._firstTwoTouches)return;const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),fe=yi(j,P,te);de&&fe||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function yi(H,O,P){for(let j=0;j<H.length;j++)if(H[j].identifier===P)return O[j]}function us(H,O){return Math.log(H/O)/Math.LN2}class Qn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,P){const j=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(us(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:us(this._distance,j),pinchAround:P}}}function _c(H,O){return 180*H.angleWith(O)/Math.PI}class qc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,P,j){const Y=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:_c(this._vector,Y),pinchAround:P}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const P=25/(Math.PI*this._minDiameter)*360,j=_c(O,this._startVector);return Math.abs(j)<P}}function ll(H){return Math.abs(H.y)>Math.abs(H.x)}class kl extends go{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,P,j){super.touchstart(O,P,j),this._currentTouchCount=j.length}_start(O){this._lastPoints=O,ll(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,P,j){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Y=O[0].sub(this._lastPoints[0]),te=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Y,te,j.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Y.y+te.y)/2*-.5}):void 0}gestureBeginsVertically(O,P,j){if(this._valid!==void 0)return this._valid;const Y=O.mag()>=2,te=P.mag()>=2;if(!Y&&!te)return;if(!Y||!te)return this._firstMove===void 0&&(this._firstMove=j),j-this._firstMove<100&&void 0;const de=O.y>0==P.y>0;return ll(O)&&ll(P)&&de}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class cc{constructor(O){this._tr=new no(O);const P=Cl;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let P=0,j=0,Y=0,te=0,de=0;switch(O.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:O.shiftKey?j=-1:(O.preventDefault(),te=-1);break;case 39:O.shiftKey?j=1:(O.preventDefault(),te=1);break;case 38:O.shiftKey?Y=1:(O.preventDefault(),de=-1);break;case 40:O.shiftKey?Y=-1:(O.preventDefault(),de=1);break;default:return}return this._rotationDisabled&&(j=0,Y=0),{cameraAnimation:fe=>{const Ae=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:jn,zoom:P?Math.round(Ae.zoom)+P*(O.shiftKey?2:1):Ae.zoom,bearing:Ae.bearing+j*this._bearingStep,pitch:Ae.pitch+Y*this._pitchStep,offset:[-te*this._panStep,-de*this._panStep],center:Ae.center},{originalEvent:O})}}}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 jn(H){return H*(2-H)}const Hs=4.000244140625;class Ws{constructor(O,P){this._onTimeout=j=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(j)},this._map=O,this._tr=new no(O),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let P=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const j=l.now(),Y=j-(this._lastWheelEventTime||0);this._lastWheelEventTime=j,P!==0&&P%Hs==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":Y>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Y*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),O.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=O,this._delta-=P,this._active||this._start(O)),O.preventDefault()}_start(O){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=o.mousePos(this._map.getCanvas(),O),j=this._tr;P.y>j.transform.height/2-j.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?j.center:j.unproject(P)):this._around=n.N.convert(j.center),this._aroundPoint=j.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const Ae=this._type==="wheel"&&Math.abs(this._delta)>Hs?this._wheelZoomRate:this._defaultZoomRate;let Be=2/(1+Math.exp(-Math.abs(this._delta*Ae)));this._delta<0&&Be!==0&&(Be=1/Be);const Ge=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(Ge*Be))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const P=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,j=this._startZoom,Y=this._easing;let te,de=!1;const fe=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&j&&Y&&fe){const Ae=Math.min(fe/200,1),Be=Y(Ae);te=n.z.number(j,P,Be),Ae<1?this._frameId||(this._frameId=!0):de=!0}else te=P,de=!0;return this._active=!0,de&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!de,zoomDelta:te-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let P=n.b9;if(this._prevEase){const j=this._prevEase,Y=(l.now()-j.start)/j.duration,te=j.easing(Y+.01)-j.easing(Y),de=.27/Math.sqrt(te*te+1e-4)*.01,fe=Math.sqrt(.0729-de*de);P=n.b8(de,fe,.25,1)}return this._prevEase={start:l.now(),duration:O,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Pi{constructor(O,P){this._clickZoom=O,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 hs{constructor(O){this._tr=new no(O),this.reset()}reset(){this._active=!1}dblclick(O,P){return O.preventDefault(),{cameraAnimation:j=>{j.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(P)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(){this._tap=new ui({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(O,P,j){if(!this._swipePoint)if(this._tapTime){const Y=P[0],te=O.timeStamp-this._tapTime<500,de=this._tapPoint.dist(Y)<30;te&&de?j.length>0&&(this._swipePoint=Y,this._swipeTouch=j[0].identifier):this.reset()}else this._tap.touchstart(O,P,j)}touchmove(O,P,j){if(this._tapTime){if(this._swipePoint){if(j[0].identifier!==this._swipeTouch)return;const Y=P[0],te=Y.y-this._swipePoint.y;return this._swipePoint=Y,O.preventDefault(),this._active=!0,{zoomDelta:te/128}}}else this._tap.touchmove(O,P,j)}touchend(O,P,j){if(this._tapTime)this._swipePoint&&j.length===0&&this.reset();else{const Y=this._tap.touchend(O,P,j);Y&&(this._tapTime=O.timeStamp,this._tapPoint=Y)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class is{constructor(O,P,j){this._el=O,this._mousePan=P,this._touchPan=j}enable(O){this._inertiaOptions=O||{},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 ho{constructor(O,P,j){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=P,this._mousePitch=j}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 Os{constructor(O,P,j,Y){this._el=O,this._touchZoom=P,this._touchRotate=j,this._tapDragZoom=Y,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),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 $o{constructor(O,P){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const j=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Y=document.createElement("div");Y.className="maplibregl-desktop-message",Y.textContent=P,this._container.appendChild(Y);const te=document.createElement("div");te.className="maplibregl-mobile-message",te.textContent=j,this._container.appendChild(te),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.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(O){return O[this._bypassKey]}notifyGestureBlocked(O,P){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:O,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const os=H=>H.zoom||H.drag||H.pitch||H.rotate;class Sl extends n.k{}function zr(H){return H.panDelta&&H.panDelta.mag()||H.zoomDelta||H.bearingDelta||H.pitchDelta}class Kr{constructor(O,P){this.handleWindowEvent=Y=>{this.handleEvent(Y,`${Y.type}Window`)},this.handleEvent=(Y,te)=>{if(Y.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const de=Y.type==="renderFrame"?void 0:Y,fe={needsRenderFrame:!1},Ae={},Be={},Ge=Y.touches,qe=Ge?this._getMapTouches(Ge):void 0,at=qe?o.touchPos(this._map.getCanvas(),qe):o.mousePos(this._map.getCanvas(),Y);for(const{handlerName:kt,handler:Nt,allowed:Mt}of this._handlers){if(!Nt.isEnabled())continue;let Gt;this._blockedByActive(Be,Mt,kt)?Nt.reset():Nt[te||Y.type]&&(Gt=Nt[te||Y.type](Y,at,qe),this.mergeHandlerResult(fe,Ae,Gt,kt,de),Gt&&Gt.needsRenderFrame&&this._triggerRenderFrame()),(Gt||Nt.isActive())&&(Be[kt]=Nt)}const lt={};for(const kt in this._previousActiveHandlers)Be[kt]||(lt[kt]=de);this._previousActiveHandlers=Be,(Object.keys(lt).length||zr(fe))&&(this._changes.push([fe,Ae,lt]),this._triggerRenderFrame()),(Object.keys(Be).length||zr(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ft}=fe;ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ft(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fc(O),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);const j=this._el;this._listeners=[[j,"touchstart",{passive:!0}],[j,"touchmove",{passive:!1}],[j,"touchend",void 0],[j,"touchcancel",void 0],[j,"mousedown",void 0],[j,"mousemove",void 0],[j,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[j,"mouseover",void 0],[j,"mouseout",void 0],[j,"dblclick",void 0],[j,"click",void 0],[j,"keydown",{capture:!1}],[j,"keyup",void 0],[j,"wheel",{passive:!1}],[j,"contextmenu",void 0],[window,"blur",void 0]];for(const[Y,te,de]of this._listeners)o.addEventListener(Y,te,Y===document?this.handleWindowEvent:this.handleEvent,de)}destroy(){for(const[O,P,j]of this._listeners)o.removeEventListener(O,P,O===document?this.handleWindowEvent:this.handleEvent,j)}_addDefaultHandlers(O){const P=this._map,j=P.getCanvasContainer();this._add("mapEvent",new jl(P,O));const Y=P.boxZoom=new ko(P,O);this._add("boxZoom",Y),O.interactive&&O.boxZoom&&Y.enable();const te=P.cooperativeGestures=new $o(P,O.cooperativeGestures);this._add("cooperativeGestures",te),O.cooperativeGestures&&te.enable();const de=new Ji(P),fe=new hs(P);P.doubleClickZoom=new Pi(fe,de),this._add("tapZoom",de),this._add("clickZoom",fe),O.interactive&&O.doubleClickZoom&&P.doubleClickZoom.enable();const Ae=new Ss;this._add("tapDragZoom",Ae);const Be=P.touchPitch=new kl(P);this._add("touchPitch",Be),O.interactive&&O.touchPitch&&P.touchPitch.enable(O.touchPitch);const Ge=Ul(O),qe=Gs(O);P.dragRotate=new ho(O,Ge,qe),this._add("mouseRotate",Ge,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),O.interactive&&O.dragRotate&&P.dragRotate.enable();const at=(({enable:Gt,clickTolerance:zt})=>{const Xt=new Vo({checkCorrectEvent:Zt=>o.mouseButton(Zt)===0&&!Zt.ctrlKey});return new Eo({clickTolerance:zt,move:(Zt,Yt)=>({around:Yt,panDelta:Yt.sub(Zt)}),activateOnStart:!0,moveStateManager:Xt,enable:Gt,assignEvents:uo})})(O),lt=new rs(O,P);P.dragPan=new is(j,at,lt),this._add("mousePan",at),this._add("touchPan",lt,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&P.dragPan.enable(O.dragPan);const ft=new qc,kt=new Qn;P.touchZoomRotate=new Os(j,kt,ft,Ae),this._add("touchRotate",ft,["touchPan","touchZoom"]),this._add("touchZoom",kt,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&P.touchZoomRotate.enable(O.touchZoomRotate);const Nt=P.scrollZoom=new Ws(P,()=>this._triggerRenderFrame());this._add("scrollZoom",Nt,["mousePan"]),O.interactive&&O.scrollZoom&&P.scrollZoom.enable(O.scrollZoom);const Mt=P.keyboard=new cc(P);this._add("keyboard",Mt),O.interactive&&O.keyboard&&P.keyboard.enable(),this._add("blockableMapEvent",new co(P))}_add(O,P,j){this._handlers.push({handlerName:O,handler:P,allowed:j}),this._handlersById[O]=P}stop(O){if(!this._updatingCamera){for(const{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!os(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,P,j){for(const Y in O)if(Y!==j&&(!P||P.indexOf(Y)<0))return!0;return!1}_getMapTouches(O){const P=[];for(const j of O){const Y=j.target;this._el.contains(Y)&&P.push(j)}return P}mergeHandlerResult(O,P,j,Y,te){if(!j)return;n.e(O,j);const de={handlerName:Y,originalEvent:j.originalEvent||te};j.zoomDelta!==void 0&&(P.zoom=de),j.panDelta!==void 0&&(P.drag=de),j.pitchDelta!==void 0&&(P.pitch=de),j.bearingDelta!==void 0&&(P.rotate=de)}_applyChanges(){const O={},P={},j={};for(const[Y,te,de]of this._changes)Y.panDelta&&(O.panDelta=(O.panDelta||new n.P(0,0))._add(Y.panDelta)),Y.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Y.zoomDelta),Y.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Y.bearingDelta),Y.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Y.pitchDelta),Y.around!==void 0&&(O.around=Y.around),Y.pinchAround!==void 0&&(O.pinchAround=Y.pinchAround),Y.noInertia&&(O.noInertia=Y.noInertia),n.e(P,te),n.e(j,de);this._updateMapTransform(O,P,j),this._changes=[]}_updateMapTransform(O,P,j){const Y=this._map,te=Y._getTransformForUpdate(),de=Y.terrain;if(!(zr(O)||de&&this._terrainMovement))return this._fireEvents(P,j,!0);let{panDelta:fe,zoomDelta:Ae,bearingDelta:Be,pitchDelta:Ge,around:qe,pinchAround:at}=O;at!==void 0&&(qe=at),Y._stop(!0),qe=qe||Y.transform.centerPoint;const lt=te.pointLocation(fe?qe.sub(fe):qe);Be&&(te.bearing+=Be),Ge&&(te.pitch+=Ge),Ae&&(te.zoom+=Ae),de?this._terrainMovement||!P.drag&&!P.zoom?P.drag&&this._terrainMovement?te.center=te.pointLocation(te.centerPoint.sub(fe)):te.setLocationAtPoint(lt,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,te.setLocationAtPoint(lt,qe)):te.setLocationAtPoint(lt,qe),Y._applyUpdatedTransform(te),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(P,j,!0)}_fireEvents(O,P,j){const Y=os(this._eventsInProgress),te=os(O),de={};for(const qe in O){const{originalEvent:at}=O[qe];this._eventsInProgress[qe]||(de[`${qe}start`]=at),this._eventsInProgress[qe]=O[qe]}!Y&&te&&this._fireEvent("movestart",te.originalEvent);for(const qe in de)this._fireEvent(qe,de[qe]);te&&this._fireEvent("move",te.originalEvent);for(const qe in O){const{originalEvent:at}=O[qe];this._fireEvent(qe,at)}const fe={};let Ae;for(const qe in this._eventsInProgress){const{handlerName:at,originalEvent:lt}=this._eventsInProgress[qe];this._handlersById[at].isActive()||(delete this._eventsInProgress[qe],Ae=P[at]||lt,fe[`${qe}end`]=Ae)}for(const qe in fe)this._fireEvent(qe,fe[qe]);const Be=os(this._eventsInProgress),Ge=(Y||te)&&!Be;if(Ge&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(j&&Ge){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=lt=>lt!==0&&-this._bearingSnap<lt&<<this._bearingSnap;!qe||!qe.essential&&l.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:Ae})),at(this._map.getBearing())&&this._map.resetNorth()):(at(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:Ae})),this._updatingCamera=!1}}_fireEvent(O,P){this._map.fire(new n.k(O,P?{originalEvent:P}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new Sl("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xi extends n.E{constructor(O,P){super(),this._renderFrameCallback=()=>{const j=Math.min((l.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(j)),j<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=P.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,P){return this.jumpTo({center:O},P)}panBy(O,P,j){return O=n.P.convert(O).mult(-1),this.panTo(this.transform.center,n.e({offset:O},P),j)}panTo(O,P,j){return this.easeTo(n.e({center:O},P),j)}getZoom(){return this.transform.zoom}setZoom(O,P){return this.jumpTo({zoom:O},P),this}zoomTo(O,P,j){return this.easeTo(n.e({zoom:O},P),j)}zoomIn(O,P){return this.zoomTo(this.getZoom()+1,O,P),this}zoomOut(O,P){return this.zoomTo(this.getZoom()-1,O,P),this}getBearing(){return this.transform.bearing}setBearing(O,P){return this.jumpTo({bearing:O},P),this}getPadding(){return this.transform.padding}setPadding(O,P){return this.jumpTo({padding:O},P),this}rotateTo(O,P,j){return this.easeTo(n.e({bearing:O},P),j)}resetNorth(O,P){return this.rotateTo(0,n.e({duration:1e3},O),P),this}resetNorthPitch(O,P){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},O),P),this}snapToNorth(O,P){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,P):this}getPitch(){return this.transform.pitch}setPitch(O,P){return this.jumpTo({pitch:O},P),this}cameraForBounds(O,P){O=xe.convert(O);const j=P&&P.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),j,P)}_cameraForBoxAndBearing(O,P,j,Y){const te={top:0,bottom:0,right:0,left:0};if(typeof(Y=n.e({padding:te,offset:[0,0],maxZoom:this.transform.maxZoom},Y)).padding=="number"){const Tn=Y.padding;Y.padding={top:Tn,bottom:Tn,right:Tn,left:Tn}}Y.padding=n.e(te,Y.padding);const de=this.transform,fe=de.padding,Ae=new xe(O,P),Be=de.project(Ae.getNorthWest()),Ge=de.project(Ae.getNorthEast()),qe=de.project(Ae.getSouthEast()),at=de.project(Ae.getSouthWest()),lt=n.ba(-j),ft=Be.rotate(lt),kt=Ge.rotate(lt),Nt=qe.rotate(lt),Mt=at.rotate(lt),Gt=new n.P(Math.max(ft.x,kt.x,Mt.x,Nt.x),Math.max(ft.y,kt.y,Mt.y,Nt.y)),zt=new n.P(Math.min(ft.x,kt.x,Mt.x,Nt.x),Math.min(ft.y,kt.y,Mt.y,Nt.y)),Xt=Gt.sub(zt),Zt=(de.width-(fe.left+fe.right+Y.padding.left+Y.padding.right))/Xt.x,Yt=(de.height-(fe.top+fe.bottom+Y.padding.top+Y.padding.bottom))/Xt.y;if(Yt<0||Zt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ya=Math.min(de.scaleZoom(de.scale*Math.min(Zt,Yt)),Y.maxZoom),Ca=n.P.convert(Y.offset),La=(Y.padding.left-Y.padding.right)/2,ja=(Y.padding.top-Y.padding.bottom)/2,Wa=new n.P(La,ja).rotate(n.ba(j)),on=Ca.add(Wa).mult(de.scale/de.zoomScale(ya));return{center:de.unproject(Be.add(qe).div(2).sub(on)),zoom:ya,bearing:j}}fitBounds(O,P,j){return this._fitInternal(this.cameraForBounds(O,P),P,j)}fitScreenCoordinates(O,P,j,Y,te){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(O)),this.transform.pointLocation(n.P.convert(P)),j,Y),Y,te)}_fitInternal(O,P,j){return O?(delete(P=n.e(O,P)).padding,P.linear?this.easeTo(P,j):this.flyTo(P,j)):this}jumpTo(O,P){this.stop();const j=this._getTransformForUpdate();let Y=!1,te=!1,de=!1;return"zoom"in O&&j.zoom!==+O.zoom&&(Y=!0,j.zoom=+O.zoom),O.center!==void 0&&(j.center=n.N.convert(O.center)),"bearing"in O&&j.bearing!==+O.bearing&&(te=!0,j.bearing=+O.bearing),"pitch"in O&&j.pitch!==+O.pitch&&(de=!0,j.pitch=+O.pitch),O.padding==null||j.isPaddingEqual(O.padding)||(j.padding=O.padding),this._applyUpdatedTransform(j),this.fire(new n.k("movestart",P)).fire(new n.k("move",P)),Y&&this.fire(new n.k("zoomstart",P)).fire(new n.k("zoom",P)).fire(new n.k("zoomend",P)),te&&this.fire(new n.k("rotatestart",P)).fire(new n.k("rotate",P)).fire(new n.k("rotateend",P)),de&&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(O,P,j,Y=0){const te=n.Z.fromLngLat(O,P),de=n.Z.fromLngLat(j,Y),fe=de.x-te.x,Ae=de.y-te.y,Be=de.z-te.z,Ge=Math.hypot(fe,Ae,Be);if(Ge===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(fe,Ae),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ge/this.transform.tileSize),lt=180*Math.atan2(fe,-Ae)/Math.PI;let ft=180*Math.acos(qe/Ge)/Math.PI;return ft=Be<0?90-ft:90+ft,{center:de.toLngLat(),zoom:at,pitch:ft,bearing:lt}}easeTo(O,P){var j;this._stop(!1,O.easeId),((O=n.e({offset:[0,0],duration:500,easing:n.b9},O)).animate===!1||!O.essential&&l.prefersReducedMotion)&&(O.duration=0);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,fe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:fe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.project(ft),Gt=Y.project(kt).sub(Mt),zt=Y.zoomScale(Nt-te);let Xt,Zt;O.around&&(Xt=n.N.convert(O.around),Zt=Y.locationPoint(Xt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nt!==te,this._rotating=this._rotating||de!==Be,this._pitching=this._pitching||Ge!==fe,this._padding=!Y.isPaddingEqual(qe),this._easeId=O.easeId,this._prepareEase(P,O.noMoveStart,Yt),this.terrain&&this._prepareElevation(kt),this._ease(ya=>{if(this._zooming&&(Y.zoom=n.z.number(te,Nt,ya)),this._rotating&&(Y.bearing=n.z.number(de,Be,ya)),this._pitching&&(Y.pitch=n.z.number(fe,Ge,ya)),this._padding&&(Y.interpolatePadding(Ae,qe,ya),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(ya),Xt)Y.setLocationAtPoint(Xt,Zt);else{const Ca=Y.zoomScale(Y.zoom-te),La=Nt>te?Math.min(2,zt):Math.max(.5,zt),ja=Math.pow(La,1-ya),Wa=Y.unproject(Mt.add(Gt.mult(ya*ja)).mult(Ca));Y.setLocationAtPoint(Y.renderWorldCopies?Wa.wrap():Wa,lt)}this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},ya=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P,ya)},O),this}_prepareEase(O,P,j={}){this._moving=!0,P||j.moving||this.fire(new n.k("movestart",O)),this._zooming&&!j.zooming&&this.fire(new n.k("zoomstart",O)),this._rotating&&!j.rotating&&this.fire(new n.k("rotatestart",O)),this._pitching&&!j.pitching&&this.fire(new n.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&P!==this._elevationTarget){const j=this._elevationTarget-this._elevationStart,Y=(P-(j*O+this._elevationStart))/(1-O);this._elevationStart+=O*(j-Y),this._elevationTarget=P}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,O)}_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(O){const P=O.getCameraPosition(),j=this.terrain.getElevationForLngLatZoom(P.lngLat,O.zoom);if(P.altitude<j){const Y=this.calculateCameraOptionsFromTo(P.lngLat,j,O.center,O.elevation);return{pitch:Y.pitch,zoom:Y.zoom}}return{}}_applyUpdatedTransform(O){const P=[];if(this.terrain&&P.push(Y=>this._elevateCameraIfInsideTerrain(Y)),this.transformCameraUpdate&&P.push(Y=>this.transformCameraUpdate(Y)),!P.length)return;const j=O.clone();for(const Y of P){const te=j.clone(),{center:de,zoom:fe,pitch:Ae,bearing:Be,elevation:Ge}=Y(te);de&&(te.center=de),fe!==void 0&&(te.zoom=fe),Ae!==void 0&&(te.pitch=Ae),Be!==void 0&&(te.bearing=Be),Ge!==void 0&&(te.elevation=Ge),j.apply(te)}this.transform.apply(j)}_fireMoveEvents(O){this.fire(new n.k("move",O)),this._zooming&&this.fire(new n.k("zoom",O)),this._rotating&&this.fire(new n.k("rotate",O)),this._pitching&&this.fire(new n.k("pitch",O))}_afterEase(O,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;const j=this._zooming,Y=this._rotating,te=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,j&&this.fire(new n.k("zoomend",O)),Y&&this.fire(new n.k("rotateend",O)),te&&this.fire(new n.k("pitchend",O)),this.fire(new n.k("moveend",O))}flyTo(O,P){var j;if(!O.essential&&l.prefersReducedMotion){const kn=n.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,P)}this.stop(),O=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},O);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,fe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:fe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.zoomScale(Nt-te),Gt=Y.project(ft),zt=Y.project(kt).sub(Gt);let Xt=O.curve;const Zt=Math.max(Y.width,Y.height),Yt=Zt/Mt,ya=zt.mag();if("minZoom"in O){const kn=n.ad(Math.min(O.minZoom,te,Nt),Y.minZoom,Y.maxZoom),Ln=Zt/Y.zoomScale(kn-te);Xt=Math.sqrt(Ln/ya*2)}const Ca=Xt*Xt;function La(kn){const Ln=(Yt*Yt-Zt*Zt+(kn?-1:1)*Ca*Ca*ya*ya)/(2*(kn?Yt:Zt)*Ca*ya);return Math.log(Math.sqrt(Ln*Ln+1)-Ln)}function ja(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function Wa(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const on=La(!1);let Tn=function(kn){return Wa(on)/Wa(on+Xt*kn)},Qa=function(kn){return Zt*((Wa(on)*(ja(Ln=on+Xt*kn)/Wa(Ln))-ja(on))/Ca)/ya;var Ln},Sn=(La(!0)-on)/Xt;if(Math.abs(ya)<1e-6||!isFinite(Sn)){if(Math.abs(Zt-Yt)<1e-6)return this.easeTo(O,P);const kn=Yt<Zt?-1:1;Sn=Math.abs(Math.log(Yt/Zt))/Xt,Qa=()=>0,Tn=Ln=>Math.exp(kn*Xt*Ln)}if("duration"in O)O.duration=+O.duration;else{const kn="screenSpeed"in O?+O.screenSpeed/Xt:+O.speed;O.duration=1e3*Sn/kn}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=de!==Be,this._pitching=Ge!==fe,this._padding=!Y.isPaddingEqual(qe),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(kt),this._ease(kn=>{const Ln=kn*Sn,fn=1/Tn(Ln);Y.zoom=kn===1?Nt:te+Y.scaleZoom(fn),this._rotating&&(Y.bearing=n.z.number(de,Be,kn)),this._pitching&&(Y.pitch=n.z.number(fe,Ge,kn)),this._padding&&(Y.interpolatePadding(Ae,qe,kn),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(kn);const Mn=kn===1?kt:Y.unproject(Gt.add(zt.mult(Qa(Ln))).mult(fn));Y.setLocationAtPoint(Y.renderWorldCopies?Mn.wrap():Mn,lt),this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,P){var j;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Y=this._onEaseEnd;delete this._onEaseEnd,Y.call(this,P)}return O||(j=this.handlers)===null||j===void 0||j.stop(!1),this}_ease(O,P,j){j.animate===!1||j.duration===0?(O(1),P()):(this._easeStart=l.now(),this._easeOptions=j,this._onEaseFrame=O,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,P){O=n.b3(O,-180,180);const j=Math.abs(O-P);return Math.abs(O-360-P)<j&&(O-=360),Math.abs(O+360-P)<j&&(O+=360),O}_normalizeCenter(O,P){if(!P.renderWorldCopies||P.lngRange)return;const j=O.lng-P.center.lng;O.lng+=j>180?-360:j<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const yo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ss{constructor(O=yo){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=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.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(){o.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(O,P){const j=this._map._getUIString(`AttributionControl.${P}`);O.title=j,O.setAttribute("aria-label",j)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Y=>typeof Y!="string"?"":Y)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Y=this._map.style.stylesheet;this.styleOwner=Y.owner,this.styleId=Y.id}const P=this._map.style.sourceCaches;for(const Y in P){const te=P[Y];if(te.used||te.usedForTerrain){const de=te.getSource();de.attribution&&O.indexOf(de.attribution)<0&&O.push(de.attribution)}}O=O.filter(Y=>String(Y).trim()),O.sort((Y,te)=>Y.length-te.length),O=O.filter((Y,te)=>{for(let de=te+1;de<O.length;de++)if(O[de].indexOf(Y)>=0)return!1;return!0});const j=O.join(" | ");j!==this._attribHTML&&(this._attribHTML=j,O.length?(this._innerContainer.innerHTML=j,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ro{constructor(O={}){this._updateCompact=()=>{const P=this._container.children;if(P.length){const j=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&j.classList.add("maplibregl-compact"):j.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const P=o.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(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class gc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const P=++this._id;return this._queue.push({callback:O,id:P,cancelled:!1}),P}remove(O){const P=this._currentlyRunning,j=P?this._queue.concat(P):this._queue;for(const Y of j)if(Y.id===O)return void(Y.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const P=this._currentlyRunning=this._queue;this._queue=[];for(const j of P)if(!j.cancelled&&(j.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Or=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class vo extends n.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,P){this.sourceCache.update(O,P),this._renderableTilesKeys=[];const j={};for(const Y of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P}))j[Y.key]=!0,this._renderableTilesKeys.push(Y.key),this._tiles[Y.key]||(Y.posMatrix=new Float64Array(16),n.aQ(Y.posMatrix,0,n.X,0,n.X,0,1),this._tiles[Y.key]=new ke(Y,this.tileSize));for(const Y in this._tiles)j[Y]||delete this._tiles[Y]}freeRtt(O){for(const P in this._tiles){const j=this._tiles[P];(!O||j.tileID.equals(O)||j.tileID.isChildOf(O)||O.isChildOf(j.tileID))&&(j.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const P={};for(const j of this._renderableTilesKeys){const Y=this._tiles[j].tileID;if(Y.canonical.equals(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16),n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),P[j]=te}else if(Y.canonical.isChildOf(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=Y.canonical.z-O.canonical.z,fe=Y.canonical.x-(Y.canonical.x>>de<<de),Ae=Y.canonical.y-(Y.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,Be,0,Be,0,1),n.J(te.posMatrix,te.posMatrix,[-fe*Be,-Ae*Be,0]),P[j]=te}else if(O.canonical.isChildOf(Y.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=O.canonical.z-Y.canonical.z,fe=O.canonical.x-(O.canonical.x>>de<<de),Ae=O.canonical.y-(O.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),n.J(te.posMatrix,te.posMatrix,[fe*Be,Ae*Be,0]),n.K(te.posMatrix,te.posMatrix,[1/2**de,1/2**de,0]),P[j]=te}}return P}getSourceTile(O,P){const j=this.sourceCache._source;let Y=O.overscaledZ-this.deltaZoom;if(Y>j.maxzoom&&(Y=j.maxzoom),Y<j.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Y).key);let te=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!te||!te.dem)&&P)for(;Y>=j.minzoom&&(!te||!te.dem);)te=this.sourceCache.getTileByID(O.scaledTo(Y--).key);return te}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(P=>P.timeAdded>=O)}}class Jr{constructor(O,P,j){this.painter=O,this.sourceCache=new vo(P),this.options=j,this.exaggeration=typeof j.exaggeration=="number"?j.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,P,j,Y=n.X){var te;if(!(P>=0&&P<Y&&j>=0&&j<Y))return 0;const de=this.getTerrainData(O),fe=(te=de.tile)===null||te===void 0?void 0:te.dem;if(!fe)return 0;const Ae=function(ft,kt,Nt){var Mt=kt[0],Gt=kt[1];return ft[0]=Nt[0]*Mt+Nt[4]*Gt+Nt[12],ft[1]=Nt[1]*Mt+Nt[5]*Gt+Nt[13],ft}([],[P/Y*n.X,j/Y*n.X],de.u_terrain_matrix),Be=[Ae[0]*fe.dim,Ae[1]*fe.dim],Ge=Math.floor(Be[0]),qe=Math.floor(Be[1]),at=Be[0]-Ge,lt=Be[1]-qe;return fe.get(Ge,qe)*(1-at)*(1-lt)+fe.get(Ge+1,qe)*at*(1-lt)+fe.get(Ge,qe+1)*(1-at)*lt+fe.get(Ge+1,qe+1)*at*lt}getElevationForLngLatZoom(O,P){const{tileID:j,mercatorX:Y,mercatorY:te}=this._getOverscaledTileIDFromLngLatZoom(O,P);return this.getElevation(j,Y%n.X,te%n.X,n.X)}getElevation(O,P,j,Y=n.X){return this.getDEMElevation(O,P,j,Y)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Y=this.painter.context,te=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(Y,te,Y.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(Y,new n.R({width:1,height:1}),Y.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const P=this.sourceCache.getSourceTile(O,!0);if(P&&P.dem&&(!P.demTexture||P.needsTerrainPrepare)){const Y=this.painter.context;P.demTexture=this.painter.getTileTexture(P.dem.stride),P.demTexture?P.demTexture.update(P.dem.getPixels(),{premultiply:!1}):P.demTexture=new I(Y,P.dem.getPixels(),Y.gl.RGBA,{premultiply:!1}),P.demTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),P.needsTerrainPrepare=!1}const j=P&&P+P.tileID.key+O.key;if(j&&!this._demMatrixCache[j]){const Y=this.sourceCache.sourceCache._source.maxzoom;let te=O.canonical.z-P.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Y?te=O.canonical.z-Y:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const de=O.canonical.x-(O.canonical.x>>te<<te),fe=O.canonical.y-(O.canonical.y>>te<<te),Ae=n.bb(new Float64Array(16),[1/(n.X<<te),1/(n.X<<te),0]);n.J(Ae,Ae,[de*n.X,fe*n.X,0]),this._demMatrixCache[O.key]={matrix:Ae,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:P&&P.dem&&P.dem.dim||1,u_terrain_matrix:j?this._demMatrixCache[O.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(O){const P=this.painter,j=P.width/devicePixelRatio,Y=P.height/devicePixelRatio;return!this._fbo||this._fbo.width===j&&this._fbo.height===Y||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(P.context,{width:j,height:Y,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 I(P.context,{width:j,height:Y,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(j,Y,!0,!1),this._fbo.depthAttachment.set(P.context.createRenderbuffer(P.context.gl.DEPTH_COMPONENT16,j,Y))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const P=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let te=0,de=0;te<this._coordsTextureSize;te++)for(let fe=0;fe<this._coordsTextureSize;fe++,de+=4)P[de+0]=255&fe,P[de+1]=255&te,P[de+2]=fe>>8<<4|te>>8,P[de+3]=0;const j=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),Y=new I(O,j,O.gl.RGBA,{premultiply:!1});return Y.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Y,Y}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const P=new Uint8Array(4),j=this.painter.context,Y=j.gl,te=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),de=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);j.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Y.readPixels(te,fe-de-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null);const Ae=P[0]+(P[2]>>4<<8),Be=P[1]+((15&P[2])<<8),Ge=this.coordsIndex[255-P[3]],qe=Ge&&this.sourceCache.getTileByID(Ge);if(!qe)return null;const at=this._coordsTextureSize,lt=(1<<qe.tileID.canonical.z)*at;return new n.Z((qe.tileID.canonical.x*at+Ae)/lt+qe.tileID.wrap,(qe.tileID.canonical.y*at+Be)/lt,this.getElevation(qe.tileID,Ae,Be,at))}depthAtPoint(O){const P=new Uint8Array(4),j=this.painter.context,Y=j.gl;return j.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Y.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null),(P[0]/16777216+P[1]/65536+P[2]/256+P[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,P=new n.bc,j=new n.aY,Y=this.meshSize,te=n.X/Y,de=Y*Y;for(let qe=0;qe<=Y;qe++)for(let at=0;at<=Y;at++)P.emplaceBack(at*te,qe*te,0);for(let qe=0;qe<de;qe+=Y+1)for(let at=0;at<Y;at++)j.emplaceBack(at+qe,Y+at+qe+1,Y+at+qe+2),j.emplaceBack(at+qe,Y+at+qe+2,at+qe+1);const fe=P.length,Ae=fe+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(at*te,qe*n.X,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Ae+qe,Ae+qe+1,Ae+qe+3),j.emplaceBack(Ae+qe,Ae+qe+3,Ae+qe+2),j.emplaceBack(fe+qe,fe+qe+3,fe+qe+1),j.emplaceBack(fe+qe,fe+qe+2,fe+qe+3);const Be=P.length,Ge=Be+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(qe*n.X,at*te,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Be+qe,Be+qe+1,Be+qe+3),j.emplaceBack(Be+qe,Be+qe+3,Be+qe+2),j.emplaceBack(Ge+qe,Ge+qe+3,Ge+qe+1),j.emplaceBack(Ge+qe,Ge+qe+2,Ge+qe+3);return this._mesh=new Kl(O.createVertexBuffer(P,Or.members),O.createIndexBuffer(j),n.a0.simpleSegment(0,0,P.length,j.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*n.bd/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,P){var j;const{tileID:Y}=this._getOverscaledTileIDFromLngLatZoom(O,P);return(j=this.getMinMaxElevation(Y).minElevation)!==null&&j!==void 0?j:0}getMinMaxElevation(O){const P=this.getTerrainData(O).tile,j={minElevation:null,maxElevation:null};return P&&P.dem&&(j.minElevation=P.dem.min*this.exaggeration,j.maxElevation=P.dem.max*this.exaggeration),j}_getOverscaledTileIDFromLngLatZoom(O,P){const j=n.Z.fromLngLat(O.wrap()),Y=(1<<P)*n.X,te=j.x*Y,de=j.y*Y,fe=Math.floor(te/n.X),Ae=Math.floor(de/n.X);return{tileID:new n.S(P,0,P,fe,Ae),mercatorX:te,mercatorY:de}}}class qs{constructor(O,P,j){this._context=O,this._size=P,this._tileSize=j,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const P=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),j=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return j.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(j.texture),{id:O,fbo:P,texture:j,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(P=>O.id!==P),this._recentlyUsed.push(O.id)}stampObject(O){O.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 O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Fs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(O,P){this.painter=O,this.terrain=P,this.pool=new qs(O.context,30,P.sourceCache.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,P){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(j=>!O._layers[j].isHidden(P)),this._coordsDescendingInv={};for(const j in O.sourceCaches){this._coordsDescendingInv[j]={};const Y=O.sourceCaches[j].getVisibleCoordinates();for(const te of Y){const de=this.terrain.sourceCache.getTerrainCoords(te);for(const fe in de)this._coordsDescendingInv[j][fe]||(this._coordsDescendingInv[j][fe]=[]),this._coordsDescendingInv[j][fe].push(de[fe])}}this._coordsDescendingInvStr={};for(const j of O._order){const Y=O._layers[j],te=Y.source;if(Fs[Y.type]&&!this._coordsDescendingInvStr[te]){this._coordsDescendingInvStr[te]={};for(const de in this._coordsDescendingInv[te])this._coordsDescendingInvStr[te][de]=this._coordsDescendingInv[te][de].map(fe=>fe.key).sort().join()}}for(const j of this._renderableTiles)for(const Y in this._coordsDescendingInvStr){const te=this._coordsDescendingInvStr[Y][j.tileID.key];te&&te!==j.rttCoords[Y]&&(j.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const P=O.type,j=this.painter,Y=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Fs[P]&&(this._prevType&&Fs[this._prevType]||this._stacks.push([]),this._prevType=P,this._stacks[this._stacks.length-1].push(O.id),!Y))return!0;if(Fs[this._prevType]||Fs[P]&&Y){this._prevType=P;const te=this._stacks.length-1,de=this._stacks[te]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[te]){const Be=this.pool.getObjectForId(fe.rtt[te].id);if(Be.stamp===fe.rtt[te].stamp){this.pool.useObject(Be);continue}}const Ae=this.pool.getOrCreateFreeObject();this.pool.useObject(Ae),this.pool.stampObject(Ae),fe.rtt[te]={id:Ae.id,stamp:Ae.stamp},j.context.bindFramebuffer.set(Ae.fbo.framebuffer),j.context.clear({color:n.aN.transparent,stencil:0}),j.currentStencilSource=void 0;for(let Be=0;Be<de.length;Be++){const Ge=j.style._layers[de[Be]],qe=Ge.source?this._coordsDescendingInv[Ge.source][fe.tileID.key]:[fe.tileID];j.context.viewport.set([0,0,Ae.fbo.width,Ae.fbo.height]),j._renderTileClippingMasks(Ge,qe),j.renderLayer(j,j.style.sourceCaches[Ge.source],Ge,qe),Ge.source&&(fe.rttCoords[Ge.source]=this._coordsDescendingInvStr[Ge.source][fe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Fs[P]}return!1}}const bc={"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"},yc=y,Ts={hash:!1,interactive:!0,bearingSnap:7,attributionControl:yo,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},wi=H=>{H.touchstart=H.dragStart,H.touchmoveWindow=H.dragMove,H.touchend=H.dragEnd},Ys={showCompass:!0,showZoom:!0,visualizePitch:!1};class Yn{constructor(O,P,j=!1){this.mousedown=de=>{this.startMouse(n.e({},de,{ctrlKey:!0,preventDefault:()=>de.preventDefault()}),o.mousePos(this.element,de)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=de=>{this.moveMouse(de,o.mousePos(this.element,de))},this.mouseup=de=>{this.mouseRotate.dragEnd(de),this.mousePitch&&this.mousePitch.dragEnd(de),this.offTemp()},this.touchstart=de=>{de.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.startTouch(de,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=de=>{de.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.moveTouch(de,this._lastPos))},this.touchend=de=>{de.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 Y=O.dragRotate._mouseRotate.getClickTolerance(),te=O.dragRotate._mousePitch.getClickTolerance();this.element=P,this.mouseRotate=Ul({clickTolerance:Y,enable:!0}),this.touchRotate=(({enable:de,clickTolerance:fe,bearingDegreesPerPixelMoved:Ae=.8})=>{const Be=new wl;return new Eo({clickTolerance:fe,move:(Ge,qe)=>({bearingDelta:(qe.x-Ge.x)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:Y,enable:!0}),this.map=O,j&&(this.mousePitch=Gs({clickTolerance:te,enable:!0}),this.touchPitch=(({enable:de,clickTolerance:fe,pitchDegreesPerPixelMoved:Ae=-.5})=>{const Be=new wl;return new Eo({clickTolerance:fe,move:(Ge,qe)=>({pitchDelta:(qe.y-Ge.y)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:te,enable:!0})),o.addEventListener(P,"mousedown",this.mousedown),o.addEventListener(P,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(P,"touchcancel",this.reset)}startMouse(O,P){this.mouseRotate.dragStart(O,P),this.mousePitch&&this.mousePitch.dragStart(O,P),o.disableDrag()}startTouch(O,P){this.touchRotate.dragStart(O,P),this.touchPitch&&this.touchPitch.dragStart(O,P),o.disableDrag()}moveMouse(O,P){const j=this.map,{bearingDelta:Y}=this.mouseRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.mousePitch){const{pitchDelta:te}=this.mousePitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}moveTouch(O,P){const j=this.map,{bearingDelta:Y}=this.touchRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.touchPitch){const{pitchDelta:te}=this.touchPitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let ir;function Ao(H,O,P){const j=new n.N(H.lng,H.lat);if(H=new n.N(H.lng,H.lat),O){const Y=new n.N(H.lng-360,H.lat),te=new n.N(H.lng+360,H.lat),de=P.locationPoint(H).distSqr(O);P.locationPoint(Y).distSqr(O)<de?H=Y:P.locationPoint(te).distSqr(O)<de&&(H=te)}for(;Math.abs(H.lng-P.center.lng)>180;){const Y=P.locationPoint(H);if(Y.x>=0&&Y.y>=0&&Y.x<=P.width&&Y.y<=P.height)break;H.lng>P.center.lng?H.lng-=360:H.lng+=360}return H.lng!==j.lng&&P.locationPoint(H).y>P.height/2-P.getHorizon()?H:j}const vs={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 Xs(H,O,P){const j=H.classList;for(const Y in vs)j.remove(`maplibregl-${P}-anchor-${Y}`);j.add(`maplibregl-${P}-anchor-${O}`)}class zi extends n.E{constructor(O){if(super(),this._onKeyPress=P=>{const j=P.code,Y=P.charCode||P.keyCode;j!=="Space"&&j!=="Enter"&&Y!==32&&Y!==13||this.togglePopup()},this._onMapClick=P=>{const j=P.originalEvent.target,Y=this._element;this._popup&&(j===Y||Y.contains(j))&&this.togglePopup()},this._update=P=>{var j;if(!this._map)return;const Y=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!Y)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.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 te="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?te=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(te=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${vs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${de} ${te}`),l.frameAsync(new AbortController).then(()=>{this._updateOpacity(P&&P.type==="moveend")}).catch(()=>{})},this._onMove=P=>{if(!this._isDragging){const j=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=j}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=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O==null?void 0:O.opacity,O==null?void 0:O.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=n.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const P=o.createNS("http://www.w3.org/2000/svg","svg"),j=41,Y=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${j}px`),P.setAttributeNS(null,"width",`${Y}px`),P.setAttributeNS(null,"viewBox",`0 0 ${Y} ${j}`);const te=o.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"stroke","none"),te.setAttributeNS(null,"stroke-width","1"),te.setAttributeNS(null,"fill","none"),te.setAttributeNS(null,"fill-rule","evenodd");const de=o.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"fill-rule","nonzero");const fe=o.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const Ae=[{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 Mt of Ae){const Gt=o.createNS("http://www.w3.org/2000/svg","ellipse");Gt.setAttributeNS(null,"opacity","0.04"),Gt.setAttributeNS(null,"cx","10.5"),Gt.setAttributeNS(null,"cy","5.80029008"),Gt.setAttributeNS(null,"rx",Mt.rx),Gt.setAttributeNS(null,"ry",Mt.ry),fe.appendChild(Gt)}const Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill",this._color);const Ge=o.createNS("http://www.w3.org/2000/svg","path");Ge.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"),Be.appendChild(Ge);const qe=o.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const at=o.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"),qe.appendChild(at);const lt=o.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),lt.setAttributeNS(null,"fill","#FFFFFF");const ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(8.0, 8.0)");const kt=o.createNS("http://www.w3.org/2000/svg","circle");kt.setAttributeNS(null,"fill","#000000"),kt.setAttributeNS(null,"opacity","0.25"),kt.setAttributeNS(null,"cx","5.5"),kt.setAttributeNS(null,"cy","5.5"),kt.setAttributeNS(null,"r","5.4999962");const Nt=o.createNS("http://www.w3.org/2000/svg","circle");Nt.setAttributeNS(null,"fill","#FFFFFF"),Nt.setAttributeNS(null,"cx","5.5"),Nt.setAttributeNS(null,"cy","5.5"),Nt.setAttributeNS(null,"r","5.4999962"),ft.appendChild(kt),ft.appendChild(Nt),de.appendChild(fe),de.appendChild(Be),de.appendChild(qe),de.appendChild(lt),de.appendChild(ft),P.appendChild(de),P.setAttributeNS(null,"height",j*this._scale+"px"),P.setAttributeNS(null,"width",Y*this._scale+"px"),this._element.appendChild(P),this._offset=n.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",P=>{P.preventDefault()}),this._element.addEventListener("mousedown",P=>{P.preventDefault()}),Xs(this._element,this._anchor,"marker"),O&&O.className)for(const P of O.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.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),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Y=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Y,-1*(24.6+Y)],"bottom-right":[-Y,-1*(24.6+Y)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var P,j;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(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Y=this._map,te=Y.terrain.depthAtPoint(this._pos),de=Y.terrain.getElevationForLngLatZoom(this._lngLat,Y.transform.tileZoom);if(Y.transform.lngLatToCameraDepth(this._lngLat,de)-te<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/Y.transform._pixelPerMeter,Ae=Math.sin(Y.getPitch()*Math.PI/180)*fe,Be=Y.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ge=Y.transform.lngLatToCameraDepth(this._lngLat,de+Ae)-Be>.006;!((j=this._popup)===null||j===void 0)&&j.isOpen()&&Ge&&this._popup.remove(),this._element.style.opacity=Ge?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=n.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(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(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,P){return O===void 0&&P===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),P!==void 0&&(this._opacityWhenCovered=P),this._map&&this._updateOpacity(!0),this}}const Zs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Yr=0,Ec=!1;class Dr extends n.E{constructor(O){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 j=new n.N(P.coords.longitude,P.coords.latitude),Y=P.coords.accuracy,te=this._map.getBearing(),de=n.e({bearing:te},this.options.fitBoundsOptions),fe=xe.fromLngLat(j,Y);this._map.fitBounds(fe,de,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const j=new n.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(j).addTo(this._map),this._userLocationDotMarker.setLngLat(j).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 j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Ec)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=o.create("button","maplibregl-ctrl-geolocate",this._container),o.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 j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}else{const j=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new zi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zi({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",j=>{const Y=j.originalEvent&&j.originalEvent.type==="resize";j.geolocateSource||this._watchState!=="ACTIVE_LOCK"||Y||(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({},Zs,O)}onAdd(O){return this._map=O,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(P=!1){if(ir!==void 0&&!P)return ir;if(window.navigator.permissions===void 0)return ir=!!window.navigator.geolocation,ir;try{ir=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ir=!!window.navigator.geolocation}return ir})}().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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yr=0,Ec=!1}_isOutOfMapMaxBounds(O){const P=this._map.getMaxBounds(),j=O.coords;return P&&(j.longitude<P.getWest()||j.longitude>P.getEast()||j.latitude<P.getSouth()||j.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 O=this._map.getBounds(),P=O.getSouthEast(),j=O.getNorthEast(),Y=P.distanceTo(j),te=this._map._container.clientHeight,de=Math.ceil(this._accuracy/(Y/te)*2);this._circleElement.style.width=`${de}px`,this._circleElement.style.height=`${de}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":Yr--,Ec=!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 O;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yr++,Yr>1?(O={maximumAge:6e5,timeout:0},Ec=!0):(O=this.options.positionOptions,Ec=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}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 pr={maxWidth:100,unit:"metric"};function xi(H,O,P){const j=P&&P.maxWidth||100,Y=H._container.clientHeight/2,te=H.unproject([0,Y]),de=H.unproject([j,Y]),fe=te.distanceTo(de);if(P&&P.unit==="imperial"){const Ae=3.2808*fe;Ae>5280?oo(O,j,Ae/5280,H._getUIString("ScaleControl.Miles")):oo(O,j,Ae,H._getUIString("ScaleControl.Feet"))}else P&&P.unit==="nautical"?oo(O,j,fe/1852,H._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?oo(O,j,fe/1e3,H._getUIString("ScaleControl.Kilometers")):oo(O,j,fe,H._getUIString("ScaleControl.Meters"))}function oo(H,O,P,j){const Y=function(de){const fe=Math.pow(10,`${Math.floor(de)}`.length-1);let Ae=de/fe;return Ae=Ae>=10?10:Ae>=5?5:Ae>=3?3:Ae>=2?2:Ae>=1?1:function(Be){const Ge=Math.pow(10,Math.ceil(-Math.log(Be)/Math.LN10));return Math.round(Be*Ge)/Ge}(Ae),fe*Ae}(P),te=Y/P;H.style.width=O*te+"px",H.innerHTML=`${Y} ${j}`}class Tl extends n.E{constructor(O={}){super(),this._onFullscreenChange=()=>{var P;let j=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=j==null?void 0:j.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)j=j.shadowRoot.fullscreenElement;j===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,O&&O.container&&(O.container instanceof HTMLElement?this._container=O.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(O){return this._map=O,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const O=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",O).setAttribute("aria-hidden","true"),O.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const O=this._getTitle();this._fullscreenButton.setAttribute("aria-label",O),this._fullscreenButton.title=O}_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 cl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ct=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class pt extends n.E{constructor(O){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.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 j;const Y=this._lngLat||this._trackPointer;if(!this._map||!Y||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Be of this.options.className.split(" "))this._container.classList.add(Be);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=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._trackPointer&&!P)return;const te=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 de=this.options.anchor;const fe=xt(this.options.offset);if(!de){const Be=this._container.offsetWidth,Ge=this._container.offsetHeight;let qe;qe=te.y+fe.bottom.y<Ge?["top"]:te.y>this._map.transform.height-Ge?["bottom"]:[],te.x<Be/2?qe.push("left"):te.x>this._map.transform.width-Be/2&&qe.push("right"),de=qe.length===0?"bottom":qe.join("-")}let Ae=te.add(fe[de]);this.options.subpixelPositioning||(Ae=Ae.round()),o.setTransform(this._container,`${vs[de]} translate(${Ae.x}px,${Ae.y}px)`),Xs(this._container,de,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(cl),O)}addTo(O){return this._map&&this.remove(),this._map=O,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(O){return this._lngLat=n.N.convert(O),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(O){return this.setDOMContent(document.createTextNode(O))}setHTML(O){const P=document.createDocumentFragment(),j=document.createElement("body");let Y;for(j.innerHTML=O;Y=j.firstChild,Y;)P.appendChild(Y);return this.setDOMContent(P)}getMaxWidth(){var O;return(O=this._container)===null||O===void 0?void 0:O.style.maxWidth}setMaxWidth(O){return this.options.maxWidth=O,this._update(),this}setDOMContent(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(O){return this._container&&this._container.classList.add(O),this}removeClassName(O){return this._container&&this._container.classList.remove(O),this}setOffset(O){return this.options.offset=O,this._update(),this}toggleClassName(O){if(this._container)return this._container.classList.toggle(O)}setSubpixelPositioning(O){this.options.subpixelPositioning=O}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const O=this._container.querySelector(ct);O&&O.focus()}}function xt(H){if(H){if(typeof H=="number"){const O=Math.round(Math.abs(H)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,H),"top-left":new n.P(O,O),"top-right":new n.P(-O,O),bottom:new n.P(0,-H),"bottom-left":new n.P(O,-O),"bottom-right":new n.P(-O,-O),left:new n.P(H,0),right:new n.P(-H,0)}}if(H instanceof n.P||Array.isArray(H)){const O=n.P.convert(H);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:n.P.convert(H.center||[0,0]),top:n.P.convert(H.top||[0,0]),"top-left":n.P.convert(H["top-left"]||[0,0]),"top-right":n.P.convert(H["top-right"]||[0,0]),bottom:n.P.convert(H.bottom||[0,0]),"bottom-left":n.P.convert(H["bottom-left"]||[0,0]),"bottom-right":n.P.convert(H["bottom-right"]||[0,0]),left:n.P.convert(H.left||[0,0]),right:n.P.convert(H.right||[0,0])}}return xt(new n.P(0,0))}const K=y;f.AJAXError=n.bg,f.Evented=n.E,f.LngLat=n.N,f.MercatorCoordinate=n.Z,f.Point=n.P,f.addProtocol=n.bh,f.config=n.a,f.removeProtocol=n.bi,f.AttributionControl=ss,f.BoxZoomHandler=ko,f.CanvasSource=Me,f.CooperativeGesturesHandler=$o,f.DoubleClickZoomHandler=Pi,f.DragPanHandler=is,f.DragRotateHandler=ho,f.EdgeInsets=Ql,f.FullscreenControl=Tl,f.GeoJSONSource=Te,f.GeolocateControl=Dr,f.Hash=eo,f.ImageSource=ye,f.KeyboardHandler=cc,f.LngLatBounds=xe,f.LogoControl=ro,f.Map=class extends Xi{constructor(H){n.be.mark(n.bf.create);const O=Object.assign(Object.assign({},Ts),H);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new oi(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new gc,this._controls=[],this._mapId=n.a4(),this._contextLost=j=>{j.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:j}))},this._contextRestored=j=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:j}))},this._onMapScroll=j=>{if(j.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bc),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.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 j=!1;const Y=Us(te=>{this._trackResize&&!this._removed&&this.resize(te)._update()},50);this._resizeObserver=new ResizeObserver(te=>{j?Y(te):j=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Kr(this,O);const P=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new eo(P).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,n.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new ss(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new ro,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",j=>{this._update(j.dataType==="style"),this.fire(new n.k(`${j.dataType}data`,j))}),this.on("dataloading",j=>{this.fire(new n.k(`${j.dataType}dataloading`,j))}),this.on("dataabort",j=>{this.fire(new n.k("sourcedataabort",j))})}_getMapId(){return this._mapId}addControl(H,O){if(O===void 0&&(O=H.getDefaultPosition?H.getDefaultPosition():"top-right"),!H||!H.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=H.onAdd(this);this._controls.push(H);const j=this._controlPositions[O];return O.indexOf("bottom")!==-1?j.insertBefore(P,j.firstChild):j.appendChild(P),this}removeControl(H){if(!H||!H.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 O=this._controls.indexOf(H);return O>-1&&this._controls.splice(O,1),H.onRemove(this),this}hasControl(H){return this._controls.indexOf(H)>-1}calculateCameraOptionsFromTo(H,O,P,j){return j==null&&this.terrain&&(j=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(H,O,P,j)}resize(H){var O;const P=this._containerDimensions(),j=P[0],Y=P[1],te=this._getClampedPixelRatio(j,Y);if(this._resizeCanvas(j,Y,te),this.painter.resize(j,Y,te),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const Ae=this._getClampedPixelRatio(j,Y);this._resizeCanvas(j,Y,Ae),this.painter.resize(j,Y,Ae)}this.transform.resize(j,Y),(O=this._requestedCameraState)===null||O===void 0||O.resize(j,Y);const de=!this._moving;return de&&(this.stop(),this.fire(new n.k("movestart",H)).fire(new n.k("move",H))),this.fire(new n.k("resize",H)),de&&this.fire(new n.k("moveend",H)),this}_getClampedPixelRatio(H,O){const{0:P,1:j}=this._maxCanvasSize,Y=this.getPixelRatio(),te=H*Y,de=O*Y,fe=te>P?P/te:1,Ae=de>j?j/de:1;return Math.min(fe,Ae)*Y}getPixelRatio(){var H;return(H=this._overridePixelRatio)!==null&&H!==void 0?H:devicePixelRatio}setPixelRatio(H){this._overridePixelRatio=H,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(H){return this.transform.setMaxBounds(xe.convert(H)),this._update()}setMinZoom(H){if((H=H??-2)>=-2&&H<=this.transform.maxZoom)return this.transform.minZoom=H,this._update(),this.getZoom()<H&&this.setZoom(H),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(H){if((H=H??22)>=this.transform.minZoom)return this.transform.maxZoom=H,this._update(),this.getZoom()>H&&this.setZoom(H),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(H){if((H=H??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(H>=0&&H<=this.transform.maxPitch)return this.transform.minPitch=H,this._update(),this.getPitch()<H&&this.setPitch(H),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(H){if((H=H??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(H>=this.transform.minPitch)return this.transform.maxPitch=H,this._update(),this.getPitch()>H&&this.setPitch(H),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(H){return this.transform.renderWorldCopies=H,this._update()}project(H){return this.transform.locationPoint(n.N.convert(H),this.style&&this.terrain)}unproject(H){return this.transform.pointLocation(n.P.convert(H),this.terrain)}isMoving(){var H;return this._moving||((H=this.handlers)===null||H===void 0?void 0:H.isMoving())}isZooming(){var H;return this._zooming||((H=this.handlers)===null||H===void 0?void 0:H.isZooming())}isRotating(){var H;return this._rotating||((H=this.handlers)===null||H===void 0?void 0:H.isRotating())}_createDelegatedListener(H,O,P){if(H==="mouseenter"||H==="mouseover"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:te=>{const de=this.getLayer(O)?this.queryRenderedFeatures(te.point,{layers:[O]}):[];de.length?j||(j=!0,P.call(this,new gs(H,this,te.originalEvent,{features:de}))):j=!1},mouseout:()=>{j=!1}}}}if(H==="mouseleave"||H==="mouseout"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:de=>{(this.getLayer(O)?this.queryRenderedFeatures(de.point,{layers:[O]}):[]).length?j=!0:j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))},mouseout:de=>{j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))}}}}{const j=Y=>{const te=this.getLayer(O)?this.queryRenderedFeatures(Y.point,{layers:[O]}):[];te.length&&(Y.features=te,P.call(this,Y),delete Y.features)};return{layer:O,listener:P,delegates:{[H]:j}}}}on(H,O,P){if(P===void 0)return super.on(H,O);const j=this._createDelegatedListener(H,O,P);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[H]=this._delegatedListeners[H]||[],this._delegatedListeners[H].push(j);for(const Y in j.delegates)this.on(Y,j.delegates[Y]);return this}once(H,O,P){if(P===void 0)return super.once(H,O);const j=this._createDelegatedListener(H,O,P);for(const Y in j.delegates)this.once(Y,j.delegates[Y]);return this}off(H,O,P){return P===void 0?super.off(H,O):(this._delegatedListeners&&this._delegatedListeners[H]&&(j=>{const Y=j[H];for(let te=0;te<Y.length;te++){const de=Y[te];if(de.layer===O&&de.listener===P){for(const fe in de.delegates)this.off(fe,de.delegates[fe]);return Y.splice(te,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(H,O){if(!this.style)return[];let P;const j=H instanceof n.P||Array.isArray(H),Y=j?H:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(j?{}:H)||{},Y instanceof n.P||typeof Y[0]=="number")P=[n.P.convert(Y)];else{const te=n.P.convert(Y[0]),de=n.P.convert(Y[1]);P=[te,new n.P(de.x,te.y),de,new n.P(te.x,de.y),te]}return this.style.queryRenderedFeatures(P,O,this.transform)}querySourceFeatures(H,O){return this.style.querySourceFeatures(H,O)}setStyle(H,O){return(O=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&H?(this._diffStyle(H,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(H,O))}setTransformRequest(H){return this._requestManager.setTransformRequest(H),this}_getUIString(H){const O=this._locale[H];if(O==null)throw new Error(`Missing UI string '${H}'`);return O}_updateStyle(H,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(H,O));const P=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!H)),H?(this.style=new zn(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof H=="string"?this.style.loadURL(H,O,P):this.style.loadJSON(H,O,P),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(H,O){if(typeof H=="string"){const P=H,j=this._requestManager.transformRequest(P,"Style");n.h(j,new AbortController).then(Y=>{this._updateDiff(Y.data,O)}).catch(Y=>{Y&&this.fire(new n.j(Y))})}else typeof H=="object"&&this._updateDiff(H,O)}_updateDiff(H,O){try{this.style.setState(H,O)&&this._update(!0)}catch(P){n.w(`Unable to perform style diff: ${P.message||P.error||P}. Rebuilding the style from scratch.`),this._updateStyle(H,O)}}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(H,O){return this._lazyInitEmptyStyle(),this.style.addSource(H,O),this._update(!0)}isSourceLoaded(H){const O=this.style&&this.style.sourceCaches[H];if(O!==void 0)return O.loaded();this.fire(new n.j(new Error(`There is no source with ID '${H}'`)))}setTerrain(H){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),H){const O=this.style.sourceCaches[H.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${H.source}`);this.terrain===null&&O.reload();for(const P in this.style._layers){const j=this.style._layers[P];j.type==="hillshade"&&j.source===H.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 Jr(this.painter,O,H),this.painter.renderToTexture=new ys(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!==H.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:H})),this}getTerrain(){var H,O;return(O=(H=this.terrain)===null||H===void 0?void 0:H.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const H=this.style&&this.style.sourceCaches;for(const O in H){const P=H[O]._tiles;for(const j in P){const Y=P[j];if(Y.state!=="loaded"&&Y.state!=="errored")return!1}}return!0}removeSource(H){return this.style.removeSource(H),this._update(!0)}getSource(H){return this.style.getSource(H)}addImage(H,O,P={}){const{pixelRatio:j=1,sdf:Y=!1,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be}=P;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||n.b(O))){if(O.width===void 0||O.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:Ge,height:qe,data:at}=O,lt=O;return this.style.addImage(H,{data:new n.R({width:Ge,height:qe},new Uint8Array(at)),pixelRatio:j,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0,userImage:lt}),lt.onAdd&<.onAdd(this,H),this}}{const{width:Ge,height:qe,data:at}=l.getImageData(O);this.style.addImage(H,{data:new n.R({width:Ge,height:qe},at),pixelRatio:j,stretchX:te,stretchY:de,content:fe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0})}}updateImage(H,O){const P=this.style.getImage(H);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 j=O instanceof HTMLImageElement||n.b(O)?l.getImageData(O):O,{width:Y,height:te,data:de}=j;if(Y===void 0||te===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(Y!==P.data.width||te!==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 fe=!(O instanceof HTMLImageElement||n.b(O));return P.data.replace(de,fe),this.style.updateImage(H,P),this}getImage(H){return this.style.getImage(H)}hasImage(H){return H?!!this.style.getImage(H):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(H){this.style.removeImage(H)}loadImage(H){return w.getImage(this._requestManager.transformRequest(H,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(H,O){return this._lazyInitEmptyStyle(),this.style.addLayer(H,O),this._update(!0)}moveLayer(H,O){return this.style.moveLayer(H,O),this._update(!0)}removeLayer(H){return this.style.removeLayer(H),this._update(!0)}getLayer(H){return this.style.getLayer(H)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(H,O,P){return this.style.setLayerZoomRange(H,O,P),this._update(!0)}setFilter(H,O,P={}){return this.style.setFilter(H,O,P),this._update(!0)}getFilter(H){return this.style.getFilter(H)}setPaintProperty(H,O,P,j={}){return this.style.setPaintProperty(H,O,P,j),this._update(!0)}getPaintProperty(H,O){return this.style.getPaintProperty(H,O)}setLayoutProperty(H,O,P,j={}){return this.style.setLayoutProperty(H,O,P,j),this._update(!0)}getLayoutProperty(H,O){return this.style.getLayoutProperty(H,O)}setGlyphs(H,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(H,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(H,O,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(H,O,P,j=>{j||this._update(!0)}),this}removeSprite(H){return this._lazyInitEmptyStyle(),this.style.removeSprite(H),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(H,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(H,O,P=>{P||this._update(!0)}),this}setLight(H,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(H,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(H){return this._lazyInitEmptyStyle(),this.style.setSky(H),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(H,O){return this.style.setFeatureState(H,O),this._update()}removeFeatureState(H,O){return this.style.removeFeatureState(H,O),this._update()}getFeatureState(H){return this.style.getFeatureState(H)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let H=0,O=0;return this._container&&(H=this._container.clientWidth||400,O=this._container.clientHeight||300),[H,O]}_setupContainer(){const H=this._container;H.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",H);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),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(),j=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],j);const Y=this._controlContainer=o.create("div","maplibregl-control-container",H),te=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(de=>{te[de]=o.create("div",`maplibregl-ctrl-${de} `,Y)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(H,O,P){this._canvas.width=Math.floor(P*H),this._canvas.height=Math.floor(P*O),this._canvas.style.width=`${H}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const H={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",j=>{O={requestedAttributes:H},j&&(O.statusMessage=j.statusMessage,O.type=j.type)},{once:!0});const P=this._canvas.getContext("webgl2",H)||this._canvas.getContext("webgl",H);if(!P){const j="Failed to initialize WebGL";throw O?(O.message=j,new Error(JSON.stringify(O))):new Error(j)}this.painter=new sc(P,this.transform),s.testSupport(P)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(H){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||H,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(H){return this._update(),this._renderTaskQueue.add(H)}_cancelRenderFrame(H){this._renderTaskQueue.remove(H)}_render(H){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(H),this._removed)return;let P=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Y=this.transform.zoom,te=l.now();this.style.zoomHistory.update(Y,te);const de=new n.a9(Y,{now:te,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=de.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(P=!0,this._crossFadingFactor=fe),this.style.update(de)}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,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,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 j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||j||(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 H;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),w.removeThrottleControl(this._imageQueueHandle),(H=this._resizeObserver)===null||H===void 0||H.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O!=null&&O.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.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,l.frameAsync(this._frameRequest).then(H=>{n.be.frame(H),this._frameRequest=null,this._render(H)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(H){this._showTileBoundaries!==H&&(this._showTileBoundaries=H,this._update())}get showPadding(){return!!this._showPadding}set showPadding(H){this._showPadding!==H&&(this._showPadding=H,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(H){this._showCollisionBoxes!==H&&(this._showCollisionBoxes=H,H?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(H){this._showOverdrawInspector!==H&&(this._showOverdrawInspector=H,this._update())}get repaint(){return!!this._repaint}set repaint(H){this._repaint!==H&&(this._repaint=H,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(H){this._vertices=H,this._update()}get version(){return yc}getCameraTargetElevation(){return this.transform.elevation}},f.MapMouseEvent=gs,f.MapTouchEvent=wo,f.MapWheelEvent=sl,f.Marker=zi,f.NavigationControl=class{constructor(H){this._updateZoomButtons=()=>{const O=this._map.getZoom(),P=O===this._map.getMaxZoom(),j=O===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=j,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",j.toString())},this._rotateCompassArrow=()=>{const O=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=O},this._setButtonTitle=(O,P)=>{const j=this._map._getUIString(`NavigationControl.${P}`);O.title=j,O.setAttribute("aria-label",j)},this.options=n.e({},Ys,H),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(H){return this._map=H,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 Yn(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.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(H,O){const P=o.create("button",H,this._container);return P.type="button",P.addEventListener("click",O),P}},f.Popup=pt,f.RasterDEMTileSource=$e,f.RasterTileSource=Pe,f.ScaleControl=class{constructor(H){this._onMove=()=>{xi(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,xi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},pr),H)}getDefaultPosition(){return"bottom-left"}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",H.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Ws,f.Style=zn,f.TerrainControl=class{constructor(H){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=H}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.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(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=kl,f.TwoFingersTouchRotateHandler=qc,f.TwoFingersTouchZoomHandler=Qn,f.TwoFingersTouchZoomRotateHandler=Os,f.VectorTileSource=Ee,f.VideoSource=ge,f.addSourceType=(H,O)=>n._(void 0,void 0,void 0,function*(){if(ze(H))throw new Error(`A source type called "${H}" already exists.`);((P,j)=>{Se[P]=j})(H,O)}),f.clearPrewarmedResources=function(){const H=ce;H&&(H.isPreloaded()&&H.numActive()===1?(H.release(le),ce=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Ne().getRTLTextPluginStatus()},f.getVersion=function(){return K},f.getWorkerCount=function(){return oe.workerCount},f.getWorkerUrl=function(){return n.a.WORKER_URL},f.importScriptInWorkers=function(H){return ue().broadcast("IS",H)},f.prewarm=function(){ne().acquire(le)},f.setMaxParallelImageRequests=function(H){n.a.MAX_PARALLEL_IMAGE_REQUESTS=H},f.setRTLTextPlugin=function(H,O){return Ne().setRTLTextPlugin(H,O)},f.setWorkerCount=function(H){oe.workerCount=H},f.setWorkerUrl=function(H){n.a.WORKER_URL=H}}),m}()},88640:function(c,m,a){function v(me,_e,xe){me.prototype=_e.prototype=xe,xe.constructor=me}function f(me,_e){var xe=Object.create(me.prototype);for(var we in _e)xe[we]=_e[we];return xe}function n(){}a.d(m,{GW:function(){return pe},Dj:function(){return oe}});var y=.7,_=1/y,p="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\(".concat(p,",").concat(p,",").concat(p,"\\)$")),d=new RegExp("^rgb\\(".concat(o,",").concat(o,",").concat(o,"\\)$")),h=new RegExp("^rgba\\(".concat(p,",").concat(p,",").concat(p,",").concat(l,"\\)$")),g=new RegExp("^rgba\\(".concat(o,",").concat(o,",").concat(o,",").concat(l,"\\)$")),b=new RegExp("^hsl\\(".concat(l,",").concat(o,",").concat(o,"\\)$")),w=new RegExp("^hsla\\(".concat(l,",").concat(o,",").concat(o,",").concat(l,"\\)$")),x={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 S(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function T(me){var _e,xe;return me=(me+"").trim().toLowerCase(),(_e=s.exec(me))?(xe=_e[1].length,_e=parseInt(_e[1],16),xe===6?C(_e):xe===3?new M(_e>>8&15|_e>>4&240,_e>>4&15|240&_e,(15&_e)<<4|15&_e,1):xe===8?A(_e>>24&255,_e>>16&255,_e>>8&255,(255&_e)/255):xe===4?A(_e>>12&15|_e>>8&240,_e>>8&15|_e>>4&240,_e>>4&15|240&_e,((15&_e)<<4|15&_e)/255):null):(_e=u.exec(me))?new M(_e[1],_e[2],_e[3],1):(_e=d.exec(me))?new M(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,1):(_e=h.exec(me))?A(_e[1],_e[2],_e[3],_e[4]):(_e=g.exec(me))?A(255*_e[1]/100,255*_e[2]/100,255*_e[3]/100,_e[4]):(_e=b.exec(me))?V(_e[1],_e[2]/100,_e[3]/100,1):(_e=w.exec(me))?V(_e[1],_e[2]/100,_e[3]/100,_e[4]):x.hasOwnProperty(me)?C(x[me]):me==="transparent"?new M(NaN,NaN,NaN,0):null}function C(me){return new M(me>>16&255,me>>8&255,255&me,1)}function A(me,_e,xe,we){return we<=0&&(me=_e=xe=NaN),new M(me,_e,xe,we)}function E(me,_e,xe,we){return arguments.length===1?((Ee=me)instanceof n||(Ee=T(Ee)),Ee?new M((Ee=Ee.rgb()).r,Ee.g,Ee.b,Ee.opacity):new M):new M(me,_e,xe,we??1);var Ee}function M(me,_e,xe,we){this.r=+me,this.g=+_e,this.b=+xe,this.opacity=+we}function I(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b))}function N(){var me=z(this.opacity);return"".concat(me===1?"rgb(":"rgba(").concat(F(this.r),", ").concat(F(this.g),", ").concat(F(this.b)).concat(me===1?")":", ".concat(me,")"))}function z(me){return isNaN(me)?1:Math.max(0,Math.min(1,me))}function F(me){return Math.max(0,Math.min(255,Math.round(me)||0))}function R(me){return((me=F(me))<16?"0":"")+me.toString(16)}function V(me,_e,xe,we){return we<=0?me=_e=xe=NaN:xe<=0||xe>=1?me=_e=NaN:_e<=0&&(me=NaN),new U(me,_e,xe,we)}function $(me){if(me instanceof U)return new U(me.h,me.s,me.l,me.opacity);if(me instanceof n||(me=T(me)),!me)return new U;if(me instanceof U)return me;var _e=(me=me.rgb()).r/255,xe=me.g/255,we=me.b/255,Ee=Math.min(_e,xe,we),Pe=Math.max(_e,xe,we),$e=NaN,Te=Pe-Ee,Ce=(Pe+Ee)/2;return Te?($e=_e===Pe?(xe-we)/Te+6*(xe<we):xe===Pe?(we-_e)/Te+2:(_e-xe)/Te+4,Te/=Ce<.5?Pe+Ee:2-Pe-Ee,$e*=60):Te=Ce>0&&Ce<1?0:$e,new U($e,Te,Ce,me.opacity)}function U(me,_e,xe,we){this.h=+me,this.s=+_e,this.l=+xe,this.opacity=+we}function Z(me){return(me=(me||0)%360)<0?me+360:me}function q(me){return Math.max(0,Math.min(1,me||0))}function W(me,_e,xe){return 255*(me<60?_e+(xe-_e)*me/60:me<180?xe:me<240?_e+(xe-_e)*(240-me)/60:_e)}v(n,T,{copy:function(me){return Object.assign(new this.constructor,this,me)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $(this).formatHsl()},formatRgb:k,toString:k}),v(M,E,f(n,{brighter:function(me){return me=me==null?_:Math.pow(_,me),new M(this.r*me,this.g*me,this.b*me,this.opacity)},darker:function(me){return me=me==null?y:Math.pow(y,me),new M(this.r*me,this.g*me,this.b*me,this.opacity)},rgb:function(){return this},clamp:function(){return new M(F(this.r),F(this.g),F(this.b),z(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:I,formatHex:I,formatHex8:function(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b)).concat(R(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N,toString:N})),v(U,function(me,_e,xe,we){return arguments.length===1?$(me):new U(me,_e,xe,we??1)},f(n,{brighter:function(me){return me=me==null?_:Math.pow(_,me),new U(this.h,this.s,this.l*me,this.opacity)},darker:function(me){return me=me==null?y:Math.pow(y,me),new U(this.h,this.s,this.l*me,this.opacity)},rgb:function(){var me=this.h%360+360*(this.h<0),_e=isNaN(me)||isNaN(this.s)?0:this.s,xe=this.l,we=xe+(xe<.5?xe:1-xe)*_e,Ee=2*xe-we;return new M(W(me>=240?me-240:me+120,Ee,we),W(me,Ee,we),W(me<120?me+240:me-120,Ee,we),this.opacity)},clamp:function(){return new U(Z(this.h),q(this.s),q(this.l),z(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 me=z(this.opacity);return"".concat(me===1?"hsl(":"hsla(").concat(Z(this.h),", ").concat(100*q(this.s),"%, ").concat(100*q(this.l),"%").concat(me===1?")":", ".concat(me,")"))}}));var Q=function(me){return function(){return me}};function X(me,_e){var xe=_e-me;return xe?function(we,Ee){return function(Pe){return we+Pe*Ee}}(me,xe):Q(isNaN(me)?_e:me)}var J=function me(_e){var xe=function(Ee){return(Ee=+Ee)==1?X:function(Pe,$e){return $e-Pe?function(Te,Ce,ye){return Te=Math.pow(Te,ye),Ce=Math.pow(Ce,ye)-Te,ye=1/ye,function(ge){return Math.pow(Te+ge*Ce,ye)}}(Pe,$e,Ee):Q(isNaN(Pe)?$e:Pe)}}(_e);function we(Ee,Pe){var $e=xe((Ee=E(Ee)).r,(Pe=E(Pe)).r),Te=xe(Ee.g,Pe.g),Ce=xe(Ee.b,Pe.b),ye=X(Ee.opacity,Pe.opacity);return function(ge){return Ee.r=$e(ge),Ee.g=Te(ge),Ee.b=Ce(ge),Ee.opacity=ye(ge),Ee+""}}return we.gamma=me,we}(1);function ee(me,_e){var xe,we=_e?_e.length:0,Ee=me?Math.min(we,me.length):0,Pe=new Array(Ee),$e=new Array(we);for(xe=0;xe<Ee;++xe)Pe[xe]=pe(me[xe],_e[xe]);for(;xe<we;++xe)$e[xe]=_e[xe];return function(Te){for(xe=0;xe<Ee;++xe)$e[xe]=Pe[xe](Te);return $e}}function le(me,_e){var xe=new Date;return me=+me,_e=+_e,function(we){return xe.setTime(me*(1-we)+_e*we),xe}}function oe(me,_e){return me=+me,_e=+_e,function(xe){return me*(1-xe)+_e*xe}}function se(me){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},se(me)}function ce(me,_e){var xe,we={},Ee={};for(xe in me!==null&&se(me)==="object"||(me={}),_e!==null&&se(_e)==="object"||(_e={}),_e)xe in me?we[xe]=pe(me[xe],_e[xe]):Ee[xe]=_e[xe];return function(Pe){for(xe in we)Ee[xe]=we[xe](Pe);return Ee}}var ae=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ae.source,"g");function ie(me,_e){var xe,we,Ee,Pe=ae.lastIndex=ne.lastIndex=0,$e=-1,Te=[],Ce=[];for(me+="",_e+="";(xe=ae.exec(me))&&(we=ne.exec(_e));)(Ee=we.index)>Pe&&(Ee=_e.slice(Pe,Ee),Te[$e]?Te[$e]+=Ee:Te[++$e]=Ee),(xe=xe[0])===(we=we[0])?Te[$e]?Te[$e]+=we:Te[++$e]=we:(Te[++$e]=null,Ce.push({i:$e,x:oe(xe,we)})),Pe=ne.lastIndex;return Pe<_e.length&&(Ee=_e.slice(Pe),Te[$e]?Te[$e]+=Ee:Te[++$e]=Ee),Te.length<2?Ce[0]?function(ye){return function(ge){return ye(ge)+""}}(Ce[0].x):function(ye){return function(){return ye}}(_e):(_e=Ce.length,function(ye){for(var ge,Me=0;Me<_e;++Me)Te[(ge=Ce[Me]).i]=ge.x(ye);return Te.join("")})}function ue(me,_e){_e||(_e=[]);var xe,we=me?Math.min(_e.length,me.length):0,Ee=_e.slice();return function(Pe){for(xe=0;xe<we;++xe)Ee[xe]=me[xe]*(1-Pe)+_e[xe]*Pe;return Ee}}function he(me){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_e){return typeof _e}:function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},he(me)}function pe(me,_e){var xe,we,Ee=he(_e);return _e==null||Ee==="boolean"?Q(_e):(Ee==="number"?oe:Ee==="string"?(xe=T(_e))?(_e=xe,J):ie:_e instanceof T?J:_e instanceof Date?le:(we=_e,!ArrayBuffer.isView(we)||we instanceof DataView?Array.isArray(_e)?ee:typeof _e.valueOf!="function"&&typeof _e.toString!="function"||isNaN(_e)?ce:oe:ue))(me,_e)}},23648:function(c){c.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(c){c.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(c){c.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(c){c.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(c){c.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(c){c.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(c){c.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 © <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(c){c.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 © <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"}}]}`)}},B={};function D(c){var m=B[c];if(m!==void 0)return m.exports;var a=B[c]={id:c,exports:{}};return i[c].call(a.exports,a,a.exports,D),a.exports}return D.m=i,D.n=function(c){var m=c&&c.__esModule?function(){return c.default}:function(){return c};return D.d(m,{a:m}),m},D.d=function(c,m){for(var a in m)D.o(m,a)&&!D.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:m[a]})},D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D.o=function(c,m){return Object.prototype.hasOwnProperty.call(c,m)},D.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},D.b=document.baseURI||self.location.href,D.nc=void 0,D(20260)}()})})(dq);var vNt=dq.exports;const uq=d8(vNt),nga="",rga="",_Nt={ref:"card",class:"card-volumetric-field"},hq=1,bNt=800,pq=300,xNt=-46,fq=100,mq=-14,wNt=$i({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const r=e,i=new Set([2,20,308,310]),B=[[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 D=null;const c=t.ref(null),m=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>r.passesPlays,h=>{const g=h.reduce((b,w)=>(i.has(w[r.playIndexes.categoryId])&&b.push({x1:w[r.playIndexes.coordinate1X],y1:w[r.playIndexes.coordinate1Y],x2:w[r.playIndexes.coordinate2X],y2:w[r.playIndexes.coordinate2Y],x3:w[r.playIndexes.coordinate3X],y3:w[r.playIndexes.coordinate3Y]}),b),[]);d(g)}),t.watch(()=>a.value,(h,g)=>{v.value&&(o(h),m.value.style.height=`${s(h)}px`,v.value.style.top=`${u(s(h))}px`)});function f(){D=new ResizeObserver(h=>{for(const g of h)a.value=g.contentRect.width}),D.observe(c.value)}function n(h){return Array.from({length:h},()=>0)}function y(h,g){let b=.01351,w=.02439,x=0,S=0,k=[];const T=g.length,C=Math.floor(T/10);for(;x<74;)S=g.filter(A=>1-A.y3>=x*b&&1-A.y3<=(x+1)*b&&1-A.x3>=h*w&&1-A.x3<=(h+1)*w).map(A=>A.y3).length,k.push(parseFloat((S/C).toFixed(4))),x++;return k.reverse()}function _(h){let g=[n(74),n(74)],b=[],w=39;for(;w>0&&w<=39;)b=y(w,h),g.push(b),w--;return g.push(n(74),n(74)),g}function p(h,g,b){const w=[];let k=0,T=0;w.push(h[0]);for(let C=1;C<b-1;C++){const A=[];A.push(h[C][0]);for(let E=1;E<g-1;E++)k=h[C][E-1],T=h[C][E+1],A.push(k+.5*(h[C][E]+T-k));A.push(h[C][g-1]),w.push(A)}w.push(h[b-1]);for(let C=1;C<g-1;C++)for(let A=1;A<b-1;A++)k=w[A-1][C],T=w[A+1][C],w[A][C]=k+.5*(w[A][C]+T-k);return w}function l(h){let g=0,b=0;for(let w=0;w<h.length;w++){b=b+h[w].reduce(function(S,k){return S+k});const x=Math.max.apply(null,h[w]);x>g&&(g=x)}return g}function o(h){uq.relayout(c.value,{width:h,height:s(h)})}function s(h){return Math.round(pq/bNt*h,0)}function u(h){return mq+(h-fq)/(pq-fq)*(xNt-mq)}function d(h){let g=_(h),b=g.length,w=g[0].length;g=p(p(g,w,b),w,b),w=g[0].length,b=g.length;const x=l(g),S=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:B,autoscale:!1,showscale:!1}],k=[0,w],T=[0,b],C=[0,x*5],A={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:C},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:s(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};m.value&&(m.value.style.height=`${s(a.value)}px`);const E=[];for(let M=0;M<w;M++){const I=[],N=[],z=[];for(let F=0;F<b;F++)I.push(M),N.push(F),z.push(S[0].z[F][M]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:hq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let M=0;M<b;M++){const I=[],N=[],z=[];for(let F=0;F<w;F++)I.push(F),N.push(M),z.push(S[0].z[M][F]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:hq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}uq.newPlot("surface-plot",S.concat(E),A,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${u(s(a.value))}px`)}return t.onMounted(()=>{c.value&&(c.value.style.pointerEvents="none"),f()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",_Nt,[t.createElementVNode("div",{ref_key:"volumetricField",ref:m,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:c,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-46439c02"]]),oga="",gq=e=>(t.pushScopeId("data-v-885deed1"),e=e(),t.popScopeId(),e),kNt=gq(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),CNt=gq(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),SNt=$i({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const r=e,i=t.computed(()=>({"--flex-direction-info":r.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":r.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":r.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,D)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(i.value)},[kNt,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),CNt],4))}},[["__scopeId","data-v-885deed1"]]),TNt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let YE=null;function ENt(){return YE||(YE=qg(TNt)),YE}const lga="",ANt=e=>(t.pushScopeId("data-v-045241b6"),e=e(),t.popScopeId(),e),MNt={class:"volumetric-section-container"},INt=ANt(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),PNt={key:0,class:"volumetric-section-container__switch"},BNt={class:"volumetric-section-container__attack-direction"},NNt={class:"volumetric-section-container__field"},zNt=$i({__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 r=e,i=ENt(),B=new Set([2,20,308,310]),D=new Set([3,21,309]),c=new Set([...B,...D]);let m=null;const a=t.ref(0),v=t.ref(new Map),f=t.ref({teamId:0}),n=t.computed(()=>[{teamId:r.game.homeTeam.team_id,text:r.game.homeTeam.colloquial_name,img:r.game.homeTeam.logo,isHomeTeam:!0},{teamId:r.game.awayTeam.team_id,text:r.game.awayTeam.colloquial_name,img:r.game.awayTeam.logo,isHomeTeam:!1}]),y=t.computed(()=>v.value.get(r.isGamePreMatch?r.teamSelectedPreMatch.teamId:f.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,f.value=n.value[a.value]},{immediate:!0}),t.watch(()=>r.game.gameId,h=>{h&&(d(),p(r.game.is_live&&r.game.game_status===4))},{immediate:!0});function _(){m=setInterval(()=>{p()},1e3*60*r.volumetricFieldIntervalMinutes)}async function p(h=!1){try{const g=await o();v.value.set(r.game.homeTeam.team_id,g.homeTeam),v.value.set(r.game.awayTeam.team_id,g.awayTeam),h&&_()}catch(g){throw new Error(g)}}function l(h){return r.game.game_status===4&&!r.game.is_live?h[i.gameId]!==r.game.gameId:h[i.gameId]===r.game.gameId}async function o(){try{let h={homeTeam:[],awayTeam:[]};if(r.game.is_live||r.game.game_status===0){const g=await $c.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${r.game.gameId}`),b=g.data?g.data.data||[]:[],w=new Set;b.forEach(x=>{w.add(x[i.categoryId]),x[i.teamId]===r.game.homeTeam.team_id&&c.has(x[i.categoryId])&&l(x)?(s(x),h.homeTeam.push(x)):x[i.teamId]===r.game.awayTeam.team_id&&c.has(x[i.categoryId])&&l(x)&&(x[i.coordinate1Y]=1-x[i.coordinate1Y],x[i.coordinate2Y]=1-x[i.coordinate2Y],x[i.coordinate3Y]=1-x[i.coordinate3Y],x[i.coordinate1X]=1-x[i.coordinate1X],x[i.coordinate2X]=1-x[i.coordinate2X],x[i.coordinate3X]=1-x[i.coordinate3X],s(x),h.awayTeam.push(x))})}else{const[g,b]=await Promise.all([$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${r.game.seasonId}-${r.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${r.game.seasonId}-${r.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);h={homeTeam:g.data.data.posession.filter(w=>w[i.teamId]===r.game.homeTeam.team_id&&c.has(w[i.categoryId])&&l(w)),awayTeam:b.data.data.posession.filter(w=>w[i.teamId]===r.game.awayTeam.team_id&&c.has(w[i.categoryId])&&l(w)?(w[i.coordinate1Y]=1-w[i.coordinate1Y],w[i.coordinate2Y]=1-w[i.coordinate2Y],w[i.coordinate3Y]=1-w[i.coordinate3Y],w[i.coordinate1X]=1-w[i.coordinate1X],w[i.coordinate2X]=1-w[i.coordinate2X],w[i.coordinate3X]=1-w[i.coordinate3X],!0):!1)}}return h}catch(h){throw new Error(h)}}function s(h){const g=h[i.coordinate1X],b=h[i.coordinate2X],w=h[i.coordinate3X];return h[i.coordinate1X]=h[i.coordinate1Y],h[i.coordinate2X]=h[i.coordinate2Y],h[i.coordinate3X]=h[i.coordinate3Y],h[i.coordinate1Y]=g,h[i.coordinate2Y]=b,h[i.coordinate3Y]=w,h}function u(h){a.value=h.index,f.value=h.button}function d(){m&&clearInterval(m)}return t.onUnmounted(()=>{d()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",MNt,[INt,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",PNt,[t.createVNode(g4,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:u},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",BNt,[t.createVNode(SNt,{team:e.isGamePreMatch?e.teamSelectedPreMatch:f.value},null,8,["team"])]),t.createElementVNode("div",NNt,[t.createVNode(wNt,{"passes-plays":y.value,"play-indexes":t.unref(i)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-045241b6"]]),dga="";let yq=null;const ONt={components:{GSCHighlights:W3t,ToggleButtons:g4,VolumetricSectionContainer:zNt,DataProminentGame:owt,HighlightsProminentGameLive:k5t,HighlightsProminentGame:o5t,GSCRadioToggle:RH,FieldPosesion:Rwt,EventsLine:p4t,ChalkboardSectionContainer:yNt},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)yq=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),yq.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 r={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",r)},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)}},om=e=>(t.pushScopeId("data-v-f677ec62"),e=e(),t.popScopeId(),e),FNt={class:"container-prominent",ref:"prominent"},LNt={class:"container-prominent-data"},DNt={class:"container-prominent-section"},RNt={key:0,class:"highlights-containers"},VNt={class:"highlights-content"},$Nt={key:1,class:"highlights-containers"},jNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),UNt={key:0,class:"container-leyend-prematch"},GNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),HNt={key:1,class:"container-leyend-prematch-movil"},WNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),qNt=om(()=>t.createElementVNode("br",null,null,-1)),YNt=om(()=>t.createElementVNode("br",null,null,-1)),XNt={key:2,class:"container-leyend-prematch-movil"},ZNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),JNt=om(()=>t.createElementVNode("br",null,null,-1)),KNt=om(()=>t.createElementVNode("br",null,null,-1)),QNt={class:"container-switch-toggle"},ezt={class:"container-prominent-section__chalkboard"},tzt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function azt(e,r,i,B,D,c){const m=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),f=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),y=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("FieldPosesion"),l=t.resolveComponent("VolumetricSectionContainer"),o=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",FNt,[t.createElementVNode("div",LNt,[t.createVNode(m,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-prominent-data":i.timeLiveProminentData,game:i.game,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onLoading:c.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])]),t.createElementVNode("div",DNt,[i.game.is_live===1||i.game.game_status===0||i.game.game_status===1?(t.openBlock(),t.createElementBlock("div",RNt,[t.createElementVNode("div",{class:t.normalizeClass(c.getContainerClass())},[D.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(i.game).length>0&&Object.keys(i.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(i.tournamentSelected.id!=41?i.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"):i.game.matchday_name=="Matchday 10"?"Final":i.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(D.widthSection>830?"highlights-title":"highlights-title-mobile")},"HIGHLIGHTS DEL PARTIDO",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",VNt,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showgoalsliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,"title-card":"GOLES",onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.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},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"title-card":"GOLES","can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.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(D.showsummaryliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.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},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",$Nt,[!D.isDataProminentGameLoading&&(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.canPlayVideos?(t.openBlock(),t.createBlock(f,{key:0,data:{game:i.game.gameId,season:i.game.seasonId,type:"historic"},"can-play-videos":i.canPlayVideos,"video-privileges-playing-as":i.videoPrivilegesPlayingAs,"privileges-team-id":i.playVideosPrivileges?i.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:c.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),c.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(D.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:i.token,game:i.game,widthScreen:D.widthSection,"can-play-videos":i.canPlayVideos,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onPlayVideo:c.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(D.widthSection>760?"fields-section-container":"fields-section-container-movil")},[jNt,i.game.game_status===4&&i.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.widthSection>590?(t.openBlock(),t.createElementBlock("div",UNt,[GNt,t.createTextVNode(" Es en base a las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection>340&&D.widthSection<=590?(t.openBlock(),t.createElementBlock("div",HNt,[WNt,t.createTextVNode(" "),qNt,t.createTextVNode("Es en base a las estadisticas de los partidos ya "),YNt,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection<=340?(t.openBlock(),t.createElementBlock("div",XNt,[ZNt,t.createTextVNode(" "),JNt,t.createTextVNode("Es en base a las estadisticas de los "),KNt,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(y,{"selected-button-index":D.teamButtonSelectedIndex,buttons:c.toggleButtons,width:"320px","border-radius":"16px",onChange:c.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",QNt,[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:c.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,D.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(p,{"width-Section":D.widthSection,game:i.game,"time-live-possesion":i.timeLivePossesion,onIntervalidpossesion:c.intervalidpossesion,"team-selected":D.teamSelected.teamId===0?c.toggleButtons[0]:D.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,D.switchTypeViewFiled==="Porcentajes"||D.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(l,{game:i.game,"season-selected":i.seasonSelected,token:i.token,"is-game-pre-match":c.isGamePreMatch,"team-selected-pre-match":D.teamSelected,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,D.viewVolumtrica&&D.widthSection>760||D.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",ezt,[tzt,D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(o,{key:0,"is-female":i.tournamentSelected.is_female===1,game:i.game,"season-selected":i.seasonSelected,"tournament-selected":i.tournamentSelected,token:i.token,"width-section":D.widthSection,"can-play-videos":i.canPlayVideos,"is-game-pre-match":c.isGamePreMatch,"play-videos-privileges":i.playVideosPrivileges,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":i.chalkboardIntervalMinutes,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onOpenMediaPlayer:c.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 nzt=$i(ONt,[["render",azt],["__scopeId","data-v-f677ec62"]]),uga="",rzt={class:"datagame-container"},izt=$i({__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:r}){function i(m){r("intervalidhighlive",m)}function B(m){r("intervalidpossesion",m)}function D(m){r("openmedia",m)}function c(m){r("openmedia",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",rzt,[t.createVNode(nzt,{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:B,onIntervalidhighlive:i,onOpenmedia:D,onOpenMediaPlayer:c},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-a8ac4916"]]),ozt={class:"datagame-container"},szt={__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://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.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:r}){const i=e,B=t.ref(0);t.watch(()=>i.game,m=>{B.value=m.gameId},{deep:!0,immediate:!0});function D(m){r("openmedia",m)}function c(m){r("intervalidgs",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",ozt,[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(w2),{key:B.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:c,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},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(w2),{key:B.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:D},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(w2),{key:B.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:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},lzt={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 A_(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const czt={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"},XE={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:r}=A_(e);return{myDivRef:e,elementSize:r}},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:{}},vq=()=>{t.useCssVars(e=>({"32aec1ca":e.background,"4e54a87a":e.height,"448b848c":e.fontSize,"4c061c38":e.fontColor,"3917092f":e.fontFamily,"4a286e80":e.heightTeam}))},_q=XE.setup;XE.setup=_q?(e,r)=>(vq(),_q(e,r)):vq;const dzt={ref:"myDivRef"},uzt=t.createElementVNode("br",null,null,-1),hzt=t.createElementVNode("br",null,null,-1);function pzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",dzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.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),B.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(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.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(c.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(c.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.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),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),uzt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),hzt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.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),B.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),B.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(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(c.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const bq=$i(XE,[["render",pzt],["__cssModules",{$style:czt}]]),gva="",ZE={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))}}},xq=()=>{t.useCssVars(e=>({"124740d4":e.height,"10134ca2":e.borderWidthBtn,"3c6b92b3":e.borderType,"50129b0a":e.borderColor,"69df146a":e.borderRadius,22745479:e.width,"6940cc70":e.backgroundColor,"5644e646":e.cursorType,"3027cd46":e.fontSize,"159c0fd5":e.fontStyle,f2b4a480:e.fontFamily,cd9e6514:e.marginLeftStat,"777d9d51":e.fontSizeStat}))},wq=ZE.setup;ZE.setup=wq?(e,r)=>(xq(),wq(e,r)):xq;const fzt=e=>(t.pushScopeId("data-v-04a0bdbd"),e=e(),t.popScopeId(),e),mzt=["src"],gzt={key:1,class:"text"},yzt=["src"],vzt={class:"stats"},_zt=fzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),bzt={class:"numstats"},xzt={class:"leyend"};function wzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(i.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,14,mzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",gzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,yzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",vzt,[_zt,t.createElementVNode("div",bzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",xzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const kq=$i(ZE,[["render",wzt],["__scopeId","data-v-04a0bdbd"]]),kzt={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"},JE={components:{GSCButton:kq},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:r}=A_(e);return{myDivRef2:e,elementSize:r}},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)}}},Cq=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},Sq=JE.setup;JE.setup=Sq?(e,r)=>(Cq(),Sq(e,r)):Cq;const Czt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},Szt=["src"],Tzt=["src"],Ezt=["src"],Azt=["src"],Mzt=["fill"],Izt=["fill"],Pzt=["src"],Bzt=["src"],Nzt=["fill"],zzt=["fill"],Ozt=["src"],Fzt=["src"],Lzt=["src"],Dzt=["src"],Rzt=["fill"],Vzt=["fill"];function $zt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Czt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Szt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(i.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(i.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Tzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.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:i.data.team_logo},null,10,Ezt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.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(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.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:i.data.player_country_flag},null,10,Azt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.emitEventMedia(i.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(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[1]||(r[1]=a=>c.emitEventMedia(i.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),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.numberOfVideosClass)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[2]||(r[2]=a=>c.clickExpand(i.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:i.colorArrow},null,8,Izt)],10,Mzt))],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(i.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(c.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:i.data.team_logo},null,10,Pzt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(i.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:i.data.team_logo},null,10,Bzt)],2),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedType1Class)},t.toDisplayString(i.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(i.data.frequency)+" ",1),i.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),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.ageType1Class)},t.toDisplayString(i.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedGamesType1Class)},t.toDisplayString(i.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(c.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedMinutesType1Class)},t.toDisplayString(i.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameType1Class)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.emitEventMedia(i.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(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[4]||(r[4]=a=>c.emitEventMedia(i.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(c.numberOfVideosType1Class)},t.toDisplayString(i.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[5]||(r[5]=a=>c.clickExpand(i.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:i.colorArrow},null,8,zzt)],10,Nzt))],2)],2)],6)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Ozt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},t.toDisplayString(i.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Fzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.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:i.data.team_logo},null,10,Lzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.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(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.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:i.data.player_country_flag},null,10,Dzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:B.elementSize.width<=680?"83px":i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[6]||(r[6]=a=>c.emitEventMedia(i.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.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,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[7]||(r[7]=a=>c.clickExpand(i.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:i.colorArrow},null,8,Vzt)],10,Rzt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const Tq=$i(JE,[["render",$zt],["__cssModules",{$style:kzt}]]),jzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},KE={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))}}},Eq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Aq=KE.setup;KE.setup=Aq?(e,r)=>(Eq(),Aq(e,r)):Eq;const Uzt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),Gzt=["src"],Hzt={key:1,class:"text"},Wzt=["src"],qzt={class:"stats"},Yzt=Uzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Xzt={class:"numstats"},Zzt={class:"leyend"};function Jzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Gzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",Hzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Wzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",qzt,[Yzt,t.createElementVNode("div",Xzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",Zzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const Kzt=jzt(KE,[["render",Jzt],["__scopeId","data-v-fb269a1e"]]),Qzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},QE={components:{GSCButton:Kzt},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)}},Mq=()=>{t.useCssVars(e=>({"132156c0":e.centerTextCustom,"096d3ecc":e.marginCustom}))},Iq=QE.setup;QE.setup=Iq?(e,r)=>(Mq(),Iq(e,r)):Mq;const eOt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},tOt={class:"gsc-filterperteam__panel-teams__cont-teams"},aOt=["onClick"],nOt=["src","alt","title"];function rOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(c.customStyleContain)},[t.createElementVNode("div",eOt,[t.createElementVNode("div",tOt,[i.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(m,{"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:c.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass([a.id==D.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:f=>c.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,nOt)],14,aOt))),128))])],512)],4)}const iOt=Qzt(QE,[["render",rOt],["__scopeId","data-v-ab79352d"]]),oOt={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"},eA={components:{GSCButton:kq},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)}}},Pq=()=>{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}))},Bq=eA.setup;eA.setup=Bq?(e,r)=>(Pq(),Bq(e,r)):Pq;const sOt=["src"],lOt=["src"],cOt=["src"],dOt=["src"],uOt=["fill"],hOt=["fill"],pOt=["src"],fOt=["fill"],mOt=["fill"];function gOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[i.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(i.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:i.data.photo},null,10,sOt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:i.data.logo},null,10,lOt)],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(i.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.clickEventMedia(i.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:i.data.logo},null,10,cOt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(m,{icon:"","icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.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:i.data.logo},null,10,dOt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:r[1]||(r[1]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.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:i.colorArrow},null,8,hOt)],10,uOt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.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(i.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:i.data.logo},null,10,pOt)],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(i.data.name_team),3),t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[2]||(r[2]=a=>c.clickEventMedia(i.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(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.clickEventMedia(i.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(i.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:r[4]||(r[4]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.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:i.colorArrow},null,8,mOt)],10,fOt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const yOt=$i(eA,[["render",gOt],["__cssModules",{$style:oOt}]]),vOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},tA={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))}}},Nq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},zq=tA.setup;tA.setup=zq?(e,r)=>(Nq(),zq(e,r)):Nq;const _Ot=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),bOt=["src"],xOt={key:1,class:"text"},wOt=["src"],kOt={class:"stats"},COt=_Ot(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),SOt={class:"numstats"},TOt={class:"leyend"};function EOt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,bOt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",xOt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,wOt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",kOt,[COt,t.createElementVNode("div",SOt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",TOt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const AOt=vOt(tA,[["render",EOt],["__scopeId","data-v-fb269a1e"]]),Oba="",Fba="",MOt={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"},aA={components:{GSCButton:AOt},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:r}=A_(e);return{myDivRef:e,elementSize:r}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},Oq=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},Fq=aA.setup;aA.setup=Fq?(e,r)=>(Oq(),Fq(e,r)):Oq;const ch=e=>(t.pushScopeId("data-v-5dd9e88d"),e=e(),t.popScopeId(),e),IOt={ref:"myDivRef"},POt=["src"],BOt=ch(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),NOt=ch(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),zOt=ch(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),OOt=ch(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),FOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),LOt=ch(()=>t.createElementVNode("span",null,"xG: ",-1)),DOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),ROt=ch(()=>t.createElementVNode("span",null,"xG: ",-1)),VOt=ch(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),$Ot=ch(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),jOt=ch(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),UOt=ch(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),GOt=ch(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),HOt=ch(()=>t.createElementVNode("span",null,"xG: ",-1));function WOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",IOt,[i.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,i.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[i.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(i.data.teams),3)],2)):t.createCommentVNode("",!0),i.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(i.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(i.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),i.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(i.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:i.data.countryFlag},null,8,POt)],2)],2)],2)):t.createCommentVNode("",!0),i.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(i.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[i.viewGames&&!i.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(i.data.games),3)],2)):t.createCommentVNode("",!0),i.viewMin&&!i.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(i.data.min),3)],2)):t.createCommentVNode("",!0),i.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(i.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.goals),3)],2)):t.createCommentVNode("",!0),i.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(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.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:r[0]||(r[0]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,i.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[BOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[NOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[zOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[OOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[FOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[LOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.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(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[DOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[ROt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.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)},[VOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[$Ot,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[jOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[UOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[GOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[HOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2)],2)],2),i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.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:r[1]||(r[1]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const Lq=$i(aA,[["render",WOt],["__cssModules",{$style:MOt}],["__scopeId","data-v-5dd9e88d"]]);/**
|
|
4159
4159
|
* Vue 3 Carousel 0.3.1
|
|
4160
4160
|
* (c) 2023
|
|
4161
4161
|
* @license MIT
|