@golstats/gsc-game-data 1.1.32 → 1.1.34

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.
@@ -4132,11 +4132,11 @@ uniform ${Fe} ${Ge} u_${rt};
4132
4132
  #endif
4133
4133
  `}),staticAttributes:D,staticUniforms:oe}}class Dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,p,D,V,J,oe,fe,xe,Ee){this.context=u;let Fe=this.boundPaintVertexBuffers.length!==V.length;for(let Ge=0;!Fe&&Ge<V.length;Ge++)this.boundPaintVertexBuffers[Ge]!==V[Ge]&&(Fe=!0);!this.vao||this.boundProgram!==p||this.boundLayoutVertexBuffer!==D||Fe||this.boundIndexBuffer!==J||this.boundVertexOffset!==oe||this.boundDynamicVertexBuffer!==fe||this.boundDynamicVertexBuffer2!==xe||this.boundDynamicVertexBuffer3!==Ee?this.freshBind(p,D,V,J,oe,fe,xe,Ee):(u.bindVertexArray.set(this.vao),fe&&fe.bind(),J&&J.dynamicDraw&&J.bind(),xe&&xe.bind(),Ee&&Ee.bind())}freshBind(u,p,D,V,J,oe,fe,xe){const Ee=u.numAttributes,Fe=this.context,Ge=Fe.gl;this.vao&&this.destroy(),this.vao=Fe.createVertexArray(),Fe.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=p,this.boundPaintVertexBuffers=D,this.boundIndexBuffer=V,this.boundVertexOffset=J,this.boundDynamicVertexBuffer=oe,this.boundDynamicVertexBuffer2=fe,this.boundDynamicVertexBuffer3=xe,p.enableAttributes(Ge,u);for(const rt of D)rt.enableAttributes(Ge,u);oe&&oe.enableAttributes(Ge,u),fe&&fe.enableAttributes(Ge,u),xe&&xe.enableAttributes(Ge,u),p.bind(),p.setVertexAttribPointers(Ge,u,J);for(const rt of D)rt.bind(),rt.setVertexAttribPointers(Ge,u,J);oe&&(oe.bind(),oe.setVertexAttribPointers(Ge,u,J)),V&&V.bind(),fe&&(fe.bind(),fe.setVertexAttribPointers(Ge,u,J)),xe&&(xe.bind(),xe.setVertexAttribPointers(Ge,u,J)),Fe.currentNumAttributes=Ee}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const va=(R,u,p,D,V)=>({u_matrix:R,u_texture:0,u_ele_delta:u,u_fog_matrix:p,u_fog_color:D?D.properties.get("fog-color"):r.aN.white,u_fog_ground_blend:D?D.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:D?D.calculateFogBlendOpacity(V):0,u_horizon_color:D?D.properties.get("horizon-color"):r.aN.white,u_horizon_fog_blend:D?D.properties.get("horizon-fog-blend"):1});function wa(R){const u=[];for(let p=0;p<R.length;p++){if(R[p]===null)continue;const D=R[p].split(" ");u.push(D.pop())}return u}class tr{constructor(u,p,D,V,J,oe){const fe=u.gl;this.program=fe.createProgram();const xe=wa(p.staticAttributes),Ee=D?D.getBinderAttributes():[],Fe=xe.concat(Ee),Ge=br.prelude.staticUniforms?wa(br.prelude.staticUniforms):[],rt=p.staticUniforms?wa(p.staticUniforms):[],ct=D?D.getBinderUniforms():[],pt=Ge.concat(rt).concat(ct),xt=[];for(const Yt of pt)xt.indexOf(Yt)<0&&xt.push(Yt);const Mt=D?D.defines():[];J&&Mt.push("#define OVERDRAW_INSPECTOR;"),oe&&Mt.push("#define TERRAIN3D;");const Tt=Mt.concat(br.prelude.fragmentSource,p.fragmentSource).join(`
4134
4134
  `),jt=Mt.concat(br.prelude.vertexSource,p.vertexSource).join(`
4135
- `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[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(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(p){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(p,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,p){const D=1/St(p,1,u.transform.tileZoom),V=Math.pow(2,p.tileID.overscaledZ),J=p.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(p.tileID.canonical.x+p.tileID.wrap*V),fe=J*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,p,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+p,u_opacity:D}},vr=(R,u,p,D,V,J,oe)=>r.e(ar(R,u,p,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,p,D)=>r.e(mr(R),Va(p,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,p,D,V)=>r.e(Br(R,u,p,D),{u_world:V}),Ua=(R,u,p,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(p,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,p,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,p)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:p.cameraToCenterDistance,u_viewport_size:[p.width,p.height]}),fa=(R,u,p=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:p}),Oa=R=>({u_matrix:R}),za=(R,u,p,D)=>({u_matrix:R,u_extrude_scale:St(u,1,p),u_intensity:D}),Wa=(R,u,p,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:p,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,p,D)=>{const V=p.paint.get("hillshade-shadow-color"),J=p.paint.get("hillshade-highlight-color"),oe=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-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[p.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const p=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[p,p],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const p=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/p).toLngLat().lat,new r.Z(0,(D+1)/p).toLngLat().lat]}const oa=(R,u,p,D)=>{const V=R.transform;return{u_matrix:cr(R,u,p,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,p,D,V)=>r.e(oa(R,u,p,V),{u_image:0,u_image_height:D}),Ja=(R,u,p,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,p,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,p,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=p.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,p,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,p,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}const Ar=(R,u,p,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:p,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),p=Math.cos(R);return[(2*p+1)/3,(-Math.sqrt(3)*u-p+1)/3,(Math.sqrt(3)*u-p+1)/3]}const Pr=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,p)=>({u_matrix:R,u_opacity:u,u_color:p}),Kr=(R,u,p,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,p,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,p,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){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,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _n{constructor(u,p,D,V){this.length=p.length,this.attributes=D,this.itemSize=p.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,p){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=p.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,p,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=p.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Ln=new WeakMap;function mi(R){var u;if(Ln.has(R))return Ln.get(R);{const p=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Ln.set(R,p),p}}class Mn{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class mo extends Mn{getDefault(){return r.aN.transparent}set(u){const p=this.current;(u.r!==p.r||u.g!==p.g||u.b!==p.b||u.a!==p.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends Mn{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends Mn{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class Jo extends Mn{getDefault(){return[!0,!0,!0,!0]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||u[3]!==p[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends Mn{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends Mn{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class ss extends Mn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const p=this.current;(u.func!==p.func||u.ref!==p.ref||u.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class wo extends Mn{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Xo extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=u,this.dirty=!1}}class gs extends Mn{getDefault(){return[0,1]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Ro extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends Mn{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.BLEND):p.disable(p.BLEND),this.current=u,this.dirty=!1}}class El extends Mn{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Yo extends Mn{getDefault(){return r.aN.transparent}set(u){const p=this.current;(u.r!==p.r||u.g!==p.g||u.b!==p.b||u.a!==p.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class rl extends Mn{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Cs extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends Mn{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends Mn{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends Mn{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class nl extends Mn{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Gs extends Mn{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||u[3]!==p[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Hs extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindTexture(p.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class il extends Mn{getDefault(){return null}set(u){const p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Lo extends Mn{getDefault(){return null}set(u){var p;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(p=D.getExtension("OES_vertex_array_object"))===null||p===void 0||p.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends Mn{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Wl extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends Mn{constructor(u,p){super(u),this.context=u,this.parent=p}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===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,u,0),this.current=u,this.dirty=!1}}class Ts extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_ATTACHMENT,p.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===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,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,p,D,V,J){this.context=u,this.width=p,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Ts(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,p=this.colorAttachment.get();if(p&&u.deleteTexture(p),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,p,D){this.blendFunction=u,this.blendColor=p,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var p,D;if(this.gl=u,this.clearColor=new mo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new Jo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new ss(this),this.stencilOp=new wo(this),this.stencilTest=new Xo(this),this.depthRange=new gs(this),this.depthTest=new Ro(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Yo(this),this.blendEquation=new rl(this),this.cullFace=new Cs(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new nl(this),this.viewport=new Gs(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Hs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new il(this),this.bindVertexArray=new Lo(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new Wl(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(p=u.RGBA16F)!==null&&p!==void 0?p:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.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(u,p){return new zr(this,u,p)}createVertexBuffer(u,p,D){return new _n(this,u,p,D)}createRenderbuffer(u,p,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,p,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,p,D,V){return new Bu(this,u,p,D,V)}clear({color:u,depth:p,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var p;return mi(this.gl)?this.gl.deleteVertexArray(u):(p=this.gl.getExtension("OES_vertex_array_object"))===null||p===void 0?void 0:p.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Wn{constructor(u,p,D){this.func=u,this.mask=p,this.range=D}}Wn.ReadOnly=!1,Wn.ReadWrite=!0,Wn.disabled=new Wn(519,Wn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,p,D,V,J,oe){this.test=u,this.ref=p,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,p,D){this.enable=u,this.mode=p,this.frontFace=D}}let As;function ls(R,u,p,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(p);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,Wn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),p.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!As||As.length<2*Ee)&&(As=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(As,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,Wn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),p.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,p,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);ko(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,p,u,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),V),p.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,p,D,!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"),J,oe),p.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,p,D,!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"),J,oe),u.map.showCollisionBoxes&&(ls(R,u,p,D,!0),ls(R,u,p,D,!1))}function cs(R,u,p,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*p;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function ys(R,u,p,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return p||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(p){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function ko(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:p,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=p?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;p&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=cs(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=ys(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let qr=0;qr<Et.numGlyphs;qr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,p){return p.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&p.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!p.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,Wn.ReadOnly),_a=p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(p);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(p.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),qr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Cn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Cn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=p.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=p.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,_s)=>R.style.map.terrain.getElevation(Ga,Xi,_s):null,Ao=p.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,Ao,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&p.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Fs;Fs=nr?gr.iconsInText?Cr(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Fs,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Cn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const Ao of Nn)Da.push({segments:new r.a0([Ao]),sortKey:Ao.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,p,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,p,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,p,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,p.id,R.layoutVertexBuffer,R.indexBuffer,u,p.paint,D.transform.zoom,R.programConfigurations.get(p.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,p,D){if(p.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,p),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(p);if(!Ge)continue;const rt=Ge.programConfigurations.get(p.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,Wn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,p.paint.get("heatmap-intensity")),null,p.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,p.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,Wn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,Wa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,p))}function Ol(R,u,p,D,V){if(!p||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[p.to.toString()],fe=J[p.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,p,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=p.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=p.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(p);if(!Jt)continue;const Kt=Jt.programConfigurations.get(p.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,p);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,p.id,Jt.layoutVertexBuffer,xt,Mt,p.paint,R.transform.zoom,Kt)}}function wc(R,u,p,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=p.paint.get(Ee),Ge=Fe.constantOr(1),rt=p.getCrossfadeParameters(),ct=p.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(p);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(p.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,p);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Yt=p.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,p.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,p.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,p,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=p.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,p,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,p,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,p.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function Es(R,u,p,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=f.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=p.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Zs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Ms=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),qc=new r.aN(0,1,1,1);function Wc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Zs),zc(R,u.bottom||0,3,Dl),Bo(R,u.left||0,3,Ms),Bo(R,R.transform.width-(u.right||0),3,ti);const p=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,p.x,R.transform.height-p.y,qc)}function zc(R,u,p,D){Sc(R,0,u+p/2,R.transform.width,p,D)}function Bo(R,u,p,D){Sc(R,u-p/2,0,p,R.transform.height,D)}function Sc(R,u,p,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,p*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,p){const D=R.context,V=D.gl,J=p.posMatrix,oe=R.useProgram("debug"),fe=Wn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(p);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(p.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(p).tileSize,Mt=512/Math.min(xt,512)*(p.overscaledZ/R.transform.zoom)*.5;let Tt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Tt+=` => ${p.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.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(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,p){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new Wn(V.LEQUAL,Wn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of p){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,p,D){this.vertexBuffer=u,this.indexBuffer=p,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,p){this.context=new _c(u),this.transform=p,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=qe.maxUnderzooming+qe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,p,D){if(this.width=Math.floor(u*D),this.height=Math.floor(p*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,p=new r.aX;p.emplaceBack(0,0),p.emplaceBack(r.X,0),p.emplaceBack(0,r.X),p.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(p,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,p=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[p.drawingBufferWidth,p.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,p.TRIANGLES,Wn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,p){if(this.currentStencilSource===u.source||!u.isTileClipped()||!p||!p.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+p.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(Wn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of p){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,Wn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,p=this.context.gl;return new _i({func:p.NOTEQUAL,mask:255},u,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(u){const p=this.context.gl;return new _i({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(u){const p=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:p.GEQUAL,mask:255},fe+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,p,D){if(!this.opaquePassEnabledForLayer())return Wn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Wn(D||this.context.gl.LEQUAL,p,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,p){var D;this.style=u,this.options=p,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(f.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:p.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new Wn(rt.LEQUAL,Wn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=p.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&Wc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const p=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(p,D):!r.a$(p,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(p,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new Wn(xe.LEQUAL,Wn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new Wn(xe.LEQUAL,Wn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,p,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,p,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,Wn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,p,D,V);break;case"heatmap":zl(u,p,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,Wn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const qr=oe.getSource().maxzoom,Er=Yt.canonical.z===qr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,p,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?Wn.ReadWrite:Wn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,Wn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,p,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new Wn(J.context.gl.LEQUAL,Wn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,p,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,Wn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,p,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?Wn.ReadWrite:Wn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=Es(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,p,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?Wn.ReadWrite:Wn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new Wn(J.context.gl.LEQUAL,Wn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,Wn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,p,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(p,D[0],this.transform.zoom),J?D[1]:St(p,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const p=this._tileTextures[u.size[0]];p?p.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const p=this._tileTextures[u];return p&&p.length>0?p.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const p=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!p||!D}useProgram(u,p){this.cache=this.cache||{};const D=u+(p?p.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],p,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}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 u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:p}=this.context.gl;return this.width!==u||this.height!==p}}class qs{constructor(u,p){this.points=u,this.planes=p}static fromInvProjectionMatrix(u,p,D){const V=Math.pow(2,D),J=[[-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 xe=1/(fe=r.ag([],fe,u))[3]/p*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new qs(J,oe)}}class Is{constructor(u,p){this.min=u,this.max=p,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const p=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<p.length;J++)D[J]=p[J]?this.min[J]:this.center[J],V[J]=p[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Is(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){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 D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<p.length;fe++)r.b2(J,p[fe])>=0&&oe++;if(oe===0)return 0;oe!==p.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,p=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(p)||p<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=p,this.left=D,this.right=V}interpolate(u,p,D){return p.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,p.top,D)),p.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,p.bottom,D)),p.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,p.left,D)),p.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,p.right,D)),this}getCenter(u,p){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+p-this.bottom)/2,0,p);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,p,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=p||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const p=-r.b3(u,-180,180)*Math.PI/180;this.angle!==p&&(this._unmodified=!1,this.angle=p,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const p=r.ad(u,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(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const p=Math.min(Math.max(u,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(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,p,D){this._unmodified=!1,this._edgeInsets.interpolate(u,p,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const p=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,p)}getVisibleUnwrappedCoordinates(u){const p=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&p.push(new r.b4(Fe,u))}return p}coveringTiles(u){var p,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=qs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Is([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(p=pr.minElevation)!==null&&p!==void 0?p:this.elevation,qr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Is([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],qr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,p){this.width=u,this.height=p,this.pixelsToGLUnits=[2/u,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const p=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(p)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.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(u){const p=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+p-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,p){const D=this.pointCoordinate(p),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,p){return p?this.coordinatePoint(this.locationCoordinate(u),p.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,p){return this.coordinateLocation(this.pointCoordinate(u,p))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,p){if(p){const pt=p.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,p=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,p,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([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(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const p=u.canonical,D=this.worldSize/this.zoomScale(p.z),V=p.x+Math.pow(2,p.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,p.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,p=!1){const D=u.key,V=p?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,p?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const p=u.key,D=this._fogMatrixCache;if(D[p])return D[p];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[p]=new Float32Array(V),D[p]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,p){p=r.ad(+p,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:p};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:p,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=p,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,p=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+p.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+p.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-p.x/this.width,J[9]=2*p.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-p.x/this.width,this.fogMatrix[9]=2*p.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),p=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(p,p,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,p=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,p))}getCameraQueryGeometry(u){const p=this.getCameraPoint();if(u.length===1)return[u[0],p];{let D=p.x,V=p.y,J=p.x,oe=p.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,p){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,p,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let p,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,p),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,p=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const p=window.location.hash.replace("#","");if(this._hashName){let D;return p.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return p.split("/")},this._onHashChange=()=>{const p=this._getCurrentHash();if(p.length>=3&&!p.some(D=>isNaN(D))){const D=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:D,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 D=p.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,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(u){const p=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(p.lng*J)/J,fe=Math.round(p.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const $o={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},$o),hi=r.e({deceleration:20,maxSpeed:1400},$o),Ps=r.e({deceleration:1e3,maxSpeed:360},$o),Tc=r.e({deceleration:1e3,maxSpeed:90},$o);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:f.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,p=f.now();for(;u.length>0&&p-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)p.zoom+=J.zoomDelta||0,p.bearing+=J.bearingDelta||0,p.pitch+=J.pitchDelta||0,J.panDelta&&p.pan._add(J.panDelta),J.around&&(p.around=J.around),J.pinchAround&&(p.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(p.pan.mag()){const J=Xl(p.pan.mag(),D,r.e({},li,u||{}));V.offset=p.pan.mult(J.amount/p.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(p.zoom){const J=Xl(p.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(p.bearing){const J=Xl(p.bearing,D,Ps);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(p.pitch){const J=Xl(p.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=p.pinchAround===void 0?p.around:p.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,p){const{maxSpeed:D,linearity:V,deceleration:J}=p,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:p.easing,duration:1e3*fe,amount:oe*(fe/2)}}class zo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D,V={}){const J=n.mousePos(p.getCanvas(),D),oe=p.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=p}}class So extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(p.getCanvasContainer(),V),oe=J.map(xe=>p.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:p.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class ol extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,p){this._map=u,this._clickTolerance=p.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new ol(u.type,this._map,u))}mousedown(u,p){return this._mousedownPos=p,this._firePreventable(new zo(u.type,this._map,u))}mouseup(u){this._map.fire(new zo(u.type,this._map,u))}click(u,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||this._map.fire(new zo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new zo(u.type,this._map,u))}mouseover(u){this._map.fire(new zo(u.type,this._map,u))}mouseout(u){this._map.fire(new zo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new So(u.type,this._map,u))}touchmove(u){this._map.fire(new So(u.type,this._map,u))}touchend(u){this._map.fire(new So(u.type,this._map,u))}touchcancel(u){this._map.fire(new So(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Vo{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new zo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new zo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new zo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}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(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class Co{constructor(u,p){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.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(u,p){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(u,p){if(!this._active)return;const D=p;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,p){if(!this._active||u.button!==0)return;const D=this._startPos,V=p;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,p){return this._map.fire(new r.k(u,{originalEvent:p}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const p={};for(let D=0;D<R.length;D++)p[R[D].identifier]=u[D];return p}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,p,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(p),this.touches=gi(D,p)))}touchmove(u,p,D){if(this.aborted||!this.centroid)return;const V=gi(D,p);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,p,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,p,D){this.singleTap.touchstart(u,p,D)}touchmove(u,p,D){this.singleTap.touchmove(u,p,D)}touchend(u,p,D){const V=this.singleTap.touchend(u,p,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class go{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,p,D){this._zoomIn.touchstart(u,p,D),this._zoomOut.touchstart(u,p,D)}touchmove(u,p,D){this._zoomIn.touchmove(u,p,D),this._zoomOut.touchmove(u,p,D)}touchend(u,p,D){const V=this._zoomIn.touchend(u,p,D),J=this._zoomOut.touchend(u,p,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class To{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const p=this._moveFunction(...u);if(p.bearingDelta||p.pitchDelta||p.around||p.panDelta)return this._active=!0,p}dragStart(u,p){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=p.length?p[0]:p,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,p){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=p.length?p[0]:p;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const sl={0:1,2:2};class us{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const p=n.mouseButton(u);this._eventButton=p}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(p,D){const V=sl[D];return p.buttons===void 0||(p.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const p=u.targetTouches[0].identifier;this._firstTouch=p}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const Oo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:p=.8})=>{const D=new us({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new To({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*p}),moveStateManager:D,enable:R,assignEvents:Oo})},ll=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:p=-.5})=>{const D=new us({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new To({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*p}),moveStateManager:D,enable:R,assignEvents:Oo})};class Ls{constructor(u,p){this._clickTolerance=u.clickTolerance||1,this._map=p,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,p,D){return this._calculateTransform(u,p,D)}touchmove(u,p,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,p,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,p,D){this._calculateTransform(u,p,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,p,D){D.length>0&&(this._active=!0);const V=gi(D,p),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class yo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,p,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([p[0],p[1]]))}touchmove(u,p,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,p,V),fe=vi(D,p,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,p,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,p,V),fe=vi(D,p,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,p){for(let D=0;D<R.length;D++)if(R[D].identifier===p)return u[D]}function Bs(R,u){return Math.log(R/u)/Math.LN2}class yn extends yo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,p){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Bs(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Bs(this._distance,D),pinchAround:p}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends yo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,p,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:p}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const p=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<p}}function cl(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends yo{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,p,D){super.touchstart(u,p,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,cl(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,p,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,p,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=p.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==p.y>0;return cl(u)&&cl(p)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const p=Cl;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let p=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:p?Math.round(xe.zoom)+p*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}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 Zr(R){return R*(2-R)}const ds=4.000244140625;class ul{constructor(u,p){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let p=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=f.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,p!==0&&p%ds==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),u.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=u,this._delta-=p,this._active||this._start(u)),u.preventDefault()}_start(u){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=n.mousePos(this._map.getCanvas(),u),D=this._tr;p.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(p)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>ds?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const p=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=f.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,p,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=p,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let p=r.b9;if(this._prevEase){const D=this._prevEase,V=(f.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);p=r.b8(oe,fe,.25,1)}return this._prevEase={start:f.now(),duration:u,easing:p},p}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,p){this._clickZoom=u,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 Ko{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,p){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(p)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dl{constructor(){this._tap=new yi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,p,D){if(!this._swipePoint)if(this._tapTime){const V=p[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,p,D)}touchmove(u,p,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=p[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,p,D)}touchend(u,p,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,p,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zs{constructor(u,p,D){this._el=u,this._mousePan=p,this._touchPan=D}enable(u){this._inertiaOptions=u||{},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 jo{constructor(u,p,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=p,this._mousePitch=D}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 hl{constructor(u,p,D,V){this._el=u,this._touchZoom=p,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),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 vs{constructor(u,p){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=p,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let p=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(p=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=p,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.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(u){return u[this._bypassKey]}notifyGestureBlocked(u,p){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:p})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Qo=R=>R.zoom||R.drag||R.pitch||R.rotate;class Os extends r.k{}function pn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,p){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||pn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||pn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(p);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,p,D]of this._listeners)n.removeEventListener(u,p,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const p=this._map,D=p.getCanvasContainer();this._add("mapEvent",new hc(p,u));const V=p.boxZoom=new Co(p,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=p.cooperativeGestures=new vs(p,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new go(p),fe=new Ko(p);p.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&p.doubleClickZoom.enable();const xe=new dl;this._add("tapDragZoom",xe);const Ee=p.touchPitch=new Rl(p);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&p.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=ll(u);p.dragRotate=new jo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&p.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new us({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new To({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:Oo})})(u),ct=new Ls(u,p);p.dragPan=new zs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&p.dragPan.enable(u.dragPan);const pt=new Jc,xt=new yn;p.touchZoomRotate=new hl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&p.touchZoomRotate.enable(u.touchZoomRotate);const Mt=p.scrollZoom=new ul(p,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&p.scrollZoom.enable(u.scrollZoom);const Tt=p.keyboard=new pc(p);this._add("keyboard",Tt),u.interactive&&u.keyboard&&p.keyboard.enable(),this._add("blockableMapEvent",new Vo(p))}_add(u,p,D){this._handlers.push({handlerName:u,handler:p,allowed:D}),this._handlersById[u]=p}stop(u){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Qo(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,p,D){for(const V in u)if(V!==D&&(!p||p.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const p=[];for(const D of u){const V=D.target;this._el.contains(V)&&p.push(D)}return p}mergeHandlerResult(u,p,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(p.zoom=oe),D.panDelta!==void 0&&(p.drag=oe),D.pitchDelta!==void 0&&(p.pitch=oe),D.bearingDelta!==void 0&&(p.rotate=oe)}_applyChanges(){const u={},p={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(p,J),r.e(D,oe);this._updateMapTransform(u,p,D),this._changes=[]}_updateMapTransform(u,p,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(pn(u)||oe&&this._terrainMovement))return this._fireEvents(p,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!p.drag&&!p.zoom?p.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(p,D,!0)}_fireEvents(u,p,D){const V=Qo(this._eventsInProgress),J=Qo(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=p[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Qo(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&f.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,p){this._map.fire(new r.k(u,p?{originalEvent:p}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new Os("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,p){super(),this._renderFrameCallback=()=>{const D=Math.min((f.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=p.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,p){return this.jumpTo({center:u},p)}panBy(u,p,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},p),D)}panTo(u,p,D){return this.easeTo(r.e({center:u},p),D)}getZoom(){return this.transform.zoom}setZoom(u,p){return this.jumpTo({zoom:u},p),this}zoomTo(u,p,D){return this.easeTo(r.e({zoom:u},p),D)}zoomIn(u,p){return this.zoomTo(this.getZoom()+1,u,p),this}zoomOut(u,p){return this.zoomTo(this.getZoom()-1,u,p),this}getBearing(){return this.transform.bearing}setBearing(u,p){return this.jumpTo({bearing:u},p),this}getPadding(){return this.transform.padding}setPadding(u,p){return this.jumpTo({padding:u},p),this}rotateTo(u,p,D){return this.easeTo(r.e({bearing:u},p),D)}resetNorth(u,p){return this.rotateTo(0,r.e({duration:1e3},u),p),this}resetNorthPitch(u,p){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),p),this}snapToNorth(u,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,p):this}getPitch(){return this.transform.pitch}setPitch(u,p){return this.jumpTo({pitch:u},p),this}cameraForBounds(u,p){u=Ce.convert(u);const D=p&&p.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,p)}_cameraForBoxAndBearing(u,p,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,p),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,p,D){return this._fitInternal(this.cameraForBounds(u,p),p,D)}fitScreenCoordinates(u,p,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(p)),D,V),V,J)}_fitInternal(u,p,D){return u?(delete(p=r.e(u,p)).padding,p.linear?this.easeTo(p,D):this.flyTo(p,D)):this}jumpTo(u,p){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",p)).fire(new r.k("move",p)),V&&this.fire(new r.k("zoomstart",p)).fire(new r.k("zoom",p)).fire(new r.k("zoomend",p)),J&&this.fire(new r.k("rotatestart",p)).fire(new r.k("rotate",p)).fire(new r.k("rotateend",p)),oe&&this.fire(new r.k("pitchstart",p)).fire(new r.k("pitch",p)).fire(new r.k("pitchend",p)),this.fire(new r.k("moveend",p))}calculateCameraOptionsFromTo(u,p,D,V=0){const J=r.Z.fromLngLat(u,p),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,p){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&f.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(p,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(p)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(p,da)},u),this}_prepareEase(u,p,D={}){this._moving=!0,p||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const p=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&p!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(p-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=p}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_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(u){const p=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(p.lngLat,u.zoom);if(p.altitude<D){const V=this.calculateCameraOptionsFromTo(p.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const p=[];if(this.terrain&&p.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&p.push(V=>this.transformCameraUpdate(V)),!p.length)return;const D=u.clone();for(const V of p){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,p){if(this._easeId&&p&&this._easeId===p)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,p){var D;if(!u.essential&&f.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,p)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,p);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(p,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(p)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(p)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,p){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,p)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,p,D){D.animate===!1||D.duration===0?(u(1),p()):(this._easeStart=f.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,p){u=r.b3(u,-180,180);const D=Math.abs(u-p);return Math.abs(u-360-p)<D&&(u-=360),Math.abs(u+360-p)<D&&(u+=360),u}_normalizeCenter(u,p){if(!p.renderWorldCopies||p.lngRange)return;const D=u.lng-p.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const Uo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class hs{constructor(u=Uo){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=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.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(){n.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(u,p){const D=this._map._getUIString(`AttributionControl.${p}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const p=this._map.style.sourceCaches;for(const V in p){const J=p[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class vo{constructor(u={}){this._updateCompact=()=>{const p=this._container.children;if(p.length){const D=p[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const p=n.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(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const p=++this._id;return this._queue.push({callback:u,id:p,cancelled:!1}),p}remove(u){const p=this._currentlyRunning,D=p?this._queue.concat(p):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const p=this._currentlyRunning=this._queue;this._queue=[];for(const D of p)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Go extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,p){this.sourceCache.update(u,p),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:p}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const p in this._tiles){const D=this._tiles[p];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const p={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),p[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),p[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),p[D]=J}}return p}getSourceTile(u,p){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&p)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(p=>p.timeAdded>=u)}}class ii{constructor(u,p,D){this.painter=u,this.sourceCache=new Go(p),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,p,D,V=r.X){var J;if(!(p>=0&&p<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[p/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,p){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,p);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,p,D,V=r.X){return this.getDEMElevation(u,p,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const p=this.sourceCache.getSourceTile(u,!0);if(p&&p.dem&&(!p.demTexture||p.needsTerrainPrepare)){const V=this.painter.context;p.demTexture=this.painter.getTileTexture(p.dem.stride),p.demTexture?p.demTexture.update(p.dem.getPixels(),{premultiply:!1}):p.demTexture=new z(V,p.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),p.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),p.needsTerrainPrepare=!1}const D=p&&p+p.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-p.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:p&&p.dem&&p.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.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(u){const p=this.painter,D=p.width/devicePixelRatio,V=p.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(p.context,{width:D,height:V,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 z(p.context,{width:D,height:V,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(D,V,!0,!1),this._fbo.depthAttachment.set(p.context.createRenderbuffer(p.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const p=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)p[oe+0]=255&fe,p[oe+1]=255&J,p[oe+2]=fe>>8<<4|J>>8,p[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(p.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const p=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,p),D.bindFramebuffer.set(null);const xe=p[0]+(p[2]>>4<<8),Ee=p[1]+((15&p[2])<<8),Fe=this.coordsIndex[255-p[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const p=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,p),D.bindFramebuffer.set(null),(p[0]/16777216+p[1]/65536+p[2]/256+p[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,p=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)p.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=p.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])p.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=p.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])p.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(p,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,p.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,p){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,p);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const p=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return p&&p.dem&&(D.minElevation=p.dem.min*this.exaggeration,D.maxElevation=p.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,p){const D=r.Z.fromLngLat(u.wrap()),V=(1<<p)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(p,0,p,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,p,D){this._context=u,this._size=p,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const p=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.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(D.texture),{id:u,fbo:p,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(p=>u.id!==p),this._recentlyUsed.push(u.id)}stampObject(u){u.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 u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const bs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Js{constructor(u,p){this.painter=u,this.terrain=p,this.pool=new Vl(u.context,30,p.sourceCache.tileSize*p.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,p){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(p)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(bs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const p=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(bs[p]&&(this._prevType&&bs[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(bs[this._prevType]||bs[p]&&V){this._prevType=p;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),bs[p]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Mc=_,pl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Uo,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:r.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},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Ds={showCompass:!0,showZoom:!0,visualizePitch:!1};class Wr{constructor(u,p,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.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 V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=p,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new To({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=ll({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new To({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(p,"mousedown",this.mousedown),n.addEventListener(p,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(p,"touchcancel",this.reset)}startMouse(u,p){this.mouseRotate.dragStart(u,p),this.mousePitch&&this.mousePitch.dragStart(u,p),n.disableDrag()}startTouch(u,p){this.touchRotate.dragStart(u,p),this.touchPitch&&this.touchPitch.dragStart(u,p),n.disableDrag()}moveMouse(u,p){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,p)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,p)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,p){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,p)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,p)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Sn;function es(R,u,p){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=p.locationPoint(R).distSqr(u);p.locationPoint(V).distSqr(u)<oe?R=V:p.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-p.center.lng)>180;){const V=p.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=p.width&&V.y<=p.height)break;R.lng>p.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&p.locationPoint(R).y>p.height/2-p.getHorizon()?R:D}const Ns={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 fl(R,u,p){const D=R.classList;for(const V in Ns)D.remove(`maplibregl-${p}-anchor-${V}`);D.add(`maplibregl-${p}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=p=>{const D=p.code,V=p.charCode||p.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=p=>{const D=p.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=p=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((p==null?void 0:p.type)==="terrain"||(p==null?void 0:p.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=es(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.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 J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||p&&p.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ns[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),f.frameAsync(new AbortController).then(()=>{this._updateOpacity(p&&p.type==="moveend")}).catch(()=>{})},this._onMove=p=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=D}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 r.k("dragstart"))),this.fire(new r.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 r.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=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const p=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height",`${D}px`),p.setAttributeNS(null,"width",`${V}px`),p.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.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"),Ee.appendChild(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),p.appendChild(oe),p.setAttributeNS(null,"height",D*this._scale+"px"),p.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(p),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",p=>{p.preventDefault()}),this._element.addEventListener("mousedown",p=>{p.preventDefault()}),fl(this._element,this._anchor,"marker"),u&&u.className)for(const p of u.className.split(" "))this._element.classList.add(p);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.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),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var p,D;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(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(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(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,p){return u===void 0&&p===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),p!==void 0&&(this._opacityWhenCovered=p),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class mn extends r.E{constructor(u){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new r.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 r.k("geolocate",p)),this._finish()}},this._updateCamera=p=>{const D=new r.N(p.coords.longitude,p.coords.latitude),V=p.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const D=new r.N(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).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 D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.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=n.create("button","maplibregl-ctrl-geolocate",this._container),n.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){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({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",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(p=!1){if(Sn!==void 0&&!p)return Sn;if(window.navigator.permissions===void 0)return Sn=!!window.navigator.geolocation,Sn;try{Sn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Sn=!!window.navigator.geolocation}return Sn})}().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(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const p=this._map.getMaxBounds(),D=u.coords;return p&&(D.longitude<p.getWest()||D.longitude>p.getEast()||D.latitude<p.getSouth()||D.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 u=this._map.getBounds(),p=u.getSouthEast(),D=u.getNorthEast(),V=p.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.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 r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!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 r.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 r.k("trackuserlocationstart")),this.fire(new r.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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 an={maxWidth:100,unit:"metric"};function wi(R,u,p){const D=p&&p.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(p&&p.unit==="imperial"){const xe=3.2808*fe;xe>5280?bo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):bo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?bo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?bo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):bo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function bo(R,u,p,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(p),J=V/p;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var p;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((p=D==null?void 0:D.shadowRoot)===null||p===void 0)&&p.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.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(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.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 ts={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends r.E{constructor(u){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.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 r.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 D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);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=es(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!p)return;const J=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 oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ns[oe]} translate(${xe.x}px,${xe.y}px)`),fl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(ts),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const p=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)p.appendChild(V);return this.setDOMContent(p)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;h.AJAXError=r.bg,h.Evented=r.E,h.LngLat=r.N,h.MercatorCoordinate=r.Z,h.Point=r.P,h.addProtocol=r.bh,h.config=r.a,h.removeProtocol=r.bi,h.AttributionControl=hs,h.BoxZoomHandler=Co,h.CanvasSource=Ae,h.CooperativeGesturesHandler=vs,h.DoubleClickZoomHandler=Ti,h.DragPanHandler=zs,h.DragRotateHandler=jo,h.EdgeInsets=Nl,h.FullscreenControl=Ul,h.GeoJSONSource=Pe,h.GeolocateControl=mn,h.Hash=eo,h.ImageSource=Ie,h.KeyboardHandler=pc,h.LngLatBounds=Ce,h.LogoControl=vo,h.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},pl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const p=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(p).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new hs(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new vo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(p,D.firstChild):D.appendChild(p),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,p,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,p,D)}resize(R){var u;const p=this._containerDimensions(),D=p[0],V=p[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:p,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>p?p/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,p){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:p,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,p.call(this,new zo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:p,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,p.call(this,new zo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,p.call(this,new zo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,p.call(this,V),delete V.features)};return{layer:u,listener:p,delegates:{[R]:D}}}}on(R,u,p){if(p===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,p){if(p===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,p);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,p){return p===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===p){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let p;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")p=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);p=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(p,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const p=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,p):this.style.loadJSON(R,u,p),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const p=R,D=this._requestManager.transformRequest(p,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(p){r.w(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const p in this.style._layers){const D=this.style._layers[p];D.type==="hillshade"&&D.source===R.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ii(this.painter,u,R),this.painter.renderToTexture=new Js(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=p=>{p.dataType==="style"?this.terrain.sourceCache.freeRtt():p.dataType==="source"&&p.tile&&(p.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(p.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const p=R[u]._tiles;for(const D in p){const V=p[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,p={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=p;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.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:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=f.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const p=this.style.getImage(R);if(!p)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?f.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.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(V!==p.data.width||J!==p.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return p.data.replace(oe,fe),this.style.updateImage(R,p),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,p){return this.style.setLayerZoomRange(R,u,p),this._update(!0)}setFilter(R,u,p={}){return this.style.setFilter(R,u,p),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,p,D={}){return this.style.setPaintProperty(R,u,p,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,p,D={}){return this.style.setLayoutProperty(R,u,p,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,p={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,p,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,p=>{p||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),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(),D=this._getClampedPixelRatio(p[0],p[1]);this._resizeCanvas(p[0],p[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,p){this._canvas.width=Math.floor(p*R),this._canvas.height=Math.floor(p*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const p=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!p){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(p,this.transform),i.testSupport(p)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let p=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=f.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(p=!0,this._crossFadingFactor=fe),this.style.update(oe)}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,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||p)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const p of this._controls)p.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},h.MapMouseEvent=zo,h.MapTouchEvent=So,h.MapWheelEvent=ol,h.Marker=Oi,h.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),p=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=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=u},this._setButtonTitle=(u,p)=>{const D=this._map._getUIString(`NavigationControl.${p}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Ds,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Wr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,u){const p=n.create("button",R,this._container);return p.type="button",p.addEventListener("click",u),p}},h.Popup=kt,h.RasterDEMTileSource=He,h.RasterTileSource=ze,h.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},h.ScrollZoomHandler=ul,h.Style=Vr,h.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=R}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.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(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},h.TwoFingersTouchPitchHandler=Rl,h.TwoFingersTouchRotateHandler=Jc,h.TwoFingersTouchZoomHandler=yn,h.TwoFingersTouchZoomRotateHandler=hl,h.VectorTileSource=Le,h.VideoSource=ge,h.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((p,D)=>{ke[p]=D})(R,u)}),h.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},h.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},h.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},h.getVersion=function(){return ae},h.getWorkerCount=function(){return de.workerCount},h.getWorkerUrl=function(){return r.a.WORKER_URL},h.importScriptInWorkers=function(R){return me().broadcast("IS",R)},h.prewarm=function(){se().acquire(ce)},h.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},h.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},h.setWorkerCount=function(R){de.workerCount=R},h.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),g}()},88640:function(m,g,a){function y(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function h(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(g,{GW:function(){return ve},Dj:function(){return de}});var _=.7,v=1/_,x="\\s*([+-]?\\d+)\\s*",f="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(f,"\\)$")),b=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(f,"\\)$")),w=new RegExp("^hsl\\(".concat(f,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(f,",").concat(n,",").concat(n,",").concat(f,"\\)$")),E={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 A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=b.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?Z(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?Z(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function Z(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new H(we,Se,Ce,Me)}function G(we){if(we instanceof H)return new H(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new H;if(we instanceof H)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new H(He,Pe,Ve,we.opacity)}function H(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ie(we){return Math.max(0,Math.min(1,we||0))}function W(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}y(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return G(this).formatHsl()},formatRgb:P,toString:P}),y(S,M,h(r,{brighter:function(we){return we=we==null?v:Math.pow(v,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(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:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),y(H,function(we,Se,Ce,Me){return arguments.length===1?G(we):new H(we,Se,Ce,Me??1)},h(r,{brighter:function(we){return we=we==null?v:Math.pow(v,we),new H(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new H(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(W(we>=240?we-240:we+120,Le,Me),W(we,Le,Me),W(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new H($(this.h),ie(this.s),ie(this.l),O(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 we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ie(this.s),"%, ").concat(100*ie(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function Q(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?Q:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=Q(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function ee(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ne(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ne:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?ee:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function U(m){var g=B[m];if(g!==void 0)return g.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var g=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(g,{a:g}),g},U.d=function(m,g){for(var a in g)U.o(g,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:g[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,g){return Object.prototype.hasOwnProperty.call(m,g)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(eV);var Hct=eV.exports;const tV=E6(Hct),hJt="",pJt="",Zct={ref:"card",class:"card-volumetric-field"},aV=1,qct=800,rV=300,Wct=-46,nV=100,iV=-14,Jct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),g=t.ref(null),a=t.ref(0),y=t.ref(null);t.watch(()=>B.passesPlays,d=>{const b=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(b)}),t.watch(()=>a.value,(d,b)=>{y.value&&(n(d),g.value.style.height=`${i(d)}px`,y.value.style.top=`${c(i(d))}px`)});function h(){s=new ResizeObserver(d=>{for(const b of d)a.value=b.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,b){let w=.01351,C=.02439,E=0,A=0,P=[];const L=b.length,T=Math.floor(L/10);for(;E<74;)A=b.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function v(d){let b=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),b.push(w),C--;return b.push(r(74),r(74)),b}function x(d,b,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<b-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][b-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<b-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function f(d){let b=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>b&&(b=E)}return b}function n(d){tV.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(rV/qct*d,0)}function c(d){return iV+(d-nV)/(rV-nV)*(Wct-iV)}function l(d){let b=v(d),w=b.length,C=b[0].length;b=x(x(b,C,w),C,w),C=b[0].length,w=b.length;const E=f(b),A=[{z:b,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};g.value&&(g.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:aV,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:aV,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}tV.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),y.value=document.getElementsByClassName("plot-container")[0],y.value&&(y.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),h()}),(d,b)=>(t.openBlock(),t.createElementBlock("div",Zct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:g,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-80eaae2c"]]),mJt="",Yct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-885deed1"]]),Xct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let WS=null;function $ct(){return WS||(WS=Jy(Xct)),WS}const yJt="",Kct={class:"volumetric-section-container"},Qct={key:0,class:"volumetric-section-container__switch"},eut={class:"volumetric-section-container__attack-direction"},tut={class:"volumetric-section-container__field"},aut=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=$ct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const g=e,a=gp();let y=null;function h(){if(!y){const C=a.getters.getProviderId;y=Une(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return y}const r=t.ref(0),_=t.ref(new Map),v=t.ref({teamId:0}),x=t.computed(()=>[{teamId:g.game.homeTeam.team_id,text:g.game.homeTeam.colloquial_name,img:g.game.homeTeam.logo,isHomeTeam:!0},{teamId:g.game.awayTeam.team_id,text:g.game.awayTeam.colloquial_name,img:g.game.awayTeam.logo,isHomeTeam:!1}]),f=t.computed(()=>_.value.get(g.isGamePreMatch?g.teamSelectedPreMatch.teamId:v.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,v.value=x.value[r.value]},{immediate:!0}),t.watch(()=>g.game.gameId,C=>{C&&(w(),i(g.game.is_live&&g.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*g.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await h();const E=await l();_.value.set(g.game.homeTeam.team_id,E.homeTeam),_.value.set(g.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return g.game.game_status===4&&!g.game.is_live?C[o.gameId]!==g.game.gameId:C[o.gameId]===g.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(g.game.is_live||g.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${g.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===g.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===g.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||g.game.seasonId}-${g.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||g.game.seasonId}-${g.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(g.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===g.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===g.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function b(C){r.value=C.index,v.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",Kct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Qct,[t.createVNode(W5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:b},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",eut,[t.createVNode(Yct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:v.value},null,8,["team"])]),t.createElementVNode("div",tut,[t.createVNode(Jct,{"passes-plays":f.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-02854ef1"]]),bJt="";let oV=null;const rut={components:{GSCHighlights:iZe,ToggleButtons:W5,VolumetricSectionContainer:aut,DataProminentGame:yZe,HighlightsProminentGameLive:yqe,HighlightsProminentGame:iqe,GSCRadioToggle:xF,FieldPosesion:UZe,EventsLine:iWe,ChalkboardSectionContainer:Gct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){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)oV=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),oV.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)},onClickSection(){Rd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},nut={key:0,class:"container-prominent-data"},iut={class:"container-prominent-section"},out={key:0,class:"highlights-containers"},sut={class:"highlights-content"},lut={key:1,class:"highlights-containers"},cut={key:0,class:"container-leyend-prematch"},uut={key:1,class:"container-leyend-prematch-movil"},dut={key:2,class:"container-leyend-prematch-movil"},hut={class:"container-switch-toggle"},put={class:"container-prominent-section__chalkboard"};function fut(e,o,s,B,U,m){const g=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),y=t.resolveComponent("HighlightsProminentGame"),h=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),v=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),f=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nut,[t.createVNode(g,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",iut,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",out,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",sut,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.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(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",lut,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(h,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,provider:e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",cut,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",uut,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",dut,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",hut,[t.createVNode(v,{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:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(f,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",put,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.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 mut=Ki(rut,[["render",fut],["__scopeId","data-v-c05d0800"]]),_Jt="",gut={class:"datagame-container"},yut=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function g(a){s("openmedia",a)}return(a,y)=>(t.openBlock(),t.createElementBlock("div",gut,[t.createVNode(mut,{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:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:g},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-f33283ce"]]),vut={class:"datagame-container"},but={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=gp(),B=t.ref(0),U=e;t.watch(()=>U.game,y=>{B.value=y.gameId},{deep:!0,immediate:!0});const m=o;function g(y){m("openmedia",y)}function a(y){m("intervalidgs",y)}return(y,h)=>(t.openBlock(),t.createElementBlock("div",vut,[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(mb),{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:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):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(mb),{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,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(mb),{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,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},_ut={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 Hb(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const xut={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"},JS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},sV=()=>{t.useCssVars(e=>({"32aec1ca":e.background,"4e54a87a":e.height,"448b848c":e.fontSize,"4c061c38":e.fontColor,"3917092f":e.fontFamily,"4a286e80":e.heightTeam}))},lV=JS.setup;JS.setup=lV?(e,o)=>(sV(),lV(e,o)):sV;const wut={ref:"myDivRef"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",wut,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.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(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.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(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const cV=Ki(JS,[["render",kut],["__cssModules",{$style:xut}]]),CXt="",YS={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))}}},uV=()=>{t.useCssVars(e=>({"142f4a30":e.height,"425d470b":e.borderWidthBtn,e390e3e2:e.borderType,"37c60b2e":e.borderColor,"4c69ebb2":e.borderRadius,"1e10a0c6":e.width,64535028:e.backgroundColor,"26a98839":e.cursorType,"0ff73bb9":e.fontSize,"22158e0e":e.fontStyle,"4f1cadc8":e.fontFamily,"38d08a5c":e.marginLeftStat,f38f9ca6:e.fontSizeStat}))},dV=YS.setup;YS.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const Sut=["src"],Cut={key:1,class:"text"},Tut=["src"],Aut={class:"stats"},Eut={class:"numstats"},Mut={class:"leyend"};function Iut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Sut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Cut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Tut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",Aut,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Eut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Mut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const hV=Ki(YS,[["render",Iut],["__scopeId","data-v-2d2e96b3"]]),Put={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"},XS={components:{GSCButton:hV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=Hb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},pV=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},fV=XS.setup;XS.setup=fV?(e,o)=>(pV(),fV(e,o)):pV;const Lut={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["src"],jut=["fill"],Uut=["fill"],Gut=["src"],Hut=["src"],Zut=["src"],qut=["src"],Wut=["fill"],Jut=["fill"];function Yut(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Lut,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,But),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,zut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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:s.data.team_logo},null,10,Out),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),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(s.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(s.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:s.data.player_country_flag},null,10,Dut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.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(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,Vut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Uut)],10,jut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,Gut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Hut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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:s.data.team_logo},null,10,Zut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),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(s.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(s.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:s.data.player_country_flag},null,10,qut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.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,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Jut)],10,Wut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const mV=Ki(XS,[["render",Yut],["__cssModules",{$style:Put}]]),Xut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},$S={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))}}},gV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},yV=$S.setup;$S.setup=yV?(e,o)=>(gV(),yV(e,o)):gV;const $ut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Kut=["src"],Qut={key:1,class:"text"},edt=["src"],tdt={class:"stats"},adt=$ut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),rdt={class:"numstats"},ndt={class:"leyend"};function idt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Kut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,edt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",tdt,[adt,t.createElementVNode("div",rdt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",ndt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const odt=Xut($S,[["render",idt],["__scopeId","data-v-f3ee6b2b"]]),sdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},KS={components:{GSCButton:odt},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)}},vV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},bV=KS.setup;KS.setup=bV?(e,o)=>(vV(),bV(e,o)):vV;const ldt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},cdt={class:"gsc-filterperteam__panel-teams__cont-teams"},udt=["onClick"],ddt=["src","alt","title"];function hdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",ldt,[t.createElementVNode("div",cdt,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(g,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,y)=>(t.openBlock(),t.createElementBlock("div",{key:y,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:h=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,ddt)],14,udt))),128))])],512)],4)}const pdt=sdt(KS,[["render",hdt],["__scopeId","data-v-b39cba3b"]]),fdt={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"},QS={components:{GSCButton:hV},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)}}},_V=()=>{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}))},xV=QS.setup;QS.setup=xV?(e,o)=>(_V(),xV(e,o)):_V;const mdt=["src"],gdt=["src"],ydt=["src"],vdt=["src"],bdt=["fill"],_dt=["fill"],xdt=["src"],wdt=["fill"],kdt=["fill"];function Sdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,mdt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,gdt)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,ydt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(g,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,vdt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,_dt)],10,bdt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,xdt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,kdt)],10,wdt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Cdt=Ki(QS,[["render",Sdt],["__cssModules",{$style:fdt}]]),Tdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},eC={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))}}},wV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},kV=eC.setup;eC.setup=kV?(e,o)=>(wV(),kV(e,o)):wV;const Adt=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Edt=["src"],Mdt={key:1,class:"text"},Idt=["src"],Pdt={class:"stats"},Ldt=Adt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),Bdt={class:"numstats"},zdt={class:"leyend"};function Odt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Edt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Mdt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Idt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",Pdt,[Ldt,t.createElementVNode("div",Bdt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",zdt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Ddt=Tdt(eC,[["render",Odt],["__scopeId","data-v-f3ee6b2b"]]),HQt="",ZQt="",Ndt={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"},tC={components:{GSCButton:Ddt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},SV=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},CV=tC.setup;tC.setup=CV?(e,o)=>(SV(),CV(e,o)):SV;const Fdt={ref:"myDivRef"},Rdt=["src"];function Vdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Fdt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,Rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&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:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&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:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const TV=Ki(tC,[["render",Vdt],["__cssModules",{$style:Ndt}],["__scopeId","data-v-5dd9e88d"]]);/**
4135
+ `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[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(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(p){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(p,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,p){const D=1/St(p,1,u.transform.tileZoom),V=Math.pow(2,p.tileID.overscaledZ),J=p.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(p.tileID.canonical.x+p.tileID.wrap*V),fe=J*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,p,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+p,u_opacity:D}},vr=(R,u,p,D,V,J,oe)=>r.e(ar(R,u,p,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,p,D)=>r.e(mr(R),Va(p,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,p,D,V)=>r.e(Br(R,u,p,D),{u_world:V}),Ua=(R,u,p,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(p,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,p,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,p)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:p.cameraToCenterDistance,u_viewport_size:[p.width,p.height]}),fa=(R,u,p=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:p}),Oa=R=>({u_matrix:R}),za=(R,u,p,D)=>({u_matrix:R,u_extrude_scale:St(u,1,p),u_intensity:D}),Wa=(R,u,p,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:p,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,p,D)=>{const V=p.paint.get("hillshade-shadow-color"),J=p.paint.get("hillshade-highlight-color"),oe=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-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[p.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const p=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[p,p],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const p=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/p).toLngLat().lat,new r.Z(0,(D+1)/p).toLngLat().lat]}const oa=(R,u,p,D)=>{const V=R.transform;return{u_matrix:cr(R,u,p,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,p,D,V)=>r.e(oa(R,u,p,V),{u_image:0,u_image_height:D}),Ja=(R,u,p,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,p,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,p,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=p.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,p,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,p,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}const Ar=(R,u,p,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:p,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),p=Math.cos(R);return[(2*p+1)/3,(-Math.sqrt(3)*u-p+1)/3,(Math.sqrt(3)*u-p+1)/3]}const Pr=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,p)=>({u_matrix:R,u_opacity:u,u_color:p}),Kr=(R,u,p,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,p,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,p,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){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,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _n{constructor(u,p,D,V){this.length=p.length,this.attributes=D,this.itemSize=p.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,p.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete p.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const p=this.context.gl;this.bind(),p.bufferSubData(p.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,p){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=p.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,p,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=p.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Ln=new WeakMap;function mi(R){var u;if(Ln.has(R))return Ln.get(R);{const p=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Ln.set(R,p),p}}class Mn{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class mo extends Mn{getDefault(){return r.aN.transparent}set(u){const p=this.current;(u.r!==p.r||u.g!==p.g||u.b!==p.b||u.a!==p.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends Mn{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends Mn{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class Jo extends Mn{getDefault(){return[!0,!0,!0,!0]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||u[3]!==p[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends Mn{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends Mn{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class ss extends Mn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const p=this.current;(u.func!==p.func||u.ref!==p.ref||u.mask!==p.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class wo extends Mn{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Xo extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.STENCIL_TEST):p.disable(p.STENCIL_TEST),this.current=u,this.dirty=!1}}class gs extends Mn{getDefault(){return[0,1]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Ro extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.DEPTH_TEST):p.disable(p.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends Mn{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.BLEND):p.disable(p.BLEND),this.current=u,this.dirty=!1}}class El extends Mn{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Yo extends Mn{getDefault(){return r.aN.transparent}set(u){const p=this.current;(u.r!==p.r||u.g!==p.g||u.b!==p.b||u.a!==p.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class rl extends Mn{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Cs extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;u?p.enable(p.CULL_FACE):p.disable(p.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends Mn{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends Mn{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends Mn{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class nl extends Mn{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Gs extends Mn{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const p=this.current;(u[0]!==p[0]||u[1]!==p[1]||u[2]!==p[2]||u[3]!==p[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindFramebuffer(p.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Hs extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindRenderbuffer(p.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindTexture(p.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends Mn{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.bindBuffer(p.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class il extends Mn{getDefault(){return null}set(u){const p=this.gl;p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Lo extends Mn{getDefault(){return null}set(u){var p;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(p=D.getExtension("OES_vertex_array_object"))===null||p===void 0||p.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends Mn{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Wl extends Mn{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const p=this.gl;p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends Mn{constructor(u,p){super(u),this.context=u,this.parent=p}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===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,u,0),this.current=u,this.dirty=!1}}class Ts extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const p=this.gl;p.framebufferRenderbuffer(p.FRAMEBUFFER,p.DEPTH_ATTACHMENT,p.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===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,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,p,D,V,J){this.context=u,this.width=p,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Ts(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,p=this.colorAttachment.get();if(p&&u.deleteTexture(p),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,p,D){this.blendFunction=u,this.blendColor=p,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var p,D;if(this.gl=u,this.clearColor=new mo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new Jo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new ss(this),this.stencilOp=new wo(this),this.stencilTest=new Xo(this),this.depthRange=new gs(this),this.depthTest=new Ro(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Yo(this),this.blendEquation=new rl(this),this.cullFace=new Cs(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new nl(this),this.viewport=new Gs(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Hs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new il(this),this.bindVertexArray=new Lo(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new Wl(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(p=u.RGBA16F)!==null&&p!==void 0?p:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.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(u,p){return new zr(this,u,p)}createVertexBuffer(u,p,D){return new _n(this,u,p,D)}createRenderbuffer(u,p,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,p,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,p,D,V){return new Bu(this,u,p,D,V)}clear({color:u,depth:p,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var p;return mi(this.gl)?this.gl.deleteVertexArray(u):(p=this.gl.getExtension("OES_vertex_array_object"))===null||p===void 0?void 0:p.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Wn{constructor(u,p,D){this.func=u,this.mask=p,this.range=D}}Wn.ReadOnly=!1,Wn.ReadWrite=!0,Wn.disabled=new Wn(519,Wn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,p,D,V,J,oe){this.test=u,this.ref=p,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,p,D){this.enable=u,this.mode=p,this.frontFace=D}}let As;function ls(R,u,p,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(p);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,Wn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),p.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!As||As.length<2*Ee)&&(As=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(As,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,Wn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),p.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,p,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);ko(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,p,u,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),V),p.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,p,D,!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"),J,oe),p.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,p,D,!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"),J,oe),u.map.showCollisionBoxes&&(ls(R,u,p,D,!0),ls(R,u,p,D,!1))}function cs(R,u,p,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*p;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function ys(R,u,p,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return p||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(p){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function ko(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:p,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=p?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;p&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=cs(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=ys(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let qr=0;qr<Et.numGlyphs;qr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,p){return p.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,p,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&p.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!p.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,Wn.ReadOnly),_a=p._unevaluatedLayout.hasValue("text-variable-anchor")||p._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(p);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(p.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),qr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Cn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Cn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=p.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=p.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,_s)=>R.style.map.terrain.getElevation(Ga,Xi,_s):null,Ao=p.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,Ao,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&p.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Fs;Fs=nr?gr.iconsInText?Cr(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,qr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Fs,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Cn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const Ao of Nn)Da.push({segments:new r.a0([Ao]),sortKey:Ao.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,p,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,p,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,p,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,p.id,R.layoutVertexBuffer,R.indexBuffer,u,p.paint,D.transform.zoom,R.programConfigurations.get(p.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,p,D){if(p.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,p),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(p);if(!Ge)continue;const rt=Ge.programConfigurations.get(p.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,Wn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,p.paint.get("heatmap-intensity")),null,p.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,p.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,Wn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,Wa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,p))}function Ol(R,u,p,D,V){if(!p||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[p.to.toString()],fe=J[p.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,p,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=p.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=p.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(p);if(!Jt)continue;const Kt=Jt.programConfigurations.get(p.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,p);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,p.id,Jt.layoutVertexBuffer,xt,Mt,p.paint,R.transform.zoom,Kt)}}function wc(R,u,p,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=p.paint.get(Ee),Ge=Fe.constantOr(1),rt=p.getCrossfadeParameters(),ct=p.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(p);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(p.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,p);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Yt=p.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,p.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,p.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,p,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=p.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,p,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,p,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,p.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function Es(R,u,p,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=f.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=p.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Zs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Ms=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),qc=new r.aN(0,1,1,1);function Wc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Zs),zc(R,u.bottom||0,3,Dl),Bo(R,u.left||0,3,Ms),Bo(R,R.transform.width-(u.right||0),3,ti);const p=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,p.x,R.transform.height-p.y,qc)}function zc(R,u,p,D){Sc(R,0,u+p/2,R.transform.width,p,D)}function Bo(R,u,p,D){Sc(R,u-p/2,0,p,R.transform.height,D)}function Sc(R,u,p,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,p*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,p){const D=R.context,V=D.gl,J=p.posMatrix,oe=R.useProgram("debug"),fe=Wn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(p);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(p.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(p).tileSize,Mt=512/Math.min(xt,512)*(p.overscaledZ/R.transform.zoom)*.5;let Tt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(Tt+=` => ${p.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.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(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,p){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new Wn(V.LEQUAL,Wn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of p){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,p,D){this.vertexBuffer=u,this.indexBuffer=p,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,p){this.context=new _c(u),this.transform=p,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=qe.maxUnderzooming+qe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,p,D){if(this.width=Math.floor(u*D),this.height=Math.floor(p*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,p=new r.aX;p.emplaceBack(0,0),p.emplaceBack(r.X,0),p.emplaceBack(0,r.X),p.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(p,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,p=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[p.drawingBufferWidth,p.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,p.TRIANGLES,Wn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,p){if(this.currentStencilSource===u.source||!u.isTileClipped()||!p||!p.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+p.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(Wn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of p){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,Wn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,p=this.context.gl;return new _i({func:p.NOTEQUAL,mask:255},u,255,p.KEEP,p.KEEP,p.REPLACE)}stencilModeForClipping(u){const p=this.context.gl;return new _i({func:p.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,p.KEEP,p.KEEP,p.REPLACE)}stencilConfigForOverlap(u){const p=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:p.GEQUAL,mask:255},fe+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,p,D){if(!this.opaquePassEnabledForLayer())return Wn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Wn(D||this.context.gl.LEQUAL,p,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,p){var D;this.style=u,this.options=p,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(f.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:p.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new Wn(rt.LEQUAL,Wn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=p.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&Wc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const p=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(p,D):!r.a$(p,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(p,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new Wn(xe.LEQUAL,Wn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new Wn(xe.LEQUAL,Wn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,p,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,p,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,Wn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,p,D,V);break;case"heatmap":zl(u,p,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,Wn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const qr=oe.getSource().maxzoom,Er=Yt.canonical.z===qr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,p,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?Wn.ReadWrite:Wn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,Wn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,p,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new Wn(J.context.gl.LEQUAL,Wn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,p,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,Wn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,p,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?Wn.ReadWrite:Wn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=Es(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,p,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?Wn.ReadWrite:Wn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new Wn(J.context.gl.LEQUAL,Wn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,Wn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,p,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(p,D[0],this.transform.zoom),J?D[1]:St(p,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const p=this._tileTextures[u.size[0]];p?p.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const p=this._tileTextures[u];return p&&p.length>0?p.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const p=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!p||!D}useProgram(u,p){this.cache=this.cache||{};const D=u+(p?p.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],p,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}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 u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:p}=this.context.gl;return this.width!==u||this.height!==p}}class qs{constructor(u,p){this.points=u,this.planes=p}static fromInvProjectionMatrix(u,p,D){const V=Math.pow(2,D),J=[[-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 xe=1/(fe=r.ag([],fe,u))[3]/p*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new qs(J,oe)}}class Is{constructor(u,p){this.min=u,this.max=p,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const p=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<p.length;J++)D[J]=p[J]?this.min[J]:this.center[J],V[J]=p[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Is(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){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 D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<p.length;fe++)r.b2(J,p[fe])>=0&&oe++;if(oe===0)return 0;oe!==p.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,p=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(p)||p<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=p,this.left=D,this.right=V}interpolate(u,p,D){return p.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,p.top,D)),p.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,p.bottom,D)),p.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,p.left,D)),p.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,p.right,D)),this}getCenter(u,p){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+p-this.bottom)/2,0,p);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,p,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=p||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const p=-r.b3(u,-180,180)*Math.PI/180;this.angle!==p&&(this._unmodified=!1,this.angle=p,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const p=r.ad(u,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(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const p=Math.min(Math.max(u,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(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,p,D){this._unmodified=!1,this._edgeInsets.interpolate(u,p,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const p=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,p)}getVisibleUnwrappedCoordinates(u){const p=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&p.push(new r.b4(Fe,u))}return p}coveringTiles(u){var p,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=qs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Is([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(p=pr.minElevation)!==null&&p!==void 0?p:this.elevation,qr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Is([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],qr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,p){this.width=u,this.height=p,this.pixelsToGLUnits=[2/u,-2/p],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const p=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(p)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.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(u){const p=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+p-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,p){const D=this.pointCoordinate(p),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,p){return p?this.coordinatePoint(this.locationCoordinate(u),p.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,p){return this.coordinateLocation(this.pointCoordinate(u,p))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,p){if(p){const pt=p.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,p=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,p,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([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(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const p=u.canonical,D=this.worldSize/this.zoomScale(p.z),V=p.x+Math.pow(2,p.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,p.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,p=!1){const D=u.key,V=p?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,p?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const p=u.key,D=this._fogMatrixCache;if(D[p])return D[p];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[p]=new Float32Array(V),D[p]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,p){p=r.ad(+p,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:p};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:p,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=p,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,p=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+p.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+p.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-p.x/this.width,J[9]=2*p.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-p.x/this.width,this.fogMatrix[9]=2*p.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),p=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(p,p,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,p=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,p))}getCameraQueryGeometry(u){const p=this.getCameraPoint();if(u.length===1)return[u[0],p];{let D=p.x,V=p.y,J=p.x,oe=p.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,p){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,p,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let p,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,p),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,p=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const p=window.location.hash.replace("#","");if(this._hashName){let D;return p.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return p.split("/")},this._onHashChange=()=>{const p=this._getCurrentHash();if(p.length>=3&&!p.some(D=>isNaN(D))){const D=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:D,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 D=p.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,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(u){const p=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(p.lng*J)/J,fe=Math.round(p.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const $o={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},$o),hi=r.e({deceleration:20,maxSpeed:1400},$o),Ps=r.e({deceleration:1e3,maxSpeed:360},$o),Tc=r.e({deceleration:1e3,maxSpeed:90},$o);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:f.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,p=f.now();for(;u.length>0&&p-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const p={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)p.zoom+=J.zoomDelta||0,p.bearing+=J.bearingDelta||0,p.pitch+=J.pitchDelta||0,J.panDelta&&p.pan._add(J.panDelta),J.around&&(p.around=J.around),J.pinchAround&&(p.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(p.pan.mag()){const J=Xl(p.pan.mag(),D,r.e({},li,u||{}));V.offset=p.pan.mult(J.amount/p.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(p.zoom){const J=Xl(p.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(p.bearing){const J=Xl(p.bearing,D,Ps);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(p.pitch){const J=Xl(p.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=p.pinchAround===void 0?p.around:p.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,p){const{maxSpeed:D,linearity:V,deceleration:J}=p,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:p.easing,duration:1e3*fe,amount:oe*(fe/2)}}class zo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D,V={}){const J=n.mousePos(p.getCanvas(),D),oe=p.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=p}}class So extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(p.getCanvasContainer(),V),oe=J.map(xe=>p.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:p.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class ol extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,p,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,p){this._map=u,this._clickTolerance=p.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new ol(u.type,this._map,u))}mousedown(u,p){return this._mousedownPos=p,this._firePreventable(new zo(u.type,this._map,u))}mouseup(u){this._map.fire(new zo(u.type,this._map,u))}click(u,p){this._mousedownPos&&this._mousedownPos.dist(p)>=this._clickTolerance||this._map.fire(new zo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new zo(u.type,this._map,u))}mouseover(u){this._map.fire(new zo(u.type,this._map,u))}mouseout(u){this._map.fire(new zo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new So(u.type,this._map,u))}touchmove(u){this._map.fire(new So(u.type,this._map,u))}touchend(u){this._map.fire(new So(u.type,this._map,u))}touchcancel(u){this._map.fire(new So(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Vo{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new zo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new zo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new zo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}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(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class Co{constructor(u,p){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.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(u,p){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=p,this._active=!0)}mousemoveWindow(u,p){if(!this._active)return;const D=p;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,p){if(!this._active||u.button!==0)return;const D=this._startPos,V=p;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,p){return this._map.fire(new r.k(u,{originalEvent:p}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const p={};for(let D=0;D<R.length;D++)p[R[D].identifier]=u[D];return p}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,p,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(p),this.touches=gi(D,p)))}touchmove(u,p,D){if(this.aborted||!this.centroid)return;const V=gi(D,p);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,p,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,p,D){this.singleTap.touchstart(u,p,D)}touchmove(u,p,D){this.singleTap.touchmove(u,p,D)}touchend(u,p,D){const V=this.singleTap.touchend(u,p,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class go{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,p,D){this._zoomIn.touchstart(u,p,D),this._zoomOut.touchstart(u,p,D)}touchmove(u,p,D){this._zoomIn.touchmove(u,p,D),this._zoomOut.touchmove(u,p,D)}touchend(u,p,D){const V=this._zoomIn.touchend(u,p,D),J=this._zoomOut.touchend(u,p,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class To{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const p=this._moveFunction(...u);if(p.bearingDelta||p.pitchDelta||p.around||p.panDelta)return this._active=!0,p}dragStart(u,p){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=p.length?p[0]:p,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,p){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=p.length?p[0]:p;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const sl={0:1,2:2};class us{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const p=n.mouseButton(u);this._eventButton=p}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(p,D){const V=sl[D];return p.buttons===void 0||(p.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const p=u.targetTouches[0].identifier;this._firstTouch=p}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const Oo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:p=.8})=>{const D=new us({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new To({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*p}),moveStateManager:D,enable:R,assignEvents:Oo})},ll=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:p=-.5})=>{const D=new us({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new To({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*p}),moveStateManager:D,enable:R,assignEvents:Oo})};class Ls{constructor(u,p){this._clickTolerance=u.clickTolerance||1,this._map=p,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,p,D){return this._calculateTransform(u,p,D)}touchmove(u,p,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,p,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,p,D){this._calculateTransform(u,p,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,p,D){D.length>0&&(this._active=!0);const V=gi(D,p),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class yo{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,p,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([p[0],p[1]]))}touchmove(u,p,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,p,V),fe=vi(D,p,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,p,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,p,V),fe=vi(D,p,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,p){for(let D=0;D<R.length;D++)if(R[D].identifier===p)return u[D]}function Bs(R,u){return Math.log(R/u)/Math.LN2}class yn extends yo{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,p){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Bs(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Bs(this._distance,D),pinchAround:p}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends yo{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,p,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:p}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const p=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<p}}function cl(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends yo{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,p,D){super.touchstart(u,p,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,cl(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,p,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,p,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=p.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==p.y>0;return cl(u)&&cl(p)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const p=Cl;this._panStep=p.panStep,this._bearingStep=p.bearingStep,this._pitchStep=p.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let p=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:p?Math.round(xe.zoom)+p*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}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 Zr(R){return R*(2-R)}const ds=4.000244140625;class ul{constructor(u,p){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=p,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let p=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=f.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,p!==0&&p%ds==0?this._type="wheel":p!==0&&Math.abs(p)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=p,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*p)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,p+=this._lastValue)),u.shiftKey&&p&&(p/=4),this._type&&(this._lastWheelEvent=u,this._delta-=p,this._active||this._start(u)),u.preventDefault()}_start(u){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=n.mousePos(this._map.getCanvas(),u),D=this._tr;p.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(p)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>ds?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const p=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=f.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,p,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=p,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let p=r.b9;if(this._prevEase){const D=this._prevEase,V=(f.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);p=r.b8(oe,fe,.25,1)}return this._prevEase={start:f.now(),duration:u,easing:p},p}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,p){this._clickZoom=u,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 Ko{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,p){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(p)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dl{constructor(){this._tap=new yi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,p,D){if(!this._swipePoint)if(this._tapTime){const V=p[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,p,D)}touchmove(u,p,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=p[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,p,D)}touchend(u,p,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,p,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class zs{constructor(u,p,D){this._el=u,this._mousePan=p,this._touchPan=D}enable(u){this._inertiaOptions=u||{},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 jo{constructor(u,p,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=p,this._mousePitch=D}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 hl{constructor(u,p,D,V){this._el=u,this._touchZoom=p,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),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 vs{constructor(u,p){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=p,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let p=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(p=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=p,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.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(u){return u[this._bypassKey]}notifyGestureBlocked(u,p){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:p})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Qo=R=>R.zoom||R.drag||R.pitch||R.rotate;class Os extends r.k{}function pn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,p){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||pn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||pn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=p.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(p);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,p,D]of this._listeners)n.removeEventListener(u,p,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const p=this._map,D=p.getCanvasContainer();this._add("mapEvent",new hc(p,u));const V=p.boxZoom=new Co(p,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=p.cooperativeGestures=new vs(p,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new go(p),fe=new Ko(p);p.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&p.doubleClickZoom.enable();const xe=new dl;this._add("tapDragZoom",xe);const Ee=p.touchPitch=new Rl(p);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&p.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=ll(u);p.dragRotate=new jo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&p.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new us({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new To({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:Oo})})(u),ct=new Ls(u,p);p.dragPan=new zs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&p.dragPan.enable(u.dragPan);const pt=new Jc,xt=new yn;p.touchZoomRotate=new hl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&p.touchZoomRotate.enable(u.touchZoomRotate);const Mt=p.scrollZoom=new ul(p,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&p.scrollZoom.enable(u.scrollZoom);const Tt=p.keyboard=new pc(p);this._add("keyboard",Tt),u.interactive&&u.keyboard&&p.keyboard.enable(),this._add("blockableMapEvent",new Vo(p))}_add(u,p,D){this._handlers.push({handlerName:u,handler:p,allowed:D}),this._handlersById[u]=p}stop(u){if(!this._updatingCamera){for(const{handler:p}of this._handlers)p.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Qo(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,p,D){for(const V in u)if(V!==D&&(!p||p.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const p=[];for(const D of u){const V=D.target;this._el.contains(V)&&p.push(D)}return p}mergeHandlerResult(u,p,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(p.zoom=oe),D.panDelta!==void 0&&(p.drag=oe),D.pitchDelta!==void 0&&(p.pitch=oe),D.bearingDelta!==void 0&&(p.rotate=oe)}_applyChanges(){const u={},p={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(p,J),r.e(D,oe);this._updateMapTransform(u,p,D),this._changes=[]}_updateMapTransform(u,p,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(pn(u)||oe&&this._terrainMovement))return this._fireEvents(p,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!p.drag&&!p.zoom?p.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(p,D,!0)}_fireEvents(u,p,D){const V=Qo(this._eventsInProgress),J=Qo(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=p[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Qo(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&f.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,p){this._map.fire(new r.k(u,p?{originalEvent:p}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new Os("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,p){super(),this._renderFrameCallback=()=>{const D=Math.min((f.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=p.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,p){return this.jumpTo({center:u},p)}panBy(u,p,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},p),D)}panTo(u,p,D){return this.easeTo(r.e({center:u},p),D)}getZoom(){return this.transform.zoom}setZoom(u,p){return this.jumpTo({zoom:u},p),this}zoomTo(u,p,D){return this.easeTo(r.e({zoom:u},p),D)}zoomIn(u,p){return this.zoomTo(this.getZoom()+1,u,p),this}zoomOut(u,p){return this.zoomTo(this.getZoom()-1,u,p),this}getBearing(){return this.transform.bearing}setBearing(u,p){return this.jumpTo({bearing:u},p),this}getPadding(){return this.transform.padding}setPadding(u,p){return this.jumpTo({padding:u},p),this}rotateTo(u,p,D){return this.easeTo(r.e({bearing:u},p),D)}resetNorth(u,p){return this.rotateTo(0,r.e({duration:1e3},u),p),this}resetNorthPitch(u,p){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),p),this}snapToNorth(u,p){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,p):this}getPitch(){return this.transform.pitch}setPitch(u,p){return this.jumpTo({pitch:u},p),this}cameraForBounds(u,p){u=Ce.convert(u);const D=p&&p.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,p)}_cameraForBoxAndBearing(u,p,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,p),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,p,D){return this._fitInternal(this.cameraForBounds(u,p),p,D)}fitScreenCoordinates(u,p,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(p)),D,V),V,J)}_fitInternal(u,p,D){return u?(delete(p=r.e(u,p)).padding,p.linear?this.easeTo(p,D):this.flyTo(p,D)):this}jumpTo(u,p){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",p)).fire(new r.k("move",p)),V&&this.fire(new r.k("zoomstart",p)).fire(new r.k("zoom",p)).fire(new r.k("zoomend",p)),J&&this.fire(new r.k("rotatestart",p)).fire(new r.k("rotate",p)).fire(new r.k("rotateend",p)),oe&&this.fire(new r.k("pitchstart",p)).fire(new r.k("pitch",p)).fire(new r.k("pitchend",p)),this.fire(new r.k("moveend",p))}calculateCameraOptionsFromTo(u,p,D,V=0){const J=r.Z.fromLngLat(u,p),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,p){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&f.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(p,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(p)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(p,da)},u),this}_prepareEase(u,p,D={}){this._moving=!0,p||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const p=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&p!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(p-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=p}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_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(u){const p=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(p.lngLat,u.zoom);if(p.altitude<D){const V=this.calculateCameraOptionsFromTo(p.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const p=[];if(this.terrain&&p.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&p.push(V=>this.transformCameraUpdate(V)),!p.length)return;const D=u.clone();for(const V of p){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,p){if(this._easeId&&p&&this._easeId===p)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,p){var D;if(!u.essential&&f.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,p)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,p);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(p,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(p)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(p)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,p){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,p)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,p,D){D.animate===!1||D.duration===0?(u(1),p()):(this._easeStart=f.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=p,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,p){u=r.b3(u,-180,180);const D=Math.abs(u-p);return Math.abs(u-360-p)<D&&(u-=360),Math.abs(u+360-p)<D&&(u+=360),u}_normalizeCenter(u,p){if(!p.renderWorldCopies||p.lngRange)return;const D=u.lng-p.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const Uo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class hs{constructor(u=Uo){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=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.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(){n.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(u,p){const D=this._map._getUIString(`AttributionControl.${p}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const p=this._map.style.sourceCaches;for(const V in p){const J=p[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class vo{constructor(u={}){this._updateCompact=()=>{const p=this._container.children;if(p.length){const D=p[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const p=n.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(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const p=++this._id;return this._queue.push({callback:u,id:p,cancelled:!1}),p}remove(u){const p=this._currentlyRunning,D=p?this._queue.concat(p):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const p=this._currentlyRunning=this._queue;this._queue=[];for(const D of p)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Go extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,p){this.sourceCache.update(u,p),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:p}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const p in this._tiles){const D=this._tiles[p];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const p={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),p[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),p[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),p[D]=J}}return p}getSourceTile(u,p){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&p)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(p=>p.timeAdded>=u)}}class ii{constructor(u,p,D){this.painter=u,this.sourceCache=new Go(p),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,p,D,V=r.X){var J;if(!(p>=0&&p<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[p/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,p){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,p);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,p,D,V=r.X){return this.getDEMElevation(u,p,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const p=this.sourceCache.getSourceTile(u,!0);if(p&&p.dem&&(!p.demTexture||p.needsTerrainPrepare)){const V=this.painter.context;p.demTexture=this.painter.getTileTexture(p.dem.stride),p.demTexture?p.demTexture.update(p.dem.getPixels(),{premultiply:!1}):p.demTexture=new z(V,p.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),p.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),p.needsTerrainPrepare=!1}const D=p&&p+p.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-p.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:p&&p.dem&&p.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.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(u){const p=this.painter,D=p.width/devicePixelRatio,V=p.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(p.context,{width:D,height:V,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 z(p.context,{width:D,height:V,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(D,V,!0,!1),this._fbo.depthAttachment.set(p.context.createRenderbuffer(p.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const p=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)p[oe+0]=255&fe,p[oe+1]=255&J,p[oe+2]=fe>>8<<4|J>>8,p[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(p.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const p=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,p),D.bindFramebuffer.set(null);const xe=p[0]+(p[2]>>4<<8),Ee=p[1]+((15&p[2])<<8),Fe=this.coordsIndex[255-p[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const p=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,p),D.bindFramebuffer.set(null),(p[0]/16777216+p[1]/65536+p[2]/256+p[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,p=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)p.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=p.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])p.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=p.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])p.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(p,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,p.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,p){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,p);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const p=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return p&&p.dem&&(D.minElevation=p.dem.min*this.exaggeration,D.maxElevation=p.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,p){const D=r.Z.fromLngLat(u.wrap()),V=(1<<p)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(p,0,p,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,p,D){this._context=u,this._size=p,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const p=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.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(D.texture),{id:u,fbo:p,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(p=>u.id!==p),this._recentlyUsed.push(u.id)}stampObject(u){u.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 u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const bs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Js{constructor(u,p){this.painter=u,this.terrain=p,this.pool=new Vl(u.context,30,p.sourceCache.tileSize*p.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,p){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(p)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(bs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const p=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(bs[p]&&(this._prevType&&bs[this._prevType]||this._stacks.push([]),this._prevType=p,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(bs[this._prevType]||bs[p]&&V){this._prevType=p;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),bs[p]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Mc=_,pl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Uo,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:r.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},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Ds={showCompass:!0,showZoom:!0,visualizePitch:!1};class Wr{constructor(u,p,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.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 V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=p,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new To({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=ll({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new To({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(p,"mousedown",this.mousedown),n.addEventListener(p,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(p,"touchcancel",this.reset)}startMouse(u,p){this.mouseRotate.dragStart(u,p),this.mousePitch&&this.mousePitch.dragStart(u,p),n.disableDrag()}startTouch(u,p){this.touchRotate.dragStart(u,p),this.touchPitch&&this.touchPitch.dragStart(u,p),n.disableDrag()}moveMouse(u,p){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,p)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,p)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,p){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,p)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,p)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Sn;function es(R,u,p){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=p.locationPoint(R).distSqr(u);p.locationPoint(V).distSqr(u)<oe?R=V:p.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-p.center.lng)>180;){const V=p.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=p.width&&V.y<=p.height)break;R.lng>p.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&p.locationPoint(R).y>p.height/2-p.getHorizon()?R:D}const Ns={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 fl(R,u,p){const D=R.classList;for(const V in Ns)D.remove(`maplibregl-${p}-anchor-${V}`);D.add(`maplibregl-${p}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=p=>{const D=p.code,V=p.charCode||p.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=p=>{const D=p.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=p=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((p==null?void 0:p.type)==="terrain"||(p==null?void 0:p.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=es(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.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 J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||p&&p.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ns[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),f.frameAsync(new AbortController).then(()=>{this._updateOpacity(p&&p.type==="moveend")}).catch(()=>{})},this._onMove=p=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=D}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 r.k("dragstart"))),this.fire(new r.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 r.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=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const p=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;p.setAttributeNS(null,"display","block"),p.setAttributeNS(null,"height",`${D}px`),p.setAttributeNS(null,"width",`${V}px`),p.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.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"),Ee.appendChild(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),p.appendChild(oe),p.setAttributeNS(null,"height",D*this._scale+"px"),p.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(p),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",p=>{p.preventDefault()}),this._element.addEventListener("mousedown",p=>{p.preventDefault()}),fl(this._element,this._anchor,"marker"),u&&u.className)for(const p of u.className.split(" "))this._element.classList.add(p);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.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),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var p,D;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(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(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(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,p){return u===void 0&&p===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),p!==void 0&&(this._opacityWhenCovered=p),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class mn extends r.E{constructor(u){super(),this._onSuccess=p=>{if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new r.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 r.k("geolocate",p)),this._finish()}},this._updateCamera=p=>{const D=new r.N(p.coords.longitude,p.coords.latitude),V=p.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=p=>{if(p){const D=new r.N(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).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 D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.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=n.create("button","maplibregl-ctrl-geolocate",this._container),n.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){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({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",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(p=!1){if(Sn!==void 0&&!p)return Sn;if(window.navigator.permissions===void 0)return Sn=!!window.navigator.geolocation,Sn;try{Sn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Sn=!!window.navigator.geolocation}return Sn})}().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(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const p=this._map.getMaxBounds(),D=u.coords;return p&&(D.longitude<p.getWest()||D.longitude>p.getEast()||D.latitude<p.getSouth()||D.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 u=this._map.getBounds(),p=u.getSouthEast(),D=u.getNorthEast(),V=p.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.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 r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!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 r.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 r.k("trackuserlocationstart")),this.fire(new r.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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 an={maxWidth:100,unit:"metric"};function wi(R,u,p){const D=p&&p.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(p&&p.unit==="imperial"){const xe=3.2808*fe;xe>5280?bo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):bo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?bo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?bo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):bo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function bo(R,u,p,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(p),J=V/p;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var p;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((p=D==null?void 0:D.shadowRoot)===null||p===void 0)&&p.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.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(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.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 ts={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends r.E{constructor(u){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.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 r.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 D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);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=es(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!p)return;const J=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 oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ns[oe]} translate(${xe.x}px,${xe.y}px)`),fl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(ts),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const p=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)p.appendChild(V);return this.setDOMContent(p)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;h.AJAXError=r.bg,h.Evented=r.E,h.LngLat=r.N,h.MercatorCoordinate=r.Z,h.Point=r.P,h.addProtocol=r.bh,h.config=r.a,h.removeProtocol=r.bi,h.AttributionControl=hs,h.BoxZoomHandler=Co,h.CanvasSource=Ae,h.CooperativeGesturesHandler=vs,h.DoubleClickZoomHandler=Ti,h.DragPanHandler=zs,h.DragRotateHandler=jo,h.EdgeInsets=Nl,h.FullscreenControl=Ul,h.GeoJSONSource=Pe,h.GeolocateControl=mn,h.Hash=eo,h.ImageSource=Ie,h.KeyboardHandler=pc,h.LngLatBounds=Ce,h.LogoControl=vo,h.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},pl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const p=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(p).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new hs(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new vo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const p=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(p,D.firstChild):D.appendChild(p),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,p,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(p,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,p,D)}resize(R){var u;const p=this._containerDimensions(),D=p[0],V=p[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:p,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>p?p/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,p){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:p,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,p.call(this,new zo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:p,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,p.call(this,new zo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,p.call(this,new zo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,p.call(this,V),delete V.features)};return{layer:u,listener:p,delegates:{[R]:D}}}}on(R,u,p){if(p===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,p);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,p){if(p===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,p);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,p){return p===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===p){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let p;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")p=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);p=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(p,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const p=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,p):this.style.loadJSON(R,u,p),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const p=R,D=this._requestManager.transformRequest(p,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(p){r.w(`Unable to perform style diff: ${p.message||p.error||p}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const p in this.style._layers){const D=this.style._layers[p];D.type==="hillshade"&&D.source===R.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ii(this.painter,u,R),this.painter.renderToTexture=new Js(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=p=>{p.dataType==="style"?this.terrain.sourceCache.freeRtt():p.dataType==="source"&&p.tile&&(p.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(p.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const p=R[u]._tiles;for(const D in p){const V=p[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,p={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=p;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.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:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=f.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const p=this.style.getImage(R);if(!p)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?f.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.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(V!==p.data.width||J!==p.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return p.data.replace(oe,fe),this.style.updateImage(R,p),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,p){return this.style.setLayerZoomRange(R,u,p),this._update(!0)}setFilter(R,u,p={}){return this.style.setFilter(R,u,p),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,p,D={}){return this.style.setPaintProperty(R,u,p,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,p,D={}){return this.style.setLayoutProperty(R,u,p,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,p={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,p,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,p=>{p||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),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(),D=this._getClampedPixelRatio(p[0],p[1]);this._resizeCanvas(p[0],p[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,p){this._canvas.width=Math.floor(p*R),this._canvas.height=Math.floor(p*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const p=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!p){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(p,this.transform),i.testSupport(p)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let p=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=f.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(p=!0,this._crossFadingFactor=fe),this.style.update(oe)}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,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||p)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const p of this._controls)p.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},h.MapMouseEvent=zo,h.MapTouchEvent=So,h.MapWheelEvent=ol,h.Marker=Oi,h.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),p=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=p,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",p.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=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=u},this._setButtonTitle=(u,p)=>{const D=this._map._getUIString(`NavigationControl.${p}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Ds,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Wr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,u){const p=n.create("button",R,this._container);return p.type="button",p.addEventListener("click",u),p}},h.Popup=kt,h.RasterDEMTileSource=He,h.RasterTileSource=ze,h.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},h.ScrollZoomHandler=ul,h.Style=Vr,h.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=R}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.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(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},h.TwoFingersTouchPitchHandler=Rl,h.TwoFingersTouchRotateHandler=Jc,h.TwoFingersTouchZoomHandler=yn,h.TwoFingersTouchZoomRotateHandler=hl,h.VectorTileSource=Le,h.VideoSource=ge,h.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((p,D)=>{ke[p]=D})(R,u)}),h.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},h.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},h.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},h.getVersion=function(){return ae},h.getWorkerCount=function(){return de.workerCount},h.getWorkerUrl=function(){return r.a.WORKER_URL},h.importScriptInWorkers=function(R){return me().broadcast("IS",R)},h.prewarm=function(){se().acquire(ce)},h.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},h.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},h.setWorkerCount=function(R){de.workerCount=R},h.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),g}()},88640:function(m,g,a){function y(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function h(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(g,{GW:function(){return ve},Dj:function(){return de}});var _=.7,v=1/_,x="\\s*([+-]?\\d+)\\s*",f="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(f,"\\)$")),b=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(f,"\\)$")),w=new RegExp("^hsl\\(".concat(f,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(f,",").concat(n,",").concat(n,",").concat(f,"\\)$")),E={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 A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=b.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?Z(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?Z(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function Z(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new H(we,Se,Ce,Me)}function G(we){if(we instanceof H)return new H(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new H;if(we instanceof H)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new H(He,Pe,Ve,we.opacity)}function H(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ie(we){return Math.max(0,Math.min(1,we||0))}function W(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}y(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return G(this).formatHsl()},formatRgb:P,toString:P}),y(S,M,h(r,{brighter:function(we){return we=we==null?v:Math.pow(v,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(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:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),y(H,function(we,Se,Ce,Me){return arguments.length===1?G(we):new H(we,Se,Ce,Me??1)},h(r,{brighter:function(we){return we=we==null?v:Math.pow(v,we),new H(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new H(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(W(we>=240?we-240:we+120,Le,Me),W(we,Le,Me),W(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new H($(this.h),ie(this.s),ie(this.l),O(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 we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ie(this.s),"%, ").concat(100*ie(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function Q(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?Q:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=Q(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function ee(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ne(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ne:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?ee:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function U(m){var g=B[m];if(g!==void 0)return g.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var g=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(g,{a:g}),g},U.d=function(m,g){for(var a in g)U.o(g,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:g[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,g){return Object.prototype.hasOwnProperty.call(m,g)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(eV);var Hct=eV.exports;const tV=E6(Hct),hJt="",pJt="",Zct={ref:"card",class:"card-volumetric-field"},aV=1,qct=800,rV=300,Wct=-46,nV=100,iV=-14,Jct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),g=t.ref(null),a=t.ref(0),y=t.ref(null);t.watch(()=>B.passesPlays,d=>{const b=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(b)}),t.watch(()=>a.value,(d,b)=>{y.value&&(n(d),g.value.style.height=`${i(d)}px`,y.value.style.top=`${c(i(d))}px`)});function h(){s=new ResizeObserver(d=>{for(const b of d)a.value=b.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,b){let w=.01351,C=.02439,E=0,A=0,P=[];const L=b.length,T=Math.floor(L/10);for(;E<74;)A=b.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function v(d){let b=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),b.push(w),C--;return b.push(r(74),r(74)),b}function x(d,b,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<b-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][b-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<b-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function f(d){let b=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>b&&(b=E)}return b}function n(d){tV.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(rV/qct*d,0)}function c(d){return iV+(d-nV)/(rV-nV)*(Wct-iV)}function l(d){let b=v(d),w=b.length,C=b[0].length;b=x(x(b,C,w),C,w),C=b[0].length,w=b.length;const E=f(b),A=[{z:b,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};g.value&&(g.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:aV,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:aV,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}tV.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),y.value=document.getElementsByClassName("plot-container")[0],y.value&&(y.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),h()}),(d,b)=>(t.openBlock(),t.createElementBlock("div",Zct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:g,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-80eaae2c"]]),mJt="",Yct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-885deed1"]]),Xct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let WS=null;function $ct(){return WS||(WS=Jy(Xct)),WS}const yJt="",Kct={class:"volumetric-section-container"},Qct={key:0,class:"volumetric-section-container__switch"},eut={class:"volumetric-section-container__attack-direction"},tut={class:"volumetric-section-container__field"},aut=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=$ct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const g=e,a=gp();let y=null;function h(){if(!y){const C=a.getters.getProviderId;y=Une(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return y}const r=t.ref(0),_=t.ref(new Map),v=t.ref({teamId:0}),x=t.computed(()=>[{teamId:g.game.homeTeam.team_id,text:g.game.homeTeam.colloquial_name,img:g.game.homeTeam.logo,isHomeTeam:!0},{teamId:g.game.awayTeam.team_id,text:g.game.awayTeam.colloquial_name,img:g.game.awayTeam.logo,isHomeTeam:!1}]),f=t.computed(()=>_.value.get(g.isGamePreMatch?g.teamSelectedPreMatch.teamId:v.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,v.value=x.value[r.value]},{immediate:!0}),t.watch(()=>g.game.gameId,C=>{C&&(w(),i(g.game.is_live&&g.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*g.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await h();const E=await l();_.value.set(g.game.homeTeam.team_id,E.homeTeam),_.value.set(g.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return g.game.game_status===4&&!g.game.is_live?C[o.gameId]!==g.game.gameId:C[o.gameId]===g.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(g.game.is_live||g.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${g.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===g.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===g.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||g.game.seasonId}-${g.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||g.game.seasonId}-${g.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(g.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===g.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===g.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function b(C){r.value=C.index,v.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",Kct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Qct,[t.createVNode(W5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:b},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",eut,[t.createVNode(Yct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:v.value},null,8,["team"])]),t.createElementVNode("div",tut,[t.createVNode(Jct,{"passes-plays":f.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-02854ef1"]]),bJt="";let oV=null;const rut={components:{GSCHighlights:iZe,ToggleButtons:W5,VolumetricSectionContainer:aut,DataProminentGame:yZe,HighlightsProminentGameLive:yqe,HighlightsProminentGame:iqe,GSCRadioToggle:xF,FieldPosesion:UZe,EventsLine:iWe,ChalkboardSectionContainer:Gct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){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)oV=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),oV.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)},onClickSection(){Rd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},nut={key:0,class:"container-prominent-data"},iut={class:"container-prominent-section"},out={key:0,class:"highlights-containers"},sut={class:"highlights-content"},lut={key:1,class:"highlights-containers"},cut={key:0,class:"container-leyend-prematch"},uut={key:1,class:"container-leyend-prematch-movil"},dut={key:2,class:"container-leyend-prematch-movil"},hut={class:"container-switch-toggle"},put={class:"container-prominent-section__chalkboard"};function fut(e,o,s,B,U,m){const g=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),y=t.resolveComponent("HighlightsProminentGame"),h=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),v=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),f=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nut,[t.createVNode(g,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",iut,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",out,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",sut,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.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(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",lut,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(h,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,provider:e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",cut,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",uut,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",dut,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",hut,[t.createVNode(v,{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:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(f,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",put,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.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 mut=Ki(rut,[["render",fut],["__scopeId","data-v-c05d0800"]]),_Jt="",gut={class:"datagame-container"},yut=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function g(a){s("openmedia",a)}return(a,y)=>(t.openBlock(),t.createElementBlock("div",gut,[t.createVNode(mut,{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:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:g},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-f33283ce"]]),vut={class:"datagame-container"},but={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=gp(),B=t.ref(0),U=e;t.watch(()=>U.game,y=>{B.value=y.gameId},{deep:!0,immediate:!0});const m=o;function g(y){m("openmedia",y)}function a(y){m("intervalidgs",y)}return(y,h)=>(t.openBlock(),t.createElementBlock("div",vut,[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(mb),{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:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):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(mb),{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,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(mb),{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,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:g},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},_ut={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.comtextleyemdmultipleleagues380ComparativeG:this.$style.comtextleyemdmultipleleaguesComparativeG},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730ComparativeG:this.$style.comdropdownParentComparativeG},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960ComparativeG:e<=1232?this.$style.comdescubreVideos1232ComparativeG:this.$style.comdescubreVideosComparativeG},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380ComparativeG:e<=480?this.$style.comquitarFiltros480ComparativeG:e<=730?this.$style.comquitarFiltros730ComparativeG:this.$style.comquitarFiltrosComparativeG},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480ComparativeG:e<=730?this.$style.commejoresJugadores730ComparativeG:this.$style.commejoresJugadoresComparativeG},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960ComparativeG:this.$style.commenuSectionComparativeG},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420ComparativeG:e<=460?this.$style.comtopFilters460ComparativeG:e<=1232?this.$style.comtopFilters1232ComparativeG:this.$style.comtopFiltersComparativeG},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320ComparativeG:e<=420?this.$style.comtoniKroosWrapper420ComparativeG:e<=916?this.$style.comtoniKroosWrapper760ComparativeG:e<=975?this.$style.comtoniKroosWrapper975ComparativeG:e<=1079?this.$style.comtoniKroosWrapper1080ComparativeG:this.$style.comtoniKroosWrapperComparativeG},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320ComparativeG:e<=916?this.$style.comcontainerTables760ComparativeG:e<=1079?this.$style.comcontainerTables960ComparativeG:this.$style.comcontainerTablesComparativeG},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320ComparativeG:e<=960?this.$style.comcontainerTheBest960ComparativeG:e<=1232?this.$style.comcontainerTheBest1232ComparativeG:this.$style.comcontainerTheBestComparativeG},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730ComparativeG:e<=960?this.$style.commenuSectionHeader960ComparativeG:e<=1232?this.$style.commenuSectionHeader1232ComparativeG:this.$style.commenuSectionHeaderComparativeG},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380ComparativeG:e<=530?this.$style.comlosMejores530ComparativeG:e<=730?this.$style.comlosMejores730ComparativeG:this.$style.comlosMejoresComparativeG},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730ComparativeG:this.$style.comdropdownComparativeG},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730ComparativeG:this.$style.comdropdown1ComparativeG},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430ComparativeG:e<=730?this.$style.commenuSectionParentHeader730ComparativeG:e<=960?this.$style.commenuSectionParentHeader960ComparativeG:e<=1232?this.$style.commenuSectionParentHeader1232ComparativeG:this.$style.commenuSectionParentHeaderComparativeG},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320ComparativeG:e<=350?this.$style.comtemplateLosMejores1350ComparativeG:e<=420?this.$style.comtemplateLosMejores1420ComparativeG:e<=540?this.$style.comtemplateLosMejores1540ComparativeG:e<=960?this.$style.comtemplateLosMejores1960ComparativeG:e<=1232?this.$style.comtemplateLosMejores11232ComparativeG:this.$style.comtemplateLosMejores1ComparativeG},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760ComparativeG:this.$style.comcontainerMenuComparativeG},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540ComparativeG:this.$style.comtitleSectionComparativeG},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320ComparativeG:e<=350?this.$style.comcontainerSection350ComparativeG:e<=960?this.$style.comcontainerSection960ComparativeG:e<=1232?this.$style.comcontainerSection1232ComparativeG:this.$style.comcontainerSectionComparativeG},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420ComparativeG:e<=760?this.$style.comfiltersContainer760ComparativeG:e<=1232?this.$style.comfiltersContainer1232ComparativeG:this.$style.comfiltersContainerComparativeG},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420ComparativeG:e<=460?this.$style.comtopFiltersParent460ComparativeG:e<=1232?this.$style.comtopFiltersParent1232ComparativeG:this.$style.comtopFiltersParentComparativeG}}};function Hb(e){const o=t.ref({width:0,height:0});let s=null;function B(){if(!e.value)return;const U=e.value.getBoundingClientRect();o.value.width=U.width,o.value.height=U.height}return t.onMounted(()=>{B(),window.ResizeObserver?(s=new ResizeObserver(B),s.observe(e.value)):window.addEventListener("resize",B)}),t.onUnmounted(()=>{s&&(s.disconnect(),s=null),window.removeEventListener("resize",B)}),{elementSize:o}}const xut={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"},JS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},sV=()=>{t.useCssVars(e=>({"32aec1ca":e.background,"4e54a87a":e.height,"448b848c":e.fontSize,"4c061c38":e.fontColor,"3917092f":e.fontFamily,"4a286e80":e.heightTeam}))},lV=JS.setup;JS.setup=lV?(e,o)=>(sV(),lV(e,o)):sV;const wut={ref:"myDivRef"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",wut,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.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(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.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(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const cV=Ki(JS,[["render",kut],["__cssModules",{$style:xut}]]),CXt="",YS={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))}}},uV=()=>{t.useCssVars(e=>({"142f4a30":e.height,"425d470b":e.borderWidthBtn,e390e3e2:e.borderType,"37c60b2e":e.borderColor,"4c69ebb2":e.borderRadius,"1e10a0c6":e.width,64535028:e.backgroundColor,"26a98839":e.cursorType,"0ff73bb9":e.fontSize,"22158e0e":e.fontStyle,"4f1cadc8":e.fontFamily,"38d08a5c":e.marginLeftStat,f38f9ca6:e.fontSizeStat}))},dV=YS.setup;YS.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const Sut=["src"],Cut={key:1,class:"text"},Tut=["src"],Aut={class:"stats"},Eut={class:"numstats"},Mut={class:"leyend"};function Iut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Sut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Cut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Tut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",Aut,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Eut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Mut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const hV=Ki(YS,[["render",Iut],["__scopeId","data-v-2d2e96b3"]]),Put={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"},XS={components:{GSCButton:hV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=Hb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},pV=()=>{t.useCssVars(e=>({"20b41037":e.height,"39c46784":e.background,"0e629c00":e.fontSize,"85dc1978":e.fontColor,"2cf3d8ba":e.fontFamily}))},fV=XS.setup;XS.setup=fV?(e,o)=>(pV(),fV(e,o)):pV;const Lut={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["src"],jut=["fill"],Uut=["fill"],Gut=["src"],Hut=["src"],Zut=["src"],qut=["src"],Wut=["fill"],Jut=["fill"];function Yut(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Lut,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,But),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,zut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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:s.data.team_logo},null,10,Out),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),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(s.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(s.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:s.data.player_country_flag},null,10,Dut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.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(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,Vut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(g,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Uut)],10,jut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,Gut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Hut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.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:s.data.team_logo},null,10,Zut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),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(s.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(s.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:s.data.player_country_flag},null,10,qut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(g,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.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,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Jut)],10,Wut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const mV=Ki(XS,[["render",Yut],["__cssModules",{$style:Put}]]),Xut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},$S={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))}}},gV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},yV=$S.setup;$S.setup=yV?(e,o)=>(gV(),yV(e,o)):gV;const $ut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Kut=["src"],Qut={key:1,class:"text"},edt=["src"],tdt={class:"stats"},adt=$ut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),rdt={class:"numstats"},ndt={class:"leyend"};function idt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Kut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,edt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",tdt,[adt,t.createElementVNode("div",rdt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",ndt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const odt=Xut($S,[["render",idt],["__scopeId","data-v-f3ee6b2b"]]),sdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},KS={components:{GSCButton:odt},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)}},vV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},bV=KS.setup;KS.setup=bV?(e,o)=>(vV(),bV(e,o)):vV;const ldt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},cdt={class:"gsc-filterperteam__panel-teams__cont-teams"},udt=["onClick"],ddt=["src","alt","title"];function hdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",ldt,[t.createElementVNode("div",cdt,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(g,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,y)=>(t.openBlock(),t.createElementBlock("div",{key:y,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:h=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,ddt)],14,udt))),128))])],512)],4)}const pdt=sdt(KS,[["render",hdt],["__scopeId","data-v-b39cba3b"]]),fdt={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"},QS={components:{GSCButton:hV},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)}}},_V=()=>{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}))},xV=QS.setup;QS.setup=xV?(e,o)=>(_V(),xV(e,o)):_V;const mdt=["src"],gdt=["src"],ydt=["src"],vdt=["src"],bdt=["fill"],_dt=["fill"],xdt=["src"],wdt=["fill"],kdt=["fill"];function Sdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,mdt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,gdt)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,ydt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(g,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,vdt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,_dt)],10,bdt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,xdt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(g,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,kdt)],10,wdt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Cdt=Ki(QS,[["render",Sdt],["__cssModules",{$style:fdt}]]),Tdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},eC={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))}}},wV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},kV=eC.setup;eC.setup=kV?(e,o)=>(wV(),kV(e,o)):wV;const Adt=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Edt=["src"],Mdt={key:1,class:"text"},Idt=["src"],Pdt={class:"stats"},Ldt=Adt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),Bdt={class:"numstats"},zdt={class:"leyend"};function Odt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...g)=>m.btnClick&&m.btnClick(...g))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Edt)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Mdt,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Idt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...g)=>m.btnClick&&m.btnClick(...g))},[t.createElementVNode("div",Pdt,[Ldt,t.createElementVNode("div",Bdt,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",zdt,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Ddt=Tdt(eC,[["render",Odt],["__scopeId","data-v-f3ee6b2b"]]),HQt="",ZQt="",Ndt={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"},tC={components:{GSCButton:Ddt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},SV=()=>{t.useCssVars(e=>({a297a8e8:e.fontFamily,"05868b8a":e.fontColor,"9181d814":e.fontColorValue,c650cbae:e.fontSize,af6837b2:e.background}))},CV=tC.setup;tC.setup=CV?(e,o)=>(SV(),CV(e,o)):SV;const Fdt={ref:"myDivRef"},Rdt=["src"];function Vdt(e,o,s,B,U,m){const g=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Fdt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,Rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&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:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(g,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&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:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const TV=Ki(tC,[["render",Vdt],["__cssModules",{$style:Ndt}],["__scopeId","data-v-5dd9e88d"]]);/**
4136
4136
  * Vue 3 Carousel 0.3.1
4137
4137
  * (c) 2023
4138
4138
  * @license MIT
4139
- */const $d={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},AV={itemsToShow:{default:$d.itemsToShow,type:Number},itemsToScroll:{default:$d.itemsToScroll,type:Number},wrapAround:{default:$d.wrapAround,type:Boolean},throttle:{default:$d.throttle,type:Number},snapAlign:{default:$d.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:$d.transition,type:Number},breakpoints:{default:$d.breakpoints,type:Object},autoplay:{default:$d.autoplay,type:Number},pauseAutoplayOnHover:{default:$d.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:$d.mouseDrag,type:Boolean},touchDrag:{default:$d.touchDrag,type:Boolean},dir:{default:$d.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:$d.i18n,type:Object},settings:{default(){return{}},type:Object}};function jdt({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function Udt({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function aC({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function Gdt({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let g=o;switch(B){case"center":case"center-odd":g-=(m-1)/2;break;case"center-even":g-=(m-2)/2;break;case"end":g-=m-1;break}return U?g:aC({val:g,max:s-m,min:0})}function EV(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...EV(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function rC({val:e,max:o,min:s=0}){return e>o?rC({val:e-(o+1),max:o,min:s}):e<s?rC({val:e+(o+1),max:o,min:s}):e}function Hdt(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function Zdt(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function qdt(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var Wdt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},$d))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},qdt(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),Jdt=t.defineComponent({name:"Carousel",props:AV,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),g=t.ref([]),a=t.ref(0),y=t.ref(0),h=t.reactive(Object.assign({},$d));let r=Object.assign({},$d),_;const v=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),f=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",h),t.provide("slidesCount",y),t.provide("currentSlide",v),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function b(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ne=>Number(ne)).sort((ne,me)=>+me-+ne);let se=Object.assign({},r);re.some(ne=>{const me=window.matchMedia(`(min-width: ${ne}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ne])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ne])=>h[se]=ne)}const C=Zdt(()=>{b(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/h.itemsToShow}function A(){y.value<=0||(f.value=Math.ceil((y.value-1)/2),n.value=jdt({config:h,slidesCount:y.value}),i.value=Udt({config:h,slidesCount:y.value}),h.wrapAround||(v.value=aC({val:v.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),b(),Z(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||H.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=Hdt(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ne=T.y-L.y;I.y=ne,I.x=se},h.throttle);function j(){const re=h.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ne=Math.round(I.x/a.value+se)*re;if(ne&&!P){const me=ye=>{ye.stopPropagation(),window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(v.value-ne),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function Z(){!h.autoplay||h.autoplay<=0||(c=setInterval(()=>{h.pauseAutoplayOnHover&&M.value||ie()},h.autoplay))}function G(){c&&(clearInterval(c),c=null),Z()}const H=t.ref(!1);function $(re){const se=h.wrapAround?re:aC({val:re,max:n.value,min:i.value});v.value===se||H.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:v.value,prevSlideIndex:x.value,slidesCount:y.value}),H.value=!0,x.value=v.value,v.value=se,l=setTimeout(()=>{if(h.wrapAround){const ne=rC({val:se,max:n.value,min:0});ne!==v.value&&(v.value=ne,s("loop",{currentSlideIndex:v.value,slidingToIndex:re}))}s("update:modelValue",v.value),s("slide-end",{currentSlideIndex:v.value,prevSlideIndex:x.value,slidesCount:y.value}),H.value=!1,G()},h.transition))}function ie(){$(v.value+h.itemsToScroll)}function W(){$(v.value-h.itemsToScroll)}const K={slideTo:$,next:ie,prev:W};t.provide("nav",K),t.provide("isSliding",H);const Q=t.computed(()=>Gdt({config:h,currentSlide:v.value,slidesCount:y.value}));t.provide("slidesToScroll",Q);const X=t.computed(()=>{const re=h.dir==="rtl"?-1:1,se=Q.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${H.value?h.transition:0}ms`,margin:h.wrapAround?`0 -${y.value*a.value}px`:"",width:"100%"}});function ee(){d(),b(),A(),E(),G()}Object.keys(AV).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],ee)}),t.watch(()=>e.modelValue,re=>{re!==v.value&&$(Number(re))}),t.watch(y,A),s("before-init"),d();const ce={config:h,slidesCount:y,slideWidth:a,next:ie,prev:W,slideTo:$,currentSlide:v,maxSlide:n,minSlide:i,middleSlide:f};B({updateBreakpointsConfigs:b,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:ee,slideTo:$,next:ie,prev:W,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=EV(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ne=re;if(h.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ne=[...ve,...re,...we]}g.value=re,y.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:h.mouseDrag?O:null,onTouchstartPassiveCapture:h.touchDrag?O:null},ne),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":H.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":h.dir==="rtl"},dir:h.dir,"aria-label":h.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(Wdt)])}}}),MV;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(MV||(MV={}));var Ydt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},$d))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),g=()=>e.index===B.value,a=()=>e.index===B.value-1,y=()=>e.index===B.value+1,h=()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_};return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":h(),"carousel__slide--active":g(),"carousel__slide--prev":a(),"carousel__slide--next":y(),"carousel__slide--sliding":m.value},"aria-hidden":!h()},(r=o.default)===null||r===void 0?void 0:r.call(o))}}});const Xdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},$dt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),Kdt={class:"gsc-carousel"},Qdt={key:0},eht=$dt(()=>t.createElementVNode("div",null,"no hay",-1)),tht=[eht],aht={class:"gsc-carousel__2d__slides"},rht={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nht=["fill"],iht={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oht=["fill"],sht={class:"gsc-carousel__2d__navigation"},lht={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cht=["stroke"],uht={key:1,class:"gsc-carousel__2d__navigation__pagination"},dht=["onClick"],hht={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pht=["stroke"],fht={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(o=>o in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:o,emit:s}){const B=e;t.useCssVars(n=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const U=t.ref(null),m=t.ref({}),g=t.ref(0),a=t.ref(!1);t.watch(U,n=>{n&&a.value?(a.value=!1,y(B.items)):n&&n.slideTo&&n.slideTo(g.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,n=>{g.value!==n&&v(n)}),t.watch(()=>B.defaultItemByIndex,n=>{g.value!==n&&v(n)}),t.watch(()=>B.items,n=>{U.value?y(n):a.value=!0},{immediate:!0});function y(n){n&&n.length&&U.value&&setTimeout(()=>{if(B.defaultItemByProp){const i=B.items.findIndex(c=>c[B.defaultItemByProp.propName]===B.defaultItemByProp.value);i!==-1?(g.value=i,m.value=n[i]):(g.value=0,m.value=n[0])}else g.value=B.defaultItemByIndex,m.value=n[B.defaultItemByIndex];U.value.slideTo&&U.value.slideTo(g.value),m.value&&g.value===0&&s("input",{selectedItem:m.value,selectedItemIndex:g.value})},500)}function h(){U.value&&U.value.next()}function r(){U.value&&U.value.prev()}function _(){U.value&&U.value.updateSlideWidth()}function v(n){U.value&&U.value.slideTo(n)}function x(n){U.value.slideTo(n)}function f(n){const i=n.slidingToIndex<0?B.items.length-1:n.slidingToIndex===B.items.length?0:n.slidingToIndex;g.value=i,m.value=B.items[i],s("update:currentItemIndex",i),s("input",{selectedItem:m.value,selectedItemIndex:g.value})}return o({prev:r,next:h,updateSlideWidth:_,slideTo:v}),(n,i)=>(t.openBlock(),t.createElementBlock("div",Kdt,[B.is3d?(t.openBlock(),t.createElementBlock("div",Qdt,tht)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",aht,[t.createVNode(t.unref(Jdt),{ref_key:"carousel2d",ref:U,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:f},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createBlock(t.unref(Ydt),{key:l},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{item:c},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[0]||(i[0]=c=>U.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",rht,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,nht)]))],2)],4)):t.createCommentVNode("",!0),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[1]||(i[1]=c=>h())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",iht,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,oht)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",sht,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:i[2]||(i[2]=c=>r())},[(t.openBlock(),t.createElementBlock("svg",lht,[t.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:B.arrowsColor},null,8,cht)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",uht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${l}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${g.value===l?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${g.value===l?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:d=>x(l)},null,12,dht))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:i[3]||(i[3]=c=>U.value.next())},[(t.openBlock(),t.createElementBlock("svg",hht,[t.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:B.arrowsColor},null,8,pht)]))])):t.createCommentVNode("",!0)])],2))]))}},mht=Xdt(fht,[["__scopeId","data-v-54620d25"]]),_ea="",IV={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},xea="",nC={components:{GSCCarousel:mht,GSCLeaders:Cdt,GSCRowTable:mV,GSCTableHeader:cV,GSCExpandedInfo:TV},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},typeData:{type:Number,default:1},gameId:{type:Number,default:0},filtersProp:{type:[Object,String],default:()=>{}},game:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},filterTeam:{type:Number,default:0},timeLiveComparativeAvanced:{type:Number,default:6e4},category:{type:Number,default:1},categoryName:{type:String,default:"Goles"},seasonSelected:{type:Object,default:()=>({})},season:{type:Number,default:1772},type:{type:Number,default:0},borderRadius:{type:String,default:"8px"},borderWidth:{type:[String,Number],default:"2px"},borderColor:{type:String,default:"#cfcfcf"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},numRows:{type:Number,default:5}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},watch:{category:{async handler(){this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season)}},game:{immediate:!0,deep:!0,async handler(e){e&&(this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season),this.game.is_live&&(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)))}},typeData:{immediate:!0,async handler(e){await this.getCategoryStats(this.season),e===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(e,o){e&&(JSON.stringify(e)!==JSON.stringify(o)||this.sonConjuntosDistintos(e.setNationalitiesIds,o.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=e,[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.filterEmitAux.typeZone=1:this.filterEmitAux.typeZone=2,this.formatFilterStats=await this.filterRecords(this.filterEmitAux))}}},computed:{topData(){if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var e={},o={},s=[],B=[],U=[];return this.formatFilterStats.map(m=>{e[m.team_id]?e[m.team_id].total=e[m.team_id].total+m.total:(e[m.team_id]={},e[m.team_id].total=m.total,e[m.team_id].id=this.teamInfo[m.team_id].id,e[m.team_id].name=this.teamInfo[m.team_id].name.replace(" Femenil",""),e[m.team_id].img=If("https://golstatsimages.blob.core.windows.net/teams-80/"+m.team_id+".png",this.$store.getters.getProviderId),e[m.team_id].effectiveness=this.teamInfo[m.team_id].effectiveness,e[m.team_id].frecuency=this.teamInfo[m.team_id].frecuency,e[m.team_id].game_avg=this.teamInfo[m.team_id].game_avg,e[m.team_id].game_avg_last_season=this.teamInfo[m.team_id].game_avg_last_season,e[m.team_id].games_played_lastseason=this.teamInfo[m.team_id].games_played_lastseason,e[m.team_id].games_played=this.teamInfo[m.team_id].games_played,e[m.team_id].positiontable=this.teamInfo[m.team_id].positiontable,e[m.team_id].goals=this.teamInfo[m.team_id].goals,e[m.team_id].goalsrecived=this.teamInfo[m.team_id].goalsrecived,e[m.team_id].xg=this.teamInfo[m.team_id].xg),o[m.player_id]?m.player_id!=0&&m.player_id!=62117&&(o[m.player_id].total=o[m.player_id].total+m.total):m.player_id!=0&&m.player_id!=62117&&(o[m.player_id]={},o[m.player_id].total=m.total,m.player_id&&this.playersInfo[m.player_id]?(o[m.player_id].name=this.playersInfo[m.player_id].name,o[m.player_id].name_short=this.getnameshort(this.playersInfo[m.player_id].name),o[m.player_id].img=this.playersInfo[m.player_id].img,o[m.player_id].id=this.playersInfo[m.player_id].id,o[m.player_id].age=this.playersInfo[m.player_id].age,o[m.player_id].team=this.playersInfo[m.player_id].team,o[m.player_id].teamname=this.playersInfo[m.player_id].teamname,o[m.player_id].teamid=this.playersInfo[m.player_id].teamid,o[m.player_id].position=this.playersInfo[m.player_id].position,o[m.player_id].positionId=this.playersInfo[m.player_id].positionId,o[m.player_id].positionfull=this.playersInfo[m.player_id].positionfull,o[m.player_id].country=this.playersInfo[m.player_id].country,o[m.player_id].effectiveness=this.playersInfo[m.player_id].effectiveness,o[m.player_id].minutes=this.playersInfo[m.player_id].minutes_played,o[m.player_id].games=this.playersInfo[m.player_id].games_played,o[m.player_id].date=this.playersInfo[m.player_id].date,o[m.player_id].nationality=this.playersInfo[m.player_id].nationality,o[m.player_id].player_country_flag=this.playersInfo[m.player_id].player_country_flag,o[m.player_id].categoryName=this.categoryName):(o[m.player_id].id=m.player_id,o[m.player_id].name=m.player_id,o[m.player_id].img="SIN IMAGEN",o[m.player_id].age="",o[m.player_id].teamname="",o[m.player_id].team="",o[m.player_id].teamid=0,o[m.player_id].position="",o[m.player_id].positionId=0,o[m.player_id].positionfull="",o[m.player_id].country="",o[m.player_id].effectiveness="",o[m.player_id].minutes="",o[m.player_id].games="",o[m.player_id].date="00-00-0000",o[m.player_id].nationality="",o[m.player_id].player_country_flag="",o[m.player_id].categoryName=""))}),s.push(...Object.values(e)),B.push(...Object.values(o)),s=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((m,g)=>(m.top=g<9?"0"+(g+1):""+(g+1),m)),s=s.map((m,g)=>(m.top=g<9?"0"+(g+1):""+(g+1),m)),this.filterTeam!==0&&!this.isTeam&&(U=B.filter(m=>m.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(s):this.filterTeam!=0?this.formatArrayPaginate(U):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",videoCategoriesMap:{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]},urlPrematch:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/topsBySeasonAndCategory/",data_headers:["team_id","player_id","playing_as","match_result","section","total","origen","destino"],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",mapPlayers:new Map,setNationalityIds:new Set,arrayAgeRange:[0,0],arePlaysEmpty:!1,teamInfo:{},formatFilterStats:[],formatStats:[],playersInfo:{},isloading:!0,statsData:{},updateSlider:0,intervalIdtops:null,filterEmitAux:{},filtersSelect:{playingAs:[],matchResult:[],sections:[],zone:[],typeZone:[]},filtersValues:{type:1,sections:[1,2,3,4,5,6],matchResult:[1,2,3],playingAs:[1,2],zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],typeZone:1,arrayAgeRange:[1,60],setNationalitiesIds:[],setPositionsIds:[1,2,3,4,5,6,7,8,9]},expand:!1,playerexpand:0,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],categories:[{id:1,name:"Goles"}]}),async created(){await this.fetchVideoCategories()},methods:{getImageUrl:If,changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,o){return e.total>o.total?-1:e.total<o.total?1:e.minutes<o.minutes?-1:e.minutes>o.minutes?1:0},sonConjuntosDistintos(e,o){const s=Array.from(e),B=Array.from(o);if(s.length!==B.length)return!0;for(let U=0;U<s.length;U++)if(!o.has(s[U]))return!0;return!1},getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var g=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),g+". "+m},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,o){return e.total<o.total?-1:e.total>o.total?1:e.name<o.name?-1:e.name>o.name?1:0},sortAndSlice(e,o){return e.sort((s,B)=>(s.name<B.name?1:-1)&&(s.total<B.total?1:-1)).slice(0,o)},getCategoryName(e){let o="";for(let s=0;s<this.categories.length;s++)e==this.categories[s].id&&(o=this.categories[s].name);return o},translateTopCategories(e){return this.videoCategoriesMap[e]||[]},async fetchVideoCategories(){try{const e=this.$store.getters.getProviderId||1,{data:o}=await pu.get(`https://dtcf4s9tapfr0.cloudfront.net/${e}/tops/translate_top_categories.json`);o&&typeof o=="object"&&(this.videoCategoriesMap=o)}catch{}},getCoordinatePointPerCategory(e){return{1:2,2:3,3:1,4:2,5:1,6:2,7:2,8:1,9:1,10:2,11:2,12:1,13:1,14:1,15:1,16:1,17:1,18:3,19:3,20:3,21:3,22:1,23:1}[e]||0},emitEventMedia(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,g=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,g=this.filterEmitAux.zone);const y=1,h=2,r=3,_=this.isTeam?r:h,v=e.player_id;let x=[],f=this.isTeam?e.id:this.filterTeam;v?this.isTeam?f=v:(x=[v],a=a.filter(i=>!i.toString().includes("_r"))):this.isTeam?f=e.id:(x=[e.id],a=a.filter(i=>!i.toString().includes("_r")));const n={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:y,playListType:_,gameIds:null,playerIds:x,goalkeeperIds:[],categoryIds:this.translateTopCategories(o),teamId:f||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:g,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",n)},emitEventMediaFullTable(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,g=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,g=this.filterEmitAux.zone);const y=1,h=2,r=3,_=this.isTeam?r:h;let v=[],x=this.isTeam?e.id:this.filterTeam;this.isTeam?x=e.id:(v=[e.id],a=a.filter(n=>!n.toString().includes("_r")));const f={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:y,playListType:_,gameIds:null,playerIds:v,goalkeeperIds:[],categoryIds:a,teamId:x||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:g,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",f)},replaceImgPlayer(e){return e.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var g=m+". "+U;return g},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,o){this.$emit("clickprofile",{id:e,teamId:o,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){var o,s;this.mapPlayers=new Map;try{if(!e)return;let B=[],U={},m={},g=this.season;(s=(o=this.seasonSelected)==null?void 0:o.related_seasons)!=null&&s.some(_=>_.id===this.season)&&(g=this.seasonSelected.id),this.arePlaysEmpty=!1;const a=pu.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;const y=this.$store.getters.getProviderId,h=this.$store.getters.getIsDevApis;let r={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?acc=1&t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?acc=1"):this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.urlPrematch+g+"/"+this.category,y,h)+"?t="+this.teamWidget):r=await a.get(uu(this.urlPrematch+g+"/"+this.category,y,h)+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),r&&r.data&&r.data.data&&r.data.data.length>0){B=r.data.data.map(v=>this.formatStatsData(v)),r.data.teams.forEach(v=>{U[v[0]]={},U[v[0]].id=v[0],U[v[0]].name=v[1],U[v[0]].abrv=v[2],U[v[0]].img=v[3],U[v[0]].effectiveness=v[4],U[v[0]].games_played=v[5],U[v[0]].games_played_lastseason=v[6],U[v[0]].positiontable=v[7],U[v[0]].goals=v[8],U[v[0]].goalsrecived=v[9],U[v[0]].xg=v[10],U[v[0]].frecuency=v[11],U[v[0]].game_avg=v[12],U[v[0]].game_avg_last_season=v[13]});const _=new Set;r.data.players.forEach(v=>{const x=this.getObjectPlayer(v);this.mapPlayers.set(x.numberId,x);const f=x.numberAge,n=x.teamName.length>0?x.teamName[0].acronym:"",i=x.teamName.length>0?U[x.teamName[0].team_id].name:"",c=x.teamName.length>0?x.teamName[0].team_id:"",l=this.positions[x.numberPositionId-1].fullname,d=this.positions[x.numberPositionId-1].name,b=x.countryId.length>0?x.countryId[0].nationality_id:"",w=x.effectiveness,C=x.min,E=x.games,A=x.date;x.arrayNationalities.forEach(P=>{_.add(P.numberId)}),m[v[0]]={id:v[0],name:v[1],img:v[2],age:f,team:n,teamname:i,teamid:c,position:l,positionfull:d,effectiveness:w,country:b,games_played:E,minutes_played:C,date:A,nationality:x.stringNationalityName,player_country_flag:x.player_country_flag,positionId:x.numberPositionId}}),this.setNationalityIds=_,this.arrayAgeRange=[r.data.min_age,r.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=U,this.playersInfo=m,this.formatStats=B,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=r}catch(B){return Promise.reject(B)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(o=>{const s=e.playingAs.includes(o.playing_as),B=e.matchResult.includes(o.match_result),U=e.sections.includes(o.section),m=e.typeZone===1&&e.zone.includes(o.origen)||e.typeZone===2&&e.zone.includes(o.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const g=this.mapPlayers.get(o.player_id);if(!g)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(o.player_id))return!1}else{let a=!1;for(const y of g.arrayNationalitiesIds)if(e.setNationalitiesIds.has(y)){a=!0;break}if(!a)return!1}if(g.numberAge<e.arrayAgeRange[0]||g.numberAge>e.arrayAgeRange[1]||g.date<e.setYear||!e.setPositionsIds.includes(g.numberPositionId))return!1}return(e.playingAs.length===0||s)&&(e.matchResult.length===0||B)&&(e.sections.length===0||U)&&(e.zone.length===0||m)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const o={};return e[1]===0&&(e[2]===1||e[2]===2)&&(e[2]=3-e[2]),e[1]===0&&(e[3]===1||e[3]===2)&&(e[3]=3-e[3]),this.data_headers.forEach((s,B)=>{o[s]=e[B]}),o},getObjectPlayer(e){const o=[],s=e[7].map(U=>(o.push(U.nationality_id),{stringName:U.nationality,numberId:U.nationality_id})),B=e[9].split("-");return{numberId:e[0]!==void 0?e[0]:"",stringFullName:e[1]!==void 0?e[1]:"",stringImageUrl:e[2]!==void 0?e[2]:"",numberTeamId:e[3]!==void 0?e[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[3]+".jpg",stringNationalityName:IV[e[3]],numberAge:e[5]!==void 0?e[5]:"",numberPositionId:e[6]!==void 0?e[6]:"",countryId:e[7]!==void 0?e[7]:"",teamName:e[10]!==void 0?e[10]:"",effectiveness:e[11]!==void 0?e[11]:"",min:e[13]!==void 0?e[13]:"",games:e[12]!==void 0?e[12]:"",date:B.length>0?Number(B[0]):0,arrayNationalities:s,category:this.categoryName,arrayNationalitiesIds:o}},formatArrayPaginate(e){const o=Math.ceil(e.length/this.numRows);return Array.from({length:o},(s,B)=>{const U=B*this.numRows,m=U+this.numRows;return e.slice(U,m)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},PV=()=>{t.useCssVars(e=>({"638cea0c":e.borderRadius,"4901a25e":e.borderWidth,"47eaa3fb":e.borderColor}))},LV=nC.setup;nC.setup=LV?(e,o)=>(PV(),LV(e,o)):PV;const ght={ref:"myDivRef"},yht={class:"btnViewFullList"},vht={class:"text"},bht={class:"groupsLeague"},_ht={class:"row-table-carrousel"},xht={key:1,class:"container-no-search-result"},wht={key:0,class:"overlay-loading-top"};function kht(e,o,s,B,U,m){const g=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),y=t.resolveComponent("GSCExpandedInfo"),h=t.resolveComponent("GSCCarousel"),r=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",ght,[t.createElementVNode("div",yht,[t.createElementVNode("div",vht,[t.createElementVNode("div",bht,t.toDisplayString(s.categoryName),1)])]),s.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[m.topData.length>0?(t.openBlock(),t.createBlock(h,{key:0,items:m.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:m.changeCarrousel},{default:t.withCtx(({item:_})=>[t.createElementVNode("div",_ht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(v,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[v.top==1?(t.openBlock(),t.createBlock(g,{key:0,onMediadata:o[0]||(o[0]=f=>m.emitEventMedia(f,s.category,s.categoryName)),type:s.typeTable,"type-data":s.typeData,game:s.game,"team-widget":s.teamWidget,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==v.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:s.typeTable==0?{top:"01",photo:v.img,logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+v.teamid+".png",e.$store.getters.getProviderId),name:v.name,player_short:v.name_short,player_id:v.id,categoryId:s.category,total:v.total}:{top:"01",logo:v.img,total:v.total,name_team:v.name,player_id:v.id},"category-name":s.categoryName,buttonMaxWidth:s.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:m.clickexpand,onMore:m.morestats},null,8,["type","type-data","game","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(t.openBlock(),t.createBlock(a,{key:1,"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"is-expanded":e.playerexpand==v.id&&e.expand,onMediadata:o[1]||(o[1]=f=>m.emitEventMedia(f,s.category,s.categoryName)),data:s.typeTable==0?{position:v.top,player_name:v.name,player_short:v.name_short,player_photo:v.img,total:v.total,id:v.id,player_age:v.age,team_abrev:v.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+v.teamid+".png",e.$store.getters.getProviderId),player_position:v.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+v.country+".jpg",player_games:v.minutes,player_min:v.games,league_name:"          Liga MX          "}:{position:v.top,team_logo:v.img,team_abrev:v.name,frequency:v.frecuency,promthistournament:v.game_avg,promlasttournament:v.game_avg_last_season,teams_games:"-",category:s.category,total:v.total,id:v.id},height:"71px","can-play-videos":s.canPlayVideos,background:x%2===0?s.backgroundEven:s.backgroundOdd,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==v.id?(t.openBlock(),t.createBlock(y,{key:2,type:s.typeTable,"is-live":s.game.is_live,"view-effectiveness":v.positionId!==1,data:s.typeTable==0?{teams:v.teamname,age:v.age,dataofbirth:v.date,nationality:v.nationality,countryFlag:v.player_country_flag,position:v.position,games:v.games,min:v.minutes,goals:v.total,effectiveness:v.effectiveness,category:s.categoryName,id:v.id}:{position:v.positiontable,goals:v.goals,goals_received:v.goalsrecived,games_played:v.games_played,category:s.categoryName,effectiveness:v.effectiveness,xg:v.xg,total:v.total,attendance:"-",id:v.id},onViewprofile:f=>m.viewprofile(f,v.teamid),background:x%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))])]),_:1},8,["items","onInput"])):(t.openBlock(),t.createElementBlock("div",xht,[e.isloading?(t.openBlock(),t.createElementBlock("div",wht,o[3]||(o[3]=[t.createElementVNode("div",{class:"overlay-loading-top__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o[4]||(o[4]=t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),o[5]||(o[5]=t.createElementVNode("div",{class:"container-no-search-result-subtitle"},[t.createTextVNode(" No existen resultados para este tipo de"),t.createElementVNode("br"),t.createTextVNode(" jugada, considerando el torneo y otros"),t.createElementVNode("br"),t.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(r,{background:"#183143",type:s.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.topData,(_,v)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(x,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f},[t.createVNode(a,{"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==x.id&&e.expand,onMediadata:o[2]||(o[2]=n=>m.emitEventMediaFullTable(n,s.category,s.categoryName)),data:s.typeTable==0?{position:x.top,player_name:x.name,player_short:x.name_short,player_photo:x.img,total:x.total,id:x.id,player_age:x.age,team_abrev:x.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+x.teamid+".png",e.$store.getters.getProviderId),player_position:x.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+x.country+".jpg",player_games:x.games,player_min:x.minutes,league_name:"          Liga MX          "}:{position:x.positiontable,team_logo:x.img,team_abrev:x.name,frequency:x.frecuency,promthistournament:x.game_avg,promlasttournament:x.game_avg_last_season,category:s.category,team_games:x.games_played,total:x.total,id:x.id},height:"71px",background:((v+1)*5+f)%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==x.id?(t.openBlock(),t.createBlock(y,{key:0,type:s.typeTable,"is-live":s.game.is_live,additionalClass:"fullTable","view-effectiveness":x.positionId!==1,data:s.typeTable==0?{teams:x.teamname,age:x.age,dataofbirth:x.date,nationality:x.nationality,countryFlag:x.player_country_flag,position:x.positionfull,positionfull:x.positionfull,games:x.games,min:x.minutes,goals:x.total,effectiveness:x.effectiveness,category:m.getCategoryName(s.category),id:x.id}:{position:x.positiontable,goals:x.goals,goals_received:x.goalsrecived,games_played:x.games_played,category:s.categoryName,effectiveness:x.effectiveness,xg:x.xg,total:x.total,category:m.getCategoryName(s.category),attendance:"-",id:x.id},onViewprofile:n=>m.viewprofile(n,x.teamid),background:f%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const Sht=Ki(nC,[["render",kht],["__scopeId","data-v-b434ba0d"]]),Cht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},Tht={props:{id:Number,textValue:String,icon:String,numFilter:Number,iconVisible:{type:Boolean,default:!0},activeClickLabel:{type:Boolean,default:!1},height:{type:String,default:"35px"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderColor:String,backgroundColor:{type:String,default:"#23303B"},fontSize:{type:String,default:"13px"},fontColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"Poppins-Regular"},iconSize:{type:String,default:"20px"}},computed:{customStyle(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,cursor:this.cursorType,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}},customIcon(){return{width:this.iconSize}}},methods:{btnLabel(){this.$emit("clickLabel",this.id)},btnClose(){this.$emit("clickClose",this.id)}}},Aht=["src"],Eht=["src"];function Mht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyle),class:"gsc-label",onClick:o[0]||(o[0]=(...g)=>m.btnLabel&&m.btnLabel(...g))},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Aht)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(m.customStyle)},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:o[1]||(o[1]=(...g)=>m.btnClose&&m.btnClose(...g)),style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Eht)):t.createCommentVNode("",!0)],4))])}const Iht=Cht(Tht,[["render",Mht],["__scopeId","data-v-42ff544a"]]);function Pht(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Lht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},iC={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,o=this.$refs.content.scrollWidth;o>0&&e>0&&(o>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},BV=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},zV=iC.setup;iC.setup=zV?(e,o)=>(BV(),zV(e,o)):BV;const Bht={ref:"gscScrollableContainer",class:"scrollable-container"},zht={class:"scrollable-arrows"},Oht=["width","height","viewBox"],Dht=["stroke"],Nht={class:"scrollable-wrapper"},Fht={class:"scrollable-arrows"},Rht=["width","height","viewBox"],Vht=["stroke"];function jht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Bht,[s.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",m.hideShowLeftArrow]),onClick:o[0]||(o[0]=(...g)=>m.scrollLeft&&m.scrollLeft(...g))},[t.createElementVNode("div",zht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:s.arrowsColor},null,8,Dht)],8,Oht))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:o[1]||(o[1]=(...g)=>m.getScroll&&m.getScroll(...g))},[t.createElementVNode("div",Nht,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),s.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",m.hideShowRightArrow]),onClick:o[2]||(o[2]=(...g)=>m.scrollRight&&m.scrollRight(...g))},[t.createElementVNode("div",Fht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:s.arrowsColor},null,8,Vht)],8,Rht))])],2)):t.createCommentVNode("",!0)],512)}const Uht=Lht(iC,[["render",jht],["__scopeId","data-v-b548a08d"]]),Ght=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},oC={components:{GSCSlider:Uht},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Pht(e);return{myDivRef:e,elementSize:o}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var o={};return e.width>768?o={fontSize:"16px"}:e.width>480?o={fontSize:"14px"}:o={fontSize:"12px"},o}}},OV=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},DV=oC.setup;oC.setup=DV?(e,o)=>(OV(),DV(e,o)):OV;const Hht={ref:"myDivRef"},Zht={key:0,class:"gs-switch-container"},qht=["onClick"],Wht={key:1,class:"gs-switch-container-type"},Jht=["onClick"],Yht={key:2,class:"gs-switch-container-carousel"},Xht=["onClick"];function $ht(e,o,s,B,U,m){const g=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",Hht,[s.type==0?(t.openBlock(),t.createElementBlock("div",Zht,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,qht))),128))],4),t.renderSlot(e.$slots,s.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",Wht,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:s.backgroundOptionDisable}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,Jht))),128))],4)])):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",Yht,[t.createVNode(g,{arrows:s.arrow,"background-color":s.background,"px-scroll":s.pxScroll,"scroll-color":s.scrollColor,"arrows-position":s.arrowsPosition,arrowsScrollHide:s.arrowsScrollHide,"arrows-background":s.arrowsBackground,"arrows-container-bg-l":s.arrowsContainerBgL,"arrows-container-bg-r":s.arrowsContainerBgR,"arrows-margin":s.arrowsMargin,"arrows-radius":s.arrowsRadius,"arrows-border":s.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,Xht))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const sC=Ght(oC,[["render",$ht],["__scopeId","data-v-8a86dfaf"]]),wea="",kea="";function Kht(){return{backgroundColor:"#2e3b46",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"5px 12px",textFontFamily:"'Poppins-Regular'"}}const Sea="",Qht={comfiltersContainer:"_comfiltersContainer_xl2as_1",comfiltersContainer1232:"_comfiltersContainer1232_xl2as_1",closeFiltersPc:"_closeFiltersPc_xl2as_1",comtextleyemdmultipleleagues:"_comtextleyemdmultipleleagues_xl2as_1",comtextleyemdmultipleleagues380:"_comtextleyemdmultipleleagues380_xl2as_1",comfiltersContainer760:"_comfiltersContainer760_xl2as_1",comfiltersContainer460:"_comfiltersContainer460_xl2as_1",comcontainerSection:"_comcontainerSection_xl2as_1",comcontainerSection1232:"_comcontainerSection1232_xl2as_1",comcontainerSection960:"_comcontainerSection960_xl2as_1",comcontainerSection320:"_comcontainerSection320_xl2as_1",comcontainerSection350:"_comcontainerSection350_xl2as_1",comtemplateLosMejores1:"_comtemplateLosMejores1_xl2as_1",comtemplateLosMejores11232:"_comtemplateLosMejores11232_xl2as_1",comtemplateLosMejores1960:"_comtemplateLosMejores1960_xl2as_1",comtemplateLosMejores1420:"_comtemplateLosMejores1420_xl2as_1",comtemplateLosMejores1320:"_comtemplateLosMejores1320_xl2as_1",comtemplateLosMejores1540:"_comtemplateLosMejores1540_xl2as_1",comtemplateLosMejores1350:"_comtemplateLosMejores1350_xl2as_1",comtopFiltersParent:"_comtopFiltersParent_xl2as_1",comtopFiltersParent1232:"_comtopFiltersParent1232_xl2as_1",comtopFiltersParent960:"_comtopFiltersParent960_xl2as_1",comtopFiltersParent460:"_comtopFiltersParent460_xl2as_1",comtopFiltersParent420:"_comtopFiltersParent420_xl2as_1",comcontainerTheBest:"_comcontainerTheBest_xl2as_1",comcontainerTheBest1232:"_comcontainerTheBest1232_xl2as_1",comcontainerTheBest960:"_comcontainerTheBest960_xl2as_1",comcontainerTheBest320:"_comcontainerTheBest320_xl2as_1",comtitleSection:"_comtitleSection_xl2as_1",comtitleSection540:"_comtitleSection540_xl2as_1",comcontainerTables:"_comcontainerTables_xl2as_1",comcontainerTables960:"_comcontainerTables960_xl2as_1",comcontainerTables760:"_comcontainerTables760_xl2as_1",comcontainerTables320:"_comcontainerTables320_xl2as_1",comtoniKroosWrapper:"_comtoniKroosWrapper_xl2as_1",comtoniKroosWrapper1080:"_comtoniKroosWrapper1080_xl2as_1",comtoniKroosWrapper975:"_comtoniKroosWrapper975_xl2as_1",comtoniKroosWrapper760:"_comtoniKroosWrapper760_xl2as_1",comtoniKroosWrapper420:"_comtoniKroosWrapper420_xl2as_1",comtoniKroosWrapper320:"_comtoniKroosWrapper320_xl2as_1",frameChild:"_frameChild_xl2as_1",filtros:"_filtros_xl2as_1",groupParent:"_groupParent_xl2as_1",shapeIcon:"_shapeIcon_xl2as_1",btnFilters:"_btnFilters_xl2as_1",btnFiltersPC:"_btnFiltersPC_xl2as_1",comquitarFiltros:"_comquitarFiltros_xl2as_1",comquitarFiltros730:"_comquitarFiltros730_xl2as_1",comquitarFiltros480:"_comquitarFiltros480_xl2as_1",comquitarFiltros380:"_comquitarFiltros380_xl2as_1",btnCloseFilters:"_btnCloseFilters_xl2as_1",commejoresJugadores:"_commejoresJugadores_xl2as_1",commejoresJugadores730:"_commejoresJugadores730_xl2as_1",commejoresJugadores480:"_commejoresJugadores480_xl2as_1",mejoresJugadoresSM:"_mejoresJugadoresSM_xl2as_1",toniKroos:"_toniKroos_xl2as_1",teamBar:"_teamBar_xl2as_1",commenuSection:"_commenuSection_xl2as_1",commenuSection960:"_commenuSection960_xl2as_1",comcontainerMenu:"_comcontainerMenu_xl2as_1",comcontainerMenu760:"_comcontainerMenu760_xl2as_1",containerFilters:"_containerFilters_xl2as_1",teamBarParent:"_teamBarParent_xl2as_1",comtopFilters:"_comtopFilters_xl2as_1",comtopFilters1232:"_comtopFilters1232_xl2as_1",comtopFilters420:"_comtopFilters420_xl2as_1",comtopFilters460:"_comtopFilters460_xl2as_1",comlosMejores:"_comlosMejores_xl2as_1",comlosMejores380:"_comlosMejores380_xl2as_1",comlosMejores530:"_comlosMejores530_xl2as_1",comlosMejores730:"_comlosMejores730_xl2as_1",commenuSectionHeader:"_commenuSectionHeader_xl2as_1",commenuSectionHeader1232:"_commenuSectionHeader1232_xl2as_1",commenuSectionHeader960:"_commenuSectionHeader960_xl2as_1",commenuSectionHeader730:"_commenuSectionHeader730_xl2as_1",comdropdown:"_comdropdown_xl2as_1",comdropdown730:"_comdropdown730_xl2as_1",comdropdown1:"_comdropdown1_xl2as_1",comdropdown1730:"_comdropdown1730_xl2as_1",comdropdownParent:"_comdropdownParent_xl2as_1",comdropdownParent730:"_comdropdownParent730_xl2as_1",commenuSectionParentHeader:"_commenuSectionParentHeader_xl2as_1",commenuSectionParentHeader1232:"_commenuSectionParentHeader1232_xl2as_1",commenuSectionParentHeader960:"_commenuSectionParentHeader960_xl2as_1",commenuSectionParentHeader730:"_commenuSectionParentHeader730_xl2as_1",commenuSectionParentHeader430:"_commenuSectionParentHeader430_xl2as_1",comdescubreVideos:"_comdescubreVideos_xl2as_1",comdescubreVideos1232:"_comdescubreVideos1232_xl2as_1",comdescubreVideos960:"_comdescubreVideos960_xl2as_1",allCategories:"_allCategories_xl2as_1",containerScountingBtncom:"_containerScountingBtncom_xl2as_3",btnDeleteAplicacom:"_btnDeleteAplicacom_xl2as_13",SearchBtnBarcom:"_SearchBtnBarcom_xl2as_33",btnLeyendTxtcom:"_btnLeyendTxtcom_xl2as_52",BtnSearchScountingcom:"_BtnSearchScountingcom_xl2as_61",containerPredefinedcom:"_containerPredefinedcom_xl2as_85",containerPredefinedScountingcom:"_containerPredefinedScountingcom_xl2as_92",titleContainerPredefinedcom:"_titleContainerPredefinedcom_xl2as_100",subtitleContainerPredefinedcom:"_subtitleContainerPredefinedcom_xl2as_111"},ept=t.ref(Kht()),tpt={components:{GSCTableHeader:cV,GscSwitchComponent:sC,GSCFilterperteam:pdt,GSCFilters:ZR,GSCExpandedInfo:TV,GSCLabel:Iht,GSCSeasonSelect:VA,GSCTopCategory:Sht,GSCTournamentSelect:NA,GSCRowTable:mV},computed:{..._ut.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const e={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.fVnationalities,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},o=JSON.stringify(e);if(JSON.stringify(this.filters)!=o)return o},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...ept.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({})},teamselect:{type:Number,default:0},seasonActive:{type:Number,default:0},defaultSection:{type:String,default:"Jugadores"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},isFemaleMode:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let o=0;o<e.teams.length;o++)this.teams.push({id:e.teams[o].team_id,team:e.teams[o].colloquial_name,logo:e.teams[o].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:o}=Hb(e);return{myDivRefTopsFull:e,elementSize:o}},data(){return{elegibilidadArray:[],updateFilterTeamsScouting:0,modifidFiltersFlag:!1,showfiltersPc:!1,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],universeData:{minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(e,o)=>o+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],productivityTranslationMap:null,filterScounting:{tournaments:[1],seasonId:0,categories:[{key:"goals",name:"Goles",ids:[12]},{key:"assists",name:"Asistencias",ids:[10]},{key:"goal_participations",name:"Participaciones en gol",ids:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",ids:[91,95,92,93,96,97]}],range_age:[10,40],age_or_year:1,year:1989,nationalities:[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239],elegibles:[],minutes_played:211,minutes_played_avg:40,last_months:12,type_stats:1,positions:[1,2,3,4,5,6,7,8,9,10],fouls:!1,yellow_cards:!1,red_cards:!1},expand:!1,playerexpand:0,arrayFiltersPlays:[],filtersPredefinedF:{},categoryPredefinedActive:!1,categoryPredefined:0,typeTable:0,keyUpdateFilter:0,loadingActive:!1,isTeam:!1,arrayPredefinedFilters:[],arrayCategoryFilter:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],arrayCategoryFilterFull:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],FVsetAvailableNationalTeamsPlayersIds:new Set,showOnlyCategories:!1,showFullCategory:0,categoryName:"",showFullTable:!1,expansionPanelModePropsTypePlays:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",width:"400px",maxWidth:"400px"},expansionPanelProps:{width:"400px",borderRadius:"8px"},fieldComponentProps:{widthContainer:"400px"}},expansionPanelModeProps:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"'Poppins-Regular'"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},expansionPanelModePropsMobil:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"300px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},expansionPanelModePropsMobil270:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"270px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},filters:{zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},detaildProductivityCategories:{offensive:{title:"Ofensivo",categories:[{key:"goals",name:"Goles",isSelected:!1,id:[12]},{key:"assists",name:"Asistencias",isSelected:!1,id:[10]},{key:"goal_participations",name:"Participaciones en gol",isSelected:!1,id:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{key:"shots_on_target",name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{key:"shots_outside_box",name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{key:"shots_outside_box_on_target",name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{key:"shots_inside_box",name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{key:"shots_inside_box_on_target",name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{key:"crosses_left",name:"Centros por izquierda",isSelected:!1,id:[13]},{key:"crosses_left_success",name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{key:"crosses_right",name:"Centros por derecha",isSelected:!1,id:[25]},{key:"crosses_right_success",name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{key:"dribbles_success",name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{key:"dribbles_to_goal",name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{key:"balls_won_own_area",name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{key:"headers_own_area",name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{key:"tackles_won",name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{key:"clearances",name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{key:"recoveries_total",name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{key:"recoveries_q1",name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{key:"recoveries_q2",name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{key:"recoveries_q3",name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{key:"recoveries_q4",name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{key:"passes_success",name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{key:"passes_success_q1",name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{key:"passes_success_q2",name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{key:"passes_success_q3",name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{key:"passes_success_q4",name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},detailsObject:{playingAs:[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},nameLeagueSelected:"",categoriesPlaysTypes:{offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:6},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:18},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},categoriesDefault:[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1}],seasonsFilterSelected:0,tournamentsToFilter:[{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]}],isCup:!1,arrayPredefinedOrigin:[],indexPredefinedFiltersSelected:0,predefinedFiltersMatchLapse:[],predefinedFiltersPlayingAs:[],predefinedFiltersSections:[],updateTables:0,updateTablesfull:0,optionSelected:"Jugadores",optionSelectedSubmenu:"Todas las jugadas",tournamentsUrl:"https://17zyhpyc7c.execute-api.us-west-2.amazonaws.com/prod/tournaments",teamsUrl:"https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/",urlFilter:"https://cqqxaonvm6.execute-api.us-east-2.amazonaws.com/prod/gs2/tops/filters?categories=",retries:3,teams:[],updateFilterGolstats:0,updateFilterPlaytypesGolstats:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],updateFilterTeamsScouting:0,filtersTypes:Xr,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",fVnationalities:new Set,fVzone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],fVplayingAs:[1,2],fVsections:[1,2,3,4,5,6],fVmatchResult:[1,2,3],fVarrayAgeRange:[10,40],FVeligible:[],FVYear:1900,keyTournamentValue:0,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,teamselectrec:0,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,rowScoutingData:[],openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var g=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),g+". "+m},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const o=e.id===this.selectedTournament.id;e.isSelected=o,e.isDefaultTournament=o})},async onClickDeleteFilter(){if(this.optionSelectedSubmenu=="Predeterminados")this.resetPredefinedTeamAll();else{this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;this.setUpTournamentsToFilter();const o=this.$refs.personalDataFilter;o.clearFilters(ju.All),o.clearFilters(ju.AGE_RANGE),o.clearFilters(ju.YEAR),o.clearFilters(ju.NATIONALITY),o.clearFilters(ju.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;var e=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(e,1);const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200)}},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(e){this.seasonActive!==e.id&&(this.seasonActive=e.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",e.id))},changeTournament(e){e.id!==this.selectedTournament.id&&(this.selectedTournament=e,this.tournamentSelectedObj={propName:"id",value:e.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(e){this.tournamentSelectedObj={propName:"id",value:e.id},this.seasonBytournament=e.seasons,this.teamselect=0},selectedSeasonMovil(e){this.seasonActive=e.id},setRelevantCategoriesPlayer(e){return e===1?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]},setOpenMedia(e){this.$emit("openmedia",e)},setMediaData(e){let U=[e.id],m=e.team_id;const g={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:U,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:m||0,matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};this.$emit("openmedia",g)},clickprofile(e){e.isTeam?this.$emit("openProfileTeam",{teamId:e.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:e.id,teamId:e.teamId,seasonId:this.seasonActive})},viewprofile(e,o,s){this.$emit("openProfilePlayer",{playerId:e,teamId:s,seasonId:o||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async loadTopsCategories(){try{const e=this.$store.getters.getProviderId,o=this.$store.getters.getIsDevApis,s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(this.urlFilter,e,o));if(Array.isArray(B)&&B.length){const U=B.filter(m=>m&&m.id!=null&&m.category_name).map(m=>({id:m.id,name:m.category_name,isSelected:!1}));U.length&&(this.categoriesDefault=U,this.arrayCategoryFilter=U.map(m=>m.id),this.arrayCategoryFilterFull=U.map(m=>m.id))}}catch{}},async loadProductivityTranslation(){const e=this.$store.getters.getProviderId;if(!e||e===1)return;const o=await Hne(e);o&&typeof o=="object"&&(this.productivityTranslationMap=o,this.applyProductivityTranslation(o))},applyProductivityTranslation(e){const o=["offensive","defensive","possession"];for(const s of o){const B=this.detaildProductivityCategories[s];B&&Array.isArray(B.categories)&&(B.categories=B.categories.filter(U=>Array.isArray(e[U.key])).map(U=>({...U,id:e[U.key]})))}this.filterScounting.categories=this.filterScounting.categories.filter(s=>Array.isArray(e[s.key])).map(s=>({...s,ids:e[s.key]}))},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=pu.create({headers:{Authorization:`${this.token}`}}),{data:o}=await e.post(uu("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.$store.getters.getProviderId,this.$store.getters.getIsDevApis),this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersTournaments");s!==-1?this.arrayFiltersPlays[s].name=this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX":this.arrayFiltersPlays.push({name:this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX",type:"onFiltersTournaments"})}this.rowScoutingData=[];for(let U=0;U<o.length;U++){o[U];let g=o[U].dob.split("T")[0].split("-");var B={position:U+1,player_name:this.abrevName(o[U].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+o[U].player_id+".png",total:o[U].total.toFixed(0),id:o[U].player_id,player_age:this.calcularEdad(o[U].dob),team_abrev:o[U].teams[0].acronym,team_name:o[U].teams[0].team_name,team_logo:If("https://golstatsimages.blob.core.windows.net/teams-80/"+o[U].teams[0].team_id+".png",this.$store.getters.getProviderId),player_position:o[U].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+o[U].nationality_id+".jpg",date:g[2]+"."+g[1]+"."+g[0].substring(2,4),team_id:o[U].team_id,nationality_name:IV[o[U].nationality_id],player_games:o[U].games_played,player_min:o[U].minutes_played,league_name:o[U].tournament_name,seasons:o[U].seasons,season_id:o[U].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const U=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let m=0;m<U.teams.length;m++)this.teamsscouting.push({id:U.teams[m].team_id,team:U.teams[m].colloquial_name,logo:U.teams[m].logo})}this.loadingActive=!1},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var g=m+". "+U;return g},calcularEdad(e){var o=new Date(e),s=new Date,B=s-o,U=Math.floor(B/(1e3*60*60*24*365.25));return U},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.length;s++)e[s].isSelected&&o.push(e[s].id);if(o.length==0&&(o=[1]),o.length==1)for(let s=0;s<e.length;s++)e[s].isSelected&&(this.nameLeagueSelected=e[s].name,this.seasonsFilterSelected=e[s].seasons[0].id);else this.seasonsFilterSelected=0,o.length>0&&(this.nameLeagueSelected=o.length+" Ligas");this.filterScounting.tournaments=o,this.filterScounting.seasonId=e[0].seasons[0].id},onFiltersPersonalData(e){if(this.modifidFiltersFlag=!0,e.hasOwnProperty("ageByRange")){const B=e.ageByRange.min==0?10:e.ageByRange.min,U=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,U],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];e.hasOwnProperty("year")?(this.filterScounting.year=e.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var o=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&o.push(e.nationalities[B].id);o.length==0&&(o=[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239])}this.filterScounting.elegibles=[],e.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[e.eligibility[0].id]);var s=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&s.push(e.positions[B].id);s.length==0&&(s=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=s,this.filterScounting.nationalities=o},onFiltersUniverse(e){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(e.minutesPlayed),this.filterScounting.last_months=Number(e.lastMonths),this.filterScounting.minutes_played_avg=Number(e.percentMinutesPlayed),this.filterScounting.type_stats=e.statistics.averagePerGame?3:e.statistics.averagePerMinute?2:1},onFiltersProductivity(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.productivityFilters.length;s++)o[e.productivityFilters[s].priority-1]={name:e.productivityFilters[s].name,ids:e.productivityFilters[s].id};o.length==0&&(o=[]),this.filterScounting.categories=o,this.filterScounting.fouls=e.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=e.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=e.offensesConditions.areRedCardsSelected},onFiltersGolStats(e){if(e.length>0){var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");o!==-1?this.arrayFiltersPlays[o].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}},shouldRender(e){return e<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(e){if(e.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=e[0].id;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&o!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(o,1);var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(s!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(e[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var o=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&o!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(o,1);for(let m=0;m<this.categoriesDefault.length;m++)this.categoriesDefault[m].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var s=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){for(let m=0;m<this.FVfilterGolstats.length;m++)this.FVfilterGolstats[m].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(e){this.categoryName=e.categoryName,this.showFullCategory=e.category,this.showFullTable=!0,this.loadingActive=!0,setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,aux:this.getRandomNumber(1,1e4),booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.loadingActive=!1},1e3)},getRandomNumber(e,o){return Math.floor(Math.random()*(o-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let s=0;s<this.categoriesPlaysTypes.offensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.defensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.possession.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.offenses.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s])}else for(let s=0;s<e.playsCategories.length;s++)e.playsCategories[s].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[s].id),this.arrayCategoryFilterFull.push(e.playsCategories[s]));var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):o!==-1&&this.arrayFiltersPlays.splice(o,1)},async deleteLabelFilter(e){var o=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(o!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let U=0;U<this.detaildProductivityCategories.offensive.categories.length;U++)this.detaildProductivityCategories.offensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.defensive.categories.length;U++)this.detaildProductivityCategories.defensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.possession.categories.length;U++)this.detaildProductivityCategories.possession.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.offensesConditions.length;U++)this.detaildProductivityCategories.offensesConditions[U]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(U,m)=>m+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!0;const B=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let U=0;U<B.teams.length;U++)this.teamsscouting.push({id:B.teams[U].team_id,team:B.teams[U].colloquial_name,logo:B.teams[U].logo});this.keyTournamentValue+=1,setTimeout(()=>{this.modifidFiltersFlag=!1},200)}if(e=="onFiltersPlays"){for(let B=0;B<this.categoriesPlaysTypes.offensive.categories.length;B++)this.categoriesPlaysTypes.offensive.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.defensive.categories.length;B++)this.categoriesPlaysTypes.defensive.categories[B].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[B]);for(let B=0;B<this.categoriesPlaysTypes.possession.categories.length;B++)this.categoriesPlaysTypes.possession.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.offenses.categories.length;B++)this.categoriesPlaysTypes.offenses.categories[B].isSelected=!0}if(e=="onFiltersField"&&(this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(e=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1);for(let B=0;B<this.categoriesDefault.length;B++)this.categoriesDefault[B].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}e=="onFiltersDetailsTime"&&(this.detailsObject.gameSections[0].isSelected=!0,this.detailsObject.gameSections[1].isSelected=!0,this.detailsObject.gameSections[2].isSelected=!0,this.detailsObject.gameSections[3].isSelected=!0,this.detailsObject.gameSections[4].isSelected=!0,this.detailsObject.gameSections[5].isSelected=!0,this.fVsections=[1,2,3,4,5,6],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersDetailsPlayingAs"&&(this.detailsObject.playingAs[0].isSelected=!0,this.detailsObject.playingAs[1].isSelected=!0,this.fVplayingAs=[1,2],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersNationality"&&(this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.NATIONALITY)),e=="onFiltersPosition"&&(this.fVsetPositionsIds=[1,2,3,4,5,6,7,8,9],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.POSITION)),e=="onFiltersAge"&&(this.fVarrayAgeRange=[10,40],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ju.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ju.YEAR),this.FVYear=1900,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(o,1)},onFiltersField(e){e.length==0?this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]:this.fVzone=e;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");o!=-1?this.arrayFiltersPlays[o].name=this.fVzone.length+" zonas del campo":this.arrayFiltersPlays.push({name:this.fVzone.length+" zonas del campo",type:"onFiltersField"}),[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.fVtypeZone=1:this.fVtypeZone=2,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},e.length!=16?(this.fVzone.length==4&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&(o!=-1?this.arrayFiltersPlays[o].name="1/4 de cancha":this.arrayFiltersPlays.push({name:"1/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="2/4 de cancha":this.arrayFiltersPlays.push({name:"2/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&(o!=-1?this.arrayFiltersPlays[o].name="3/4 de cancha":this.arrayFiltersPlays.push({name:"3/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="4/4 de cancha":this.arrayFiltersPlays.push({name:"4/4 de cancha",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha propia":this.arrayFiltersPlays.push({name:"cancha propia",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(o,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(o=>o.type==="onFiltersDetailsPlayingAs");e!=-1?this.fVplayingAs.length==1?this.arrayFiltersPlays[e].name=this.fVplayingAs.includes(1)?"Local":"Visitante":this.arrayFiltersPlays.splice(e,1):this.fVplayingAs.length==1&&this.arrayFiltersPlays.push({name:this.fVplayingAs.includes(1)?"Local":"Visitante",type:"onFiltersDetailsPlayingAs"})},onFiltersDetails(e){var o=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var s=[];for(let m=0;m<e.playingAs.length;m++)if(e.playingAs[m].isSelected){const g=e.playingAs[m].name=="Local"?1:2;o.push(g)}for(let m=0;m<e.gameSections.length;m++)e.gameSections[m].isSelected&&s.push(e.gameSections[m].value);this.fVsections=s,this.fVplayingAs=o;var B=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersDetailsTime"),U="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(U+=", 0-15"),this.fVsections.includes(2)&&(U+=", 15-30"),this.fVsections.includes(3)&&(U+=", 30-45"),this.fVsections.includes(4)&&(U+=", 45-60"),this.fVsections.includes(5)&&(U+=", 60-75"),this.fVsections.includes(6)&&(U+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=U:this.arrayFiltersPlays.push({name:U,type:"onFiltersDetailsTime"}),this.fVsections.length==3&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="Primer tiempo":this.arrayFiltersPlays.push({name:"Primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==3&&this.fVsections.includes(4)&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="Segundo tiempo":this.arrayFiltersPlays.push({name:"Segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(1)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del primer tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(4)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 30 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 30 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 30 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 30 minutos del segundo tiempo",type:"onFiltersDetailsTime"}))):B!=-1&&this.arrayFiltersPlays.splice(B,1),this.addFilterPlayingAS(),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},async resetScouting(){this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(ju.All),e.clearFilters(ju.AGE_RANGE),e.clearFilters(ju.YEAR),e.clearFilters(ju.NATIONALITY),e.clearFilters(ju.POSITION),this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(o,1),this.setUpTournamentsToFilter();const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo})},onFiltersData(e){var o=0,s=0;e.ageByRange&&(e.ageByRange.min==0?o=1:o=e.ageByRange.min,e.ageByRange.max==0?s=40:s=e.ageByRange.max,this.fVarrayAgeRange=[o,s]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",U="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let v=0;v<e.nationalities.length;v++)e.nationalities[v].isSelected&&this.fVnationalities.add(e.nationalities[v].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let v=0;v<this.elegibilidadArray.length;v++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[v])}for(let v=0;v<e.positions.length;v++)e.positions[v].isSelected&&this.fVsetPositionsIds.push(e.positions[v].id);if(e.hasOwnProperty("nationalities"))var m=e.nationalities.filter(v=>v.isSelected===!0);var g=e.positions.filter(v=>v.isSelected===!0);if(g.length==1&&(B=g[0].name),e.hasOwnProperty("nationalities")&&m.length==1&&(U=m[0].name),setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,elegible:this.FVeligible,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},1e3),this.FVbooleanAreNationalTeamsVisible){var a=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var y=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersPosition");y!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[y].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(y,1):this.arrayFiltersPlays.push({name:this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B,type:"onFiltersPosition"})}if(this.FVYear!=0&&this.FVYear!=1900&&this.FVYear){var h=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersYear");h!=-1?this.arrayFiltersPlays[h].name=this.FVYear:this.arrayFiltersPlays.push({name:this.FVYear,type:"onFiltersYear"})}if(this.fVarrayAgeRange[0]>=e.ageLimits.min&&this.fVarrayAgeRange[1]<=e.ageLimits.max)if(this.fVarrayAgeRange[0]>e.ageLimits.min||this.fVarrayAgeRange[1]<e.ageLimits.max){var r=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersAge");r!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[r].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(r,1):this.arrayFiltersPlays.push({name:this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años",type:"onFiltersAge"})}else{var r=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersAge");r!=-1&&this.arrayFiltersPlays.splice(r,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var _=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersNationality");_!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[_].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U:this.arrayFiltersPlays.splice(_,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U,type:"onFiltersNationality"})}},clickAll(e){},clickAllAll(e){},clickTeam(e){},clickTeamScouting(e){},resetFilterTeamAndPlayers(){this.filters={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],setYear:this.FVYear,booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set}},async changeTabsGeneral(e){if(this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=e,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,e=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.rowScoutingData=[],this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.rowScoutingData=[],this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Scouting"){this.rowScoutingData=[],this.teamselect=0,this.arrayFiltersPlays=[];const o=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let s=0;s<o.teams.length;s++)this.teamsscouting.push({id:o.teams[s].team_id,team:o.teams[s].colloquial_name,logo:o.teams[s].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&e!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(e,1);for(let s=0;s<this.categoriesDefault.length;s++)this.categoriesDefault[s].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(o!==-1){for(let s=0;s<this.FVfilterGolstats.length;s++)this.FVfilterGolstats[s].isSelected=!1;o!==-1&&this.arrayFiltersPlays.splice(o,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.tournamentsUrl,o,s));return B},async fetchTeams(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.teamsUrl+this.seasonActive,o,s));return B},async fetchTeamsScouting(e){const o=pu.create({headers:{Authorization:`${this.token}`}}),s=this.$store.getters.getProviderId,B=this.$store.getters.getIsDevApis,{data:U}=await o.get(uu(this.teamsUrl+e,s,B));return U},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var o="";e.id==1?o=this.urlFilter:o=this.urlFilter;const s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(o+e.id,this.$store.getters.getProviderId,this.$store.getters.getIsDevApis));if(Object.keys(B[0].match_lapse_combinations).forEach(_=>{this.predefinedFiltersMatchLapse[_.toString()]=B[0].match_lapse_combinations[_]}),Object.keys(B[0].playing_as_combinations).forEach(_=>{this.predefinedFiltersPlayingAs[_.toString()]=B[0].playing_as_combinations[_]}),Object.keys(B[0].field_sections_combinations).forEach(_=>{this.predefinedFiltersSections[_.toString()]=B[0].field_sections_combinations[_]}),B[0]){for(let _=0;_<B[0].filter_records.length;_++){var U=B[0].description;if(B[0].filter_records[_].field_sections!==void 0){const x=B[0].filter_records[_].field_sections.toString();(this.predefinedFiltersSections[x]||this.predefinedFiltersSections[x]=="")&&(this.predefinedFiltersSections[x]==""?U=U.replace(" [en {field_sections}]",this.predefinedFiltersSections[x]):U=U.replace("{field_sections}",this.predefinedFiltersSections[x]))}if(B[0].filter_records[_].match_lapse!==void 0){const x=B[0].filter_records[_].match_lapse.toString();(this.predefinedFiltersMatchLapse[x]||this.predefinedFiltersMatchLapse[x]=="")&&(this.predefinedFiltersMatchLapse[x]==""?U=U.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[x]):U=U.replace("{match_lapse}",this.predefinedFiltersMatchLapse[x]))}if(B[0].filter_records[_].playing_as!==void 0){const x=B[0].filter_records[_].playing_as.toString();(this.predefinedFiltersPlayingAs[x]||this.predefinedFiltersPlayingAs[x]=="")&&(this.predefinedFiltersPlayingAs[x]==""?U=U.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[x]):U=U.replace("{playing_as}",this.predefinedFiltersPlayingAs[x]))}B[0].filter_records[_].section_type!==void 0&&(this.optionSelected=="Jugadores"?U=U.replace("{section_type}","Jugadores"):U=U.replace("{section_type}","Equipos")),U=U.replace(/\[/g,""),U=U.replace(/\]/g,""),U=U.replace("{category_name}",B[0].category_name);const v=U.split(": ");var m=v[1];m.length>129&&this.windowWidth>1358&&(m=m.substring(0,129),m=m+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[_].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:_,category_name:e.name,id_category:B[0].id,title:v[0]+":",text:v[1],textOrigin:B[0].description,titledots:m,filtersPredefined:{matchResult:B[0].filter_records[_].match_result,playingAs:B[0].filter_records[_].playing_as,sections:B[0].filter_records[_].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[_].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var g=[];for(let _=0;_<this.arrayPredefinedFilters.length;_++){var a=0,y=new Set,h={},r=this.arrayPredefinedFilters[_].text.replace(/\*.*?\*/,"");if(r=r.replace(/\*/g,""),r=r.replace(/ +/g," "),this.arrayPredefinedFilters[_].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[_].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[_].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0?h.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,this.arrayPredefinedFilters[_].filtersPredefined.end_age]:this.arrayPredefinedFilters[_].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age==0?h.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.end_age==0?h.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,60]:h.arrayAgeRange=[1,this.arrayPredefinedFilters[_].filtersPredefined.end_age],this.arrayPredefinedFilters[_].filtersPredefined.matchResult.length!=3&&(a+=1),h.matchResult=this.arrayPredefinedFilters[_].filtersPredefined.matchResult,this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length!=0){for(let v=0;v<this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length;v++)y.add(this.arrayPredefinedFilters[_].filtersPredefined.nationalities[v]);h.setNationalitiesIds=y}else y.add(138),y.add(222),y.add(163),y.add(51),y.add(226),y.add(10),y.add(223),y.add(96),y.add(171),y.add(198),y.add(105),y.add(80),y.add(29),y.add(74),y.add(216),y.add(196),y.add(64),y.add(155),y.add(156),y.add(89),y.add(106),y.add(81),y.add(233),y.add(204),h.setNationalitiesIds=y;this.arrayPredefinedFilters[_].filtersPredefined.playingAs.length!=2&&(a+=1),h.playingAs=this.arrayPredefinedFilters[_].filtersPredefined.playingAs,this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0?h.setPositionsIds=this.arrayPredefinedFilters[_].filtersPredefined.positions:h.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[_].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.sections.length>0?h.sections=this.arrayPredefinedFilters[_].filtersPredefined.sections:h.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[_].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.zone.length>0?h.zone=this.arrayPredefinedFilters[_].filtersPredefined.zone:h.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],h.typeZone=this.arrayPredefinedFilters[_].filtersPredefined.typeZone,g.push({id:_+1,name:r,isSelected:!1,value:a,filters:h})}this.FVfilterGolstats=g,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const o=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((r,_)=>r-_).toString();this.predefinedFiltersSections[o]||this.predefinedFiltersSections[o]==""?this.predefinedFiltersSections[o]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var s=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(e=e.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(s=!0,e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(s||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(e=e.replace("[de las posiciones seleccionadas]","")):e=e.replace("[de las posiciones seleccionadas]",""),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]",""));const B=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[B]||this.predefinedFiltersMatchLapse[B]=="")this.predefinedFiltersMatchLapse[B]==""?e=e.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[B]):e=e.replace("{match_lapse}",this.predefinedFiltersMatchLapse[B]);else{e=e.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var U="";B.includes(1)&&(U=U+"0-15, "),B.includes(2)&&(U=U+"16-30, "),B.includes(3)&&(U=U+"31-45, "),B.includes(4)&&(U=U+"46-60, "),B.includes(5)&&(U=U+"61-75, "),B.includes(6)&&(U=U+"76-90, "),U=U.slice(0,-2),U=U.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",U)}const m=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[m]||this.predefinedFiltersPlayingAs[m]=="")&&(this.predefinedFiltersPlayingAs[m]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[m]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[m])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?e=e.replace("{section_type}","Porteras"):e=e.replace("{section_type}","Jugadoras"):this.category.id==22?e=e.replace("{section_type}","Porteros"):e=e.replace("{section_type}","Jugadores"):e=e.replace("{section_type}","Equipos"),e=e.replace(/\[/g,""),e=e.replace(/\]/g,""),e=e.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const g=e.split(": ");let a=g[1].charAt(0).toUpperCase()+g[1].toLowerCase().slice(1),y=g[1].charAt(0).toUpperCase()+g[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=g[0]+":";const h=y.match(/\*/g);if(h&&h.length)if(h.length%2===0)for(let r=1;r<=h.length;r++)r%2===0||(y=y.replace("*",'<span style="color: #ffff03" >'));else y=y.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=y},intervalidtops(e){this.$emit("intervalidtops",e)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.optionSelected!=="Scouting"&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&(this.defaultSection==="Scouting"&&this.selectedSeason(this.currentSeasonId),this.changeTabsGeneral(this.defaultSection))},async created(){try{await this.loadTopsCategories(),await this.loadProductivityTranslation();const e=pu.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(s=>(delete s.headers.Authorization,s));const o=await e.get(qy("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",this.$store.getters.getProviderId),{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=o.data,this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204)}catch(e){throw new Error(e)}}},apt={ref:"myDivRefTopsFull"},rpt={key:0,class:"overlay-loading"},npt={key:0,class:"cont-leyemd-multipleleagues"},ipt={key:0,style:{"margin-left":"10px"}},opt={key:3,style:{width:"100%",height:"295px"}};function spt(e,o,s,B,U,m){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const g=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),y=t.resolveComponent("GSCFilters"),h=t.resolveComponent("GSCLabel"),r=t.resolveComponent("GSCTopCategory"),_=t.resolveComponent("GSCTableHeader"),v=t.resolveComponent("GSCRowTable"),x=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",apt,[U.loadingActive?(t.openBlock(),t.createElementBlock("div",rpt,o[8]||(o[8]=[t.createElementVNode("div",{class:"overlay-loading__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading__text"},"Loading...",-1)]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.templateLosMejoresClass)},[t.createElementVNode("section",{class:t.normalizeClass(e.containerSectionClass),id:"container-section"},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.comdescubreVideosClass)},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionParentHeaderClass)},[t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersParentClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersClass),id:"top-filters"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamBarParent)},[U.optionSelected!="Scouting"&&U.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[t.createVNode(a,{data:U.teams,"team-id":s.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:m.clickTeam,onClickAll:m.clickAll},null,8,["data","team-id","onClickTeam","onClickAll"])],2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerFilters),id:"container-filters",style:t.normalizeStyle(U.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPc),onClick:o[1]||(o[1]=(...f)=>m.clickCloseFilters&&m.clickCloseFilters(...f))},o[9]||(o[9]=[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)]),2)):t.createCommentVNode("",!0),U.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(g,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":U.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:m.changeTabsSubmenu},null,8,["selected-option","font-size","width","onInput"])):t.createCommentVNode("",!0)],2),t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnCloseFilters),style:t.normalizeStyle(U.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:o[3]||(o[3]=(...f)=>m.openMenuFilters&&m.openMenuFilters(...f))},null,6),[[t.vShow,B.elementSize.width<760&&U.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[U.optionSelectedSubmenu=="Todas las jugadas"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.withDirectives(t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersPlays,filters:U.categoriesPlaysTypes,onApply:m.applyFiltersBtn,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply","provider-id","is-dev-apis"]),[[t.vShow,!U.showFullTable]]),(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{key:U.updateFilterField,"filter-type":U.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersField,filters:U.fVzone,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersDetails,filters:U.detailsObject,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]),U.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(y,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:s.seasonActive,tournamentId:U.tournamentSelectedObj.value},token:U.token,"onUpdate:filters":m.onFiltersData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:U.tournamentsToFilter,key:U.keyTournamentValue,"onUpdate:filters":m.onFiltersTournaments,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"])),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:U.filterScounting.seasonId,tournamentId:U.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":m.onFiltersPersonalData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:U.universeData,"onUpdate:filters":m.onFiltersUniverse,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersProductivity,filters:U.detaildProductivityCategories,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcom),onClick:o[4]||(o[4]=(...f)=>m.getScoutingData&&m.getScoutingData(...f))},"Buscar",2)],64)):t.createCommentVNode("",!0),U.optionSelectedSubmenu=="Predeterminados"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModePropsTypePlays,{"filter-type":U.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:U.updateFilterPlaytypesGolstats,"onUpdate:filters":m.onFiltersPlaysTypes,filters:U.categoriesDefault,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:U.updateFilterGolstats,"onUpdate:filters":m.onFiltersGolStats,filters:m.filterGolstats,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||U.openMenuMobil]]),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[U.filterScounting.tournaments.length>1&&U.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",npt,[o[10]||(o[10]=t.createElementVNode("img",{class:"img-leyemd-multipleleagues",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(e.comextleyemdmultipleleaguesClass)}," El filtro por equipos solo se pude utilizar cuando se tiene maximo 1 liga seleccionada ",2)])):(t.openBlock(),t.createBlock(a,{data:U.teamsscouting,"team-id":U.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:U.updateFilterTeamsScouting,onClickTeam:m.clickTeamScouting,onClickAll:m.clickAllAll},null,8,["data","team-id","onClickTeam","onClickAll"]))],2)):t.createCommentVNode("",!0)],6)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.containerTheBestClass),id:"container-the-best"},[t.createElementVNode("div",{class:t.normalizeClass(e.titleSectionClass)},[U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[U.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Mejores jugadores: ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores más productivos: ")],64))],64)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.optionSelected!="Scouting"&&U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.showFullTable?(t.openBlock(),t.createElementBlock("div",ipt,[t.createVNode(h,{"text-value":"Categoría - "+U.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteCategoryFilter,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:"20px"},null,8,["text-value","onClickClose"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.arrayFiltersPlays,(f,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,style:{"margin-left":"10px"}},[t.createVNode(h,{"text-value":f.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteLabelFilter,id:f.type,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),U.rowScoutingData.length!=0||U.optionSelectedSubmenu=="Predeterminados"&&U.arrayFiltersPlays.findIndex(f=>f.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:o[5]||(o[5]=(...f)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...f))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),s.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(U.showFullTable?"gap: 0px!important;":"")},[U.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.categoriesDefault,(f,n)=>(t.openBlock(),t.createElementBlock("div",{key:f.id,style:t.normalizeStyle(!U.showOnlyCategories&&U.arrayCategoryFilter.includes(f.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,onMore:m.onShowFullTable,"border-width":0,onIntervalidtops:m.intervalidtops,"can-play-videos":s.canPlayVideos,"border-radius":"12px","game-id":s.gameId,game:s.game,typeData:s.typeData,"filters-prop":m.filterChange,category:f.id,"type-table":U.typeTable,categoryName:f.name,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","onMore","onIntervalidtops","can-play-videos","game-id","game","typeData","filters-prop","category","type-table","categoryName","season-selected","season","filter-team","onClickprofile","onSetopenmedia"]))],2),[[t.vShow,!U.showOnlyCategories&&U.arrayCategoryFilter.includes(f.id)&&!U.showFullTable]])],4))),128)),U.showFullTable?(t.openBlock(),t.createBlock(r,{"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,"is-widget":s.isWidget,"team-widget":s.teamWidget,"border-width":0,"border-radius":"12px","game-id":s.gameId,onIntervalidtops:m.intervalidtops,game:s.game,typeData:s.typeData,category:U.showFullCategory,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChange,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTablesfull,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["time-live-comparative-avanced","is-team","is-widget","team-widget","game-id","onIntervalidtops","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.categoryPredefinedActive?(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"is-team":U.isTeam,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,onIntervalidtops:m.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":s.canPlayVideos,"game-id":s.gameId,game:s.game,typeData:s.typeData,category:U.categoryPredefined,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChangePredefined,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","is-team","time-live-comparative-avanced","onIntervalidtops","can-play-videos","game-id","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedcom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.titleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("No has seleccionado ningún filtro")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Para visualizar resultados selecciona un")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados con los filtros")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o[12]||(o[12]=t.createElementVNode("span",null,"Tipo de Jugada",-1)),o[13]||(o[13]=t.createTextVNode(" y un ")),o[14]||(o[14]=t.createElementVNode("span",null,"Filtro GolStats",-1)),o[15]||(o[15]=t.createTextVNode(" en la"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("que has seleccionado.")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcom)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("parte superior.")],64)):t.createCommentVNode("",!0)],2)],2))],64))],64)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedScountingcom),style:t.normalizeStyle(U.rowScoutingData.length>0?"height: auto;":"")},[U.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.rowScoutingData.length>0?(t.openBlock(),t.createBlock(_,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.rowScoutingData,(f,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[U.teamselectrec==0||U.teamselectrec==f.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(v,{type:2,"is-expanded":U.playerexpand==f.id&&U.expand,onMediadata:m.setMediaData,data:{position:f.position,player_name:f.player_name,player_photo:f.player_photo,total:f.total,id:f.id,player_age:f.player_age,team_abrev:f.team_abrev,team_logo:f.team_logo,player_position:U.positions[f.player_position-1].fullname,player_country_flag:f.player_country_flag,player_games:f.player_games,player_min:f.player_min,league_name:f.league_name,seasons:f.seasons,season_id:f.season_id},height:"71px",background:n%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),U.expand&&U.playerexpand==f.id?(t.openBlock(),t.createBlock(x,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:f.team_name,age:f.player_age,dataofbirth:f.date,nationality:f.nationality_name,countryFlag:f.player_country_flag,position:U.positions[f.player_position-1].name,games:f.player_games,min:f.player_min,goals:f.total,effectiveness:"-",category:"total",id:f.id},onViewprofile:i=>m.viewprofile(i,f.season_id,f.team_id),background:n%2===0?s.backgroundOdd:s.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.btnLeyendTxtcom)},' Haz click en "Buscar" para aplicar tus filtros ',2)):t.createCommentVNode("",!0),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacom),onClick:o[6]||(o[6]=(...f)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...f))}," Eliminar filtros aplicados ",2),U.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcom),onClick:o[7]||(o[7]=(...f)=>m.getScoutingData&&m.getScoutingData(...f))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.loadingActive?(t.openBlock(),t.createElementBlock("div",opt)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const lpt=Ki(tpt,[["render",spt],["__cssModules",{$style:Qht}]]),yaa="";let NV=null;const cpt={components:{GSCDatosGSMain:but,GSCCheckbox:j1,GSCRadioToggle:xF,GSCTopFull:lpt},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},timeLiveComparativeBestPlayers:{type:Number,default:6e4},timeLiveComparativeAvanced:{type:Number,default:6e4},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},tournamentSelectProps:{type:Object,default:null},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{type:Boolean,default:!1},isFemaleMode:{type:Boolean,default:!1}},data(){return{updateHomeCheck:0,updateAwayCheck:0,activeSection:"destacados",widthSection:0,teamactive:0,update:0,homeTeamCheck:!0,awayTeamCheck:!0,typeViewData:1}},watch:{game:{deep:!0,immediate:!0,handler(e){e&&(e.game_status==1||e.is_live==1||e.game_status==0?this.typeViewData=1:this.typeViewData=0),this.update+=1}}},computed:{},methods:{preventChange(e){e.preventDefault(),this.homeTeamCheck=!0},intervalidgs(e){this.$emit("intervalidgs",e)},onOpenProfileTeam(e){this.$emit("openProfileTeam",e)},intervalidtops(e){this.$emit("intervalidtops",e)},onOpenProfilePlayer(e){this.$emit("onOpenProfile",e)},ChangeRadio(e){typeof e=="string"&&(e==="Este partido"?this.typeViewData=1:this.typeViewData=0)},onCheckInactiveHome(e){e?(this.homeTeamCheck=!0,this.awayTeamCheck?this.teamactive=0:this.teamactive=this.game.homeTeam.team_id):this.awayTeamCheck?(this.homeTeamCheck=!1,this.teamactive=this.game.awayTeam.team_id):(this.updateHomeCheck+=1,this.homeTeamCheck=!0,this.teamactive=this.game.homeTeam.team_id)},onCheckInactiveAway(e){e?(this.awayTeamCheck=!0,this.homeTeamCheck?this.teamactive=0:this.teamactive=this.game.awayTeam.team_id):this.homeTeamCheck?(this.awayTeamCheck=!1,this.teamactive=this.game.homeTeam.team_id):(this.updateAwayCheck+=1,this.teamactive=this.game.awayTeam.team_id,this.awayTeamCheck=!0)},setUpResizeObserver(){if(window.ResizeObserver)NV=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),NV.observe(this.$refs.comparative);else throw new Error("Resize observer not supported!")},clickOptSection(e){this.activeSection=e},openmedia(e){this.typeViewData===1?(e.gameIdsToFilter=[this.game.gameId],this.$emit("openmedia",e)):(e.isLiveAccumulated=!0,this.$emit("openmedia",e))}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},upt={class:"container-comparative",ref:"comparative"},dpt={class:"container-btn"},hpt={class:"items-container-btn"},ppt={class:"container-sections"},fpt={key:0,class:"container-teams-menu"},mpt={class:"container-team-menu-home"},gpt=["src"],ypt={class:"container-team-menu-away"},vpt=["src"],bpt={key:1,class:"container-switch-menu"},_pt={class:"container-leyend"},xpt={class:"container-tops"};function wpt(e,o,s,B,U,m){const g=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),y=t.resolveComponent("GSCRadioToggle"),h=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",upt,[t.createElementVNode("div",dpt,[t.createElementVNode("div",hpt,[t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-destacados":"btn-destacados-movil",U.activeSection=="destacados"?"active":""]),onClick:o[0]||(o[0]=r=>m.clickOptSection("destacados"))},[s.game.status==1||s.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("General")],64))],2),t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-avanced":"btn-avanced-movil",U.activeSection=="avanzado"?"active":""]),onClick:o[1]||(o[1]=r=>m.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",ppt,[U.activeSection=="destacados"?(t.openBlock(),t.createBlock(g,{key:0,"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-selected":s.tournamentSelected,"time-live-comparative-best-players":s.timeLiveComparativeBestPlayers,game:s.game,"play-videos-privileges":s.playVideosPrivileges,onOpenmedia:m.openmedia,onIntervalidgs:m.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),U.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fpt,[t.createElementVNode("div",mpt,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:U.updateHomeCheck,"model-value":U.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:s.game.homeTeam.logo},null,8,gpt),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(s.game.homeTeam.colloquial_name),3)]),o[2]||(o[2]=t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),t.createElementVNode("div",ypt,[t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(s.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:s.game.awayTeam.logo},null,8,vpt),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:U.updateAwayCheck,"model-value":U.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),s.game.is_live||s.game.status===1||s.game.status===0?(t.openBlock(),t.createElementBlock("div",bpt,[t.createVNode(y,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":U.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:m.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",_pt,[U.typeViewData==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante este partido ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante el torneo ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas durante lo que va del torneo")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados durante lo que va del torneo")],64))],64))],64))]),t.createElementVNode("div",xpt,[t.createVNode(h,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-select-props":s.tournamentSelectProps,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onOpenProfileTeam:m.onOpenProfileTeam,onIntervalidtops:m.intervalidtops,onOpenProfilePlayer:m.onOpenProfilePlayer,"type-data":U.typeViewData,"game-id":s.game.gameId,game:s.game,"current-season-id":s.game.seasonId,"team-id":U.teamactive,"season-active":s.game.seasonId,"season-selected":s.seasonSelected,teamselect:U.teamactive,"is-female-mode":s.isFemaleMode},null,8,["is-widget","team-widget","tournament-select-props","time-live-comparative-avanced","can-play-videos","onOpenmedia","onOpenProfileTeam","onIntervalidtops","onOpenProfilePlayer","type-data","game-id","game","current-season-id","team-id","season-active","season-selected","teamselect","is-female-mode"])])],64)):t.createCommentVNode("",!0)])],512)}const kpt=Ki(cpt,[["render",wpt],["__scopeId","data-v-1a9cea94"]]);var Spt=Object.defineProperty,Cpt=(e,o,s)=>o in e?Spt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s,lC=(e,o,s)=>Cpt(e,typeof o!="symbol"?o+"":o,s);function FV(e,o){return function(){return e.apply(o,arguments)}}const{toString:Tpt}=Object.prototype,{getPrototypeOf:cC}=Object,{iterator:y4,toStringTag:RV}=Symbol,v4=(e=>o=>{const s=Tpt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),em=e=>(e=e.toLowerCase(),o=>v4(o)===e),b4=e=>o=>typeof o===e,{isArray:Uv}=Array,Zb=b4("undefined");function Apt(e){return e!==null&&!Zb(e)&&e.constructor!==null&&!Zb(e.constructor)&&Ap(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const VV=em("ArrayBuffer");function Ept(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&VV(e.buffer),o}const Mpt=b4("string"),Ap=b4("function"),jV=b4("number"),_4=e=>e!==null&&typeof e=="object",Ipt=e=>e===!0||e===!1,x4=e=>{if(v4(e)!=="object")return!1;const o=cC(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(RV in e)&&!(y4 in e)},Ppt=em("Date"),Lpt=em("File"),Bpt=em("Blob"),zpt=em("FileList"),Opt=e=>_4(e)&&Ap(e.pipe),Dpt=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Ap(e.append)&&((o=v4(e))==="formdata"||o==="object"&&Ap(e.toString)&&e.toString()==="[object FormData]"))},Npt=em("URLSearchParams"),[Fpt,Rpt,Vpt,jpt]=["ReadableStream","Request","Response","Headers"].map(em),Upt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qb(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let B,U;if(typeof e!="object"&&(e=[e]),Uv(e))for(B=0,U=e.length;B<U;B++)o.call(null,e[B],B,e);else{const m=s?Object.getOwnPropertyNames(e):Object.keys(e),g=m.length;let a;for(B=0;B<g;B++)a=m[B],o.call(null,e[a],a,e)}}function UV(e,o){o=o.toLowerCase();const s=Object.keys(e);let B=s.length,U;for(;B-- >0;)if(U=s[B],o===U.toLowerCase())return U;return null}const mg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,GV=e=>!Zb(e)&&e!==mg;function uC(){const{caseless:e}=GV(this)&&this||{},o={},s=(B,U)=>{const m=e&&UV(o,U)||U;x4(o[m])&&x4(B)?o[m]=uC(o[m],B):x4(B)?o[m]=uC({},B):Uv(B)?o[m]=B.slice():o[m]=B};for(let B=0,U=arguments.length;B<U;B++)arguments[B]&&qb(arguments[B],s);return o}const Gpt=(e,o,s,{allOwnKeys:B}={})=>(qb(o,(U,m)=>{s&&Ap(U)?e[m]=FV(U,s):e[m]=U},{allOwnKeys:B}),e),Hpt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zpt=(e,o,s,B)=>{e.prototype=Object.create(o.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},qpt=(e,o,s,B)=>{let U,m,g;const a={};if(o=o||{},e==null)return o;do{for(U=Object.getOwnPropertyNames(e),m=U.length;m-- >0;)g=U[m],(!B||B(g,e,o))&&!a[g]&&(o[g]=e[g],a[g]=!0);e=s!==!1&&cC(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Wpt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const B=e.indexOf(o,s);return B!==-1&&B===s},Jpt=e=>{if(!e)return null;if(Uv(e))return e;let o=e.length;if(!jV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Ypt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&cC(Uint8Array)),Xpt=(e,o)=>{const s=(e&&e[y4]).call(e);let B;for(;(B=s.next())&&!B.done;){const U=B.value;o.call(e,U[0],U[1])}},$pt=(e,o)=>{let s;const B=[];for(;(s=e.exec(o))!==null;)B.push(s);return B},Kpt=em("HTMLFormElement"),Qpt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,B){return s.toUpperCase()+B}),HV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),eft=em("RegExp"),ZV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),B={};qb(s,(U,m)=>{let g;(g=o(U,m,e))!==!1&&(B[m]=g||U)}),Object.defineProperties(e,B)},tft=e=>{ZV(e,(o,s)=>{if(Ap(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const B=e[s];if(Ap(B)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},aft=(e,o)=>{const s={},B=U=>{U.forEach(m=>{s[m]=!0})};return Uv(e)?B(e):B(String(e).split(o)),s},rft=()=>{},nft=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function ift(e){return!!(e&&Ap(e.append)&&e[RV]==="FormData"&&e[y4])}const oft=e=>{const o=new Array(10),s=(B,U)=>{if(_4(B)){if(o.indexOf(B)>=0)return;if(!("toJSON"in B)){o[U]=B;const m=Uv(B)?[]:{};return qb(B,(g,a)=>{const y=s(g,U+1);!Zb(y)&&(m[a]=y)}),o[U]=void 0,m}}return B};return s(e,0)},sft=em("AsyncFunction"),lft=e=>e&&(_4(e)||Ap(e))&&Ap(e.then)&&Ap(e.catch),qV=((e,o)=>e?setImmediate:o?((s,B)=>(mg.addEventListener("message",({source:U,data:m})=>{U===mg&&m===s&&B.length&&B.shift()()},!1),U=>{B.push(U),mg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Ap(mg.postMessage)),cft=typeof queueMicrotask<"u"?queueMicrotask.bind(mg):typeof process<"u"&&process.nextTick||qV,uft=e=>e!=null&&Ap(e[y4]),On={isArray:Uv,isArrayBuffer:VV,isBuffer:Apt,isFormData:Dpt,isArrayBufferView:Ept,isString:Mpt,isNumber:jV,isBoolean:Ipt,isObject:_4,isPlainObject:x4,isReadableStream:Fpt,isRequest:Rpt,isResponse:Vpt,isHeaders:jpt,isUndefined:Zb,isDate:Ppt,isFile:Lpt,isBlob:Bpt,isRegExp:eft,isFunction:Ap,isStream:Opt,isURLSearchParams:Npt,isTypedArray:Ypt,isFileList:zpt,forEach:qb,merge:uC,extend:Gpt,trim:Upt,stripBOM:Hpt,inherits:Zpt,toFlatObject:qpt,kindOf:v4,kindOfTest:em,endsWith:Wpt,toArray:Jpt,forEachEntry:Xpt,matchAll:$pt,isHTMLForm:Kpt,hasOwnProperty:HV,hasOwnProp:HV,reduceDescriptors:ZV,freezeMethods:tft,toObjectSet:aft,toCamelCase:Qpt,noop:rft,toFiniteNumber:nft,findKey:UV,global:mg,isContextDefined:GV,isSpecCompliantForm:ift,toJSONObject:oft,isAsyncFn:sft,isThenable:lft,setImmediate:qV,asap:cft,isIterable:uft};function kl(e,o,s,B,U){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),B&&(this.request=B),U&&(this.response=U,this.status=U.status?U.status:null)}On.inherits(kl,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:On.toJSONObject(this.config),code:this.code,status:this.status}}});const WV=kl.prototype,JV={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{JV[e]={value:e}}),Object.defineProperties(kl,JV),Object.defineProperty(WV,"isAxiosError",{value:!0}),kl.from=(e,o,s,B,U,m)=>{const g=Object.create(WV);return On.toFlatObject(e,g,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),kl.call(g,e.message,o,s,B,U),g.cause=e,g.name=e.name,m&&Object.assign(g,m),g};const dft=null;function dC(e){return On.isPlainObject(e)||On.isArray(e)}function YV(e){return On.endsWith(e,"[]")?e.slice(0,-2):e}function XV(e,o,s){return e?e.concat(o).map(function(B,U){return B=YV(B),!s&&U?"["+B+"]":B}).join(s?".":""):o}function hft(e){return On.isArray(e)&&!e.some(dC)}const pft=On.toFlatObject(On,{},null,function(e){return/^is[A-Z]/.test(e)});function w4(e,o,s){if(!On.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=On.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,f){return!On.isUndefined(f[x])});const B=s.metaTokens,U=s.visitor||h,m=s.dots,g=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&On.isSpecCompliantForm(o);if(!On.isFunction(U))throw new TypeError("visitor must be a function");function y(x){if(x===null)return"";if(On.isDate(x))return x.toISOString();if(On.isBoolean(x))return x.toString();if(!a&&On.isBlob(x))throw new kl("Blob is not supported. Use a Buffer instead.");return On.isArrayBuffer(x)||On.isTypedArray(x)?a&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function h(x,f,n){let i=x;if(x&&!n&&typeof x=="object"){if(On.endsWith(f,"{}"))f=B?f:f.slice(0,-2),x=JSON.stringify(x);else if(On.isArray(x)&&hft(x)||(On.isFileList(x)||On.endsWith(f,"[]"))&&(i=On.toArray(x)))return f=YV(f),i.forEach(function(c,l){!(On.isUndefined(c)||c===null)&&o.append(g===!0?XV([f],l,m):g===null?f:f+"[]",y(c))}),!1}return dC(x)?!0:(o.append(XV(n,f,m),y(x)),!1)}const r=[],_=Object.assign(pft,{defaultVisitor:h,convertValue:y,isVisitable:dC});function v(x,f){if(!On.isUndefined(x)){if(r.indexOf(x)!==-1)throw Error("Circular reference detected in "+f.join("."));r.push(x),On.forEach(x,function(n,i){(!(On.isUndefined(n)||n===null)&&U.call(o,n,On.isString(i)?i.trim():i,f,_))===!0&&v(n,f?f.concat(i):[i])}),r.pop()}}if(!On.isObject(e))throw new TypeError("data must be an object");return v(e),o}function $V(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function hC(e,o){this._pairs=[],e&&w4(e,this,o)}const KV=hC.prototype;KV.append=function(e,o){this._pairs.push([e,o])},KV.toString=function(e){const o=e?function(s){return e.call(this,s,$V)}:$V;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function fft(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QV(e,o,s){if(!o)return e;const B=s&&s.encode||fft;On.isFunction(s)&&(s={serialize:s});const U=s&&s.serialize;let m;if(U?m=U(o,s):m=On.isURLSearchParams(o)?o.toString():new hC(o,s).toString(B),m){const g=e.indexOf("#");g!==-1&&(e=e.slice(0,g)),e+=(e.indexOf("?")===-1?"?":"&")+m}return e}let ej=class{constructor(){this.handlers=[]}use(o,s,B){return this.handlers.push({fulfilled:o,rejected:s,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){On.forEach(this.handlers,function(s){s!==null&&o(s)})}};const tj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mft=typeof URLSearchParams<"u"?URLSearchParams:hC,gft=typeof FormData<"u"?FormData:null,yft=typeof Blob<"u"?Blob:null,vft={isBrowser:!0,classes:{URLSearchParams:mft,FormData:gft,Blob:yft},protocols:["http","https","file","blob","url","data"]},pC=typeof window<"u"&&typeof document<"u",fC=typeof navigator=="object"&&navigator||void 0,bft=pC&&(!fC||["ReactNative","NativeScript","NS"].indexOf(fC.product)<0),_ft=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xft=pC&&window.location.href||"http://localhost",wft=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pC,hasStandardBrowserEnv:bft,hasStandardBrowserWebWorkerEnv:_ft,navigator:fC,origin:xft},Symbol.toStringTag,{value:"Module"})),zh={...wft,...vft};function kft(e,o){return w4(e,new zh.classes.URLSearchParams,Object.assign({visitor:function(s,B,U,m){return zh.isNode&&On.isBuffer(s)?(this.append(B,s.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},o))}function Sft(e){return On.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Cft(e){const o={},s=Object.keys(e);let B;const U=s.length;let m;for(B=0;B<U;B++)m=s[B],o[m]=e[m];return o}function aj(e){function o(s,B,U,m){let g=s[m++];if(g==="__proto__")return!0;const a=Number.isFinite(+g),y=m>=s.length;return g=!g&&On.isArray(U)?U.length:g,y?(On.hasOwnProp(U,g)?U[g]=[U[g],B]:U[g]=B,!a):((!U[g]||!On.isObject(U[g]))&&(U[g]=[]),o(s,B,U[g],m)&&On.isArray(U[g])&&(U[g]=Cft(U[g])),!a)}if(On.isFormData(e)&&On.isFunction(e.entries)){const s={};return On.forEachEntry(e,(B,U)=>{o(Sft(B),U,s,0)}),s}return null}function Tft(e,o,s){if(On.isString(e))try{return(o||JSON.parse)(e),On.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(s||JSON.stringify)(e)}const Wb={transitional:tj,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",B=s.indexOf("application/json")>-1,U=On.isObject(e);if(U&&On.isHTMLForm(e)&&(e=new FormData(e)),On.isFormData(e))return B?JSON.stringify(aj(e)):e;if(On.isArrayBuffer(e)||On.isBuffer(e)||On.isStream(e)||On.isFile(e)||On.isBlob(e)||On.isReadableStream(e))return e;if(On.isArrayBufferView(e))return e.buffer;if(On.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let m;if(U){if(s.indexOf("application/x-www-form-urlencoded")>-1)return kft(e,this.formSerializer).toString();if((m=On.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return w4(m?{"files[]":e}:e,g&&new g,this.formSerializer)}}return U||B?(o.setContentType("application/json",!1),Tft(e)):e}],transformResponse:[function(e){const o=this.transitional||Wb.transitional,s=o&&o.forcedJSONParsing,B=this.responseType==="json";if(On.isResponse(e)||On.isReadableStream(e))return e;if(e&&On.isString(e)&&(s&&!this.responseType||B)){const U=!(o&&o.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(m){if(U)throw m.name==="SyntaxError"?kl.from(m,kl.ERR_BAD_RESPONSE,this,null,this.response):m}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zh.classes.FormData,Blob:zh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};On.forEach(["delete","get","head","post","put","patch"],e=>{Wb.headers[e]={}});const Aft=On.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Eft=e=>{const o={};let s,B,U;return e&&e.split(`
4139
+ */const $d={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},AV={itemsToShow:{default:$d.itemsToShow,type:Number},itemsToScroll:{default:$d.itemsToScroll,type:Number},wrapAround:{default:$d.wrapAround,type:Boolean},throttle:{default:$d.throttle,type:Number},snapAlign:{default:$d.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:$d.transition,type:Number},breakpoints:{default:$d.breakpoints,type:Object},autoplay:{default:$d.autoplay,type:Number},pauseAutoplayOnHover:{default:$d.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:$d.mouseDrag,type:Boolean},touchDrag:{default:$d.touchDrag,type:Boolean},dir:{default:$d.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:$d.i18n,type:Object},settings:{default(){return{}},type:Object}};function jdt({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function Udt({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function aC({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function Gdt({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let g=o;switch(B){case"center":case"center-odd":g-=(m-1)/2;break;case"center-even":g-=(m-2)/2;break;case"end":g-=m-1;break}return U?g:aC({val:g,max:s-m,min:0})}function EV(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...EV(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function rC({val:e,max:o,min:s=0}){return e>o?rC({val:e-(o+1),max:o,min:s}):e<s?rC({val:e+(o+1),max:o,min:s}):e}function Hdt(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function Zdt(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function qdt(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var Wdt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},$d))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},qdt(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),Jdt=t.defineComponent({name:"Carousel",props:AV,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),g=t.ref([]),a=t.ref(0),y=t.ref(0),h=t.reactive(Object.assign({},$d));let r=Object.assign({},$d),_;const v=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),f=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",h),t.provide("slidesCount",y),t.provide("currentSlide",v),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function b(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ne=>Number(ne)).sort((ne,me)=>+me-+ne);let se=Object.assign({},r);re.some(ne=>{const me=window.matchMedia(`(min-width: ${ne}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ne])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ne])=>h[se]=ne)}const C=Zdt(()=>{b(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/h.itemsToShow}function A(){y.value<=0||(f.value=Math.ceil((y.value-1)/2),n.value=jdt({config:h,slidesCount:y.value}),i.value=Udt({config:h,slidesCount:y.value}),h.wrapAround||(v.value=aC({val:v.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),b(),Z(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||H.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=Hdt(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ne=T.y-L.y;I.y=ne,I.x=se},h.throttle);function j(){const re=h.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ne=Math.round(I.x/a.value+se)*re;if(ne&&!P){const me=ye=>{ye.stopPropagation(),window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(v.value-ne),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function Z(){!h.autoplay||h.autoplay<=0||(c=setInterval(()=>{h.pauseAutoplayOnHover&&M.value||ie()},h.autoplay))}function G(){c&&(clearInterval(c),c=null),Z()}const H=t.ref(!1);function $(re){const se=h.wrapAround?re:aC({val:re,max:n.value,min:i.value});v.value===se||H.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:v.value,prevSlideIndex:x.value,slidesCount:y.value}),H.value=!0,x.value=v.value,v.value=se,l=setTimeout(()=>{if(h.wrapAround){const ne=rC({val:se,max:n.value,min:0});ne!==v.value&&(v.value=ne,s("loop",{currentSlideIndex:v.value,slidingToIndex:re}))}s("update:modelValue",v.value),s("slide-end",{currentSlideIndex:v.value,prevSlideIndex:x.value,slidesCount:y.value}),H.value=!1,G()},h.transition))}function ie(){$(v.value+h.itemsToScroll)}function W(){$(v.value-h.itemsToScroll)}const K={slideTo:$,next:ie,prev:W};t.provide("nav",K),t.provide("isSliding",H);const Q=t.computed(()=>Gdt({config:h,currentSlide:v.value,slidesCount:y.value}));t.provide("slidesToScroll",Q);const X=t.computed(()=>{const re=h.dir==="rtl"?-1:1,se=Q.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${H.value?h.transition:0}ms`,margin:h.wrapAround?`0 -${y.value*a.value}px`:"",width:"100%"}});function ee(){d(),b(),A(),E(),G()}Object.keys(AV).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],ee)}),t.watch(()=>e.modelValue,re=>{re!==v.value&&$(Number(re))}),t.watch(y,A),s("before-init"),d();const ce={config:h,slidesCount:y,slideWidth:a,next:ie,prev:W,slideTo:$,currentSlide:v,maxSlide:n,minSlide:i,middleSlide:f};B({updateBreakpointsConfigs:b,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:ee,slideTo:$,next:ie,prev:W,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=EV(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ne=re;if(h.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ne=[...ve,...re,...we]}g.value=re,y.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:h.mouseDrag?O:null,onTouchstartPassiveCapture:h.touchDrag?O:null},ne),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":H.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":h.dir==="rtl"},dir:h.dir,"aria-label":h.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(Wdt)])}}}),MV;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(MV||(MV={}));var Ydt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},$d))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),g=()=>e.index===B.value,a=()=>e.index===B.value-1,y=()=>e.index===B.value+1,h=()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_};return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":h(),"carousel__slide--active":g(),"carousel__slide--prev":a(),"carousel__slide--next":y(),"carousel__slide--sliding":m.value},"aria-hidden":!h()},(r=o.default)===null||r===void 0?void 0:r.call(o))}}});const Xdt=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},$dt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),Kdt={class:"gsc-carousel"},Qdt={key:0},eht=$dt(()=>t.createElementVNode("div",null,"no hay",-1)),tht=[eht],aht={class:"gsc-carousel__2d__slides"},rht={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nht=["fill"],iht={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oht=["fill"],sht={class:"gsc-carousel__2d__navigation"},lht={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cht=["stroke"],uht={key:1,class:"gsc-carousel__2d__navigation__pagination"},dht=["onClick"],hht={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pht=["stroke"],fht={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(o=>o in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},arrowsMaxWidth:{type:String,default:"20px"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:o,emit:s}){const B=e;t.useCssVars(n=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const U=t.ref(null),m=t.ref({}),g=t.ref(0),a=t.ref(!1);t.watch(U,n=>{n&&a.value?(a.value=!1,y(B.items)):n&&n.slideTo&&n.slideTo(g.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,n=>{g.value!==n&&v(n)}),t.watch(()=>B.defaultItemByIndex,n=>{g.value!==n&&v(n)}),t.watch(()=>B.items,n=>{U.value?y(n):a.value=!0},{immediate:!0});function y(n){n&&n.length&&U.value&&setTimeout(()=>{if(B.defaultItemByProp){const i=B.items.findIndex(c=>c[B.defaultItemByProp.propName]===B.defaultItemByProp.value);i!==-1?(g.value=i,m.value=n[i]):(g.value=0,m.value=n[0])}else g.value=B.defaultItemByIndex,m.value=n[B.defaultItemByIndex];U.value.slideTo&&U.value.slideTo(g.value),m.value&&g.value===0&&s("input",{selectedItem:m.value,selectedItemIndex:g.value})},500)}function h(){U.value&&U.value.next()}function r(){U.value&&U.value.prev()}function _(){U.value&&U.value.updateSlideWidth()}function v(n){U.value&&U.value.slideTo(n)}function x(n){U.value.slideTo(n)}function f(n){const i=n.slidingToIndex<0?B.items.length-1:n.slidingToIndex===B.items.length?0:n.slidingToIndex;g.value=i,m.value=B.items[i],s("update:currentItemIndex",i),s("input",{selectedItem:m.value,selectedItemIndex:g.value})}return o({prev:r,next:h,updateSlideWidth:_,slideTo:v}),(n,i)=>(t.openBlock(),t.createElementBlock("div",Kdt,[B.is3d?(t.openBlock(),t.createElementBlock("div",Qdt,tht)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",aht,[t.createVNode(t.unref(Jdt),{ref_key:"carousel2d",ref:U,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:f},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createBlock(t.unref(Ydt),{key:l},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default",{item:c},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[0]||(i[0]=c=>U.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",rht,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,nht)]))],2)],4)):t.createCommentVNode("",!0),e.areSlidesArrowsVisible&&e.items.length>1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:t.normalizeStyle("max-width:"+e.arrowsMaxWidth+"!important"),onClick:i[1]||(i[1]=c=>h())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",iht,[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,oht)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",sht,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:i[2]||(i[2]=c=>r())},[(t.openBlock(),t.createElementBlock("svg",lht,[t.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:B.arrowsColor},null,8,cht)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",uht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(c,l)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${l}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${g.value===l?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${g.value===l?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:d=>x(l)},null,12,dht))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:i[3]||(i[3]=c=>U.value.next())},[(t.openBlock(),t.createElementBlock("svg",hht,[t.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:B.arrowsColor},null,8,pht)]))])):t.createCommentVNode("",!0)])],2))]))}},mht=Xdt(fht,[["__scopeId","data-v-54620d25"]]),_ea="",IV={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},xea="",nC={components:{GSCCarousel:mht,GSCLeaders:Cdt,GSCRowTable:mV,GSCTableHeader:cV,GSCExpandedInfo:TV},props:{isTeam:{type:Boolean,default:!1},typeTable:{type:Number,default:0},typeData:{type:Number,default:1},gameId:{type:Number,default:0},filtersProp:{type:[Object,String],default:()=>{}},game:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},filterTeam:{type:Number,default:0},timeLiveComparativeAvanced:{type:Number,default:6e4},category:{type:Number,default:1},categoryName:{type:String,default:"Goles"},seasonSelected:{type:Object,default:()=>({})},season:{type:Number,default:1772},type:{type:Number,default:0},borderRadius:{type:String,default:"8px"},borderWidth:{type:[String,Number],default:"2px"},borderColor:{type:String,default:"#cfcfcf"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},numRows:{type:Number,default:5}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Hb(e);return{myDivRef:e,elementSize:o}},watch:{category:{async handler(){this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season)}},game:{immediate:!0,deep:!0,async handler(e){e&&(this.playersInfo={},this.teamInfo={},this.isloading=!0,this.formatFilterStats=[],await this.getCategoryStats(this.season),this.game.is_live&&(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)))}},typeData:{immediate:!0,async handler(e){await this.getCategoryStats(this.season),e===1&&this.game.is_live?(this.createIntervalTops(),this.$emit("intervalidtops",this.intervalIdtops)):clearInterval(this.intervalIdtops)}},filtersProp:{immediate:!1,deep:!0,async handler(e,o){e&&(JSON.stringify(e)!==JSON.stringify(o)||this.sonConjuntosDistintos(e.setNationalitiesIds,o.setNationalitiesIds))&&(this.isloading=!0,this.filterEmitAux=e,[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.filterEmitAux.typeZone=1:this.filterEmitAux.typeZone=2,this.formatFilterStats=await this.filterRecords(this.filterEmitAux))}}},computed:{topData(){if(this.changeStateLoading(!0),Object.entries(this.statsData).length>0&&this.formatFilterStats.length>0){var e={},o={},s=[],B=[],U=[];return this.formatFilterStats.map(m=>{e[m.team_id]?e[m.team_id].total=e[m.team_id].total+m.total:(e[m.team_id]={},e[m.team_id].total=m.total,e[m.team_id].id=this.teamInfo[m.team_id].id,e[m.team_id].name=this.teamInfo[m.team_id].name.replace(" Femenil",""),e[m.team_id].img=If("https://golstatsimages.blob.core.windows.net/teams-80/"+m.team_id+".png",this.$store.getters.getProviderId),e[m.team_id].effectiveness=this.teamInfo[m.team_id].effectiveness,e[m.team_id].frecuency=this.teamInfo[m.team_id].frecuency,e[m.team_id].game_avg=this.teamInfo[m.team_id].game_avg,e[m.team_id].game_avg_last_season=this.teamInfo[m.team_id].game_avg_last_season,e[m.team_id].games_played_lastseason=this.teamInfo[m.team_id].games_played_lastseason,e[m.team_id].games_played=this.teamInfo[m.team_id].games_played,e[m.team_id].positiontable=this.teamInfo[m.team_id].positiontable,e[m.team_id].goals=this.teamInfo[m.team_id].goals,e[m.team_id].goalsrecived=this.teamInfo[m.team_id].goalsrecived,e[m.team_id].xg=this.teamInfo[m.team_id].xg),o[m.player_id]?m.player_id!=0&&m.player_id!=62117&&(o[m.player_id].total=o[m.player_id].total+m.total):m.player_id!=0&&m.player_id!=62117&&(o[m.player_id]={},o[m.player_id].total=m.total,m.player_id&&this.playersInfo[m.player_id]?(o[m.player_id].name=this.playersInfo[m.player_id].name,o[m.player_id].name_short=this.getnameshort(this.playersInfo[m.player_id].name),o[m.player_id].img=this.playersInfo[m.player_id].img,o[m.player_id].id=this.playersInfo[m.player_id].id,o[m.player_id].age=this.playersInfo[m.player_id].age,o[m.player_id].team=this.playersInfo[m.player_id].team,o[m.player_id].teamname=this.playersInfo[m.player_id].teamname,o[m.player_id].teamid=this.playersInfo[m.player_id].teamid,o[m.player_id].position=this.playersInfo[m.player_id].position,o[m.player_id].positionId=this.playersInfo[m.player_id].positionId,o[m.player_id].positionfull=this.playersInfo[m.player_id].positionfull,o[m.player_id].country=this.playersInfo[m.player_id].country,o[m.player_id].effectiveness=this.playersInfo[m.player_id].effectiveness,o[m.player_id].minutes=this.playersInfo[m.player_id].minutes_played,o[m.player_id].games=this.playersInfo[m.player_id].games_played,o[m.player_id].date=this.playersInfo[m.player_id].date,o[m.player_id].nationality=this.playersInfo[m.player_id].nationality,o[m.player_id].player_country_flag=this.playersInfo[m.player_id].player_country_flag,o[m.player_id].categoryName=this.categoryName):(o[m.player_id].id=m.player_id,o[m.player_id].name=m.player_id,o[m.player_id].img="SIN IMAGEN",o[m.player_id].age="",o[m.player_id].teamname="",o[m.player_id].team="",o[m.player_id].teamid=0,o[m.player_id].position="",o[m.player_id].positionId=0,o[m.player_id].positionfull="",o[m.player_id].country="",o[m.player_id].effectiveness="",o[m.player_id].minutes="",o[m.player_id].games="",o[m.player_id].date="00-00-0000",o[m.player_id].nationality="",o[m.player_id].player_country_flag="",o[m.player_id].categoryName=""))}),s.push(...Object.values(e)),B.push(...Object.values(o)),s=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((m,g)=>(m.top=g<9?"0"+(g+1):""+(g+1),m)),s=s.map((m,g)=>(m.top=g<9?"0"+(g+1):""+(g+1),m)),this.filterTeam!==0&&!this.isTeam&&(U=B.filter(m=>m.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(s):this.filterTeam!=0?this.formatArrayPaginate(U):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",videoCategoriesMap:{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]},urlPrematch:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/topsBySeasonAndCategory/",data_headers:["team_id","player_id","playing_as","match_result","section","total","origen","destino"],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",mapPlayers:new Map,setNationalityIds:new Set,arrayAgeRange:[0,0],arePlaysEmpty:!1,teamInfo:{},formatFilterStats:[],formatStats:[],playersInfo:{},isloading:!0,statsData:{},updateSlider:0,intervalIdtops:null,filterEmitAux:{},filtersSelect:{playingAs:[],matchResult:[],sections:[],zone:[],typeZone:[]},filtersValues:{type:1,sections:[1,2,3,4,5,6],matchResult:[1,2,3],playingAs:[1,2],zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],typeZone:1,arrayAgeRange:[1,60],setNationalitiesIds:[],setPositionsIds:[1,2,3,4,5,6,7,8,9]},expand:!1,playerexpand:0,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],categories:[{id:1,name:"Goles"}]}),async created(){await this.fetchVideoCategories()},methods:{getImageUrl:If,changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,o){return e.total>o.total?-1:e.total<o.total?1:e.minutes<o.minutes?-1:e.minutes>o.minutes?1:0},sonConjuntosDistintos(e,o){const s=Array.from(e),B=Array.from(o);if(s.length!==B.length)return!0;for(let U=0;U<s.length;U++)if(!o.has(s[U]))return!0;return!1},getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var g=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),g+". "+m},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,o){return e.total<o.total?-1:e.total>o.total?1:e.name<o.name?-1:e.name>o.name?1:0},sortAndSlice(e,o){return e.sort((s,B)=>(s.name<B.name?1:-1)&&(s.total<B.total?1:-1)).slice(0,o)},getCategoryName(e){let o="";for(let s=0;s<this.categories.length;s++)e==this.categories[s].id&&(o=this.categories[s].name);return o},translateTopCategories(e){return this.videoCategoriesMap[e]||[]},async fetchVideoCategories(){try{const e=this.$store.getters.getProviderId||1,{data:o}=await pu.get(`https://dtcf4s9tapfr0.cloudfront.net/${e}/tops/translate_top_categories.json`);o&&typeof o=="object"&&(this.videoCategoriesMap=o)}catch{}},getCoordinatePointPerCategory(e){return{1:2,2:3,3:1,4:2,5:1,6:2,7:2,8:1,9:1,10:2,11:2,12:1,13:1,14:1,15:1,16:1,17:1,18:3,19:3,20:3,21:3,22:1,23:1}[e]||0},emitEventMedia(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,g=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,g=this.filterEmitAux.zone);const y=1,h=2,r=3,_=this.isTeam?r:h,v=e.player_id;let x=[],f=this.isTeam?e.id:this.filterTeam;v?this.isTeam?f=v:(x=[v],a=a.filter(i=>!i.toString().includes("_r"))):this.isTeam?f=e.id:(x=[e.id],a=a.filter(i=>!i.toString().includes("_r")));const n={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.game.is_live==1?this.season:this.game.regularSeasonId,isFeaturedPlayers:!1,mainSectionType:y,playListType:_,gameIds:null,playerIds:x,goalkeeperIds:[],categoryIds:this.translateTopCategories(o),teamId:f||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:g,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",n)},emitEventMediaFullTable(e,o,s){let B=this.filtersValues.matchResult,U=this.filtersValues.playingAs,m=this.filtersValues.sections,g=this.filtersValues.zone,a=this.translateTopCategories(o);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,U=this.filterEmitAux.playingAs,m=this.filterEmitAux.sections,g=this.filterEmitAux.zone);const y=1,h=2,r=3,_=this.isTeam?r:h;let v=[],x=this.isTeam?e.id:this.filterTeam;this.isTeam?x=e.id:(v=[e.id],a=a.filter(n=>!n.toString().includes("_r")));const f={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:y,playListType:_,gameIds:null,playerIds:v,goalkeeperIds:[],categoryIds:a,teamId:x||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s,playingAs:U,timeSections:m,fieldSections:g,coordinatePoint:this.getCoordinatePointPerCategory(o)}};this.$emit("setopenmedia",f)},replaceImgPlayer(e){return e.replace("https://golstatsimages.blob.core.windows.net/players-profile/","https://golstatsimages.blob.core.windows.net/players-profile-no-bg/")},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var g=m+". "+U;return g},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,o){this.$emit("clickprofile",{id:e,teamId:o,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){var o,s;this.mapPlayers=new Map;try{if(!e)return;let B=[],U={},m={},g=this.season;(s=(o=this.seasonSelected)==null?void 0:o.related_seasons)!=null&&s.some(_=>_.id===this.season)&&(g=this.seasonSelected.id),this.arePlaysEmpty=!1;const a=pu.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;const y=this.$store.getters.getProviderId,h=this.$store.getters.getIsDevApis;let r={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?acc=1&t="+this.teamWidget):r=await a.get(uu(this.url+"/"+this.gameId+"/"+this.category,y,h)+"?acc=1"):this.isWidget&&this.teamWidget!=0?r=await a.get(uu(this.urlPrematch+g+"/"+this.category,y,h)+"?t="+this.teamWidget):r=await a.get(uu(this.urlPrematch+g+"/"+this.category,y,h)+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),r&&r.data&&r.data.data&&r.data.data.length>0){B=r.data.data.map(v=>this.formatStatsData(v)),r.data.teams.forEach(v=>{U[v[0]]={},U[v[0]].id=v[0],U[v[0]].name=v[1],U[v[0]].abrv=v[2],U[v[0]].img=v[3],U[v[0]].effectiveness=v[4],U[v[0]].games_played=v[5],U[v[0]].games_played_lastseason=v[6],U[v[0]].positiontable=v[7],U[v[0]].goals=v[8],U[v[0]].goalsrecived=v[9],U[v[0]].xg=v[10],U[v[0]].frecuency=v[11],U[v[0]].game_avg=v[12],U[v[0]].game_avg_last_season=v[13]});const _=new Set;r.data.players.forEach(v=>{const x=this.getObjectPlayer(v);this.mapPlayers.set(x.numberId,x);const f=x.numberAge,n=x.teamName.length>0?x.teamName[0].acronym:"",i=x.teamName.length>0?U[x.teamName[0].team_id].name:"",c=x.teamName.length>0?x.teamName[0].team_id:"",l=this.positions[x.numberPositionId-1].fullname,d=this.positions[x.numberPositionId-1].name,b=x.countryId.length>0?x.countryId[0].nationality_id:"",w=x.effectiveness,C=x.min,E=x.games,A=x.date;x.arrayNationalities.forEach(P=>{_.add(P.numberId)}),m[v[0]]={id:v[0],name:v[1],img:v[2],age:f,team:n,teamname:i,teamid:c,position:l,positionfull:d,effectiveness:w,country:b,games_played:E,minutes_played:C,date:A,nationality:x.stringNationalityName,player_country_flag:x.player_country_flag,positionId:x.numberPositionId}}),this.setNationalityIds=_,this.arrayAgeRange=[r.data.min_age,r.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=U,this.playersInfo=m,this.formatStats=B,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=r}catch(B){return Promise.reject(B)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(o=>{const s=e.playingAs.includes(o.playing_as),B=e.matchResult.includes(o.match_result),U=e.sections.includes(o.section),m=e.typeZone===1&&e.zone.includes(o.origen)||e.typeZone===2&&e.zone.includes(o.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const g=this.mapPlayers.get(o.player_id);if(!g)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(o.player_id))return!1}else{let a=!1;for(const y of g.arrayNationalitiesIds)if(e.setNationalitiesIds.has(y)){a=!0;break}if(!a)return!1}if(g.numberAge<e.arrayAgeRange[0]||g.numberAge>e.arrayAgeRange[1]||g.date<e.setYear||!e.setPositionsIds.includes(g.numberPositionId))return!1}return(e.playingAs.length===0||s)&&(e.matchResult.length===0||B)&&(e.sections.length===0||U)&&(e.zone.length===0||m)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const o={};return e[1]===0&&(e[2]===1||e[2]===2)&&(e[2]=3-e[2]),e[1]===0&&(e[3]===1||e[3]===2)&&(e[3]=3-e[3]),this.data_headers.forEach((s,B)=>{o[s]=e[B]}),o},getObjectPlayer(e){const o=[],s=e[7].map(U=>(o.push(U.nationality_id),{stringName:U.nationality,numberId:U.nationality_id})),B=e[9].split("-");return{numberId:e[0]!==void 0?e[0]:"",stringFullName:e[1]!==void 0?e[1]:"",stringImageUrl:e[2]!==void 0?e[2]:"",numberTeamId:e[3]!==void 0?e[3]:"",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+e[3]+".jpg",stringNationalityName:IV[e[3]],numberAge:e[5]!==void 0?e[5]:"",numberPositionId:e[6]!==void 0?e[6]:"",countryId:e[7]!==void 0?e[7]:"",teamName:e[10]!==void 0?e[10]:"",effectiveness:e[11]!==void 0?e[11]:"",min:e[13]!==void 0?e[13]:"",games:e[12]!==void 0?e[12]:"",date:B.length>0?Number(B[0]):0,arrayNationalities:s,category:this.categoryName,arrayNationalitiesIds:o}},formatArrayPaginate(e){const o=Math.ceil(e.length/this.numRows);return Array.from({length:o},(s,B)=>{const U=B*this.numRows,m=U+this.numRows;return e.slice(U,m)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},PV=()=>{t.useCssVars(e=>({"638cea0c":e.borderRadius,"4901a25e":e.borderWidth,"47eaa3fb":e.borderColor}))},LV=nC.setup;nC.setup=LV?(e,o)=>(PV(),LV(e,o)):PV;const ght={ref:"myDivRef"},yht={class:"btnViewFullList"},vht={class:"text"},bht={class:"groupsLeague"},_ht={class:"row-table-carrousel"},xht={key:1,class:"container-no-search-result"},wht={key:0,class:"overlay-loading-top"};function kht(e,o,s,B,U,m){const g=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),y=t.resolveComponent("GSCExpandedInfo"),h=t.resolveComponent("GSCCarousel"),r=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",ght,[t.createElementVNode("div",yht,[t.createElementVNode("div",vht,[t.createElementVNode("div",bht,t.toDisplayString(s.categoryName),1)])]),s.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[m.topData.length>0?(t.openBlock(),t.createBlock(h,{key:0,items:m.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:m.changeCarrousel},{default:t.withCtx(({item:_})=>[t.createElementVNode("div",_ht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(v,x)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[v.top==1?(t.openBlock(),t.createBlock(g,{key:0,onMediadata:o[0]||(o[0]=f=>m.emitEventMedia(f,s.category,s.categoryName)),type:s.typeTable,"type-data":s.typeData,game:s.game,"team-widget":s.teamWidget,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==v.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:s.typeTable==0?{top:"01",photo:v.img,logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+v.teamid+".png",e.$store.getters.getProviderId),name:v.name,player_short:v.name_short,player_id:v.id,categoryId:s.category,total:v.total}:{top:"01",logo:v.img,total:v.total,name_team:v.name,player_id:v.id},"category-name":s.categoryName,buttonMaxWidth:s.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:m.clickexpand,onMore:m.morestats},null,8,["type","type-data","game","team-widget","can-play-videos","is-expanded","data","category-name","buttonMaxWidth","onExpand","onMore"])):(t.openBlock(),t.createBlock(a,{key:1,"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"is-expanded":e.playerexpand==v.id&&e.expand,onMediadata:o[1]||(o[1]=f=>m.emitEventMedia(f,s.category,s.categoryName)),data:s.typeTable==0?{position:v.top,player_name:v.name,player_short:v.name_short,player_photo:v.img,total:v.total,id:v.id,player_age:v.age,team_abrev:v.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+v.teamid+".png",e.$store.getters.getProviderId),player_position:v.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+v.country+".jpg",player_games:v.minutes,player_min:v.games,league_name:"          Liga MX          "}:{position:v.top,team_logo:v.img,team_abrev:v.name,frequency:v.frecuency,promthistournament:v.game_avg,promlasttournament:v.game_avg_last_season,teams_games:"-",category:s.category,total:v.total,id:v.id},height:"71px","can-play-videos":s.canPlayVideos,background:x%2===0?s.backgroundEven:s.backgroundOdd,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==v.id?(t.openBlock(),t.createBlock(y,{key:2,type:s.typeTable,"is-live":s.game.is_live,"view-effectiveness":v.positionId!==1,data:s.typeTable==0?{teams:v.teamname,age:v.age,dataofbirth:v.date,nationality:v.nationality,countryFlag:v.player_country_flag,position:v.position,games:v.games,min:v.minutes,goals:v.total,effectiveness:v.effectiveness,category:s.categoryName,id:v.id}:{position:v.positiontable,goals:v.goals,goals_received:v.goalsrecived,games_played:v.games_played,category:s.categoryName,effectiveness:v.effectiveness,xg:v.xg,total:v.total,attendance:"-",id:v.id},onViewprofile:f=>m.viewprofile(f,v.teamid),background:x%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))])]),_:1},8,["items","onInput"])):(t.openBlock(),t.createElementBlock("div",xht,[e.isloading?(t.openBlock(),t.createElementBlock("div",wht,o[3]||(o[3]=[t.createElementVNode("div",{class:"overlay-loading-top__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1)]))):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o[4]||(o[4]=t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),o[5]||(o[5]=t.createElementVNode("div",{class:"container-no-search-result-subtitle"},[t.createTextVNode(" No existen resultados para este tipo de"),t.createElementVNode("br"),t.createTextVNode(" jugada, considerando el torneo y otros"),t.createElementVNode("br"),t.createTextVNode(" filtros que has seleccionado. ")],-1))],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(r,{background:"#183143",type:s.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.topData,(_,v)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(x,f)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:f},[t.createVNode(a,{"type-data":s.typeData,"team-widget":s.teamWidget,game:s.game,type:s.typeTable,"type-view":s.type,"can-play-videos":s.canPlayVideos,"is-expanded":e.playerexpand==x.id&&e.expand,onMediadata:o[2]||(o[2]=n=>m.emitEventMediaFullTable(n,s.category,s.categoryName)),data:s.typeTable==0?{position:x.top,player_name:x.name,player_short:x.name_short,player_photo:x.img,total:x.total,id:x.id,player_age:x.age,team_abrev:x.team,team_logo:m.getImageUrl("https://golstatsimages.blob.core.windows.net/teams-80/"+x.teamid+".png",e.$store.getters.getProviderId),player_position:x.position,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+x.country+".jpg",player_games:x.games,player_min:x.minutes,league_name:"          Liga MX          "}:{position:x.positiontable,team_logo:x.img,team_abrev:x.name,frequency:x.frecuency,promthistournament:x.game_avg,promlasttournament:x.game_avg_last_season,category:s.category,team_games:x.games_played,total:x.total,id:x.id},height:"71px",background:((v+1)*5+f)%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==x.id?(t.openBlock(),t.createBlock(y,{key:0,type:s.typeTable,"is-live":s.game.is_live,additionalClass:"fullTable","view-effectiveness":x.positionId!==1,data:s.typeTable==0?{teams:x.teamname,age:x.age,dataofbirth:x.date,nationality:x.nationality,countryFlag:x.player_country_flag,position:x.positionfull,positionfull:x.positionfull,games:x.games,min:x.minutes,goals:x.total,effectiveness:x.effectiveness,category:m.getCategoryName(s.category),id:x.id}:{position:x.positiontable,goals:x.goals,goals_received:x.goalsrecived,games_played:x.games_played,category:s.categoryName,effectiveness:x.effectiveness,xg:x.xg,total:x.total,category:m.getCategoryName(s.category),attendance:"-",id:x.id},onViewprofile:n=>m.viewprofile(n,x.teamid),background:f%2===0?s.backgroundEven:s.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const Sht=Ki(nC,[["render",kht],["__scopeId","data-v-b434ba0d"]]),Cht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},Tht={props:{id:Number,textValue:String,icon:String,numFilter:Number,iconVisible:{type:Boolean,default:!0},activeClickLabel:{type:Boolean,default:!1},height:{type:String,default:"35px"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderColor:String,backgroundColor:{type:String,default:"#23303B"},fontSize:{type:String,default:"13px"},fontColor:{type:String,default:"#FFFFFF"},fontFamily:{type:String,default:"Poppins-Regular"},iconSize:{type:String,default:"20px"}},computed:{customStyle(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,cursor:this.cursorType,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}},customIcon(){return{width:this.iconSize}}},methods:{btnLabel(){this.$emit("clickLabel",this.id)},btnClose(){this.$emit("clickClose",this.id)}}},Aht=["src"],Eht=["src"];function Mht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyle),class:"gsc-label",onClick:o[0]||(o[0]=(...g)=>m.btnLabel&&m.btnLabel(...g))},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Aht)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(m.customStyle)},[t.createTextVNode(t.toDisplayString(s.numFilter)+" "+t.toDisplayString(s.textValue)+" ",1),s.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:o[1]||(o[1]=(...g)=>m.btnClose&&m.btnClose(...g)),style:t.normalizeStyle(m.customIcon),class:"icon",src:s.icon},null,12,Eht)):t.createCommentVNode("",!0)],4))])}const Iht=Cht(Tht,[["render",Mht],["__scopeId","data-v-42ff544a"]]);function Pht(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Lht=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},iC={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,o=this.$refs.content.scrollWidth;o>0&&e>0&&(o>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},BV=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},zV=iC.setup;iC.setup=zV?(e,o)=>(BV(),zV(e,o)):BV;const Bht={ref:"gscScrollableContainer",class:"scrollable-container"},zht={class:"scrollable-arrows"},Oht=["width","height","viewBox"],Dht=["stroke"],Nht={class:"scrollable-wrapper"},Fht={class:"scrollable-arrows"},Rht=["width","height","viewBox"],Vht=["stroke"];function jht(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Bht,[s.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",m.hideShowLeftArrow]),onClick:o[0]||(o[0]=(...g)=>m.scrollLeft&&m.scrollLeft(...g))},[t.createElementVNode("div",zht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:s.arrowsColor},null,8,Dht)],8,Oht))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:o[1]||(o[1]=(...g)=>m.getScroll&&m.getScroll(...g))},[t.createElementVNode("div",Nht,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),s.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",m.hideShowRightArrow]),onClick:o[2]||(o[2]=(...g)=>m.scrollRight&&m.scrollRight(...g))},[t.createElementVNode("div",Fht,[(t.openBlock(),t.createElementBlock("svg",{width:s.arrowsWidth,height:s.arrowsHeight,viewBox:m.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:s.arrowsColor},null,8,Vht)],8,Rht))])],2)):t.createCommentVNode("",!0)],512)}const Uht=Lht(iC,[["render",jht],["__scopeId","data-v-b548a08d"]]),Ght=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},oC={components:{GSCSlider:Uht},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=Pht(e);return{myDivRef:e,elementSize:o}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var o={};return e.width>768?o={fontSize:"16px"}:e.width>480?o={fontSize:"14px"}:o={fontSize:"12px"},o}}},OV=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},DV=oC.setup;oC.setup=DV?(e,o)=>(OV(),DV(e,o)):OV;const Hht={ref:"myDivRef"},Zht={key:0,class:"gs-switch-container"},qht=["onClick"],Wht={key:1,class:"gs-switch-container-type"},Jht=["onClick"],Yht={key:2,class:"gs-switch-container-carousel"},Xht=["onClick"];function $ht(e,o,s,B,U,m){const g=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",Hht,[s.type==0?(t.openBlock(),t.createElementBlock("div",Zht,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,qht))),128))],4),t.renderSlot(e.$slots,s.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",Wht,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([m.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:s.backgroundOptionDisable}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,Jht))),128))],4)])):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",Yht,[t.createVNode(g,{arrows:s.arrow,"background-color":s.background,"px-scroll":s.pxScroll,"scroll-color":s.scrollColor,"arrows-position":s.arrowsPosition,arrowsScrollHide:s.arrowsScrollHide,"arrows-background":s.arrowsBackground,"arrows-container-bg-l":s.arrowsContainerBgL,"arrows-container-bg-r":s.arrowsContainerBgR,"arrows-margin":s.arrowsMargin,"arrows-radius":s.arrowsRadius,"arrows-border":s.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.buttons,(a,y)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:s.height},s.selectedOption==a?{borderColor:s.colorOptionActive,color:s.colorFont+"!important",background:s.backgroundOptionActive}:{borderColor:s.colorOptionDisable,color:"grey !important"}]),key:y,onClick:h=>(s.selectedOption=a,m.clickEmitEvent(a))},t.toDisplayString(a),13,Xht))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const sC=Ght(oC,[["render",$ht],["__scopeId","data-v-8a86dfaf"]]),wea="",kea="";function Kht(){return{backgroundColor:"#2e3b46",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",height:"40px",padding:"5px 12px",textFontFamily:"'Poppins-Regular'"}}const Sea="",Qht={comfiltersContainerComparativeG:"_comfiltersContainerComparativeG_w0eea_1",comfiltersContainer1232ComparativeG:"_comfiltersContainer1232ComparativeG_w0eea_1",closeFiltersPcComparativeG:"_closeFiltersPcComparativeG_w0eea_1",comtextleyemdmultipleleaguesComparativeG:"_comtextleyemdmultipleleaguesComparativeG_w0eea_1",comtextleyemdmultipleleagues380ComparativeG:"_comtextleyemdmultipleleagues380ComparativeG_w0eea_1",comfiltersContainer760ComparativeG:"_comfiltersContainer760ComparativeG_w0eea_1",comfiltersContainer460ComparativeG:"_comfiltersContainer460ComparativeG_w0eea_1",comcontainerSectionComparativeG:"_comcontainerSectionComparativeG_w0eea_1",comcontainerSection1232ComparativeG:"_comcontainerSection1232ComparativeG_w0eea_1",comcontainerSection960ComparativeG:"_comcontainerSection960ComparativeG_w0eea_1",comcontainerSection320ComparativeG:"_comcontainerSection320ComparativeG_w0eea_1",comcontainerSection350ComparativeG:"_comcontainerSection350ComparativeG_w0eea_1",comtemplateLosMejores1ComparativeG:"_comtemplateLosMejores1ComparativeG_w0eea_1",comtemplateLosMejores11232ComparativeG:"_comtemplateLosMejores11232ComparativeG_w0eea_1",comtemplateLosMejores1960ComparativeG:"_comtemplateLosMejores1960ComparativeG_w0eea_1",comtemplateLosMejores1420ComparativeG:"_comtemplateLosMejores1420ComparativeG_w0eea_1",comtemplateLosMejores1320ComparativeG:"_comtemplateLosMejores1320ComparativeG_w0eea_1",comtemplateLosMejores1540ComparativeG:"_comtemplateLosMejores1540ComparativeG_w0eea_1",comtemplateLosMejores1350ComparativeG:"_comtemplateLosMejores1350ComparativeG_w0eea_1",comtopFiltersParentComparativeG:"_comtopFiltersParentComparativeG_w0eea_1",comtopFiltersParent1232ComparativeG:"_comtopFiltersParent1232ComparativeG_w0eea_1",comtopFiltersParent960ComparativeG:"_comtopFiltersParent960ComparativeG_w0eea_1",comtopFiltersParent460ComparativeG:"_comtopFiltersParent460ComparativeG_w0eea_1",comtopFiltersParent420ComparativeG:"_comtopFiltersParent420ComparativeG_w0eea_1",comcontainerTheBestComparativeG:"_comcontainerTheBestComparativeG_w0eea_1",comcontainerTheBest1232ComparativeG:"_comcontainerTheBest1232ComparativeG_w0eea_1",comcontainerTheBest960ComparativeG:"_comcontainerTheBest960ComparativeG_w0eea_1",comcontainerTheBest320ComparativeG:"_comcontainerTheBest320ComparativeG_w0eea_1",comtitleSectionComparativeG:"_comtitleSectionComparativeG_w0eea_1",comtitleSection540ComparativeG:"_comtitleSection540ComparativeG_w0eea_1",comcontainerTablesComparativeG:"_comcontainerTablesComparativeG_w0eea_1",comcontainerTables960ComparativeG:"_comcontainerTables960ComparativeG_w0eea_1",comcontainerTables760ComparativeG:"_comcontainerTables760ComparativeG_w0eea_1",comcontainerTables320ComparativeG:"_comcontainerTables320ComparativeG_w0eea_1",comtoniKroosWrapperComparativeG:"_comtoniKroosWrapperComparativeG_w0eea_1",comtoniKroosWrapper1080ComparativeG:"_comtoniKroosWrapper1080ComparativeG_w0eea_1",comtoniKroosWrapper975ComparativeG:"_comtoniKroosWrapper975ComparativeG_w0eea_1",comtoniKroosWrapper760ComparativeG:"_comtoniKroosWrapper760ComparativeG_w0eea_1",comtoniKroosWrapper420ComparativeG:"_comtoniKroosWrapper420ComparativeG_w0eea_1",comtoniKroosWrapper320ComparativeG:"_comtoniKroosWrapper320ComparativeG_w0eea_1",frameChildComparativeG:"_frameChildComparativeG_w0eea_1",filtrosComparativeG:"_filtrosComparativeG_w0eea_1",groupParentComparativeG:"_groupParentComparativeG_w0eea_1",shapeIconComparativeG:"_shapeIconComparativeG_w0eea_1",btnFiltersComparativeG:"_btnFiltersComparativeG_w0eea_1",btnFiltersPCComparativeG:"_btnFiltersPCComparativeG_w0eea_1",comquitarFiltrosComparativeG:"_comquitarFiltrosComparativeG_w0eea_1",comquitarFiltros730ComparativeG:"_comquitarFiltros730ComparativeG_w0eea_1",comquitarFiltros480ComparativeG:"_comquitarFiltros480ComparativeG_w0eea_1",comquitarFiltros380ComparativeG:"_comquitarFiltros380ComparativeG_w0eea_1",btnCloseFiltersComparativeG:"_btnCloseFiltersComparativeG_w0eea_1",commejoresJugadoresComparativeG:"_commejoresJugadoresComparativeG_w0eea_1",commejoresJugadores730ComparativeG:"_commejoresJugadores730ComparativeG_w0eea_1",commejoresJugadores480ComparativeG:"_commejoresJugadores480ComparativeG_w0eea_1",mejoresJugadoresSMComparativeG:"_mejoresJugadoresSMComparativeG_w0eea_1",toniKroosComparativeG:"_toniKroosComparativeG_w0eea_1",teamBarComparativeG:"_teamBarComparativeG_w0eea_1",commenuSectionComparativeG:"_commenuSectionComparativeG_w0eea_1",commenuSection960ComparativeG:"_commenuSection960ComparativeG_w0eea_1",comcontainerMenuComparativeG:"_comcontainerMenuComparativeG_w0eea_1",comcontainerMenu760ComparativeG:"_comcontainerMenu760ComparativeG_w0eea_1",containerFiltersComparativeG:"_containerFiltersComparativeG_w0eea_1",teamBarParentComparativeG:"_teamBarParentComparativeG_w0eea_1",comtopFiltersComparativeG:"_comtopFiltersComparativeG_w0eea_1",comtopFilters1232ComparativeG:"_comtopFilters1232ComparativeG_w0eea_1",comtopFilters420ComparativeG:"_comtopFilters420ComparativeG_w0eea_1",comtopFilters460ComparativeG:"_comtopFilters460ComparativeG_w0eea_1",comlosMejoresComparativeG:"_comlosMejoresComparativeG_w0eea_1",comlosMejores380ComparativeG:"_comlosMejores380ComparativeG_w0eea_1",comlosMejores530ComparativeG:"_comlosMejores530ComparativeG_w0eea_1",comlosMejores730ComparativeG:"_comlosMejores730ComparativeG_w0eea_1",commenuSectionHeaderComparativeG:"_commenuSectionHeaderComparativeG_w0eea_1",commenuSectionHeader1232ComparativeG:"_commenuSectionHeader1232ComparativeG_w0eea_1",commenuSectionHeader960ComparativeG:"_commenuSectionHeader960ComparativeG_w0eea_1",commenuSectionHeader730ComparativeG:"_commenuSectionHeader730ComparativeG_w0eea_1",comdropdownComparativeG:"_comdropdownComparativeG_w0eea_1",comdropdown730ComparativeG:"_comdropdown730ComparativeG_w0eea_1",comdropdown1ComparativeG:"_comdropdown1ComparativeG_w0eea_1",comdropdown1730ComparativeG:"_comdropdown1730ComparativeG_w0eea_1",comdropdownParentComparativeG:"_comdropdownParentComparativeG_w0eea_1",comdropdownParent730ComparativeG:"_comdropdownParent730ComparativeG_w0eea_1",commenuSectionParentHeaderComparativeG:"_commenuSectionParentHeaderComparativeG_w0eea_1",commenuSectionParentHeader1232ComparativeG:"_commenuSectionParentHeader1232ComparativeG_w0eea_1",commenuSectionParentHeader960ComparativeG:"_commenuSectionParentHeader960ComparativeG_w0eea_1",commenuSectionParentHeader730ComparativeG:"_commenuSectionParentHeader730ComparativeG_w0eea_1",commenuSectionParentHeader430ComparativeG:"_commenuSectionParentHeader430ComparativeG_w0eea_1",comdescubreVideosComparativeG:"_comdescubreVideosComparativeG_w0eea_1",comdescubreVideos1232ComparativeG:"_comdescubreVideos1232ComparativeG_w0eea_1",comdescubreVideos960ComparativeG:"_comdescubreVideos960ComparativeG_w0eea_1",allCategoriesComparativeG:"_allCategoriesComparativeG_w0eea_1",containerScountingBtncomComparativeG:"_containerScountingBtncomComparativeG_w0eea_3",btnDeleteAplicacomComparativeG:"_btnDeleteAplicacomComparativeG_w0eea_13",SearchBtnBarcomComparativeG:"_SearchBtnBarcomComparativeG_w0eea_33",btnLeyendTxtcomComparativeG:"_btnLeyendTxtcomComparativeG_w0eea_52",BtnSearchScountingcomComparativeG:"_BtnSearchScountingcomComparativeG_w0eea_61",containerPredefinedcomComparativeG:"_containerPredefinedcomComparativeG_w0eea_85",containerPredefinedScountingcomComparativeG:"_containerPredefinedScountingcomComparativeG_w0eea_92",titleContainerPredefinedcomComparativeG:"_titleContainerPredefinedcomComparativeG_w0eea_100",subtitleContainerPredefinedcomComparativeG:"_subtitleContainerPredefinedcomComparativeG_w0eea_111"},ept=t.ref(Kht()),tpt={components:{GSCTableHeader:cV,GscSwitchComponent:sC,GSCFilterperteam:pdt,GSCFilters:ZR,GSCExpandedInfo:TV,GSCLabel:Iht,GSCSeasonSelect:VA,GSCTopCategory:Sht,GSCTournamentSelect:NA,GSCRowTable:mV},computed:{..._ut.computed,filterChangePredefined(){return this.filtersPredefinedF},filterChange(){const e={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.fVnationalities,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},o=JSON.stringify(e);if(JSON.stringify(this.filters)!=o)return o},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...ept.value}}},props:{timeLiveComparativeAvanced:{type:Number,default:6e4},currentSeasonId:{type:Number,default:0},typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamId:{type:Number,default:0},gameId:{type:Number,default:0},isWidget:{type:Boolean,default:!1},seasonSelected:{type:Object,default:()=>({})},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({})},teamselect:{type:Number,default:0},seasonActive:{type:Number,default:0},defaultSection:{type:String,default:"Jugadores"},backgroundOdd:{type:String,default:"#172531"},backgroundEven:{type:String,default:"#0d1d29"},tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},isFemaleMode:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let o=0;o<e.teams.length;o++)this.teams.push({id:e.teams[o].team_id,team:e.teams[o].colloquial_name,logo:e.teams[o].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:o}=Hb(e);return{myDivRefTopsFull:e,elementSize:o}},data(){return{elegibilidadArray:[],updateFilterTeamsScouting:0,modifidFiltersFlag:!1,showfiltersPc:!1,positions:[{name:"Portero",fullname:"POR"},{name:"Defensa central",fullname:"DFC"},{name:"Lateral por izquierda",fullname:"LI"},{name:"Lateral por derecha",fullname:"LD"},{name:"Volante por izquierda",fullname:"VI"},{name:"Volante por derecha",fullname:"VD"},{name:"Volante defensivo",fullname:"VDF"},{name:"Volante ofensivo",fullname:"VO"},{name:"Delantero",fullname:"DEL"},{name:"Desconocida",fullname:"Desc"}],universeData:{minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(e,o)=>o+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],productivityTranslationMap:null,filterScounting:{tournaments:[1],seasonId:0,categories:[{key:"goals",name:"Goles",ids:[12]},{key:"assists",name:"Asistencias",ids:[10]},{key:"goal_participations",name:"Participaciones en gol",ids:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",ids:[91,95,92,93,96,97]}],range_age:[10,40],age_or_year:1,year:1989,nationalities:[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239],elegibles:[],minutes_played:211,minutes_played_avg:40,last_months:12,type_stats:1,positions:[1,2,3,4,5,6,7,8,9,10],fouls:!1,yellow_cards:!1,red_cards:!1},expand:!1,playerexpand:0,arrayFiltersPlays:[],filtersPredefinedF:{},categoryPredefinedActive:!1,categoryPredefined:0,typeTable:0,keyUpdateFilter:0,loadingActive:!1,isTeam:!1,arrayPredefinedFilters:[],arrayCategoryFilter:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],arrayCategoryFilterFull:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],FVsetAvailableNationalTeamsPlayersIds:new Set,showOnlyCategories:!1,showFullCategory:0,categoryName:"",showFullTable:!1,expansionPanelModePropsTypePlays:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",width:"400px",maxWidth:"400px"},expansionPanelProps:{width:"400px",borderRadius:"8px"},fieldComponentProps:{widthContainer:"400px"}},expansionPanelModeProps:{isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"'Poppins-Regular'"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},expansionPanelModePropsMobil:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"300px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},expansionPanelModePropsMobil270:{isExpansionPanel:!0,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)",padding:"20px 0"},expansionPanelProps:{width:"270px",borderRadius:"8px",height:"45px",fontColor:"rgba(255,255,255, 0.7)",textFontSize:"14px",textFontFamily:"'Poppins-Regular'",padding:"0px 10px"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"12px",widthField:268,widthFieldGrid:"268px",heightField:180,heightFieldGrid:"180px",heightContainer:"280px"}},filters:{zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set},detaildProductivityCategories:{offensive:{title:"Ofensivo",categories:[{key:"goals",name:"Goles",isSelected:!1,id:[12]},{key:"assists",name:"Asistencias",isSelected:!1,id:[10]},{key:"goal_participations",name:"Participaciones en gol",isSelected:!1,id:[27]},{key:"headers_rival_area",name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{key:"shots_total",name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{key:"shots_on_target",name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{key:"shots_outside_box",name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{key:"shots_outside_box_on_target",name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{key:"shots_inside_box",name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{key:"shots_inside_box_on_target",name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{key:"crosses_left",name:"Centros por izquierda",isSelected:!1,id:[13]},{key:"crosses_left_success",name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{key:"crosses_right",name:"Centros por derecha",isSelected:!1,id:[25]},{key:"crosses_right_success",name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{key:"dribbles_success",name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{key:"dribbles_to_goal",name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{key:"balls_won_own_area",name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{key:"headers_own_area",name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{key:"tackles_won",name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{key:"clearances",name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{key:"recoveries_total",name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{key:"recoveries_q1",name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{key:"recoveries_q2",name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{key:"recoveries_q3",name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{key:"recoveries_q4",name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{key:"passes_success",name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{key:"passes_success_q1",name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{key:"passes_success_q2",name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{key:"passes_success_q3",name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{key:"passes_success_q4",name:"Pases acertados en 4/4 de cancha",isSelected:!1,id:[216]}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},detailsObject:{playingAs:[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}],gameSections:[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},nameLeagueSelected:"",categoriesPlaysTypes:{offensive:{title:"Ofensivo",categories:[{name:"Goles",isSelected:!0,id:1},{name:"Tiros a gol",isSelected:!0,id:6},{name:"Tiros a gol con destino a portería",isSelected:!0,id:7},{name:"Asistencias",isSelected:!0,id:4},{name:"Centros",isSelected:!0,id:10},{name:"Centros acertados",isSelected:!0,id:11},{name:"Participaciones en gol",isSelected:!0,id:5},{name:"1vs1 exitosos ofensivos",isSelected:!0,id:12},{name:"1vs1 exitosos ofensivos que terminan en gol",isSelected:!0,id:13},{name:"Balones ganados en área rival",isSelected:!0,id:17},{name:"Cabeceos en área rival",isSelected:!0,id:8},{name:"Tiros de esquina",isSelected:!0,id:23}]},defensive:{title:"Defensivo",categories:[{name:"1vs1 defensivos exitosos",isSelected:!0,id:14},{name:"Cabeceo en área propia",isSelected:!0,id:9},{name:"Balones ganados en área propia",isSelected:!0,id:16},{name:"Rechaces",isSelected:!0,id:15},{name:"Atajadas",isSelected:!0,id:22}]},possession:{title:"Posesión",categories:[{name:"Pases acertados",isSelected:!0,id:2},{name:"Balones recuperados en disputa",isSelected:!0,id:3}]},offenses:{title:"Infracciones",categories:[{name:"Faltas cometidas",isSelected:!0,id:18},{name:"Faltas recibidas",isSelected:!0,id:19},{name:"Tarjetas amarillas",isSelected:!0,id:20},{name:"Tarjetas rojas",isSelected:!0,id:21}]},offensesConditions:{areYellowCardSelected:!1,areRedCardSelected:!1,areFoulsCommittedSelected:!1}},categoriesDefault:[{id:1,name:"Goles",isSelected:!1},{id:2,name:"Pases acertados",isSelected:!1},{id:23,name:"Tiros de Esquina",isSelected:!1},{id:3,name:"Balones recuperados en disputa",isSelected:!1},{id:4,name:"Asistencias",isSelected:!1},{id:5,name:"Participaciones en gol",isSelected:!1},{id:6,name:"Tiros a gol",isSelected:!1},{id:7,name:"Tiros a gol que llegaron a la portería",isSelected:!1},{id:8,name:"Cabeceos en área rival",isSelected:!1},{id:9,name:"Cabeceos en área propia",isSelected:!1},{id:10,name:"Centros",isSelected:!1},{id:11,name:"Centros acertados",isSelected:!1},{id:12,name:"1vs1 exitosos ofensivos",isSelected:!1},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol",isSelected:!1},{id:14,name:"1vs1 defensivos exitoso",isSelected:!1},{id:15,name:"Rechaces",isSelected:!1},{id:16,name:"Balones ganados en área propia",isSelected:!1},{id:17,name:"Balones ganados en área rival",isSelected:!1},{id:18,name:"Faltas cometidas",isSelected:!1},{id:19,name:"Faltas recibidas",isSelected:!1},{id:20,name:"Tarjetas amarillas",isSelected:!1},{id:21,name:"Tarjetas rojas",isSelected:!1},{id:22,name:"Atajadas",isSelected:!1}],seasonsFilterSelected:0,tournamentsToFilter:[{name:"Liga MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/liga_mx.png",isSelected:!0,id:1,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}]},{name:"Liga MX Femenil",logo:"https://golstatsimages.blob.core.windows.net/tournaments/femenil_mx.png",isSelected:!0,id:1001,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}]},{name:"Liga Expansion MX",logo:"https://golstatsimages.blob.core.windows.net/tournaments/expansion_mx.png",isSelected:!0,id:1071,show_logos:1,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}]},{name:"Sub-23",logo:null,isSelected:!0,id:1143,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1785,type:0}]},{name:"Sub-18",logo:null,isSelected:!0,id:1096,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}]},{name:"Sub-16",logo:null,isSelected:!0,id:1095,show_logos:0,tournament_type:0,tournament_status:0,seasons:[{name:"Apertura 2023",related_seasons:[],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}]}],isCup:!1,arrayPredefinedOrigin:[],indexPredefinedFiltersSelected:0,predefinedFiltersMatchLapse:[],predefinedFiltersPlayingAs:[],predefinedFiltersSections:[],updateTables:0,updateTablesfull:0,optionSelected:"Jugadores",optionSelectedSubmenu:"Todas las jugadas",tournamentsUrl:"https://17zyhpyc7c.execute-api.us-west-2.amazonaws.com/prod/tournaments",teamsUrl:"https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/",urlFilter:"https://cqqxaonvm6.execute-api.us-east-2.amazonaws.com/prod/gs2/tops/filters?categories=",retries:3,teams:[],updateFilterGolstats:0,updateFilterPlaytypesGolstats:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],updateFilterTeamsScouting:0,filtersTypes:Xr,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",fVnationalities:new Set,fVzone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],fVplayingAs:[1,2],fVsections:[1,2,3,4,5,6],fVmatchResult:[1,2,3],fVarrayAgeRange:[10,40],FVeligible:[],FVYear:1900,keyTournamentValue:0,fVtypeZone:2,fVsetPositionsIds:[1,2,3,4,5,6,7,8,9],currentIndex:-1,delay:800,teamselectrec:0,tournamentSelected:0,tournamentSelectedObj:{},FVfilterGolstats:[],updateFilterField:0,rowScoutingData:[],openMenuMobil:!1,selectedTournament:{seasons:[]},selectedSeasonObj:{}}},methods:{getnameshort(e){if(!e)return"";var o=e.split(",");if(o[1]===void 0){var s=e.trim().split(/\s+/).filter(Boolean);return s.length>1?s[0].charAt(0)+". "+s[s.length-1]:e.trim()}var B=o[0].split(" "),U=o[1].trim().split(" "),m="";B.length==2||B.length==1?B[0].length<4?m=B[0]+" "+B[1]:m=B[0]:B.length==3?m=B[0]+" "+B[1]:B.length==4&&(m=B[1]+" "+B[2]+" "+B[3]);var g=U[U.length-1]!=""?U[U.length-1].charAt(0):U[U.length-2]?U[U.length-2].charAt(0):"";return m=m.replace(",",""),g+". "+m},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const o=e.id===this.selectedTournament.id;e.isSelected=o,e.isDefaultTournament=o})},async onClickDeleteFilter(){if(this.optionSelectedSubmenu=="Predeterminados")this.resetPredefinedTeamAll();else{this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;this.setUpTournamentsToFilter();const o=this.$refs.personalDataFilter;o.clearFilters(ju.All),o.clearFilters(ju.AGE_RANGE),o.clearFilters(ju.YEAR),o.clearFilters(ju.NATIONALITY),o.clearFilters(ju.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;var e=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(e,1);const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200)}},clickOpenFilters(){this.showfiltersPc=!0},clickCloseFilters(){this.showfiltersPc=!1},async selectedSeason(e){this.seasonActive!==e.id&&(this.seasonActive=e.id,this.resetPredefinedTeamAll(),this.$emit("change-season-id",e.id))},changeTournament(e){e.id!==this.selectedTournament.id&&(this.selectedTournament=e,this.tournamentSelectedObj={propName:"id",value:e.id},this.teamselect=0,this.resetPredefinedTeamAll(),this.setUpTournamentsToFilter())},changeTournamentMovil(e){this.tournamentSelectedObj={propName:"id",value:e.id},this.seasonBytournament=e.seasons,this.teamselect=0},selectedSeasonMovil(e){this.seasonActive=e.id},setRelevantCategoriesPlayer(e){return e===1?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]},setOpenMedia(e){this.$emit("openmedia",e)},setMediaData(e){let U=[e.id],m=e.team_id;const g={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:U,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:m||0,matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};this.$emit("openmedia",g)},clickprofile(e){e.isTeam?this.$emit("openProfileTeam",{teamId:e.id,seasonId:this.seasonActive}):this.$emit("openProfilePlayer",{playerId:e.id,teamId:e.teamId,seasonId:this.seasonActive})},viewprofile(e,o,s){this.$emit("openProfilePlayer",{playerId:e,teamId:s,seasonId:o||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async loadTopsCategories(){try{const e=this.$store.getters.getProviderId,o=this.$store.getters.getIsDevApis,s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(this.urlFilter,e,o));if(Array.isArray(B)&&B.length){const U=B.filter(m=>m&&m.id!=null&&m.category_name).map(m=>({id:m.id,name:m.category_name,isSelected:!1}));U.length&&(this.categoriesDefault=U,this.arrayCategoryFilter=U.map(m=>m.id),this.arrayCategoryFilterFull=U.map(m=>m.id))}}catch{}},async loadProductivityTranslation(){const e=this.$store.getters.getProviderId;if(!e||e===1)return;const o=await Hne(e);o&&typeof o=="object"&&(this.productivityTranslationMap=o,this.applyProductivityTranslation(o))},applyProductivityTranslation(e){const o=["offensive","defensive","possession"];for(const s of o){const B=this.detaildProductivityCategories[s];B&&Array.isArray(B.categories)&&(B.categories=B.categories.filter(U=>Array.isArray(e[U.key])).map(U=>({...U,id:e[U.key]})))}this.filterScounting.categories=this.filterScounting.categories.filter(s=>Array.isArray(e[s.key])).map(s=>({...s,ids:e[s.key]}))},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=pu.create({headers:{Authorization:`${this.token}`}}),{data:o}=await e.post(uu("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.$store.getters.getProviderId,this.$store.getters.getIsDevApis),this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersTournaments");s!==-1?this.arrayFiltersPlays[s].name=this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX":this.arrayFiltersPlays.push({name:this.filterScounting.tournaments.length>1?"Ligas "+this.filterScounting.tournaments.length:this.nameLeagueSelected!=""?this.nameLeagueSelected:"Liga MX",type:"onFiltersTournaments"})}this.rowScoutingData=[];for(let U=0;U<o.length;U++){o[U];let g=o[U].dob.split("T")[0].split("-");var B={position:U+1,player_name:this.abrevName(o[U].name),player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/"+o[U].player_id+".png",total:o[U].total.toFixed(0),id:o[U].player_id,player_age:this.calcularEdad(o[U].dob),team_abrev:o[U].teams[0].acronym,team_name:o[U].teams[0].team_name,team_logo:If("https://golstatsimages.blob.core.windows.net/teams-80/"+o[U].teams[0].team_id+".png",this.$store.getters.getProviderId),player_position:o[U].position_id,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+o[U].nationality_id+".jpg",date:g[2]+"."+g[1]+"."+g[0].substring(2,4),team_id:o[U].team_id,nationality_name:IV[o[U].nationality_id],player_games:o[U].games_played,player_min:o[U].minutes_played,league_name:o[U].tournament_name,seasons:o[U].seasons,season_id:o[U].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const U=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let m=0;m<U.teams.length;m++)this.teamsscouting.push({id:U.teams[m].team_id,team:U.teams[m].colloquial_name,logo:U.teams[m].logo})}this.loadingActive=!1},abrevName(e){var o=e.split(","),s=o[0].split(" "),B=o[1].trim().split(" "),U="";s.length==2||s.length==1?s[0].length<4?U=s[0]+" "+s[1]:U=s[0]:s.length==3?U=s[0]+" "+s[1]:s.length==4&&(U=s[1]+" "+s[2]+" "+s[3]);var m=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";U=U.replace(",","");var g=m+". "+U;return g},calcularEdad(e){var o=new Date(e),s=new Date,B=s-o,U=Math.floor(B/(1e3*60*60*24*365.25));return U},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.length;s++)e[s].isSelected&&o.push(e[s].id);if(o.length==0&&(o=[1]),o.length==1)for(let s=0;s<e.length;s++)e[s].isSelected&&(this.nameLeagueSelected=e[s].name,this.seasonsFilterSelected=e[s].seasons[0].id);else this.seasonsFilterSelected=0,o.length>0&&(this.nameLeagueSelected=o.length+" Ligas");this.filterScounting.tournaments=o,this.filterScounting.seasonId=e[0].seasons[0].id},onFiltersPersonalData(e){if(this.modifidFiltersFlag=!0,e.hasOwnProperty("ageByRange")){const B=e.ageByRange.min==0?10:e.ageByRange.min,U=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,U],this.filterScounting.age_or_year=1}else this.filterScounting.range_age=[];e.hasOwnProperty("year")?(this.filterScounting.year=e.year,this.filterScounting.age_or_year=0):this.filterScounting.year=0;var o=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&o.push(e.nationalities[B].id);o.length==0&&(o=[3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,221,84,85,86,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,236,237,239])}this.filterScounting.elegibles=[],e.hasOwnProperty("eligibility")&&(this.filterScounting.elegibles=[e.eligibility[0].id]);var s=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&s.push(e.positions[B].id);s.length==0&&(s=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=s,this.filterScounting.nationalities=o},onFiltersUniverse(e){this.modifidFiltersFlag=!0,this.filterScounting.minutes_played=Number(e.minutesPlayed),this.filterScounting.last_months=Number(e.lastMonths),this.filterScounting.minutes_played_avg=Number(e.percentMinutesPlayed),this.filterScounting.type_stats=e.statistics.averagePerGame?3:e.statistics.averagePerMinute?2:1},onFiltersProductivity(e){this.modifidFiltersFlag=!0;var o=[];for(let s=0;s<e.productivityFilters.length;s++)o[e.productivityFilters[s].priority-1]={name:e.productivityFilters[s].name,ids:e.productivityFilters[s].id};o.length==0&&(o=[]),this.filterScounting.categories=o,this.filterScounting.fouls=e.offensesConditions.areFoulsCommittedSelected,this.filterScounting.yellow_cards=e.offensesConditions.areYellowCardsSelected,this.filterScounting.red_cards=e.offensesConditions.areRedCardsSelected},onFiltersGolStats(e){if(e.length>0){var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");o!==-1?this.arrayFiltersPlays[o].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){this.filtersPredefinedF=this.filters;for(let U=0;U<this.FVfilterGolstats.length;U++)this.FVfilterGolstats[U].isSelected=!1;var s=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}},shouldRender(e){return e<=this.currentIndex},renderNext(){this.currentIndex++,this.currentIndex<this.categoriesDefault.length&&setTimeout(()=>{this.$nextTick(()=>{this.renderNext()})},this.delay)},async onFiltersPlaysTypes(e){if(e.length>0){this.categoryPredefinedActive=!0,this.loadingActive=!0,this.categoryPredefined=e[0].id;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&o!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(o,1);var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(s!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}this.updateTables+=1,setTimeout(()=>{this.loadingActive=!1},1e3),await this.getPredefinedfilters(e[0]),this.FVfilterGolstats.length>0&&(this.onFiltersGolStats([this.FVfilterGolstats[0]]),this.FVfilterGolstats[0].isSelected=!0)}else{var o=this.arrayFiltersPlays.findIndex(U=>U.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&o!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(o,1);for(let m=0;m<this.categoriesDefault.length;m++)this.categoriesDefault[m].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var s=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&s!==-1){for(let m=0;m<this.FVfilterGolstats.length;m++)this.FVfilterGolstats[m].isSelected=!1;s!==-1&&this.arrayFiltersPlays.splice(s,1),this.updateFilterGolstats+=1}}}},deleteCategoryFilter(){this.categoryName="",this.showFullCategory=0,this.showFullTable=!1,delete this.filters.aux},onShowFullTable(e){this.categoryName=e.categoryName,this.showFullCategory=e.category,this.showFullTable=!0,this.loadingActive=!0,setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,aux:this.getRandomNumber(1,1e4),booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.loadingActive=!1},1e3)},getRandomNumber(e,o){return Math.floor(Math.random()*(o-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let s=0;s<this.categoriesPlaysTypes.offensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.defensive.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.possession.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s]);for(let s=0;s<this.categoriesPlaysTypes.offenses.categories.length;s++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[s].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[s])}else for(let s=0;s<e.playsCategories.length;s++)e.playsCategories[s].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[s].id),this.arrayCategoryFilterFull.push(e.playsCategories[s]));var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):o!=-1?this.arrayFiltersPlays[o].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):o!==-1&&this.arrayFiltersPlays.splice(o,1)},async deleteLabelFilter(e){var o=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(o!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let U=0;U<this.detaildProductivityCategories.offensive.categories.length;U++)this.detaildProductivityCategories.offensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.defensive.categories.length;U++)this.detaildProductivityCategories.defensive.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.possession.categories.length;U++)this.detaildProductivityCategories.possession.categories[U].isSelected=!1;for(let U=0;U<this.detaildProductivityCategories.offensesConditions.length;U++)this.detaildProductivityCategories.offensesConditions[U]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(U,m)=>m+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!0;const B=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let U=0;U<B.teams.length;U++)this.teamsscouting.push({id:B.teams[U].team_id,team:B.teams[U].colloquial_name,logo:B.teams[U].logo});this.keyTournamentValue+=1,setTimeout(()=>{this.modifidFiltersFlag=!1},200)}if(e=="onFiltersPlays"){for(let B=0;B<this.categoriesPlaysTypes.offensive.categories.length;B++)this.categoriesPlaysTypes.offensive.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.defensive.categories.length;B++)this.categoriesPlaysTypes.defensive.categories[B].isSelected=!0,this.arrayCategoryFilter.push(),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[B]);for(let B=0;B<this.categoriesPlaysTypes.possession.categories.length;B++)this.categoriesPlaysTypes.possession.categories[B].isSelected=!0;for(let B=0;B<this.categoriesPlaysTypes.offenses.categories.length;B++)this.categoriesPlaysTypes.offenses.categories[B].isSelected=!0}if(e=="onFiltersField"&&(this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersPredefined"){this.filtersPredefinedF=this.filters;for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;this.updateFilterGolstats+=1,this.resetPredefinedTeamAll()}if(e=="onFiltersPredefinedCategory"){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters;var s=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");s!==-1&&this.arrayFiltersPlays.splice(s,1);for(let B=0;B<this.categoriesDefault.length;B++)this.categoriesDefault[B].isSelected=!1;this.updateFilterPlaytypesGolstats+=1}e=="onFiltersDetailsTime"&&(this.detailsObject.gameSections[0].isSelected=!0,this.detailsObject.gameSections[1].isSelected=!0,this.detailsObject.gameSections[2].isSelected=!0,this.detailsObject.gameSections[3].isSelected=!0,this.detailsObject.gameSections[4].isSelected=!0,this.detailsObject.gameSections[5].isSelected=!0,this.fVsections=[1,2,3,4,5,6],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersDetailsPlayingAs"&&(this.detailsObject.playingAs[0].isSelected=!0,this.detailsObject.playingAs[1].isSelected=!0,this.fVplayingAs=[1,2],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}),e=="onFiltersNationality"&&(this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.NATIONALITY)),e=="onFiltersPosition"&&(this.fVsetPositionsIds=[1,2,3,4,5,6,7,8,9],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.POSITION)),e=="onFiltersAge"&&(this.fVarrayAgeRange=[10,40],this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},this.$refs.personalDataFilterPlayers.clearFilters(ju.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(ju.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(ju.YEAR),this.FVYear=1900,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds})}this.arrayFiltersPlays.splice(o,1)},onFiltersField(e){e.length==0?this.fVzone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]:this.fVzone=e;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");o!=-1?this.arrayFiltersPlays[o].name=this.fVzone.length+" zonas del campo":this.arrayFiltersPlays.push({name:this.fVzone.length+" zonas del campo",type:"onFiltersField"}),[1,23,3,4,5,7,6,9,8,11,10,12,13,15,14,17,16,22].includes(this.category)?this.fVtypeZone=1:this.fVtypeZone=2,this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds},e.length!=16?(this.fVzone.length==4&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&(o!=-1?this.arrayFiltersPlays[o].name="1/4 de cancha":this.arrayFiltersPlays.push({name:"1/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="2/4 de cancha":this.arrayFiltersPlays.push({name:"2/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&(o!=-1?this.arrayFiltersPlays[o].name="3/4 de cancha":this.arrayFiltersPlays.push({name:"3/4 de cancha",type:"onFiltersField"})),this.fVzone.length==4&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="4/4 de cancha":this.arrayFiltersPlays.push({name:"4/4 de cancha",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(1)&&this.fVzone.includes(2)&&this.fVzone.includes(3)&&this.fVzone.includes(4)&&this.fVzone.includes(5)&&this.fVzone.includes(6)&&this.fVzone.includes(7)&&this.fVzone.includes(8)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha propia":this.arrayFiltersPlays.push({name:"cancha propia",type:"onFiltersField"})),this.fVzone.length==8&&this.fVzone.includes(9)&&this.fVzone.includes(10)&&this.fVzone.includes(11)&&this.fVzone.includes(12)&&this.fVzone.includes(13)&&this.fVzone.includes(14)&&this.fVzone.includes(15)&&this.fVzone.includes(16)&&(o!=-1?this.arrayFiltersPlays[o].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(o,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(o=>o.type==="onFiltersDetailsPlayingAs");e!=-1?this.fVplayingAs.length==1?this.arrayFiltersPlays[e].name=this.fVplayingAs.includes(1)?"Local":"Visitante":this.arrayFiltersPlays.splice(e,1):this.fVplayingAs.length==1&&this.arrayFiltersPlays.push({name:this.fVplayingAs.includes(1)?"Local":"Visitante",type:"onFiltersDetailsPlayingAs"})},onFiltersDetails(e){var o=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var s=[];for(let m=0;m<e.playingAs.length;m++)if(e.playingAs[m].isSelected){const g=e.playingAs[m].name=="Local"?1:2;o.push(g)}for(let m=0;m<e.gameSections.length;m++)e.gameSections[m].isSelected&&s.push(e.gameSections[m].value);this.fVsections=s,this.fVplayingAs=o;var B=this.arrayFiltersPlays.findIndex(m=>m.type==="onFiltersDetailsTime"),U="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(U+=", 0-15"),this.fVsections.includes(2)&&(U+=", 15-30"),this.fVsections.includes(3)&&(U+=", 30-45"),this.fVsections.includes(4)&&(U+=", 45-60"),this.fVsections.includes(5)&&(U+=", 60-75"),this.fVsections.includes(6)&&(U+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=U:this.arrayFiltersPlays.push({name:U,type:"onFiltersDetailsTime"}),this.fVsections.length==3&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="Primer tiempo":this.arrayFiltersPlays.push({name:"Primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==3&&this.fVsections.includes(4)&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="Segundo tiempo":this.arrayFiltersPlays.push({name:"Segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(1)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(3)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del primer tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del primer tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(4)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los primeros 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==1&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 15 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 15 minutos del segundo tiempo",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(1)&&this.fVsections.includes(2)&&(B!=-1?this.arrayFiltersPlays[B].name="los primeros 30 minutos del partido":this.arrayFiltersPlays.push({name:"los primeros 30 minutos del partido",type:"onFiltersDetailsTime"})),this.fVsections.length==2&&this.fVsections.includes(5)&&this.fVsections.includes(6)&&(B!=-1?this.arrayFiltersPlays[B].name="los últimos 30 minutos del segundo tiempo":this.arrayFiltersPlays.push({name:"los últimos 30 minutos del segundo tiempo",type:"onFiltersDetailsTime"}))):B!=-1&&this.arrayFiltersPlays.splice(B,1),this.addFilterPlayingAS(),this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},async resetScouting(){this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,U)=>U+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(ju.All),e.clearFilters(ju.AGE_RANGE),e.clearFilters(ju.YEAR),e.clearFilters(ju.NATIONALITY),e.clearFilters(ju.POSITION),this.rowScoutingData=[];for(let B=0;B<this.detaildProductivityCategories.offensive.categories.length;B++)this.detaildProductivityCategories.offensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.defensive.categories.length;B++)this.detaildProductivityCategories.defensive.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.possession.categories.length;B++)this.detaildProductivityCategories.possession.categories[B].isSelected=!1;for(let B=0;B<this.detaildProductivityCategories.offensesConditions.length;B++)this.detaildProductivityCategories.offensesConditions[B]=!1;var o=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(o,1),this.setUpTournamentsToFilter();const s=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<s.teams.length;B++)this.teamsscouting.push({id:s.teams[B].team_id,team:s.teams[B].colloquial_name,logo:s.teams[B].logo})},onFiltersData(e){var o=0,s=0;e.ageByRange&&(e.ageByRange.min==0?o=1:o=e.ageByRange.min,e.ageByRange.max==0?s=40:s=e.ageByRange.max,this.fVarrayAgeRange=[o,s]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",U="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let v=0;v<e.nationalities.length;v++)e.nationalities[v].isSelected&&this.fVnationalities.add(e.nationalities[v].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let v=0;v<this.elegibilidadArray.length;v++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[v])}for(let v=0;v<e.positions.length;v++)e.positions[v].isSelected&&this.fVsetPositionsIds.push(e.positions[v].id);if(e.hasOwnProperty("nationalities"))var m=e.nationalities.filter(v=>v.isSelected===!0);var g=e.positions.filter(v=>v.isSelected===!0);if(g.length==1&&(B=g[0].name),e.hasOwnProperty("nationalities")&&m.length==1&&(U=m[0].name),setTimeout(()=>{this.filters={zone:this.fVzone,playingAs:this.fVplayingAs,sections:this.fVsections,matchResult:this.fVmatchResult,arrayAgeRange:this.fVarrayAgeRange,typeZone:this.fVtypeZone,elegible:this.FVeligible,setNationalitiesIds:this.fVnationalities,setPositionsIds:this.fVsetPositionsIds,setYear:this.FVYear,booleanAreNationalTeamsVisible:this.FVbooleanAreNationalTeamsVisible,setAvailableNationalTeamsPlayersIds:this.FVsetAvailableNationalTeamsPlayersIds}},1e3),this.FVbooleanAreNationalTeamsVisible){var a=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var y=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersPosition");y!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[y].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(y,1):this.arrayFiltersPlays.push({name:this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B,type:"onFiltersPosition"})}if(this.FVYear!=0&&this.FVYear!=1900&&this.FVYear){var h=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersYear");h!=-1?this.arrayFiltersPlays[h].name=this.FVYear:this.arrayFiltersPlays.push({name:this.FVYear,type:"onFiltersYear"})}if(this.fVarrayAgeRange[0]>=e.ageLimits.min&&this.fVarrayAgeRange[1]<=e.ageLimits.max)if(this.fVarrayAgeRange[0]>e.ageLimits.min||this.fVarrayAgeRange[1]<e.ageLimits.max){var r=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersAge");r!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[r].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(r,1):this.arrayFiltersPlays.push({name:this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años",type:"onFiltersAge"})}else{var r=this.arrayFiltersPlays.findIndex(x=>x.type==="onFiltersAge");r!=-1&&this.arrayFiltersPlays.splice(r,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var _=this.arrayFiltersPlays.findIndex(v=>v.type==="onFiltersNationality");_!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[_].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U:this.arrayFiltersPlays.splice(_,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+U,type:"onFiltersNationality"})}},clickAll(e){},clickAllAll(e){},clickTeam(e){},clickTeamScouting(e){},resetFilterTeamAndPlayers(){this.filters={zone:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],playingAs:[1,2],sections:[1,2,3,4,5,6],matchResult:[1,2,3],arrayAgeRange:[1,60],typeZone:1,setNationalitiesIds:this.setNationalitiesIds,setPositionsIds:[1,2,3,4,5,6,7,8,9],setYear:this.FVYear,booleanAreNationalTeamsVisible:!1,setAvailableNationalTeamsPlayersIds:new Set}},async changeTabsGeneral(e){if(this.resetPredefinedTeamAll(),this.showfiltersPc=!0,this.optionSelected=e,this.optionSelectedSubmenu="Todas las jugadas",this.filtersPredefinedF={},this.categoryPredefinedActive=!1,this.categoryPredefined=0,e=="Equipos"&&(this.typeTable=1,this.isTeam=!0,this.updateTables+=1,this.rowScoutingData=[],this.arrayFiltersPlays=[],this.teamselect=0,this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Jugadores"&&(this.typeTable=0,this.isTeam=!1,this.teamselect=0,this.updateTables+=1,this.rowScoutingData=[],this.resetFilterTeamAndPlayers(),this.resetScouting()),e=="Scouting"){this.rowScoutingData=[],this.teamselect=0,this.arrayFiltersPlays=[];const o=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let s=0;s<o.teams.length;s++)this.teamsscouting.push({id:o.teams[s].team_id,team:o.teams[s].colloquial_name,logo:o.teams[s].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&e!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(e,1);for(let s=0;s<this.categoriesDefault.length;s++)this.categoriesDefault[s].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var o=this.arrayFiltersPlays.findIndex(s=>s.type==="onFiltersPredefined");if(o!==-1){for(let s=0;s<this.FVfilterGolstats.length;s++)this.FVfilterGolstats[s].isSelected=!1;o!==-1&&this.arrayFiltersPlays.splice(o,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.tournamentsUrl,o,s));return B},async fetchTeams(){const e=pu.create({headers:{Authorization:`${this.token}`}}),o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,{data:B}=await e.get(uu(this.teamsUrl+this.seasonActive,o,s));return B},async fetchTeamsScouting(e){const o=pu.create({headers:{Authorization:`${this.token}`}}),s=this.$store.getters.getProviderId,B=this.$store.getters.getIsDevApis,{data:U}=await o.get(uu(this.teamsUrl+e,s,B));return U},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var o="";e.id==1?o=this.urlFilter:o=this.urlFilter;const s=pu.create({headers:{Authorization:`${this.token}`}}),{data:B}=await s.get(uu(o+e.id,this.$store.getters.getProviderId,this.$store.getters.getIsDevApis));if(Object.keys(B[0].match_lapse_combinations).forEach(_=>{this.predefinedFiltersMatchLapse[_.toString()]=B[0].match_lapse_combinations[_]}),Object.keys(B[0].playing_as_combinations).forEach(_=>{this.predefinedFiltersPlayingAs[_.toString()]=B[0].playing_as_combinations[_]}),Object.keys(B[0].field_sections_combinations).forEach(_=>{this.predefinedFiltersSections[_.toString()]=B[0].field_sections_combinations[_]}),B[0]){for(let _=0;_<B[0].filter_records.length;_++){var U=B[0].description;if(B[0].filter_records[_].field_sections!==void 0){const x=B[0].filter_records[_].field_sections.toString();(this.predefinedFiltersSections[x]||this.predefinedFiltersSections[x]=="")&&(this.predefinedFiltersSections[x]==""?U=U.replace(" [en {field_sections}]",this.predefinedFiltersSections[x]):U=U.replace("{field_sections}",this.predefinedFiltersSections[x]))}if(B[0].filter_records[_].match_lapse!==void 0){const x=B[0].filter_records[_].match_lapse.toString();(this.predefinedFiltersMatchLapse[x]||this.predefinedFiltersMatchLapse[x]=="")&&(this.predefinedFiltersMatchLapse[x]==""?U=U.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[x]):U=U.replace("{match_lapse}",this.predefinedFiltersMatchLapse[x]))}if(B[0].filter_records[_].playing_as!==void 0){const x=B[0].filter_records[_].playing_as.toString();(this.predefinedFiltersPlayingAs[x]||this.predefinedFiltersPlayingAs[x]=="")&&(this.predefinedFiltersPlayingAs[x]==""?U=U.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[x]):U=U.replace("{playing_as}",this.predefinedFiltersPlayingAs[x]))}B[0].filter_records[_].section_type!==void 0&&(this.optionSelected=="Jugadores"?U=U.replace("{section_type}","Jugadores"):U=U.replace("{section_type}","Equipos")),U=U.replace(/\[/g,""),U=U.replace(/\]/g,""),U=U.replace("{category_name}",B[0].category_name);const v=U.split(": ");var m=v[1];m.length>129&&this.windowWidth>1358&&(m=m.substring(0,129),m=m+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[_].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:_,category_name:e.name,id_category:B[0].id,title:v[0]+":",text:v[1],textOrigin:B[0].description,titledots:m,filtersPredefined:{matchResult:B[0].filter_records[_].match_result,playingAs:B[0].filter_records[_].playing_as,sections:B[0].filter_records[_].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[_].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var g=[];for(let _=0;_<this.arrayPredefinedFilters.length;_++){var a=0,y=new Set,h={},r=this.arrayPredefinedFilters[_].text.replace(/\*.*?\*/,"");if(r=r.replace(/\*/g,""),r=r.replace(/ +/g," "),this.arrayPredefinedFilters[_].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[_].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[_].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0?h.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,this.arrayPredefinedFilters[_].filtersPredefined.end_age]:this.arrayPredefinedFilters[_].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[_].filtersPredefined.start_age==0?h.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[_].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[_].filtersPredefined.end_age==0?h.arrayAgeRange=[this.arrayPredefinedFilters[_].filtersPredefined.start_age,60]:h.arrayAgeRange=[1,this.arrayPredefinedFilters[_].filtersPredefined.end_age],this.arrayPredefinedFilters[_].filtersPredefined.matchResult.length!=3&&(a+=1),h.matchResult=this.arrayPredefinedFilters[_].filtersPredefined.matchResult,this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length!=0){for(let v=0;v<this.arrayPredefinedFilters[_].filtersPredefined.nationalities.length;v++)y.add(this.arrayPredefinedFilters[_].filtersPredefined.nationalities[v]);h.setNationalitiesIds=y}else y.add(138),y.add(222),y.add(163),y.add(51),y.add(226),y.add(10),y.add(223),y.add(96),y.add(171),y.add(198),y.add(105),y.add(80),y.add(29),y.add(74),y.add(216),y.add(196),y.add(64),y.add(155),y.add(156),y.add(89),y.add(106),y.add(81),y.add(233),y.add(204),h.setNationalitiesIds=y;this.arrayPredefinedFilters[_].filtersPredefined.playingAs.length!=2&&(a+=1),h.playingAs=this.arrayPredefinedFilters[_].filtersPredefined.playingAs,this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.positions.length>0?h.setPositionsIds=this.arrayPredefinedFilters[_].filtersPredefined.positions:h.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[_].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.sections.length>0?h.sections=this.arrayPredefinedFilters[_].filtersPredefined.sections:h.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[_].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[_].filtersPredefined.zone.length>0?h.zone=this.arrayPredefinedFilters[_].filtersPredefined.zone:h.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],h.typeZone=this.arrayPredefinedFilters[_].filtersPredefined.typeZone,g.push({id:_+1,name:r,isSelected:!1,value:a,filters:h})}this.FVfilterGolstats=g,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const o=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((r,_)=>r-_).toString();this.predefinedFiltersSections[o]||this.predefinedFiltersSections[o]==""?this.predefinedFiltersSections[o]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections[o]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var s=!1;this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==this.setNationalityIds.size?(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size==1?(e=e.replace("[{nationality}]",this.$t(`gentilicios[${[...this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities][0]}]`)),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size>0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size!=this.setPositionsIds.size?(s=!0,e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]","")):(e=e.replace("[{nationality}]",""),e=e.replace("[de las nacionalidades y posiciones seleccionadas]",""),e=e.replace("[de las nacionalidades seleccionadas]","")),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.nationalities.size>0?(s||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.positions.size==this.setPositionsIds.size)&&(e=e.replace("[de las posiciones seleccionadas]","")):e=e.replace("[de las posiciones seleccionadas]",""),this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=0?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]&&this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age!=this.arrayAgeRange[0]||this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age!=this.arrayAgeRange[1]?this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age==this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age?(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" años]")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]","[de "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.start_age+" a "+this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.end_age+" años]")):(e=e.replace("[de {min_age} a {max_age} años]",""),e=e.replace("[de {min_age} años]","")):(e=e.replace("[de {min_age} años]",""),e=e.replace("[de {min_age} a {max_age} años]",""));const B=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.sections.sort().toString();if(this.predefinedFiltersMatchLapse[B]||this.predefinedFiltersMatchLapse[B]=="")this.predefinedFiltersMatchLapse[B]==""?e=e.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[B]):e=e.replace("{match_lapse}",this.predefinedFiltersMatchLapse[B]);else{e=e.replace("{match_lapse}"," "+this.predefinedFiltersMatchLapse.other);var U="";B.includes(1)&&(U=U+"0-15, "),B.includes(2)&&(U=U+"16-30, "),B.includes(3)&&(U=U+"31-45, "),B.includes(4)&&(U=U+"46-60, "),B.includes(5)&&(U=U+"61-75, "),B.includes(6)&&(U=U+"76-90, "),U=U.slice(0,-2),U=U.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",U)}const m=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[m]||this.predefinedFiltersPlayingAs[m]=="")&&(this.predefinedFiltersPlayingAs[m]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[m]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[m])),this.typeSelected==1?this.getUser.tournament==1001?this.category.id==22?e=e.replace("{section_type}","Porteras"):e=e.replace("{section_type}","Jugadoras"):this.category.id==22?e=e.replace("{section_type}","Porteros"):e=e.replace("{section_type}","Jugadores"):e=e.replace("{section_type}","Equipos"),e=e.replace(/\[/g,""),e=e.replace(/\]/g,""),e=e.replace("{category_name}",this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].category_name);const g=e.split(": ");let a=g[1].charAt(0).toUpperCase()+g[1].toLowerCase().slice(1),y=g[1].charAt(0).toUpperCase()+g[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=g[0]+":";const h=y.match(/\*/g);if(h&&h.length)if(h.length%2===0)for(let r=1;r<=h.length;r++)r%2===0||(y=y.replace("*",'<span style="color: #ffff03" >'));else y=y.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=y},intervalidtops(e){this.$emit("intervalidtops",e)}},mounted(){sessionStorage.getItem("sidpdfil")!==null&&sessionStorage.setItem("sidpdfil",0),this.renderNext(),this.teamId!==0&&this.optionSelected!=="Scouting"&&this.clickTeam(this.teamId),this.defaultSection!=="Jugadores"&&(this.defaultSection==="Scouting"&&this.selectedSeason(this.currentSeasonId),this.changeTabsGeneral(this.defaultSection))},async created(){try{await this.loadTopsCategories(),await this.loadProductivityTranslation();const e=pu.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(s=>(delete s.headers.Authorization,s));const o=await e.get(qy("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",this.$store.getters.getProviderId),{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=o.data,this.fVnationalities.add(138),this.fVnationalities.add(222),this.fVnationalities.add(163),this.fVnationalities.add(51),this.fVnationalities.add(226),this.fVnationalities.add(10),this.fVnationalities.add(223),this.fVnationalities.add(96),this.fVnationalities.add(171),this.fVnationalities.add(198),this.fVnationalities.add(105),this.fVnationalities.add(80),this.fVnationalities.add(29),this.fVnationalities.add(74),this.fVnationalities.add(216),this.fVnationalities.add(196),this.fVnationalities.add(64),this.fVnationalities.add(155),this.fVnationalities.add(156),this.fVnationalities.add(89),this.fVnationalities.add(106),this.fVnationalities.add(81),this.fVnationalities.add(233),this.fVnationalities.add(204)}catch(e){throw new Error(e)}}},apt={ref:"myDivRefTopsFull"},rpt={key:0,class:"overlay-loadingComparativeG"},npt={key:0,class:"cont-leyemd-multipleleaguesComparativeG"},ipt={key:0,style:{"margin-left":"10px"}},opt={key:3,style:{width:"100%",height:"295px"}};function spt(e,o,s,B,U,m){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const g=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),y=t.resolveComponent("GSCFilters"),h=t.resolveComponent("GSCLabel"),r=t.resolveComponent("GSCTopCategory"),_=t.resolveComponent("GSCTableHeader"),v=t.resolveComponent("GSCRowTable"),x=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",apt,[U.loadingActive?(t.openBlock(),t.createElementBlock("div",rpt,o[8]||(o[8]=[t.createElementVNode("div",{class:"overlay-loadingComparativeG__spinner"},[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/images-library/balon_liga.png",alt:""})],-1),t.createElementVNode("div",{class:"overlay-loadingComparativeG__text"},"Loading...",-1)]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.templateLosMejoresClass)},[t.createElementVNode("section",{class:t.normalizeClass(e.containerSectionClass),id:"container-section"},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.comdescubreVideosClass)},[t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionParentHeaderClass)},[t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersParentClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.topFiltersClass),id:"top-filters"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamBarParentComparativeG)},[U.optionSelected!="Scouting"&&U.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBarComparativeG),id:"team-bar"},[t.createVNode(a,{data:U.teams,"team-id":s.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:m.clickTeam,onClickAll:m.clickAll},null,8,["data","team-id","onClickTeam","onClickAll"])],2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerFiltersComparativeG),id:"container-filters",style:t.normalizeStyle(U.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPcComparativeG),onClick:o[1]||(o[1]=(...f)=>m.clickCloseFilters&&m.clickCloseFilters(...f))},o[9]||(o[9]=[t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)]),2)):t.createCommentVNode("",!0),U.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(g,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":U.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:m.changeTabsSubmenu},null,8,["selected-option","font-size","width","onInput"])):t.createCommentVNode("",!0)],2),t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnCloseFiltersComparativeG),style:t.normalizeStyle(U.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:o[3]||(o[3]=(...f)=>m.openMenuFilters&&m.openMenuFilters(...f))},null,6),[[t.vShow,B.elementSize.width<760&&U.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[U.optionSelectedSubmenu=="Todas las jugadas"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.withDirectives(t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersPlays,filters:U.categoriesPlaysTypes,onApply:m.applyFiltersBtn,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply","provider-id","is-dev-apis"]),[[t.vShow,!U.showFullTable]]),(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{key:U.updateFilterField,"filter-type":U.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersField,filters:U.fVzone,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersDetails,filters:U.detailsObject,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]),U.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(y,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:s.seasonActive,tournamentId:U.tournamentSelectedObj.value},token:U.token,"onUpdate:filters":m.onFiltersData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[B.elementSize.width>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:U.tournamentsToFilter,key:U.keyTournamentValue,"onUpdate:filters":m.onFiltersTournaments,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"])),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:U.filterScounting.seasonId,tournamentId:U.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":m.onFiltersPersonalData,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","season","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:U.universeData,"onUpdate:filters":m.onFiltersUniverse,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters","provider-id","is-dev-apis"]),t.createVNode(y,t.mergeProps({"button-filter-props":m.filterButtonProps},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":m.onFiltersProductivity,filters:U.detaildProductivityCategories,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcomComparativeG),onClick:o[4]||(o[4]=(...f)=>m.getScoutingData&&m.getScoutingData(...f))},"Buscar",2)],64)):t.createCommentVNode("",!0),U.optionSelectedSubmenu=="Predeterminados"&&U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModePropsTypePlays,{"filter-type":U.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:U.updateFilterPlaytypesGolstats,"onUpdate:filters":m.onFiltersPlaysTypes,filters:U.categoriesDefault,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"])),(t.openBlock(),t.createBlock(y,t.mergeProps({"button-filter-props":m.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?U.expansionPanelModePropsMobil270:B.elementSize.width<760?U.expansionPanelModePropsMobil:U.expansionPanelModeProps,{"filter-type":U.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:U.updateFilterGolstats,"onUpdate:filters":m.onFiltersGolStats,filters:m.filterGolstats,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","provider-id","is-dev-apis"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||U.openMenuMobil]]),U.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBarComparativeG),id:"team-bar"},[U.filterScounting.tournaments.length>1&&U.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",npt,[o[10]||(o[10]=t.createElementVNode("img",{class:"img-leyemd-multipleleaguesComparativeG",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(e.comextleyemdmultipleleaguesClass)}," El filtro por equipos solo se pude utilizar cuando se tiene maximo 1 liga seleccionada ",2)])):(t.openBlock(),t.createBlock(a,{data:U.teamsscouting,"team-id":U.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:U.updateFilterTeamsScouting,onClickTeam:m.clickTeamScouting,onClickAll:m.clickAllAll},null,8,["data","team-id","onClickTeam","onClickAll"]))],2)):t.createCommentVNode("",!0)],6)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.containerTheBestClass),id:"container-the-best"},[t.createElementVNode("div",{class:t.normalizeClass(e.titleSectionClass)},[U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[U.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Mejores jugadores: ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores más productivos: ")],64))],64)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.optionSelected!="Scouting"&&U.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.showFullTable?(t.openBlock(),t.createElementBlock("div",ipt,[t.createVNode(h,{"text-value":"Categoría - "+U.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteCategoryFilter,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:"20px"},null,8,["text-value","onClickClose"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.arrayFiltersPlays,(f,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,style:{"margin-left":"10px"}},[t.createVNode(h,{"text-value":f.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:m.deleteLabelFilter,id:f.type,icon:"https://golstatsimages.blob.core.windows.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),U.rowScoutingData.length!=0||U.optionSelectedSubmenu=="Predeterminados"&&U.arrayFiltersPlays.findIndex(f=>f.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:o[5]||(o[5]=(...f)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...f))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),s.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(U.showFullTable?"gap: 0px!important;":"")},[U.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.categoriesDefault,(f,n)=>(t.openBlock(),t.createElementBlock("div",{key:f.id,style:t.normalizeStyle(!U.showOnlyCategories&&U.arrayCategoryFilter.includes(f.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,onMore:m.onShowFullTable,"border-width":0,onIntervalidtops:m.intervalidtops,"can-play-videos":s.canPlayVideos,"border-radius":"12px","game-id":s.gameId,game:s.game,typeData:s.typeData,"filters-prop":m.filterChange,category:f.id,"type-table":U.typeTable,categoryName:f.name,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","time-live-comparative-avanced","is-team","onMore","onIntervalidtops","can-play-videos","game-id","game","typeData","filters-prop","category","type-table","categoryName","season-selected","season","filter-team","onClickprofile","onSetopenmedia"]))],2),[[t.vShow,!U.showOnlyCategories&&U.arrayCategoryFilter.includes(f.id)&&!U.showFullTable]])],4))),128)),U.showFullTable?(t.openBlock(),t.createBlock(r,{"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"is-team":U.isTeam,"is-widget":s.isWidget,"team-widget":s.teamWidget,"border-width":0,"border-radius":"12px","game-id":s.gameId,onIntervalidtops:m.intervalidtops,game:s.game,typeData:s.typeData,category:U.showFullCategory,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChange,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTablesfull,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["time-live-comparative-avanced","is-team","is-widget","team-widget","game-id","onIntervalidtops","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.categoryPredefinedActive?(t.openBlock(),t.createBlock(r,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"is-team":U.isTeam,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,onIntervalidtops:m.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":s.canPlayVideos,"game-id":s.gameId,game:s.game,typeData:s.typeData,category:U.categoryPredefined,type:1,"type-table":U.typeTable,categoryName:"","filters-prop":m.filterChangePredefined,"season-selected":s.seasonSelected,season:s.seasonActive,"filter-team":s.teamselect,key:U.updateTables,onClickprofile:m.clickprofile,onSetopenmedia:m.setOpenMedia},null,8,["is-widget","team-widget","is-team","time-live-comparative-avanced","onIntervalidtops","can-play-videos","game-id","game","typeData","category","type-table","filters-prop","season-selected","season","filter-team","onClickprofile","onSetopenmedia"])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedcomComparativeG)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.titleContainerPredefinedcomComparativeG)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("No has seleccionado ningún filtro")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcomComparativeG)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Para visualizar resultados selecciona un")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("No existen resultados con los filtros")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcomComparativeG)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o[12]||(o[12]=t.createElementVNode("span",null,"Tipo de Jugada",-1)),o[13]||(o[13]=t.createTextVNode(" y un ")),o[14]||(o[14]=t.createElementVNode("span",null,"Filtro GolStats",-1)),o[15]||(o[15]=t.createTextVNode(" en la"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("que has seleccionado.")],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.subtitleContainerPredefinedcomComparativeG)},[U.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("parte superior.")],64)):t.createCommentVNode("",!0)],2)],2))],64))],64)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.containerPredefinedScountingcomComparativeG),style:t.normalizeStyle(U.rowScoutingData.length>0?"height: auto;":"")},[U.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.rowScoutingData.length>0?(t.openBlock(),t.createBlock(_,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.rowScoutingData,(f,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},[U.teamselectrec==0||U.teamselectrec==f.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(v,{type:2,"is-expanded":U.playerexpand==f.id&&U.expand,onMediadata:m.setMediaData,data:{position:f.position,player_name:f.player_name,player_photo:f.player_photo,total:f.total,id:f.id,player_age:f.player_age,team_abrev:f.team_abrev,team_logo:f.team_logo,player_position:U.positions[f.player_position-1].fullname,player_country_flag:f.player_country_flag,player_games:f.player_games,player_min:f.player_min,league_name:f.league_name,seasons:f.seasons,season_id:f.season_id},height:"71px",background:n%2===0?s.backgroundOdd:s.backgroundEven,onExpand:m.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),U.expand&&U.playerexpand==f.id?(t.openBlock(),t.createBlock(x,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:f.team_name,age:f.player_age,dataofbirth:f.date,nationality:f.nationality_name,countryFlag:f.player_country_flag,position:U.positions[f.player_position-1].name,games:f.player_games,min:f.player_min,goals:f.total,effectiveness:"-",category:"total",id:f.id},onViewprofile:i=>m.viewprofile(i,f.season_id,f.team_id),background:n%2===0?s.backgroundOdd:s.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.btnLeyendTxtcomComparativeG)},' Haz click en "Buscar" para aplicar tus filtros ',2)):t.createCommentVNode("",!0),U.rowScoutingData.length==0&&!U.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncomComparativeG)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacomComparativeG),onClick:o[6]||(o[6]=(...f)=>m.onClickDeleteFilter&&m.onClickDeleteFilter(...f))}," Eliminar filtros aplicados ",2),U.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcomComparativeG),onClick:o[7]||(o[7]=(...f)=>m.getScoutingData&&m.getScoutingData(...f))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),U.loadingActive?(t.openBlock(),t.createElementBlock("div",opt)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const lpt=Ki(tpt,[["render",spt],["__cssModules",{$style:Qht}]]),yaa="";let NV=null;const cpt={components:{GSCDatosGSMain:but,GSCCheckbox:j1,GSCRadioToggle:xF,GSCTopFull:lpt},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},timeLiveComparativeBestPlayers:{type:Number,default:6e4},timeLiveComparativeAvanced:{type:Number,default:6e4},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},tournamentSelectProps:{type:Object,default:null},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{type:Boolean,default:!1},isFemaleMode:{type:Boolean,default:!1}},data(){return{updateHomeCheck:0,updateAwayCheck:0,activeSection:"destacados",widthSection:0,teamactive:0,update:0,homeTeamCheck:!0,awayTeamCheck:!0,typeViewData:1}},watch:{game:{deep:!0,immediate:!0,handler(e){e&&(e.game_status==1||e.is_live==1||e.game_status==0?this.typeViewData=1:this.typeViewData=0),this.update+=1}}},computed:{},methods:{preventChange(e){e.preventDefault(),this.homeTeamCheck=!0},intervalidgs(e){this.$emit("intervalidgs",e)},onOpenProfileTeam(e){this.$emit("openProfileTeam",e)},intervalidtops(e){this.$emit("intervalidtops",e)},onOpenProfilePlayer(e){this.$emit("onOpenProfile",e)},ChangeRadio(e){typeof e=="string"&&(e==="Este partido"?this.typeViewData=1:this.typeViewData=0)},onCheckInactiveHome(e){e?(this.homeTeamCheck=!0,this.awayTeamCheck?this.teamactive=0:this.teamactive=this.game.homeTeam.team_id):this.awayTeamCheck?(this.homeTeamCheck=!1,this.teamactive=this.game.awayTeam.team_id):(this.updateHomeCheck+=1,this.homeTeamCheck=!0,this.teamactive=this.game.homeTeam.team_id)},onCheckInactiveAway(e){e?(this.awayTeamCheck=!0,this.homeTeamCheck?this.teamactive=0:this.teamactive=this.game.awayTeam.team_id):this.homeTeamCheck?(this.awayTeamCheck=!1,this.teamactive=this.game.homeTeam.team_id):(this.updateAwayCheck+=1,this.teamactive=this.game.awayTeam.team_id,this.awayTeamCheck=!0)},setUpResizeObserver(){if(window.ResizeObserver)NV=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),NV.observe(this.$refs.comparative);else throw new Error("Resize observer not supported!")},clickOptSection(e){this.activeSection=e},openmedia(e){this.typeViewData===1?(e.gameIdsToFilter=[this.game.gameId],this.$emit("openmedia",e)):(e.isLiveAccumulated=!0,this.$emit("openmedia",e))}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},upt={class:"container-comparative",ref:"comparative"},dpt={class:"container-btn"},hpt={class:"items-container-btn"},ppt={class:"container-sections"},fpt={key:0,class:"container-teams-menu"},mpt={class:"container-team-menu-home"},gpt=["src"],ypt={class:"container-team-menu-away"},vpt=["src"],bpt={key:1,class:"container-switch-menu"},_pt={class:"container-leyend"},xpt={class:"container-tops"};function wpt(e,o,s,B,U,m){const g=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),y=t.resolveComponent("GSCRadioToggle"),h=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",upt,[t.createElementVNode("div",dpt,[t.createElementVNode("div",hpt,[t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-destacados":"btn-destacados-movil",U.activeSection=="destacados"?"active":""]),onClick:o[0]||(o[0]=r=>m.clickOptSection("destacados"))},[s.game.status==1||s.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados")],64))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("General")],64))],2),t.createElementVNode("div",{class:t.normalizeClass([U.widthSection>480?"btn-avanced":"btn-avanced-movil",U.activeSection=="avanzado"?"active":""]),onClick:o[1]||(o[1]=r=>m.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",ppt,[U.activeSection=="destacados"?(t.openBlock(),t.createBlock(g,{key:0,"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-selected":s.tournamentSelected,"time-live-comparative-best-players":s.timeLiveComparativeBestPlayers,game:s.game,"play-videos-privileges":s.playVideosPrivileges,onOpenmedia:m.openmedia,onIntervalidgs:m.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),U.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fpt,[t.createElementVNode("div",mpt,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:U.updateHomeCheck,"model-value":U.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:s.game.homeTeam.logo},null,8,gpt),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(s.game.homeTeam.colloquial_name),3)]),o[2]||(o[2]=t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),t.createElementVNode("div",ypt,[t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(s.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:s.game.awayTeam.logo},null,8,vpt),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":m.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:U.updateAwayCheck,"model-value":U.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),s.game.is_live||s.game.status===1||s.game.status===0?(t.openBlock(),t.createElementBlock("div",bpt,[t.createVNode(y,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":U.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:m.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",_pt,[U.typeViewData==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante este partido ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Jugadas destacadas durante el torneo ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.tournamentSelected.is_female==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("Jugadoras destacadas durante lo que va del torneo")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Jugadores destacados durante lo que va del torneo")],64))],64))],64))]),t.createElementVNode("div",xpt,[t.createVNode(h,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"tournament-select-props":s.tournamentSelectProps,"time-live-comparative-avanced":s.timeLiveComparativeAvanced,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onOpenProfileTeam:m.onOpenProfileTeam,onIntervalidtops:m.intervalidtops,onOpenProfilePlayer:m.onOpenProfilePlayer,"type-data":U.typeViewData,"game-id":s.game.gameId,game:s.game,"current-season-id":s.game.seasonId,"team-id":U.teamactive,"season-active":s.game.seasonId,"season-selected":s.seasonSelected,teamselect:U.teamactive,"is-female-mode":s.isFemaleMode},null,8,["is-widget","team-widget","tournament-select-props","time-live-comparative-avanced","can-play-videos","onOpenmedia","onOpenProfileTeam","onIntervalidtops","onOpenProfilePlayer","type-data","game-id","game","current-season-id","team-id","season-active","season-selected","teamselect","is-female-mode"])])],64)):t.createCommentVNode("",!0)])],512)}const kpt=Ki(cpt,[["render",wpt],["__scopeId","data-v-1a9cea94"]]);var Spt=Object.defineProperty,Cpt=(e,o,s)=>o in e?Spt(e,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[o]=s,lC=(e,o,s)=>Cpt(e,typeof o!="symbol"?o+"":o,s);function FV(e,o){return function(){return e.apply(o,arguments)}}const{toString:Tpt}=Object.prototype,{getPrototypeOf:cC}=Object,{iterator:y4,toStringTag:RV}=Symbol,v4=(e=>o=>{const s=Tpt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),em=e=>(e=e.toLowerCase(),o=>v4(o)===e),b4=e=>o=>typeof o===e,{isArray:Uv}=Array,Zb=b4("undefined");function Apt(e){return e!==null&&!Zb(e)&&e.constructor!==null&&!Zb(e.constructor)&&Ap(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const VV=em("ArrayBuffer");function Ept(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&VV(e.buffer),o}const Mpt=b4("string"),Ap=b4("function"),jV=b4("number"),_4=e=>e!==null&&typeof e=="object",Ipt=e=>e===!0||e===!1,x4=e=>{if(v4(e)!=="object")return!1;const o=cC(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(RV in e)&&!(y4 in e)},Ppt=em("Date"),Lpt=em("File"),Bpt=em("Blob"),zpt=em("FileList"),Opt=e=>_4(e)&&Ap(e.pipe),Dpt=e=>{let o;return e&&(typeof FormData=="function"&&e instanceof FormData||Ap(e.append)&&((o=v4(e))==="formdata"||o==="object"&&Ap(e.toString)&&e.toString()==="[object FormData]"))},Npt=em("URLSearchParams"),[Fpt,Rpt,Vpt,jpt]=["ReadableStream","Request","Response","Headers"].map(em),Upt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qb(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let B,U;if(typeof e!="object"&&(e=[e]),Uv(e))for(B=0,U=e.length;B<U;B++)o.call(null,e[B],B,e);else{const m=s?Object.getOwnPropertyNames(e):Object.keys(e),g=m.length;let a;for(B=0;B<g;B++)a=m[B],o.call(null,e[a],a,e)}}function UV(e,o){o=o.toLowerCase();const s=Object.keys(e);let B=s.length,U;for(;B-- >0;)if(U=s[B],o===U.toLowerCase())return U;return null}const mg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,GV=e=>!Zb(e)&&e!==mg;function uC(){const{caseless:e}=GV(this)&&this||{},o={},s=(B,U)=>{const m=e&&UV(o,U)||U;x4(o[m])&&x4(B)?o[m]=uC(o[m],B):x4(B)?o[m]=uC({},B):Uv(B)?o[m]=B.slice():o[m]=B};for(let B=0,U=arguments.length;B<U;B++)arguments[B]&&qb(arguments[B],s);return o}const Gpt=(e,o,s,{allOwnKeys:B}={})=>(qb(o,(U,m)=>{s&&Ap(U)?e[m]=FV(U,s):e[m]=U},{allOwnKeys:B}),e),Hpt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zpt=(e,o,s,B)=>{e.prototype=Object.create(o.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},qpt=(e,o,s,B)=>{let U,m,g;const a={};if(o=o||{},e==null)return o;do{for(U=Object.getOwnPropertyNames(e),m=U.length;m-- >0;)g=U[m],(!B||B(g,e,o))&&!a[g]&&(o[g]=e[g],a[g]=!0);e=s!==!1&&cC(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Wpt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const B=e.indexOf(o,s);return B!==-1&&B===s},Jpt=e=>{if(!e)return null;if(Uv(e))return e;let o=e.length;if(!jV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Ypt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&cC(Uint8Array)),Xpt=(e,o)=>{const s=(e&&e[y4]).call(e);let B;for(;(B=s.next())&&!B.done;){const U=B.value;o.call(e,U[0],U[1])}},$pt=(e,o)=>{let s;const B=[];for(;(s=e.exec(o))!==null;)B.push(s);return B},Kpt=em("HTMLFormElement"),Qpt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,B){return s.toUpperCase()+B}),HV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),eft=em("RegExp"),ZV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),B={};qb(s,(U,m)=>{let g;(g=o(U,m,e))!==!1&&(B[m]=g||U)}),Object.defineProperties(e,B)},tft=e=>{ZV(e,(o,s)=>{if(Ap(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const B=e[s];if(Ap(B)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},aft=(e,o)=>{const s={},B=U=>{U.forEach(m=>{s[m]=!0})};return Uv(e)?B(e):B(String(e).split(o)),s},rft=()=>{},nft=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function ift(e){return!!(e&&Ap(e.append)&&e[RV]==="FormData"&&e[y4])}const oft=e=>{const o=new Array(10),s=(B,U)=>{if(_4(B)){if(o.indexOf(B)>=0)return;if(!("toJSON"in B)){o[U]=B;const m=Uv(B)?[]:{};return qb(B,(g,a)=>{const y=s(g,U+1);!Zb(y)&&(m[a]=y)}),o[U]=void 0,m}}return B};return s(e,0)},sft=em("AsyncFunction"),lft=e=>e&&(_4(e)||Ap(e))&&Ap(e.then)&&Ap(e.catch),qV=((e,o)=>e?setImmediate:o?((s,B)=>(mg.addEventListener("message",({source:U,data:m})=>{U===mg&&m===s&&B.length&&B.shift()()},!1),U=>{B.push(U),mg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Ap(mg.postMessage)),cft=typeof queueMicrotask<"u"?queueMicrotask.bind(mg):typeof process<"u"&&process.nextTick||qV,uft=e=>e!=null&&Ap(e[y4]),On={isArray:Uv,isArrayBuffer:VV,isBuffer:Apt,isFormData:Dpt,isArrayBufferView:Ept,isString:Mpt,isNumber:jV,isBoolean:Ipt,isObject:_4,isPlainObject:x4,isReadableStream:Fpt,isRequest:Rpt,isResponse:Vpt,isHeaders:jpt,isUndefined:Zb,isDate:Ppt,isFile:Lpt,isBlob:Bpt,isRegExp:eft,isFunction:Ap,isStream:Opt,isURLSearchParams:Npt,isTypedArray:Ypt,isFileList:zpt,forEach:qb,merge:uC,extend:Gpt,trim:Upt,stripBOM:Hpt,inherits:Zpt,toFlatObject:qpt,kindOf:v4,kindOfTest:em,endsWith:Wpt,toArray:Jpt,forEachEntry:Xpt,matchAll:$pt,isHTMLForm:Kpt,hasOwnProperty:HV,hasOwnProp:HV,reduceDescriptors:ZV,freezeMethods:tft,toObjectSet:aft,toCamelCase:Qpt,noop:rft,toFiniteNumber:nft,findKey:UV,global:mg,isContextDefined:GV,isSpecCompliantForm:ift,toJSONObject:oft,isAsyncFn:sft,isThenable:lft,setImmediate:qV,asap:cft,isIterable:uft};function kl(e,o,s,B,U){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),B&&(this.request=B),U&&(this.response=U,this.status=U.status?U.status:null)}On.inherits(kl,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:On.toJSONObject(this.config),code:this.code,status:this.status}}});const WV=kl.prototype,JV={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{JV[e]={value:e}}),Object.defineProperties(kl,JV),Object.defineProperty(WV,"isAxiosError",{value:!0}),kl.from=(e,o,s,B,U,m)=>{const g=Object.create(WV);return On.toFlatObject(e,g,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),kl.call(g,e.message,o,s,B,U),g.cause=e,g.name=e.name,m&&Object.assign(g,m),g};const dft=null;function dC(e){return On.isPlainObject(e)||On.isArray(e)}function YV(e){return On.endsWith(e,"[]")?e.slice(0,-2):e}function XV(e,o,s){return e?e.concat(o).map(function(B,U){return B=YV(B),!s&&U?"["+B+"]":B}).join(s?".":""):o}function hft(e){return On.isArray(e)&&!e.some(dC)}const pft=On.toFlatObject(On,{},null,function(e){return/^is[A-Z]/.test(e)});function w4(e,o,s){if(!On.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=On.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,f){return!On.isUndefined(f[x])});const B=s.metaTokens,U=s.visitor||h,m=s.dots,g=s.indexes,a=(s.Blob||typeof Blob<"u"&&Blob)&&On.isSpecCompliantForm(o);if(!On.isFunction(U))throw new TypeError("visitor must be a function");function y(x){if(x===null)return"";if(On.isDate(x))return x.toISOString();if(On.isBoolean(x))return x.toString();if(!a&&On.isBlob(x))throw new kl("Blob is not supported. Use a Buffer instead.");return On.isArrayBuffer(x)||On.isTypedArray(x)?a&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function h(x,f,n){let i=x;if(x&&!n&&typeof x=="object"){if(On.endsWith(f,"{}"))f=B?f:f.slice(0,-2),x=JSON.stringify(x);else if(On.isArray(x)&&hft(x)||(On.isFileList(x)||On.endsWith(f,"[]"))&&(i=On.toArray(x)))return f=YV(f),i.forEach(function(c,l){!(On.isUndefined(c)||c===null)&&o.append(g===!0?XV([f],l,m):g===null?f:f+"[]",y(c))}),!1}return dC(x)?!0:(o.append(XV(n,f,m),y(x)),!1)}const r=[],_=Object.assign(pft,{defaultVisitor:h,convertValue:y,isVisitable:dC});function v(x,f){if(!On.isUndefined(x)){if(r.indexOf(x)!==-1)throw Error("Circular reference detected in "+f.join("."));r.push(x),On.forEach(x,function(n,i){(!(On.isUndefined(n)||n===null)&&U.call(o,n,On.isString(i)?i.trim():i,f,_))===!0&&v(n,f?f.concat(i):[i])}),r.pop()}}if(!On.isObject(e))throw new TypeError("data must be an object");return v(e),o}function $V(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function hC(e,o){this._pairs=[],e&&w4(e,this,o)}const KV=hC.prototype;KV.append=function(e,o){this._pairs.push([e,o])},KV.toString=function(e){const o=e?function(s){return e.call(this,s,$V)}:$V;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function fft(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QV(e,o,s){if(!o)return e;const B=s&&s.encode||fft;On.isFunction(s)&&(s={serialize:s});const U=s&&s.serialize;let m;if(U?m=U(o,s):m=On.isURLSearchParams(o)?o.toString():new hC(o,s).toString(B),m){const g=e.indexOf("#");g!==-1&&(e=e.slice(0,g)),e+=(e.indexOf("?")===-1?"?":"&")+m}return e}let ej=class{constructor(){this.handlers=[]}use(o,s,B){return this.handlers.push({fulfilled:o,rejected:s,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){On.forEach(this.handlers,function(s){s!==null&&o(s)})}};const tj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},mft=typeof URLSearchParams<"u"?URLSearchParams:hC,gft=typeof FormData<"u"?FormData:null,yft=typeof Blob<"u"?Blob:null,vft={isBrowser:!0,classes:{URLSearchParams:mft,FormData:gft,Blob:yft},protocols:["http","https","file","blob","url","data"]},pC=typeof window<"u"&&typeof document<"u",fC=typeof navigator=="object"&&navigator||void 0,bft=pC&&(!fC||["ReactNative","NativeScript","NS"].indexOf(fC.product)<0),_ft=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xft=pC&&window.location.href||"http://localhost",wft=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pC,hasStandardBrowserEnv:bft,hasStandardBrowserWebWorkerEnv:_ft,navigator:fC,origin:xft},Symbol.toStringTag,{value:"Module"})),zh={...wft,...vft};function kft(e,o){return w4(e,new zh.classes.URLSearchParams,Object.assign({visitor:function(s,B,U,m){return zh.isNode&&On.isBuffer(s)?(this.append(B,s.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},o))}function Sft(e){return On.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Cft(e){const o={},s=Object.keys(e);let B;const U=s.length;let m;for(B=0;B<U;B++)m=s[B],o[m]=e[m];return o}function aj(e){function o(s,B,U,m){let g=s[m++];if(g==="__proto__")return!0;const a=Number.isFinite(+g),y=m>=s.length;return g=!g&&On.isArray(U)?U.length:g,y?(On.hasOwnProp(U,g)?U[g]=[U[g],B]:U[g]=B,!a):((!U[g]||!On.isObject(U[g]))&&(U[g]=[]),o(s,B,U[g],m)&&On.isArray(U[g])&&(U[g]=Cft(U[g])),!a)}if(On.isFormData(e)&&On.isFunction(e.entries)){const s={};return On.forEachEntry(e,(B,U)=>{o(Sft(B),U,s,0)}),s}return null}function Tft(e,o,s){if(On.isString(e))try{return(o||JSON.parse)(e),On.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(s||JSON.stringify)(e)}const Wb={transitional:tj,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",B=s.indexOf("application/json")>-1,U=On.isObject(e);if(U&&On.isHTMLForm(e)&&(e=new FormData(e)),On.isFormData(e))return B?JSON.stringify(aj(e)):e;if(On.isArrayBuffer(e)||On.isBuffer(e)||On.isStream(e)||On.isFile(e)||On.isBlob(e)||On.isReadableStream(e))return e;if(On.isArrayBufferView(e))return e.buffer;if(On.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let m;if(U){if(s.indexOf("application/x-www-form-urlencoded")>-1)return kft(e,this.formSerializer).toString();if((m=On.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return w4(m?{"files[]":e}:e,g&&new g,this.formSerializer)}}return U||B?(o.setContentType("application/json",!1),Tft(e)):e}],transformResponse:[function(e){const o=this.transitional||Wb.transitional,s=o&&o.forcedJSONParsing,B=this.responseType==="json";if(On.isResponse(e)||On.isReadableStream(e))return e;if(e&&On.isString(e)&&(s&&!this.responseType||B)){const U=!(o&&o.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(m){if(U)throw m.name==="SyntaxError"?kl.from(m,kl.ERR_BAD_RESPONSE,this,null,this.response):m}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zh.classes.FormData,Blob:zh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};On.forEach(["delete","get","head","post","put","patch"],e=>{Wb.headers[e]={}});const Aft=On.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Eft=e=>{const o={};let s,B,U;return e&&e.split(`
4140
4140
  `).forEach(function(m){U=m.indexOf(":"),s=m.substring(0,U).trim().toLowerCase(),B=m.substring(U+1).trim(),!(!s||o[s]&&Aft[s])&&(s==="set-cookie"?o[s]?o[s].push(B):o[s]=[B]:o[s]=o[s]?o[s]+", "+B:B)}),o},rj=Symbol("internals");function Jb(e){return e&&String(e).trim().toLowerCase()}function k4(e){return e===!1||e==null?e:On.isArray(e)?e.map(k4):String(e)}function Mft(e){const o=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=s.exec(e);)o[B[1]]=B[2];return o}const Ift=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mC(e,o,s,B,U){if(On.isFunction(B))return B.call(this,o,s);if(U&&(o=s),!!On.isString(o)){if(On.isString(B))return o.indexOf(B)!==-1;if(On.isRegExp(B))return B.test(o)}}function Pft(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,s,B)=>s.toUpperCase()+B)}function Lft(e,o){const s=On.toCamelCase(" "+o);["get","set","has"].forEach(B=>{Object.defineProperty(e,B+s,{value:function(U,m,g){return this[B].call(this,o,U,m,g)},configurable:!0})})}let Ep=class{constructor(o){o&&this.set(o)}set(o,s,B){const U=this;function m(a,y,h){const r=Jb(y);if(!r)throw new Error("header name must be a non-empty string");const _=On.findKey(U,r);(!_||U[_]===void 0||h===!0||h===void 0&&U[_]!==!1)&&(U[_||y]=k4(a))}const g=(a,y)=>On.forEach(a,(h,r)=>m(h,r,y));if(On.isPlainObject(o)||o instanceof this.constructor)g(o,s);else if(On.isString(o)&&(o=o.trim())&&!Ift(o))g(Eft(o),s);else if(On.isObject(o)&&On.isIterable(o)){let a={},y,h;for(const r of o){if(!On.isArray(r))throw TypeError("Object iterator must return a key-value pair");a[h=r[0]]=(y=a[h])?On.isArray(y)?[...y,r[1]]:[y,r[1]]:r[1]}g(a,s)}else o!=null&&m(s,o,B);return this}get(o,s){if(o=Jb(o),o){const B=On.findKey(this,o);if(B){const U=this[B];if(!s)return U;if(s===!0)return Mft(U);if(On.isFunction(s))return s.call(this,U,B);if(On.isRegExp(s))return s.exec(U);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,s){if(o=Jb(o),o){const B=On.findKey(this,o);return!!(B&&this[B]!==void 0&&(!s||mC(this,this[B],B,s)))}return!1}delete(o,s){const B=this;let U=!1;function m(g){if(g=Jb(g),g){const a=On.findKey(B,g);a&&(!s||mC(B,B[a],a,s))&&(delete B[a],U=!0)}}return On.isArray(o)?o.forEach(m):m(o),U}clear(o){const s=Object.keys(this);let B=s.length,U=!1;for(;B--;){const m=s[B];(!o||mC(this,this[m],m,o,!0))&&(delete this[m],U=!0)}return U}normalize(o){const s=this,B={};return On.forEach(this,(U,m)=>{const g=On.findKey(B,m);if(g){s[g]=k4(U),delete s[m];return}const a=o?Pft(m):String(m).trim();a!==m&&delete s[m],s[a]=k4(U),B[a]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const s=Object.create(null);return On.forEach(this,(B,U)=>{B!=null&&B!==!1&&(s[U]=o&&On.isArray(B)?B.join(", "):B)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,s])=>o+": "+s).join(`
4141
4141
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...s){const B=new this(o);return s.forEach(U=>B.set(U)),B}static accessor(o){const s=(this[rj]=this[rj]={accessors:{}}).accessors,B=this.prototype;function U(m){const g=Jb(m);s[g]||(Lft(B,m),s[g]=!0)}return On.isArray(o)?o.forEach(U):U(o),this}};Ep.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),On.reduceDescriptors(Ep.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(B){this[s]=B}}}),On.freezeMethods(Ep);function gC(e,o){const s=this||Wb,B=o||s,U=Ep.from(B.headers);let m=B.data;return On.forEach(e,function(g){m=g.call(s,m,U.normalize(),o?o.status:void 0)}),U.normalize(),m}function nj(e){return!!(e&&e.__CANCEL__)}function Gv(e,o,s){kl.call(this,e??"canceled",kl.ERR_CANCELED,o,s),this.name="CanceledError"}On.inherits(Gv,kl,{__CANCEL__:!0});function ij(e,o,s){const B=s.config.validateStatus;!s.status||!B||B(s.status)?e(s):o(new kl("Request failed with status code "+s.status,[kl.ERR_BAD_REQUEST,kl.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Bft(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function zft(e,o){e=e||10;const s=new Array(e),B=new Array(e);let U=0,m=0,g;return o=o!==void 0?o:1e3,function(a){const y=Date.now(),h=B[m];g||(g=y),s[U]=a,B[U]=y;let r=m,_=0;for(;r!==U;)_+=s[r++],r=r%e;if(U=(U+1)%e,U===m&&(m=(m+1)%e),y-g<o)return;const v=h&&y-h;return v?Math.round(_*1e3/v):void 0}}function Oft(e,o){let s=0,B=1e3/o,U,m;const g=(a,y=Date.now())=>{s=y,U=null,m&&(clearTimeout(m),m=null),e.apply(null,a)};return[(...a)=>{const y=Date.now(),h=y-s;h>=B?g(a,y):(U=a,m||(m=setTimeout(()=>{m=null,g(U)},B-h)))},()=>U&&g(U)]}const S4=(e,o,s=3)=>{let B=0;const U=zft(50,250);return Oft(m=>{const g=m.loaded,a=m.lengthComputable?m.total:void 0,y=g-B,h=U(y),r=g<=a;B=g;const _={loaded:g,total:a,progress:a?g/a:void 0,bytes:y,rate:h||void 0,estimated:h&&a&&r?(a-g)/h:void 0,event:m,lengthComputable:a!=null,[o?"download":"upload"]:!0};e(_)},s)},oj=(e,o)=>{const s=e!=null;return[B=>o[0]({lengthComputable:s,total:e,loaded:B}),o[1]]},sj=e=>(...o)=>On.asap(()=>e(...o)),Dft=zh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,zh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(zh.origin),zh.navigator&&/(msie|trident)/i.test(zh.navigator.userAgent)):()=>!0,Nft=zh.hasStandardBrowserEnv?{write(e,o,s,B,U,m){const g=[e+"="+encodeURIComponent(o)];On.isNumber(s)&&g.push("expires="+new Date(s).toGMTString()),On.isString(B)&&g.push("path="+B),On.isString(U)&&g.push("domain="+U),m===!0&&g.push("secure"),document.cookie=g.join("; ")},read(e){const o=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fft(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Rft(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function lj(e,o,s){let B=!Fft(o);return e&&(B||s==!1)?Rft(e,o):o}const cj=e=>e instanceof Ep?{...e}:e;function gg(e,o){o=o||{};const s={};function B(h,r,_,v){return On.isPlainObject(h)&&On.isPlainObject(r)?On.merge.call({caseless:v},h,r):On.isPlainObject(r)?On.merge({},r):On.isArray(r)?r.slice():r}function U(h,r,_,v){if(On.isUndefined(r)){if(!On.isUndefined(h))return B(void 0,h,_,v)}else return B(h,r,_,v)}function m(h,r){if(!On.isUndefined(r))return B(void 0,r)}function g(h,r){if(On.isUndefined(r)){if(!On.isUndefined(h))return B(void 0,h)}else return B(void 0,r)}function a(h,r,_){if(_ in o)return B(h,r);if(_ in e)return B(void 0,h)}const y={url:m,method:m,data:m,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:a,headers:(h,r,_)=>U(cj(h),cj(r),_,!0)};return On.forEach(Object.keys(Object.assign({},e,o)),function(h){const r=y[h]||U,_=r(e[h],o[h],h);On.isUndefined(_)&&r!==a||(s[h]=_)}),s}const uj=e=>{const o=gg({},e);let{data:s,withXSRFToken:B,xsrfHeaderName:U,xsrfCookieName:m,headers:g,auth:a}=o;o.headers=g=Ep.from(g),o.url=QV(lj(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&g.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let y;if(On.isFormData(s)){if(zh.hasStandardBrowserEnv||zh.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if((y=g.getContentType())!==!1){const[h,...r]=y?y.split(";").map(_=>_.trim()).filter(Boolean):[];g.setContentType([h||"multipart/form-data",...r].join("; "))}}if(zh.hasStandardBrowserEnv&&(B&&On.isFunction(B)&&(B=B(o)),B||B!==!1&&Dft(o.url))){const h=U&&m&&Nft.read(m);h&&g.set(U,h)}return o},Vft=typeof XMLHttpRequest<"u",jft=Vft&&function(e){return new Promise(function(o,s){const B=uj(e);let U=B.data;const m=Ep.from(B.headers).normalize();let{responseType:g,onUploadProgress:a,onDownloadProgress:y}=B,h,r,_,v,x;function f(){v&&v(),x&&x(),B.cancelToken&&B.cancelToken.unsubscribe(h),B.signal&&B.signal.removeEventListener("abort",h)}let n=new XMLHttpRequest;n.open(B.method.toUpperCase(),B.url,!0),n.timeout=B.timeout;function i(){if(!n)return;const l=Ep.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),d={data:!g||g==="text"||g==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};ij(function(b){o(b),f()},function(b){s(b),f()},d),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(s(new kl("Request aborted",kl.ECONNABORTED,e,n)),n=null)},n.onerror=function(){s(new kl("Network Error",kl.ERR_NETWORK,e,n)),n=null},n.ontimeout=function(){let l=B.timeout?"timeout of "+B.timeout+"ms exceeded":"timeout exceeded";const d=B.transitional||tj;B.timeoutErrorMessage&&(l=B.timeoutErrorMessage),s(new kl(l,d.clarifyTimeoutError?kl.ETIMEDOUT:kl.ECONNABORTED,e,n)),n=null},U===void 0&&m.setContentType(null),"setRequestHeader"in n&&On.forEach(m.toJSON(),function(l,d){n.setRequestHeader(d,l)}),On.isUndefined(B.withCredentials)||(n.withCredentials=!!B.withCredentials),g&&g!=="json"&&(n.responseType=B.responseType),y&&([_,x]=S4(y,!0),n.addEventListener("progress",_)),a&&n.upload&&([r,v]=S4(a),n.upload.addEventListener("progress",r),n.upload.addEventListener("loadend",v)),(B.cancelToken||B.signal)&&(h=l=>{n&&(s(!l||l.type?new Gv(null,e,n):l),n.abort(),n=null)},B.cancelToken&&B.cancelToken.subscribe(h),B.signal&&(B.signal.aborted?h():B.signal.addEventListener("abort",h)));const c=Bft(B.url);if(c&&zh.protocols.indexOf(c)===-1){s(new kl("Unsupported protocol "+c+":",kl.ERR_BAD_REQUEST,e));return}n.send(U||null)})},Uft=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let B=new AbortController,U;const m=function(h){if(!U){U=!0,a();const r=h instanceof Error?h:this.reason;B.abort(r instanceof kl?r:new Gv(r instanceof Error?r.message:r))}};let g=o&&setTimeout(()=>{g=null,m(new kl(`timeout ${o} of ms exceeded`,kl.ETIMEDOUT))},o);const a=()=>{e&&(g&&clearTimeout(g),g=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(m):h.removeEventListener("abort",m)}),e=null)};e.forEach(h=>h.addEventListener("abort",m));const{signal:y}=B;return y.unsubscribe=()=>On.asap(a),y}},Gft=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let B=0,U;for(;B<s;)U=B+o,yield e.slice(B,U),B=U},Hft=async function*(e,o){for await(const s of Zft(e))yield*Gft(s,o)},Zft=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:B}=await o.read();if(s)break;yield B}}finally{await o.cancel()}},dj=(e,o,s,B)=>{const U=Hft(e,o);let m=0,g,a=y=>{g||(g=!0,B&&B(y))};return new ReadableStream({async pull(y){try{const{done:h,value:r}=await U.next();if(h){a(),y.close();return}let _=r.byteLength;if(s){let v=m+=_;s(v)}y.enqueue(new Uint8Array(r))}catch(h){throw a(h),h}},cancel(y){return a(y),U.return()}},{highWaterMark:2})},C4=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",hj=C4&&typeof ReadableStream=="function",qft=C4&&(typeof TextEncoder=="function"?(e=>o=>e.encode(o))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),pj=(e,...o)=>{try{return!!e(...o)}catch{return!1}},Wft=hj&&pj(()=>{let e=!1;const o=new Request(zh.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!o}),fj=64*1024,yC=hj&&pj(()=>On.isReadableStream(new Response("").body)),T4={stream:yC&&(e=>e.body)};C4&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!T4[o]&&(T4[o]=On.isFunction(e[o])?s=>s[o]():(s,B)=>{throw new kl(`Response type '${o}' is not supported`,kl.ERR_NOT_SUPPORT,B)})})})(new Response);const Jft=async e=>{if(e==null)return 0;if(On.isBlob(e))return e.size;if(On.isSpecCompliantForm(e))return(await new Request(zh.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(On.isArrayBufferView(e)||On.isArrayBuffer(e))return e.byteLength;if(On.isURLSearchParams(e)&&(e=e+""),On.isString(e))return(await qft(e)).byteLength},Yft=async(e,o)=>On.toFiniteNumber(e.getContentLength())??Jft(o),Xft=C4&&(async e=>{let{url:o,method:s,data:B,signal:U,cancelToken:m,timeout:g,onDownloadProgress:a,onUploadProgress:y,responseType:h,headers:r,withCredentials:_="same-origin",fetchOptions:v}=uj(e);h=h?(h+"").toLowerCase():"text";let x=Uft([U,m&&m.toAbortSignal()],g),f;const n=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let i;try{if(y&&Wft&&s!=="get"&&s!=="head"&&(i=await Yft(r,B))!==0){let w=new Request(o,{method:"POST",body:B,duplex:"half"}),C;if(On.isFormData(B)&&(C=w.headers.get("content-type"))&&r.setContentType(C),w.body){const[E,A]=oj(i,S4(sj(y)));B=dj(w.body,fj,E,A)}}On.isString(_)||(_=_?"include":"omit");const c="credentials"in Request.prototype;f=new Request(o,{...v,signal:x,method:s.toUpperCase(),headers:r.normalize().toJSON(),body:B,duplex:"half",credentials:c?_:void 0});let l=await fetch(f,v);const d=yC&&(h==="stream"||h==="response");if(yC&&(a||d&&n)){const w={};["status","statusText","headers"].forEach(P=>{w[P]=l[P]});const C=On.toFiniteNumber(l.headers.get("content-length")),[E,A]=a&&oj(C,S4(sj(a),!0))||[];l=new Response(dj(l.body,fj,E,()=>{A&&A(),n&&n()}),w)}h=h||"text";let b=await T4[On.findKey(T4,h)||"text"](l,e);return!d&&n&&n(),await new Promise((w,C)=>{ij(w,C,{data:b,headers:Ep.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:f})})}catch(c){throw n&&n(),c&&c.name==="TypeError"&&/Load failed|fetch/i.test(c.message)?Object.assign(new kl("Network Error",kl.ERR_NETWORK,e,f),{cause:c.cause||c}):kl.from(c,c&&c.code,e,f)}}),vC={http:dft,xhr:jft,fetch:Xft};On.forEach(vC,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const mj=e=>`- ${e}`,$ft=e=>On.isFunction(e)||e===null||e===!1,gj={getAdapter:e=>{e=On.isArray(e)?e:[e];const{length:o}=e;let s,B;const U={};for(let m=0;m<o;m++){s=e[m];let g;if(B=s,!$ft(s)&&(B=vC[(g=String(s)).toLowerCase()],B===void 0))throw new kl(`Unknown adapter '${g}'`);if(B)break;U[g||"#"+m]=B}if(!B){const m=Object.entries(U).map(([a,y])=>`adapter ${a} `+(y===!1?"is not supported by the environment":"is not available in the build"));let g=o?m.length>1?`since :
4142
4142
  `+m.map(mj).join(`
@@ -8204,4 +8204,4 @@ uniform ${Fe} ${Ge} u_${rt};
8204
8204
  * vuex v4.0.2
8205
8205
  * (c) 2021 Evan You
8206
8206
  * @license MIT
8207
- */var hq="store";function fUt(e){return e===void 0&&(e=null),t.inject(e!==null?e:hq)}function Rg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function pq(e){return e!==null&&typeof e=="object"}function mUt(e){return e&&typeof e.then=="function"}function om(e,o){if(!e)throw new Error("[vuex] "+o)}function gUt(e,o){return function(){return e(o)}}function fq(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function mq(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Zw(e,s,[],e._modules.root,!0),dA(e,s,o)}function dA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Rg(U,function(g,a){m[a]=gUt(g,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&xUt(e),B&&s&&e._withCommit(function(){B.data=null})}function Zw(e,o,s,B,U){var m=!s.length,g=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=B),!m&&!U){var a=hA(o,s.slice(0,-1)),y=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[y]=B.state})}var h=B.context=yUt(e,g,s);B.forEachMutation(function(r,_){var v=g+_;vUt(e,v,r,h)}),B.forEachAction(function(r,_){var v=r.root?_:g+_,x=r.handler||r;bUt(e,v,x,h)}),B.forEachGetter(function(r,_){var v=g+_;_Ut(e,v,r,h)}),B.forEachChild(function(r,_){Zw(e,o,s.concat(_),r,U)})}function yUt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,g,a){var y=qw(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+_);return}return e.dispatch(_,h)},commit:B?e.commit:function(m,g,a){var y=qw(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+_);return}e.commit(_,h,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return gq(e,o)}},state:{get:function(){return hA(e.state,s)}}}),U}function gq(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function vUt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function bUt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var g=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return mUt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function _Ut(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function xUt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&om(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function hA(e,o){return o.reduce(function(s,B){return s[B]},e)}function qw(e,o,s){return pq(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&om(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var wUt="vuex bindings",yq="vuex:mutations",pA="vuex:actions",y2="vuex",kUt=0;function SUt(e,o){pUt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wUt]},function(s){s.addTimelineLayer({id:yq,label:"Vuex Mutations",color:vq}),s.addTimelineLayer({id:pA,label:"Vuex Actions",color:vq}),s.addInspector({id:y2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===y2)if(B.filter){var U=[];wq(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[xq(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId;gq(o,U),B.state=AUt(MUt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(y2),s.sendInspectorState(y2),s.addTimelineEvent({layerId:yq,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=kUt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},g=Date.now()-B._time;m.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var vq=8702998,CUt=6710886,TUt=16777215,bq={label:"namespaced",textColor:TUt,backgroundColor:CUt};function _q(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xq(e,o){return{id:o||"root",label:_q(o),tags:e.namespaced?[bq]:[],children:Object.keys(e._children).map(function(s){return xq(e._children[s],o+s+"/")})}}function wq(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[bq]:[]}),Object.keys(o._children).forEach(function(U){wq(e,o._children[U],s,B+U+"/")})}function AUt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(B.length){var m=EUt(o);U.getters=Object.keys(m).map(function(g){return{key:g.endsWith("/")?_q(g):g,editable:!1,value:fA(function(){return m[g]})}})}return U}function EUt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(g){U[g]||(U[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),U=U[g]._custom.value}),U[m]=fA(function(){return e[s]})}else o[s]=fA(function(){return e[s]})}),o}function MUt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var g=B[U];if(!g)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?g:g._children},o==="root"?e:e.root._children)}function fA(e){try{return e()}catch(o){return o}}var sm=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},kq={namespaced:{configurable:!0}};kq.namespaced.get=function(){return!!this._rawModule.namespaced},sm.prototype.addChild=function(e,o){this._children[e]=o},sm.prototype.removeChild=function(e){delete this._children[e]},sm.prototype.getChild=function(e){return this._children[e]},sm.prototype.hasChild=function(e){return e in this._children},sm.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},sm.prototype.forEachChild=function(e){Rg(this._children,e)},sm.prototype.forEachGetter=function(e){this._rawModule.getters&&Rg(this._rawModule.getters,e)},sm.prototype.forEachAction=function(e){this._rawModule.actions&&Rg(this._rawModule.actions,e)},sm.prototype.forEachMutation=function(e){this._rawModule.mutations&&Rg(this._rawModule.mutations,e)},Object.defineProperties(sm.prototype,kq);var Vg=function(e){this.register([],e,!1)};Vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Vg.prototype.update=function(e){Sq([],this.root,e)},Vg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&Aq(e,o);var U=new sm(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Rg(o.modules,function(g,a){B.register(e.concat(a),g,s)})},Vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function Sq(e,o,s){if(process.env.NODE_ENV!=="production"&&Aq(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}Sq(e.concat(B),o.getChild(B),s.modules[B])}}var Cq={assert:function(e){return typeof e=="function"},expected:"function"},IUt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},Tq={getters:Cq,mutations:Cq,actions:IUt};function Aq(e,o){Object.keys(Tq).forEach(function(s){if(o[s]){var B=Tq[s];Rg(o[s],function(U,m){om(B.assert(U),PUt(e,s,m,U,B.expected))})}})}function PUt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var $p=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(om(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),om(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var g=this,a=this,y=a.dispatch,h=a.commit;this.dispatch=function(_,v){return y.call(g,_,v)},this.commit=function(_,v,x){return h.call(g,_,v,x)},this.strict=U;var r=this._modules.root.state;Zw(this,r,[],this._modules.root),dA(this,r),B.forEach(function(_){return _(s)})},mA={state:{configurable:!0}};$p.prototype.install=function(e,o){e.provide(o||hq,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&SUt(e,this)},mA.state.get=function(){return this._state.data},mA.state.set=function(e){process.env.NODE_ENV!=="production"&&om(!1,"use store.replaceState() to explicit replace store state.")},$p.prototype.commit=function(e,o,s){var B=this,U=qw(e,o,s),m=U.type,g=U.payload,a=U.options,y={type:m,payload:g},h=this._mutations[m];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){h.forEach(function(r){r(g)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$p.prototype.dispatch=function(e,o){var s=this,B=qw(e,o),U=B.type,m=B.payload,g={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(g,s.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var y=a.length>1?Promise.all(a.map(function(h){return h(m)})):a[0](m);return new Promise(function(h,r){y.then(function(_){try{s._actionSubscribers.filter(function(v){return v.after}).forEach(function(v){return v.after(g,s.state)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(v))}h(_)},function(_){try{s._actionSubscribers.filter(function(v){return v.error}).forEach(function(v){return v.error(g,s.state,_)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(v))}r(_)})})},$p.prototype.subscribe=function(e,o){return fq(e,this._subscribers,o)},$p.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return fq(s,this._actionSubscribers,o)},$p.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&om(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},$p.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},$p.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(om(Array.isArray(e),"module path must be a string or an Array."),om(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Zw(this,this.state,e,this._modules.get(e),s.preserveState),dA(this,this.state)},$p.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&om(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=hA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),mq(this)},$p.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&om(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$p.prototype.hotUpdate=function(e){this._modules.update(e),mq(this,!0)},$p.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties($p.prototype,mA);var LUt=zUt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!Eq(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),BUt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var y=this.$store.commit;if(e){var h=OUt(this.$store,"mapMutations",e);if(!h)return;y=h.context.commit}return typeof m=="function"?m.apply(this,[y].concat(g)):y.apply(this.$store,[m].concat(g))}}),s});function BUt(e){return Eq(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function Eq(e){return Array.isArray(e)||pq(e)}function zUt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function OUt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const DUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function NUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...g)=>m.tooltipClick&&m.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>m.closeClick&&m.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const FUt=x_(DUt,[["render",NUt],["__scopeId","data-v-cc97d3a4"]]),RUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,VUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,jUt="https://apis.golstats.com",UUt="https://dev-apis.golstats.com";function GUt(e,o,s=!1){if(!o||o===1)return e;const B=s?UUt:jUt,U=e.match(RUt);if(U){const g=e.replace(U[0],"");return`${B}/${o}/${g}`}const m=e.match(VUt);if(m){const g=e.replace(m[0],"");return`${B}/${o}/${g}`}return e}const HUt=1e3,Mq=HUt*60,gA=Mq*60,Iq=gA*24,ZUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/Iq);o=o-s*Iq;const B=Math.floor(o/gA);o=o-B*gA;const U=Math.floor(o/Mq);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function qUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function WUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const yA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},JUt="/icn-play.svg",YUt="/icn-tiros-de-esquina.svg",XUt="/icn-tiro-a-porteria.svg",$Ut="/icn-cambio.svg",KUt="/icn-falta.svg",QUt="/atajada.svg",eGt="/fuera-de-lugar.svg",vA="/gol.svg",tGt="/var.png",aGt="/tiempo-agregado.svg",rGt="/jugada-peligrosa.svg",nGt="/penal-marcado.svg",iGt="/penal-fallado.svg",oGt="/inicia-el-partido.svg",sGt="/fin-del-partido.svg",lGt="/icn-tarjeta-amarilla.svg",cGt="/icn-tarjeta-roja.svg",uGt=[1,2,3,4,6],dGt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return yA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):yA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):yA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>WUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||uGt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...LUt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},hGt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),pGt={class:"time-line-event__details"},fGt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},mGt=["src"],gGt=hGt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),yGt={class:"time-line-event__details__info"},vGt={key:0,class:"time-line-event__details__info__header__players"},bGt={class:"time-line-event__details__info__header__players__div-img"},_Gt=["src"],xGt={class:"time-line-event__details__info__body"},wGt={class:"time-line-event__details__info__body__comment"},kGt={class:"time-line-event__minute__container"},SGt={class:"time-line-event__minute__container__text"},CGt={class:"time-line-event__minute__container__icon-container"},TGt={class:"time-line-event__minute__container__icon-container__icon"},AGt={key:0,src:YUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EGt={key:1,src:XUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MGt={key:2,src:$Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},IGt={key:3,src:KUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},PGt={key:4,src:QUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LGt={key:5,src:eGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BGt={key:6,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zGt={key:7,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OGt={key:8,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DGt={key:9,src:tGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NGt={key:10,src:aGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FGt={key:11,src:rGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RGt={key:12,src:nGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VGt={key:13,src:iGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jGt={key:14,src:oGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UGt={key:15,src:sGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GGt={key:16,src:lGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HGt={key:17,src:cGt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ZGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function qGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",pGt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",fGt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,mGt)]),gGt])):t.createCommentVNode("",!0),t.createElementVNode("div",yGt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",vGt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",bGt,[t.createElementVNode("img",{src:g,alt:""},null,8,_Gt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:JUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",xGt,[t.createElementVNode("div",wGt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",kGt,[t.createElementVNode("div",SGt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",CGt,[t.createElementVNode("div",TGt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",AGt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",EGt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",MGt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",IGt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",PGt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",LGt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",BGt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",zGt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",OGt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",DGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",NGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",FGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",RGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",VGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",jGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",UGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",HGt)):(t.openBlock(),t.createElementBlock("img",ZGt))])])])],2)],6)}const WGt=x_(dGt,[["render",qGt],["__scopeId","data-v-dff2f5b8"]]),JGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},YGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let Ww=null;const XGt={name:"TimeLine",components:{Tooltip:FUt,TimeLineEvent:WGt},mixins:[ZUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":JGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=GUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await uq.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)Ww=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),Ww.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=YGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return qUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){Ww&&Ww.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},Pq=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),$Gt={ref:"timeLine",class:"time-line"},KGt={class:"time-line__header"},QGt={class:"time-line__header__dot"},eHt={class:"time-line__header__dot__home-team team-logo"},tHt=["src"],aHt={class:"time-line__header__dot__away-team team-logo"},rHt=["src"],nHt={key:1,class:"start-line"},iHt=Pq(()=>t.createElementVNode("div",null,null,-1)),oHt=Pq(()=>t.createElementVNode("div",null,null,-1)),sHt=[iHt,oHt],lHt={key:1,class:"noEventText"},cHt={class:"tooltip-data"},uHt=["src"];function dHt(e,o,s,B,U,m){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",$Gt,[t.createElementVNode("div",KGt,[t.createElementVNode("div",QGt,[t.createElementVNode("div",eHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,tHt)]),t.createElementVNode("div",aHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,rHt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(y,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(y,h))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(y))},[t.createVNode(g,{"game-event":y,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,h),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&h===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",nHt,sHt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",lHt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",cHt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,uHt)])])]),_:1},8,["data"])],64)}const hHt=x_(XGt,[["render",dHt],["__scopeId","data-v-a81f7bcf"]]),pHt={class:"game-time-line__options"},fHt={class:"game-time-line__timeline"},mHt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;uq.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=fUt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),y=t.ref({}),h=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),v=t.computed(()=>r.value<500);function x(i){a.value=i}function f(i){y.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=h.value.clientWidth}),U.observe(h.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(h.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:h,class:"game-time-line"},[t.createElementVNode("div",pHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rVt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fHt,[t.createVNode(hHt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":v.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:f},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},gHt=x_(mHt,[["__scopeId","data-v-691198f5"]]),Saa="",yHt={class:"game-data__header"},vHt={class:"game-data__header__tournament-season-dropdown"},bHt={class:"game-data__header__teams-carousel"},_Ht={class:"game-data__body"},xHt={key:0,class:"no-stats-container"},wHt={key:1,class:"no-stats-container-mobile"},kHt={class:"game-data__body__menu"},SHt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const CHt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fue,GSCGameTimeLine:gHt,GscSwitchComponent:sC,GSCLineupsMain:o4e,GSCPositining:Y_t,GSCDatosGSMain:DEe,GSCVideoGame:cUe,ModalEvents:CN,GSCTacticaFijaMain:tVt,GSCProminentMain:yut,GSCComparative:kpt}}),THt=Ki(Object.assign(CHt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=gp();let B=null;Rd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(z2(Mx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await qne(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const g=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),y=t.ref({}),h=t.ref(!1),r=t.ref({}),_=t.ref(1),v=t.ref(0),x=3e4,f=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,b=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const Z=t.ref(0);let G=null;const H=t.ref(null),$=t.ref(0),ie=t.ref(N.value[0]),W=t.ref([]);let K=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return y.value&&y.value.id&&(mt.push({id:y.value.id,name:y.value.name,type:y.value.type}),y.value.related_seasons&&y.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),ee=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return mt.teamId}return 0});function ce(){h.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ne(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${g.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(console.log("nombre de los datos live plays",It),M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)(It.data.plays[Ot].category_id==42||It.data.plays[Ot].category_id==9)&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_id==8&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){h.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){G=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),G.observe(H.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,v.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=v.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=v.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),Z.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=r8();It.disconnected?n8():It.connected&&r.value.game_id&&o8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),i8();mt!==bt&&(Z.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((y.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ie.value=N.value[0]}function ge(mt){console.log("objVR: -------------Z",mt),mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,Array.isArray(mt.gameIds)&&(mt.gameIds=mt.gameIds.map(bt=>Number(bt))),mt.seasonId!=null&&(mt.seasonId=Number(mt.seasonId)),!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function We(mt){y.value.id!==mt.id&&(y.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)if(qe(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}qe(new Set)}return Q}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return W.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ie.value.id===2||ie.value.id===7||ie.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function qe(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ie.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ie.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}s8()});function tt(mt){if(mt.playingAs||(mt.playingAs=ee.value?mt.home_team.team_id===ee.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?n8():i8()}function ht(mt){W.value=mt.map(bt=>{const It={...bt};return ee.value&&(It.playingAs=It.home_team.team_id===ee.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",yHt,[t.withDirectives(t.createElementVNode("div",vHt,[t.createVNode(t.unref(NA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(VA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:We},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",bHt,[t.createVNode(t.unref(_ee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":ee.value,"only-games-team-id":ee.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),h.value?(t.openBlock(),t.createBlock(CN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",_Ht,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",xHt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",wHt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",kHt,[t.createElementVNode("div",SHt,[t.createVNode(t.unref(sC),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ie.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ie.value.componentName),{key:Z.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ne,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:y.value,tournamentSelected:a.value,"tournament-select-props":e.tournamentSelectProps,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":f,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":b,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!y.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":ee.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","tournament-select-props","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-61c99096"]]);async function Lq({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(qy(U,o))).json()).data}catch(U){if(B)return Lq({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function AHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function EHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function MHt(e,o,s,B,U,m,g=!1){const a=s.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const h=m&&y[U.teamId]?y[U.teamId]!==m:!1,r=o===1?2:1;return(g||B.includes(y[U.gameId]))&&(!o||(h?r:o)===y[U.playingAs])&&(s.includes(y[U.matchResult])&&y[U.teamId]===m||a.includes(y[U.matchResult])&&y[U.teamId]!==m)})}function Bq(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function zq({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function IHt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function PHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function LHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const BHt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let bA=null;function Oq(){return bA||(bA=Jy(BHt)),bA}async function zHt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function Dq({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function OHt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function DHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const NHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return MHt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],Oq(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),g=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,g=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(g=a,U=B);return m[g]?m[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await Lq({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zq({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zHt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function FHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const RHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let _A=null;function VHt(){return _A||(_A=Jy(RHt)),_A}const xA=6;let Nq=xA;function jHt(e){Nq=Math.max(xA,Number(e)||xA)}class Jw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(Nq).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,g,a,y){let h=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?h=Array.from(o.reduce((_,v)=>{const x=v[s.playingAs]===1,f=x?"1":"2",n=_.get(v[s.gameId]);if(n)n[f]?n[f].arrayPlays.push(v):n[f]={numberTeamId:v[s.teamId],arrayPlays:[v]};else{const i={numberMatchResult:v[s.matchResult]};x&&(i[1]={numberTeamId:v[s.teamId],arrayPlays:[v]}),_.set(v[s.gameId],i)}return _},new Map).values()).reduce((_,v)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(v[1].numberTeamId===B.teamId||v[2].numberTeamId===B.teamId)||x!=="both"&&v[x].numberTeamId===B.teamId)&&B.matchResult.includes(v.numberMatchResult)&&_.push(...v[1].arrayPlays,...v[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(h=o?[...o]:[],a&&o&&(h=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(h,U,s,B.teamId,g,"accomplished",y)}setTeamRanking(o,s,B,U,m,g,a){let y=null,h=null;s===3&&(y=new Map,h={},o.forEach(v=>{const x=y.get(v[B.gameId]);x?x[v[B.teamId.toString()]]?x[v[B.teamId.toString()]]+=v[B.total]:x[v[B.teamId.toString()]]=v[B.total]:y.set(v[B.gameId],{[v[B.teamId.toString()]]:v[B.total]})}),Array.from(y.values()).forEach(v=>{const[x,f]=Object.keys(v).map(i=>i),n=v[x]+v[f];this.addPassesAvgByTeam(h,x,n?v[x]/n:0),this.addPassesAvgByTeam(h,f,n?v[f]/n:0)}));const r=m.sort((v,x)=>v.team_id-x.team_id).map(v=>{if(s===3){const x=h[v.team_id.toString()];return{teamId:v.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((f,n)=>n[B.teamId]===v.team_id&&s===n[B.categoryId]?f+n[B.total]:f,0);return{teamId:v.team_id,points:v[`${a}FilterGames`]?x/v[`${a}FilterGames`]:0,total:x}}}).sort((v,x)=>x.points-v.points);this.accomplished.arrayRankings=r;const _=r.findIndex(v=>v.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[g].ranking=_+1,this[g].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class UHt{constructor(o,s,B,U,m,g,a,y,h,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Jw);_u(this,"visitingTeam",new Jw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,g]of Object.entries(this.generalCategoriesIds))o===g&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===g&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(g=>{this.isAccomplishedPlay(g[U.categoryId])?this[o].increaseAccomplishedByOne(g[U.section],g[U.total]):this.isReceivedPlay(g[U.categoryId])&&this[o].increaseReceivedByOne(g[U.section],g[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):B[U.categoryId].includes(this.generalCategoriesIds.received)&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,g=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.visitingTeamType)}resetData(){this.homeTeam=new Jw,this.visitingTeam=new Jw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function GHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new UHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const HHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],ZHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let wA=null;function qHt(){return wA||(wA=Jy(ZHt)),wA}const WHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let kA=null;function JHt(){return kA||(kA=Jy(WHt)),kA}function Yw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function Fq(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function SA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function Rq(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}jHt(s)}function E_(e,o){const s=o[e.indexesTLP.playId];return e.isLive&&e.providerId===2?`${s}-${o[e.indexesTLP.categoryId]}`:s}const YHt=r8(),XHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],$Ht={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:Oq(),indexesTSP:VHt(),indexesLS:qHt(),indexesTLP:JHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,providerId:0,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return HHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return Bq(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return Bq(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},setProviderId(e,o){e.providerId=Number(o)||0},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&o8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],g=U.home_team===s.team_id;B.push({playingAs:g?1:2,matchResult:m===0?3:g?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&o8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=PI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=PI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,Rq(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,Rq(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){const B=E_(e,o);if(!e.livePlays.has(B)){e.livePlays.set(B,o);const U=Yw(o,e.indexesTLP,e.categoriesMap);for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))g.addLivePlay(e.gameForAnalysis.home_team===U[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",U[e.indexesTSP.teamId],U,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));if(Die(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=Yw(B,e.indexesTLP,e.categoriesMap),a=SA(B,g,e.indexesTLP),y=Yw(o,e.indexesTLP,e.categoriesMap),h=SA(o,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,s),h&&_.addLivePlay(m,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,s);e.livePlays.set(E_(e,o),o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(E_(e,B));const m=Yw(B,e.indexesTLP,e.categoriesMap),g=SA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),g&&y.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))B.push(g);o.rankingData.forEach(m=>{for(const g of B)if(g.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(g.id)?U.get(g.id).push(m):U.set(g.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=Fq(o)},setVisitingGames(e,o){e.visitingGames=Fq(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{e("setProviderId",o);const s=await jne(o),B=GHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,y=o.getIsDevApis,h=await DHt({gameId:s.gameId,providerId:a,isDevApis:y});if(h){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},g={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(h.data).length!==0){const r=_=>{const v=_.slice(),x=Number(v[0]);return Number.isNaN(x)||(v[0]=x),v};B=h.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=h.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=h.data.games,g=h.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",g)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:g,isLoginChanged:a=!1,defaultFilter:y=null,gameInfo:h=null,isCupGame:r=!1}){try{let _={},v=e.seasonId!==Number(g);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const f=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),v&&s("setSeasonId",g),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&h&&(_=h),_&&h&&(_.game_status=_.game_status??h.game_status,_.is_live=_.is_live??h.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!y}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&f.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&f.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:f,defaultFilter:y}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),f.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(f)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:g,promises:a=[],defaultFilter:y=null}){let h=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),y&&a.push(FHt({...y,providerId:r,isDevApis:_})),h=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const g=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(y=>y.game_id===g);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LHt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:g,games:a,past_season_id:y,tournament_id:h}=await IHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=XHt.find(_=>_.id===h);return r&&e("setCurrentTournamentName",r.name),e("setHome",g[0]),e("setAway",g[1]),o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,v)=>(v.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:g}=await zq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",g),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,y)=>(y.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await OHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,g=await EHt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",g),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await Dq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await Dq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await AHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,g=await PHt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,g.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),YHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function KHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const QHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await KHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function eZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function tZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const Vq=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},jq=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),g=o.sections.includes(B.section);return U&&m&&g});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function Uq(e,o){let s=o*-1;return Math.ceil10(e,s)}const zf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Of(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const aZt={...QHt,...NHt,...$Ht,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:O2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return jq(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return jq(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return Uq(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return Uq(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Of(e.xgCategories,zf.goals),B=Of(e.xgCategories,zf.shots),U=Of(e.xgCategories,zf.head),m=Of(e.xgCategories,zf.penalties),g=o.local_team.map(l=>Vq(o.data_headers,l)),a=[],y=[],h=[],r=[],_=new Set;g.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?y.push(l):U.has(l.category_id)?h.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...y,...a,...h,...r];const v=o.visiting_team.map(l=>Vq(o.data_headers,l)),x=new Set,f=[],n=[],i=[],c=[];v.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),f.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...f,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await Zne(s);e("setXgCategories",(B==null?void 0:B.categories)??O2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:g=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,y=s.getIsDevApis;await o("loadXgCategories");let h={};g?h=await tZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}):h=await eZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}),e("setPlays",h)}catch(a){return Promise.reject(a)}}}}}};function rZt(e){for(const[o,s]of Object.entries(aZt))e.hasModule(o)||e.registerModule(o,s)}const nZt={class:"subcategory-group"},iZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},oZt=ic(iZt,[["__scopeId","data-v-ae6f3d72"]]),sZt={class:"filter-subcategories"},lZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",sZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(oZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Xw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),cZt={class:"details__header"},uZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),dZt={class:"details__header__checkbox"},hZt={class:"details__body"},pZt={class:"details__body__playing-as"},fZt=["onClick"],mZt={class:"details__header"},gZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),yZt={class:"details__header__checkbox"},vZt={class:"details__body"},bZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),_Zt={class:"details__body__game-section"},xZt=["onClick"],wZt={class:"details__body"},kZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),SZt={class:"details__body__game-section"},CZt=["onClick"],TZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",cZt,[uZt,t.createElementVNode("div",dZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",hZt,[t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,fZt))),128))])]),t.createElementVNode("div",mZt,[gZt,t.createElementVNode("div",yZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",vZt,[bZt,t.createElementVNode("div",_Zt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,xZt))),128))])]),t.createElementVNode("div",wZt,[kZt,t.createElementVNode("div",SZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,CZt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),AZt={class:"filter-field"},EZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",AZt,[t.createVNode(t.unref(ZF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),MZt={class:"subcategory-group"},IZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",MZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(ql),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},PZt=oc(IZt,[["__scopeId","data-v-85bc2114"]]),LZt={class:"filter-subcategories"},BZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",LZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(PZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),$w=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),zZt={class:"details__header"},OZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),DZt={class:"details__header__checkbox"},NZt={class:"details__body"},FZt={class:"details__body__playing-as"},RZt=["onClick"],VZt={class:"details__header"},jZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),UZt={class:"details__header__checkbox"},GZt={class:"details__body"},HZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ZZt={class:"details__body__game-section"},qZt=["onClick"],WZt={class:"details__body"},JZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),YZt={class:"details__body__game-section"},XZt=["onClick"],$Zt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",zZt,[OZt,t.createElementVNode("div",DZt,[t.createVNode(t.unref(ql),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",NZt,[t.createElementVNode("div",FZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,RZt))),128))])]),t.createElementVNode("div",VZt,[jZt,t.createElementVNode("div",UZt,[t.createVNode(t.unref(ql),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",GZt,[HZt,t.createElementVNode("div",ZZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,qZt))),128))])]),t.createElementVNode("div",WZt,[JZt,t.createElementVNode("div",YZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,XZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),KZt={class:"filter-field"},QZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",KZt,[t.createVNode(t.unref(RG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=THt,Nd.connectSocket=n8,Nd.disconnectSocket=i8,Nd.getSocket=r8,Nd.registerStoreModules=rZt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});
8207
+ */var hq="store";function fUt(e){return e===void 0&&(e=null),t.inject(e!==null?e:hq)}function Rg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function pq(e){return e!==null&&typeof e=="object"}function mUt(e){return e&&typeof e.then=="function"}function om(e,o){if(!e)throw new Error("[vuex] "+o)}function gUt(e,o){return function(){return e(o)}}function fq(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var B=o.indexOf(e);B>-1&&o.splice(B,1)}}function mq(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;Zw(e,s,[],e._modules.root,!0),dA(e,s,o)}function dA(e,o,s){var B=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var U=e._wrappedGetters,m={};Rg(U,function(g,a){m[a]=gUt(g,e),Object.defineProperty(e.getters,a,{get:function(){return m[a]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&xUt(e),B&&s&&e._withCommit(function(){B.data=null})}function Zw(e,o,s,B,U){var m=!s.length,g=e._modules.getNamespace(s);if(B.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=B),!m&&!U){var a=hA(o,s.slice(0,-1)),y=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&y in a&&console.warn('[vuex] state field "'+y+'" was overridden by a module with the same name at "'+s.join(".")+'"'),a[y]=B.state})}var h=B.context=yUt(e,g,s);B.forEachMutation(function(r,_){var v=g+_;vUt(e,v,r,h)}),B.forEachAction(function(r,_){var v=r.root?_:g+_,x=r.handler||r;bUt(e,v,x,h)}),B.forEachGetter(function(r,_){var v=g+_;_Ut(e,v,r,h)}),B.forEachChild(function(r,_){Zw(e,o,s.concat(_),r,U)})}function yUt(e,o,s){var B=o==="",U={dispatch:B?e.dispatch:function(m,g,a){var y=qw(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+y.type+", global type: "+_);return}return e.dispatch(_,h)},commit:B?e.commit:function(m,g,a){var y=qw(m,g,a),h=y.payload,r=y.options,_=y.type;if((!r||!r.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+y.type+", global type: "+_);return}e.commit(_,h,r)}};return Object.defineProperties(U,{getters:{get:B?function(){return e.getters}:function(){return gq(e,o)}},state:{get:function(){return hA(e.state,s)}}}),U}function gq(e,o){if(!e._makeLocalGettersCache[o]){var s={},B=o.length;Object.keys(e.getters).forEach(function(U){if(U.slice(0,B)===o){var m=U.slice(B);Object.defineProperty(s,m,{get:function(){return e.getters[U]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function vUt(e,o,s,B){var U=e._mutations[o]||(e._mutations[o]=[]);U.push(function(m){s.call(e,B.state,m)})}function bUt(e,o,s,B){var U=e._actions[o]||(e._actions[o]=[]);U.push(function(m){var g=s.call(e,{dispatch:B.dispatch,commit:B.commit,getters:B.getters,state:B.state,rootGetters:e.getters,rootState:e.state},m);return mUt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function _Ut(e,o,s,B){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(U){return s(B.state,B.getters,U.state,U.getters)}}function xUt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&om(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function hA(e,o){return o.reduce(function(s,B){return s[B]},e)}function qw(e,o,s){return pq(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&om(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var wUt="vuex bindings",yq="vuex:mutations",pA="vuex:actions",y2="vuex",kUt=0;function SUt(e,o){pUt({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[wUt]},function(s){s.addTimelineLayer({id:yq,label:"Vuex Mutations",color:vq}),s.addTimelineLayer({id:pA,label:"Vuex Actions",color:vq}),s.addInspector({id:y2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(B){if(B.app===e&&B.inspectorId===y2)if(B.filter){var U=[];wq(U,o._modules.root,B.filter,""),B.rootNodes=U}else B.rootNodes=[xq(o._modules.root,"")]}),s.on.getInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId;gq(o,U),B.state=AUt(MUt(o._modules,U),U==="root"?o.getters:o._makeLocalGettersCache,U)}}),s.on.editInspectorState(function(B){if(B.app===e&&B.inspectorId===y2){var U=B.nodeId,m=B.path;U!=="root"&&(m=U.split("/").filter(Boolean).concat(m)),o._withCommit(function(){B.set(o._state.data,m,B.state.value)})}}),o.subscribe(function(B,U){var m={};B.payload&&(m.payload=B.payload),m.state=U,s.notifyComponentUpdate(),s.sendInspectorTree(y2),s.sendInspectorState(y2),s.addTimelineEvent({layerId:yq,event:{time:Date.now(),title:B.type,data:m}})}),o.subscribeAction({before:function(B,U){var m={};B.payload&&(m.payload=B.payload),B._id=kUt++,B._time=Date.now(),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:B._time,title:B.type,groupId:B._id,subtitle:"start",data:m}})},after:function(B,U){var m={},g=Date.now()-B._time;m.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},B.payload&&(m.payload=B.payload),m.state=U,s.addTimelineEvent({layerId:pA,event:{time:Date.now(),title:B.type,groupId:B._id,subtitle:"end",data:m}})}})})}var vq=8702998,CUt=6710886,TUt=16777215,bq={label:"namespaced",textColor:TUt,backgroundColor:CUt};function _q(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xq(e,o){return{id:o||"root",label:_q(o),tags:e.namespaced?[bq]:[],children:Object.keys(e._children).map(function(s){return xq(e._children[s],o+s+"/")})}}function wq(e,o,s,B){B.includes(s)&&e.push({id:B||"root",label:B.endsWith("/")?B.slice(0,B.length-1):B||"Root",tags:o.namespaced?[bq]:[]}),Object.keys(o._children).forEach(function(U){wq(e,o._children[U],s,B+U+"/")})}function AUt(e,o,s){o=s==="root"?o:o[s];var B=Object.keys(o),U={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(B.length){var m=EUt(o);U.getters=Object.keys(m).map(function(g){return{key:g.endsWith("/")?_q(g):g,editable:!1,value:fA(function(){return m[g]})}})}return U}function EUt(e){var o={};return Object.keys(e).forEach(function(s){var B=s.split("/");if(B.length>1){var U=o,m=B.pop();B.forEach(function(g){U[g]||(U[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),U=U[g]._custom.value}),U[m]=fA(function(){return e[s]})}else o[s]=fA(function(){return e[s]})}),o}function MUt(e,o){var s=o.split("/").filter(function(B){return B});return s.reduce(function(B,U,m){var g=B[U];if(!g)throw new Error('Missing module "'+U+'" for path "'+o+'".');return m===s.length-1?g:g._children},o==="root"?e:e.root._children)}function fA(e){try{return e()}catch(o){return o}}var sm=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},kq={namespaced:{configurable:!0}};kq.namespaced.get=function(){return!!this._rawModule.namespaced},sm.prototype.addChild=function(e,o){this._children[e]=o},sm.prototype.removeChild=function(e){delete this._children[e]},sm.prototype.getChild=function(e){return this._children[e]},sm.prototype.hasChild=function(e){return e in this._children},sm.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},sm.prototype.forEachChild=function(e){Rg(this._children,e)},sm.prototype.forEachGetter=function(e){this._rawModule.getters&&Rg(this._rawModule.getters,e)},sm.prototype.forEachAction=function(e){this._rawModule.actions&&Rg(this._rawModule.actions,e)},sm.prototype.forEachMutation=function(e){this._rawModule.mutations&&Rg(this._rawModule.mutations,e)},Object.defineProperties(sm.prototype,kq);var Vg=function(e){this.register([],e,!1)};Vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},Vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,B){return o=o.getChild(B),s+(o.namespaced?B+"/":"")},"")},Vg.prototype.update=function(e){Sq([],this.root,e)},Vg.prototype.register=function(e,o,s){var B=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&Aq(e,o);var U=new sm(o,s);if(e.length===0)this.root=U;else{var m=this.get(e.slice(0,-1));m.addChild(e[e.length-1],U)}o.modules&&Rg(o.modules,function(g,a){B.register(e.concat(a),g,s)})},Vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],B=o.getChild(s);if(!B){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}B.runtime&&o.removeChild(s)},Vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function Sq(e,o,s){if(process.env.NODE_ENV!=="production"&&Aq(e,s),o.update(s),s.modules)for(var B in s.modules){if(!o.getChild(B)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+B+"' on hot reloading, manual reload is needed");return}Sq(e.concat(B),o.getChild(B),s.modules[B])}}var Cq={assert:function(e){return typeof e=="function"},expected:"function"},IUt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},Tq={getters:Cq,mutations:Cq,actions:IUt};function Aq(e,o){Object.keys(Tq).forEach(function(s){if(o[s]){var B=Tq[s];Rg(o[s],function(U,m){om(B.assert(U),PUt(e,s,m,U,B.expected))})}})}function PUt(e,o,s,B,U){var m=o+" should be "+U+' but "'+o+"."+s+'"';return e.length>0&&(m+=' in module "'+e.join(".")+'"'),m+=" is "+JSON.stringify(B)+".",m}var $p=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(om(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),om(this instanceof e,"store must be called with the new operator."));var B=o.plugins;B===void 0&&(B=[]);var U=o.strict;U===void 0&&(U=!1);var m=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=m;var g=this,a=this,y=a.dispatch,h=a.commit;this.dispatch=function(_,v){return y.call(g,_,v)},this.commit=function(_,v,x){return h.call(g,_,v,x)},this.strict=U;var r=this._modules.root.state;Zw(this,r,[],this._modules.root),dA(this,r),B.forEach(function(_){return _(s)})},mA={state:{configurable:!0}};$p.prototype.install=function(e,o){e.provide(o||hq,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&SUt(e,this)},mA.state.get=function(){return this._state.data},mA.state.set=function(e){process.env.NODE_ENV!=="production"&&om(!1,"use store.replaceState() to explicit replace store state.")},$p.prototype.commit=function(e,o,s){var B=this,U=qw(e,o,s),m=U.type,g=U.payload,a=U.options,y={type:m,payload:g},h=this._mutations[m];if(!h){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+m);return}this._withCommit(function(){h.forEach(function(r){r(g)})}),this._subscribers.slice().forEach(function(r){return r(y,B.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+m+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$p.prototype.dispatch=function(e,o){var s=this,B=qw(e,o),U=B.type,m=B.payload,g={type:U,payload:m},a=this._actions[U];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+U);return}try{this._actionSubscribers.slice().filter(function(h){return h.before}).forEach(function(h){return h.before(g,s.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(h))}var y=a.length>1?Promise.all(a.map(function(h){return h(m)})):a[0](m);return new Promise(function(h,r){y.then(function(_){try{s._actionSubscribers.filter(function(v){return v.after}).forEach(function(v){return v.after(g,s.state)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(v))}h(_)},function(_){try{s._actionSubscribers.filter(function(v){return v.error}).forEach(function(v){return v.error(g,s.state,_)})}catch(v){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(v))}r(_)})})},$p.prototype.subscribe=function(e,o){return fq(e,this._subscribers,o)},$p.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return fq(s,this._actionSubscribers,o)},$p.prototype.watch=function(e,o,s){var B=this;return process.env.NODE_ENV!=="production"&&om(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(B.state,B.getters)},o,Object.assign({},s))},$p.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},$p.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(om(Array.isArray(e),"module path must be a string or an Array."),om(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),Zw(this,this.state,e,this._modules.get(e),s.preserveState),dA(this,this.state)},$p.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&om(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=hA(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),mq(this)},$p.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&om(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$p.prototype.hotUpdate=function(e){this._modules.update(e),mq(this,!0)},$p.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties($p.prototype,mA);var LUt=zUt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!Eq(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),BUt(o).forEach(function(B){var U=B.key,m=B.val;s[U]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var y=this.$store.commit;if(e){var h=OUt(this.$store,"mapMutations",e);if(!h)return;y=h.context.commit}return typeof m=="function"?m.apply(this,[y].concat(g)):y.apply(this.$store,[m].concat(g))}}),s});function BUt(e){return Eq(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function Eq(e){return Array.isArray(e)||pq(e)}function zUt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function OUt(e,o,s){var B=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!B&&console.error("[vuex] module namespace not found in "+o+"(): "+s),B}const DUt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function NUt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",m.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",m.showTooltip]),onClick:o[1]||(o[1]=(...g)=>m.tooltipClick&&m.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>m.closeClick&&m.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const FUt=x_(DUt,[["render",NUt],["__scopeId","data-v-cc97d3a4"]]),RUt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,VUt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,jUt="https://apis.golstats.com",UUt="https://dev-apis.golstats.com";function GUt(e,o,s=!1){if(!o||o===1)return e;const B=s?UUt:jUt,U=e.match(RUt);if(U){const g=e.replace(U[0],"");return`${B}/${o}/${g}`}const m=e.match(VUt);if(m){const g=e.replace(m[0],"");return`${B}/${o}/${g}`}return e}const HUt=1e3,Mq=HUt*60,gA=Mq*60,Iq=gA*24,ZUt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/Iq);o=o-s*Iq;const B=Math.floor(o/gA);o=o-B*gA;const U=Math.floor(o/Mq);return`${s?`${s} dias `:""}${B<10?`0${B}`:B}:${U<10?`0${U}`:U} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function qUt(e,o){return`${o==1?{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/":"https://golstatsimages.blob.core.windows.net/teams-80/"+o+"/"}${e}.png`}function WUt(e,o){return`${o==1?{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/":"https://golstatsimages.blob.core.windows.net/players-profile/"+o+"/"}${e}.png`}const yA={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},JUt="/icn-play.svg",YUt="/icn-tiros-de-esquina.svg",XUt="/icn-tiro-a-porteria.svg",$Ut="/icn-cambio.svg",KUt="/icn-falta.svg",QUt="/atajada.svg",eGt="/fuera-de-lugar.svg",vA="/gol.svg",tGt="/var.png",aGt="/tiempo-agregado.svg",rGt="/jugada-peligrosa.svg",nGt="/penal-marcado.svg",iGt="/penal-fallado.svg",oGt="/inicia-el-partido.svg",sGt="/fin-del-partido.svg",lGt="/icn-tarjeta-amarilla.svg",cGt="/icn-tarjeta-roja.svg",uGt=[1,2,3,4,6],dGt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},provider:{type:Number,default:0},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return yA.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):yA.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):yA.RED_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(o=>WUt(o,this.provider))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||uGt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...LUt("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},hGt=e=>(t.pushScopeId("data-v-dff2f5b8"),e=e(),t.popScopeId(),e),pGt={class:"time-line-event__details"},fGt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},mGt=["src"],gGt=hGt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),yGt={class:"time-line-event__details__info"},vGt={key:0,class:"time-line-event__details__info__header__players"},bGt={class:"time-line-event__details__info__header__players__div-img"},_Gt=["src"],xGt={class:"time-line-event__details__info__body"},wGt={class:"time-line-event__details__info__body__comment"},kGt={class:"time-line-event__minute__container"},SGt={class:"time-line-event__minute__container__text"},CGt={class:"time-line-event__minute__container__icon-container"},TGt={class:"time-line-event__minute__container__icon-container__icon"},AGt={key:0,src:YUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EGt={key:1,src:XUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MGt={key:2,src:$Ut,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},IGt={key:3,src:KUt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},PGt={key:4,src:QUt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LGt={key:5,src:eGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},BGt={key:6,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zGt={key:7,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OGt={key:8,src:vA,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DGt={key:9,src:tGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},NGt={key:10,src:aGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FGt={key:11,src:rGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RGt={key:12,src:nGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},VGt={key:13,src:iGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jGt={key:14,src:oGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UGt={key:15,src:sGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GGt={key:16,src:lGt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HGt={key:17,src:cGt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ZGt={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function qGt(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",m.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:U.gameEventKey},[t.createElementVNode("div",pGt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",fGt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,mGt)]),gGt])):t.createCommentVNode("",!0),t.createElementVNode("div",yGt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",m.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",vGt,[m.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(m.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",bGt,[t.createElementVNode("img",{src:g,alt:""},null,8,_Gt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",m.nameClasses]),onClick:o[1]||(o[1]=g=>m.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:JUt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",xGt,[t.createElementVNode("div",wGt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",m.minuteClasses])},[t.createElementVNode("div",kGt,[t.createElementVNode("div",SGt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",CGt,[t.createElementVNode("div",TGt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",AGt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",EGt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",MGt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",IGt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",PGt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",LGt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",BGt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",zGt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",OGt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",DGt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",NGt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",FGt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",RGt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",VGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",jGt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",UGt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GGt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",HGt)):(t.openBlock(),t.createElementBlock("img",ZGt))])])])],2)],6)}const WGt=x_(dGt,[["render",qGt],["__scopeId","data-v-dff2f5b8"]]),JGt={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},YGt={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let Ww=null;const XGt={name:"TimeLine",components:{Tooltip:FUt,TimeLineEvent:WGt},mixins:[ZUt],props:{gameData:{type:Object,required:!0},providerId:{type:Number,default:0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":JGt[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,B=GUt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:U}}=await uq.get(B);return U}catch(o){throw new Error(o)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)Ww=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),Ww.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],B=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,U=e+12;s&&(s.style.height=`${U}px`),B&&(B.style.height=`${U}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=YGt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return qUt(o,this.$store.getters.getProviderId)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){Ww&&Ww.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},Pq=e=>(t.pushScopeId("data-v-a81f7bcf"),e=e(),t.popScopeId(),e),$Gt={ref:"timeLine",class:"time-line"},KGt={class:"time-line__header"},QGt={class:"time-line__header__dot"},eHt={class:"time-line__header__dot__home-team team-logo"},tHt=["src"],aHt={class:"time-line__header__dot__away-team team-logo"},rHt=["src"],nHt={key:1,class:"start-line"},iHt=Pq(()=>t.createElementVNode("div",null,null,-1)),oHt=Pq(()=>t.createElementVNode("div",null,null,-1)),sHt=[iHt,oHt],lHt={key:1,class:"noEventText"},cHt={class:"tooltip-data"},uHt=["src"];function dHt(e,o,s,B,U,m){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",$Gt,[t.createElementVNode("div",KGt,[t.createElementVNode("div",QGt,[t.createElementVNode("div",eHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("homeTeam"),alt:""},null,8,tHt)]),t.createElementVNode("div",aHt,[t.createElementVNode("img",{src:m.getTeamLogoSrc("awayTeam"),alt:""},null,8,rHt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${U.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:U.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.gameEventsToShow,(y,h)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:y.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${h}`,class:t.normalizeClass(m.getGameEventClassAndSetIcon(y,h))},[t.createElementVNode("div",{class:t.normalizeClass(m.getEventContainerClass(y))},[t.createVNode(g,{"game-event":y,"is-mobile":m.isMobile,provider:e.$store.getters.getProviderId,"time-line-width":U.timeLineWidth,width:m.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:r=>m.updateContainerHeight(r,h),onPlayerChanged:o[0]||(o[0]=r=>e.$emit("player-changed",r)),onThumbnailClick:m.thumbnailClick},null,8,["game-event","is-mobile","provider","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),h>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${h}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&h===m.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",nHt,sHt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",lHt,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:U.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",cHt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:U.dataVideo.link,format:"video/mp4"},null,8,uHt)])])]),_:1},8,["data"])],64)}const hHt=x_(XGt,[["render",dHt],["__scopeId","data-v-a81f7bcf"]]),pHt={class:"game-time-line__options"},fHt={class:"game-time-line__timeline"},mHt={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;uq.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),B=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let U=null;const m=fUt();m.commit("setProviderId",o.providerId),m.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),a=t.ref("Todo"),y=t.ref({}),h=t.ref(null),r=t.ref(0),_=t.computed(()=>{let i="all";return a.value==="1er tiempo"||a.value==="1er"?i="firstHalf":(a.value==="2do tiempo"||a.value==="2do")&&(i="secondHalf"),i}),v=t.computed(()=>r.value<500);function x(i){a.value=i}function f(i){y.value=i}function n(){if(window.ResizeObserver)U=new ResizeObserver(()=>{r.value=h.value.clientWidth}),U.observe(h.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{U&&U.unobserve(h.value)}),(i,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:h,class:"game-time-line"},[t.createElementVNode("div",pHt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rVt,t.mergeProps(r.value<390?B.value:s.value,{text:l=="Todo"?l:r.value<390?l.substring(0,3):l,"is-active":a.value===l,onClick:d=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fHt,[t.createVNode(hHt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":v.value,socket:e.socket,provider:e.providerId,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:f},null,8,["game-data","time-line-period","is-mobile","socket","provider","can-play-videos"])])],512))}},gHt=x_(mHt,[["__scopeId","data-v-691198f5"]]),Saa="",yHt={class:"game-data__header"},vHt={class:"game-data__header__tournament-season-dropdown"},bHt={class:"game-data__header__teams-carousel"},_Ht={class:"game-data__body"},xHt={key:0,class:"no-stats-container"},wHt={key:1,class:"no-stats-container-mobile"},kHt={class:"game-data__body__menu"},SHt={class:"game-data__body__menu__contmenuswitch"};pu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const CHt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Fue,GSCGameTimeLine:gHt,GscSwitchComponent:sC,GSCLineupsMain:o4e,GSCPositining:Y_t,GSCDatosGSMain:DEe,GSCVideoGame:cUe,ModalEvents:CN,GSCTacticaFijaMain:tVt,GSCProminentMain:yut,GSCComparative:kpt}}),THt=Ki(Object.assign(CHt,{props:{tournamentsApiUrl:{type:String,default:""},tournamentSelectProps:{type:Object,default:null},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=gp();let B=null;Rd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)});const U=e,m=t.ref(z2(Mx));t.watch(()=>U.providerId,async mt=>{s.commit("setProviderId",mt),s.commit("setIsDevApis",U.isDevApis),m.value=await qne(mt)},{immediate:!0}),t.provide("playOffAbbreviationsStructure",m);const g=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),a=t.ref({season:[]}),y=t.ref({}),h=t.ref(!1),r=t.ref({}),_=t.ref(1),v=t.ref(0),x=3e4,f=3e4,n=3e4,i=3e4,c=3e4,l=3e4,d=3e4,b=3e4,w=6e4,C=t.ref(null),E=t.ref(null),A=t.ref(null),P=t.ref([]),L=t.ref(null),T=t.ref(!0),I=t.ref(new Set([1,2])),M=t.ref({}),S=t.ref({minute:"",recent_lapse:0,score:{}}),z=t.ref(0),k=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),O=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),N=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),j=t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(U.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:U.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const Z=t.ref(0);let G=null;const H=t.ref(null),$=t.ref(0),ie=t.ref(N.value[0]),W=t.ref([]);let K=t.ref("");const Q={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},X=t.computed(()=>{const mt=[];return y.value&&y.value.id&&(mt.push({id:y.value.id,name:y.value.name,type:y.value.type}),y.value.related_seasons&&y.value.related_seasons.forEach(bt=>{mt.push({id:bt.id,type:bt.type})})),mt}),ee=t.computed(()=>{if(U.clientPrivilegesBySeasons){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return mt.teamId}return 0});function ce(){h.value=!1}function de(mt){const bt=mt.split(",");return!(bt.length<2||bt[1].split(" ").length<2)}function he(mt){C.value=mt}function pe(mt){P.value.push(mt)}function re(mt){L.value=mt}function se(mt){A.value=mt}function ne(mt){E.value=mt}function me(mt){if(!de(mt))return"";const bt=ve(mt);return`${ye(mt)}. ${bt}`}function ye(mt){return mt.split(",")[1].split(" ")[1][0]}function ve(mt){const bt=mt.split(",")[0].split(" ");return bt[0].length<=3&&bt.length>1?`${bt[0]} ${bt[1]}`:bt[0]}async function we(mt){if(!(!mt||!mt.game_id))try{const bt=pu.create({headers:{Authorization:`${g.value}`}});M.value={};const It=await bt.get(uu("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+mt.game_id,U.providerId,U.isDevApis));if(console.log("nombre de los datos live plays",It),M.value[mt.home_team.team_id]=[],M.value[mt.home_team.team_id].team={name:mt.home_team.acronym,logo:mt.home_team.logo},M.value[mt.home_team.team_id].goals=[],M.value[mt.home_team.team_id].red=[],M.value[mt.home_team.team_id].yellow=[],M.value[mt.visiting_team.team_id]=[],M.value[mt.visiting_team.team_id].team={name:mt.visiting_team.acronym,logo:mt.visiting_team.logo},M.value[mt.visiting_team.team_id].goals=[],M.value[mt.visiting_team.team_id].red=[],M.value[mt.visiting_team.team_id].yellow=[],It.data.minute!=null&&(S.value={minute:It.data.minute,recent_lapse:It.data.recent_lapse,score:It.data.score}),It.data.plays)for(let Ot=0;Ot<It.data.plays.length;Ot++)(It.data.plays[Ot].category_id==42||It.data.plays[Ot].category_id==9)&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].red||(M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].red||(M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].red[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].category_id==8&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].yellow||(M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].yellow||(M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].yellow[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute))),It.data.plays[Ot].event_type_name=="Gol"&&It.data.plays[Ot].status==1&&(mt.home_team.team_id==It.data.plays[Ot].team_id?It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):It.data.plays[Ot].category_name=="Autogol"?(me(It.data.plays[Ot].player_name)in M.value[mt.home_team.team_id].goals||(M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.home_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)):(me(It.data.plays[Ot].player_name)in M.value[mt.visiting_team.team_id].goals||(M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)]={},M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event=[],M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].name=me(It.data.plays[Ot].player_name)),M.value[mt.visiting_team.team_id].goals[me(It.data.plays[Ot].player_name)].event.push(It.data.plays[Ot].minute)))}catch(bt){return Promise.reject(bt)}}function Se(mt){h.value=!0,mt.is_live!=1&&mt.game_status!=0&&(mt.game_status==4||Object.keys(mt.minutes).length>0)?(z.value=1,M.value={plays:mt.minutes,home_team:mt.home_team,visiting_team:mt.visiting_team}):(z.value=0,we(mt))}function Ce(){G=new ResizeObserver(mt=>{for(const bt of mt)$.value=bt.contentRect.width}),G.observe(H.value)}const Me=t.computed(()=>{let mt={};return r.value&&r.value.game_id&&(mt={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,regularSeasonId:r.value.regularSeasonId,matchday_name:r.value.matchday_name,status:r.value.game_status,score:r.value.score,game_status:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live,minutes:r.value.minutes}),mt});t.watch(()=>r.value.game_id,He,{immediate:!0}),t.watch(()=>r.value.is_live,Pe,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",U.socket.connected)},{deep:!0,immediate:!0});function Le(mt){_.value=mt.is_captured,v.value=mt.is_female,T.value=mt.is_captured!==0,a.value.id!==mt.id&&(a.value=mt,s.commit("gameGlobal/setTournamentType",mt.tournament_type))}const ze=o;function He(mt,bt){s.commit("nextGeneral/updateShowLiveData",!0);const It=v.value?"Destacados":"Destacadas";N.value.forEach(Ot=>{Ot.name===It&&(Ot.name=v.value?"Destacadas":"Destacados")}),we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team}),Ie(),Z.value+=1}function Pe(mt,bt){if(Ie(),s.state.nextGeneral.gameForAnalysis.is_live!==mt&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:r.value.is_live,game_status:r.value.game_status}),mt){const It=r8();It.disconnected?n8():It.connected&&r.value.game_id&&o8(`game.${r.value.game_id}.v2`),Ve(),B=setInterval(()=>{z.value=0,we({game_id:r.value.game_id,home_team:r.value.home_team,visiting_team:r.value.visiting_team})},6e4)}else Ve(),i8();mt!==bt&&(Z.value+=1)}function Ve(){B&&clearInterval(B)}function Ie(){N.value=[],r.value.is_live||r.value.game_status===4?N.value=[...O.value]:N.value=[...j.value],U.isWidget||((y.value.is_tactic_available===0||r.value.is_live||r.value.game_status===0)&&N.value.pop(),r.value.has_tracking===1&&!(r.value.is_live||r.value.game_status===4)&&N.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),ie.value=N.value[0]}function ge(mt){console.log("objVR: -------------Z",mt),mt.gameSeasonId=r.value.season_id,mt.gameRegularSeasonId=r.value.regularSeasonId,Array.isArray(mt.gameIds)&&(mt.gameIds=mt.gameIds.map(bt=>Number(bt))),mt.seasonId!=null&&(mt.seasonId=Number(mt.seasonId)),!(!mt.auxwidget&&Be.value&&!Be.value.canPrivilegesTeamPlayVideos)&&((r.value.is_live||r.value.game_status===0||r.value.game_status===1)&&(mt.gameIdsToFilter=[r.value.game_id]),mt.isLiveAccumulated&&(mt.gameIdsToFilter=null),(r.value.is_live||r.value.game_status===0)&&!mt.isLiveAccumulated&&(mt.liveGameConfig={gameId:r.value.game_id}),mt.fakeLiveConfig={gameId:r.value.game_id},ze("openmedia",mt))}function Ae(mt){ze("onOpenProfile",mt)}function ke(mt){ze("openProfileTeam",mt)}function je(mt){ze("openProfilePlayer",mt)}function De(mt){et(mt),mt=="Estadísticas"&&(K.value="Comparativa")}function Ne(){K.value=""}function We(mt){y.value.id!==mt.id&&(y.value=mt,ze("change-season-id",mt.id))}const Ze=t.computed(()=>N.value.reduce((mt,bt)=>(U.disabledSectionsIds.includes(bt.id)||Be.value&&!Be.value.isVideoTabVisible&&bt.id===2||U.clientPrivilegesBySeasons&&bt.id===7||(T.value||bt.id!==5&&bt.id!==6)&&mt.push(bt.name),mt),[]));function _e(mt){if(r.value.is_live||r.value.game_status===1||r.value.game_status===0){const bt=mt.playingAs.has(r.value.playingAs);return U.clientPrivilegesBySeasons.canPlayVideos&&bt}else{const bt=Re.value.filter(It=>mt.playingAs.has(It.playingAs));return U.clientPrivilegesBySeasons.canPlayVideos&&bt.length>0}}const Be=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value&&r.value&&r.value.game_id){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)if(qe(mt.playingAs),(r.value.is_live||r.value.game_status===1||r.value.game_status===0)&&s.state.nextGeneral.showLiveData){const bt=mt.playingAs.has(r.value.playingAs);return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:r.value.home_team.team_id===mt.teamId,homeTeamDetails:{canPlayVideos:bt,team:r.value.home_team},awayTeamDetails:{canPlayVideos:bt,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}else{const bt=r.value.home_team.team_id===mt.teamId,It=Re.value.filter(Gt=>mt.playingAs.has(Gt.playingAs));return{seasonAndPrivileges:mt,canPrivilegesTeamPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&It.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:bt,homeTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&bt&&It.length>0,team:r.value.home_team},awayTeamDetails:{canPlayVideos:U.clientPrivilegesBySeasons.canPlayVideos&&!bt&&It.length>0,team:r.value.visiting_team},isVideoTabVisible:_e(mt)}}qe(new Set)}return Q}return null}),Re=t.computed(()=>{if(U.clientPrivilegesBySeasons){if(y.value){const mt=U.clientPrivilegesBySeasons.seasonsAndPrivileges.get(y.value.id);if(mt)return W.value.filter(bt=>bt.game_status===1&&mt.playingAs.has(bt.playingAs))}return[]}return[]});t.watch(Ze,()=>{Be.value&&!Be.value.canPrivilegesTeamPlayVideos&&(ie.value.id===2||ie.value.id===7||ie.value.id===8)&&et("Resumen")},{deep:!0,immediate:!0});function qe(mt){I.value=mt}function et(mt){if(s.commit("nextGeneral/updateShowLiveData",!0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}U.isWidget?ie.value=N.value.find(bt=>bt.name===mt)||N.value[1]:ie.value=N.value.find(bt=>bt.name===mt)||N.value[0]}t.onMounted(()=>{Ce(),t.nextTick(()=>{U.isSynchronization&&et("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let mt of P.value)clearInterval(mt);P.value=[]}s8()});function tt(mt){if(mt.playingAs||(mt.playingAs=ee.value?mt.home_team.team_id===ee.value?1:2:0),C.value!=null&&(clearInterval(C.value),C.value=null),E.value!=null&&(clearInterval(E.value),E.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),L.value!=null&&(clearInterval(L.value),L.value=null),P.value.length>0){for(let bt of P.value)clearInterval(bt);P.value=[]}r.value=mt,mt.is_live&&mt.game_status===4?n8():i8()}function ht(mt){W.value=mt.map(bt=>{const It={...bt};return ee.value&&(It.playingAs=It.home_team.team_id===ee.value?1:2),It})}return(mt,bt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",yHt,[t.withDirectives(t.createElementVNode("div",vHt,[t.createVNode(t.unref(NA),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentSelectProps?void 0:e.tournamentsApiUrl,items:e.tournamentSelectProps?e.tournamentSelectProps.items:void 0,"default-item-by-prop":e.tournamentSelectProps?e.tournamentSelectProps.defaultItemByProp:void 0,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,token:e.token,onInput:Le,onChangeTournaments:Le},null,8,["current-season-id","tournaments-ids-to-include","api-url","items","default-item-by-prop","are-female-visible","is-clubes-active","is-female-mode","token"]),t.createVNode(t.unref(VA),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:a.value.seasons,onInput:We},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",bHt,[t.createVNode(t.unref(_ee),{"plays-live":M.value,"info-live":S.value,token:k.value,is_captured:_.value,"await-for-seasons":"",seasons:X.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":ee.value,"only-games-team-id":ee.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onChangeGameCarousel:tt,onOpenModalEvent:Se,onChangeGamesByClientPrivileges:ht},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type","provider-id","is-dev-apis"])])]),h.value?(t.openBlock(),t.createBlock(CN,{key:0,width:$.value,onCloseModalEventsLive:ce,plays:M.value,game:r.value,type:z.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",_Ht,[r.value&&"live_stats"in r.value&&r.value.live_stats==0&&r.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[$.value>500?(t.openBlock(),t.createElementBlock("div",xHt,bt[0]||(bt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",wHt,bt[1]||(bt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",kHt,[t.createElementVNode("div",SHt,[t.createVNode(t.unref(sC),{type:2,buttons:Ze.value,"font-family":"Poppins-Regular","font-size":"16px",width:$.value<400||$.value<700?"max-content":$.value<840||$.value<1050?"155px":"165px","selected-option":ie.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:et},null,8,["buttons","width","selected-option"])])]),Me.value&&Me.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(ie.value.componentName),{key:Z.value,game:Me.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:ne,onIntervalidhighlive:se,onIntervalidtops:pe,onIntervalidgs:re,subsection:t.unref(K),seasonSelected:y.value,tournamentSelected:a.value,"tournament-select-props":e.tournamentSelectProps,showLineups:T.value,socket:e.socket,"time-live-prominent-data":x,"time-live-highlights-prominent-and-video":f,"time-live-possesion":n,"time-live-video-goals":i,"time-live-video-best-plays":c,"time-live-video-this-game":l,"time-live-video-specific-plays":d,"time-live-comparative-best-players":b,"time-live-comparative-avanced":w,is_captured:_.value,"is-tactic-visible":!!y.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":Be.value?Be.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":I.value,"client-privileges-team-id":ee.value,"play-videos-privileges":Be.value,token:k.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onResetSubsection:Ne,onOpenmedia:ge,onOnOpenProfile:Ae,onOpenProfileTeam:ke,onOpenProfilePlayer:je,onChangeToTab:De,onOpenMediaPlayer:ge,onIntervalid:he},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","tournament-select-props","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-61c99096"]]);async function Lq({seasonId:e,providerId:o,isDevApis:s},B=!0){try{const U=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`;return(await(await fetch(qy(U,o))).json()).data}catch(U){if(B)return Lq({seasonId:e,providerId:o,isDevApis:s},!1);throw new Error(U)}}async function AHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function EHt({seasonId:e,providerId:o,isDevApis:s}){try{return(await Uu({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}function MHt(e,o,s,B,U,m,g=!1){const a=s.map(y=>y===1?2:y===2?1:3);return e.filter(y=>{const h=m&&y[U.teamId]?y[U.teamId]!==m:!1,r=o===1?2:1;return(g||B.includes(y[U.gameId]))&&(!o||(h?r:o)===y[U.playingAs])&&(s.includes(y[U.matchResult])&&y[U.teamId]===m||a.includes(y[U.matchResult])&&y[U.teamId]!==m)})}function Bq(e,o,s,B,U){return o.length===2&&s.length===3&&B.length===6?e:e.filter(m=>o.includes(m[U.playingAs])&&s.includes(m[U.matchResult])&&B.includes(m[U.section]))}async function zq({seasonId:e,providerId:o,isDevApis:s}){try{const B=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data}catch(B){return Promise.reject(B)}}async function IHt({seasonId:e,gameId:o,providerId:s,isDevApis:B}){try{const U=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:m}=await Uu({url:U,providerId:s,isDevApis:B});return m}catch(U){return Promise.reject(U)}}async function PHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data}catch(B){return Promise.reject(B)}}async function LHt({gameId:e,providerId:o,isDevApis:s}){try{const B=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Uu({url:B,providerId:o,isDevApis:s})).data.data||[]}catch(B){return Promise.reject(B)}}const BHt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let bA=null;function Oq(){return bA||(bA=Jy(BHt)),bA}async function zHt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})).data}catch(o){return Promise.reject(o)}}async function Dq({seasonId:e,teamId:o,providerId:s,isDevApis:B}){try{return await Uu({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`,providerId:s,isDevApis:B})}catch(U){return Promise.reject(U)}}async function OHt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Uu({url:o,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}async function DHt(e){try{return await Uu({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`,providerId:e.providerId,isDevApis:e.isDevApis})}catch(o){return Promise.reject(o)}}const NHt={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,B){return MHt(e.seasonPlays,B["filterGeneral/getPlayingAs"],B["filterGeneral/getResults"],B["filterGeneral/getSelectedGamesIds"],Oq(),B["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,B)=>{const U={...B};return U.home_team=e.currentSeasonTeams.find(m=>m.team_id===B.home_team),U.visiting_team=e.currentSeasonTeams.find(m=>m.team_id===B.visiting_team),s[B.matchday_abbreviation]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]?s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date].push(U):s[B.matchday_abbreviation][B.game_status===3?"canceled":B.date]=[U]:s[B.matchday_abbreviation]={[B.game_status===3?"canceled":B.date]:[U]},s},{});for(let[s,B]of Object.entries(o))o[s]=Object.entries(B).map(([U,m])=>({date:U,games:m})),o[s].sort((U,m)=>U.date<m.date?-1:U.date>m.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let B=Object.keys(o.nextGamesSchedule);for(let U of B){let m=Number(U.replace("M","")),g=o.nextGamesSchedule[U].map(a=>({matchday:m,date:new Date(a.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,B=0,U=-new Date(0,0,0).valueOf(),m=o.matchdaysDates,g=m.length;for(let a=0;a<m.length;a++)B=Math.abs(m[a].date-s),B<U&&(g=a,U=B);return m[g]?m[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const B=o.getProviderId,U=o.getIsDevApis,m=await Lq({seasonId:o["filterGeneral/getSeasonId"],providerId:B,isDevApis:U});if(s)return m;e("updateSeasonPlays",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zq({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonGames",U)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=o.getProviderId,B=o.getIsDevApis,U=await zHt({seasonId:o["loginGeneral/seasonId"],providerId:s,isDevApis:B});e("updateCurrentSeasonTeams",U.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const B=[void 0,void 0];return e.currentSeasonGames.length===0&&(B[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(B[1]=o("getCurrentSeasonTeams")),await Promise.all(B),!1}catch(B){throw new Error(B)}}}}};async function FHt({filter:e,providerId:o,isDevApis:s}){try{const B=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:U}=await Uu({url:B,providerId:o,isDevApis:s});return U}catch(B){return Promise.reject(B)}}const RHt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let _A=null;function VHt(){return _A||(_A=Jy(RHt)),_A}const xA=6;let Nq=xA;function jHt(e){Nq=Math.max(xA,Number(e)||xA)}class Jw{constructor(){_u(this,"maximumLiveSection",1);_u(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});_u(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}getZeroTotalsTrendSections(){return new Array(Nq).fill(0)}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,B){B&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,B){for(;o.accumulated.length<s;)o.accumulated.push(0);for(let U=s-1;U<o.accumulated.length;U++)o.accumulated[U]+=B}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,B){for(let U=o.accumulated.length-1;U>=s-1;U--)o.accumulated[U]-=B}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(B=>B/s)}calculateRanking(o,s,B,U,m,g,a,y){let h=[];U===3&&o&&o.length&&(B.playingAs.length!==2||B.matchResult.length!==3)?h=Array.from(o.reduce((_,v)=>{const x=v[s.playingAs]===1,f=x?"1":"2",n=_.get(v[s.gameId]);if(n)n[f]?n[f].arrayPlays.push(v):n[f]={numberTeamId:v[s.teamId],arrayPlays:[v]};else{const i={numberMatchResult:v[s.matchResult]};x&&(i[1]={numberTeamId:v[s.teamId],arrayPlays:[v]}),_.set(v[s.gameId],i)}return _},new Map).values()).reduce((_,v)=>{const x=B.playingAs.length===2?"both":B.playingAs[0].toString();return(x==="both"&&(v[1].numberTeamId===B.teamId||v[2].numberTeamId===B.teamId)||x!=="both"&&v[x].numberTeamId===B.teamId)&&B.matchResult.includes(v.numberMatchResult)&&_.push(...v[1].arrayPlays,...v[2].arrayPlays),_},[]).filter(_=>B.sections.includes(_[s.section])):(h=o?[...o]:[],a&&o&&(h=o.filter(r=>B.playingAs.includes(r[s.playingAs])&&B.matchResult.includes(r[s.matchResult])&&B.sections.includes(r[s.section])))),this.setTeamRanking(h,U,s,B.teamId,g,"accomplished",y)}setTeamRanking(o,s,B,U,m,g,a){let y=null,h=null;s===3&&(y=new Map,h={},o.forEach(v=>{const x=y.get(v[B.gameId]);x?x[v[B.teamId.toString()]]?x[v[B.teamId.toString()]]+=v[B.total]:x[v[B.teamId.toString()]]=v[B.total]:y.set(v[B.gameId],{[v[B.teamId.toString()]]:v[B.total]})}),Array.from(y.values()).forEach(v=>{const[x,f]=Object.keys(v).map(i=>i),n=v[x]+v[f];this.addPassesAvgByTeam(h,x,n?v[x]/n:0),this.addPassesAvgByTeam(h,f,n?v[f]/n:0)}));const r=m.sort((v,x)=>v.team_id-x.team_id).map(v=>{if(s===3){const x=h[v.team_id.toString()];return{teamId:v.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((f,n)=>n[B.teamId]===v.team_id&&s===n[B.categoryId]?f+n[B.total]:f,0);return{teamId:v.team_id,points:v[`${a}FilterGames`]?x/v[`${a}FilterGames`]:0,total:x}}}).sort((v,x)=>x.points-v.points);this.accomplished.arrayRankings=r;const _=r.findIndex(v=>v.teamId===U);s===3&&(this.accomplished.avgPreGame=r[_].points),this[g].ranking=_+1,this[g].leader=r[0]}addPassesAvgByTeam(o,s,B){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=B):o[s]={numberGamesCount:1,numberTotalPassesAvg:B}}}class UHt{constructor(o,s,B,U,m,g,a,y,h,r,_=!0){_u(this,"id","");_u(this,"generalId",0);_u(this,"name","");_u(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});_u(this,"accomplishedCategoryIds",[]);_u(this,"receivedCategoryIds",[]);_u(this,"generalCategoriesIds",{accomplished:0,received:0});_u(this,"specialMention","");_u(this,"homeTeam",new Jw);_u(this,"visitingTeam",new Jw);_u(this,"isLeagueDataCalculated",!1);_u(this,"leagueAccomplishedMax",0);_u(this,"leagueReceivedMax",0);_u(this,"leagueAccomplishedAvg",0);_u(this,"leagueReceivedAvg",0);_u(this,"leagueAccomplishedAccumulator",0);_u(this,"leagueReceivedAccumulator",0);_u(this,"homeTeamType","homeTeam");_u(this,"visitingTeamType","visitingTeam");_u(this,"betOnly",!1);_u(this,"isPercent",!1);this.id=`${B.accomplished}-${B.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=B||{accomplished:0,received:0},this.name=U,this.names["0-0"]=U||"",this.names["1-1"]=m||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=y||0,this.betOnly=h||!1,this.isPercent=r||!1,this.isVisible=_}addLeaguePlays(o,s,B){o.length===0||!B||this.isLeagueDataCalculated||(o.forEach(U=>{this.isAccomplishedLeaguePlay(U[s.categoryId])&&(this.leagueAccomplishedAccumulator+=U[s.total]),this.isReceivedLeaguePlay(U[s.categoryId])&&(this.leagueReceivedAccumulator+=U[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*B)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*B)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,B){let U="-";for(const[m,g]of Object.entries(this.generalCategoriesIds))o===g&&(U=`${m==="accomplished"?"0":"1"}${U}`),s===g&&(U=`${U}${m==="accomplished"?"0":"1"}`);U.length===3&&(this.mentions[U]=B)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,B,U,m){!B||!m||o!==this.homeTeamType&&o!==this.visitingTeamType||(B.forEach(g=>{this.isAccomplishedPlay(g[U.categoryId])?this[o].increaseAccomplishedByOne(g[U.section],g[U.total]):this.isReceivedPlay(g[U.categoryId])&&this[o].increaseReceivedByOne(g[U.section],g[U.total])}),this[o].calculateAvg(m))}addLivePlay(o,s,B,U,m=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(B[U.section],B[U.total],!0)}subtractLivePlay(o,s,B,U,m){(o===this.homeTeamType||o===this.visitingTeamType)&&(B[U.categoryId].includes(this.generalCategoriesIds.accomplished)&&!m?this[o].decreaseAccomplishedLiveByOne(B[U.section],B[U.total]):B[U.categoryId].includes(this.generalCategoriesIds.received)&&m&&this[o].decreaseReceivedLiveByOne(B[U.section],B[U.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(B=>o===B||`${o}_r`===B)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,B,U,m,g=!1){this[this.homeTeamType].calculateRanking(o,s,B,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,U,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,m,g,this.visitingTeamType)}resetData(){this.homeTeam=new Jw,this.visitingTeam=new Jw,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}function GHt(e){for(const o of Object.values(e))for(let s of Object.keys(o.subcategories)){const B=o.subcategories[s];o.subcategories[s]=new UHt(B.accomplishedCategoryIds,B.receivedCategoryIds,B.generalCategoriesIds,B.accomplishedName,B.receivedName,B.accomplishedReceivedName,B.receivedAccomplishedName,B.generalId,B.betOnly,B.isPercent,B.isVisible===void 0?!0:B.isVisible)}return e}const HHt=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],ZHt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let wA=null;function qHt(){return wA||(wA=Jy(ZHt)),wA}const WHt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let kA=null;function JHt(){return kA||(kA=Jy(WHt)),kA}function Yw(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function Fq(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function SA(e,o,s){let B=[...o];return e[s.categoryId]===2&&(B[0]=14),e[s.categoryId]===20&&(B[0]=15),[14,15].includes(B[0])?B:null}function Rq(e){const o=e.indexesTSP.section;let s=0;for(const B of[e.homeTeamPlays,e.visitingTeamPlays])if(Array.isArray(B))for(const U of B){const m=U[o];m>s&&(s=m)}jHt(s)}function E_(e,o){const s=o[e.indexesTLP.playId];return e.isLive&&e.providerId===2?`${s}-${o[e.indexesTLP.categoryId]}`:s}const YHt=r8(),XHt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],$Ht={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:Oq(),indexesTSP:VHt(),indexesLS:qHt(),indexesTLP:JHt(),nextGamesDataStructure:{},currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,providerId:0,menuOptionActive:"",showLiveData:!0,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return HHt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return Bq(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return Bq(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&B.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&B.visitingTeam.resetTotals(),B.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),B.addTeamPlays(B.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),B.addTeamPlays(B.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,B)=>s.priority-B.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateNextGamesDataStructure(e,o){e.nextGamesDataStructure=o},setProviderId(e,o){e.providerId=Number(o)||0},updateGameForAnalysisByProps(e,o){for(const[s,B]of Object.entries(o))e.gameForAnalysis[s]=B},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&e.gameForAnalysis.game_id&&o8(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((B,U)=>{if(U.game_status===1&&(U.home_team===s.team_id||U.visiting_team===s.team_id)){const m=U.score[0]-U.score[1],g=U.home_team===s.team_id;B.push({playingAs:g?1:2,matchResult:m===0?3:g?m>0?1:2:m<0?1:2})}return B},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.isSocketConnected&&o.is_live&&o.game_status===4&&o.game_id&&o8(`game.${o.game_id}.v2`)},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=PI(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=PI(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o,Rq(e)},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o,Rq(e)},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(B=>{for(const U of Object.values(B.subcategories))U.resetMentions()}),s.forEach(B=>{for(const U of o)for(const m of Object.values(B.subcategories))m.addSpecialMention(U[0],U[1],U[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){const B=E_(e,o);if(!e.livePlays.has(B)){e.livePlays.set(B,o);const U=Yw(o,e.indexesTLP,e.categoriesMap);for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))g.addLivePlay(e.gameForAnalysis.home_team===U[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",U[e.indexesTSP.teamId],U,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));if(Die(B,o))return;let U="";const m=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";B&&(U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=Yw(B,e.indexesTLP,e.categoriesMap),a=SA(B,g,e.indexesTLP),y=Yw(o,e.indexesTLP,e.categoriesMap),h=SA(o,y,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(r.subcategories))B&&(_.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s),a&&_.subtractLivePlay(U,a[e.indexesTSP.teamId],a,e.indexesTSP,s)),_.addLivePlay(m,y[e.indexesTSP.teamId],y,e.indexesTSP,e.isLive,s),h&&_.addLivePlay(m,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,s);e.livePlays.set(E_(e,o),o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],B=e.livePlays.get(E_(e,o));let U="";if(B){U=e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(E_(e,B));const m=Yw(B,e.indexesTLP,e.categoriesMap),g=SA(o,m,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const y of Object.values(a.subcategories))y.subtractLivePlay(U,m[e.indexesTSP.teamId],m,e.indexesTSP,s),g&&y.subtractLivePlay(U,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(m=>{m.homeTeamFilterGames=m.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,m.visitingTeamFilterGames=m.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const B=[],U=new Map;for(const m of Object.values(e.nextGamesDataStructure))for(const g of Object.values(m.subcategories))B.push(g);o.rankingData.forEach(m=>{for(const g of B)if(g.isInGeneralCategory(m[e.indexesLS.categoryId])){U.has(g.id)?U.get(g.id).push(m):U.set(g.id,[m]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=Fq(o)},setVisitingGames(e,o){e.visitingGames=Fq(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(B=>{const U=e.categoriesMap.get(B);U?U.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(B,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{async fillNextGameDataStructure({commit:e},{provider:o}){try{e("setProviderId",o);const s=await jne(o),B=GHt(s);e("updateNextGamesDataStructure",B)}catch(s){return Promise.reject(s)}},turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e,rootGetters:o},s){try{const a=o.getProviderId,y=o.getIsDevApis,h=await DHt({gameId:s.gameId,providerId:a,isDevApis:y});if(h){var B=[],U=[],m={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},g={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};if(Object.keys(h.data).length!==0){const r=_=>{const v=_.slice(),x=Number(v[0]);return Number.isNaN(x)||(v[0]=x),v};B=h.data.data.filter(_=>_[1]==s.homeTeam).map(r),U=h.data.data.filter(_=>_[1]==s.awayTeam).map(r),m=h.data.games,g=h.data.games}e("updateHomeTeamPlays",B),e("updateVisitingTeamPlays",U),e("setHomeGames",m),e("setVisitingGames",g)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(a){return Promise.reject(a)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let B=[];e("updateGameForAnalysis",s.gameInfo),B.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(B)}catch(B){throw new Error(B)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s,rootGetters:B},{gameId:U,isTeamsAnalysis:m,currentSeasonId:g,isLoginChanged:a=!1,defaultFilter:y=null,gameInfo:h=null,isCupGame:r=!1}){try{let _={},v=e.seasonId!==Number(g);const x=B.getProviderId;await o("fillNextGameDataStructure",{provider:x});const f=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),v&&s("setSeasonId",g),s("updateGameId",Number(U)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const n=await o("getCurrentSeasonGames",Number(U));if(s("leagueGeneral/updateCurrentSeasonGames",n,{root:!0}),_=n.find(i=>i.game_id===Number(U)),!_&&h&&(_=h),_&&(_.home_team==null&&_.homeTeam!=null&&(_.home_team=_.homeTeam.team_id??_.homeTeam),_.visiting_team==null&&_.awayTeam!=null&&(_.visiting_team=_.awayTeam.team_id??_.awayTeam)),_&&h&&(_.game_status=_.game_status??h.game_status,_.is_live=_.is_live??h.is_live),_&&s("updateGameForAnalysis",_),_.game_status!==1&&((a||e.categoriesMap.size===0)&&s("generateCategoriesMap"),r||await o("checkTeamsData",{gameId:U,isFromBet:!!y}),(a||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&f.push(o("getSeasonStatistics"))),e.usePastSeasonId){const i=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",i,{root:!0})}(a||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(i=>_.home_team===i.team_id))&&f.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",_.score[0]),s("setAwayResultGame",_.score[1]),m?_.game_status!==1?(await o("fillStatisticData",{gameId:U,gameinfo:_,promises:f,defaultFilter:y}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),f.push(o("fillStatisticDataPostMatch",{game:U,homeTeam:_.home_team,awayTeam:_.visiting_team,gameInfo:_})),await Promise.all(f)):s("setIsSectionLoading",!1,{root:!0})}catch(_){return Promise.reject(_)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:B,state:U},{gameId:m,gameinfo:g,promises:a=[],defaultFilter:y=null}){let h=null;try{const r=B.getProviderId,_=B.getIsDevApis;e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&a.push(o("getCurrentLiveGamePlays",m)),a.push(o("getSpecialMentionsByGame",m)),a.push(o("getHomeTeamPlays")),a.push(o("getVisitingTeamPlays")),a.push(o("getCurrentSeasonPlays")),y&&a.push(FHt({...y,providerId:r,isDevApis:_})),h=await Promise.all(a)}catch(r){throw new Error(r)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]}),y){const[r]=h.pop();r&&(e("setBetSubcategories",r.categories),e("setBetDescription",r.sectionDescription),e("setDefaultFilter",r.params),e("updateFilterAux"),e("updateFilters",{filters:U.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:B},{gameId:U,isFromBet:m}){try{const g=Number(U);if(e.pastSeasonId){B("setPastSeasonId",e.pastSeasonId,{root:!0});const a=s.leagueGeneral.currentSeasonGames.find(y=>y.game_id===g);a&&B("updateGameForAnalysis",a),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),B("setUsePastSeasonId",m||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else B("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e,rootGetters:o},s){try{const B=o.getProviderId,U=o.getIsDevApis,m=await LHt({gameId:s,providerId:B,isDevApis:U});e("addSpecialMentions",m)}catch(B){return Promise.reject(B)}},async getCurrentSeasonGames({commit:e,state:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,{teams:g,games:a,past_season_id:y,tournament_id:h}=await IHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:B,providerId:U,isDevApis:m}),r=XHt.find(_=>_.id===h);return r&&e("setCurrentTournamentName",r.name),e("setHome",g[0]),e("setAway",g[1]),o.usePastSeasonId||e("setPastSeasonId",y),await e("updateCurrentSeasonGames",a),a&&Array.isArray(a)&&e("updateFinishedGames",a.reduce((_,v)=>(v.game_status===1&&(_+=1),_),0)),a}catch(U){return Promise.reject(U)}},async getCurrentSeasonGamesLast({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,{games:m,past_season_id:g}=await zq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});return o.usePastSeasonId||e("setPastSeasonId",g),await e("updateCurrentSeasonGames",m),m&&Array.isArray(m)&&e("updateFinishedGames",m.reduce((a,y)=>(y.game_status===1&&(a+=1),a),0)),m}catch(B){return Promise.reject(B)}},async getCurrentSeasonTeams({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await OHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateCurrentSeasonTeams",m.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=o.usePastSeasonId?o.pastSeasonId:o.seasonId,g=await EHt({seasonId:m,providerId:B,isDevApis:U});e("updateSeasonStatistics",g),e("updateOldSeasonId",m)}catch(B){return Promise.reject(B)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:B}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:B["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await Dq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team,providerId:B,isDevApis:U});m.data&&(e("updateHomeTeamPlays",m.data.data),e("setHomeGames",m.data.games))}catch(B){return Promise.reject(B)}},async getVisitingTeamPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await Dq({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team,providerId:B,isDevApis:U});m.data&&(e("updateVisitingTeamPlays",m.data.data),e("setVisitingGames",m.data.games))}catch(B){return Promise.reject(B)}},async getCurrentSeasonPlays({commit:e,state:o,rootGetters:s}){try{const B=s.getProviderId,U=s.getIsDevApis,m=await AHt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,providerId:B,isDevApis:U});e("updateStats",m)}catch(B){return Promise.reject(new Error(B))}},async getCurrentLiveGamePlays({state:e,commit:o,rootGetters:s},B){try{const U=s.getProviderId,m=s.getIsDevApis,g=await PHt({gameId:B,providerId:U,isDevApis:m});e.livePlays=new Map,g.forEach(a=>{e.gameForAnalysis.game_id===a[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===a[e.indexesTLP.teamId])&&o("addLiveGamePlay",a)})}catch(U){throw new Error(U)}},socket_new({state:e,commit:o},s){const B=s[1];(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("addLiveGamePlay",B)},socket_update({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===B[e.indexesTLP.teamId])&&o("updateLiveGamePlay",B)},socket_delete({state:e,commit:o},s){const B=s[1];e.gameForAnalysis.game_id===B[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===B[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===B[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",B)},exitChannel({state:e,getters:o,rootState:s,rootGetters:B,commit:U}){const m=B["loginGeneral/getPremiumAccount"];o.isLive&&m&&(U("updateShowLiveData",!0),U("clearLiveTotals"),e.livePlays.clear(),YHt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.homeTeam.resetTotalsLive(),B.visitingTeam.resetTotalsLive(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const B of Object.values(s.subcategories))B.homeTeam.resetTotals(),B.visitingTeam.resetTotals(),B.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const B of Object.values(s.subcategories))B.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function KHt({providerId:e,isDevApis:o}={}){try{const{data:s}=await Uu({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",providerId:e,isDevApis:o});return s}catch(s){throw new Error(s)}}const QHt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o,rootGetters:s}){try{if(e.tournaments.length===0){const B=s.getProviderId,U=s.getIsDevApis,m=await KHt({providerId:B,isDevApis:U});o("setTournaments",m)}}catch(B){throw new Error(B)}}}}};async function eZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}async function tZt({seasonId:e,localTeamId:o,visitingTeamId:s,providerId:B,isDevApis:U}){try{const m=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Uu({url:m,providerId:B,isDevApis:U})).data}catch(m){return Promise.reject(m)}}const Vq=(e,o)=>{let s={};return e.forEach((B,U)=>{U==3&&(o[0]==35||o[0]==54)&&(o[U]==2?o[U]=1:o[U]=2),U==2&&(o[0]==35||o[0]==54)&&(o[U]==1?o[U]=2:o[U]==2&&(o[U]=1)),s[B]=o[U]}),s},jq=(e,o)=>e.filter(B=>{const U=o.playingAs.includes(B.playing_as),m=o.matchResult.includes(B.match_result),g=o.sections.includes(B.section);return U&&m&&g});(function(){function e(o,s,B){return typeof B>"u"||+B==0?Math[o](s):(s=+s,B=+B,isNaN(s)||!(typeof B=="number"&&B%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-B:-B))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+B:B))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function Uq(e,o){let s=o*-1;return Math.ceil10(e,s)}const zf={goals:"Goles",shots:"Tiros a gol",head:"Remates con cabeza",penalties:"Penales"};function Of(e,o){const s=(e||[]).find(B=>B.name===o);return new Set((s==null?void 0:s.categories)||[])}const aZt={...QHt,...NHt,...$Ht,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[],xgCategories:O2},getters:{playsLocal:(e,o,s)=>{const B=e.xGLocalPlays,U="homeTeamFilter",m=s.nextGeneral[U];return jq(B,m)||[]},playsAway:(e,o,s)=>{const B=e.xGVisitingPlays,U="visitingTeamFilter",m=s.nextGeneral[U];return jq(B,m)},getXgCategories:e=>e.xgCategories||[],goalsQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsLocal.filter(B=>s.has(B.category_id)).length},goalsQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.goals);return o.playsAway.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsLocal.filter(B=>s.has(B.category_id)).length},shotsOnGoalQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.shots);return o.playsAway.filter(B=>s.has(B.category_id)).length},headQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsLocal.filter(B=>s.has(B.category_id)).length},headQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.head);return o.playsAway.filter(B=>s.has(B.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsLocal.filter(B=>s.has(B.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=Of(e.xgCategories,zf.penalties);return o.playsAway.filter(B=>s.has(B.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let B=o.playsLocal.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return Uq(B,2)},xGAway:(e,o)=>{const s=new Set;let B=o.playsAway.reduce((U,m)=>(s.has(m.moment_of_play)||(s.add(m.moment_of_play),U+=m.xG2),U),0);return Uq(B,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setXgCategories(e,o){e.xgCategories=o},setPlays(e,o){const s=Of(e.xgCategories,zf.goals),B=Of(e.xgCategories,zf.shots),U=Of(e.xgCategories,zf.head),m=Of(e.xgCategories,zf.penalties),g=o.local_team.map(l=>Vq(o.data_headers,l)),a=[],y=[],h=[],r=[],_=new Set;g.forEach(l=>{s.has(l.category_id)?_.has(l.moment_of_play)||(_.add(l.moment_of_play),a.push(l)):B.has(l.category_id)?y.push(l):U.has(l.category_id)?h.push(l):m.has(l.category_id)&&r.push(l)}),e.xGLocalPlays=[...y,...a,...h,...r];const v=o.visiting_team.map(l=>Vq(o.data_headers,l)),x=new Set,f=[],n=[],i=[],c=[];v.forEach(l=>{s.has(l.category_id)?x.has(l.moment_of_play)||(x.add(l.moment_of_play),f.push(l)):B.has(l.category_id)?n.push(l):U.has(l.category_id)?i.push(l):m.has(l.category_id)&&c.push(l)}),e.xGVisitingPlays=[...n,...f,...i,...c]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async loadXgCategories({commit:e,rootGetters:o}){const s=o.getProviderId,B=await Zne(s);e("setXgCategories",(B==null?void 0:B.categories)??O2)},async getXgPlays({commit:e,dispatch:o,rootGetters:s},{seasonId:B,localTeamId:U,visitingTeamId:m,postMatch:g=!1}){try{if(!B||!U||!m)return;const a=s.getProviderId,y=s.getIsDevApis;await o("loadXgCategories");let h={};g?h=await tZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}):h=await eZt({seasonId:B,localTeamId:U,visitingTeamId:m,providerId:a,isDevApis:y}),e("setPlays",h)}catch(a){return Promise.reject(a)}}}}}};function rZt(e){for(const[o,s]of Object.entries(aZt))e.hasModule(o)||e.registerModule(o,s)}const nZt={class:"subcategory-group"},iZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",nZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(Zl),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},oZt=ic(iZt,[["__scopeId","data-v-ae6f3d72"]]),sZt={class:"filter-subcategories"},lZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",sZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(oZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),Xw=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),cZt={class:"details__header"},uZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),dZt={class:"details__header__checkbox"},hZt={class:"details__body"},pZt={class:"details__body__playing-as"},fZt=["onClick"],mZt={class:"details__header"},gZt=Xw(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),yZt={class:"details__header__checkbox"},vZt={class:"details__body"},bZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),_Zt={class:"details__body__game-section"},xZt=["onClick"],wZt={class:"details__body"},kZt=Xw(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),SZt={class:"details__body__game-section"},CZt=["onClick"],TZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",cZt,[uZt,t.createElementVNode("div",dZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",hZt,[t.createElementVNode("div",pZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,fZt))),128))])]),t.createElementVNode("div",mZt,[gZt,t.createElementVNode("div",yZt,[t.createVNode(t.unref(Zl),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",vZt,[bZt,t.createElementVNode("div",_Zt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,xZt))),128))])]),t.createElementVNode("div",wZt,[kZt,t.createElementVNode("div",SZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,CZt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),AZt={class:"filter-field"},EZt=Object.freeze(Object.defineProperty({__proto__:null,default:ic({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",AZt,[t.createVNode(t.unref(ZF),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),MZt={class:"subcategory-group"},IZt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",MZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,B=>(t.openBlock(),t.createBlock(t.unref(ql),{key:B.id,modelValue:B.isSelected,"onUpdate:modelValue":U=>B.isSelected=U,label:B.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},PZt=oc(IZt,[["__scopeId","data-v-85bc2114"]]),LZt={class:"filter-subcategories"},BZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",LZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"filter-subcategories__group"},[t.createVNode(PZt,{subcategoryGroup:B},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-74a77bab"]])},Symbol.toStringTag,{value:"Module"})),$w=e=>(t.pushScopeId("data-v-893b389d"),e=e(),t.popScopeId(),e),zZt={class:"details__header"},OZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),DZt={class:"details__header__checkbox"},NZt={class:"details__body"},FZt={class:"details__body__playing-as"},RZt=["onClick"],VZt={class:"details__header"},jZt=$w(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),UZt={class:"details__header__checkbox"},GZt={class:"details__body"},HZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ZZt={class:"details__body__game-section"},qZt=["onClick"],WZt={class:"details__body"},JZt=$w(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),YZt={class:"details__body__game-section"},XZt=["onClick"],$Zt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(r=>({"2715f84a":e.buttonsBackgroundColor,"97bea92a":e.buttonsTextColor,"544788ef":e.buttonsBorderWidth,"53308a8c":e.buttonsBorderColor,e844f820:e.buttonsBackgroundColorActive,"76839a51":e.buttonsTextColorActive,"2bf17656":e.buttonsBorderWidthActive,a4c4469c:e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(r=>r.isSelected)),B=t.computed(()=>o.gameSections.every(r=>r.isSelected)),U=t.computed(()=>o.gameSections.reduce((r,_)=>(_.value<=3?r.firstHalf.push(_):r.secondHalf.push(_),r),{firstHalf:[],secondHalf:[]})),m=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(r){r?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,v)=>{_.isSelected=v===0})}function a(r){o.playingAs.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function y(r){o.gameSections.filter(_=>_.isSelected).length===1&&r.isSelected||(r.isSelected=!r.isSelected)}function h(r){r?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,v)=>{_.isSelected=v===0})}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(m.value)},[t.createElementVNode("div",zZt,[OZt,t.createElementVNode("div",DZt,[t.createVNode(t.unref(ql),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",NZt,[t.createElementVNode("div",FZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>a(v)},t.toDisplayString(v.name),11,RZt))),128))])]),t.createElementVNode("div",VZt,[jZt,t.createElementVNode("div",UZt,[t.createVNode(t.unref(ql),{label:"Todos","model-value":B.value,"onUpdate:modelValue":h},null,8,["model-value"])])]),t.createElementVNode("div",GZt,[HZt,t.createElementVNode("div",ZZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.firstHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,qZt))),128))])]),t.createElementVNode("div",WZt,[JZt,t.createElementVNode("div",YZt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value.secondHalf,(v,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:v.isSelected}]),onClick:f=>y(v)},t.toDisplayString(v.text),11,XZt))),128))])])],4))}},[["__scopeId","data-v-893b389d"]])},Symbol.toStringTag,{value:"Module"})),KZt={class:"filter-field"},QZt=Object.freeze(Object.defineProperty({__proto__:null,default:oc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(B,U)=>U+1));function s(){}return(B,U)=>(t.openBlock(),t.createElementBlock("div",KZt,[t.createVNode(t.unref(RG),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-ef90fbbd"]])},Symbol.toStringTag,{value:"Module"}));Nd.GSCGameData=THt,Nd.connectSocket=n8,Nd.disconnectSocket=i8,Nd.getSocket=r8,Nd.registerStoreModules=rZt,Object.defineProperty(Nd,Symbol.toStringTag,{value:"Module"})});