@golstats/gsc-game-data 1.0.285 → 1.0.287
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FilterConditions-67a56ee9-Byh7UnF3-757e7bea.js → FilterConditions-67a56ee9-Byh7UnF3-1f53c333.js} +1 -1
- package/dist/{FilterConditions-8968e395-c5e5cd4e.js → FilterConditions-8968e395-b14f84df.js} +1 -1
- package/dist/{FilterField-1d2345af-DewpBlbm-be5eab7a.js → FilterField-1d2345af-DewpBlbm-8b35763e.js} +1 -1
- package/dist/{FilterField-ef44bc20-699db229.js → FilterField-ef44bc20-e8090fb8.js} +1 -1
- package/dist/{FilterSubcategories-4bc20b72-31c8eee9.js → FilterSubcategories-4bc20b72-0a20f4a5.js} +1 -1
- package/dist/{FilterSubcategories-92dfe0dc-C1aiPRbE-527406f1.js → FilterSubcategories-92dfe0dc-C1aiPRbE-7c6f84a5.js} +1 -1
- package/dist/gsc-game-data.js +1 -1
- package/dist/gsc-game-data.umd.cjs +2 -2
- package/dist/{index-92fc3c75.js → index-17b7d536.js} +15510 -15493
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -4155,11 +4155,11 @@ uniform ${Ge} ${qe} u_${at};
|
|
|
4155
4155
|
#endif
|
|
4156
4156
|
`}),staticAttributes:j,staticUniforms:de}}class Bn{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(O,P,j,Y,te,de,pe,Ae,Be){this.context=O;let Ge=this.boundPaintVertexBuffers.length!==Y.length;for(let qe=0;!Ge&&qe<Y.length;qe++)this.boundPaintVertexBuffers[qe]!==Y[qe]&&(Ge=!0);!this.vao||this.boundProgram!==P||this.boundLayoutVertexBuffer!==j||Ge||this.boundIndexBuffer!==te||this.boundVertexOffset!==de||this.boundDynamicVertexBuffer!==pe||this.boundDynamicVertexBuffer2!==Ae||this.boundDynamicVertexBuffer3!==Be?this.freshBind(P,j,Y,te,de,pe,Ae,Be):(O.bindVertexArray.set(this.vao),pe&&pe.bind(),te&&te.dynamicDraw&&te.bind(),Ae&&Ae.bind(),Be&&Be.bind())}freshBind(O,P,j,Y,te,de,pe,Ae){const Be=O.numAttributes,Ge=this.context,qe=Ge.gl;this.vao&&this.destroy(),this.vao=Ge.createVertexArray(),Ge.bindVertexArray.set(this.vao),this.boundProgram=O,this.boundLayoutVertexBuffer=P,this.boundPaintVertexBuffers=j,this.boundIndexBuffer=Y,this.boundVertexOffset=te,this.boundDynamicVertexBuffer=de,this.boundDynamicVertexBuffer2=pe,this.boundDynamicVertexBuffer3=Ae,P.enableAttributes(qe,O);for(const at of j)at.enableAttributes(qe,O);de&&de.enableAttributes(qe,O),pe&&pe.enableAttributes(qe,O),Ae&&Ae.enableAttributes(qe,O),P.bind(),P.setVertexAttribPointers(qe,O,te);for(const at of j)at.bind(),at.setVertexAttribPointers(qe,O,te);de&&(de.bind(),de.setVertexAttribPointers(qe,O,te)),Y&&Y.bind(),pe&&(pe.bind(),pe.setVertexAttribPointers(qe,O,te)),Ae&&(Ae.bind(),Ae.setVertexAttribPointers(qe,O,te)),Ge.currentNumAttributes=Be}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const ha=(H,O,P,j,Y)=>({u_matrix:H,u_texture:0,u_ele_delta:O,u_fog_matrix:P,u_fog_color:j?j.properties.get("fog-color"):n.aN.white,u_fog_ground_blend:j?j.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:j?j.calculateFogBlendOpacity(Y):0,u_horizon_color:j?j.properties.get("horizon-color"):n.aN.white,u_horizon_fog_blend:j?j.properties.get("horizon-fog-blend"):1});function ma(H){const O=[];for(let P=0;P<H.length;P++){if(H[P]===null)continue;const j=H[P].split(" ");O.push(j.pop())}return O}class Ya{constructor(O,P,j,Y,te,de){const pe=O.gl;this.program=pe.createProgram();const Ae=ma(P.staticAttributes),Be=j?j.getBinderAttributes():[],Ge=Ae.concat(Be),qe=hn.prelude.staticUniforms?ma(hn.prelude.staticUniforms):[],at=P.staticUniforms?ma(P.staticUniforms):[],lt=j?j.getBinderUniforms():[],ft=qe.concat(at).concat(lt),kt=[];for(const Yt of ft)kt.indexOf(Yt)<0&&kt.push(Yt);const Nt=j?j.defines():[];te&&Nt.push("#define OVERDRAW_INSPECTOR;"),de&&Nt.push("#define TERRAIN3D;");const Mt=Nt.concat(hn.prelude.fragmentSource,P.fragmentSource).join(`
|
|
4157
4157
|
`),Gt=Nt.concat(hn.prelude.vertexSource,P.vertexSource).join(`
|
|
4158
|
-
`),zt=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(zt,Mt),pe.compileShader(zt),!pe.getShaderParameter(zt,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(zt)}`);pe.attachShader(this.program,zt);const Xt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Xt,Gt),pe.compileShader(Xt),!pe.getShaderParameter(Xt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Xt)}`);pe.attachShader(this.program,Xt),this.attributes={};const Zt={};this.numAttributes=Ge.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Ge[Yt]&&(pe.bindAttribLocation(this.program,Yt,Ge[Yt]),this.attributes[Ge[Yt]]=Yt);if(pe.linkProgram(this.program),!pe.getProgramParameter(this.program,pe.LINK_STATUS))throw new Error(`Program failed to link: ${pe.getProgramInfoLog(this.program)}`);pe.deleteShader(Xt),pe.deleteShader(zt);for(let Yt=0;Yt<kt.length;Yt++){const ya=kt[Yt];if(ya&&!Zt[ya]){const Ca=pe.getUniformLocation(this.program,ya);Ca&&(Zt[ya]=Ca)}}this.fixedUniforms=Y(O,Zt),this.terrainUniforms=((Yt,ya)=>({u_depth:new n.aI(Yt,ya.u_depth),u_terrain:new n.aI(Yt,ya.u_terrain),u_terrain_dim:new n.aJ(Yt,ya.u_terrain_dim),u_terrain_matrix:new n.aK(Yt,ya.u_terrain_matrix),u_terrain_unpack:new n.aL(Yt,ya.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Yt,ya.u_terrain_exaggeration)}))(O,Zt),this.binderUniforms=j?j.getUniforms(O,Zt):[]}draw(O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt,ft,kt,Nt,Mt,Gt){const zt=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(j),O.setStencilMode(Y),O.setColorMode(te),O.setCullFace(de),Ae){O.activeTexture.set(zt.TEXTURE2),zt.bindTexture(zt.TEXTURE_2D,Ae.depthTexture),O.activeTexture.set(zt.TEXTURE3),zt.bindTexture(zt.TEXTURE_2D,Ae.texture);for(const Zt in this.terrainUniforms)this.terrainUniforms[Zt].set(Ae[Zt])}for(const Zt in this.fixedUniforms)this.fixedUniforms[Zt].set(pe[Zt]);kt&&kt.setUniforms(O,this.binderUniforms,lt,{zoom:ft});let Xt=0;switch(P){case zt.LINES:Xt=2;break;case zt.TRIANGLES:Xt=3;break;case zt.LINE_STRIP:Xt=1}for(const Zt of at.get()){const Yt=Zt.vaos||(Zt.vaos={});(Yt[Be]||(Yt[Be]=new Bn)).bind(O,this,Ge,kt?kt.getPaintVertexBuffers():[],qe,Zt.vertexOffset,Nt,Mt,Gt),zt.drawElements(P,Zt.primitiveLength*Xt,zt.UNSIGNED_SHORT,Zt.primitiveOffset*Xt*2)}}}function Ba(H,O,P){const j=1/yt(P,1,O.transform.tileZoom),Y=Math.pow(2,P.tileID.overscaledZ),te=P.tileSize*Math.pow(2,O.transform.tileZoom)/Y,de=te*(P.tileID.canonical.x+P.tileID.wrap*Y),pe=te*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[j,H.fromScale,H.toScale],u_fade:H.t,u_pixel_coord_upper:[de>>16,pe>>16],u_pixel_coord_lower:[65535&de,65535&pe]}}const Xa=(H,O,P,j)=>{const Y=O.style.light,te=Y.properties.get("position"),de=[te.x,te.y,te.z],pe=function(){var Be=new n.A(9);return n.A!=Float32Array&&(Be[1]=0,Be[2]=0,Be[3]=0,Be[5]=0,Be[6]=0,Be[7]=0),Be[0]=1,Be[4]=1,Be[8]=1,Be}();Y.properties.get("anchor")==="viewport"&&function(Be,Ge){var qe=Math.sin(Ge),at=Math.cos(Ge);Be[0]=at,Be[1]=qe,Be[2]=0,Be[3]=-qe,Be[4]=at,Be[5]=0,Be[6]=0,Be[7]=0,Be[8]=1}(pe,-O.transform.angle),function(Be,Ge,qe){var at=Ge[0],lt=Ge[1],ft=Ge[2];Be[0]=at*qe[0]+lt*qe[3]+ft*qe[6],Be[1]=at*qe[1]+lt*qe[4]+ft*qe[7],Be[2]=at*qe[2]+lt*qe[5]+ft*qe[8]}(de,de,pe);const Ae=Y.properties.get("color");return{u_matrix:H,u_lightpos:de,u_lightintensity:Y.properties.get("intensity"),u_lightcolor:[Ae.r,Ae.g,Ae.b],u_vertical_gradient:+P,u_opacity:j}},dn=(H,O,P,j,Y,te,de)=>n.e(Xa(H,O,P,j),Ba(te,O,de),{u_height_factor:-Math.pow(2,Y.overscaledZ)/de.tileSize/8}),ln=H=>({u_matrix:H}),Cn=(H,O,P,j)=>n.e(ln(H),Ba(P,O,j)),Rn=(H,O)=>({u_matrix:H,u_world:O}),la=(H,O,P,j,Y)=>n.e(Cn(H,O,P,j),{u_world:Y}),za=(H,O,P,j)=>{const Y=H.transform;let te,de;if(j.paint.get("circle-pitch-alignment")==="map"){const pe=yt(P,1,Y.zoom);te=!0,de=[pe,pe]}else te=!1,de=Y.pixelsToGLUnits;return{u_camera_to_center_distance:Y.cameraToCenterDistance,u_scale_with_map:+(j.paint.get("circle-pitch-scale")==="map"),u_matrix:H.translatePosMatrix(O.posMatrix,P,j.paint.get("circle-translate"),j.paint.get("circle-translate-anchor")),u_pitch_with_map:+te,u_device_pixel_ratio:H.pixelRatio,u_extrude_scale:de}},qt=(H,O)=>({u_matrix:O,u_pixel_extrude_scale:[1/H.width,1/H.height]}),ra=(H,O,P)=>({u_matrix:H,u_inv_matrix:O,u_camera_to_center_distance:P.cameraToCenterDistance,u_viewport_size:[P.width,P.height]}),sa=(H,O,P=1)=>({u_matrix:H,u_color:O,u_overlay:0,u_overlay_scale:P}),Ia=H=>({u_matrix:H}),Ma=(H,O,P,j)=>({u_matrix:H,u_extrude_scale:yt(O,1,P),u_intensity:j}),$a=(H,O,P,j)=>{const Y=n.H();n.aQ(Y,0,H.width,H.height,0,0,1);const te=H.context.gl;return{u_matrix:Y,u_world:[te.drawingBufferWidth,te.drawingBufferHeight],u_image:P,u_color_ramp:j,u_opacity:O.paint.get("heatmap-opacity")}},Pa=(H,O,P,j)=>{const Y=P.paint.get("hillshade-shadow-color"),te=P.paint.get("hillshade-highlight-color"),de=P.paint.get("hillshade-accent-color");let pe=P.paint.get("hillshade-illumination-direction")*(Math.PI/180);P.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=H.transform.angle);const Ae=!H.options.moving;return{u_matrix:j?j.posMatrix:H.transform.calculatePosMatrix(O.tileID.toUnwrapped(),Ae),u_image:0,u_latrange:na(0,O.tileID),u_light:[P.paint.get("hillshade-exaggeration"),pe],u_shadow:Y,u_highlight:te,u_accent:de}},Sa=(H,O)=>{const P=O.stride,j=n.H();return n.aQ(j,0,n.X,-n.X,0,0,1),n.J(j,j,[0,-n.X,0]),{u_matrix:j,u_image:1,u_dimension:[P,P],u_zoom:H.overscaledZ,u_unpack:O.getUnpackVector()}};function na(H,O){const P=Math.pow(2,O.canonical.z),j=O.canonical.y;return[new n.Z(0,j/P).toLngLat().lat,new n.Z(0,(j+1)/P).toLngLat().lat]}const ea=(H,O,P,j)=>{const Y=H.transform;return{u_matrix:an(H,O,P,j),u_ratio:1/yt(O,1,Y.zoom),u_device_pixel_ratio:H.pixelRatio,u_units_to_pixels:[1/Y.pixelsToGLUnits[0],1/Y.pixelsToGLUnits[1]]}},ga=(H,O,P,j,Y)=>n.e(ea(H,O,P,Y),{u_image:0,u_image_height:j}),Va=(H,O,P,j,Y)=>{const te=H.transform,de=tn(O,te);return{u_matrix:an(H,O,P,Y),u_texsize:O.imageAtlasTexture.size,u_ratio:1/yt(O,1,te.zoom),u_device_pixel_ratio:H.pixelRatio,u_image:0,u_scale:[de,j.fromScale,j.toScale],u_fade:j.t,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},en=(H,O,P,j,Y,te)=>{const de=H.transform,pe=H.lineAtlas,Ae=tn(O,de),Be=P.layout.get("line-cap")==="round",Ge=pe.getDash(j.from,Be),qe=pe.getDash(j.to,Be),at=Ge.width*Y.fromScale,lt=qe.width*Y.toScale;return n.e(ea(H,O,P,te),{u_patternscale_a:[Ae/at,-Ge.height/2],u_patternscale_b:[Ae/lt,-qe.height/2],u_sdfgamma:pe.width/(256*Math.min(at,lt)*H.pixelRatio)/2,u_image:0,u_tex_y_a:Ge.y,u_tex_y_b:qe.y,u_mix:Y.t})};function tn(H,O){return 1/yt(H,1,O.tileZoom)}function an(H,O,P,j){return H.translatePosMatrix(j?j.posMatrix:O.tileID.posMatrix,O,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}const _n=(H,O,P,j,Y)=>{return{u_matrix:H,u_tl_parent:O,u_scale_parent:P,u_buffer_scale:1,u_fade_t:j.mix,u_opacity:j.opacity*Y.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Y.paint.get("raster-brightness-min"),u_brightness_high:Y.paint.get("raster-brightness-max"),u_saturation_factor:(de=Y.paint.get("raster-saturation"),de>0?1-1/(1.001-de):-de),u_contrast_factor:(te=Y.paint.get("raster-contrast"),te>0?1/(1-te):1+te),u_spin_weights:mn(Y.paint.get("raster-hue-rotate"))};var te,de};function mn(H){H*=Math.PI/180;const O=Math.sin(H),P=Math.cos(H);return[(2*P+1)/3,(-Math.sqrt(3)*O-P+1)/3,(Math.sqrt(3)*O-P+1)/3]}const wn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt)=>{const ft=de.transform;return{u_is_size_zoom_constant:+(H==="constant"||H==="source"),u_is_size_feature_constant:+(H==="constant"||H==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:ft.cameraToCenterDistance,u_pitch:ft.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:ft.width/ft.height,u_fade_change:de.options.fadeDuration?de.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:Ae,u_coord_matrix:Be,u_is_text:+qe,u_pitch_with_map:+j,u_is_along_line:Y,u_is_variable_anchor:te,u_texsize:at,u_texture:0,u_translation:Ge,u_pitched_scale:lt}},pn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt,ft)=>{const kt=de.transform;return n.e(wn(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,ft),{u_gamma_scale:j?Math.cos(kt._pitch)*kt.cameraToCenterDistance:1,u_device_pixel_ratio:de.pixelRatio,u_is_halo:+lt})},yn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt)=>n.e(pn(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,!0,qe,!0,lt),{u_texsize_icon:at,u_texture_icon:1}),Nn=(H,O,P)=>({u_matrix:H,u_opacity:O,u_color:P}),qn=(H,O,P,j,Y,te)=>n.e(function(de,pe,Ae,Be){const Ge=Ae.imageManager.getPattern(de.from.toString()),qe=Ae.imageManager.getPattern(de.to.toString()),{width:at,height:lt}=Ae.imageManager.getPixelSize(),ft=Math.pow(2,Be.tileID.overscaledZ),kt=Be.tileSize*Math.pow(2,Ae.transform.tileZoom)/ft,Nt=kt*(Be.tileID.canonical.x+Be.tileID.wrap*ft),Mt=kt*Be.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ge.tl,u_pattern_br_a:Ge.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[at,lt],u_mix:pe.t,u_pattern_size_a:Ge.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/yt(Be,1,Ae.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Mt>>16],u_pixel_coord_lower:[65535&Nt,65535&Mt]}}(j,te,P,Y),{u_matrix:H,u_opacity:O}),Dn={fillExtrusion:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_opacity:new n.aJ(H,O.u_opacity)}),fillExtrusionPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_height_factor:new n.aJ(H,O.u_height_factor),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade),u_opacity:new n.aJ(H,O.u_opacity)}),fill:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),fillPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),fillOutline:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world)}),fillOutlinePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),circle:(H,O)=>({u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_scale_with_map:new n.aI(H,O.u_scale_with_map),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_extrude_scale:new n.aP(H,O.u_extrude_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_matrix:new n.aK(H,O.u_matrix)}),collisionBox:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_pixel_extrude_scale:new n.aP(H,O.u_pixel_extrude_scale)}),collisionCircle:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_inv_matrix:new n.aK(H,O.u_inv_matrix),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_viewport_size:new n.aP(H,O.u_viewport_size)}),debug:(H,O)=>({u_color:new n.aM(H,O.u_color),u_matrix:new n.aK(H,O.u_matrix),u_overlay:new n.aI(H,O.u_overlay),u_overlay_scale:new n.aJ(H,O.u_overlay_scale)}),clippingMask:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),heatmap:(H,O)=>({u_extrude_scale:new n.aJ(H,O.u_extrude_scale),u_intensity:new n.aJ(H,O.u_intensity),u_matrix:new n.aK(H,O.u_matrix)}),heatmapTexture:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_color_ramp:new n.aI(H,O.u_color_ramp),u_opacity:new n.aJ(H,O.u_opacity)}),hillshade:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_latrange:new n.aP(H,O.u_latrange),u_light:new n.aP(H,O.u_light),u_shadow:new n.aM(H,O.u_shadow),u_highlight:new n.aM(H,O.u_highlight),u_accent:new n.aM(H,O.u_accent)}),hillshadePrepare:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_dimension:new n.aP(H,O.u_dimension),u_zoom:new n.aJ(H,O.u_zoom),u_unpack:new n.aL(H,O.u_unpack)}),line:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels)}),lineGradient:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_image:new n.aI(H,O.u_image),u_image_height:new n.aJ(H,O.u_image_height)}),linePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texsize:new n.aP(H,O.u_texsize),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_image:new n.aI(H,O.u_image),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),lineSDF:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_patternscale_a:new n.aP(H,O.u_patternscale_a),u_patternscale_b:new n.aP(H,O.u_patternscale_b),u_sdfgamma:new n.aJ(H,O.u_sdfgamma),u_image:new n.aI(H,O.u_image),u_tex_y_a:new n.aJ(H,O.u_tex_y_a),u_tex_y_b:new n.aJ(H,O.u_tex_y_b),u_mix:new n.aJ(H,O.u_mix)}),raster:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_tl_parent:new n.aP(H,O.u_tl_parent),u_scale_parent:new n.aJ(H,O.u_scale_parent),u_buffer_scale:new n.aJ(H,O.u_buffer_scale),u_fade_t:new n.aJ(H,O.u_fade_t),u_opacity:new n.aJ(H,O.u_opacity),u_image0:new n.aI(H,O.u_image0),u_image1:new n.aI(H,O.u_image1),u_brightness_low:new n.aJ(H,O.u_brightness_low),u_brightness_high:new n.aJ(H,O.u_brightness_high),u_saturation_factor:new n.aJ(H,O.u_saturation_factor),u_contrast_factor:new n.aJ(H,O.u_contrast_factor),u_spin_weights:new n.aO(H,O.u_spin_weights)}),symbolIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolSDF:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolTextAndIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texsize_icon:new n.aP(H,O.u_texsize_icon),u_texture:new n.aI(H,O.u_texture),u_texture_icon:new n.aI(H,O.u_texture_icon),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),background:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_color:new n.aM(H,O.u_color)}),backgroundPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_image:new n.aI(H,O.u_image),u_pattern_tl_a:new n.aP(H,O.u_pattern_tl_a),u_pattern_br_a:new n.aP(H,O.u_pattern_br_a),u_pattern_tl_b:new n.aP(H,O.u_pattern_tl_b),u_pattern_br_b:new n.aP(H,O.u_pattern_br_b),u_texsize:new n.aP(H,O.u_texsize),u_mix:new n.aJ(H,O.u_mix),u_pattern_size_a:new n.aP(H,O.u_pattern_size_a),u_pattern_size_b:new n.aP(H,O.u_pattern_size_b),u_scale_a:new n.aJ(H,O.u_scale_a),u_scale_b:new n.aJ(H,O.u_scale_b),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(H,O.u_tile_units_to_pixels)}),terrain:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_ele_delta:new n.aJ(H,O.u_ele_delta),u_fog_matrix:new n.aK(H,O.u_fog_matrix),u_fog_color:new n.aM(H,O.u_fog_color),u_fog_ground_blend:new n.aJ(H,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(H,O.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon_fog_blend:new n.aJ(H,O.u_horizon_fog_blend)}),terrainDepth:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),terrainCoords:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_terrain_coords_id:new n.aJ(H,O.u_terrain_coords_id),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),sky:(H,O)=>({u_sky_color:new n.aM(H,O.u_sky_color),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon:new n.aJ(H,O.u_horizon),u_sky_horizon_blend:new n.aJ(H,O.u_sky_horizon_blend)})};class En{constructor(O,P,j){this.context=O;const Y=O.gl;this.buffer=Y.createBuffer(),this.dynamicDraw=!!j,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Y.bufferData(Y.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?Y.DYNAMIC_DRAW:Y.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){const P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,O.arrayBuffer)}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const Vn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kn{constructor(O,P,j,Y){this.length=P.length,this.attributes=j,this.itemSize=P.bytesPerElement,this.dynamicDraw=Y,this.context=O;const te=O.gl;this.buffer=te.createBuffer(),O.bindVertexBuffer.set(this.buffer),te.bufferData(te.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?te.DYNAMIC_DRAW:te.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,P){for(let j=0;j<this.attributes.length;j++){const Y=this.attributes[j],te=P.attributes[Y.name];te!==void 0&&O.enableVertexAttribArray(te)}}setVertexAttribPointers(O,P,j){for(let Y=0;Y<this.attributes.length;Y++){const te=this.attributes[Y],de=P.attributes[te.name];de!==void 0&&O.vertexAttribPointer(de,te.components,O[Vn[te.type]],!1,this.itemSize,te.offset+this.itemSize*(j||0))}}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const wr=new WeakMap;function li(H){var O;if(wr.has(H))return wr.get(H);{const P=(O=H.getParameter(H.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return wr.set(H,P),P}}class Vr{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class qi extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class gi extends Vr{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class Ni extends Vr{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class mo extends Vr{getDefault(){return[!0,!0,!0,!0]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class Zr extends Vr{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class ei extends Vr{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class Co extends Vr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const P=this.current;(O.func!==P.func||O.ref!==P.ref||O.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class Ki extends Vr{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class bo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=O,this.dirty=!1}}class xs extends Vr{getDefault(){return[0,1]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class lo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=O,this.dirty=!1}}class Ds extends Vr{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Rs extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.BLEND):P.disable(P.BLEND),this.current=O,this.dirty=!1}}class el extends Vr{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class To extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class ws extends Vr{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class ls extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=O,this.dirty=!1}}class pi extends Vr{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class Hi extends Vr{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class tl extends Vr{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Ns extends Vr{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class fs extends Vr{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class vl extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class ks extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class _l extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindTexture(P.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class al extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class nl extends Vr{getDefault(){return null}set(O){const P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class Po extends Vr{getDefault(){return null}set(O){var P;if(O===this.current&&!this.dirty)return;const j=this.gl;li(j)?j.bindVertexArray(O):(P=j.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class Gc extends Vr{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class zc extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class Vl extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class ad extends Vr{constructor(O,P){super(O),this.context=O,this.parent=P}getDefault(){return null}}class sd extends ad{setDirty(){this.dirty=!0}set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,O,0),this.current=O,this.dirty=!1}}class Vs extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class ld extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class au{constructor(O,P,j,Y,te){this.context=O,this.width=P,this.height=j;const de=O.gl,pe=this.framebuffer=de.createFramebuffer();if(this.colorAttachment=new sd(O,pe),Y)this.depthAttachment=te?new ld(O,pe):new Vs(O,pe);else if(te)throw new Error("Stencil cannot be set without depth");if(de.checkFramebufferStatus(de.FRAMEBUFFER)!==de.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,P=this.colorAttachment.get();if(P&&O.deleteTexture(P),this.depthAttachment){const j=this.depthAttachment.get();j&&O.deleteRenderbuffer(j)}O.deleteFramebuffer(this.framebuffer)}}class Cs{constructor(O,P,j){this.blendFunction=O,this.blendColor=P,this.mask=j}}Cs.Replace=[1,0],Cs.disabled=new Cs(Cs.Replace,n.aN.transparent,[!1,!1,!1,!1]),Cs.unblended=new Cs(Cs.Replace,n.aN.transparent,[!0,!0,!0,!0]),Cs.alphaBlended=new Cs([1,771],n.aN.transparent,[!0,!0,!0,!0]);class nc{constructor(O){var P,j;if(this.gl=O,this.clearColor=new qi(this),this.clearDepth=new gi(this),this.clearStencil=new Ni(this),this.colorMask=new mo(this),this.depthMask=new Zr(this),this.stencilMask=new ei(this),this.stencilFunc=new Co(this),this.stencilOp=new Ki(this),this.stencilTest=new bo(this),this.depthRange=new xs(this),this.depthTest=new lo(this),this.depthFunc=new Ds(this),this.blend=new Rs(this),this.blendFunc=new el(this),this.blendColor=new To(this),this.blendEquation=new ws(this),this.cullFace=new ls(this),this.cullFaceSide=new pi(this),this.frontFace=new Hi(this),this.program=new tl(this),this.activeTexture=new Ns(this),this.viewport=new fs(this),this.bindFramebuffer=new vl(this),this.bindRenderbuffer=new ks(this),this.bindTexture=new _l(this),this.bindVertexBuffer=new al(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Gc(this),this.pixelStoreUnpackPremultiplyAlpha=new zc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),li(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Y=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=O.RGBA16F)!==null&&P!==void 0?P:Y==null?void 0:Y.RGBA16F_EXT,this.RGB16F=(j=O.RGB16F)!==null&&j!==void 0?j:Y==null?void 0:Y.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Y=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Y==null?void 0:Y.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(O,P){return new En(this,O,P)}createVertexBuffer(O,P,j){return new Kn(this,O,P,j)}createRenderbuffer(O,P,j){const Y=this.gl,te=Y.createRenderbuffer();return this.bindRenderbuffer.set(te),Y.renderbufferStorage(Y.RENDERBUFFER,O,P,j),this.bindRenderbuffer.set(null),te}createFramebuffer(O,P,j,Y){return new au(this,O,P,j,Y)}clear({color:O,depth:P,stencil:j}){const Y=this.gl;let te=0;O&&(te|=Y.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&(te|=Y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),j!==void 0&&(te|=Y.STENCIL_BUFFER_BIT,this.clearStencil.set(j),this.stencilMask.set(255)),Y.clear(te)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){n.aF(O.blendFunction,Cs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return li(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var P;return li(this.gl)?this.gl.deleteVertexArray(O):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class bi{constructor(O,P,j){this.func=O,this.mask=P,this.range=j}}bi.ReadOnly=!1,bi.ReadWrite=!0,bi.disabled=new bi(519,bi.ReadOnly,[0,1]);const Jl=7680;class Qi{constructor(O,P,j,Y,te,de){this.test=O,this.ref=P,this.mask=j,this.fail=Y,this.depthFail=te,this.pass=de}}Qi.disabled=new Qi({func:519,mask:0},0,0,Jl,Jl,Jl);class ao{constructor(O,P,j){this.enable=O,this.mode=P,this.frontFace=j}}let $s;function Do(H,O,P,j,Y){const te=H.context,de=te.gl,pe=H.useProgram("collisionBox"),Ae=[];let Be=0,Ge=0;for(let Nt=0;Nt<j.length;Nt++){const Mt=j[Nt],Gt=O.getTile(Mt).getBucket(P);if(!Gt)continue;const zt=Y?Gt.textCollisionBox:Gt.iconCollisionBox,Xt=Gt.collisionCircleArray;if(Xt.length>0){const Zt=n.H();n.aR(Zt,Gt.placementInvProjMatrix,H.transform.glCoordMatrix),n.aR(Zt,Zt,Gt.placementViewportMatrix),Ae.push({circleArray:Xt,circleOffset:Ge,transform:Mt.posMatrix,invTransform:Zt,coord:Mt}),Be+=Xt.length/4,Ge=Be}zt&&pe.draw(te,de.LINES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,qt(H.transform,Mt.posMatrix),H.style.map.terrain&&H.style.map.terrain.getTerrainData(Mt),P.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,H.transform.zoom,null,null,zt.collisionVertexBuffer)}if(!Y||!Ae.length)return;const qe=H.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Be),at._trim();let lt=0;for(const Nt of Ae)for(let Mt=0;Mt<Nt.circleArray.length/4;Mt++){const Gt=4*Mt,zt=Nt.circleArray[Gt+0],Xt=Nt.circleArray[Gt+1],Zt=Nt.circleArray[Gt+2],Yt=Nt.circleArray[Gt+3];at.emplace(lt++,zt,Xt,Zt,Yt,0),at.emplace(lt++,zt,Xt,Zt,Yt,1),at.emplace(lt++,zt,Xt,Zt,Yt,2),at.emplace(lt++,zt,Xt,Zt,Yt,3)}(!$s||$s.length<2*Be)&&($s=function(Nt){const Mt=2*Nt,Gt=new n.aU;Gt.resize(Mt),Gt._trim();for(let zt=0;zt<Mt;zt++){const Xt=6*zt;Gt.uint16[Xt+0]=4*zt+0,Gt.uint16[Xt+1]=4*zt+1,Gt.uint16[Xt+2]=4*zt+2,Gt.uint16[Xt+3]=4*zt+2,Gt.uint16[Xt+4]=4*zt+3,Gt.uint16[Xt+5]=4*zt+0}return Gt}(Be));const ft=te.createIndexBuffer($s,!0),kt=te.createVertexBuffer(at,n.aT.members,!0);for(const Nt of Ae){const Mt=ra(Nt.transform,Nt.invTransform,H.transform);qe.draw(te,de.TRIANGLES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,Mt,H.style.map.terrain&&H.style.map.terrain.getTerrainData(Nt.coord),P.id,kt,ft,n.a0.simpleSegment(0,2*Nt.circleOffset,Nt.circleArray.length,Nt.circleArray.length/2),null,H.transform.zoom,null,null,null)}kt.destroy(),ft.destroy()}ao.disabled=new ao(!1,1029,2305),ao.backCCW=new ao(!0,1029,2305);const Oc=n.ao(new Float32Array(16));function bl(H,O,P,j,Y){if(H.renderPass!=="translucent")return;const te=Qi.disabled,de=H.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,Ae,Be,Ge,qe,at,lt,ft,kt){const Nt=Ae.transform,Mt=Ea(),Gt=qe==="map",zt=at==="map";for(const Xt of pe){const Zt=Ge.getTile(Xt),Yt=Zt.getBucket(Be);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const ya=Yt.textSizeData,Ca=n.ah(ya,Nt.zoom),La=yt(Zt,1,Ae.transform.zoom),ja=It(Xt.posMatrix,zt,Gt,Ae.transform,La),Wa=Be.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(Ca){const on=Math.pow(2,Nt.zoom-Zt.tileID.overscaledZ),Tn=Ae.style.map.terrain?(Sn,kn)=>Ae.style.map.terrain.getElevation(Xt,Sn,kn):null,Qa=Mt.translatePosition(Nt,Zt,lt,ft);zo(Yt,Gt,zt,kt,Nt,ja,Xt.posMatrix,on,Ca,Wa,Mt,Qa,Xt.toUnwrapped(),Tn)}}}(j,H,P,O,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),Y),P.paint.get("icon-opacity").constantOr(1)!==0&&rc(H,O,P,j,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),te,de),P.paint.get("text-opacity").constantOr(1)!==0&&rc(H,O,P,j,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),te,de),O.map.showCollisionBoxes&&(Do(H,O,P,j,!0),Do(H,O,P,j,!1))}function cs(H,O,P,j,Y,te){const{horizontalAlign:de,verticalAlign:pe}=n.av(H),Ae=-(de-.5)*O,Be=-(pe-.5)*P;return new n.P((Ae/Y+j[0])*te,(Be/Y+j[1])*te)}function ms(H,O,P,j,Y,te){const de=O.tileAnchorPoint.add(new n.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let pe=j.mult(te);return P||(pe=pe.rotate(-Y)),Ft(de.add(pe),O.labelPlaneMatrix,O.getElevation).point}if(P){const pe=We(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(H),Ae=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return H.add(j.rotate(Ae))}return H.add(j)}function zo(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt){const ft=H.text.placedSymbolArray,kt=H.text.dynamicLayoutVertexArray,Nt=H.icon.dynamicLayoutVertexArray,Mt={};kt.clear();for(let Gt=0;Gt<ft.length;Gt++){const zt=ft.get(Gt),Xt=H.allowVerticalPlacement&&!zt.placedOrientation,Zt=zt.hidden||!zt.crossTileID||Xt?null:j[zt.crossTileID];if(Zt){const Yt=new n.P(zt.anchorX,zt.anchorY),ya={getElevation:lt,width:Y.width,height:Y.height,labelPlaneMatrix:te,lineVertexArray:null,pitchWithMap:P,projection:Ge,projectionCache:null,tileAnchorPoint:Yt,translation:qe,unwrappedTileID:at},Ca=P?Ft(Yt,de,lt):We(Yt.x,Yt.y,ya),La=ot(Y.cameraToCenterDistance,Ca.signedDistanceFromCamera);let ja=n.aj(H.textSizeData,Ae,zt)*La/n.aq;P&&(ja*=H.tilePixelRatio/pe);const{width:Wa,height:on,anchor:Tn,textOffset:Qa,textBoxScale:Sn}=Zt,kn=cs(Tn,Wa,on,Qa,Sn,ja),Ln=Ge.getPitchedTextCorrection(Y,Yt.add(new n.P(qe[0],qe[1])),at),fn=ms(Ca.point,ya,O,kn,Y.angle,Ln),Mn=H.allowVerticalPlacement&&zt.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let Wn=0;Wn<zt.numGlyphs;Wn++)n.ak(kt,fn,Mn);Be&&zt.associatedIconIndex>=0&&(Mt[zt.associatedIconIndex]={shiftedAnchor:fn,angle:Mn})}else Bt(zt.numGlyphs,kt)}if(Be){Nt.clear();const Gt=H.icon.placedSymbolArray;for(let zt=0;zt<Gt.length;zt++){const Xt=Gt.get(zt);if(Xt.hidden)Bt(Xt.numGlyphs,Nt);else{const Zt=Mt[zt];if(Zt)for(let Yt=0;Yt<Xt.numGlyphs;Yt++)n.ak(Nt,Zt.shiftedAnchor,Zt.angle);else Bt(Xt.numGlyphs,Nt)}}H.icon.dynamicLayoutVertexBuffer.updateData(Nt)}H.text.dynamicLayoutVertexBuffer.updateData(kt)}function Gr(H,O,P){return P.iconsInText&&O?"symbolTextAndIcon":H?"symbolSDF":"symbolIcon"}function rc(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe){const at=H.context,lt=at.gl,ft=H.transform,kt=Ea(),Nt=pe==="map",Mt=Ae==="map",Gt=pe!=="viewport"&&P.layout.get("symbol-placement")!=="point",zt=Nt&&!Mt&&!Gt,Xt=!Mt&&Gt,Zt=!P.layout.get("symbol-sort-key").isConstant();let Yt=!1;const ya=H.depthModeForSublayer(0,bi.ReadOnly),Ca=P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"),La=[],ja=kt.getCircleRadiusCorrection(ft);for(const Wa of j){const on=O.getTile(Wa),Tn=on.getBucket(P);if(!Tn)continue;const Qa=Y?Tn.text:Tn.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const Sn=Qa.programConfigurations.get(P.id),kn=Y||Tn.sdfIcons,Ln=Y?Tn.textSizeData:Tn.iconSizeData,fn=Mt||ft.pitch!==0,Mn=H.useProgram(Gr(kn,Y,Tn),Sn),Wn=n.ah(Ln,ft.zoom),In=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Wa);let Hn,Jn,kr,lr,Fr=[0,0],Rr=null;if(Y){if(Jn=on.glyphAtlasTexture,kr=lt.LINEAR,Hn=on.glyphAtlasTexture.size,Tn.iconsInText){Fr=on.imageAtlasTexture.size,Rr=on.imageAtlasTexture;const Lr=Ln.kind==="composite"||Ln.kind==="camera";lr=fn||H.options.rotating||H.options.zooming||Lr?lt.LINEAR:lt.NEAREST}}else{const Lr=P.layout.get("icon-size").constantOr(0)!==1||Tn.iconsNeedLinear;Jn=on.imageAtlasTexture,kr=kn||H.options.rotating||H.options.zooming||Lr||fn?lt.LINEAR:lt.NEAREST,Hn=on.imageAtlasTexture.size}const qr=yt(on,1,H.transform.zoom),fi=Xt?Wa.posMatrix:Oc,Wi=It(fi,Mt,Nt,H.transform,qr),Vi=Ot(fi,Mt,Nt,H.transform,qr),to=Ot(Wa.posMatrix,Mt,Nt,H.transform,qr),hi=kt.translatePosition(H.transform,on,te,de),Ur=Ca&&Tn.hasTextData(),Si=P.layout.get("icon-text-fit")!=="none"&&Ur&&Tn.hasIconData();if(Gt){const Lr=H.style.map.terrain?(Fo,bs)=>H.style.map.terrain.getElevation(Wa,Fo,bs):null,_s=P.layout.get("text-rotation-alignment")==="map";vt(Tn,Wa.posMatrix,H,Y,Wi,to,Mt,Be,_s,kt,Wa.toUnwrapped(),ft.width,ft.height,hi,Lr)}const ci=Wa.posMatrix,Qr=Y&&Ca||Si,vi=Gt||Qr?Oc:Wi,ki=Vi,di=kn&&P.paint.get(Y?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let dl;dl=kn?Tn.iconsInText?yn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Hn,Fr,ja):pn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,!0,ja):wn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,ja);const So={program:Mn,buffers:Qa,uniformValues:dl,atlasTexture:Jn,atlasTextureIcon:Rr,atlasInterpolation:kr,atlasInterpolationIcon:lr,isSDF:kn,hasHalo:di};if(Zt&&Tn.canOverlap){Yt=!0;const Lr=Qa.segments.get();for(const _s of Lr)La.push({segments:new n.a0([_s]),sortKey:_s.sortKey,state:So,terrainData:In})}else La.push({segments:Qa.segments,sortKey:0,state:So,terrainData:In})}Yt&&La.sort((Wa,on)=>Wa.sortKey-on.sortKey);for(const Wa of La){const on=Wa.state;if(at.activeTexture.set(lt.TEXTURE0),on.atlasTexture.bind(on.atlasInterpolation,lt.CLAMP_TO_EDGE),on.atlasTextureIcon&&(at.activeTexture.set(lt.TEXTURE1),on.atlasTextureIcon&&on.atlasTextureIcon.bind(on.atlasInterpolationIcon,lt.CLAMP_TO_EDGE)),on.isSDF){const Tn=on.uniformValues;on.hasHalo&&(Tn.u_is_halo=1,pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,Tn,Wa.terrainData)),Tn.u_is_halo=0}pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,on.uniformValues,Wa.terrainData)}}function pd(H,O,P,j,Y,te,de,pe,Ae,Be){const Ge=j.context,qe=Ge.gl;Y.draw(Ge,qe.TRIANGLES,te,de,pe,ao.disabled,Ae,Be,P.id,H.layoutVertexBuffer,H.indexBuffer,O,P.paint,j.transform.zoom,H.programConfigurations.get(P.id),H.dynamicLayoutVertexBuffer,H.opacityVertexBuffer)}function ic(H,O,P,j){if(P.paint.get("heatmap-opacity")!==0)if(H.renderPass==="offscreen"){const Y=H.context,te=Y.gl,de=Qi.disabled,pe=new Cs([te.ONE,te.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(Ae,Be,Ge){const qe=Ae.gl;Ae.activeTexture.set(qe.TEXTURE1),Ae.viewport.set([0,0,Be.width/4,Be.height/4]);let at=Ge.heatmapFbo;if(at)qe.bindTexture(qe.TEXTURE_2D,at.colorAttachment.get()),Ae.bindFramebuffer.set(at.framebuffer);else{const lt=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,lt),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),at=Ge.heatmapFbo=Ae.createFramebuffer(Be.width/4,Be.height/4,!1,!1),function(ft,kt,Nt,Mt){var Gt,zt;const Xt=ft.gl,Zt=(Gt=ft.HALF_FLOAT)!==null&&Gt!==void 0?Gt:Xt.UNSIGNED_BYTE,Yt=(zt=ft.RGBA16F)!==null&&zt!==void 0?zt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Yt,kt.width/4,kt.height/4,0,Xt.RGBA,Zt,null),Mt.colorAttachment.set(Nt)}(Ae,Be,lt,at)}})(Y,H,P),Y.clear({color:n.aN.transparent});for(let Ae=0;Ae<j.length;Ae++){const Be=j[Ae];if(O.hasRenderableParent(Be))continue;const Ge=O.getTile(Be),qe=Ge.getBucket(P);if(!qe)continue;const at=qe.programConfigurations.get(P.id),lt=H.useProgram("heatmap",at),{zoom:ft}=H.transform;lt.draw(Y,te.TRIANGLES,bi.disabled,de,pe,ao.disabled,Ma(Be.posMatrix,Ge,ft,P.paint.get("heatmap-intensity")),null,P.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,P.paint,H.transform.zoom,at)}Y.viewport.set([0,0,H.width,H.height])}else H.renderPass==="translucent"&&(H.context.setColorMode(H.colorModeForRenderPass()),function(Y,te){const de=Y.context,pe=de.gl,Ae=te.heatmapFbo;if(!Ae)return;de.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,Ae.colorAttachment.get()),de.activeTexture.set(pe.TEXTURE1);let Be=te.colorRampTexture;Be||(Be=te.colorRampTexture=new I(de,te.colorRamp,pe.RGBA)),Be.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(de,pe.TRIANGLES,bi.disabled,Qi.disabled,Y.colorModeForRenderPass(),ao.disabled,$a(Y,te,0,1),null,te.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,te.paint,Y.transform.zoom)}(H,P))}function $l(H,O,P,j,Y){if(!P||!j||!j.imageAtlas)return;const te=j.imageAtlas.patternPositions;let de=te[P.to.toString()],pe=te[P.from.toString()];if(!de&&pe&&(de=pe),!pe&&de&&(pe=de),!de||!pe){const Ae=Y.getPaintProperty(O);de=te[Ae],pe=te[Ae]}de&&pe&&H.setConstantPatternPositions(de,pe)}function Hc(H,O,P,j,Y,te,de){const pe=H.context.gl,Ae="fill-pattern",Be=P.paint.get(Ae),Ge=Be&&Be.constantOr(1),qe=P.getCrossfadeParameters();let at,lt,ft,kt,Nt;de?(lt=Ge&&!P.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=pe.LINES):(lt=Ge?"fillPattern":"fill",at=pe.TRIANGLES);const Mt=Be.constantOr(null);for(const Gt of j){const zt=O.getTile(Gt);if(Ge&&!zt.patternsLoaded())continue;const Xt=zt.getBucket(P);if(!Xt)continue;const Zt=Xt.programConfigurations.get(P.id),Yt=H.useProgram(lt,Zt),ya=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Gt);Ge&&(H.context.activeTexture.set(pe.TEXTURE0),zt.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Zt.updatePaintBuffers(qe)),$l(Zt,Ae,Mt,zt,P);const Ca=ya?Gt:null,La=Ca?Ca.posMatrix:Gt.posMatrix,ja=H.translatePosMatrix(La,zt,P.paint.get("fill-translate"),P.paint.get("fill-translate-anchor"));if(de){kt=Xt.indexBuffer2,Nt=Xt.segments2;const Wa=[pe.drawingBufferWidth,pe.drawingBufferHeight];ft=lt==="fillOutlinePattern"&&Ge?la(ja,H,qe,zt,Wa):Rn(ja,Wa)}else kt=Xt.indexBuffer,Nt=Xt.segments,ft=Ge?Cn(ja,H,qe,zt):ln(ja);Yt.draw(H.context,at,Y,H.stencilModeForClipping(Gt),te,ao.disabled,ft,ya,P.id,Xt.layoutVertexBuffer,kt,Nt,P.paint,H.transform.zoom,Zt)}}function Wc(H,O,P,j,Y,te,de){const pe=H.context,Ae=pe.gl,Be="fill-extrusion-pattern",Ge=P.paint.get(Be),qe=Ge.constantOr(1),at=P.getCrossfadeParameters(),lt=P.paint.get("fill-extrusion-opacity"),ft=Ge.constantOr(null);for(const kt of j){const Nt=O.getTile(kt),Mt=Nt.getBucket(P);if(!Mt)continue;const Gt=H.style.map.terrain&&H.style.map.terrain.getTerrainData(kt),zt=Mt.programConfigurations.get(P.id),Xt=H.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",zt);qe&&(H.context.activeTexture.set(Ae.TEXTURE0),Nt.imageAtlasTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),zt.updatePaintBuffers(at)),$l(zt,Be,ft,Nt,P);const Zt=H.translatePosMatrix(kt.posMatrix,Nt,P.paint.get("fill-extrusion-translate"),P.paint.get("fill-extrusion-translate-anchor")),Yt=P.paint.get("fill-extrusion-vertical-gradient"),ya=qe?dn(Zt,H,Yt,lt,kt,at,Nt):Xa(Zt,H,Yt,lt);Xt.draw(pe,pe.gl.TRIANGLES,Y,te,de,ao.backCCW,ya,Gt,P.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,P.paint,H.transform.zoom,zt,H.style.map.terrain&&Mt.centroidVertexBuffer)}}function Cc(H,O,P,j,Y,te,de){const pe=H.context,Ae=pe.gl,Be=P.fbo;if(!Be)return;const Ge=H.useProgram("hillshade"),qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(O);pe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,Be.colorAttachment.get());const at=qe?O:null;Ge.draw(pe,Ae.TRIANGLES,Y,te,de,ao.disabled,Pa(H,P,j,at),qe,j.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}function xd(H,O,P,j,Y,te){const de=H.context,pe=de.gl,Ae=O.dem;if(Ae&&Ae.data){const Be=Ae.dim,Ge=Ae.stride,qe=Ae.getPixels();if(de.activeTexture.set(pe.TEXTURE1),de.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||H.getTileTexture(Ge),O.demTexture){const lt=O.demTexture;lt.update(qe,{premultiply:!1}),lt.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else O.demTexture=new I(de,qe,pe.RGBA,{premultiply:!1}),O.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);de.activeTexture.set(pe.TEXTURE0);let at=O.fbo;if(!at){const lt=new I(de,{width:Be,height:Be,data:null},pe.RGBA);lt.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),at=O.fbo=de.createFramebuffer(Be,Be,!0,!1),at.colorAttachment.set(lt.texture)}de.bindFramebuffer.set(at.framebuffer),de.viewport.set([0,0,Be,Be]),H.useProgram("hillshadePrepare").draw(de,pe.TRIANGLES,j,Y,te,ao.disabled,Sa(O.tileID,Ae),null,P.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function zs(H,O,P,j,Y,te){const de=j.paint.get("raster-fade-duration");if(!te&&de>0){const pe=l.now(),Ae=(pe-H.timeAdded)/de,Be=O?(pe-O.timeAdded)/de:-1,Ge=P.getSource(),qe=Y.coveringZoomLevel({tileSize:Ge.tileSize,roundZoom:Ge.roundZoom}),at=!O||Math.abs(O.tileID.overscaledZ-qe)>Math.abs(H.tileID.overscaledZ-qe),lt=at&&H.refreshedUponExpiration?1:n.ad(at?Ae:1-Be,0,1);return H.refreshedUponExpiration&&Ae>=1&&(H.refreshedUponExpiration=!1),O?{opacity:1,mix:1-lt}:{opacity:lt,mix:0}}return{opacity:1,mix:0}}const rl=new n.aN(1,0,0,1),il=new n.aN(0,1,0,1),ds=new n.aN(0,0,1,1),ji=new n.aN(1,0,1,1),nd=new n.aN(0,1,1,1);function Fc(H){const O=H.transform.padding;Lc(H,H.transform.height-(O.top||0),3,rl),Lc(H,O.bottom||0,3,il),xo(H,O.left||0,3,ds),xo(H,H.transform.width-(O.right||0),3,ji);const P=H.transform.centerPoint;(function(j,Y,te,de){Sc(j,Y-1,te-10,2,20,de),Sc(j,Y-10,te-1,20,2,de)})(H,P.x,H.transform.height-P.y,nd)}function Lc(H,O,P,j){Sc(H,0,O+P/2,H.transform.width,P,j)}function xo(H,O,P,j){Sc(H,O-P/2,0,P,H.transform.height,j)}function Sc(H,O,P,j,Y,te){const de=H.context,pe=de.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(O*H.pixelRatio,P*H.pixelRatio,j*H.pixelRatio,Y*H.pixelRatio),de.clear({color:te}),pe.disable(pe.SCISSOR_TEST)}function wd(H,O,P){const j=H.context,Y=j.gl,te=P.posMatrix,de=H.useProgram("debug"),pe=bi.disabled,Ae=Qi.disabled,Be=H.colorModeForRenderPass(),Ge="$debug",qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(P);j.activeTexture.set(Y.TEXTURE0);const at=O.getTileByID(P.key).latestRawTileData,lt=at&&at.byteLength||0,ft=Math.floor(lt/1024),kt=O.getTile(P).tileSize,Nt=512/Math.min(kt,512)*(P.overscaledZ/H.transform.zoom)*.5;let Mt=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(Mt+=` => ${P.overscaledZ}`),function(Gt,zt){Gt.initDebugOverlayCanvas();const Xt=Gt.debugOverlayCanvas,Zt=Gt.context.gl,Yt=Gt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Xt.width,Xt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(zt,5,5),Yt.strokeText(zt,5,5),Gt.debugOverlayTexture.update(Xt),Gt.debugOverlayTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE)}(H,`${Mt} ${ft}kB`),de.draw(j,Y.TRIANGLES,pe,Ae,Cs.alphaBlended,ao.disabled,sa(te,n.aN.transparent,Nt),null,Ge,H.debugBuffer,H.quadTriangleIndexBuffer,H.debugSegments),de.draw(j,Y.LINE_STRIP,pe,Ae,Be,ao.disabled,sa(te,n.aN.red),qe,Ge,H.debugBuffer,H.tileBorderIndexBuffer,H.debugSegments)}function oc(H,O,P){const j=H.context,Y=j.gl,te=H.colorModeForRenderPass(),de=new bi(Y.LEQUAL,bi.ReadWrite,H.depthRangeFor3D),pe=H.useProgram("terrain"),Ae=O.getTerrainMesh();j.bindFramebuffer.set(null),j.viewport.set([0,0,H.width,H.height]);for(const Be of P){const Ge=H.renderToTexture.getTexture(Be),qe=O.getTerrainData(Be.tileID);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,Ge.texture);const at=H.transform.calculatePosMatrix(Be.tileID.toUnwrapped()),lt=O.getMeshFrameDelta(H.transform.zoom),ft=H.transform.calculateFogMatrix(Be.tileID.toUnwrapped()),kt=ha(at,lt,ft,H.style.sky,H.transform.pitch);pe.draw(j,Y.TRIANGLES,de,Qi.disabled,te,ao.backCCW,kt,qe,"terrain",Ae.vertexBuffer,Ae.indexBuffer,Ae.segments)}}class Kl{constructor(O,P,j){this.vertexBuffer=O,this.indexBuffer=P,this.segments=j}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class sc{constructor(O,P){this.context=new nc(O),this.transform=P,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=je.maxUnderzooming+je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qa}resize(O,P,j){if(this.width=Math.floor(O*j),this.height=Math.floor(P*j),this.pixelRatio=j,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Y of this.style._order)this.style._layers[Y].resize()}setup(){const O=this.context,P=new n.aX;P.emplaceBack(0,0),P.emplaceBack(n.X,0),P.emplaceBack(0,n.X),P.emplaceBack(n.X,n.X),this.tileExtentBuffer=O.createVertexBuffer(P,cn.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const j=new n.aX;j.emplaceBack(0,0),j.emplaceBack(n.X,0),j.emplaceBack(0,n.X),j.emplaceBack(n.X,n.X),this.debugBuffer=O.createVertexBuffer(j,cn.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const Y=new n.$;Y.emplaceBack(0,0,0,0),Y.emplaceBack(n.X,0,n.X,0),Y.emplaceBack(0,n.X,0,n.X),Y.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=O.createVertexBuffer(Y,we.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const te=new n.aX;te.emplaceBack(0,0),te.emplaceBack(1,0),te.emplaceBack(0,1),te.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(te,cn.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const de=new n.aZ;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(de);const pe=new n.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(pe);const Ae=this.context.gl;this.stencilClearMode=new Qi({func:Ae.ALWAYS,mask:0},0,255,Ae.ZERO,Ae.ZERO,Ae.ZERO)}clearStencil(){const O=this.context,P=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const j=n.H();n.aQ(j,0,this.width,this.height,0,0,1),n.K(j,j,[P.drawingBufferWidth,P.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,P.TRIANGLES,bi.disabled,this.stencilClearMode,Cs.disabled,ao.disabled,Ia(j),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,P){if(this.currentStencilSource===O.source||!O.isTileClipped()||!P||!P.length)return;this.currentStencilSource=O.source;const j=this.context,Y=j.gl;this.nextStencilID+P.length>256&&this.clearStencil(),j.setColorMode(Cs.disabled),j.setDepthMode(bi.disabled);const te=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const de of P){const pe=this._tileClippingMaskIDs[de.key]=this.nextStencilID++,Ae=this.style.map.terrain&&this.style.map.terrain.getTerrainData(de);te.draw(j,Y.TRIANGLES,bi.disabled,new Qi({func:Y.ALWAYS,mask:0},pe,255,Y.KEEP,Y.KEEP,Y.REPLACE),Cs.disabled,ao.disabled,Ia(de.posMatrix),Ae,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,P=this.context.gl;return new Qi({func:P.NOTEQUAL,mask:255},O,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(O){const P=this.context.gl;return new Qi({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,P.KEEP,P.KEEP,P.REPLACE)}stencilConfigForOverlap(O){const P=this.context.gl,j=O.sort((de,pe)=>pe.overscaledZ-de.overscaledZ),Y=j[j.length-1].overscaledZ,te=j[0].overscaledZ-Y+1;if(te>1){this.currentStencilSource=void 0,this.nextStencilID+te>256&&this.clearStencil();const de={};for(let pe=0;pe<te;pe++)de[pe+Y]=new Qi({func:P.GEQUAL,mask:255},pe+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=te,[de,j]}return[{[Y]:Qi.disabled},j]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new Cs([O.CONSTANT_COLOR,O.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Cs.unblended:Cs.alphaBlended}depthModeForSublayer(O,P,j){if(!this.opaquePassEnabledForLayer())return bi.disabled;const Y=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new bi(j||this.context.gl.LEQUAL,P,[Y,Y])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,P){var j;this.style=O,this.options=P,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(l.now()),this.imageManager.beginFrame();const Y=this.style._order,te=this.style.sourceCaches,de={},pe={},Ae={};for(const Be in te){const Ge=te[Be];Ge.used&&Ge.prepare(this.context),de[Be]=Ge.getVisibleCoordinates(),pe[Be]=de[Be].slice().reverse(),Ae[Be]=Ge.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Be=0;Be<Y.length;Be++){const Ge=Y[Be];if(this.style._layers[Ge].is3D()){this.opaquePassCutoff=Be;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Be of Y){const Ge=this.style._layers[Be];if(!Ge.hasOffscreenPass()||Ge.isHidden(this.transform.zoom))continue;const qe=pe[Ge.source];(Ge.type==="custom"||qe.length)&&this.renderLayer(this,te[Ge.source],Ge,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((j=this.style.stylesheet)===null||j===void 0)&&j.sky&&function(Be,Ge){const qe=Be.context,at=qe.gl,lt=((Gt,zt,Xt)=>({u_sky_color:Gt.properties.get("sky-color"),u_horizon_color:Gt.properties.get("horizon-color"),u_horizon:(zt.height/2+zt.getHorizon())*Xt,u_sky_horizon_blend:Gt.properties.get("sky-horizon-blend")*zt.height/2*Xt}))(Ge,Be.style.map.transform,Be.pixelRatio),ft=new bi(at.LEQUAL,bi.ReadWrite,[0,1]),kt=Qi.disabled,Nt=Be.colorModeForRenderPass(),Mt=Be.useProgram("sky");if(!Ge.mesh){const Gt=new n.aX;Gt.emplaceBack(-1,-1),Gt.emplaceBack(1,-1),Gt.emplaceBack(1,1),Gt.emplaceBack(-1,1);const zt=new n.aY;zt.emplaceBack(0,1,2),zt.emplaceBack(0,2,3),Ge.mesh=new Kl(qe.createVertexBuffer(Gt,cn.members),qe.createIndexBuffer(zt),n.a0.simpleSegment(0,0,Gt.length,zt.length))}Mt.draw(qe,at.TRIANGLES,ft,kt,Nt,ao.disabled,lt,void 0,"sky",Ge.mesh.vertexBuffer,Ge.mesh.indexBuffer,Ge.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Y.length-1;this.currentLayer>=0;this.currentLayer--){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source],qe=de[Be.source];this._renderTileClippingMasks(Be,qe),this.renderLayer(this,Ge,Be,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Y.length;this.currentLayer++){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Be))continue;const qe=(Be.type==="symbol"?Ae:pe)[Be.source];this._renderTileClippingMasks(Be,de[Be.source]),this.renderLayer(this,Ge,Be,qe)}if(this.options.showTileBoundaries){const Be=function(Ge,qe){let at=null;const lt=Object.values(Ge._layers).flatMap(Mt=>Mt.source&&!Mt.isHidden(qe)?[Ge.sourceCaches[Mt.source]]:[]),ft=lt.filter(Mt=>Mt.getSource().type==="vector"),kt=lt.filter(Mt=>Mt.getSource().type!=="vector"),Nt=Mt=>{(!at||at.getSource().maxzoom<Mt.getSource().maxzoom)&&(at=Mt)};return ft.forEach(Mt=>Nt(Mt)),at||kt.forEach(Mt=>Nt(Mt)),at}(this.style,this.transform.zoom);Be&&function(Ge,qe,at){for(let lt=0;lt<at.length;lt++)wd(Ge,qe,at[lt])}(this,Be,Be.getVisibleCoordinates())}this.options.showPadding&&Fc(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const P=this.terrainFacilitator.matrix,j=this.transform.modelViewProjectionMatrix;let Y=this.terrainFacilitator.dirty;Y||(Y=O?!n.a_(P,j):!n.a$(P,j)),Y||(Y=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Y&&(n.b0(P,j),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(te,de){const pe=te.context,Ae=pe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.sourceCache.getRenderableTiles(),lt=te.useProgram("terrainDepth");pe.bindFramebuffer.set(de.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1});for(const ft of at){const kt=de.getTerrainData(ft.tileID),Nt={u_matrix:te.transform.calculatePosMatrix(ft.tileID.toUnwrapped()),u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};lt.draw(pe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Nt,kt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain),function(te,de){const pe=te.context,Ae=pe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.getCoordsTexture(),lt=de.sourceCache.getRenderableTiles(),ft=te.useProgram("terrainCoords");pe.bindFramebuffer.set(de.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1}),de.coordsIndex=[];for(const kt of lt){const Nt=de.getTerrainData(kt.tileID);pe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,at.texture);const Mt={u_matrix:te.transform.calculatePosMatrix(kt.tileID.toUnwrapped()),u_terrain_coords_id:(255-de.coordsIndex.length)/255,u_texture:0,u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};ft.draw(pe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Mt,Nt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),de.coordsIndex.push(kt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain))}renderLayer(O,P,j,Y){if(!j.isHidden(this.transform.zoom)&&(j.type==="background"||j.type==="custom"||(Y||[]).length))switch(this.id=j.id,j.type){case"symbol":bl(O,P,j,Y,this.style.placement.variableOffsets);break;case"circle":(function(te,de,pe,Ae){if(te.renderPass!=="translucent")return;const Be=pe.paint.get("circle-opacity"),Ge=pe.paint.get("circle-stroke-width"),qe=pe.paint.get("circle-stroke-opacity"),at=!pe.layout.get("circle-sort-key").isConstant();if(Be.constantOr(1)===0&&(Ge.constantOr(1)===0||qe.constantOr(1)===0))return;const lt=te.context,ft=lt.gl,kt=te.depthModeForSublayer(0,bi.ReadOnly),Nt=Qi.disabled,Mt=te.colorModeForRenderPass(),Gt=[];for(let zt=0;zt<Ae.length;zt++){const Xt=Ae[zt],Zt=de.getTile(Xt),Yt=Zt.getBucket(pe);if(!Yt)continue;const ya=Yt.programConfigurations.get(pe.id),Ca=te.useProgram("circle",ya),La=Yt.layoutVertexBuffer,ja=Yt.indexBuffer,Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Xt),on={programConfiguration:ya,program:Ca,layoutVertexBuffer:La,indexBuffer:ja,uniformValues:za(te,Xt,Zt,pe),terrainData:Wa};if(at){const Tn=Yt.segments.get();for(const Qa of Tn)Gt.push({segments:new n.a0([Qa]),sortKey:Qa.sortKey,state:on})}else Gt.push({segments:Yt.segments,sortKey:0,state:on})}at&&Gt.sort((zt,Xt)=>zt.sortKey-Xt.sortKey);for(const zt of Gt){const{programConfiguration:Xt,program:Zt,layoutVertexBuffer:Yt,indexBuffer:ya,uniformValues:Ca,terrainData:La}=zt.state,ja=zt.segments;Zt.draw(lt,ft.TRIANGLES,kt,Nt,Mt,ao.disabled,Ca,La,pe.id,Yt,ya,ja,pe.paint,te.transform.zoom,Xt)}})(O,P,j,Y);break;case"heatmap":ic(O,P,j,Y);break;case"line":(function(te,de,pe,Ae){if(te.renderPass!=="translucent")return;const Be=pe.paint.get("line-opacity"),Ge=pe.paint.get("line-width");if(Be.constantOr(1)===0||Ge.constantOr(1)===0)return;const qe=te.depthModeForSublayer(0,bi.ReadOnly),at=te.colorModeForRenderPass(),lt=pe.paint.get("line-dasharray"),ft=pe.paint.get("line-pattern"),kt=ft.constantOr(1),Nt=pe.paint.get("line-gradient"),Mt=pe.getCrossfadeParameters(),Gt=kt?"linePattern":lt?"lineSDF":Nt?"lineGradient":"line",zt=te.context,Xt=zt.gl;let Zt=!0;for(const Yt of Ae){const ya=de.getTile(Yt);if(kt&&!ya.patternsLoaded())continue;const Ca=ya.getBucket(pe);if(!Ca)continue;const La=Ca.programConfigurations.get(pe.id),ja=te.context.program.get(),Wa=te.useProgram(Gt,La),on=Zt||Wa.program!==ja,Tn=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Yt),Qa=ft.constantOr(null);if(Qa&&ya.imageAtlas){const Ln=ya.imageAtlas,fn=Ln.patternPositions[Qa.to.toString()],Mn=Ln.patternPositions[Qa.from.toString()];fn&&Mn&&La.setConstantPatternPositions(fn,Mn)}const Sn=Tn?Yt:null,kn=kt?Va(te,ya,pe,Mt,Sn):lt?en(te,ya,pe,lt,Mt,Sn):Nt?ga(te,ya,pe,Ca.lineClipsArray.length,Sn):ea(te,ya,pe,Sn);if(kt)zt.activeTexture.set(Xt.TEXTURE0),ya.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),La.updatePaintBuffers(Mt);else if(lt&&(on||te.lineAtlas.dirty))zt.activeTexture.set(Xt.TEXTURE0),te.lineAtlas.bind(zt);else if(Nt){const Ln=Ca.gradients[pe.id];let fn=Ln.texture;if(pe.gradientVersion!==Ln.version){let Mn=256;if(pe.stepInterpolant){const Wn=de.getSource().maxzoom,In=Yt.canonical.z===Wn?Math.ceil(1<<te.transform.maxZoom-Yt.canonical.z):1,Hn=Ca.maxLineLength/n.X*1024*In;Mn=n.ad(n.aV(Hn),256,zt.maxTextureSize)}Ln.gradient=n.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mn,image:Ln.gradient||void 0,clips:Ca.lineClipsArray}),Ln.texture?Ln.texture.update(Ln.gradient):Ln.texture=new I(zt,Ln.gradient,Xt.RGBA),Ln.version=pe.gradientVersion,fn=Ln.texture}zt.activeTexture.set(Xt.TEXTURE0),fn.bind(pe.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Wa.draw(zt,Xt.TRIANGLES,qe,te.stencilModeForClipping(Yt),at,ao.disabled,kn,Tn,pe.id,Ca.layoutVertexBuffer,Ca.indexBuffer,Ca.segments,pe.paint,te.transform.zoom,La,Ca.layoutVertexBuffer2),Zt=!1}})(O,P,j,Y);break;case"fill":(function(te,de,pe,Ae){const Be=pe.paint.get("fill-color"),Ge=pe.paint.get("fill-opacity");if(Ge.constantOr(1)===0)return;const qe=te.colorModeForRenderPass(),at=pe.paint.get("fill-pattern"),lt=te.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Be.constantOr(n.aN.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(te.renderPass===lt){const ft=te.depthModeForSublayer(1,te.renderPass==="opaque"?bi.ReadWrite:bi.ReadOnly);Hc(te,de,pe,Ae,ft,qe,!1)}if(te.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const ft=te.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,bi.ReadOnly);Hc(te,de,pe,Ae,ft,qe,!0)}})(O,P,j,Y);break;case"fill-extrusion":(function(te,de,pe,Ae){const Be=pe.paint.get("fill-extrusion-opacity");if(Be!==0&&te.renderPass==="translucent"){const Ge=new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D);if(Be!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))Wc(te,de,pe,Ae,Ge,Qi.disabled,Cs.disabled),Wc(te,de,pe,Ae,Ge,te.stencilModeFor3D(),te.colorModeForRenderPass());else{const qe=te.colorModeForRenderPass();Wc(te,de,pe,Ae,Ge,Qi.disabled,qe)}}})(O,P,j,Y);break;case"hillshade":(function(te,de,pe,Ae){if(te.renderPass!=="offscreen"&&te.renderPass!=="translucent")return;const Be=te.context,Ge=te.depthModeForSublayer(0,bi.ReadOnly),qe=te.colorModeForRenderPass(),[at,lt]=te.renderPass==="translucent"?te.stencilConfigForOverlap(Ae):[{},Ae];for(const ft of lt){const kt=de.getTile(ft);kt.needsHillshadePrepare!==void 0&&kt.needsHillshadePrepare&&te.renderPass==="offscreen"?xd(te,kt,pe,Ge,Qi.disabled,qe):te.renderPass==="translucent"&&Cc(te,ft,kt,pe,Ge,at[ft.overscaledZ],qe)}Be.viewport.set([0,0,te.width,te.height])})(O,P,j,Y);break;case"raster":(function(te,de,pe,Ae){if(te.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!Ae.length)return;const Be=te.context,Ge=Be.gl,qe=de.getSource(),at=te.useProgram("raster"),lt=te.colorModeForRenderPass(),[ft,kt]=qe instanceof ye?[{},Ae]:te.stencilConfigForOverlap(Ae),Nt=kt[kt.length-1].overscaledZ,Mt=!te.options.moving;for(const Gt of kt){const zt=te.depthModeForSublayer(Gt.overscaledZ-Nt,pe.paint.get("raster-opacity")===1?bi.ReadWrite:bi.ReadOnly,Ge.LESS),Xt=de.getTile(Gt);Xt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Zt=de.findLoadedParent(Gt,0),Yt=de.findLoadedSibling(Gt),ya=zs(Xt,Zt||Yt||null,de,pe,te.transform,te.style.map.terrain);let Ca,La;const ja=pe.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;Be.activeTexture.set(Ge.TEXTURE0),Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Be.activeTexture.set(Ge.TEXTURE1),Zt?(Zt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Ca=Math.pow(2,Zt.tileID.overscaledZ-Xt.tileID.overscaledZ),La=[Xt.tileID.canonical.x*Ca%1,Xt.tileID.canonical.y*Ca%1]):Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Be.extTextureFilterAnisotropic&&te.transform.pitch>20&&Ge.texParameterf(Ge.TEXTURE_2D,Be.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Be.extTextureFilterAnisotropicMax);const Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Gt),on=Wa?Gt:null,Tn=on?on.posMatrix:te.transform.calculatePosMatrix(Gt.toUnwrapped(),Mt),Qa=_n(Tn,La||[0,0],Ca||1,ya,pe);qe instanceof ye?at.draw(Be,Ge.TRIANGLES,zt,Qi.disabled,lt,ao.disabled,Qa,Wa,pe.id,qe.boundsBuffer,te.quadTriangleIndexBuffer,qe.boundsSegments):at.draw(Be,Ge.TRIANGLES,zt,ft[Gt.overscaledZ],lt,ao.disabled,Qa,Wa,pe.id,te.rasterBoundsBuffer,te.quadTriangleIndexBuffer,te.rasterBoundsSegments)}})(O,P,j,Y);break;case"background":(function(te,de,pe,Ae){const Be=pe.paint.get("background-color"),Ge=pe.paint.get("background-opacity");if(Ge===0)return;const qe=te.context,at=qe.gl,lt=te.transform,ft=lt.tileSize,kt=pe.paint.get("background-pattern");if(te.isPatternMissing(kt))return;const Nt=!kt&&Be.a===1&&Ge===1&&te.opaquePassEnabledForLayer()?"opaque":"translucent";if(te.renderPass!==Nt)return;const Mt=Qi.disabled,Gt=te.depthModeForSublayer(0,Nt==="opaque"?bi.ReadWrite:bi.ReadOnly),zt=te.colorModeForRenderPass(),Xt=te.useProgram(kt?"backgroundPattern":"background"),Zt=Ae||lt.coveringTiles({tileSize:ft,terrain:te.style.map.terrain});kt&&(qe.activeTexture.set(at.TEXTURE0),te.imageManager.bind(te.context));const Yt=pe.getCrossfadeParameters();for(const ya of Zt){const Ca=Ae?ya.posMatrix:te.transform.calculatePosMatrix(ya.toUnwrapped()),La=kt?qn(Ca,Ge,te,kt,{tileID:ya,tileSize:ft},Yt):Nn(Ca,Ge,Be),ja=te.style.map.terrain&&te.style.map.terrain.getTerrainData(ya);Xt.draw(qe,at.TRIANGLES,Gt,Mt,zt,ao.disabled,La,ja,pe.id,te.tileExtentBuffer,te.quadTriangleIndexBuffer,te.tileExtentSegments)}})(O,0,j,Y);break;case"custom":(function(te,de,pe){const Ae=te.context,Be=pe.implementation;if(te.renderPass==="offscreen"){const Ge=Be.prerender;Ge&&(te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ge.call(Be,Ae.gl,te.transform.customLayerMatrix()),Ae.setDirty(),te.setBaseState())}else if(te.renderPass==="translucent"){te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ae.setStencilMode(Qi.disabled);const Ge=Be.renderingMode==="3d"?new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D):te.depthModeForSublayer(0,bi.ReadOnly);Ae.setDepthMode(Ge),Be.render(Ae.gl,te.transform.customLayerMatrix(),{farZ:te.transform.farZ,nearZ:te.transform.nearZ,fov:te.transform._fov,modelViewProjectionMatrix:te.transform.modelViewProjectionMatrix,projectionMatrix:te.transform.projectionMatrix}),Ae.setDirty(),te.setBaseState(),Ae.bindFramebuffer.set(null)}})(O,0,j)}}translatePosMatrix(O,P,j,Y,te){if(!j[0]&&!j[1])return O;const de=te?Y==="map"?this.transform.angle:0:Y==="viewport"?-this.transform.angle:0;if(de){const Be=Math.sin(de),Ge=Math.cos(de);j=[j[0]*Ge-j[1]*Be,j[0]*Be+j[1]*Ge]}const pe=[te?j[0]:yt(P,j[0],this.transform.zoom),te?j[1]:yt(P,j[1],this.transform.zoom),0],Ae=new Float32Array(16);return n.J(Ae,O,pe),Ae}saveTileTexture(O){const P=this._tileTextures[O.size[0]];P?P.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const P=this._tileTextures[O];return P&&P.length>0?P.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const P=this.imageManager.getPattern(O.from.toString()),j=this.imageManager.getPattern(O.to.toString());return!P||!j}useProgram(O,P){this.cache=this.cache||{};const j=O+(P?P.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[j]||(this.cache[j]=new Ya(this.context,hn[O],P,Dn[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const O=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,O.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:P}=this.context.gl;return this.width!==O||this.height!==P}}class ol{constructor(O,P){this.points=O,this.planes=P}static fromInvProjectionMatrix(O,P,j){const Y=Math.pow(2,j),te=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(pe=>{const Ae=1/(pe=n.ag([],pe,O))[3]/P*Y;return n.b1(pe,pe,[Ae,Ae,1/pe[3],Ae])}),de=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const Ae=function(at,lt){var ft=lt[0],kt=lt[1],Nt=lt[2],Mt=ft*ft+kt*kt+Nt*Nt;return Mt>0&&(Mt=1/Math.sqrt(Mt)),at[0]=lt[0]*Mt,at[1]=lt[1]*Mt,at[2]=lt[2]*Mt,at}([],function(at,lt,ft){var kt=lt[0],Nt=lt[1],Mt=lt[2],Gt=ft[0],zt=ft[1],Xt=ft[2];return at[0]=Nt*Xt-Mt*zt,at[1]=Mt*Gt-kt*Xt,at[2]=kt*zt-Nt*Gt,at}([],T([],te[pe[0]],te[pe[1]]),T([],te[pe[2]],te[pe[1]]))),Be=(Ge=Ae,qe=te[pe[1]],-(Ge[0]*qe[0]+Ge[1]*qe[1]+Ge[2]*qe[2]));var Ge,qe;return Ae.concat(Be)});return new ol(te,de)}}class js{constructor(O,P){this.min=O,this.max=P,this.center=function(j,Y,te){return j[0]=Y[0]*te,j[1]=Y[1]*te,j[2]=Y[2]*te,j}([],function(j,Y,te){return j[0]=Y[0]+te[0],j[1]=Y[1]+te[1],j[2]=Y[2]+te[2],j}([],this.min,this.max),.5)}quadrant(O){const P=[O%2==0,O<2],j=S(this.min),Y=S(this.max);for(let te=0;te<P.length;te++)j[te]=P[te]?this.min[te]:this.center[te],Y[te]=P[te]?this.center[te]:this.max[te];return Y[2]=this.max[2],new js(j,Y)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){const P=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let j=!0;for(let Y=0;Y<O.planes.length;Y++){const te=O.planes[Y];let de=0;for(let pe=0;pe<P.length;pe++)n.b2(te,P[pe])>=0&&de++;if(de===0)return 0;de!==P.length&&(j=!1)}if(j)return 2;for(let Y=0;Y<3;Y++){let te=Number.MAX_VALUE,de=-Number.MAX_VALUE;for(let pe=0;pe<O.points.length;pe++){const Ae=O.points[pe][Y]-this.min[Y];te=Math.min(te,Ae),de=Math.max(de,Ae)}if(de<0||te>this.max[Y]-this.min[Y])return 0}return 1}}class Ql{constructor(O=0,P=0,j=0,Y=0){if(isNaN(O)||O<0||isNaN(P)||P<0||isNaN(j)||j<0||isNaN(Y)||Y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=P,this.left=j,this.right=Y}interpolate(O,P,j){return P.top!=null&&O.top!=null&&(this.top=n.z.number(O.top,P.top,j)),P.bottom!=null&&O.bottom!=null&&(this.bottom=n.z.number(O.bottom,P.bottom,j)),P.left!=null&&O.left!=null&&(this.left=n.z.number(O.left,P.left,j)),P.right!=null&&O.right!=null&&(this.right=n.z.number(O.right,P.right,j)),this}getCenter(O,P){const j=n.ad((this.left+O-this.right)/2,0,O),Y=n.ad((this.top+P-this.bottom)/2,0,P);return new n.P(j,Y)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new Ql(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Tc=85.051129;class oi{constructor(O,P,j,Y,te){this.tileSize=512,this._renderWorldCopies=te===void 0||!!te,this._minZoom=O||0,this._maxZoom=P||22,this._minPitch=j??0,this._maxPitch=Y??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new n.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ql,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new n.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(O){const P=-n.b3(O,-180,180)*Math.PI/180;this.angle!==P&&(this._unmodified=!1,this.angle=P,this._calcMatrices(),this.rotationMatrix=function(){var j=new n.A(4);return n.A!=Float32Array&&(j[1]=0,j[2]=0),j[0]=1,j[3]=1,j}(),function(j,Y,te){var de=Y[0],pe=Y[1],Ae=Y[2],Be=Y[3],Ge=Math.sin(te),qe=Math.cos(te);j[0]=de*qe+Ae*Ge,j[1]=pe*qe+Be*Ge,j[2]=de*-Ge+Ae*qe,j[3]=pe*-Ge+Be*qe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const P=n.ad(O,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==P&&(this._unmodified=!1,this._pitch=P,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const P=Math.min(Math.max(O,this.minZoom),this.maxZoom);this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this.tileZoom=Math.max(0,Math.floor(P)),this.scale=this.zoomScale(P),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,P,j){this._unmodified=!1,this._edgeInsets.interpolate(O,P,j),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const P=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,P)}getVisibleUnwrappedCoordinates(O){const P=[new n.b4(0,O)];if(this._renderWorldCopies){const j=this.pointCoordinate(new n.P(0,0)),Y=this.pointCoordinate(new n.P(this.width,0)),te=this.pointCoordinate(new n.P(this.width,this.height)),de=this.pointCoordinate(new n.P(0,this.height)),pe=Math.floor(Math.min(j.x,Y.x,te.x,de.x)),Ae=Math.floor(Math.max(j.x,Y.x,te.x,de.x)),Be=1;for(let Ge=pe-Be;Ge<=Ae+Be;Ge++)Ge!==0&&P.push(new n.b4(Ge,O))}return P}coveringTiles(O){var P,j;let Y=this.coveringZoomLevel(O);const te=Y;if(O.minzoom!==void 0&&Y<O.minzoom)return[];O.maxzoom!==void 0&&Y>O.maxzoom&&(Y=O.maxzoom);const de=this.pointCoordinate(this.getCameraPoint()),pe=n.Z.fromLngLat(this.center),Ae=Math.pow(2,Y),Be=[Ae*de.x,Ae*de.y,0],Ge=[Ae*pe.x,Ae*pe.y,0],qe=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Y);let at=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=Y);const lt=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,ft=zt=>({aabb:new js([zt*Ae,0,0],[(zt+1)*Ae,Ae,0]),zoom:0,x:0,y:0,wrap:zt,fullyVisible:!1}),kt=[],Nt=[],Mt=Y,Gt=O.reparseOverscaled?te:Y;if(this._renderWorldCopies)for(let zt=1;zt<=3;zt++)kt.push(ft(-zt)),kt.push(ft(zt));for(kt.push(ft(0));kt.length>0;){const zt=kt.pop(),Xt=zt.x,Zt=zt.y;let Yt=zt.fullyVisible;if(!Yt){const on=zt.aabb.intersects(qe);if(on===0)continue;Yt=on===2}const ya=O.terrain?Be:Ge,Ca=zt.aabb.distanceX(ya),La=zt.aabb.distanceY(ya),ja=Math.max(Math.abs(Ca),Math.abs(La)),Wa=lt+(1<<Mt-zt.zoom)-2;if(zt.zoom===Mt||ja>Wa&&zt.zoom>=at){const on=Mt-zt.zoom,Tn=Be[0]-.5-(Xt<<on),Qa=Be[1]-.5-(Zt<<on);Nt.push({tileID:new n.S(zt.zoom===Mt?Gt:zt.zoom,zt.wrap,zt.zoom,Xt,Zt),distanceSq:C([Ge[0]-.5-Xt,Ge[1]-.5-Zt]),tileDistanceToCamera:Math.sqrt(Tn*Tn+Qa*Qa)})}else for(let on=0;on<4;on++){const Tn=(Xt<<1)+on%2,Qa=(Zt<<1)+(on>>1),Sn=zt.zoom+1;let kn=zt.aabb.quadrant(on);if(O.terrain){const Ln=new n.S(Sn,zt.wrap,Sn,Tn,Qa),fn=O.terrain.getMinMaxElevation(Ln),Mn=(P=fn.minElevation)!==null&&P!==void 0?P:this.elevation,Wn=(j=fn.maxElevation)!==null&&j!==void 0?j:this.elevation;kn=new js([kn.min[0],kn.min[1],Mn],[kn.max[0],kn.max[1],Wn])}kt.push({aabb:kn,zoom:Sn,x:Tn,y:Qa,wrap:zt.wrap,fullyVisible:Yt})}}return Nt.sort((zt,Xt)=>zt.distanceSq-Xt.distanceSq).map(zt=>zt.tileID)}resize(O,P){this.width=O,this.height=P,this.pixelsToGLUnits=[2/O,-2/P],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const P=n.ad(O.lat,-85.051129,Tc);return new n.P(n.O(O.lng)*this.worldSize,n.Q(P)*this.worldSize)}unproject(O){return new n.Z(O.x/this.worldSize,O.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(O){const P=this.elevation,j=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Y=this.pointLocation(this.centerPoint,O),te=O.getElevationForLngLatZoom(Y,this.tileZoom);if(!(this.elevation-te))return;const de=j+P-te,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/de/n.b5(1,Y.lat)/this.tileSize,Ae=this.scaleZoom(pe);this._elevation=te,this._center=Y,this.zoom=Ae}setLocationAtPoint(O,P){const j=this.pointCoordinate(P),Y=this.pointCoordinate(this.centerPoint),te=this.locationCoordinate(O),de=new n.Z(te.x-(j.x-Y.x),te.y-(j.y-Y.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,P){return P?this.coordinatePoint(this.locationCoordinate(O),P.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,P){return this.coordinateLocation(this.pointCoordinate(O,P))}locationCoordinate(O){return n.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,P){if(P){const ft=P.pointCoordinate(O);if(ft!=null)return ft}const j=[O.x,O.y,0,1],Y=[O.x,O.y,1,1];n.ag(j,j,this.pixelMatrixInverse),n.ag(Y,Y,this.pixelMatrixInverse);const te=j[3],de=Y[3],pe=j[0]/te,Ae=Y[0]/de,Be=j[1]/te,Ge=Y[1]/de,qe=j[2]/te,at=Y[2]/de,lt=qe===at?0:(0-qe)/(at-qe);return new n.Z(n.z.number(pe,Ae,lt)/this.worldSize,n.z.number(Be,Ge,lt)/this.worldSize)}coordinatePoint(O,P=0,j=this.pixelMatrix){const Y=[O.x*this.worldSize,O.y*this.worldSize,P,1];return n.ag(Y,Y,j),new n.P(Y[0]/Y[3],Y[1]/Y[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new xe().extend(this.pointLocation(new n.P(0,O))).extend(this.pointLocation(new n.P(this.width,O))).extend(this.pointLocation(new n.P(this.width,this.height))).extend(this.pointLocation(new n.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new xe([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(O){const P=O.canonical,j=this.worldSize/this.zoomScale(P.z),Y=P.x+Math.pow(2,P.z)*O.wrap,te=n.ao(new Float64Array(16));return n.J(te,te,[Y*j,P.y*j,0]),n.K(te,te,[j/n.X,j/n.X,1]),te}calculatePosMatrix(O,P=!1){const j=O.key,Y=P?this._alignedPosMatrixCache:this._posMatrixCache;if(Y[j])return Y[j];const te=this.calculateTileMatrix(O);return n.L(te,P?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,te),Y[j]=new Float32Array(te),Y[j]}calculateFogMatrix(O){const P=O.key,j=this._fogMatrixCache;if(j[P])return j[P];const Y=this.calculateTileMatrix(O);return n.L(Y,this.fogMatrix,Y),j[P]=new Float32Array(Y),j[P]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,P){P=n.ad(+P,this.minZoom,this.maxZoom);const j={center:new n.N(O.lng,O.lat),zoom:P};let Y=this.lngRange;if(!this._renderWorldCopies&&Y===null){const zt=179.9999999999;Y=[-zt,zt]}const te=this.tileSize*this.zoomScale(j.zoom);let de=0,pe=te,Ae=0,Be=te,Ge=0,qe=0;const{x:at,y:lt}=this.size;if(this.latRange){const zt=this.latRange;de=n.Q(zt[1])*te,pe=n.Q(zt[0])*te,pe-de<lt&&(Ge=lt/(pe-de))}Y&&(Ae=n.b3(n.O(Y[0])*te,0,te),Be=n.b3(n.O(Y[1])*te,0,te),Be<Ae&&(Be+=te),Be-Ae<at&&(qe=at/(Be-Ae)));const{x:ft,y:kt}=this.project.call({worldSize:te},O);let Nt,Mt;const Gt=Math.max(qe||0,Ge||0);if(Gt){const zt=new n.P(qe?(Be+Ae)/2:ft,Ge?(pe+de)/2:kt);return j.center=this.unproject.call({worldSize:te},zt).wrap(),j.zoom+=this.scaleZoom(Gt),j}if(this.latRange){const zt=lt/2;kt-zt<de&&(Mt=de+zt),kt+zt>pe&&(Mt=pe-zt)}if(Y){const zt=(Ae+Be)/2;let Xt=ft;this._renderWorldCopies&&(Xt=n.b3(ft,zt-te/2,zt+te/2));const Zt=at/2;Xt-Zt<Ae&&(Nt=Ae+Zt),Xt+Zt>Be&&(Nt=Be-Zt)}if(Nt!==void 0||Mt!==void 0){const zt=new n.P(Nt??ft,Mt??kt);j.center=this.unproject.call({worldSize:te},zt).wrap()}return j}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:P,zoom:j}=this.getConstrained(this.center,this.zoom);this.center=P,this.zoom=j,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this._fov/2,P=this.centerOffset,j=this.point.x,Y=this.point.y;this.cameraToCenterDistance=.5/Math.tan(O)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let te=n.ao(new Float64Array(16));n.K(te,te,[this.width/2,-this.height/2,1]),n.J(te,te,[1,-1,0]),this.labelPlaneMatrix=te,te=n.ao(new Float64Array(16)),n.K(te,te,[1,-1,1]),n.J(te,te,[-1,-1,0]),n.K(te,te,[2/this.width,2/this.height,1]),this.glCoordMatrix=te;const de=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),Ae=de-pe*this._pixelPerMeter/Math.cos(this._pitch),Be=pe<0?Ae:de,Ge=Math.PI/2+this._pitch,qe=this._fov*(.5+P.y/this.height),at=Math.sin(qe)*Be/Math.sin(n.ad(Math.PI-Ge-qe,.01,Math.PI-.01)),lt=this.getHorizon(),ft=2*Math.atan(lt/this.cameraToCenterDistance)*(.5+P.y/(2*lt)),kt=Math.sin(ft)*Be/Math.sin(n.ad(Math.PI-Ge-ft,.01,Math.PI-.01)),Nt=Math.min(at,kt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Nt+Be),this.nearZ=this.height/50,te=new Float64Array(16),n.b6(te,this._fov,this.width/this.height,this.nearZ,this.farZ),te[8]=2*-P.x/this.width,te[9]=2*P.y/this.height,this.projectionMatrix=n.af(te),n.K(te,te,[1,-1,1]),n.J(te,te,[0,0,-this.cameraToCenterDistance]),n.b7(te,te,this._pitch),n.ae(te,te,this.angle),n.J(te,te,[-j,-Y,0]),this.mercatorMatrix=n.K([],te,[this.worldSize,this.worldSize,this.worldSize]),n.K(te,te,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,te),n.J(te,te,[0,0,-this.elevation]),this.modelViewProjectionMatrix=te,this.invModelViewProjectionMatrix=n.at([],te),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,de,this.farZ),this.fogMatrix[8]=2*-P.x/this.width,this.fogMatrix[9]=2*P.y/this.height,n.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),n.b7(this.fogMatrix,this.fogMatrix,this._pitch),n.ae(this.fogMatrix,this.fogMatrix,this.angle),n.J(this.fogMatrix,this.fogMatrix,[-j,-Y,0]),n.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=n.L(new Float64Array(16),this.labelPlaneMatrix,te);const Mt=this.width%2/2,Gt=this.height%2/2,zt=Math.cos(this.angle),Xt=Math.sin(this.angle),Zt=j-Math.round(j)+zt*Mt+Xt*Gt,Yt=Y-Math.round(Y)+zt*Gt+Xt*Mt,ya=new Float64Array(te);if(n.J(ya,ya,[Zt>.5?Zt-1:Zt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=ya,te=n.at(new Float64Array(16),this.pixelMatrix),!te)throw new Error("failed to invert matrix");this.pixelMatrixInverse=te,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new n.P(0,0)),P=[O.x*this.worldSize,O.y*this.worldSize,0,1];return n.ag(P,P,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=this._pitch,P=Math.tan(O)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,P))}getCameraQueryGeometry(O){const P=this.getCameraPoint();if(O.length===1)return[O[0],P];{let j=P.x,Y=P.y,te=P.x,de=P.y;for(const pe of O)j=Math.min(j,pe.x),Y=Math.min(Y,pe.y),te=Math.max(te,pe.x),de=Math.max(de,pe.y);return[new n.P(j,Y),new n.P(te,Y),new n.P(te,de),new n.P(j,de),new n.P(j,Y)]}}lngLatToCameraDepth(O,P){const j=this.locationCoordinate(O),Y=[j.x*this.worldSize,j.y*this.worldSize,P,1];return n.ag(Y,Y,this.modelViewProjectionMatrix),Y[2]/Y[3]}}function Us(H,O){let P,j=!1,Y=null,te=null;const de=()=>{Y=null,j&&(H.apply(te,P),Y=setTimeout(de,O),j=!1)};return(...pe)=>(j=!0,te=this,P=pe,Y||de(),Y)}class eo{constructor(O){this._getCurrentHash=()=>{const P=window.location.hash.replace("#","");if(this._hashName){let j;return P.split("&").map(Y=>Y.split("=")).forEach(Y=>{Y[0]===this._hashName&&(j=Y)}),(j&&j[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{const P=this._getCurrentHash();if(P.length>=3&&!P.some(j=>isNaN(j))){const j=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:j,pitch:+(P[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const P=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{const P=this._getCurrentHash();if(P.length===0)return;const j=P.join("/");let Y=j;Y.split("&").length>0&&(Y=Y.split("&")[0]),this._hashName&&(Y=`${this._hashName}=${j}`);let te=window.location.hash.replace(Y,"");te.startsWith("#&")?te=te.slice(0,1)+te.slice(2):te==="#"&&(te="");let de=window.location.href.replace(/(#.+)?$/,te);de=de.replace("&&","&"),window.history.replaceState(window.history.state,null,de)},this._updateHash=Us(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(O){const P=this._map.getCenter(),j=Math.round(100*this._map.getZoom())/100,Y=Math.ceil((j*Math.LN2+Math.log(512/360/.5))/Math.LN10),te=Math.pow(10,Y),de=Math.round(P.lng*te)/te,pe=Math.round(P.lat*te)/te,Ae=this._map.getBearing(),Be=this._map.getPitch();let Ge="";if(Ge+=O?`/${de}/${pe}/${j}`:`${j}/${pe}/${de}`,(Ae||Be)&&(Ge+="/"+Math.round(10*Ae)/10),Be&&(Ge+=`/${Math.round(Be)}`),this._hashName){const qe=this._hashName;let at=!1;const lt=window.location.hash.slice(1).split("&").map(ft=>{const kt=ft.split("=")[0];return kt===qe?(at=!0,`${kt}=${Ge}`):ft}).filter(ft=>ft);return at||lt.push(`${qe}=${Ge}`),`#${lt.join("&")}`}return`#${Ge}`}}const Oo={linearity:.3,easing:n.b8(0,0,.3,1)},ai=n.e({deceleration:2500,maxSpeed:1400},Oo),ii=n.e({deceleration:20,maxSpeed:1400},Oo),Ro=n.e({deceleration:1e3,maxSpeed:360},Oo),pc=n.e({deceleration:1e3,maxSpeed:90},Oo);class fc{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,P=l.now();for(;O.length>0&&P-O[0].time>160;)O.shift()}_onMoveEnd(O){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const P={zoom:0,bearing:0,pitch:0,pan:new n.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:te}of this._inertiaBuffer)P.zoom+=te.zoomDelta||0,P.bearing+=te.bearingDelta||0,P.pitch+=te.pitchDelta||0,te.panDelta&&P.pan._add(te.panDelta),te.around&&(P.around=te.around),te.pinchAround&&(P.pinchAround=te.pinchAround);const j=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Y={};if(P.pan.mag()){const te=lc(P.pan.mag(),j,n.e({},ai,O||{}));Y.offset=P.pan.mult(te.amount/P.pan.mag()),Y.center=this._map.transform.center,mc(Y,te)}if(P.zoom){const te=lc(P.zoom,j,ii);Y.zoom=this._map.transform.zoom+te.amount,mc(Y,te)}if(P.bearing){const te=lc(P.bearing,j,Ro);Y.bearing=this._map.transform.bearing+n.ad(te.amount,-179,179),mc(Y,te)}if(P.pitch){const te=lc(P.pitch,j,pc);Y.pitch=this._map.transform.pitch+te.amount,mc(Y,te)}if(Y.zoom||Y.bearing){const te=P.pinchAround===void 0?P.around:P.pinchAround;Y.around=te?this._map.unproject(te):this._map.getCenter()}return this.clear(),n.e(Y,{noMoveStart:!0})}}function mc(H,O){(!H.duration||H.duration<O.duration)&&(H.duration=O.duration,H.easing=O.easing)}function lc(H,O,P){const{maxSpeed:j,linearity:Y,deceleration:te}=P,de=n.ad(H*Y/(O/1e3),-j,j),pe=Math.abs(de)/(te*Y);return{easing:P.easing,duration:1e3*pe,amount:de*(pe/2)}}class gs extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j,Y={}){const te=o.mousePos(P.getCanvas(),j),de=P.unproject(te);super(O,n.e({point:te,lngLat:de,originalEvent:j},Y)),this._defaultPrevented=!1,this.target=P}}class wo extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){const Y=O==="touchend"?j.changedTouches:j.touches,te=o.touchPos(P.getCanvasContainer(),Y),de=te.map(Ae=>P.unproject(Ae)),pe=te.reduce((Ae,Be,Ge,qe)=>Ae.add(Be.div(qe.length)),new n.P(0,0));super(O,{points:te,point:pe,lngLats:de,lngLat:P.unproject(pe),originalEvent:j}),this._defaultPrevented=!1}}class sl extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){super(O,{originalEvent:j}),this._defaultPrevented=!1}}class jl{constructor(O,P){this._map=O,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new sl(O.type,this._map,O))}mousedown(O,P){return this._mousedownPos=P,this._firePreventable(new gs(O.type,this._map,O))}mouseup(O){this._map.fire(new gs(O.type,this._map,O))}click(O,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new gs(O.type,this._map,O))}dblclick(O){return this._firePreventable(new gs(O.type,this._map,O))}mouseover(O){this._map.fire(new gs(O.type,this._map,O))}mouseout(O){this._map.fire(new gs(O.type,this._map,O))}touchstart(O){return this._firePreventable(new wo(O.type,this._map,O))}touchmove(O){this._map.fire(new wo(O.type,this._map,O))}touchend(O){this._map.fire(new wo(O.type,this._map,O))}touchcancel(O){this._map.fire(new wo(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class co{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new gs(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gs("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new gs(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class no{constructor(O){this._map=O}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(O){return this.transform.pointLocation(n.P.convert(O),this._map.terrain)}}class ko{constructor(O,P){this._map=O,this._tr=new no(O),this._el=O.getCanvasContainer(),this._container=O.getContainer(),this._clickTolerance=P.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(O,P){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(O,P){if(!this._active)return;const j=P;if(this._lastPos.equals(j)||!this._box&&j.dist(this._startPos)<this._clickTolerance)return;const Y=this._startPos;this._lastPos=j,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const te=Math.min(Y.x,j.x),de=Math.max(Y.x,j.x),pe=Math.min(Y.y,j.y),Ae=Math.max(Y.y,j.y);o.setTransform(this._box,`translate(${te}px,${pe}px)`),this._box.style.width=de-te+"px",this._box.style.height=Ae-pe+"px"}mouseupWindow(O,P){if(!this._active||O.button!==0)return;const j=this._startPos,Y=P;if(this.reset(),o.suppressClick(),j.x!==Y.x||j.y!==Y.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:O})),{cameraAnimation:te=>te.fitScreenCoordinates(j,Y,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,P){return this._map.fire(new n.k(O,{originalEvent:P}))}}function Ei(H,O){if(H.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${H.length}, points ${O.length}`);const P={};for(let j=0;j<H.length;j++)P[H[j].identifier]=O[j];return P}class Yi{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,P,j){(this.centroid||j.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),j.length===this.numTouches&&(this.centroid=function(Y){const te=new n.P(0,0);for(const de of Y)te._add(de);return te.div(Y.length)}(P),this.touches=Ei(j,P)))}touchmove(O,P,j){if(this.aborted||!this.centroid)return;const Y=Ei(j,P);for(const te in this.touches){const de=this.touches[te],pe=Y[te];(!pe||pe.dist(de)>30)&&(this.aborted=!0)}}touchend(O,P,j){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),j.length===0){const Y=!this.aborted&&this.centroid;if(this.reset(),Y)return Y}}}class ui{constructor(O){this.singleTap=new Yi(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,P,j){this.singleTap.touchstart(O,P,j)}touchmove(O,P,j){this.singleTap.touchmove(O,P,j)}touchend(O,P,j){const Y=this.singleTap.touchend(O,P,j);if(Y){const te=O.timeStamp-this.lastTime<500,de=!this.lastTap||this.lastTap.dist(Y)<30;if(te&&de||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Y,this.count===this.numTaps)return this.reset(),Y}}}class Ji{constructor(O){this._tr=new no(O),this._zoomIn=new ui({numTouches:1,numTaps:2}),this._zoomOut=new ui({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,P,j){this._zoomIn.touchstart(O,P,j),this._zoomOut.touchstart(O,P,j)}touchmove(O,P,j){this._zoomIn.touchmove(O,P,j),this._zoomOut.touchmove(O,P,j)}touchend(O,P,j){const Y=this._zoomIn.touchend(O,P,j),te=this._zoomOut.touchend(O,P,j),de=this._tr;return Y?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:de.zoom+1,around:de.unproject(Y)},{originalEvent:O})}):te?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:de.zoom-1,around:de.unproject(te)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eo{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const P=this._moveFunction(...O);if(P.bearingDelta||P.pitchDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(O,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=P.length?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,P){if(!this.isEnabled())return;const j=this._lastPoint;if(!j)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Y=P.length?P[0]:P;return!this._moved&&Y.dist(j)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Y,this._move(j,Y))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const xl={0:1,2:2};class Vo{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const P=o.mouseButton(O);this._eventButton=P}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!function(P,j){const Y=xl[j];return P.buttons===void 0||(P.buttons&Y)!==Y}(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class wl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){const P=O.targetTouches[0].identifier;this._firstTouch=P}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const uo=H=>{H.mousedown=H.dragStart,H.mousemoveWindow=H.dragMove,H.mouseup=H.dragEnd,H.contextmenu=O=>{O.preventDefault()}},Ul=({enable:H,clickTolerance:O,bearingDegreesPerPixelMoved:P=.8})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({bearingDelta:(te.x-Y.x)*P}),moveStateManager:j,enable:H,assignEvents:uo})},Gs=({enable:H,clickTolerance:O,pitchDegreesPerPixelMoved:P=-.5})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({pitchDelta:(te.y-Y.y)*P}),moveStateManager:j,enable:H,assignEvents:uo})};class rs{constructor(O,P){this._clickTolerance=O.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,P,j){return this._calculateTransform(O,P,j)}touchmove(O,P,j){if(this._active){if(!this._shouldBePrevented(j.length))return O.preventDefault(),this._calculateTransform(O,P,j);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,P,j){this._calculateTransform(O,P,j),this._active&&this._shouldBePrevented(j.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,P,j){j.length>0&&(this._active=!0);const Y=Ei(j,P),te=new n.P(0,0),de=new n.P(0,0);let pe=0;for(const Be in Y){const Ge=Y[Be],qe=this._touches[Be];qe&&(te._add(Ge),de._add(Ge.sub(qe)),pe++,Y[Be]=Ge)}if(this._touches=Y,this._shouldBePrevented(pe)||!de.mag())return;const Ae=de.div(pe);return this._sum._add(Ae),this._sum.mag()<this._clickTolerance?void 0:{around:te.div(pe),panDelta:Ae}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,P,j){this._firstTwoTouches||j.length<2||(this._firstTwoTouches=[j[0].identifier,j[1].identifier],this._start([P[0],P[1]]))}touchmove(O,P,j){if(!this._firstTwoTouches)return;O.preventDefault();const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),pe=yi(j,P,te);if(!de||!pe)return;const Ae=this._aroundCenter?null:de.add(pe).div(2);return this._move([de,pe],Ae,O)}touchend(O,P,j){if(!this._firstTwoTouches)return;const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),pe=yi(j,P,te);de&&pe||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function yi(H,O,P){for(let j=0;j<H.length;j++)if(H[j].identifier===P)return O[j]}function us(H,O){return Math.log(H/O)/Math.LN2}class Qn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,P){const j=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(us(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:us(this._distance,j),pinchAround:P}}}function _c(H,O){return 180*H.angleWith(O)/Math.PI}class qc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,P,j){const Y=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:_c(this._vector,Y),pinchAround:P}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const P=25/(Math.PI*this._minDiameter)*360,j=_c(O,this._startVector);return Math.abs(j)<P}}function ll(H){return Math.abs(H.y)>Math.abs(H.x)}class kl extends go{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,P,j){super.touchstart(O,P,j),this._currentTouchCount=j.length}_start(O){this._lastPoints=O,ll(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,P,j){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Y=O[0].sub(this._lastPoints[0]),te=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Y,te,j.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Y.y+te.y)/2*-.5}):void 0}gestureBeginsVertically(O,P,j){if(this._valid!==void 0)return this._valid;const Y=O.mag()>=2,te=P.mag()>=2;if(!Y&&!te)return;if(!Y||!te)return this._firstMove===void 0&&(this._firstMove=j),j-this._firstMove<100&&void 0;const de=O.y>0==P.y>0;return ll(O)&&ll(P)&&de}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class cc{constructor(O){this._tr=new no(O);const P=Cl;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let P=0,j=0,Y=0,te=0,de=0;switch(O.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:O.shiftKey?j=-1:(O.preventDefault(),te=-1);break;case 39:O.shiftKey?j=1:(O.preventDefault(),te=1);break;case 38:O.shiftKey?Y=1:(O.preventDefault(),de=-1);break;case 40:O.shiftKey?Y=-1:(O.preventDefault(),de=1);break;default:return}return this._rotationDisabled&&(j=0,Y=0),{cameraAnimation:pe=>{const Ae=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:jn,zoom:P?Math.round(Ae.zoom)+P*(O.shiftKey?2:1):Ae.zoom,bearing:Ae.bearing+j*this._bearingStep,pitch:Ae.pitch+Y*this._pitchStep,offset:[-te*this._panStep,-de*this._panStep],center:Ae.center},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function jn(H){return H*(2-H)}const Hs=4.000244140625;class Ws{constructor(O,P){this._onTimeout=j=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(j)},this._map=O,this._tr=new no(O),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let P=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const j=l.now(),Y=j-(this._lastWheelEventTime||0);this._lastWheelEventTime=j,P!==0&&P%Hs==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":Y>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Y*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),O.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=O,this._delta-=P,this._active||this._start(O)),O.preventDefault()}_start(O){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const P=o.mousePos(this._map.getCanvas(),O),j=this._tr;P.y>j.transform.height/2-j.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?j.center:j.unproject(P)):this._around=n.N.convert(j.center),this._aroundPoint=j.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const Ae=this._type==="wheel"&&Math.abs(this._delta)>Hs?this._wheelZoomRate:this._defaultZoomRate;let Be=2/(1+Math.exp(-Math.abs(this._delta*Ae)));this._delta<0&&Be!==0&&(Be=1/Be);const Ge=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(Ge*Be))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const P=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,j=this._startZoom,Y=this._easing;let te,de=!1;const pe=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&j&&Y&&pe){const Ae=Math.min(pe/200,1),Be=Y(Ae);te=n.z.number(j,P,Be),Ae<1?this._frameId||(this._frameId=!0):de=!0}else te=P,de=!0;return this._active=!0,de&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!de,zoomDelta:te-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let P=n.b9;if(this._prevEase){const j=this._prevEase,Y=(l.now()-j.start)/j.duration,te=j.easing(Y+.01)-j.easing(Y),de=.27/Math.sqrt(te*te+1e-4)*.01,pe=Math.sqrt(.0729-de*de);P=n.b8(de,pe,.25,1)}return this._prevEase={start:l.now(),duration:O,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Pi{constructor(O,P){this._clickZoom=O,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class hs{constructor(O){this._tr=new no(O),this.reset()}reset(){this._active=!1}dblclick(O,P){return O.preventDefault(),{cameraAnimation:j=>{j.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(P)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(){this._tap=new ui({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(O,P,j){if(!this._swipePoint)if(this._tapTime){const Y=P[0],te=O.timeStamp-this._tapTime<500,de=this._tapPoint.dist(Y)<30;te&&de?j.length>0&&(this._swipePoint=Y,this._swipeTouch=j[0].identifier):this.reset()}else this._tap.touchstart(O,P,j)}touchmove(O,P,j){if(this._tapTime){if(this._swipePoint){if(j[0].identifier!==this._swipeTouch)return;const Y=P[0],te=Y.y-this._swipePoint.y;return this._swipePoint=Y,O.preventDefault(),this._active=!0,{zoomDelta:te/128}}}else this._tap.touchmove(O,P,j)}touchend(O,P,j){if(this._tapTime)this._swipePoint&&j.length===0&&this.reset();else{const Y=this._tap.touchend(O,P,j);Y&&(this._tapTime=O.timeStamp,this._tapPoint=Y)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class is{constructor(O,P,j){this._el=O,this._mousePan=P,this._touchPan=j}enable(O){this._inertiaOptions=O||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ho{constructor(O,P,j){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=P,this._mousePitch=j}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Os{constructor(O,P,j,Y){this._el=O,this._touchZoom=P,this._touchRotate=j,this._tapDragZoom=Y,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $o{constructor(O,P){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const j=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Y=document.createElement("div");Y.className="maplibregl-desktop-message",Y.textContent=P,this._container.appendChild(Y);const te=document.createElement("div");te.className="maplibregl-mobile-message",te.textContent=j,this._container.appendChild(te),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(O){return O[this._bypassKey]}notifyGestureBlocked(O,P){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:O,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const os=H=>H.zoom||H.drag||H.pitch||H.rotate;class Sl extends n.k{}function zr(H){return H.panDelta&&H.panDelta.mag()||H.zoomDelta||H.bearingDelta||H.pitchDelta}class Kr{constructor(O,P){this.handleWindowEvent=Y=>{this.handleEvent(Y,`${Y.type}Window`)},this.handleEvent=(Y,te)=>{if(Y.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const de=Y.type==="renderFrame"?void 0:Y,pe={needsRenderFrame:!1},Ae={},Be={},Ge=Y.touches,qe=Ge?this._getMapTouches(Ge):void 0,at=qe?o.touchPos(this._map.getCanvas(),qe):o.mousePos(this._map.getCanvas(),Y);for(const{handlerName:kt,handler:Nt,allowed:Mt}of this._handlers){if(!Nt.isEnabled())continue;let Gt;this._blockedByActive(Be,Mt,kt)?Nt.reset():Nt[te||Y.type]&&(Gt=Nt[te||Y.type](Y,at,qe),this.mergeHandlerResult(pe,Ae,Gt,kt,de),Gt&&Gt.needsRenderFrame&&this._triggerRenderFrame()),(Gt||Nt.isActive())&&(Be[kt]=Nt)}const lt={};for(const kt in this._previousActiveHandlers)Be[kt]||(lt[kt]=de);this._previousActiveHandlers=Be,(Object.keys(lt).length||zr(pe))&&(this._changes.push([pe,Ae,lt]),this._triggerRenderFrame()),(Object.keys(Be).length||zr(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ft}=pe;ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ft(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fc(O),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);const j=this._el;this._listeners=[[j,"touchstart",{passive:!0}],[j,"touchmove",{passive:!1}],[j,"touchend",void 0],[j,"touchcancel",void 0],[j,"mousedown",void 0],[j,"mousemove",void 0],[j,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[j,"mouseover",void 0],[j,"mouseout",void 0],[j,"dblclick",void 0],[j,"click",void 0],[j,"keydown",{capture:!1}],[j,"keyup",void 0],[j,"wheel",{passive:!1}],[j,"contextmenu",void 0],[window,"blur",void 0]];for(const[Y,te,de]of this._listeners)o.addEventListener(Y,te,Y===document?this.handleWindowEvent:this.handleEvent,de)}destroy(){for(const[O,P,j]of this._listeners)o.removeEventListener(O,P,O===document?this.handleWindowEvent:this.handleEvent,j)}_addDefaultHandlers(O){const P=this._map,j=P.getCanvasContainer();this._add("mapEvent",new jl(P,O));const Y=P.boxZoom=new ko(P,O);this._add("boxZoom",Y),O.interactive&&O.boxZoom&&Y.enable();const te=P.cooperativeGestures=new $o(P,O.cooperativeGestures);this._add("cooperativeGestures",te),O.cooperativeGestures&&te.enable();const de=new Ji(P),pe=new hs(P);P.doubleClickZoom=new Pi(pe,de),this._add("tapZoom",de),this._add("clickZoom",pe),O.interactive&&O.doubleClickZoom&&P.doubleClickZoom.enable();const Ae=new Ss;this._add("tapDragZoom",Ae);const Be=P.touchPitch=new kl(P);this._add("touchPitch",Be),O.interactive&&O.touchPitch&&P.touchPitch.enable(O.touchPitch);const Ge=Ul(O),qe=Gs(O);P.dragRotate=new ho(O,Ge,qe),this._add("mouseRotate",Ge,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),O.interactive&&O.dragRotate&&P.dragRotate.enable();const at=(({enable:Gt,clickTolerance:zt})=>{const Xt=new Vo({checkCorrectEvent:Zt=>o.mouseButton(Zt)===0&&!Zt.ctrlKey});return new Eo({clickTolerance:zt,move:(Zt,Yt)=>({around:Yt,panDelta:Yt.sub(Zt)}),activateOnStart:!0,moveStateManager:Xt,enable:Gt,assignEvents:uo})})(O),lt=new rs(O,P);P.dragPan=new is(j,at,lt),this._add("mousePan",at),this._add("touchPan",lt,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&P.dragPan.enable(O.dragPan);const ft=new qc,kt=new Qn;P.touchZoomRotate=new Os(j,kt,ft,Ae),this._add("touchRotate",ft,["touchPan","touchZoom"]),this._add("touchZoom",kt,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&P.touchZoomRotate.enable(O.touchZoomRotate);const Nt=P.scrollZoom=new Ws(P,()=>this._triggerRenderFrame());this._add("scrollZoom",Nt,["mousePan"]),O.interactive&&O.scrollZoom&&P.scrollZoom.enable(O.scrollZoom);const Mt=P.keyboard=new cc(P);this._add("keyboard",Mt),O.interactive&&O.keyboard&&P.keyboard.enable(),this._add("blockableMapEvent",new co(P))}_add(O,P,j){this._handlers.push({handlerName:O,handler:P,allowed:j}),this._handlersById[O]=P}stop(O){if(!this._updatingCamera){for(const{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!os(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,P,j){for(const Y in O)if(Y!==j&&(!P||P.indexOf(Y)<0))return!0;return!1}_getMapTouches(O){const P=[];for(const j of O){const Y=j.target;this._el.contains(Y)&&P.push(j)}return P}mergeHandlerResult(O,P,j,Y,te){if(!j)return;n.e(O,j);const de={handlerName:Y,originalEvent:j.originalEvent||te};j.zoomDelta!==void 0&&(P.zoom=de),j.panDelta!==void 0&&(P.drag=de),j.pitchDelta!==void 0&&(P.pitch=de),j.bearingDelta!==void 0&&(P.rotate=de)}_applyChanges(){const O={},P={},j={};for(const[Y,te,de]of this._changes)Y.panDelta&&(O.panDelta=(O.panDelta||new n.P(0,0))._add(Y.panDelta)),Y.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Y.zoomDelta),Y.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Y.bearingDelta),Y.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Y.pitchDelta),Y.around!==void 0&&(O.around=Y.around),Y.pinchAround!==void 0&&(O.pinchAround=Y.pinchAround),Y.noInertia&&(O.noInertia=Y.noInertia),n.e(P,te),n.e(j,de);this._updateMapTransform(O,P,j),this._changes=[]}_updateMapTransform(O,P,j){const Y=this._map,te=Y._getTransformForUpdate(),de=Y.terrain;if(!(zr(O)||de&&this._terrainMovement))return this._fireEvents(P,j,!0);let{panDelta:pe,zoomDelta:Ae,bearingDelta:Be,pitchDelta:Ge,around:qe,pinchAround:at}=O;at!==void 0&&(qe=at),Y._stop(!0),qe=qe||Y.transform.centerPoint;const lt=te.pointLocation(pe?qe.sub(pe):qe);Be&&(te.bearing+=Be),Ge&&(te.pitch+=Ge),Ae&&(te.zoom+=Ae),de?this._terrainMovement||!P.drag&&!P.zoom?P.drag&&this._terrainMovement?te.center=te.pointLocation(te.centerPoint.sub(pe)):te.setLocationAtPoint(lt,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,te.setLocationAtPoint(lt,qe)):te.setLocationAtPoint(lt,qe),Y._applyUpdatedTransform(te),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(P,j,!0)}_fireEvents(O,P,j){const Y=os(this._eventsInProgress),te=os(O),de={};for(const qe in O){const{originalEvent:at}=O[qe];this._eventsInProgress[qe]||(de[`${qe}start`]=at),this._eventsInProgress[qe]=O[qe]}!Y&&te&&this._fireEvent("movestart",te.originalEvent);for(const qe in de)this._fireEvent(qe,de[qe]);te&&this._fireEvent("move",te.originalEvent);for(const qe in O){const{originalEvent:at}=O[qe];this._fireEvent(qe,at)}const pe={};let Ae;for(const qe in this._eventsInProgress){const{handlerName:at,originalEvent:lt}=this._eventsInProgress[qe];this._handlersById[at].isActive()||(delete this._eventsInProgress[qe],Ae=P[at]||lt,pe[`${qe}end`]=Ae)}for(const qe in pe)this._fireEvent(qe,pe[qe]);const Be=os(this._eventsInProgress),Ge=(Y||te)&&!Be;if(Ge&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(j&&Ge){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=lt=>lt!==0&&-this._bearingSnap<lt&<<this._bearingSnap;!qe||!qe.essential&&l.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:Ae})),at(this._map.getBearing())&&this._map.resetNorth()):(at(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:Ae})),this._updatingCamera=!1}}_fireEvent(O,P){this._map.fire(new n.k(O,P?{originalEvent:P}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new Sl("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xi extends n.E{constructor(O,P){super(),this._renderFrameCallback=()=>{const j=Math.min((l.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(j)),j<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=P.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,P){return this.jumpTo({center:O},P)}panBy(O,P,j){return O=n.P.convert(O).mult(-1),this.panTo(this.transform.center,n.e({offset:O},P),j)}panTo(O,P,j){return this.easeTo(n.e({center:O},P),j)}getZoom(){return this.transform.zoom}setZoom(O,P){return this.jumpTo({zoom:O},P),this}zoomTo(O,P,j){return this.easeTo(n.e({zoom:O},P),j)}zoomIn(O,P){return this.zoomTo(this.getZoom()+1,O,P),this}zoomOut(O,P){return this.zoomTo(this.getZoom()-1,O,P),this}getBearing(){return this.transform.bearing}setBearing(O,P){return this.jumpTo({bearing:O},P),this}getPadding(){return this.transform.padding}setPadding(O,P){return this.jumpTo({padding:O},P),this}rotateTo(O,P,j){return this.easeTo(n.e({bearing:O},P),j)}resetNorth(O,P){return this.rotateTo(0,n.e({duration:1e3},O),P),this}resetNorthPitch(O,P){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},O),P),this}snapToNorth(O,P){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,P):this}getPitch(){return this.transform.pitch}setPitch(O,P){return this.jumpTo({pitch:O},P),this}cameraForBounds(O,P){O=xe.convert(O);const j=P&&P.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),j,P)}_cameraForBoxAndBearing(O,P,j,Y){const te={top:0,bottom:0,right:0,left:0};if(typeof(Y=n.e({padding:te,offset:[0,0],maxZoom:this.transform.maxZoom},Y)).padding=="number"){const Tn=Y.padding;Y.padding={top:Tn,bottom:Tn,right:Tn,left:Tn}}Y.padding=n.e(te,Y.padding);const de=this.transform,pe=de.padding,Ae=new xe(O,P),Be=de.project(Ae.getNorthWest()),Ge=de.project(Ae.getNorthEast()),qe=de.project(Ae.getSouthEast()),at=de.project(Ae.getSouthWest()),lt=n.ba(-j),ft=Be.rotate(lt),kt=Ge.rotate(lt),Nt=qe.rotate(lt),Mt=at.rotate(lt),Gt=new n.P(Math.max(ft.x,kt.x,Mt.x,Nt.x),Math.max(ft.y,kt.y,Mt.y,Nt.y)),zt=new n.P(Math.min(ft.x,kt.x,Mt.x,Nt.x),Math.min(ft.y,kt.y,Mt.y,Nt.y)),Xt=Gt.sub(zt),Zt=(de.width-(pe.left+pe.right+Y.padding.left+Y.padding.right))/Xt.x,Yt=(de.height-(pe.top+pe.bottom+Y.padding.top+Y.padding.bottom))/Xt.y;if(Yt<0||Zt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ya=Math.min(de.scaleZoom(de.scale*Math.min(Zt,Yt)),Y.maxZoom),Ca=n.P.convert(Y.offset),La=(Y.padding.left-Y.padding.right)/2,ja=(Y.padding.top-Y.padding.bottom)/2,Wa=new n.P(La,ja).rotate(n.ba(j)),on=Ca.add(Wa).mult(de.scale/de.zoomScale(ya));return{center:de.unproject(Be.add(qe).div(2).sub(on)),zoom:ya,bearing:j}}fitBounds(O,P,j){return this._fitInternal(this.cameraForBounds(O,P),P,j)}fitScreenCoordinates(O,P,j,Y,te){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(O)),this.transform.pointLocation(n.P.convert(P)),j,Y),Y,te)}_fitInternal(O,P,j){return O?(delete(P=n.e(O,P)).padding,P.linear?this.easeTo(P,j):this.flyTo(P,j)):this}jumpTo(O,P){this.stop();const j=this._getTransformForUpdate();let Y=!1,te=!1,de=!1;return"zoom"in O&&j.zoom!==+O.zoom&&(Y=!0,j.zoom=+O.zoom),O.center!==void 0&&(j.center=n.N.convert(O.center)),"bearing"in O&&j.bearing!==+O.bearing&&(te=!0,j.bearing=+O.bearing),"pitch"in O&&j.pitch!==+O.pitch&&(de=!0,j.pitch=+O.pitch),O.padding==null||j.isPaddingEqual(O.padding)||(j.padding=O.padding),this._applyUpdatedTransform(j),this.fire(new n.k("movestart",P)).fire(new n.k("move",P)),Y&&this.fire(new n.k("zoomstart",P)).fire(new n.k("zoom",P)).fire(new n.k("zoomend",P)),te&&this.fire(new n.k("rotatestart",P)).fire(new n.k("rotate",P)).fire(new n.k("rotateend",P)),de&&this.fire(new n.k("pitchstart",P)).fire(new n.k("pitch",P)).fire(new n.k("pitchend",P)),this.fire(new n.k("moveend",P))}calculateCameraOptionsFromTo(O,P,j,Y=0){const te=n.Z.fromLngLat(O,P),de=n.Z.fromLngLat(j,Y),pe=de.x-te.x,Ae=de.y-te.y,Be=de.z-te.z,Ge=Math.hypot(pe,Ae,Be);if(Ge===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(pe,Ae),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ge/this.transform.tileSize),lt=180*Math.atan2(pe,-Ae)/Math.PI;let ft=180*Math.acos(qe/Ge)/Math.PI;return ft=Be<0?90-ft:90+ft,{center:de.toLngLat(),zoom:at,pitch:ft,bearing:lt}}easeTo(O,P){var j;this._stop(!1,O.easeId),((O=n.e({offset:[0,0],duration:500,easing:n.b9},O)).animate===!1||!O.essential&&l.prefersReducedMotion)&&(O.duration=0);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,pe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:pe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.project(ft),Gt=Y.project(kt).sub(Mt),zt=Y.zoomScale(Nt-te);let Xt,Zt;O.around&&(Xt=n.N.convert(O.around),Zt=Y.locationPoint(Xt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nt!==te,this._rotating=this._rotating||de!==Be,this._pitching=this._pitching||Ge!==pe,this._padding=!Y.isPaddingEqual(qe),this._easeId=O.easeId,this._prepareEase(P,O.noMoveStart,Yt),this.terrain&&this._prepareElevation(kt),this._ease(ya=>{if(this._zooming&&(Y.zoom=n.z.number(te,Nt,ya)),this._rotating&&(Y.bearing=n.z.number(de,Be,ya)),this._pitching&&(Y.pitch=n.z.number(pe,Ge,ya)),this._padding&&(Y.interpolatePadding(Ae,qe,ya),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(ya),Xt)Y.setLocationAtPoint(Xt,Zt);else{const Ca=Y.zoomScale(Y.zoom-te),La=Nt>te?Math.min(2,zt):Math.max(.5,zt),ja=Math.pow(La,1-ya),Wa=Y.unproject(Mt.add(Gt.mult(ya*ja)).mult(Ca));Y.setLocationAtPoint(Y.renderWorldCopies?Wa.wrap():Wa,lt)}this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},ya=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P,ya)},O),this}_prepareEase(O,P,j={}){this._moving=!0,P||j.moving||this.fire(new n.k("movestart",O)),this._zooming&&!j.zooming&&this.fire(new n.k("zoomstart",O)),this._rotating&&!j.rotating&&this.fire(new n.k("rotatestart",O)),this._pitching&&!j.pitching&&this.fire(new n.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&P!==this._elevationTarget){const j=this._elevationTarget-this._elevationStart,Y=(P-(j*O+this._elevationStart))/(1-O);this._elevationStart+=O*(j-Y),this._elevationTarget=P}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,O)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(O){const P=O.getCameraPosition(),j=this.terrain.getElevationForLngLatZoom(P.lngLat,O.zoom);if(P.altitude<j){const Y=this.calculateCameraOptionsFromTo(P.lngLat,j,O.center,O.elevation);return{pitch:Y.pitch,zoom:Y.zoom}}return{}}_applyUpdatedTransform(O){const P=[];if(this.terrain&&P.push(Y=>this._elevateCameraIfInsideTerrain(Y)),this.transformCameraUpdate&&P.push(Y=>this.transformCameraUpdate(Y)),!P.length)return;const j=O.clone();for(const Y of P){const te=j.clone(),{center:de,zoom:pe,pitch:Ae,bearing:Be,elevation:Ge}=Y(te);de&&(te.center=de),pe!==void 0&&(te.zoom=pe),Ae!==void 0&&(te.pitch=Ae),Be!==void 0&&(te.bearing=Be),Ge!==void 0&&(te.elevation=Ge),j.apply(te)}this.transform.apply(j)}_fireMoveEvents(O){this.fire(new n.k("move",O)),this._zooming&&this.fire(new n.k("zoom",O)),this._rotating&&this.fire(new n.k("rotate",O)),this._pitching&&this.fire(new n.k("pitch",O))}_afterEase(O,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;const j=this._zooming,Y=this._rotating,te=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,j&&this.fire(new n.k("zoomend",O)),Y&&this.fire(new n.k("rotateend",O)),te&&this.fire(new n.k("pitchend",O)),this.fire(new n.k("moveend",O))}flyTo(O,P){var j;if(!O.essential&&l.prefersReducedMotion){const kn=n.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,P)}this.stop(),O=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},O);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,pe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:pe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.zoomScale(Nt-te),Gt=Y.project(ft),zt=Y.project(kt).sub(Gt);let Xt=O.curve;const Zt=Math.max(Y.width,Y.height),Yt=Zt/Mt,ya=zt.mag();if("minZoom"in O){const kn=n.ad(Math.min(O.minZoom,te,Nt),Y.minZoom,Y.maxZoom),Ln=Zt/Y.zoomScale(kn-te);Xt=Math.sqrt(Ln/ya*2)}const Ca=Xt*Xt;function La(kn){const Ln=(Yt*Yt-Zt*Zt+(kn?-1:1)*Ca*Ca*ya*ya)/(2*(kn?Yt:Zt)*Ca*ya);return Math.log(Math.sqrt(Ln*Ln+1)-Ln)}function ja(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function Wa(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const on=La(!1);let Tn=function(kn){return Wa(on)/Wa(on+Xt*kn)},Qa=function(kn){return Zt*((Wa(on)*(ja(Ln=on+Xt*kn)/Wa(Ln))-ja(on))/Ca)/ya;var Ln},Sn=(La(!0)-on)/Xt;if(Math.abs(ya)<1e-6||!isFinite(Sn)){if(Math.abs(Zt-Yt)<1e-6)return this.easeTo(O,P);const kn=Yt<Zt?-1:1;Sn=Math.abs(Math.log(Yt/Zt))/Xt,Qa=()=>0,Tn=Ln=>Math.exp(kn*Xt*Ln)}if("duration"in O)O.duration=+O.duration;else{const kn="screenSpeed"in O?+O.screenSpeed/Xt:+O.speed;O.duration=1e3*Sn/kn}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=de!==Be,this._pitching=Ge!==pe,this._padding=!Y.isPaddingEqual(qe),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(kt),this._ease(kn=>{const Ln=kn*Sn,fn=1/Tn(Ln);Y.zoom=kn===1?Nt:te+Y.scaleZoom(fn),this._rotating&&(Y.bearing=n.z.number(de,Be,kn)),this._pitching&&(Y.pitch=n.z.number(pe,Ge,kn)),this._padding&&(Y.interpolatePadding(Ae,qe,kn),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(kn);const Mn=kn===1?kt:Y.unproject(Gt.add(zt.mult(Qa(Ln))).mult(fn));Y.setLocationAtPoint(Y.renderWorldCopies?Mn.wrap():Mn,lt),this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,P){var j;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Y=this._onEaseEnd;delete this._onEaseEnd,Y.call(this,P)}return O||(j=this.handlers)===null||j===void 0||j.stop(!1),this}_ease(O,P,j){j.animate===!1||j.duration===0?(O(1),P()):(this._easeStart=l.now(),this._easeOptions=j,this._onEaseFrame=O,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,P){O=n.b3(O,-180,180);const j=Math.abs(O-P);return Math.abs(O-360-P)<j&&(O-=360),Math.abs(O+360-P)<j&&(O+=360),O}_normalizeCenter(O,P){if(!P.renderWorldCopies||P.lngRange)return;const j=O.lng-P.center.lng;O.lng+=j>180?-360:j<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const yo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ss{constructor(O=yo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(O,P){const j=this._map._getUIString(`AttributionControl.${P}`);O.title=j,O.setAttribute("aria-label",j)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Y=>typeof Y!="string"?"":Y)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Y=this._map.style.stylesheet;this.styleOwner=Y.owner,this.styleId=Y.id}const P=this._map.style.sourceCaches;for(const Y in P){const te=P[Y];if(te.used||te.usedForTerrain){const de=te.getSource();de.attribution&&O.indexOf(de.attribution)<0&&O.push(de.attribution)}}O=O.filter(Y=>String(Y).trim()),O.sort((Y,te)=>Y.length-te.length),O=O.filter((Y,te)=>{for(let de=te+1;de<O.length;de++)if(O[de].indexOf(Y)>=0)return!1;return!0});const j=O.join(" | ");j!==this._attribHTML&&(this._attribHTML=j,O.length?(this._innerContainer.innerHTML=j,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ro{constructor(O={}){this._updateCompact=()=>{const P=this._container.children;if(P.length){const j=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&j.classList.add("maplibregl-compact"):j.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const P=o.create("a","maplibregl-ctrl-logo");return P.target="_blank",P.rel="noopener nofollow",P.href="https://maplibre.org/",P.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),P.setAttribute("rel","noopener nofollow"),this._container.appendChild(P),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class gc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const P=++this._id;return this._queue.push({callback:O,id:P,cancelled:!1}),P}remove(O){const P=this._currentlyRunning,j=P?this._queue.concat(P):this._queue;for(const Y of j)if(Y.id===O)return void(Y.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const P=this._currentlyRunning=this._queue;this._queue=[];for(const j of P)if(!j.cancelled&&(j.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Or=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class vo extends n.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,P){this.sourceCache.update(O,P),this._renderableTilesKeys=[];const j={};for(const Y of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P}))j[Y.key]=!0,this._renderableTilesKeys.push(Y.key),this._tiles[Y.key]||(Y.posMatrix=new Float64Array(16),n.aQ(Y.posMatrix,0,n.X,0,n.X,0,1),this._tiles[Y.key]=new Ce(Y,this.tileSize));for(const Y in this._tiles)j[Y]||delete this._tiles[Y]}freeRtt(O){for(const P in this._tiles){const j=this._tiles[P];(!O||j.tileID.equals(O)||j.tileID.isChildOf(O)||O.isChildOf(j.tileID))&&(j.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const P={};for(const j of this._renderableTilesKeys){const Y=this._tiles[j].tileID;if(Y.canonical.equals(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16),n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),P[j]=te}else if(Y.canonical.isChildOf(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=Y.canonical.z-O.canonical.z,pe=Y.canonical.x-(Y.canonical.x>>de<<de),Ae=Y.canonical.y-(Y.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,Be,0,Be,0,1),n.J(te.posMatrix,te.posMatrix,[-pe*Be,-Ae*Be,0]),P[j]=te}else if(O.canonical.isChildOf(Y.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=O.canonical.z-Y.canonical.z,pe=O.canonical.x-(O.canonical.x>>de<<de),Ae=O.canonical.y-(O.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),n.J(te.posMatrix,te.posMatrix,[pe*Be,Ae*Be,0]),n.K(te.posMatrix,te.posMatrix,[1/2**de,1/2**de,0]),P[j]=te}}return P}getSourceTile(O,P){const j=this.sourceCache._source;let Y=O.overscaledZ-this.deltaZoom;if(Y>j.maxzoom&&(Y=j.maxzoom),Y<j.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Y).key);let te=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!te||!te.dem)&&P)for(;Y>=j.minzoom&&(!te||!te.dem);)te=this.sourceCache.getTileByID(O.scaledTo(Y--).key);return te}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(P=>P.timeAdded>=O)}}class Jr{constructor(O,P,j){this.painter=O,this.sourceCache=new vo(P),this.options=j,this.exaggeration=typeof j.exaggeration=="number"?j.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,P,j,Y=n.X){var te;if(!(P>=0&&P<Y&&j>=0&&j<Y))return 0;const de=this.getTerrainData(O),pe=(te=de.tile)===null||te===void 0?void 0:te.dem;if(!pe)return 0;const Ae=function(ft,kt,Nt){var Mt=kt[0],Gt=kt[1];return ft[0]=Nt[0]*Mt+Nt[4]*Gt+Nt[12],ft[1]=Nt[1]*Mt+Nt[5]*Gt+Nt[13],ft}([],[P/Y*n.X,j/Y*n.X],de.u_terrain_matrix),Be=[Ae[0]*pe.dim,Ae[1]*pe.dim],Ge=Math.floor(Be[0]),qe=Math.floor(Be[1]),at=Be[0]-Ge,lt=Be[1]-qe;return pe.get(Ge,qe)*(1-at)*(1-lt)+pe.get(Ge+1,qe)*at*(1-lt)+pe.get(Ge,qe+1)*(1-at)*lt+pe.get(Ge+1,qe+1)*at*lt}getElevationForLngLatZoom(O,P){const{tileID:j,mercatorX:Y,mercatorY:te}=this._getOverscaledTileIDFromLngLatZoom(O,P);return this.getElevation(j,Y%n.X,te%n.X,n.X)}getElevation(O,P,j,Y=n.X){return this.getDEMElevation(O,P,j,Y)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Y=this.painter.context,te=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(Y,te,Y.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(Y,new n.R({width:1,height:1}),Y.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const P=this.sourceCache.getSourceTile(O,!0);if(P&&P.dem&&(!P.demTexture||P.needsTerrainPrepare)){const Y=this.painter.context;P.demTexture=this.painter.getTileTexture(P.dem.stride),P.demTexture?P.demTexture.update(P.dem.getPixels(),{premultiply:!1}):P.demTexture=new I(Y,P.dem.getPixels(),Y.gl.RGBA,{premultiply:!1}),P.demTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),P.needsTerrainPrepare=!1}const j=P&&P+P.tileID.key+O.key;if(j&&!this._demMatrixCache[j]){const Y=this.sourceCache.sourceCache._source.maxzoom;let te=O.canonical.z-P.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Y?te=O.canonical.z-Y:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const de=O.canonical.x-(O.canonical.x>>te<<te),pe=O.canonical.y-(O.canonical.y>>te<<te),Ae=n.bb(new Float64Array(16),[1/(n.X<<te),1/(n.X<<te),0]);n.J(Ae,Ae,[de*n.X,pe*n.X,0]),this._demMatrixCache[O.key]={matrix:Ae,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:P&&P.dem&&P.dem.dim||1,u_terrain_matrix:j?this._demMatrixCache[O.key].matrix:this._emptyDemMatrix,u_terrain_unpack:P&&P.dem&&P.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(P&&P.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:P}}getFramebuffer(O){const P=this.painter,j=P.width/devicePixelRatio,Y=P.height/devicePixelRatio;return!this._fbo||this._fbo.width===j&&this._fbo.height===Y||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(P.context,{width:j,height:Y,data:null},P.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(P.context.gl.NEAREST,P.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new I(P.context,{width:j,height:Y,data:null},P.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(P.context.gl.NEAREST,P.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=P.context.createFramebuffer(j,Y,!0,!1),this._fbo.depthAttachment.set(P.context.createRenderbuffer(P.context.gl.DEPTH_COMPONENT16,j,Y))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const P=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let te=0,de=0;te<this._coordsTextureSize;te++)for(let pe=0;pe<this._coordsTextureSize;pe++,de+=4)P[de+0]=255&pe,P[de+1]=255&te,P[de+2]=pe>>8<<4|te>>8,P[de+3]=0;const j=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),Y=new I(O,j,O.gl.RGBA,{premultiply:!1});return Y.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Y,Y}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const P=new Uint8Array(4),j=this.painter.context,Y=j.gl,te=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),de=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);j.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Y.readPixels(te,pe-de-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null);const Ae=P[0]+(P[2]>>4<<8),Be=P[1]+((15&P[2])<<8),Ge=this.coordsIndex[255-P[3]],qe=Ge&&this.sourceCache.getTileByID(Ge);if(!qe)return null;const at=this._coordsTextureSize,lt=(1<<qe.tileID.canonical.z)*at;return new n.Z((qe.tileID.canonical.x*at+Ae)/lt+qe.tileID.wrap,(qe.tileID.canonical.y*at+Be)/lt,this.getElevation(qe.tileID,Ae,Be,at))}depthAtPoint(O){const P=new Uint8Array(4),j=this.painter.context,Y=j.gl;return j.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Y.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null),(P[0]/16777216+P[1]/65536+P[2]/256+P[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,P=new n.bc,j=new n.aY,Y=this.meshSize,te=n.X/Y,de=Y*Y;for(let qe=0;qe<=Y;qe++)for(let at=0;at<=Y;at++)P.emplaceBack(at*te,qe*te,0);for(let qe=0;qe<de;qe+=Y+1)for(let at=0;at<Y;at++)j.emplaceBack(at+qe,Y+at+qe+1,Y+at+qe+2),j.emplaceBack(at+qe,Y+at+qe+2,at+qe+1);const pe=P.length,Ae=pe+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(at*te,qe*n.X,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Ae+qe,Ae+qe+1,Ae+qe+3),j.emplaceBack(Ae+qe,Ae+qe+3,Ae+qe+2),j.emplaceBack(pe+qe,pe+qe+3,pe+qe+1),j.emplaceBack(pe+qe,pe+qe+2,pe+qe+3);const Be=P.length,Ge=Be+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(qe*n.X,at*te,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Be+qe,Be+qe+1,Be+qe+3),j.emplaceBack(Be+qe,Be+qe+3,Be+qe+2),j.emplaceBack(Ge+qe,Ge+qe+3,Ge+qe+1),j.emplaceBack(Ge+qe,Ge+qe+2,Ge+qe+3);return this._mesh=new Kl(O.createVertexBuffer(P,Or.members),O.createIndexBuffer(j),n.a0.simpleSegment(0,0,P.length,j.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*n.bd/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,P){var j;const{tileID:Y}=this._getOverscaledTileIDFromLngLatZoom(O,P);return(j=this.getMinMaxElevation(Y).minElevation)!==null&&j!==void 0?j:0}getMinMaxElevation(O){const P=this.getTerrainData(O).tile,j={minElevation:null,maxElevation:null};return P&&P.dem&&(j.minElevation=P.dem.min*this.exaggeration,j.maxElevation=P.dem.max*this.exaggeration),j}_getOverscaledTileIDFromLngLatZoom(O,P){const j=n.Z.fromLngLat(O.wrap()),Y=(1<<P)*n.X,te=j.x*Y,de=j.y*Y,pe=Math.floor(te/n.X),Ae=Math.floor(de/n.X);return{tileID:new n.S(P,0,P,pe,Ae),mercatorX:te,mercatorY:de}}}class qs{constructor(O,P,j){this._context=O,this._size=P,this._tileSize=j,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const P=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),j=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return j.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),P.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),P.colorAttachment.set(j.texture),{id:O,fbo:P,texture:j,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(P=>O.id!==P),this._recentlyUsed.push(O.id)}stampObject(O){O.stamp=++this._stamp}getOrCreateFreeObject(){for(const P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Fs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(O,P){this.painter=O,this.terrain=P,this.pool=new qs(O.context,30,P.sourceCache.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,P){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(j=>!O._layers[j].isHidden(P)),this._coordsDescendingInv={};for(const j in O.sourceCaches){this._coordsDescendingInv[j]={};const Y=O.sourceCaches[j].getVisibleCoordinates();for(const te of Y){const de=this.terrain.sourceCache.getTerrainCoords(te);for(const pe in de)this._coordsDescendingInv[j][pe]||(this._coordsDescendingInv[j][pe]=[]),this._coordsDescendingInv[j][pe].push(de[pe])}}this._coordsDescendingInvStr={};for(const j of O._order){const Y=O._layers[j],te=Y.source;if(Fs[Y.type]&&!this._coordsDescendingInvStr[te]){this._coordsDescendingInvStr[te]={};for(const de in this._coordsDescendingInv[te])this._coordsDescendingInvStr[te][de]=this._coordsDescendingInv[te][de].map(pe=>pe.key).sort().join()}}for(const j of this._renderableTiles)for(const Y in this._coordsDescendingInvStr){const te=this._coordsDescendingInvStr[Y][j.tileID.key];te&&te!==j.rttCoords[Y]&&(j.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const P=O.type,j=this.painter,Y=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Fs[P]&&(this._prevType&&Fs[this._prevType]||this._stacks.push([]),this._prevType=P,this._stacks[this._stacks.length-1].push(O.id),!Y))return!0;if(Fs[this._prevType]||Fs[P]&&Y){this._prevType=P;const te=this._stacks.length-1,de=this._stacks[te]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[te]){const Be=this.pool.getObjectForId(pe.rtt[te].id);if(Be.stamp===pe.rtt[te].stamp){this.pool.useObject(Be);continue}}const Ae=this.pool.getOrCreateFreeObject();this.pool.useObject(Ae),this.pool.stampObject(Ae),pe.rtt[te]={id:Ae.id,stamp:Ae.stamp},j.context.bindFramebuffer.set(Ae.fbo.framebuffer),j.context.clear({color:n.aN.transparent,stencil:0}),j.currentStencilSource=void 0;for(let Be=0;Be<de.length;Be++){const Ge=j.style._layers[de[Be]],qe=Ge.source?this._coordsDescendingInv[Ge.source][pe.tileID.key]:[pe.tileID];j.context.viewport.set([0,0,Ae.fbo.width,Ae.fbo.height]),j._renderTileClippingMasks(Ge,qe),j.renderLayer(j,j.style.sourceCaches[Ge.source],Ge,qe),Ge.source&&(pe.rttCoords[Ge.source]=this._coordsDescendingInvStr[Ge.source][pe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Fs[P]}return!1}}const bc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},yc=y,Ts={hash:!1,interactive:!0,bearingSnap:7,attributionControl:yo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:n.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},wi=H=>{H.touchstart=H.dragStart,H.touchmoveWindow=H.dragMove,H.touchend=H.dragEnd},Ys={showCompass:!0,showZoom:!0,visualizePitch:!1};class Yn{constructor(O,P,j=!1){this.mousedown=de=>{this.startMouse(n.e({},de,{ctrlKey:!0,preventDefault:()=>de.preventDefault()}),o.mousePos(this.element,de)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=de=>{this.moveMouse(de,o.mousePos(this.element,de))},this.mouseup=de=>{this.mouseRotate.dragEnd(de),this.mousePitch&&this.mousePitch.dragEnd(de),this.offTemp()},this.touchstart=de=>{de.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.startTouch(de,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=de=>{de.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.moveTouch(de,this._lastPos))},this.touchend=de=>{de.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Y=O.dragRotate._mouseRotate.getClickTolerance(),te=O.dragRotate._mousePitch.getClickTolerance();this.element=P,this.mouseRotate=Ul({clickTolerance:Y,enable:!0}),this.touchRotate=(({enable:de,clickTolerance:pe,bearingDegreesPerPixelMoved:Ae=.8})=>{const Be=new wl;return new Eo({clickTolerance:pe,move:(Ge,qe)=>({bearingDelta:(qe.x-Ge.x)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:Y,enable:!0}),this.map=O,j&&(this.mousePitch=Gs({clickTolerance:te,enable:!0}),this.touchPitch=(({enable:de,clickTolerance:pe,pitchDegreesPerPixelMoved:Ae=-.5})=>{const Be=new wl;return new Eo({clickTolerance:pe,move:(Ge,qe)=>({pitchDelta:(qe.y-Ge.y)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:te,enable:!0})),o.addEventListener(P,"mousedown",this.mousedown),o.addEventListener(P,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(P,"touchcancel",this.reset)}startMouse(O,P){this.mouseRotate.dragStart(O,P),this.mousePitch&&this.mousePitch.dragStart(O,P),o.disableDrag()}startTouch(O,P){this.touchRotate.dragStart(O,P),this.touchPitch&&this.touchPitch.dragStart(O,P),o.disableDrag()}moveMouse(O,P){const j=this.map,{bearingDelta:Y}=this.mouseRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.mousePitch){const{pitchDelta:te}=this.mousePitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}moveTouch(O,P){const j=this.map,{bearingDelta:Y}=this.touchRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.touchPitch){const{pitchDelta:te}=this.touchPitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let ir;function Ao(H,O,P){const j=new n.N(H.lng,H.lat);if(H=new n.N(H.lng,H.lat),O){const Y=new n.N(H.lng-360,H.lat),te=new n.N(H.lng+360,H.lat),de=P.locationPoint(H).distSqr(O);P.locationPoint(Y).distSqr(O)<de?H=Y:P.locationPoint(te).distSqr(O)<de&&(H=te)}for(;Math.abs(H.lng-P.center.lng)>180;){const Y=P.locationPoint(H);if(Y.x>=0&&Y.y>=0&&Y.x<=P.width&&Y.y<=P.height)break;H.lng>P.center.lng?H.lng-=360:H.lng+=360}return H.lng!==j.lng&&P.locationPoint(H).y>P.height/2-P.getHorizon()?H:j}const vs={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Xs(H,O,P){const j=H.classList;for(const Y in vs)j.remove(`maplibregl-${P}-anchor-${Y}`);j.add(`maplibregl-${P}-anchor-${O}`)}class zi extends n.E{constructor(O){if(super(),this._onKeyPress=P=>{const j=P.code,Y=P.charCode||P.keyCode;j!=="Space"&&j!=="Enter"&&Y!==32&&Y!==13||this.togglePopup()},this._onMapClick=P=>{const j=P.originalEvent.target,Y=this._element;this._popup&&(j===Y||Y.contains(j))&&this.togglePopup()},this._update=P=>{var j;if(!this._map)return;const Y=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!Y)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let te="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?te=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(te=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${vs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${de} ${te}`),l.frameAsync(new AbortController).then(()=>{this._updateOpacity(P&&P.type==="moveend")}).catch(()=>{})},this._onMove=P=>{if(!this._isDragging){const j=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=j}this._isDragging&&(this._pos=P.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new n.k("dragstart"))),this.fire(new n.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new n.k("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O==null?void 0:O.opacity,O==null?void 0:O.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=n.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const P=o.createNS("http://www.w3.org/2000/svg","svg"),j=41,Y=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${j}px`),P.setAttributeNS(null,"width",`${Y}px`),P.setAttributeNS(null,"viewBox",`0 0 ${Y} ${j}`);const te=o.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"stroke","none"),te.setAttributeNS(null,"stroke-width","1"),te.setAttributeNS(null,"fill","none"),te.setAttributeNS(null,"fill-rule","evenodd");const de=o.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"fill-rule","nonzero");const pe=o.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const Ae=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Mt of Ae){const Gt=o.createNS("http://www.w3.org/2000/svg","ellipse");Gt.setAttributeNS(null,"opacity","0.04"),Gt.setAttributeNS(null,"cx","10.5"),Gt.setAttributeNS(null,"cy","5.80029008"),Gt.setAttributeNS(null,"rx",Mt.rx),Gt.setAttributeNS(null,"ry",Mt.ry),pe.appendChild(Gt)}const Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill",this._color);const Ge=o.createNS("http://www.w3.org/2000/svg","path");Ge.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Be.appendChild(Ge);const qe=o.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const at=o.createNS("http://www.w3.org/2000/svg","path");at.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),qe.appendChild(at);const lt=o.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),lt.setAttributeNS(null,"fill","#FFFFFF");const ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(8.0, 8.0)");const kt=o.createNS("http://www.w3.org/2000/svg","circle");kt.setAttributeNS(null,"fill","#000000"),kt.setAttributeNS(null,"opacity","0.25"),kt.setAttributeNS(null,"cx","5.5"),kt.setAttributeNS(null,"cy","5.5"),kt.setAttributeNS(null,"r","5.4999962");const Nt=o.createNS("http://www.w3.org/2000/svg","circle");Nt.setAttributeNS(null,"fill","#FFFFFF"),Nt.setAttributeNS(null,"cx","5.5"),Nt.setAttributeNS(null,"cy","5.5"),Nt.setAttributeNS(null,"r","5.4999962"),ft.appendChild(kt),ft.appendChild(Nt),de.appendChild(pe),de.appendChild(Be),de.appendChild(qe),de.appendChild(lt),de.appendChild(ft),P.appendChild(de),P.setAttributeNS(null,"height",j*this._scale+"px"),P.setAttributeNS(null,"width",Y*this._scale+"px"),this._element.appendChild(P),this._offset=n.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",P=>{P.preventDefault()}),this._element.addEventListener("mousedown",P=>{P.preventDefault()}),Xs(this._element,this._anchor,"marker"),O&&O.className)for(const P of O.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Y=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Y,-1*(24.6+Y)],"bottom-right":[-Y,-1*(24.6+Y)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var P,j;if(!(!((P=this._map)===null||P===void 0)&&P.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Y=this._map,te=Y.terrain.depthAtPoint(this._pos),de=Y.terrain.getElevationForLngLatZoom(this._lngLat,Y.transform.tileZoom);if(Y.transform.lngLatToCameraDepth(this._lngLat,de)-te<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/Y.transform._pixelPerMeter,Ae=Math.sin(Y.getPitch()*Math.PI/180)*pe,Be=Y.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ge=Y.transform.lngLatToCameraDepth(this._lngLat,de+Ae)-Be>.006;!((j=this._popup)===null||j===void 0)&&j.isOpen()&&Ge&&this._popup.remove(),this._element.style.opacity=Ge?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=n.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,P){return O===void 0&&P===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),P!==void 0&&(this._opacityWhenCovered=P),this._map&&this._updateOpacity(!0),this}}const Zs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Yr=0,Ec=!1;class Dr extends n.E{constructor(O){super(),this._onSuccess=P=>{if(this._map){if(this._isOutOfMapMaxBounds(P))return this._setErrorState(),this.fire(new n.k("outofmaxbounds",P)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=P,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(P),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(P),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new n.k("geolocate",P)),this._finish()}},this._updateCamera=P=>{const j=new n.N(P.coords.longitude,P.coords.latitude),Y=P.coords.accuracy,te=this._map.getBearing(),de=n.e({bearing:te},this.options.fitBoundsOptions),pe=xe.fromLngLat(j,Y);this._map.fitBounds(pe,de,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const j=new n.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(j).addTo(this._map),this._userLocationDotMarker.setLngLat(j).addTo(this._map),this._accuracy=P.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=P=>{if(this._map){if(this.options.trackUserLocation)if(P.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Ec)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new n.k("error",P)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",P=>P.preventDefault()),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=P=>{if(this._map){if(P===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}else{const j=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new zi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",j=>{const Y=j.originalEvent&&j.originalEvent.type==="resize";j.geolocateSource||this._watchState!=="ACTIVE_LOCK"||Y||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new n.k("trackuserlocationend")),this.fire(new n.k("userlocationlostfocus")))})}},this.options=n.e({},Zs,O)}onAdd(O){return this._map=O,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(P=!1){if(ir!==void 0&&!P)return ir;if(window.navigator.permissions===void 0)return ir=!!window.navigator.geolocation,ir;try{ir=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ir=!!window.navigator.geolocation}return ir})}().then(P=>this._finishSetupUI(P)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yr=0,Ec=!1}_isOutOfMapMaxBounds(O){const P=this._map.getMaxBounds(),j=O.coords;return P&&(j.longitude<P.getWest()||j.longitude>P.getEast()||j.latitude<P.getSouth()||j.latitude>P.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const O=this._map.getBounds(),P=O.getSouthEast(),j=O.getNorthEast(),Y=P.distanceTo(j),te=this._map._container.clientHeight,de=Math.ceil(this._accuracy/(Y/te)*2);this._circleElement.style.width=`${de}px`,this._circleElement.style.height=`${de}px`}trigger(){if(!this._setup)return n.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new n.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yr--,Ec=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new n.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new n.k("trackuserlocationstart")),this.fire(new n.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let O;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yr++,Yr>1?(O={maximumAge:6e5,timeout:0},Ec=!0):(O=this.options.positionOptions,Ec=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const hr={maxWidth:100,unit:"metric"};function xi(H,O,P){const j=P&&P.maxWidth||100,Y=H._container.clientHeight/2,te=H.unproject([0,Y]),de=H.unproject([j,Y]),pe=te.distanceTo(de);if(P&&P.unit==="imperial"){const Ae=3.2808*pe;Ae>5280?oo(O,j,Ae/5280,H._getUIString("ScaleControl.Miles")):oo(O,j,Ae,H._getUIString("ScaleControl.Feet"))}else P&&P.unit==="nautical"?oo(O,j,pe/1852,H._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?oo(O,j,pe/1e3,H._getUIString("ScaleControl.Kilometers")):oo(O,j,pe,H._getUIString("ScaleControl.Meters"))}function oo(H,O,P,j){const Y=function(de){const pe=Math.pow(10,`${Math.floor(de)}`.length-1);let Ae=de/pe;return Ae=Ae>=10?10:Ae>=5?5:Ae>=3?3:Ae>=2?2:Ae>=1?1:function(Be){const Ge=Math.pow(10,Math.ceil(-Math.log(Be)/Math.LN10));return Math.round(Be*Ge)/Ge}(Ae),pe*Ae}(P),te=Y/P;H.style.width=O*te+"px",H.innerHTML=`${Y} ${j}`}class Tl extends n.E{constructor(O={}){super(),this._onFullscreenChange=()=>{var P;let j=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=j==null?void 0:j.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)j=j.shadowRoot.fullscreenElement;j===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,O&&O.container&&(O.container instanceof HTMLElement?this._container=O.container:n.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(O){return this._map=O,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const O=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",O).setAttribute("aria-hidden","true"),O.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const O=this._getTitle();this._fullscreenButton.setAttribute("aria-label",O),this._fullscreenButton.title=O}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new n.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new n.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const cl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ct=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class pt extends n.E{constructor(O){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new n.k("close"))),this),this._onMouseUp=P=>{this._update(P.point)},this._onMouseMove=P=>{this._update(P.point)},this._onDrag=P=>{this._update(P.point)},this._update=P=>{var j;const Y=this._lngLat||this._trackPointer;if(!this._map||!Y||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Be of this.options.className.split(" "))this._container.classList.add(Be);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._trackPointer&&!P)return;const te=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationPoint(this._lngLat));let de=this.options.anchor;const pe=xt(this.options.offset);if(!de){const Be=this._container.offsetWidth,Ge=this._container.offsetHeight;let qe;qe=te.y+pe.bottom.y<Ge?["top"]:te.y>this._map.transform.height-Ge?["bottom"]:[],te.x<Be/2?qe.push("left"):te.x>this._map.transform.width-Be/2&&qe.push("right"),de=qe.length===0?"bottom":qe.join("-")}let Ae=te.add(pe[de]);this.options.subpixelPositioning||(Ae=Ae.round()),o.setTransform(this._container,`${vs[de]} translate(${Ae.x}px,${Ae.y}px)`),Xs(this._container,de,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(cl),O)}addTo(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new n.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(O){return this.setDOMContent(document.createTextNode(O))}setHTML(O){const P=document.createDocumentFragment(),j=document.createElement("body");let Y;for(j.innerHTML=O;Y=j.firstChild,Y;)P.appendChild(Y);return this.setDOMContent(P)}getMaxWidth(){var O;return(O=this._container)===null||O===void 0?void 0:O.style.maxWidth}setMaxWidth(O){return this.options.maxWidth=O,this._update(),this}setDOMContent(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(O){return this._container&&this._container.classList.add(O),this}removeClassName(O){return this._container&&this._container.classList.remove(O),this}setOffset(O){return this.options.offset=O,this._update(),this}toggleClassName(O){if(this._container)return this._container.classList.toggle(O)}setSubpixelPositioning(O){this.options.subpixelPositioning=O}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const O=this._container.querySelector(ct);O&&O.focus()}}function xt(H){if(H){if(typeof H=="number"){const O=Math.round(Math.abs(H)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,H),"top-left":new n.P(O,O),"top-right":new n.P(-O,O),bottom:new n.P(0,-H),"bottom-left":new n.P(O,-O),"bottom-right":new n.P(-O,-O),left:new n.P(H,0),right:new n.P(-H,0)}}if(H instanceof n.P||Array.isArray(H)){const O=n.P.convert(H);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:n.P.convert(H.center||[0,0]),top:n.P.convert(H.top||[0,0]),"top-left":n.P.convert(H["top-left"]||[0,0]),"top-right":n.P.convert(H["top-right"]||[0,0]),bottom:n.P.convert(H.bottom||[0,0]),"bottom-left":n.P.convert(H["bottom-left"]||[0,0]),"bottom-right":n.P.convert(H["bottom-right"]||[0,0]),left:n.P.convert(H.left||[0,0]),right:n.P.convert(H.right||[0,0])}}return xt(new n.P(0,0))}const K=y;f.AJAXError=n.bg,f.Evented=n.E,f.LngLat=n.N,f.MercatorCoordinate=n.Z,f.Point=n.P,f.addProtocol=n.bh,f.config=n.a,f.removeProtocol=n.bi,f.AttributionControl=ss,f.BoxZoomHandler=ko,f.CanvasSource=Me,f.CooperativeGesturesHandler=$o,f.DoubleClickZoomHandler=Pi,f.DragPanHandler=is,f.DragRotateHandler=ho,f.EdgeInsets=Ql,f.FullscreenControl=Tl,f.GeoJSONSource=Se,f.GeolocateControl=Dr,f.Hash=eo,f.ImageSource=ye,f.KeyboardHandler=cc,f.LngLatBounds=xe,f.LogoControl=ro,f.Map=class extends Xi{constructor(H){n.be.mark(n.bf.create);const O=Object.assign(Object.assign({},Ts),H);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new oi(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new gc,this._controls=[],this._mapId=n.a4(),this._contextLost=j=>{j.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:j}))},this._contextRestored=j=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:j}))},this._onMapScroll=j=>{if(j.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bc),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let j=!1;const Y=Us(te=>{this._trackResize&&!this._removed&&this.resize(te)._update()},50);this._resizeObserver=new ResizeObserver(te=>{j?Y(te):j=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Kr(this,O);const P=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new eo(P).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,n.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new ss(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new ro,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",j=>{this._update(j.dataType==="style"),this.fire(new n.k(`${j.dataType}data`,j))}),this.on("dataloading",j=>{this.fire(new n.k(`${j.dataType}dataloading`,j))}),this.on("dataabort",j=>{this.fire(new n.k("sourcedataabort",j))})}_getMapId(){return this._mapId}addControl(H,O){if(O===void 0&&(O=H.getDefaultPosition?H.getDefaultPosition():"top-right"),!H||!H.onAdd)return this.fire(new n.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const P=H.onAdd(this);this._controls.push(H);const j=this._controlPositions[O];return O.indexOf("bottom")!==-1?j.insertBefore(P,j.firstChild):j.appendChild(P),this}removeControl(H){if(!H||!H.onRemove)return this.fire(new n.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const O=this._controls.indexOf(H);return O>-1&&this._controls.splice(O,1),H.onRemove(this),this}hasControl(H){return this._controls.indexOf(H)>-1}calculateCameraOptionsFromTo(H,O,P,j){return j==null&&this.terrain&&(j=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(H,O,P,j)}resize(H){var O;const P=this._containerDimensions(),j=P[0],Y=P[1],te=this._getClampedPixelRatio(j,Y);if(this._resizeCanvas(j,Y,te),this.painter.resize(j,Y,te),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const Ae=this._getClampedPixelRatio(j,Y);this._resizeCanvas(j,Y,Ae),this.painter.resize(j,Y,Ae)}this.transform.resize(j,Y),(O=this._requestedCameraState)===null||O===void 0||O.resize(j,Y);const de=!this._moving;return de&&(this.stop(),this.fire(new n.k("movestart",H)).fire(new n.k("move",H))),this.fire(new n.k("resize",H)),de&&this.fire(new n.k("moveend",H)),this}_getClampedPixelRatio(H,O){const{0:P,1:j}=this._maxCanvasSize,Y=this.getPixelRatio(),te=H*Y,de=O*Y,pe=te>P?P/te:1,Ae=de>j?j/de:1;return Math.min(pe,Ae)*Y}getPixelRatio(){var H;return(H=this._overridePixelRatio)!==null&&H!==void 0?H:devicePixelRatio}setPixelRatio(H){this._overridePixelRatio=H,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(H){return this.transform.setMaxBounds(xe.convert(H)),this._update()}setMinZoom(H){if((H=H??-2)>=-2&&H<=this.transform.maxZoom)return this.transform.minZoom=H,this._update(),this.getZoom()<H&&this.setZoom(H),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(H){if((H=H??22)>=this.transform.minZoom)return this.transform.maxZoom=H,this._update(),this.getZoom()>H&&this.setZoom(H),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(H){if((H=H??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(H>=0&&H<=this.transform.maxPitch)return this.transform.minPitch=H,this._update(),this.getPitch()<H&&this.setPitch(H),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(H){if((H=H??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(H>=this.transform.minPitch)return this.transform.maxPitch=H,this._update(),this.getPitch()>H&&this.setPitch(H),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(H){return this.transform.renderWorldCopies=H,this._update()}project(H){return this.transform.locationPoint(n.N.convert(H),this.style&&this.terrain)}unproject(H){return this.transform.pointLocation(n.P.convert(H),this.terrain)}isMoving(){var H;return this._moving||((H=this.handlers)===null||H===void 0?void 0:H.isMoving())}isZooming(){var H;return this._zooming||((H=this.handlers)===null||H===void 0?void 0:H.isZooming())}isRotating(){var H;return this._rotating||((H=this.handlers)===null||H===void 0?void 0:H.isRotating())}_createDelegatedListener(H,O,P){if(H==="mouseenter"||H==="mouseover"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:te=>{const de=this.getLayer(O)?this.queryRenderedFeatures(te.point,{layers:[O]}):[];de.length?j||(j=!0,P.call(this,new gs(H,this,te.originalEvent,{features:de}))):j=!1},mouseout:()=>{j=!1}}}}if(H==="mouseleave"||H==="mouseout"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:de=>{(this.getLayer(O)?this.queryRenderedFeatures(de.point,{layers:[O]}):[]).length?j=!0:j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))},mouseout:de=>{j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))}}}}{const j=Y=>{const te=this.getLayer(O)?this.queryRenderedFeatures(Y.point,{layers:[O]}):[];te.length&&(Y.features=te,P.call(this,Y),delete Y.features)};return{layer:O,listener:P,delegates:{[H]:j}}}}on(H,O,P){if(P===void 0)return super.on(H,O);const j=this._createDelegatedListener(H,O,P);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[H]=this._delegatedListeners[H]||[],this._delegatedListeners[H].push(j);for(const Y in j.delegates)this.on(Y,j.delegates[Y]);return this}once(H,O,P){if(P===void 0)return super.once(H,O);const j=this._createDelegatedListener(H,O,P);for(const Y in j.delegates)this.once(Y,j.delegates[Y]);return this}off(H,O,P){return P===void 0?super.off(H,O):(this._delegatedListeners&&this._delegatedListeners[H]&&(j=>{const Y=j[H];for(let te=0;te<Y.length;te++){const de=Y[te];if(de.layer===O&&de.listener===P){for(const pe in de.delegates)this.off(pe,de.delegates[pe]);return Y.splice(te,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(H,O){if(!this.style)return[];let P;const j=H instanceof n.P||Array.isArray(H),Y=j?H:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(j?{}:H)||{},Y instanceof n.P||typeof Y[0]=="number")P=[n.P.convert(Y)];else{const te=n.P.convert(Y[0]),de=n.P.convert(Y[1]);P=[te,new n.P(de.x,te.y),de,new n.P(te.x,de.y),te]}return this.style.queryRenderedFeatures(P,O,this.transform)}querySourceFeatures(H,O){return this.style.querySourceFeatures(H,O)}setStyle(H,O){return(O=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&H?(this._diffStyle(H,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(H,O))}setTransformRequest(H){return this._requestManager.setTransformRequest(H),this}_getUIString(H){const O=this._locale[H];if(O==null)throw new Error(`Missing UI string '${H}'`);return O}_updateStyle(H,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(H,O));const P=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!H)),H?(this.style=new zn(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof H=="string"?this.style.loadURL(H,O,P):this.style.loadJSON(H,O,P),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(H,O){if(typeof H=="string"){const P=H,j=this._requestManager.transformRequest(P,"Style");n.h(j,new AbortController).then(Y=>{this._updateDiff(Y.data,O)}).catch(Y=>{Y&&this.fire(new n.j(Y))})}else typeof H=="object"&&this._updateDiff(H,O)}_updateDiff(H,O){try{this.style.setState(H,O)&&this._update(!0)}catch(P){n.w(`Unable to perform style diff: ${P.message||P.error||P}. Rebuilding the style from scratch.`),this._updateStyle(H,O)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():n.w("There is no style added to the map.")}addSource(H,O){return this._lazyInitEmptyStyle(),this.style.addSource(H,O),this._update(!0)}isSourceLoaded(H){const O=this.style&&this.style.sourceCaches[H];if(O!==void 0)return O.loaded();this.fire(new n.j(new Error(`There is no source with ID '${H}'`)))}setTerrain(H){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),H){const O=this.style.sourceCaches[H.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${H.source}`);this.terrain===null&&O.reload();for(const P in this.style._layers){const j=this.style._layers[P];j.type==="hillshade"&&j.source===H.source&&n.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Jr(this.painter,O,H),this.painter.renderToTexture=new ys(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=P=>{P.dataType==="style"?this.terrain.sourceCache.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==H.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new n.k("terrain",{terrain:H})),this}getTerrain(){var H,O;return(O=(H=this.terrain)===null||H===void 0?void 0:H.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const H=this.style&&this.style.sourceCaches;for(const O in H){const P=H[O]._tiles;for(const j in P){const Y=P[j];if(Y.state!=="loaded"&&Y.state!=="errored")return!1}}return!0}removeSource(H){return this.style.removeSource(H),this._update(!0)}getSource(H){return this.style.getSource(H)}addImage(H,O,P={}){const{pixelRatio:j=1,sdf:Y=!1,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be}=P;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||n.b(O))){if(O.width===void 0||O.height===void 0)return this.fire(new n.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Ge,height:qe,data:at}=O,lt=O;return this.style.addImage(H,{data:new n.R({width:Ge,height:qe},new Uint8Array(at)),pixelRatio:j,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0,userImage:lt}),lt.onAdd&<.onAdd(this,H),this}}{const{width:Ge,height:qe,data:at}=l.getImageData(O);this.style.addImage(H,{data:new n.R({width:Ge,height:qe},at),pixelRatio:j,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0})}}updateImage(H,O){const P=this.style.getImage(H);if(!P)return this.fire(new n.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const j=O instanceof HTMLImageElement||n.b(O)?l.getImageData(O):O,{width:Y,height:te,data:de}=j;if(Y===void 0||te===void 0)return this.fire(new n.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Y!==P.data.width||te!==P.data.height)return this.fire(new n.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(O instanceof HTMLImageElement||n.b(O));return P.data.replace(de,pe),this.style.updateImage(H,P),this}getImage(H){return this.style.getImage(H)}hasImage(H){return H?!!this.style.getImage(H):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(H){this.style.removeImage(H)}loadImage(H){return w.getImage(this._requestManager.transformRequest(H,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(H,O){return this._lazyInitEmptyStyle(),this.style.addLayer(H,O),this._update(!0)}moveLayer(H,O){return this.style.moveLayer(H,O),this._update(!0)}removeLayer(H){return this.style.removeLayer(H),this._update(!0)}getLayer(H){return this.style.getLayer(H)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(H,O,P){return this.style.setLayerZoomRange(H,O,P),this._update(!0)}setFilter(H,O,P={}){return this.style.setFilter(H,O,P),this._update(!0)}getFilter(H){return this.style.getFilter(H)}setPaintProperty(H,O,P,j={}){return this.style.setPaintProperty(H,O,P,j),this._update(!0)}getPaintProperty(H,O){return this.style.getPaintProperty(H,O)}setLayoutProperty(H,O,P,j={}){return this.style.setLayoutProperty(H,O,P,j),this._update(!0)}getLayoutProperty(H,O){return this.style.getLayoutProperty(H,O)}setGlyphs(H,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(H,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(H,O,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(H,O,P,j=>{j||this._update(!0)}),this}removeSprite(H){return this._lazyInitEmptyStyle(),this.style.removeSprite(H),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(H,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(H,O,P=>{P||this._update(!0)}),this}setLight(H,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(H,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(H){return this._lazyInitEmptyStyle(),this.style.setSky(H),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(H,O){return this.style.setFeatureState(H,O),this._update()}removeFeatureState(H,O){return this.style.removeFeatureState(H,O),this._update()}getFeatureState(H){return this.style.getFeatureState(H)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let H=0,O=0;return this._container&&(H=this._container.clientWidth||400,O=this._container.clientHeight||300),[H,O]}_setupContainer(){const H=this._container;H.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",H);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const P=this._containerDimensions(),j=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],j);const Y=this._controlContainer=o.create("div","maplibregl-control-container",H),te=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(de=>{te[de]=o.create("div",`maplibregl-ctrl-${de} `,Y)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(H,O,P){this._canvas.width=Math.floor(P*H),this._canvas.height=Math.floor(P*O),this._canvas.style.width=`${H}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const H={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",j=>{O={requestedAttributes:H},j&&(O.statusMessage=j.statusMessage,O.type=j.type)},{once:!0});const P=this._canvas.getContext("webgl2",H)||this._canvas.getContext("webgl",H);if(!P){const j="Failed to initialize WebGL";throw O?(O.message=j,new Error(JSON.stringify(O))):new Error(j)}this.painter=new sc(P,this.transform),s.testSupport(P)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(H){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||H,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(H){return this._update(),this._renderTaskQueue.add(H)}_cancelRenderFrame(H){this._renderTaskQueue.remove(H)}_render(H){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(H),this._removed)return;let P=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Y=this.transform.zoom,te=l.now();this.style.zoomHistory.update(Y,te);const de=new n.a9(Y,{now:te,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=de.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(P=!0,this._crossFadingFactor=pe),this.style.update(de)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,showPadding:this.showPadding}),this.fire(new n.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,n.be.mark(n.bf.load),this.fire(new n.k("load"))),this.style&&(this.style.hasTransitions()||P)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||j||(this._fullyLoaded=!0,n.be.mark(n.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var H;this._hash&&this._hash.remove();for(const P of this._controls)P.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),w.removeThrottleControl(this._imageQueueHandle),(H=this._resizeObserver)===null||H===void 0||H.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O!=null&&O.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),n.be.clearMetrics(),this._removed=!0,this.fire(new n.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,l.frameAsync(this._frameRequest).then(H=>{n.be.frame(H),this._frameRequest=null,this._render(H)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(H){this._showTileBoundaries!==H&&(this._showTileBoundaries=H,this._update())}get showPadding(){return!!this._showPadding}set showPadding(H){this._showPadding!==H&&(this._showPadding=H,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(H){this._showCollisionBoxes!==H&&(this._showCollisionBoxes=H,H?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(H){this._showOverdrawInspector!==H&&(this._showOverdrawInspector=H,this._update())}get repaint(){return!!this._repaint}set repaint(H){this._repaint!==H&&(this._repaint=H,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(H){this._vertices=H,this._update()}get version(){return yc}getCameraTargetElevation(){return this.transform.elevation}},f.MapMouseEvent=gs,f.MapTouchEvent=wo,f.MapWheelEvent=sl,f.Marker=zi,f.NavigationControl=class{constructor(H){this._updateZoomButtons=()=>{const O=this._map.getZoom(),P=O===this._map.getMaxZoom(),j=O===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=j,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",j.toString())},this._rotateCompassArrow=()=>{const O=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=O},this._setButtonTitle=(O,P)=>{const j=this._map._getUIString(`NavigationControl.${P}`);O.title=j,O.setAttribute("aria-label",j)},this.options=n.e({},Ys,H),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(H){return this._map=H,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yn(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(H,O){const P=o.create("button",H,this._container);return P.type="button",P.addEventListener("click",O),P}},f.Popup=pt,f.RasterDEMTileSource=Ve,f.RasterTileSource=Ie,f.ScaleControl=class{constructor(H){this._onMove=()=>{xi(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,xi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hr),H)}getDefaultPosition(){return"bottom-left"}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",H.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Ws,f.Style=zn,f.TerrainControl=class{constructor(H){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=H}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=kl,f.TwoFingersTouchRotateHandler=qc,f.TwoFingersTouchZoomHandler=Qn,f.TwoFingersTouchZoomRotateHandler=Os,f.VectorTileSource=Ee,f.VideoSource=me,f.addSourceType=(H,O)=>n._(void 0,void 0,void 0,function*(){if(ze(H))throw new Error(`A source type called "${H}" already exists.`);((P,j)=>{Te[P]=j})(H,O)}),f.clearPrewarmedResources=function(){const H=ce;H&&(H.isPreloaded()&&H.numActive()===1?(H.release(le),ce=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Ne().getRTLTextPluginStatus()},f.getVersion=function(){return K},f.getWorkerCount=function(){return oe.workerCount},f.getWorkerUrl=function(){return n.a.WORKER_URL},f.importScriptInWorkers=function(H){return ue().broadcast("IS",H)},f.prewarm=function(){ne().acquire(le)},f.setMaxParallelImageRequests=function(H){n.a.MAX_PARALLEL_IMAGE_REQUESTS=H},f.setRTLTextPlugin=function(H,O){return Ne().setRTLTextPlugin(H,O)},f.setWorkerCount=function(H){oe.workerCount=H},f.setWorkerUrl=function(H){n.a.WORKER_URL=H}}),m}()},88640:function(c,m,a){function v(ge,be,xe){ge.prototype=be.prototype=xe,xe.constructor=ge}function f(ge,be){var xe=Object.create(ge.prototype);for(var ke in be)xe[ke]=be[ke];return xe}function n(){}a.d(m,{GW:function(){return fe},Dj:function(){return oe}});var y=.7,_=1/y,p="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\(".concat(p,",").concat(p,",").concat(p,"\\)$")),d=new RegExp("^rgb\\(".concat(o,",").concat(o,",").concat(o,"\\)$")),h=new RegExp("^rgba\\(".concat(p,",").concat(p,",").concat(p,",").concat(l,"\\)$")),g=new RegExp("^rgba\\(".concat(o,",").concat(o,",").concat(o,",").concat(l,"\\)$")),b=new RegExp("^hsl\\(".concat(l,",").concat(o,",").concat(o,"\\)$")),w=new RegExp("^hsla\\(".concat(l,",").concat(o,",").concat(o,",").concat(l,"\\)$")),x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function S(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function T(ge){var be,xe;return ge=(ge+"").trim().toLowerCase(),(be=s.exec(ge))?(xe=be[1].length,be=parseInt(be[1],16),xe===6?C(be):xe===3?new M(be>>8&15|be>>4&240,be>>4&15|240&be,(15&be)<<4|15&be,1):xe===8?A(be>>24&255,be>>16&255,be>>8&255,(255&be)/255):xe===4?A(be>>12&15|be>>8&240,be>>8&15|be>>4&240,be>>4&15|240&be,((15&be)<<4|15&be)/255):null):(be=u.exec(ge))?new M(be[1],be[2],be[3],1):(be=d.exec(ge))?new M(255*be[1]/100,255*be[2]/100,255*be[3]/100,1):(be=h.exec(ge))?A(be[1],be[2],be[3],be[4]):(be=g.exec(ge))?A(255*be[1]/100,255*be[2]/100,255*be[3]/100,be[4]):(be=b.exec(ge))?V(be[1],be[2]/100,be[3]/100,1):(be=w.exec(ge))?V(be[1],be[2]/100,be[3]/100,be[4]):x.hasOwnProperty(ge)?C(x[ge]):ge==="transparent"?new M(NaN,NaN,NaN,0):null}function C(ge){return new M(ge>>16&255,ge>>8&255,255&ge,1)}function A(ge,be,xe,ke){return ke<=0&&(ge=be=xe=NaN),new M(ge,be,xe,ke)}function E(ge,be,xe,ke){return arguments.length===1?((Ee=ge)instanceof n||(Ee=T(Ee)),Ee?new M((Ee=Ee.rgb()).r,Ee.g,Ee.b,Ee.opacity):new M):new M(ge,be,xe,ke??1);var Ee}function M(ge,be,xe,ke){this.r=+ge,this.g=+be,this.b=+xe,this.opacity=+ke}function I(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b))}function N(){var ge=z(this.opacity);return"".concat(ge===1?"rgb(":"rgba(").concat(F(this.r),", ").concat(F(this.g),", ").concat(F(this.b)).concat(ge===1?")":", ".concat(ge,")"))}function z(ge){return isNaN(ge)?1:Math.max(0,Math.min(1,ge))}function F(ge){return Math.max(0,Math.min(255,Math.round(ge)||0))}function R(ge){return((ge=F(ge))<16?"0":"")+ge.toString(16)}function V(ge,be,xe,ke){return ke<=0?ge=be=xe=NaN:xe<=0||xe>=1?ge=be=NaN:be<=0&&(ge=NaN),new U(ge,be,xe,ke)}function $(ge){if(ge instanceof U)return new U(ge.h,ge.s,ge.l,ge.opacity);if(ge instanceof n||(ge=T(ge)),!ge)return new U;if(ge instanceof U)return ge;var be=(ge=ge.rgb()).r/255,xe=ge.g/255,ke=ge.b/255,Ee=Math.min(be,xe,ke),Ie=Math.max(be,xe,ke),Ve=NaN,Se=Ie-Ee,we=(Ie+Ee)/2;return Se?(Ve=be===Ie?(xe-ke)/Se+6*(xe<ke):xe===Ie?(ke-be)/Se+2:(be-xe)/Se+4,Se/=we<.5?Ie+Ee:2-Ie-Ee,Ve*=60):Se=we>0&&we<1?0:Ve,new U(Ve,Se,we,ge.opacity)}function U(ge,be,xe,ke){this.h=+ge,this.s=+be,this.l=+xe,this.opacity=+ke}function Z(ge){return(ge=(ge||0)%360)<0?ge+360:ge}function q(ge){return Math.max(0,Math.min(1,ge||0))}function W(ge,be,xe){return 255*(ge<60?be+(xe-be)*ge/60:ge<180?xe:ge<240?be+(xe-be)*(240-ge)/60:be)}v(n,T,{copy:function(ge){return Object.assign(new this.constructor,this,ge)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $(this).formatHsl()},formatRgb:k,toString:k}),v(M,E,f(n,{brighter:function(ge){return ge=ge==null?_:Math.pow(_,ge),new M(this.r*ge,this.g*ge,this.b*ge,this.opacity)},darker:function(ge){return ge=ge==null?y:Math.pow(y,ge),new M(this.r*ge,this.g*ge,this.b*ge,this.opacity)},rgb:function(){return this},clamp:function(){return new M(F(this.r),F(this.g),F(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:I,formatHex:I,formatHex8:function(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b)).concat(R(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N,toString:N})),v(U,function(ge,be,xe,ke){return arguments.length===1?$(ge):new U(ge,be,xe,ke??1)},f(n,{brighter:function(ge){return ge=ge==null?_:Math.pow(_,ge),new U(this.h,this.s,this.l*ge,this.opacity)},darker:function(ge){return ge=ge==null?y:Math.pow(y,ge),new U(this.h,this.s,this.l*ge,this.opacity)},rgb:function(){var ge=this.h%360+360*(this.h<0),be=isNaN(ge)||isNaN(this.s)?0:this.s,xe=this.l,ke=xe+(xe<.5?xe:1-xe)*be,Ee=2*xe-ke;return new M(W(ge>=240?ge-240:ge+120,Ee,ke),W(ge,Ee,ke),W(ge<120?ge+240:ge-120,Ee,ke),this.opacity)},clamp:function(){return new U(Z(this.h),q(this.s),q(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var ge=z(this.opacity);return"".concat(ge===1?"hsl(":"hsla(").concat(Z(this.h),", ").concat(100*q(this.s),"%, ").concat(100*q(this.l),"%").concat(ge===1?")":", ".concat(ge,")"))}}));var Q=function(ge){return function(){return ge}};function X(ge,be){var xe=be-ge;return xe?function(ke,Ee){return function(Ie){return ke+Ie*Ee}}(ge,xe):Q(isNaN(ge)?be:ge)}var J=function ge(be){var xe=function(Ee){return(Ee=+Ee)==1?X:function(Ie,Ve){return Ve-Ie?function(Se,we,ye){return Se=Math.pow(Se,ye),we=Math.pow(we,ye)-Se,ye=1/ye,function(me){return Math.pow(Se+me*we,ye)}}(Ie,Ve,Ee):Q(isNaN(Ie)?Ve:Ie)}}(be);function ke(Ee,Ie){var Ve=xe((Ee=E(Ee)).r,(Ie=E(Ie)).r),Se=xe(Ee.g,Ie.g),we=xe(Ee.b,Ie.b),ye=X(Ee.opacity,Ie.opacity);return function(me){return Ee.r=Ve(me),Ee.g=Se(me),Ee.b=we(me),Ee.opacity=ye(me),Ee+""}}return ke.gamma=ge,ke}(1);function ee(ge,be){var xe,ke=be?be.length:0,Ee=ge?Math.min(ke,ge.length):0,Ie=new Array(Ee),Ve=new Array(ke);for(xe=0;xe<Ee;++xe)Ie[xe]=fe(ge[xe],be[xe]);for(;xe<ke;++xe)Ve[xe]=be[xe];return function(Se){for(xe=0;xe<Ee;++xe)Ve[xe]=Ie[xe](Se);return Ve}}function le(ge,be){var xe=new Date;return ge=+ge,be=+be,function(ke){return xe.setTime(ge*(1-ke)+be*ke),xe}}function oe(ge,be){return ge=+ge,be=+be,function(xe){return ge*(1-xe)+be*xe}}function se(ge){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},se(ge)}function ce(ge,be){var xe,ke={},Ee={};for(xe in ge!==null&&se(ge)==="object"||(ge={}),be!==null&&se(be)==="object"||(be={}),be)xe in ge?ke[xe]=fe(ge[xe],be[xe]):Ee[xe]=be[xe];return function(Ie){for(xe in ke)Ee[xe]=ke[xe](Ie);return Ee}}var ae=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ae.source,"g");function ie(ge,be){var xe,ke,Ee,Ie=ae.lastIndex=ne.lastIndex=0,Ve=-1,Se=[],we=[];for(ge+="",be+="";(xe=ae.exec(ge))&&(ke=ne.exec(be));)(Ee=ke.index)>Ie&&(Ee=be.slice(Ie,Ee),Se[Ve]?Se[Ve]+=Ee:Se[++Ve]=Ee),(xe=xe[0])===(ke=ke[0])?Se[Ve]?Se[Ve]+=ke:Se[++Ve]=ke:(Se[++Ve]=null,we.push({i:Ve,x:oe(xe,ke)})),Ie=ne.lastIndex;return Ie<be.length&&(Ee=be.slice(Ie),Se[Ve]?Se[Ve]+=Ee:Se[++Ve]=Ee),Se.length<2?we[0]?function(ye){return function(me){return ye(me)+""}}(we[0].x):function(ye){return function(){return ye}}(be):(be=we.length,function(ye){for(var me,Me=0;Me<be;++Me)Se[(me=we[Me]).i]=me.x(ye);return Se.join("")})}function ue(ge,be){be||(be=[]);var xe,ke=ge?Math.min(be.length,ge.length):0,Ee=be.slice();return function(Ie){for(xe=0;xe<ke;++xe)Ee[xe]=ge[xe]*(1-Ie)+be[xe]*Ie;return Ee}}function he(ge){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},he(ge)}function fe(ge,be){var xe,ke,Ee=he(be);return be==null||Ee==="boolean"?Q(be):(Ee==="number"?oe:Ee==="string"?(xe=T(be))?(be=xe,J):ie:be instanceof T?J:be instanceof Date?le:(ke=be,!ArrayBuffer.isView(ke)||ke instanceof DataView?Array.isArray(be)?ee:typeof be.valueOf!="function"&&typeof be.toString!="function"||isNaN(be)?ce:oe:ue))(ge,be)}},23648:function(c){c.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(c){c.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(c){c.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(c){c.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(c){c.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(c){c.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(c){c.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI © <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(c){c.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI © <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function D(c){var m=B[c];if(m!==void 0)return m.exports;var a=B[c]={id:c,exports:{}};return i[c].call(a.exports,a,a.exports,D),a.exports}return D.m=i,D.n=function(c){var m=c&&c.__esModule?function(){return c.default}:function(){return c};return D.d(m,{a:m}),m},D.d=function(c,m){for(var a in m)D.o(m,a)&&!D.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:m[a]})},D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D.o=function(c,m){return Object.prototype.hasOwnProperty.call(c,m)},D.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},D.b=document.baseURI||self.location.href,D.nc=void 0,D(20260)}()})})(sq);var hNt=sq.exports;const lq=ck(hNt),J1a="",K1a="",pNt={ref:"card",class:"card-volumetric-field"},cq=1,fNt=800,dq=300,mNt=-46,uq=100,hq=-14,gNt=$i({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const r=e,i=new Set([2,20,308,310]),B=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let D=null;const c=t.ref(null),m=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>r.passesPlays,h=>{const g=h.reduce((b,w)=>(i.has(w[r.playIndexes.categoryId])&&b.push({x1:w[r.playIndexes.coordinate1X],y1:w[r.playIndexes.coordinate1Y],x2:w[r.playIndexes.coordinate2X],y2:w[r.playIndexes.coordinate2Y],x3:w[r.playIndexes.coordinate3X],y3:w[r.playIndexes.coordinate3Y]}),b),[]);d(g)}),t.watch(()=>a.value,(h,g)=>{v.value&&(o(h),m.value.style.height=`${s(h)}px`,v.value.style.top=`${u(s(h))}px`)});function f(){D=new ResizeObserver(h=>{for(const g of h)a.value=g.contentRect.width}),D.observe(c.value)}function n(h){return Array.from({length:h},()=>0)}function y(h,g){let b=.01351,w=.02439,x=0,S=0,k=[];const T=g.length,C=Math.floor(T/10);for(;x<74;)S=g.filter(A=>1-A.y3>=x*b&&1-A.y3<=(x+1)*b&&1-A.x3>=h*w&&1-A.x3<=(h+1)*w).map(A=>A.y3).length,k.push(parseFloat((S/C).toFixed(4))),x++;return k.reverse()}function _(h){let g=[n(74),n(74)],b=[],w=39;for(;w>0&&w<=39;)b=y(w,h),g.push(b),w--;return g.push(n(74),n(74)),g}function p(h,g,b){const w=[];let k=0,T=0;w.push(h[0]);for(let C=1;C<b-1;C++){const A=[];A.push(h[C][0]);for(let E=1;E<g-1;E++)k=h[C][E-1],T=h[C][E+1],A.push(k+.5*(h[C][E]+T-k));A.push(h[C][g-1]),w.push(A)}w.push(h[b-1]);for(let C=1;C<g-1;C++)for(let A=1;A<b-1;A++)k=w[A-1][C],T=w[A+1][C],w[A][C]=k+.5*(w[A][C]+T-k);return w}function l(h){let g=0,b=0;for(let w=0;w<h.length;w++){b=b+h[w].reduce(function(S,k){return S+k});const x=Math.max.apply(null,h[w]);x>g&&(g=x)}return g}function o(h){lq.relayout(c.value,{width:h,height:s(h)})}function s(h){return Math.round(dq/fNt*h,0)}function u(h){return hq+(h-uq)/(dq-uq)*(mNt-hq)}function d(h){let g=_(h),b=g.length,w=g[0].length;g=p(p(g,w,b),w,b),w=g[0].length,b=g.length;const x=l(g),S=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:B,autoscale:!1,showscale:!1}],k=[0,w],T=[0,b],C=[0,x*5],A={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:C},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:s(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};m.value&&(m.value.style.height=`${s(a.value)}px`);const E=[];for(let M=0;M<w;M++){const I=[],N=[],z=[];for(let F=0;F<b;F++)I.push(M),N.push(F),z.push(S[0].z[F][M]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:cq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let M=0;M<b;M++){const I=[],N=[],z=[];for(let F=0;F<w;F++)I.push(F),N.push(M),z.push(S[0].z[M][F]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:cq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}lq.newPlot("surface-plot",S.concat(E),A,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${u(s(a.value))}px`)}return t.onMounted(()=>{c.value&&(c.value.style.pointerEvents="none"),f()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",pNt,[t.createElementVNode("div",{ref_key:"volumetricField",ref:m,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:c,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-b4141ee5"]]),ega="",pq=e=>(t.pushScopeId("data-v-dd911c44"),e=e(),t.popScopeId(),e),yNt=pq(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),vNt=pq(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),_Nt=$i({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const r=e,i=t.computed(()=>({"--flex-direction-info":r.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":r.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":r.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,D)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(i.value)},[yNt,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),vNt],4))}},[["__scopeId","data-v-dd911c44"]]),bNt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let qE=null;function xNt(){return qE||(qE=Wg(bNt)),qE}const aga="",wNt=e=>(t.pushScopeId("data-v-35673b08"),e=e(),t.popScopeId(),e),kNt={class:"volumetric-section-container"},CNt=wNt(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),SNt={key:0,class:"volumetric-section-container__switch"},TNt={class:"volumetric-section-container__attack-direction"},ENt={class:"volumetric-section-container__field"},ANt=$i({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const r=e,i=xNt(),B=new Set([2,20,308,310]),D=new Set([3,21,309]),c=new Set([...B,...D]);let m=null;const a=t.ref(0),v=t.ref(new Map),f=t.ref({teamId:0}),n=t.computed(()=>[{teamId:r.game.homeTeam.team_id,text:r.game.homeTeam.colloquial_name,img:r.game.homeTeam.logo,isHomeTeam:!0},{teamId:r.game.awayTeam.team_id,text:r.game.awayTeam.colloquial_name,img:r.game.awayTeam.logo,isHomeTeam:!1}]),y=t.computed(()=>v.value.get(r.isGamePreMatch?r.teamSelectedPreMatch.teamId:f.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,f.value=n.value[a.value]},{immediate:!0}),t.watch(()=>r.game.gameId,h=>{h&&(d(),p(r.game.is_live&&r.game.game_status===4))},{immediate:!0});function _(){m=setInterval(()=>{p()},1e3*60*r.volumetricFieldIntervalMinutes)}async function p(h=!1){try{const g=await o();v.value.set(r.game.homeTeam.team_id,g.homeTeam),v.value.set(r.game.awayTeam.team_id,g.awayTeam),h&&_()}catch(g){throw new Error(g)}}function l(h){return r.game.game_status===4&&!r.game.is_live?h[i.gameId]!==r.game.gameId:h[i.gameId]===r.game.gameId}async function o(h=0){try{let g={homeTeam:[],awayTeam:[]};if(r.game.is_live||r.game.game_status===0){const b=await $c.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${r.game.gameId}`),w=b.data?b.data.data||[]:[],x=new Set;w.forEach(S=>{x.add(S[i.categoryId]),S[i.teamId]===r.game.homeTeam.team_id&&c.has(S[i.categoryId])&&l(S)?(s(S),g.homeTeam.push(S)):S[i.teamId]===r.game.awayTeam.team_id&&c.has(S[i.categoryId])&&l(S)&&(S[i.coordinate1Y]=1-S[i.coordinate1Y],S[i.coordinate2Y]=1-S[i.coordinate2Y],S[i.coordinate3Y]=1-S[i.coordinate3Y],S[i.coordinate1X]=1-S[i.coordinate1X],S[i.coordinate2X]=1-S[i.coordinate2X],S[i.coordinate3X]=1-S[i.coordinate3X],s(S),g.awayTeam.push(S))})}else{const[b,w]=await Promise.all([$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${h||r.game.seasonId}-${r.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${r.game.seasonId}-${r.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);if(!b.data.data.posession.length&&!w.data.data.posession.length)return o(r.game.regularSeasonId);g={homeTeam:b.data.data.posession.filter(x=>x[i.teamId]===r.game.homeTeam.team_id&&c.has(x[i.categoryId])&&l(x)),awayTeam:w.data.data.posession.filter(x=>x[i.teamId]===r.game.awayTeam.team_id&&c.has(x[i.categoryId])&&l(x)?(x[i.coordinate1Y]=1-x[i.coordinate1Y],x[i.coordinate2Y]=1-x[i.coordinate2Y],x[i.coordinate3Y]=1-x[i.coordinate3Y],x[i.coordinate1X]=1-x[i.coordinate1X],x[i.coordinate2X]=1-x[i.coordinate2X],x[i.coordinate3X]=1-x[i.coordinate3X],!0):!1)}}return g}catch(g){throw new Error(g)}}function s(h){const g=h[i.coordinate1X],b=h[i.coordinate2X],w=h[i.coordinate3X];return h[i.coordinate1X]=h[i.coordinate1Y],h[i.coordinate2X]=h[i.coordinate2Y],h[i.coordinate3X]=h[i.coordinate3Y],h[i.coordinate1Y]=g,h[i.coordinate2Y]=b,h[i.coordinate3Y]=w,h}function u(h){a.value=h.index,f.value=h.button}function d(){m&&clearInterval(m)}return t.onUnmounted(()=>{d()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",kNt,[CNt,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",SNt,[t.createVNode(m5,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:u},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",TNt,[t.createVNode(_Nt,{team:e.isGamePreMatch?e.teamSelectedPreMatch:f.value},null,8,["team"])]),t.createElementVNode("div",ENt,[t.createVNode(gNt,{"passes-plays":y.value,"play-indexes":t.unref(i)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-35673b08"]]),rga="";let fq=null;const MNt={components:{GSCHighlights:V3t,ToggleButtons:m5,VolumetricSectionContainer:ANt,DataProminentGame:ewt,HighlightsProminentGameLive:y4t,HighlightsProminentGame:e4t,GSCRadioToggle:FH,FieldPosesion:Nwt,EventsLine:s5t,ChalkboardSectionContainer:uNt},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)fq=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),fq.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickPlayEvent(e){const r={seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",r)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},om=e=>(t.pushScopeId("data-v-1c96092d"),e=e(),t.popScopeId(),e),INt={class:"container-prominent",ref:"prominent"},PNt={class:"container-prominent-data"},BNt={class:"container-prominent-section"},NNt={key:0,class:"highlights-containers"},zNt={class:"highlights-content"},ONt={key:1,class:"highlights-containers"},FNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),LNt={key:0,class:"container-leyend-prematch"},DNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),RNt={key:1,class:"container-leyend-prematch-movil"},VNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),$Nt=om(()=>t.createElementVNode("br",null,null,-1)),jNt=om(()=>t.createElementVNode("br",null,null,-1)),UNt={key:2,class:"container-leyend-prematch-movil"},GNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),HNt=om(()=>t.createElementVNode("br",null,null,-1)),WNt=om(()=>t.createElementVNode("br",null,null,-1)),qNt={class:"container-switch-toggle"},YNt={class:"container-prominent-section__chalkboard"},XNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function ZNt(e,r,i,B,D,c){const m=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),f=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),y=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("FieldPosesion"),l=t.resolveComponent("VolumetricSectionContainer"),o=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",INt,[t.createElementVNode("div",PNt,[t.createVNode(m,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-prominent-data":i.timeLiveProminentData,game:i.game,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onLoading:c.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])]),t.createElementVNode("div",BNt,[i.game.is_live===1||i.game.game_status===0||i.game.game_status===1?(t.openBlock(),t.createElementBlock("div",NNt,[t.createElementVNode("div",{class:t.normalizeClass(c.getContainerClass())},[D.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(i.game).length>0&&Object.keys(i.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(i.tournamentSelected.id!=41?i.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):i.game.matchday_name=="Matchday 10"?"Final":i.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(D.widthSection>830?"highlights-title":"highlights-title-mobile")},"HIGHLIGHTS DEL PARTIDO",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",zNt,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showgoalsliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,"title-card":"GOLES",onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"title-card":"GOLES","can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showsummaryliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",ONt,[!D.isDataProminentGameLoading&&(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.canPlayVideos?(t.openBlock(),t.createBlock(f,{key:0,data:{game:i.game.gameId,season:i.game.seasonId,type:"historic"},"can-play-videos":i.canPlayVideos,"video-privileges-playing-as":i.videoPrivilegesPlayingAs,"privileges-team-id":i.playVideosPrivileges?i.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:c.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),c.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(D.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:i.token,game:i.game,widthScreen:D.widthSection,"can-play-videos":i.canPlayVideos,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onPlayVideo:c.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(D.widthSection>760?"fields-section-container":"fields-section-container-movil")},[FNt,i.game.game_status===4&&i.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.widthSection>590?(t.openBlock(),t.createElementBlock("div",LNt,[DNt,t.createTextVNode(" Es en base a las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection>340&&D.widthSection<=590?(t.openBlock(),t.createElementBlock("div",RNt,[VNt,t.createTextVNode(" "),$Nt,t.createTextVNode("Es en base a las estadisticas de los partidos ya "),jNt,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection<=340?(t.openBlock(),t.createElementBlock("div",UNt,[GNt,t.createTextVNode(" "),HNt,t.createTextVNode("Es en base a las estadisticas de los "),WNt,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(y,{"selected-button-index":D.teamButtonSelectedIndex,buttons:c.toggleButtons,width:"320px","border-radius":"16px",onChange:c.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",qNt,[t.createVNode(_,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:c.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,D.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(p,{"width-Section":D.widthSection,game:i.game,"time-live-possesion":i.timeLivePossesion,onIntervalidpossesion:c.intervalidpossesion,"team-selected":D.teamSelected.teamId===0?c.toggleButtons[0]:D.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,D.switchTypeViewFiled==="Porcentajes"||D.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(l,{game:i.game,"season-selected":i.seasonSelected,token:i.token,"is-game-pre-match":c.isGamePreMatch,"team-selected-pre-match":D.teamSelected,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,D.viewVolumtrica&&D.widthSection>760||D.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",YNt,[XNt,D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(o,{key:0,"is-female":i.tournamentSelected.is_female===1,game:i.game,"season-selected":i.seasonSelected,"tournament-selected":i.tournamentSelected,token:i.token,"width-section":D.widthSection,"can-play-videos":i.canPlayVideos,"is-game-pre-match":c.isGamePreMatch,"play-videos-privileges":i.playVideosPrivileges,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":i.chalkboardIntervalMinutes,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onOpenMediaPlayer:c.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const JNt=$i(MNt,[["render",ZNt],["__scopeId","data-v-1c96092d"]]),iga="",KNt={class:"datagame-container"},QNt=$i({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:r}){function i(m){r("intervalidhighlive",m)}function B(m){r("intervalidpossesion",m)}function D(m){r("openmedia",m)}function c(m){r("openmedia",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",KNt,[t.createVNode(JNt,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:B,onIntervalidhighlive:i,onOpenmedia:D,onOpenMediaPlayer:c},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-244894a5"]]),ezt={class:"datagame-container"},tzt={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:r}){const i=e,B=t.ref(0);t.watch(()=>i.game,m=>{B.value=m.gameId},{deep:!0,immediate:!0});function D(m){r("openmedia",m)}function c(m){r("intervalidgs",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",ezt,[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(x2),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:c,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(x2),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(x2),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},azt={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 E_(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const nzt={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},YE={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:r}=E_(e);return{myDivRef:e,elementSize:r}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},mq=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},gq=YE.setup;YE.setup=gq?(e,r)=>(mq(),gq(e,r)):mq;const rzt={ref:"myDivRef"},izt=t.createElementVNode("br",null,null,-1),ozt=t.createElementVNode("br",null,null,-1);function szt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",rzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(c.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),izt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),ozt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(c.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const yq=$i(YE,[["render",szt],["__cssModules",{$style:nzt}]]),dva="",XE={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))}}},vq=()=>{t.useCssVars(e=>({"72ff6367":e.height,"5ab83942":e.borderWidthBtn,"685a33c6":e.borderType,bc0fc752:e.borderColor,"9449c3c4":e.borderRadius,ac97d8f4:e.width,"7e4ca6d6":e.backgroundColor,"00cc2df0":e.cursorType,"09b439a0":e.fontSize,"699b8062":e.fontStyle,"9ad7625a":e.fontFamily,"081aa5ee":e.marginLeftStat,"624845a4":e.fontSizeStat}))},_q=XE.setup;XE.setup=_q?(e,r)=>(vq(),_q(e,r)):vq;const lzt=e=>(t.pushScopeId("data-v-a6a12d0c"),e=e(),t.popScopeId(),e),czt=["src"],dzt={key:1,class:"text"},uzt=["src"],hzt={class:"stats"},pzt=lzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),fzt={class:"numstats"},mzt={class:"leyend"};function gzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(i.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,14,czt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",dzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,uzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",hzt,[pzt,t.createElementVNode("div",fzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",mzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const bq=$i(XE,[["render",gzt],["__scopeId","data-v-a6a12d0c"]]),yzt={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},ZE={components:{GSCButton:bq},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:r}=E_(e);return{myDivRef2:e,elementSize:r}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},xq=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},wq=ZE.setup;ZE.setup=wq?(e,r)=>(xq(),wq(e,r)):xq;const vzt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},_zt=["src"],bzt=["src"],xzt=["src"],wzt=["src"],kzt=["fill"],Czt=["fill"],Szt=["src"],Tzt=["src"],Ezt=["fill"],Azt=["fill"],Mzt=["src"],Izt=["src"],Pzt=["src"],Bzt=["src"],Nzt=["fill"],zzt=["fill"];function Ozt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",vzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,_zt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(i.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(i.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,bzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:i.data.team_logo},null,10,xzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:i.data.player_country_flag},null,10,wzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[1]||(r[1]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.numberOfVideosClass)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[2]||(r[2]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,Czt)],10,kzt))],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(i.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(c.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:i.data.team_logo},null,10,Szt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(i.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:i.data.team_logo},null,10,Tzt)],2),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedType1Class)},t.toDisplayString(i.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(i.data.frequency)+" ",1),i.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.ageType1Class)},t.toDisplayString(i.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedGamesType1Class)},t.toDisplayString(i.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(c.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedMinutesType1Class)},t.toDisplayString(i.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameType1Class)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[4]||(r[4]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(c.numberOfVideosType1Class)},t.toDisplayString(i.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[5]||(r[5]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,Azt)],10,Ezt))],2)],2)],6)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Mzt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},t.toDisplayString(i.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Izt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:i.data.team_logo},null,10,Pzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:i.data.player_country_flag},null,10,Bzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:B.elementSize.width<=680?"83px":i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[6]||(r[6]=a=>c.emitEventMedia(i.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[7]||(r[7]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,zzt)],10,Nzt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const kq=$i(ZE,[["render",Ozt],["__cssModules",{$style:yzt}]]),Fzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},JE={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))}}},Cq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Sq=JE.setup;JE.setup=Sq?(e,r)=>(Cq(),Sq(e,r)):Cq;const Lzt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),Dzt=["src"],Rzt={key:1,class:"text"},Vzt=["src"],$zt={class:"stats"},jzt=Lzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Uzt={class:"numstats"},Gzt={class:"leyend"};function Hzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Dzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",Rzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Vzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",$zt,[jzt,t.createElementVNode("div",Uzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",Gzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const Wzt=Fzt(JE,[["render",Hzt],["__scopeId","data-v-fb269a1e"]]),qzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},KE={components:{GSCButton:Wzt},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)}},Tq=()=>{t.useCssVars(e=>({"132156c0":e.centerTextCustom,"096d3ecc":e.marginCustom}))},Eq=KE.setup;KE.setup=Eq?(e,r)=>(Tq(),Eq(e,r)):Tq;const Yzt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Xzt={class:"gsc-filterperteam__panel-teams__cont-teams"},Zzt=["onClick"],Jzt=["src","alt","title"];function Kzt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(c.customStyleContain)},[t.createElementVNode("div",Yzt,[t.createElementVNode("div",Xzt,[i.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(m,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:c.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass([a.id==D.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:f=>c.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Jzt)],14,Zzt))),128))])],512)],4)}const Qzt=qzt(KE,[["render",Kzt],["__scopeId","data-v-ab79352d"]]),eOt={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},QE={components:{GSCButton:bq},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)}}},Aq=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},Mq=QE.setup;QE.setup=Mq?(e,r)=>(Aq(),Mq(e,r)):Aq;const tOt=["src"],aOt=["src"],nOt=["src"],rOt=["src"],iOt=["fill"],oOt=["fill"],sOt=["src"],lOt=["fill"],cOt=["fill"];function dOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(i.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:i.data.photo},null,10,tOt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:i.data.logo},null,10,aOt)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(i.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:i.data.logo},null,10,nOt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(m,{icon:"","icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:i.data.logo},null,10,rOt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:r[1]||(r[1]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,oOt)],10,iOt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(i.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:i.data.logo},null,10,sOt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(i.data.name_team),3),t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[2]||(r[2]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(i.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:r[4]||(r[4]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,cOt)],10,lOt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const uOt=$i(QE,[["render",dOt],["__cssModules",{$style:eOt}]]),hOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},eA={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))}}},Iq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Pq=eA.setup;eA.setup=Pq?(e,r)=>(Iq(),Pq(e,r)):Iq;const pOt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),fOt=["src"],mOt={key:1,class:"text"},gOt=["src"],yOt={class:"stats"},vOt=pOt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),_Ot={class:"numstats"},bOt={class:"leyend"};function xOt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,fOt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",mOt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,gOt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",yOt,[vOt,t.createElementVNode("div",_Ot,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",bOt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const wOt=hOt(eA,[["render",xOt],["__scopeId","data-v-fb269a1e"]]),Mba="",Iba="",kOt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},tA={components:{GSCButton:wOt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:r}=E_(e);return{myDivRef:e,elementSize:r}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},Bq=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},Nq=tA.setup;tA.setup=Nq?(e,r)=>(Bq(),Nq(e,r)):Bq;const lh=e=>(t.pushScopeId("data-v-0bb9c2ff"),e=e(),t.popScopeId(),e),COt={ref:"myDivRef"},SOt=["src"],TOt=lh(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),EOt=lh(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),AOt=lh(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),MOt=lh(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),IOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),POt=lh(()=>t.createElementVNode("span",null,"xG: ",-1)),BOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),NOt=lh(()=>t.createElementVNode("span",null,"xG: ",-1)),zOt=lh(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),OOt=lh(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),FOt=lh(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),LOt=lh(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),DOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),ROt=lh(()=>t.createElementVNode("span",null,"xG: ",-1));function VOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",COt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,i.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[i.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(i.data.teams),3)],2)):t.createCommentVNode("",!0),i.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(i.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),i.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(i.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:i.data.countryFlag},null,8,SOt)],2)],2)],2)):t.createCommentVNode("",!0),i.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[i.viewGames&&!i.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.games),3)],2)):t.createCommentVNode("",!0),i.viewMin&&!i.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.min),3)],2)):t.createCommentVNode("",!0),i.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(i.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.goals),3)],2)):t.createCommentVNode("",!0),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:r[0]||(r[0]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,i.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[TOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[EOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[AOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[MOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[IOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[POt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[BOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[NOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[zOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[OOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[FOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[LOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[DOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[ROt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2)],2)],2),i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:r[1]||(r[1]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const zq=$i(tA,[["render",VOt],["__cssModules",{$style:kOt}],["__scopeId","data-v-0bb9c2ff"]]);/**
|
|
4158
|
+
`),zt=pe.createShader(pe.FRAGMENT_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(zt,Mt),pe.compileShader(zt),!pe.getShaderParameter(zt,pe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${pe.getShaderInfoLog(zt)}`);pe.attachShader(this.program,zt);const Xt=pe.createShader(pe.VERTEX_SHADER);if(pe.isContextLost())return void(this.failedToCreate=!0);if(pe.shaderSource(Xt,Gt),pe.compileShader(Xt),!pe.getShaderParameter(Xt,pe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${pe.getShaderInfoLog(Xt)}`);pe.attachShader(this.program,Xt),this.attributes={};const Zt={};this.numAttributes=Ge.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Ge[Yt]&&(pe.bindAttribLocation(this.program,Yt,Ge[Yt]),this.attributes[Ge[Yt]]=Yt);if(pe.linkProgram(this.program),!pe.getProgramParameter(this.program,pe.LINK_STATUS))throw new Error(`Program failed to link: ${pe.getProgramInfoLog(this.program)}`);pe.deleteShader(Xt),pe.deleteShader(zt);for(let Yt=0;Yt<kt.length;Yt++){const ya=kt[Yt];if(ya&&!Zt[ya]){const Ca=pe.getUniformLocation(this.program,ya);Ca&&(Zt[ya]=Ca)}}this.fixedUniforms=Y(O,Zt),this.terrainUniforms=((Yt,ya)=>({u_depth:new n.aI(Yt,ya.u_depth),u_terrain:new n.aI(Yt,ya.u_terrain),u_terrain_dim:new n.aJ(Yt,ya.u_terrain_dim),u_terrain_matrix:new n.aK(Yt,ya.u_terrain_matrix),u_terrain_unpack:new n.aL(Yt,ya.u_terrain_unpack),u_terrain_exaggeration:new n.aJ(Yt,ya.u_terrain_exaggeration)}))(O,Zt),this.binderUniforms=j?j.getUniforms(O,Zt):[]}draw(O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt,ft,kt,Nt,Mt,Gt){const zt=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(j),O.setStencilMode(Y),O.setColorMode(te),O.setCullFace(de),Ae){O.activeTexture.set(zt.TEXTURE2),zt.bindTexture(zt.TEXTURE_2D,Ae.depthTexture),O.activeTexture.set(zt.TEXTURE3),zt.bindTexture(zt.TEXTURE_2D,Ae.texture);for(const Zt in this.terrainUniforms)this.terrainUniforms[Zt].set(Ae[Zt])}for(const Zt in this.fixedUniforms)this.fixedUniforms[Zt].set(pe[Zt]);kt&&kt.setUniforms(O,this.binderUniforms,lt,{zoom:ft});let Xt=0;switch(P){case zt.LINES:Xt=2;break;case zt.TRIANGLES:Xt=3;break;case zt.LINE_STRIP:Xt=1}for(const Zt of at.get()){const Yt=Zt.vaos||(Zt.vaos={});(Yt[Be]||(Yt[Be]=new Bn)).bind(O,this,Ge,kt?kt.getPaintVertexBuffers():[],qe,Zt.vertexOffset,Nt,Mt,Gt),zt.drawElements(P,Zt.primitiveLength*Xt,zt.UNSIGNED_SHORT,Zt.primitiveOffset*Xt*2)}}}function Ba(H,O,P){const j=1/yt(P,1,O.transform.tileZoom),Y=Math.pow(2,P.tileID.overscaledZ),te=P.tileSize*Math.pow(2,O.transform.tileZoom)/Y,de=te*(P.tileID.canonical.x+P.tileID.wrap*Y),pe=te*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[j,H.fromScale,H.toScale],u_fade:H.t,u_pixel_coord_upper:[de>>16,pe>>16],u_pixel_coord_lower:[65535&de,65535&pe]}}const Xa=(H,O,P,j)=>{const Y=O.style.light,te=Y.properties.get("position"),de=[te.x,te.y,te.z],pe=function(){var Be=new n.A(9);return n.A!=Float32Array&&(Be[1]=0,Be[2]=0,Be[3]=0,Be[5]=0,Be[6]=0,Be[7]=0),Be[0]=1,Be[4]=1,Be[8]=1,Be}();Y.properties.get("anchor")==="viewport"&&function(Be,Ge){var qe=Math.sin(Ge),at=Math.cos(Ge);Be[0]=at,Be[1]=qe,Be[2]=0,Be[3]=-qe,Be[4]=at,Be[5]=0,Be[6]=0,Be[7]=0,Be[8]=1}(pe,-O.transform.angle),function(Be,Ge,qe){var at=Ge[0],lt=Ge[1],ft=Ge[2];Be[0]=at*qe[0]+lt*qe[3]+ft*qe[6],Be[1]=at*qe[1]+lt*qe[4]+ft*qe[7],Be[2]=at*qe[2]+lt*qe[5]+ft*qe[8]}(de,de,pe);const Ae=Y.properties.get("color");return{u_matrix:H,u_lightpos:de,u_lightintensity:Y.properties.get("intensity"),u_lightcolor:[Ae.r,Ae.g,Ae.b],u_vertical_gradient:+P,u_opacity:j}},dn=(H,O,P,j,Y,te,de)=>n.e(Xa(H,O,P,j),Ba(te,O,de),{u_height_factor:-Math.pow(2,Y.overscaledZ)/de.tileSize/8}),ln=H=>({u_matrix:H}),Cn=(H,O,P,j)=>n.e(ln(H),Ba(P,O,j)),Rn=(H,O)=>({u_matrix:H,u_world:O}),la=(H,O,P,j,Y)=>n.e(Cn(H,O,P,j),{u_world:Y}),za=(H,O,P,j)=>{const Y=H.transform;let te,de;if(j.paint.get("circle-pitch-alignment")==="map"){const pe=yt(P,1,Y.zoom);te=!0,de=[pe,pe]}else te=!1,de=Y.pixelsToGLUnits;return{u_camera_to_center_distance:Y.cameraToCenterDistance,u_scale_with_map:+(j.paint.get("circle-pitch-scale")==="map"),u_matrix:H.translatePosMatrix(O.posMatrix,P,j.paint.get("circle-translate"),j.paint.get("circle-translate-anchor")),u_pitch_with_map:+te,u_device_pixel_ratio:H.pixelRatio,u_extrude_scale:de}},qt=(H,O)=>({u_matrix:O,u_pixel_extrude_scale:[1/H.width,1/H.height]}),ra=(H,O,P)=>({u_matrix:H,u_inv_matrix:O,u_camera_to_center_distance:P.cameraToCenterDistance,u_viewport_size:[P.width,P.height]}),sa=(H,O,P=1)=>({u_matrix:H,u_color:O,u_overlay:0,u_overlay_scale:P}),Ia=H=>({u_matrix:H}),Ma=(H,O,P,j)=>({u_matrix:H,u_extrude_scale:yt(O,1,P),u_intensity:j}),$a=(H,O,P,j)=>{const Y=n.H();n.aQ(Y,0,H.width,H.height,0,0,1);const te=H.context.gl;return{u_matrix:Y,u_world:[te.drawingBufferWidth,te.drawingBufferHeight],u_image:P,u_color_ramp:j,u_opacity:O.paint.get("heatmap-opacity")}},Pa=(H,O,P,j)=>{const Y=P.paint.get("hillshade-shadow-color"),te=P.paint.get("hillshade-highlight-color"),de=P.paint.get("hillshade-accent-color");let pe=P.paint.get("hillshade-illumination-direction")*(Math.PI/180);P.paint.get("hillshade-illumination-anchor")==="viewport"&&(pe-=H.transform.angle);const Ae=!H.options.moving;return{u_matrix:j?j.posMatrix:H.transform.calculatePosMatrix(O.tileID.toUnwrapped(),Ae),u_image:0,u_latrange:na(0,O.tileID),u_light:[P.paint.get("hillshade-exaggeration"),pe],u_shadow:Y,u_highlight:te,u_accent:de}},Sa=(H,O)=>{const P=O.stride,j=n.H();return n.aQ(j,0,n.X,-n.X,0,0,1),n.J(j,j,[0,-n.X,0]),{u_matrix:j,u_image:1,u_dimension:[P,P],u_zoom:H.overscaledZ,u_unpack:O.getUnpackVector()}};function na(H,O){const P=Math.pow(2,O.canonical.z),j=O.canonical.y;return[new n.Z(0,j/P).toLngLat().lat,new n.Z(0,(j+1)/P).toLngLat().lat]}const ea=(H,O,P,j)=>{const Y=H.transform;return{u_matrix:an(H,O,P,j),u_ratio:1/yt(O,1,Y.zoom),u_device_pixel_ratio:H.pixelRatio,u_units_to_pixels:[1/Y.pixelsToGLUnits[0],1/Y.pixelsToGLUnits[1]]}},ga=(H,O,P,j,Y)=>n.e(ea(H,O,P,Y),{u_image:0,u_image_height:j}),Va=(H,O,P,j,Y)=>{const te=H.transform,de=tn(O,te);return{u_matrix:an(H,O,P,Y),u_texsize:O.imageAtlasTexture.size,u_ratio:1/yt(O,1,te.zoom),u_device_pixel_ratio:H.pixelRatio,u_image:0,u_scale:[de,j.fromScale,j.toScale],u_fade:j.t,u_units_to_pixels:[1/te.pixelsToGLUnits[0],1/te.pixelsToGLUnits[1]]}},en=(H,O,P,j,Y,te)=>{const de=H.transform,pe=H.lineAtlas,Ae=tn(O,de),Be=P.layout.get("line-cap")==="round",Ge=pe.getDash(j.from,Be),qe=pe.getDash(j.to,Be),at=Ge.width*Y.fromScale,lt=qe.width*Y.toScale;return n.e(ea(H,O,P,te),{u_patternscale_a:[Ae/at,-Ge.height/2],u_patternscale_b:[Ae/lt,-qe.height/2],u_sdfgamma:pe.width/(256*Math.min(at,lt)*H.pixelRatio)/2,u_image:0,u_tex_y_a:Ge.y,u_tex_y_b:qe.y,u_mix:Y.t})};function tn(H,O){return 1/yt(H,1,O.tileZoom)}function an(H,O,P,j){return H.translatePosMatrix(j?j.posMatrix:O.tileID.posMatrix,O,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}const _n=(H,O,P,j,Y)=>{return{u_matrix:H,u_tl_parent:O,u_scale_parent:P,u_buffer_scale:1,u_fade_t:j.mix,u_opacity:j.opacity*Y.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Y.paint.get("raster-brightness-min"),u_brightness_high:Y.paint.get("raster-brightness-max"),u_saturation_factor:(de=Y.paint.get("raster-saturation"),de>0?1-1/(1.001-de):-de),u_contrast_factor:(te=Y.paint.get("raster-contrast"),te>0?1/(1-te):1+te),u_spin_weights:mn(Y.paint.get("raster-hue-rotate"))};var te,de};function mn(H){H*=Math.PI/180;const O=Math.sin(H),P=Math.cos(H);return[(2*P+1)/3,(-Math.sqrt(3)*O-P+1)/3,(Math.sqrt(3)*O-P+1)/3]}const wn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt)=>{const ft=de.transform;return{u_is_size_zoom_constant:+(H==="constant"||H==="source"),u_is_size_feature_constant:+(H==="constant"||H==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:ft.cameraToCenterDistance,u_pitch:ft.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:ft.width/ft.height,u_fade_change:de.options.fadeDuration?de.symbolFadeChange:1,u_matrix:pe,u_label_plane_matrix:Ae,u_coord_matrix:Be,u_is_text:+qe,u_pitch_with_map:+j,u_is_along_line:Y,u_is_variable_anchor:te,u_texsize:at,u_texture:0,u_translation:Ge,u_pitched_scale:lt}},pn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt,ft)=>{const kt=de.transform;return n.e(wn(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,ft),{u_gamma_scale:j?Math.cos(kt._pitch)*kt.cameraToCenterDistance:1,u_device_pixel_ratio:de.pixelRatio,u_is_halo:+lt})},yn=(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt)=>n.e(pn(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,!0,qe,!0,lt),{u_texsize_icon:at,u_texture_icon:1}),Nn=(H,O,P)=>({u_matrix:H,u_opacity:O,u_color:P}),qn=(H,O,P,j,Y,te)=>n.e(function(de,pe,Ae,Be){const Ge=Ae.imageManager.getPattern(de.from.toString()),qe=Ae.imageManager.getPattern(de.to.toString()),{width:at,height:lt}=Ae.imageManager.getPixelSize(),ft=Math.pow(2,Be.tileID.overscaledZ),kt=Be.tileSize*Math.pow(2,Ae.transform.tileZoom)/ft,Nt=kt*(Be.tileID.canonical.x+Be.tileID.wrap*ft),Mt=kt*Be.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ge.tl,u_pattern_br_a:Ge.br,u_pattern_tl_b:qe.tl,u_pattern_br_b:qe.br,u_texsize:[at,lt],u_mix:pe.t,u_pattern_size_a:Ge.displaySize,u_pattern_size_b:qe.displaySize,u_scale_a:pe.fromScale,u_scale_b:pe.toScale,u_tile_units_to_pixels:1/yt(Be,1,Ae.transform.tileZoom),u_pixel_coord_upper:[Nt>>16,Mt>>16],u_pixel_coord_lower:[65535&Nt,65535&Mt]}}(j,te,P,Y),{u_matrix:H,u_opacity:O}),Dn={fillExtrusion:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_opacity:new n.aJ(H,O.u_opacity)}),fillExtrusionPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_lightpos:new n.aO(H,O.u_lightpos),u_lightintensity:new n.aJ(H,O.u_lightintensity),u_lightcolor:new n.aO(H,O.u_lightcolor),u_vertical_gradient:new n.aJ(H,O.u_vertical_gradient),u_height_factor:new n.aJ(H,O.u_height_factor),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade),u_opacity:new n.aJ(H,O.u_opacity)}),fill:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),fillPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),fillOutline:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world)}),fillOutlinePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_texsize:new n.aP(H,O.u_texsize),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),circle:(H,O)=>({u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_scale_with_map:new n.aI(H,O.u_scale_with_map),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_extrude_scale:new n.aP(H,O.u_extrude_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_matrix:new n.aK(H,O.u_matrix)}),collisionBox:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_pixel_extrude_scale:new n.aP(H,O.u_pixel_extrude_scale)}),collisionCircle:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_inv_matrix:new n.aK(H,O.u_inv_matrix),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_viewport_size:new n.aP(H,O.u_viewport_size)}),debug:(H,O)=>({u_color:new n.aM(H,O.u_color),u_matrix:new n.aK(H,O.u_matrix),u_overlay:new n.aI(H,O.u_overlay),u_overlay_scale:new n.aJ(H,O.u_overlay_scale)}),clippingMask:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix)}),heatmap:(H,O)=>({u_extrude_scale:new n.aJ(H,O.u_extrude_scale),u_intensity:new n.aJ(H,O.u_intensity),u_matrix:new n.aK(H,O.u_matrix)}),heatmapTexture:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_world:new n.aP(H,O.u_world),u_image:new n.aI(H,O.u_image),u_color_ramp:new n.aI(H,O.u_color_ramp),u_opacity:new n.aJ(H,O.u_opacity)}),hillshade:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_latrange:new n.aP(H,O.u_latrange),u_light:new n.aP(H,O.u_light),u_shadow:new n.aM(H,O.u_shadow),u_highlight:new n.aM(H,O.u_highlight),u_accent:new n.aM(H,O.u_accent)}),hillshadePrepare:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_image:new n.aI(H,O.u_image),u_dimension:new n.aP(H,O.u_dimension),u_zoom:new n.aJ(H,O.u_zoom),u_unpack:new n.aL(H,O.u_unpack)}),line:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels)}),lineGradient:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_image:new n.aI(H,O.u_image),u_image_height:new n.aJ(H,O.u_image_height)}),linePattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texsize:new n.aP(H,O.u_texsize),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_image:new n.aI(H,O.u_image),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_scale:new n.aO(H,O.u_scale),u_fade:new n.aJ(H,O.u_fade)}),lineSDF:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ratio:new n.aJ(H,O.u_ratio),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_units_to_pixels:new n.aP(H,O.u_units_to_pixels),u_patternscale_a:new n.aP(H,O.u_patternscale_a),u_patternscale_b:new n.aP(H,O.u_patternscale_b),u_sdfgamma:new n.aJ(H,O.u_sdfgamma),u_image:new n.aI(H,O.u_image),u_tex_y_a:new n.aJ(H,O.u_tex_y_a),u_tex_y_b:new n.aJ(H,O.u_tex_y_b),u_mix:new n.aJ(H,O.u_mix)}),raster:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_tl_parent:new n.aP(H,O.u_tl_parent),u_scale_parent:new n.aJ(H,O.u_scale_parent),u_buffer_scale:new n.aJ(H,O.u_buffer_scale),u_fade_t:new n.aJ(H,O.u_fade_t),u_opacity:new n.aJ(H,O.u_opacity),u_image0:new n.aI(H,O.u_image0),u_image1:new n.aI(H,O.u_image1),u_brightness_low:new n.aJ(H,O.u_brightness_low),u_brightness_high:new n.aJ(H,O.u_brightness_high),u_saturation_factor:new n.aJ(H,O.u_saturation_factor),u_contrast_factor:new n.aJ(H,O.u_contrast_factor),u_spin_weights:new n.aO(H,O.u_spin_weights)}),symbolIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolSDF:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texture:new n.aI(H,O.u_texture),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),symbolTextAndIcon:(H,O)=>({u_is_size_zoom_constant:new n.aI(H,O.u_is_size_zoom_constant),u_is_size_feature_constant:new n.aI(H,O.u_is_size_feature_constant),u_size_t:new n.aJ(H,O.u_size_t),u_size:new n.aJ(H,O.u_size),u_camera_to_center_distance:new n.aJ(H,O.u_camera_to_center_distance),u_pitch:new n.aJ(H,O.u_pitch),u_rotate_symbol:new n.aI(H,O.u_rotate_symbol),u_aspect_ratio:new n.aJ(H,O.u_aspect_ratio),u_fade_change:new n.aJ(H,O.u_fade_change),u_matrix:new n.aK(H,O.u_matrix),u_label_plane_matrix:new n.aK(H,O.u_label_plane_matrix),u_coord_matrix:new n.aK(H,O.u_coord_matrix),u_is_text:new n.aI(H,O.u_is_text),u_pitch_with_map:new n.aI(H,O.u_pitch_with_map),u_is_along_line:new n.aI(H,O.u_is_along_line),u_is_variable_anchor:new n.aI(H,O.u_is_variable_anchor),u_texsize:new n.aP(H,O.u_texsize),u_texsize_icon:new n.aP(H,O.u_texsize_icon),u_texture:new n.aI(H,O.u_texture),u_texture_icon:new n.aI(H,O.u_texture_icon),u_gamma_scale:new n.aJ(H,O.u_gamma_scale),u_device_pixel_ratio:new n.aJ(H,O.u_device_pixel_ratio),u_is_halo:new n.aI(H,O.u_is_halo),u_translation:new n.aP(H,O.u_translation),u_pitched_scale:new n.aJ(H,O.u_pitched_scale)}),background:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_color:new n.aM(H,O.u_color)}),backgroundPattern:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_opacity:new n.aJ(H,O.u_opacity),u_image:new n.aI(H,O.u_image),u_pattern_tl_a:new n.aP(H,O.u_pattern_tl_a),u_pattern_br_a:new n.aP(H,O.u_pattern_br_a),u_pattern_tl_b:new n.aP(H,O.u_pattern_tl_b),u_pattern_br_b:new n.aP(H,O.u_pattern_br_b),u_texsize:new n.aP(H,O.u_texsize),u_mix:new n.aJ(H,O.u_mix),u_pattern_size_a:new n.aP(H,O.u_pattern_size_a),u_pattern_size_b:new n.aP(H,O.u_pattern_size_b),u_scale_a:new n.aJ(H,O.u_scale_a),u_scale_b:new n.aJ(H,O.u_scale_b),u_pixel_coord_upper:new n.aP(H,O.u_pixel_coord_upper),u_pixel_coord_lower:new n.aP(H,O.u_pixel_coord_lower),u_tile_units_to_pixels:new n.aJ(H,O.u_tile_units_to_pixels)}),terrain:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_ele_delta:new n.aJ(H,O.u_ele_delta),u_fog_matrix:new n.aK(H,O.u_fog_matrix),u_fog_color:new n.aM(H,O.u_fog_color),u_fog_ground_blend:new n.aJ(H,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new n.aJ(H,O.u_fog_ground_blend_opacity),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon_fog_blend:new n.aJ(H,O.u_horizon_fog_blend)}),terrainDepth:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),terrainCoords:(H,O)=>({u_matrix:new n.aK(H,O.u_matrix),u_texture:new n.aI(H,O.u_texture),u_terrain_coords_id:new n.aJ(H,O.u_terrain_coords_id),u_ele_delta:new n.aJ(H,O.u_ele_delta)}),sky:(H,O)=>({u_sky_color:new n.aM(H,O.u_sky_color),u_horizon_color:new n.aM(H,O.u_horizon_color),u_horizon:new n.aJ(H,O.u_horizon),u_sky_horizon_blend:new n.aJ(H,O.u_sky_horizon_blend)})};class En{constructor(O,P,j){this.context=O;const Y=O.gl;this.buffer=Y.createBuffer(),this.dynamicDraw=!!j,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Y.bufferData(Y.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?Y.DYNAMIC_DRAW:Y.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){const P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,O.arrayBuffer)}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const Vn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kn{constructor(O,P,j,Y){this.length=P.length,this.attributes=j,this.itemSize=P.bytesPerElement,this.dynamicDraw=Y,this.context=O;const te=O.gl;this.buffer=te.createBuffer(),O.bindVertexBuffer.set(this.buffer),te.bufferData(te.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?te.DYNAMIC_DRAW:te.STATIC_DRAW),this.dynamicDraw||delete P.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,P){for(let j=0;j<this.attributes.length;j++){const Y=this.attributes[j],te=P.attributes[Y.name];te!==void 0&&O.enableVertexAttribArray(te)}}setVertexAttribPointers(O,P,j){for(let Y=0;Y<this.attributes.length;Y++){const te=this.attributes[Y],de=P.attributes[te.name];de!==void 0&&O.vertexAttribPointer(de,te.components,O[Vn[te.type]],!1,this.itemSize,te.offset+this.itemSize*(j||0))}}destroy(){const O=this.context.gl;this.buffer&&(O.deleteBuffer(this.buffer),delete this.buffer)}}const wr=new WeakMap;function li(H){var O;if(wr.has(H))return wr.get(H);{const P=(O=H.getParameter(H.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return wr.set(H,P),P}}class Vr{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class qi extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class gi extends Vr{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class Ni extends Vr{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class mo extends Vr{getDefault(){return[!0,!0,!0,!0]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class Zr extends Vr{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class ei extends Vr{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class Co extends Vr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const P=this.current;(O.func!==P.func||O.ref!==P.ref||O.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class Ki extends Vr{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class bo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=O,this.dirty=!1}}class xs extends Vr{getDefault(){return[0,1]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class lo extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=O,this.dirty=!1}}class Ds extends Vr{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Rs extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.BLEND):P.disable(P.BLEND),this.current=O,this.dirty=!1}}class el extends Vr{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class To extends Vr{getDefault(){return n.aN.transparent}set(O){const P=this.current;(O.r!==P.r||O.g!==P.g||O.b!==P.b||O.a!==P.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class ws extends Vr{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class ls extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;O?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=O,this.dirty=!1}}class pi extends Vr{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class Hi extends Vr{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class tl extends Vr{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Ns extends Vr{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class fs extends Vr{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const P=this.current;(O[0]!==P[0]||O[1]!==P[1]||O[2]!==P[2]||O[3]!==P[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class vl extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class ks extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class _l extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindTexture(P.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class al extends Vr{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class nl extends Vr{getDefault(){return null}set(O){const P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class Po extends Vr{getDefault(){return null}set(O){var P;if(O===this.current&&!this.dirty)return;const j=this.gl;li(j)?j.bindVertexArray(O):(P=j.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class Gc extends Vr{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class zc extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class Vl extends Vr{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class ad extends Vr{constructor(O,P){super(O),this.context=O,this.parent=P}getDefault(){return null}}class sd extends ad{setDirty(){this.dirty=!0}set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,O,0),this.current=O,this.dirty=!1}}class Vs extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class ld extends ad{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class au{constructor(O,P,j,Y,te){this.context=O,this.width=P,this.height=j;const de=O.gl,pe=this.framebuffer=de.createFramebuffer();if(this.colorAttachment=new sd(O,pe),Y)this.depthAttachment=te?new ld(O,pe):new Vs(O,pe);else if(te)throw new Error("Stencil cannot be set without depth");if(de.checkFramebufferStatus(de.FRAMEBUFFER)!==de.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,P=this.colorAttachment.get();if(P&&O.deleteTexture(P),this.depthAttachment){const j=this.depthAttachment.get();j&&O.deleteRenderbuffer(j)}O.deleteFramebuffer(this.framebuffer)}}class Cs{constructor(O,P,j){this.blendFunction=O,this.blendColor=P,this.mask=j}}Cs.Replace=[1,0],Cs.disabled=new Cs(Cs.Replace,n.aN.transparent,[!1,!1,!1,!1]),Cs.unblended=new Cs(Cs.Replace,n.aN.transparent,[!0,!0,!0,!0]),Cs.alphaBlended=new Cs([1,771],n.aN.transparent,[!0,!0,!0,!0]);class nc{constructor(O){var P,j;if(this.gl=O,this.clearColor=new qi(this),this.clearDepth=new gi(this),this.clearStencil=new Ni(this),this.colorMask=new mo(this),this.depthMask=new Zr(this),this.stencilMask=new ei(this),this.stencilFunc=new Co(this),this.stencilOp=new Ki(this),this.stencilTest=new bo(this),this.depthRange=new xs(this),this.depthTest=new lo(this),this.depthFunc=new Ds(this),this.blend=new Rs(this),this.blendFunc=new el(this),this.blendColor=new To(this),this.blendEquation=new ws(this),this.cullFace=new ls(this),this.cullFaceSide=new pi(this),this.frontFace=new Hi(this),this.program=new tl(this),this.activeTexture=new Ns(this),this.viewport=new fs(this),this.bindFramebuffer=new vl(this),this.bindRenderbuffer=new ks(this),this.bindTexture=new _l(this),this.bindVertexBuffer=new al(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Gc(this),this.pixelStoreUnpackPremultiplyAlpha=new zc(this),this.pixelStoreUnpackFlipY=new Vl(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),li(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Y=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=O.RGBA16F)!==null&&P!==void 0?P:Y==null?void 0:Y.RGBA16F_EXT,this.RGB16F=(j=O.RGB16F)!==null&&j!==void 0?j:Y==null?void 0:Y.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Y=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Y==null?void 0:Y.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(O,P){return new En(this,O,P)}createVertexBuffer(O,P,j){return new Kn(this,O,P,j)}createRenderbuffer(O,P,j){const Y=this.gl,te=Y.createRenderbuffer();return this.bindRenderbuffer.set(te),Y.renderbufferStorage(Y.RENDERBUFFER,O,P,j),this.bindRenderbuffer.set(null),te}createFramebuffer(O,P,j,Y){return new au(this,O,P,j,Y)}clear({color:O,depth:P,stencil:j}){const Y=this.gl;let te=0;O&&(te|=Y.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&(te|=Y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),j!==void 0&&(te|=Y.STENCIL_BUFFER_BIT,this.clearStencil.set(j),this.stencilMask.set(255)),Y.clear(te)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){n.aF(O.blendFunction,Cs.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return li(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var P;return li(this.gl)?this.gl.deleteVertexArray(O):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class bi{constructor(O,P,j){this.func=O,this.mask=P,this.range=j}}bi.ReadOnly=!1,bi.ReadWrite=!0,bi.disabled=new bi(519,bi.ReadOnly,[0,1]);const Jl=7680;class Qi{constructor(O,P,j,Y,te,de){this.test=O,this.ref=P,this.mask=j,this.fail=Y,this.depthFail=te,this.pass=de}}Qi.disabled=new Qi({func:519,mask:0},0,0,Jl,Jl,Jl);class ao{constructor(O,P,j){this.enable=O,this.mode=P,this.frontFace=j}}let $s;function Do(H,O,P,j,Y){const te=H.context,de=te.gl,pe=H.useProgram("collisionBox"),Ae=[];let Be=0,Ge=0;for(let Nt=0;Nt<j.length;Nt++){const Mt=j[Nt],Gt=O.getTile(Mt).getBucket(P);if(!Gt)continue;const zt=Y?Gt.textCollisionBox:Gt.iconCollisionBox,Xt=Gt.collisionCircleArray;if(Xt.length>0){const Zt=n.H();n.aR(Zt,Gt.placementInvProjMatrix,H.transform.glCoordMatrix),n.aR(Zt,Zt,Gt.placementViewportMatrix),Ae.push({circleArray:Xt,circleOffset:Ge,transform:Mt.posMatrix,invTransform:Zt,coord:Mt}),Be+=Xt.length/4,Ge=Be}zt&&pe.draw(te,de.LINES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,qt(H.transform,Mt.posMatrix),H.style.map.terrain&&H.style.map.terrain.getTerrainData(Mt),P.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,H.transform.zoom,null,null,zt.collisionVertexBuffer)}if(!Y||!Ae.length)return;const qe=H.useProgram("collisionCircle"),at=new n.aS;at.resize(4*Be),at._trim();let lt=0;for(const Nt of Ae)for(let Mt=0;Mt<Nt.circleArray.length/4;Mt++){const Gt=4*Mt,zt=Nt.circleArray[Gt+0],Xt=Nt.circleArray[Gt+1],Zt=Nt.circleArray[Gt+2],Yt=Nt.circleArray[Gt+3];at.emplace(lt++,zt,Xt,Zt,Yt,0),at.emplace(lt++,zt,Xt,Zt,Yt,1),at.emplace(lt++,zt,Xt,Zt,Yt,2),at.emplace(lt++,zt,Xt,Zt,Yt,3)}(!$s||$s.length<2*Be)&&($s=function(Nt){const Mt=2*Nt,Gt=new n.aU;Gt.resize(Mt),Gt._trim();for(let zt=0;zt<Mt;zt++){const Xt=6*zt;Gt.uint16[Xt+0]=4*zt+0,Gt.uint16[Xt+1]=4*zt+1,Gt.uint16[Xt+2]=4*zt+2,Gt.uint16[Xt+3]=4*zt+2,Gt.uint16[Xt+4]=4*zt+3,Gt.uint16[Xt+5]=4*zt+0}return Gt}(Be));const ft=te.createIndexBuffer($s,!0),kt=te.createVertexBuffer(at,n.aT.members,!0);for(const Nt of Ae){const Mt=ra(Nt.transform,Nt.invTransform,H.transform);qe.draw(te,de.TRIANGLES,bi.disabled,Qi.disabled,H.colorModeForRenderPass(),ao.disabled,Mt,H.style.map.terrain&&H.style.map.terrain.getTerrainData(Nt.coord),P.id,kt,ft,n.a0.simpleSegment(0,2*Nt.circleOffset,Nt.circleArray.length,Nt.circleArray.length/2),null,H.transform.zoom,null,null,null)}kt.destroy(),ft.destroy()}ao.disabled=new ao(!1,1029,2305),ao.backCCW=new ao(!0,1029,2305);const Oc=n.ao(new Float32Array(16));function bl(H,O,P,j,Y){if(H.renderPass!=="translucent")return;const te=Qi.disabled,de=H.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(pe,Ae,Be,Ge,qe,at,lt,ft,kt){const Nt=Ae.transform,Mt=Ea(),Gt=qe==="map",zt=at==="map";for(const Xt of pe){const Zt=Ge.getTile(Xt),Yt=Zt.getBucket(Be);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const ya=Yt.textSizeData,Ca=n.ah(ya,Nt.zoom),La=yt(Zt,1,Ae.transform.zoom),ja=It(Xt.posMatrix,zt,Gt,Ae.transform,La),Wa=Be.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(Ca){const on=Math.pow(2,Nt.zoom-Zt.tileID.overscaledZ),Tn=Ae.style.map.terrain?(Sn,kn)=>Ae.style.map.terrain.getElevation(Xt,Sn,kn):null,Qa=Mt.translatePosition(Nt,Zt,lt,ft);zo(Yt,Gt,zt,kt,Nt,ja,Xt.posMatrix,on,Ca,Wa,Mt,Qa,Xt.toUnwrapped(),Tn)}}}(j,H,P,O,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),Y),P.paint.get("icon-opacity").constantOr(1)!==0&&rc(H,O,P,j,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),te,de),P.paint.get("text-opacity").constantOr(1)!==0&&rc(H,O,P,j,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),te,de),O.map.showCollisionBoxes&&(Do(H,O,P,j,!0),Do(H,O,P,j,!1))}function cs(H,O,P,j,Y,te){const{horizontalAlign:de,verticalAlign:pe}=n.av(H),Ae=-(de-.5)*O,Be=-(pe-.5)*P;return new n.P((Ae/Y+j[0])*te,(Be/Y+j[1])*te)}function ms(H,O,P,j,Y,te){const de=O.tileAnchorPoint.add(new n.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let pe=j.mult(te);return P||(pe=pe.rotate(-Y)),Ft(de.add(pe),O.labelPlaneMatrix,O.getElevation).point}if(P){const pe=We(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(H),Ae=Math.atan(pe.y/pe.x)+(pe.x<0?Math.PI:0);return H.add(j.rotate(Ae))}return H.add(j)}function zo(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe,at,lt){const ft=H.text.placedSymbolArray,kt=H.text.dynamicLayoutVertexArray,Nt=H.icon.dynamicLayoutVertexArray,Mt={};kt.clear();for(let Gt=0;Gt<ft.length;Gt++){const zt=ft.get(Gt),Xt=H.allowVerticalPlacement&&!zt.placedOrientation,Zt=zt.hidden||!zt.crossTileID||Xt?null:j[zt.crossTileID];if(Zt){const Yt=new n.P(zt.anchorX,zt.anchorY),ya={getElevation:lt,width:Y.width,height:Y.height,labelPlaneMatrix:te,lineVertexArray:null,pitchWithMap:P,projection:Ge,projectionCache:null,tileAnchorPoint:Yt,translation:qe,unwrappedTileID:at},Ca=P?Ft(Yt,de,lt):We(Yt.x,Yt.y,ya),La=ot(Y.cameraToCenterDistance,Ca.signedDistanceFromCamera);let ja=n.aj(H.textSizeData,Ae,zt)*La/n.aq;P&&(ja*=H.tilePixelRatio/pe);const{width:Wa,height:on,anchor:Tn,textOffset:Qa,textBoxScale:Sn}=Zt,kn=cs(Tn,Wa,on,Qa,Sn,ja),Ln=Ge.getPitchedTextCorrection(Y,Yt.add(new n.P(qe[0],qe[1])),at),fn=ms(Ca.point,ya,O,kn,Y.angle,Ln),Mn=H.allowVerticalPlacement&&zt.placedOrientation===n.ai.vertical?Math.PI/2:0;for(let Wn=0;Wn<zt.numGlyphs;Wn++)n.ak(kt,fn,Mn);Be&&zt.associatedIconIndex>=0&&(Mt[zt.associatedIconIndex]={shiftedAnchor:fn,angle:Mn})}else Bt(zt.numGlyphs,kt)}if(Be){Nt.clear();const Gt=H.icon.placedSymbolArray;for(let zt=0;zt<Gt.length;zt++){const Xt=Gt.get(zt);if(Xt.hidden)Bt(Xt.numGlyphs,Nt);else{const Zt=Mt[zt];if(Zt)for(let Yt=0;Yt<Xt.numGlyphs;Yt++)n.ak(Nt,Zt.shiftedAnchor,Zt.angle);else Bt(Xt.numGlyphs,Nt)}}H.icon.dynamicLayoutVertexBuffer.updateData(Nt)}H.text.dynamicLayoutVertexBuffer.updateData(kt)}function Gr(H,O,P){return P.iconsInText&&O?"symbolTextAndIcon":H?"symbolSDF":"symbolIcon"}function rc(H,O,P,j,Y,te,de,pe,Ae,Be,Ge,qe){const at=H.context,lt=at.gl,ft=H.transform,kt=Ea(),Nt=pe==="map",Mt=Ae==="map",Gt=pe!=="viewport"&&P.layout.get("symbol-placement")!=="point",zt=Nt&&!Mt&&!Gt,Xt=!Mt&&Gt,Zt=!P.layout.get("symbol-sort-key").isConstant();let Yt=!1;const ya=H.depthModeForSublayer(0,bi.ReadOnly),Ca=P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"),La=[],ja=kt.getCircleRadiusCorrection(ft);for(const Wa of j){const on=O.getTile(Wa),Tn=on.getBucket(P);if(!Tn)continue;const Qa=Y?Tn.text:Tn.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const Sn=Qa.programConfigurations.get(P.id),kn=Y||Tn.sdfIcons,Ln=Y?Tn.textSizeData:Tn.iconSizeData,fn=Mt||ft.pitch!==0,Mn=H.useProgram(Gr(kn,Y,Tn),Sn),Wn=n.ah(Ln,ft.zoom),In=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Wa);let Hn,Jn,kr,lr,Fr=[0,0],Rr=null;if(Y){if(Jn=on.glyphAtlasTexture,kr=lt.LINEAR,Hn=on.glyphAtlasTexture.size,Tn.iconsInText){Fr=on.imageAtlasTexture.size,Rr=on.imageAtlasTexture;const Lr=Ln.kind==="composite"||Ln.kind==="camera";lr=fn||H.options.rotating||H.options.zooming||Lr?lt.LINEAR:lt.NEAREST}}else{const Lr=P.layout.get("icon-size").constantOr(0)!==1||Tn.iconsNeedLinear;Jn=on.imageAtlasTexture,kr=kn||H.options.rotating||H.options.zooming||Lr||fn?lt.LINEAR:lt.NEAREST,Hn=on.imageAtlasTexture.size}const qr=yt(on,1,H.transform.zoom),fi=Xt?Wa.posMatrix:Oc,Wi=It(fi,Mt,Nt,H.transform,qr),Vi=Ot(fi,Mt,Nt,H.transform,qr),to=Ot(Wa.posMatrix,Mt,Nt,H.transform,qr),hi=kt.translatePosition(H.transform,on,te,de),Ur=Ca&&Tn.hasTextData(),Si=P.layout.get("icon-text-fit")!=="none"&&Ur&&Tn.hasIconData();if(Gt){const Lr=H.style.map.terrain?(Fo,bs)=>H.style.map.terrain.getElevation(Wa,Fo,bs):null,_s=P.layout.get("text-rotation-alignment")==="map";vt(Tn,Wa.posMatrix,H,Y,Wi,to,Mt,Be,_s,kt,Wa.toUnwrapped(),ft.width,ft.height,hi,Lr)}const ci=Wa.posMatrix,Qr=Y&&Ca||Si,vi=Gt||Qr?Oc:Wi,ki=Vi,di=kn&&P.paint.get(Y?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let dl;dl=kn?Tn.iconsInText?yn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Hn,Fr,ja):pn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,!0,ja):wn(Ln.kind,Wn,zt,Mt,Gt,Qr,H,ci,vi,ki,hi,Y,Hn,ja);const So={program:Mn,buffers:Qa,uniformValues:dl,atlasTexture:Jn,atlasTextureIcon:Rr,atlasInterpolation:kr,atlasInterpolationIcon:lr,isSDF:kn,hasHalo:di};if(Zt&&Tn.canOverlap){Yt=!0;const Lr=Qa.segments.get();for(const _s of Lr)La.push({segments:new n.a0([_s]),sortKey:_s.sortKey,state:So,terrainData:In})}else La.push({segments:Qa.segments,sortKey:0,state:So,terrainData:In})}Yt&&La.sort((Wa,on)=>Wa.sortKey-on.sortKey);for(const Wa of La){const on=Wa.state;if(at.activeTexture.set(lt.TEXTURE0),on.atlasTexture.bind(on.atlasInterpolation,lt.CLAMP_TO_EDGE),on.atlasTextureIcon&&(at.activeTexture.set(lt.TEXTURE1),on.atlasTextureIcon&&on.atlasTextureIcon.bind(on.atlasInterpolationIcon,lt.CLAMP_TO_EDGE)),on.isSDF){const Tn=on.uniformValues;on.hasHalo&&(Tn.u_is_halo=1,pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,Tn,Wa.terrainData)),Tn.u_is_halo=0}pd(on.buffers,Wa.segments,P,H,on.program,ya,Ge,qe,on.uniformValues,Wa.terrainData)}}function pd(H,O,P,j,Y,te,de,pe,Ae,Be){const Ge=j.context,qe=Ge.gl;Y.draw(Ge,qe.TRIANGLES,te,de,pe,ao.disabled,Ae,Be,P.id,H.layoutVertexBuffer,H.indexBuffer,O,P.paint,j.transform.zoom,H.programConfigurations.get(P.id),H.dynamicLayoutVertexBuffer,H.opacityVertexBuffer)}function ic(H,O,P,j){if(P.paint.get("heatmap-opacity")!==0)if(H.renderPass==="offscreen"){const Y=H.context,te=Y.gl,de=Qi.disabled,pe=new Cs([te.ONE,te.ONE],n.aN.transparent,[!0,!0,!0,!0]);(function(Ae,Be,Ge){const qe=Ae.gl;Ae.activeTexture.set(qe.TEXTURE1),Ae.viewport.set([0,0,Be.width/4,Be.height/4]);let at=Ge.heatmapFbo;if(at)qe.bindTexture(qe.TEXTURE_2D,at.colorAttachment.get()),Ae.bindFramebuffer.set(at.framebuffer);else{const lt=qe.createTexture();qe.bindTexture(qe.TEXTURE_2D,lt),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_S,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_WRAP_T,qe.CLAMP_TO_EDGE),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MIN_FILTER,qe.LINEAR),qe.texParameteri(qe.TEXTURE_2D,qe.TEXTURE_MAG_FILTER,qe.LINEAR),at=Ge.heatmapFbo=Ae.createFramebuffer(Be.width/4,Be.height/4,!1,!1),function(ft,kt,Nt,Mt){var Gt,zt;const Xt=ft.gl,Zt=(Gt=ft.HALF_FLOAT)!==null&&Gt!==void 0?Gt:Xt.UNSIGNED_BYTE,Yt=(zt=ft.RGBA16F)!==null&&zt!==void 0?zt:Xt.RGBA;Xt.texImage2D(Xt.TEXTURE_2D,0,Yt,kt.width/4,kt.height/4,0,Xt.RGBA,Zt,null),Mt.colorAttachment.set(Nt)}(Ae,Be,lt,at)}})(Y,H,P),Y.clear({color:n.aN.transparent});for(let Ae=0;Ae<j.length;Ae++){const Be=j[Ae];if(O.hasRenderableParent(Be))continue;const Ge=O.getTile(Be),qe=Ge.getBucket(P);if(!qe)continue;const at=qe.programConfigurations.get(P.id),lt=H.useProgram("heatmap",at),{zoom:ft}=H.transform;lt.draw(Y,te.TRIANGLES,bi.disabled,de,pe,ao.disabled,Ma(Be.posMatrix,Ge,ft,P.paint.get("heatmap-intensity")),null,P.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,P.paint,H.transform.zoom,at)}Y.viewport.set([0,0,H.width,H.height])}else H.renderPass==="translucent"&&(H.context.setColorMode(H.colorModeForRenderPass()),function(Y,te){const de=Y.context,pe=de.gl,Ae=te.heatmapFbo;if(!Ae)return;de.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,Ae.colorAttachment.get()),de.activeTexture.set(pe.TEXTURE1);let Be=te.colorRampTexture;Be||(Be=te.colorRampTexture=new I(de,te.colorRamp,pe.RGBA)),Be.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Y.useProgram("heatmapTexture").draw(de,pe.TRIANGLES,bi.disabled,Qi.disabled,Y.colorModeForRenderPass(),ao.disabled,$a(Y,te,0,1),null,te.id,Y.viewportBuffer,Y.quadTriangleIndexBuffer,Y.viewportSegments,te.paint,Y.transform.zoom)}(H,P))}function $l(H,O,P,j,Y){if(!P||!j||!j.imageAtlas)return;const te=j.imageAtlas.patternPositions;let de=te[P.to.toString()],pe=te[P.from.toString()];if(!de&&pe&&(de=pe),!pe&&de&&(pe=de),!de||!pe){const Ae=Y.getPaintProperty(O);de=te[Ae],pe=te[Ae]}de&&pe&&H.setConstantPatternPositions(de,pe)}function Hc(H,O,P,j,Y,te,de){const pe=H.context.gl,Ae="fill-pattern",Be=P.paint.get(Ae),Ge=Be&&Be.constantOr(1),qe=P.getCrossfadeParameters();let at,lt,ft,kt,Nt;de?(lt=Ge&&!P.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",at=pe.LINES):(lt=Ge?"fillPattern":"fill",at=pe.TRIANGLES);const Mt=Be.constantOr(null);for(const Gt of j){const zt=O.getTile(Gt);if(Ge&&!zt.patternsLoaded())continue;const Xt=zt.getBucket(P);if(!Xt)continue;const Zt=Xt.programConfigurations.get(P.id),Yt=H.useProgram(lt,Zt),ya=H.style.map.terrain&&H.style.map.terrain.getTerrainData(Gt);Ge&&(H.context.activeTexture.set(pe.TEXTURE0),zt.imageAtlasTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Zt.updatePaintBuffers(qe)),$l(Zt,Ae,Mt,zt,P);const Ca=ya?Gt:null,La=Ca?Ca.posMatrix:Gt.posMatrix,ja=H.translatePosMatrix(La,zt,P.paint.get("fill-translate"),P.paint.get("fill-translate-anchor"));if(de){kt=Xt.indexBuffer2,Nt=Xt.segments2;const Wa=[pe.drawingBufferWidth,pe.drawingBufferHeight];ft=lt==="fillOutlinePattern"&&Ge?la(ja,H,qe,zt,Wa):Rn(ja,Wa)}else kt=Xt.indexBuffer,Nt=Xt.segments,ft=Ge?Cn(ja,H,qe,zt):ln(ja);Yt.draw(H.context,at,Y,H.stencilModeForClipping(Gt),te,ao.disabled,ft,ya,P.id,Xt.layoutVertexBuffer,kt,Nt,P.paint,H.transform.zoom,Zt)}}function Wc(H,O,P,j,Y,te,de){const pe=H.context,Ae=pe.gl,Be="fill-extrusion-pattern",Ge=P.paint.get(Be),qe=Ge.constantOr(1),at=P.getCrossfadeParameters(),lt=P.paint.get("fill-extrusion-opacity"),ft=Ge.constantOr(null);for(const kt of j){const Nt=O.getTile(kt),Mt=Nt.getBucket(P);if(!Mt)continue;const Gt=H.style.map.terrain&&H.style.map.terrain.getTerrainData(kt),zt=Mt.programConfigurations.get(P.id),Xt=H.useProgram(qe?"fillExtrusionPattern":"fillExtrusion",zt);qe&&(H.context.activeTexture.set(Ae.TEXTURE0),Nt.imageAtlasTexture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE),zt.updatePaintBuffers(at)),$l(zt,Be,ft,Nt,P);const Zt=H.translatePosMatrix(kt.posMatrix,Nt,P.paint.get("fill-extrusion-translate"),P.paint.get("fill-extrusion-translate-anchor")),Yt=P.paint.get("fill-extrusion-vertical-gradient"),ya=qe?dn(Zt,H,Yt,lt,kt,at,Nt):Xa(Zt,H,Yt,lt);Xt.draw(pe,pe.gl.TRIANGLES,Y,te,de,ao.backCCW,ya,Gt,P.id,Mt.layoutVertexBuffer,Mt.indexBuffer,Mt.segments,P.paint,H.transform.zoom,zt,H.style.map.terrain&&Mt.centroidVertexBuffer)}}function Cc(H,O,P,j,Y,te,de){const pe=H.context,Ae=pe.gl,Be=P.fbo;if(!Be)return;const Ge=H.useProgram("hillshade"),qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(O);pe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,Be.colorAttachment.get());const at=qe?O:null;Ge.draw(pe,Ae.TRIANGLES,Y,te,de,ao.disabled,Pa(H,P,j,at),qe,j.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments)}function xd(H,O,P,j,Y,te){const de=H.context,pe=de.gl,Ae=O.dem;if(Ae&&Ae.data){const Be=Ae.dim,Ge=Ae.stride,qe=Ae.getPixels();if(de.activeTexture.set(pe.TEXTURE1),de.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||H.getTileTexture(Ge),O.demTexture){const lt=O.demTexture;lt.update(qe,{premultiply:!1}),lt.bind(pe.NEAREST,pe.CLAMP_TO_EDGE)}else O.demTexture=new I(de,qe,pe.RGBA,{premultiply:!1}),O.demTexture.bind(pe.NEAREST,pe.CLAMP_TO_EDGE);de.activeTexture.set(pe.TEXTURE0);let at=O.fbo;if(!at){const lt=new I(de,{width:Be,height:Be,data:null},pe.RGBA);lt.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),at=O.fbo=de.createFramebuffer(Be,Be,!0,!1),at.colorAttachment.set(lt.texture)}de.bindFramebuffer.set(at.framebuffer),de.viewport.set([0,0,Be,Be]),H.useProgram("hillshadePrepare").draw(de,pe.TRIANGLES,j,Y,te,ao.disabled,Sa(O.tileID,Ae),null,P.id,H.rasterBoundsBuffer,H.quadTriangleIndexBuffer,H.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function zs(H,O,P,j,Y,te){const de=j.paint.get("raster-fade-duration");if(!te&&de>0){const pe=l.now(),Ae=(pe-H.timeAdded)/de,Be=O?(pe-O.timeAdded)/de:-1,Ge=P.getSource(),qe=Y.coveringZoomLevel({tileSize:Ge.tileSize,roundZoom:Ge.roundZoom}),at=!O||Math.abs(O.tileID.overscaledZ-qe)>Math.abs(H.tileID.overscaledZ-qe),lt=at&&H.refreshedUponExpiration?1:n.ad(at?Ae:1-Be,0,1);return H.refreshedUponExpiration&&Ae>=1&&(H.refreshedUponExpiration=!1),O?{opacity:1,mix:1-lt}:{opacity:lt,mix:0}}return{opacity:1,mix:0}}const rl=new n.aN(1,0,0,1),il=new n.aN(0,1,0,1),ds=new n.aN(0,0,1,1),ji=new n.aN(1,0,1,1),nd=new n.aN(0,1,1,1);function Fc(H){const O=H.transform.padding;Lc(H,H.transform.height-(O.top||0),3,rl),Lc(H,O.bottom||0,3,il),xo(H,O.left||0,3,ds),xo(H,H.transform.width-(O.right||0),3,ji);const P=H.transform.centerPoint;(function(j,Y,te,de){Sc(j,Y-1,te-10,2,20,de),Sc(j,Y-10,te-1,20,2,de)})(H,P.x,H.transform.height-P.y,nd)}function Lc(H,O,P,j){Sc(H,0,O+P/2,H.transform.width,P,j)}function xo(H,O,P,j){Sc(H,O-P/2,0,P,H.transform.height,j)}function Sc(H,O,P,j,Y,te){const de=H.context,pe=de.gl;pe.enable(pe.SCISSOR_TEST),pe.scissor(O*H.pixelRatio,P*H.pixelRatio,j*H.pixelRatio,Y*H.pixelRatio),de.clear({color:te}),pe.disable(pe.SCISSOR_TEST)}function wd(H,O,P){const j=H.context,Y=j.gl,te=P.posMatrix,de=H.useProgram("debug"),pe=bi.disabled,Ae=Qi.disabled,Be=H.colorModeForRenderPass(),Ge="$debug",qe=H.style.map.terrain&&H.style.map.terrain.getTerrainData(P);j.activeTexture.set(Y.TEXTURE0);const at=O.getTileByID(P.key).latestRawTileData,lt=at&&at.byteLength||0,ft=Math.floor(lt/1024),kt=O.getTile(P).tileSize,Nt=512/Math.min(kt,512)*(P.overscaledZ/H.transform.zoom)*.5;let Mt=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(Mt+=` => ${P.overscaledZ}`),function(Gt,zt){Gt.initDebugOverlayCanvas();const Xt=Gt.debugOverlayCanvas,Zt=Gt.context.gl,Yt=Gt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Xt.width,Xt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(zt,5,5),Yt.strokeText(zt,5,5),Gt.debugOverlayTexture.update(Xt),Gt.debugOverlayTexture.bind(Zt.LINEAR,Zt.CLAMP_TO_EDGE)}(H,`${Mt} ${ft}kB`),de.draw(j,Y.TRIANGLES,pe,Ae,Cs.alphaBlended,ao.disabled,sa(te,n.aN.transparent,Nt),null,Ge,H.debugBuffer,H.quadTriangleIndexBuffer,H.debugSegments),de.draw(j,Y.LINE_STRIP,pe,Ae,Be,ao.disabled,sa(te,n.aN.red),qe,Ge,H.debugBuffer,H.tileBorderIndexBuffer,H.debugSegments)}function oc(H,O,P){const j=H.context,Y=j.gl,te=H.colorModeForRenderPass(),de=new bi(Y.LEQUAL,bi.ReadWrite,H.depthRangeFor3D),pe=H.useProgram("terrain"),Ae=O.getTerrainMesh();j.bindFramebuffer.set(null),j.viewport.set([0,0,H.width,H.height]);for(const Be of P){const Ge=H.renderToTexture.getTexture(Be),qe=O.getTerrainData(Be.tileID);j.activeTexture.set(Y.TEXTURE0),Y.bindTexture(Y.TEXTURE_2D,Ge.texture);const at=H.transform.calculatePosMatrix(Be.tileID.toUnwrapped()),lt=O.getMeshFrameDelta(H.transform.zoom),ft=H.transform.calculateFogMatrix(Be.tileID.toUnwrapped()),kt=ha(at,lt,ft,H.style.sky,H.transform.pitch);pe.draw(j,Y.TRIANGLES,de,Qi.disabled,te,ao.backCCW,kt,qe,"terrain",Ae.vertexBuffer,Ae.indexBuffer,Ae.segments)}}class Kl{constructor(O,P,j){this.vertexBuffer=O,this.indexBuffer=P,this.segments=j}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class sc{constructor(O,P){this.context=new nc(O),this.transform=P,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:n.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=je.maxUnderzooming+je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new qa}resize(O,P,j){if(this.width=Math.floor(O*j),this.height=Math.floor(P*j),this.pixelRatio=j,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Y of this.style._order)this.style._layers[Y].resize()}setup(){const O=this.context,P=new n.aX;P.emplaceBack(0,0),P.emplaceBack(n.X,0),P.emplaceBack(0,n.X),P.emplaceBack(n.X,n.X),this.tileExtentBuffer=O.createVertexBuffer(P,cn.members),this.tileExtentSegments=n.a0.simpleSegment(0,0,4,2);const j=new n.aX;j.emplaceBack(0,0),j.emplaceBack(n.X,0),j.emplaceBack(0,n.X),j.emplaceBack(n.X,n.X),this.debugBuffer=O.createVertexBuffer(j,cn.members),this.debugSegments=n.a0.simpleSegment(0,0,4,5);const Y=new n.$;Y.emplaceBack(0,0,0,0),Y.emplaceBack(n.X,0,n.X,0),Y.emplaceBack(0,n.X,0,n.X),Y.emplaceBack(n.X,n.X,n.X,n.X),this.rasterBoundsBuffer=O.createVertexBuffer(Y,we.members),this.rasterBoundsSegments=n.a0.simpleSegment(0,0,4,2);const te=new n.aX;te.emplaceBack(0,0),te.emplaceBack(1,0),te.emplaceBack(0,1),te.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(te,cn.members),this.viewportSegments=n.a0.simpleSegment(0,0,4,2);const de=new n.aZ;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(de);const pe=new n.aY;pe.emplaceBack(0,1,2),pe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(pe);const Ae=this.context.gl;this.stencilClearMode=new Qi({func:Ae.ALWAYS,mask:0},0,255,Ae.ZERO,Ae.ZERO,Ae.ZERO)}clearStencil(){const O=this.context,P=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const j=n.H();n.aQ(j,0,this.width,this.height,0,0,1),n.K(j,j,[P.drawingBufferWidth,P.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,P.TRIANGLES,bi.disabled,this.stencilClearMode,Cs.disabled,ao.disabled,Ia(j),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,P){if(this.currentStencilSource===O.source||!O.isTileClipped()||!P||!P.length)return;this.currentStencilSource=O.source;const j=this.context,Y=j.gl;this.nextStencilID+P.length>256&&this.clearStencil(),j.setColorMode(Cs.disabled),j.setDepthMode(bi.disabled);const te=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const de of P){const pe=this._tileClippingMaskIDs[de.key]=this.nextStencilID++,Ae=this.style.map.terrain&&this.style.map.terrain.getTerrainData(de);te.draw(j,Y.TRIANGLES,bi.disabled,new Qi({func:Y.ALWAYS,mask:0},pe,255,Y.KEEP,Y.KEEP,Y.REPLACE),Cs.disabled,ao.disabled,Ia(de.posMatrix),Ae,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,P=this.context.gl;return new Qi({func:P.NOTEQUAL,mask:255},O,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(O){const P=this.context.gl;return new Qi({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,P.KEEP,P.KEEP,P.REPLACE)}stencilConfigForOverlap(O){const P=this.context.gl,j=O.sort((de,pe)=>pe.overscaledZ-de.overscaledZ),Y=j[j.length-1].overscaledZ,te=j[0].overscaledZ-Y+1;if(te>1){this.currentStencilSource=void 0,this.nextStencilID+te>256&&this.clearStencil();const de={};for(let pe=0;pe<te;pe++)de[pe+Y]=new Qi({func:P.GEQUAL,mask:255},pe+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=te,[de,j]}return[{[Y]:Qi.disabled},j]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new Cs([O.CONSTANT_COLOR,O.ONE],new n.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Cs.unblended:Cs.alphaBlended}depthModeForSublayer(O,P,j){if(!this.opaquePassEnabledForLayer())return bi.disabled;const Y=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new bi(j||this.context.gl.LEQUAL,P,[Y,Y])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,P){var j;this.style=O,this.options=P,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(l.now()),this.imageManager.beginFrame();const Y=this.style._order,te=this.style.sourceCaches,de={},pe={},Ae={};for(const Be in te){const Ge=te[Be];Ge.used&&Ge.prepare(this.context),de[Be]=Ge.getVisibleCoordinates(),pe[Be]=de[Be].slice().reverse(),Ae[Be]=Ge.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Be=0;Be<Y.length;Be++){const Ge=Y[Be];if(this.style._layers[Ge].is3D()){this.opaquePassCutoff=Be;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Be of Y){const Ge=this.style._layers[Be];if(!Ge.hasOffscreenPass()||Ge.isHidden(this.transform.zoom))continue;const qe=pe[Ge.source];(Ge.type==="custom"||qe.length)&&this.renderLayer(this,te[Ge.source],Ge,qe)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?n.aN.black:n.aN.transparent,depth:1}),this.clearStencil(),!((j=this.style.stylesheet)===null||j===void 0)&&j.sky&&function(Be,Ge){const qe=Be.context,at=qe.gl,lt=((Gt,zt,Xt)=>({u_sky_color:Gt.properties.get("sky-color"),u_horizon_color:Gt.properties.get("horizon-color"),u_horizon:(zt.height/2+zt.getHorizon())*Xt,u_sky_horizon_blend:Gt.properties.get("sky-horizon-blend")*zt.height/2*Xt}))(Ge,Be.style.map.transform,Be.pixelRatio),ft=new bi(at.LEQUAL,bi.ReadWrite,[0,1]),kt=Qi.disabled,Nt=Be.colorModeForRenderPass(),Mt=Be.useProgram("sky");if(!Ge.mesh){const Gt=new n.aX;Gt.emplaceBack(-1,-1),Gt.emplaceBack(1,-1),Gt.emplaceBack(1,1),Gt.emplaceBack(-1,1);const zt=new n.aY;zt.emplaceBack(0,1,2),zt.emplaceBack(0,2,3),Ge.mesh=new Kl(qe.createVertexBuffer(Gt,cn.members),qe.createIndexBuffer(zt),n.a0.simpleSegment(0,0,Gt.length,zt.length))}Mt.draw(qe,at.TRIANGLES,ft,kt,Nt,ao.disabled,lt,void 0,"sky",Ge.mesh.vertexBuffer,Ge.mesh.indexBuffer,Ge.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Y.length-1;this.currentLayer>=0;this.currentLayer--){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source],qe=de[Be.source];this._renderTileClippingMasks(Be,qe),this.renderLayer(this,Ge,Be,qe)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Y.length;this.currentLayer++){const Be=this.style._layers[Y[this.currentLayer]],Ge=te[Be.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Be))continue;const qe=(Be.type==="symbol"?Ae:pe)[Be.source];this._renderTileClippingMasks(Be,de[Be.source]),this.renderLayer(this,Ge,Be,qe)}if(this.options.showTileBoundaries){const Be=function(Ge,qe){let at=null;const lt=Object.values(Ge._layers).flatMap(Mt=>Mt.source&&!Mt.isHidden(qe)?[Ge.sourceCaches[Mt.source]]:[]),ft=lt.filter(Mt=>Mt.getSource().type==="vector"),kt=lt.filter(Mt=>Mt.getSource().type!=="vector"),Nt=Mt=>{(!at||at.getSource().maxzoom<Mt.getSource().maxzoom)&&(at=Mt)};return ft.forEach(Mt=>Nt(Mt)),at||kt.forEach(Mt=>Nt(Mt)),at}(this.style,this.transform.zoom);Be&&function(Ge,qe,at){for(let lt=0;lt<at.length;lt++)wd(Ge,qe,at[lt])}(this,Be,Be.getVisibleCoordinates())}this.options.showPadding&&Fc(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const P=this.terrainFacilitator.matrix,j=this.transform.modelViewProjectionMatrix;let Y=this.terrainFacilitator.dirty;Y||(Y=O?!n.a_(P,j):!n.a$(P,j)),Y||(Y=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Y&&(n.b0(P,j),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(te,de){const pe=te.context,Ae=pe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.sourceCache.getRenderableTiles(),lt=te.useProgram("terrainDepth");pe.bindFramebuffer.set(de.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1});for(const ft of at){const kt=de.getTerrainData(ft.tileID),Nt={u_matrix:te.transform.calculatePosMatrix(ft.tileID.toUnwrapped()),u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};lt.draw(pe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Nt,kt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain),function(te,de){const pe=te.context,Ae=pe.gl,Be=Cs.unblended,Ge=new bi(Ae.LEQUAL,bi.ReadWrite,[0,1]),qe=de.getTerrainMesh(),at=de.getCoordsTexture(),lt=de.sourceCache.getRenderableTiles(),ft=te.useProgram("terrainCoords");pe.bindFramebuffer.set(de.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,te.width/devicePixelRatio,te.height/devicePixelRatio]),pe.clear({color:n.aN.transparent,depth:1}),de.coordsIndex=[];for(const kt of lt){const Nt=de.getTerrainData(kt.tileID);pe.activeTexture.set(Ae.TEXTURE0),Ae.bindTexture(Ae.TEXTURE_2D,at.texture);const Mt={u_matrix:te.transform.calculatePosMatrix(kt.tileID.toUnwrapped()),u_terrain_coords_id:(255-de.coordsIndex.length)/255,u_texture:0,u_ele_delta:de.getMeshFrameDelta(te.transform.zoom)};ft.draw(pe,Ae.TRIANGLES,Ge,Qi.disabled,Be,ao.backCCW,Mt,Nt,"terrain",qe.vertexBuffer,qe.indexBuffer,qe.segments),de.coordsIndex.push(kt.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,te.width,te.height])}(this,this.style.map.terrain))}renderLayer(O,P,j,Y){if(!j.isHidden(this.transform.zoom)&&(j.type==="background"||j.type==="custom"||(Y||[]).length))switch(this.id=j.id,j.type){case"symbol":bl(O,P,j,Y,this.style.placement.variableOffsets);break;case"circle":(function(te,de,pe,Ae){if(te.renderPass!=="translucent")return;const Be=pe.paint.get("circle-opacity"),Ge=pe.paint.get("circle-stroke-width"),qe=pe.paint.get("circle-stroke-opacity"),at=!pe.layout.get("circle-sort-key").isConstant();if(Be.constantOr(1)===0&&(Ge.constantOr(1)===0||qe.constantOr(1)===0))return;const lt=te.context,ft=lt.gl,kt=te.depthModeForSublayer(0,bi.ReadOnly),Nt=Qi.disabled,Mt=te.colorModeForRenderPass(),Gt=[];for(let zt=0;zt<Ae.length;zt++){const Xt=Ae[zt],Zt=de.getTile(Xt),Yt=Zt.getBucket(pe);if(!Yt)continue;const ya=Yt.programConfigurations.get(pe.id),Ca=te.useProgram("circle",ya),La=Yt.layoutVertexBuffer,ja=Yt.indexBuffer,Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Xt),on={programConfiguration:ya,program:Ca,layoutVertexBuffer:La,indexBuffer:ja,uniformValues:za(te,Xt,Zt,pe),terrainData:Wa};if(at){const Tn=Yt.segments.get();for(const Qa of Tn)Gt.push({segments:new n.a0([Qa]),sortKey:Qa.sortKey,state:on})}else Gt.push({segments:Yt.segments,sortKey:0,state:on})}at&&Gt.sort((zt,Xt)=>zt.sortKey-Xt.sortKey);for(const zt of Gt){const{programConfiguration:Xt,program:Zt,layoutVertexBuffer:Yt,indexBuffer:ya,uniformValues:Ca,terrainData:La}=zt.state,ja=zt.segments;Zt.draw(lt,ft.TRIANGLES,kt,Nt,Mt,ao.disabled,Ca,La,pe.id,Yt,ya,ja,pe.paint,te.transform.zoom,Xt)}})(O,P,j,Y);break;case"heatmap":ic(O,P,j,Y);break;case"line":(function(te,de,pe,Ae){if(te.renderPass!=="translucent")return;const Be=pe.paint.get("line-opacity"),Ge=pe.paint.get("line-width");if(Be.constantOr(1)===0||Ge.constantOr(1)===0)return;const qe=te.depthModeForSublayer(0,bi.ReadOnly),at=te.colorModeForRenderPass(),lt=pe.paint.get("line-dasharray"),ft=pe.paint.get("line-pattern"),kt=ft.constantOr(1),Nt=pe.paint.get("line-gradient"),Mt=pe.getCrossfadeParameters(),Gt=kt?"linePattern":lt?"lineSDF":Nt?"lineGradient":"line",zt=te.context,Xt=zt.gl;let Zt=!0;for(const Yt of Ae){const ya=de.getTile(Yt);if(kt&&!ya.patternsLoaded())continue;const Ca=ya.getBucket(pe);if(!Ca)continue;const La=Ca.programConfigurations.get(pe.id),ja=te.context.program.get(),Wa=te.useProgram(Gt,La),on=Zt||Wa.program!==ja,Tn=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Yt),Qa=ft.constantOr(null);if(Qa&&ya.imageAtlas){const Ln=ya.imageAtlas,fn=Ln.patternPositions[Qa.to.toString()],Mn=Ln.patternPositions[Qa.from.toString()];fn&&Mn&&La.setConstantPatternPositions(fn,Mn)}const Sn=Tn?Yt:null,kn=kt?Va(te,ya,pe,Mt,Sn):lt?en(te,ya,pe,lt,Mt,Sn):Nt?ga(te,ya,pe,Ca.lineClipsArray.length,Sn):ea(te,ya,pe,Sn);if(kt)zt.activeTexture.set(Xt.TEXTURE0),ya.imageAtlasTexture.bind(Xt.LINEAR,Xt.CLAMP_TO_EDGE),La.updatePaintBuffers(Mt);else if(lt&&(on||te.lineAtlas.dirty))zt.activeTexture.set(Xt.TEXTURE0),te.lineAtlas.bind(zt);else if(Nt){const Ln=Ca.gradients[pe.id];let fn=Ln.texture;if(pe.gradientVersion!==Ln.version){let Mn=256;if(pe.stepInterpolant){const Wn=de.getSource().maxzoom,In=Yt.canonical.z===Wn?Math.ceil(1<<te.transform.maxZoom-Yt.canonical.z):1,Hn=Ca.maxLineLength/n.X*1024*In;Mn=n.ad(n.aV(Hn),256,zt.maxTextureSize)}Ln.gradient=n.aW({expression:pe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mn,image:Ln.gradient||void 0,clips:Ca.lineClipsArray}),Ln.texture?Ln.texture.update(Ln.gradient):Ln.texture=new I(zt,Ln.gradient,Xt.RGBA),Ln.version=pe.gradientVersion,fn=Ln.texture}zt.activeTexture.set(Xt.TEXTURE0),fn.bind(pe.stepInterpolant?Xt.NEAREST:Xt.LINEAR,Xt.CLAMP_TO_EDGE)}Wa.draw(zt,Xt.TRIANGLES,qe,te.stencilModeForClipping(Yt),at,ao.disabled,kn,Tn,pe.id,Ca.layoutVertexBuffer,Ca.indexBuffer,Ca.segments,pe.paint,te.transform.zoom,La,Ca.layoutVertexBuffer2),Zt=!1}})(O,P,j,Y);break;case"fill":(function(te,de,pe,Ae){const Be=pe.paint.get("fill-color"),Ge=pe.paint.get("fill-opacity");if(Ge.constantOr(1)===0)return;const qe=te.colorModeForRenderPass(),at=pe.paint.get("fill-pattern"),lt=te.opaquePassEnabledForLayer()&&!at.constantOr(1)&&Be.constantOr(n.aN.transparent).a===1&&Ge.constantOr(0)===1?"opaque":"translucent";if(te.renderPass===lt){const ft=te.depthModeForSublayer(1,te.renderPass==="opaque"?bi.ReadWrite:bi.ReadOnly);Hc(te,de,pe,Ae,ft,qe,!1)}if(te.renderPass==="translucent"&&pe.paint.get("fill-antialias")){const ft=te.depthModeForSublayer(pe.getPaintProperty("fill-outline-color")?2:0,bi.ReadOnly);Hc(te,de,pe,Ae,ft,qe,!0)}})(O,P,j,Y);break;case"fill-extrusion":(function(te,de,pe,Ae){const Be=pe.paint.get("fill-extrusion-opacity");if(Be!==0&&te.renderPass==="translucent"){const Ge=new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D);if(Be!==1||pe.paint.get("fill-extrusion-pattern").constantOr(1))Wc(te,de,pe,Ae,Ge,Qi.disabled,Cs.disabled),Wc(te,de,pe,Ae,Ge,te.stencilModeFor3D(),te.colorModeForRenderPass());else{const qe=te.colorModeForRenderPass();Wc(te,de,pe,Ae,Ge,Qi.disabled,qe)}}})(O,P,j,Y);break;case"hillshade":(function(te,de,pe,Ae){if(te.renderPass!=="offscreen"&&te.renderPass!=="translucent")return;const Be=te.context,Ge=te.depthModeForSublayer(0,bi.ReadOnly),qe=te.colorModeForRenderPass(),[at,lt]=te.renderPass==="translucent"?te.stencilConfigForOverlap(Ae):[{},Ae];for(const ft of lt){const kt=de.getTile(ft);kt.needsHillshadePrepare!==void 0&&kt.needsHillshadePrepare&&te.renderPass==="offscreen"?xd(te,kt,pe,Ge,Qi.disabled,qe):te.renderPass==="translucent"&&Cc(te,ft,kt,pe,Ge,at[ft.overscaledZ],qe)}Be.viewport.set([0,0,te.width,te.height])})(O,P,j,Y);break;case"raster":(function(te,de,pe,Ae){if(te.renderPass!=="translucent"||pe.paint.get("raster-opacity")===0||!Ae.length)return;const Be=te.context,Ge=Be.gl,qe=de.getSource(),at=te.useProgram("raster"),lt=te.colorModeForRenderPass(),[ft,kt]=qe instanceof ye?[{},Ae]:te.stencilConfigForOverlap(Ae),Nt=kt[kt.length-1].overscaledZ,Mt=!te.options.moving;for(const Gt of kt){const zt=te.depthModeForSublayer(Gt.overscaledZ-Nt,pe.paint.get("raster-opacity")===1?bi.ReadWrite:bi.ReadOnly,Ge.LESS),Xt=de.getTile(Gt);Xt.registerFadeDuration(pe.paint.get("raster-fade-duration"));const Zt=de.findLoadedParent(Gt,0),Yt=de.findLoadedSibling(Gt),ya=zs(Xt,Zt||Yt||null,de,pe,te.transform,te.style.map.terrain);let Ca,La;const ja=pe.paint.get("raster-resampling")==="nearest"?Ge.NEAREST:Ge.LINEAR;Be.activeTexture.set(Ge.TEXTURE0),Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Be.activeTexture.set(Ge.TEXTURE1),Zt?(Zt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Ca=Math.pow(2,Zt.tileID.overscaledZ-Xt.tileID.overscaledZ),La=[Xt.tileID.canonical.x*Ca%1,Xt.tileID.canonical.y*Ca%1]):Xt.texture.bind(ja,Ge.CLAMP_TO_EDGE,Ge.LINEAR_MIPMAP_NEAREST),Xt.texture.useMipmap&&Be.extTextureFilterAnisotropic&&te.transform.pitch>20&&Ge.texParameterf(Ge.TEXTURE_2D,Be.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Be.extTextureFilterAnisotropicMax);const Wa=te.style.map.terrain&&te.style.map.terrain.getTerrainData(Gt),on=Wa?Gt:null,Tn=on?on.posMatrix:te.transform.calculatePosMatrix(Gt.toUnwrapped(),Mt),Qa=_n(Tn,La||[0,0],Ca||1,ya,pe);qe instanceof ye?at.draw(Be,Ge.TRIANGLES,zt,Qi.disabled,lt,ao.disabled,Qa,Wa,pe.id,qe.boundsBuffer,te.quadTriangleIndexBuffer,qe.boundsSegments):at.draw(Be,Ge.TRIANGLES,zt,ft[Gt.overscaledZ],lt,ao.disabled,Qa,Wa,pe.id,te.rasterBoundsBuffer,te.quadTriangleIndexBuffer,te.rasterBoundsSegments)}})(O,P,j,Y);break;case"background":(function(te,de,pe,Ae){const Be=pe.paint.get("background-color"),Ge=pe.paint.get("background-opacity");if(Ge===0)return;const qe=te.context,at=qe.gl,lt=te.transform,ft=lt.tileSize,kt=pe.paint.get("background-pattern");if(te.isPatternMissing(kt))return;const Nt=!kt&&Be.a===1&&Ge===1&&te.opaquePassEnabledForLayer()?"opaque":"translucent";if(te.renderPass!==Nt)return;const Mt=Qi.disabled,Gt=te.depthModeForSublayer(0,Nt==="opaque"?bi.ReadWrite:bi.ReadOnly),zt=te.colorModeForRenderPass(),Xt=te.useProgram(kt?"backgroundPattern":"background"),Zt=Ae||lt.coveringTiles({tileSize:ft,terrain:te.style.map.terrain});kt&&(qe.activeTexture.set(at.TEXTURE0),te.imageManager.bind(te.context));const Yt=pe.getCrossfadeParameters();for(const ya of Zt){const Ca=Ae?ya.posMatrix:te.transform.calculatePosMatrix(ya.toUnwrapped()),La=kt?qn(Ca,Ge,te,kt,{tileID:ya,tileSize:ft},Yt):Nn(Ca,Ge,Be),ja=te.style.map.terrain&&te.style.map.terrain.getTerrainData(ya);Xt.draw(qe,at.TRIANGLES,Gt,Mt,zt,ao.disabled,La,ja,pe.id,te.tileExtentBuffer,te.quadTriangleIndexBuffer,te.tileExtentSegments)}})(O,0,j,Y);break;case"custom":(function(te,de,pe){const Ae=te.context,Be=pe.implementation;if(te.renderPass==="offscreen"){const Ge=Be.prerender;Ge&&(te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ge.call(Be,Ae.gl,te.transform.customLayerMatrix()),Ae.setDirty(),te.setBaseState())}else if(te.renderPass==="translucent"){te.setCustomLayerDefaults(),Ae.setColorMode(te.colorModeForRenderPass()),Ae.setStencilMode(Qi.disabled);const Ge=Be.renderingMode==="3d"?new bi(te.context.gl.LEQUAL,bi.ReadWrite,te.depthRangeFor3D):te.depthModeForSublayer(0,bi.ReadOnly);Ae.setDepthMode(Ge),Be.render(Ae.gl,te.transform.customLayerMatrix(),{farZ:te.transform.farZ,nearZ:te.transform.nearZ,fov:te.transform._fov,modelViewProjectionMatrix:te.transform.modelViewProjectionMatrix,projectionMatrix:te.transform.projectionMatrix}),Ae.setDirty(),te.setBaseState(),Ae.bindFramebuffer.set(null)}})(O,0,j)}}translatePosMatrix(O,P,j,Y,te){if(!j[0]&&!j[1])return O;const de=te?Y==="map"?this.transform.angle:0:Y==="viewport"?-this.transform.angle:0;if(de){const Be=Math.sin(de),Ge=Math.cos(de);j=[j[0]*Ge-j[1]*Be,j[0]*Be+j[1]*Ge]}const pe=[te?j[0]:yt(P,j[0],this.transform.zoom),te?j[1]:yt(P,j[1],this.transform.zoom),0],Ae=new Float32Array(16);return n.J(Ae,O,pe),Ae}saveTileTexture(O){const P=this._tileTextures[O.size[0]];P?P.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const P=this._tileTextures[O];return P&&P.length>0?P.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const P=this.imageManager.getPattern(O.from.toString()),j=this.imageManager.getPattern(O.to.toString());return!P||!j}useProgram(O,P){this.cache=this.cache||{};const j=O+(P?P.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[j]||(this.cache[j]=new Ya(this.context,hn[O],P,Dn[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[j]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const O=this.context.gl;this.debugOverlayTexture=new I(this.context,this.debugOverlayCanvas,O.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:P}=this.context.gl;return this.width!==O||this.height!==P}}class ol{constructor(O,P){this.points=O,this.planes=P}static fromInvProjectionMatrix(O,P,j){const Y=Math.pow(2,j),te=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(pe=>{const Ae=1/(pe=n.ag([],pe,O))[3]/P*Y;return n.b1(pe,pe,[Ae,Ae,1/pe[3],Ae])}),de=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(pe=>{const Ae=function(at,lt){var ft=lt[0],kt=lt[1],Nt=lt[2],Mt=ft*ft+kt*kt+Nt*Nt;return Mt>0&&(Mt=1/Math.sqrt(Mt)),at[0]=lt[0]*Mt,at[1]=lt[1]*Mt,at[2]=lt[2]*Mt,at}([],function(at,lt,ft){var kt=lt[0],Nt=lt[1],Mt=lt[2],Gt=ft[0],zt=ft[1],Xt=ft[2];return at[0]=Nt*Xt-Mt*zt,at[1]=Mt*Gt-kt*Xt,at[2]=kt*zt-Nt*Gt,at}([],T([],te[pe[0]],te[pe[1]]),T([],te[pe[2]],te[pe[1]]))),Be=(Ge=Ae,qe=te[pe[1]],-(Ge[0]*qe[0]+Ge[1]*qe[1]+Ge[2]*qe[2]));var Ge,qe;return Ae.concat(Be)});return new ol(te,de)}}class js{constructor(O,P){this.min=O,this.max=P,this.center=function(j,Y,te){return j[0]=Y[0]*te,j[1]=Y[1]*te,j[2]=Y[2]*te,j}([],function(j,Y,te){return j[0]=Y[0]+te[0],j[1]=Y[1]+te[1],j[2]=Y[2]+te[2],j}([],this.min,this.max),.5)}quadrant(O){const P=[O%2==0,O<2],j=S(this.min),Y=S(this.max);for(let te=0;te<P.length;te++)j[te]=P[te]?this.min[te]:this.center[te],Y[te]=P[te]?this.center[te]:this.max[te];return Y[2]=this.max[2],new js(j,Y)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){const P=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let j=!0;for(let Y=0;Y<O.planes.length;Y++){const te=O.planes[Y];let de=0;for(let pe=0;pe<P.length;pe++)n.b2(te,P[pe])>=0&&de++;if(de===0)return 0;de!==P.length&&(j=!1)}if(j)return 2;for(let Y=0;Y<3;Y++){let te=Number.MAX_VALUE,de=-Number.MAX_VALUE;for(let pe=0;pe<O.points.length;pe++){const Ae=O.points[pe][Y]-this.min[Y];te=Math.min(te,Ae),de=Math.max(de,Ae)}if(de<0||te>this.max[Y]-this.min[Y])return 0}return 1}}class Ql{constructor(O=0,P=0,j=0,Y=0){if(isNaN(O)||O<0||isNaN(P)||P<0||isNaN(j)||j<0||isNaN(Y)||Y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=P,this.left=j,this.right=Y}interpolate(O,P,j){return P.top!=null&&O.top!=null&&(this.top=n.z.number(O.top,P.top,j)),P.bottom!=null&&O.bottom!=null&&(this.bottom=n.z.number(O.bottom,P.bottom,j)),P.left!=null&&O.left!=null&&(this.left=n.z.number(O.left,P.left,j)),P.right!=null&&O.right!=null&&(this.right=n.z.number(O.right,P.right,j)),this}getCenter(O,P){const j=n.ad((this.left+O-this.right)/2,0,O),Y=n.ad((this.top+P-this.bottom)/2,0,P);return new n.P(j,Y)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new Ql(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Tc=85.051129;class oi{constructor(O,P,j,Y,te){this.tileSize=512,this._renderWorldCopies=te===void 0||!!te,this._minZoom=O||0,this._maxZoom=P||22,this._minPitch=j??0,this._maxPitch=Y??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new n.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ql,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new oi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new n.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(O){const P=-n.b3(O,-180,180)*Math.PI/180;this.angle!==P&&(this._unmodified=!1,this.angle=P,this._calcMatrices(),this.rotationMatrix=function(){var j=new n.A(4);return n.A!=Float32Array&&(j[1]=0,j[2]=0),j[0]=1,j[3]=1,j}(),function(j,Y,te){var de=Y[0],pe=Y[1],Ae=Y[2],Be=Y[3],Ge=Math.sin(te),qe=Math.cos(te);j[0]=de*qe+Ae*Ge,j[1]=pe*qe+Be*Ge,j[2]=de*-Ge+Ae*qe,j[3]=pe*-Ge+Be*qe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const P=n.ad(O,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==P&&(this._unmodified=!1,this._pitch=P,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const P=Math.min(Math.max(O,this.minZoom),this.maxZoom);this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this.tileZoom=Math.max(0,Math.floor(P)),this.scale=this.zoomScale(P),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,P,j){this._unmodified=!1,this._edgeInsets.interpolate(O,P,j),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const P=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,P)}getVisibleUnwrappedCoordinates(O){const P=[new n.b4(0,O)];if(this._renderWorldCopies){const j=this.pointCoordinate(new n.P(0,0)),Y=this.pointCoordinate(new n.P(this.width,0)),te=this.pointCoordinate(new n.P(this.width,this.height)),de=this.pointCoordinate(new n.P(0,this.height)),pe=Math.floor(Math.min(j.x,Y.x,te.x,de.x)),Ae=Math.floor(Math.max(j.x,Y.x,te.x,de.x)),Be=1;for(let Ge=pe-Be;Ge<=Ae+Be;Ge++)Ge!==0&&P.push(new n.b4(Ge,O))}return P}coveringTiles(O){var P,j;let Y=this.coveringZoomLevel(O);const te=Y;if(O.minzoom!==void 0&&Y<O.minzoom)return[];O.maxzoom!==void 0&&Y>O.maxzoom&&(Y=O.maxzoom);const de=this.pointCoordinate(this.getCameraPoint()),pe=n.Z.fromLngLat(this.center),Ae=Math.pow(2,Y),Be=[Ae*de.x,Ae*de.y,0],Ge=[Ae*pe.x,Ae*pe.y,0],qe=ol.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Y);let at=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(at=Y);const lt=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,ft=zt=>({aabb:new js([zt*Ae,0,0],[(zt+1)*Ae,Ae,0]),zoom:0,x:0,y:0,wrap:zt,fullyVisible:!1}),kt=[],Nt=[],Mt=Y,Gt=O.reparseOverscaled?te:Y;if(this._renderWorldCopies)for(let zt=1;zt<=3;zt++)kt.push(ft(-zt)),kt.push(ft(zt));for(kt.push(ft(0));kt.length>0;){const zt=kt.pop(),Xt=zt.x,Zt=zt.y;let Yt=zt.fullyVisible;if(!Yt){const on=zt.aabb.intersects(qe);if(on===0)continue;Yt=on===2}const ya=O.terrain?Be:Ge,Ca=zt.aabb.distanceX(ya),La=zt.aabb.distanceY(ya),ja=Math.max(Math.abs(Ca),Math.abs(La)),Wa=lt+(1<<Mt-zt.zoom)-2;if(zt.zoom===Mt||ja>Wa&&zt.zoom>=at){const on=Mt-zt.zoom,Tn=Be[0]-.5-(Xt<<on),Qa=Be[1]-.5-(Zt<<on);Nt.push({tileID:new n.S(zt.zoom===Mt?Gt:zt.zoom,zt.wrap,zt.zoom,Xt,Zt),distanceSq:C([Ge[0]-.5-Xt,Ge[1]-.5-Zt]),tileDistanceToCamera:Math.sqrt(Tn*Tn+Qa*Qa)})}else for(let on=0;on<4;on++){const Tn=(Xt<<1)+on%2,Qa=(Zt<<1)+(on>>1),Sn=zt.zoom+1;let kn=zt.aabb.quadrant(on);if(O.terrain){const Ln=new n.S(Sn,zt.wrap,Sn,Tn,Qa),fn=O.terrain.getMinMaxElevation(Ln),Mn=(P=fn.minElevation)!==null&&P!==void 0?P:this.elevation,Wn=(j=fn.maxElevation)!==null&&j!==void 0?j:this.elevation;kn=new js([kn.min[0],kn.min[1],Mn],[kn.max[0],kn.max[1],Wn])}kt.push({aabb:kn,zoom:Sn,x:Tn,y:Qa,wrap:zt.wrap,fullyVisible:Yt})}}return Nt.sort((zt,Xt)=>zt.distanceSq-Xt.distanceSq).map(zt=>zt.tileID)}resize(O,P){this.width=O,this.height=P,this.pixelsToGLUnits=[2/O,-2/P],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const P=n.ad(O.lat,-85.051129,Tc);return new n.P(n.O(O.lng)*this.worldSize,n.Q(P)*this.worldSize)}unproject(O){return new n.Z(O.x/this.worldSize,O.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(O){const P=this.elevation,j=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Y=this.pointLocation(this.centerPoint,O),te=O.getElevationForLngLatZoom(Y,this.tileZoom);if(!(this.elevation-te))return;const de=j+P-te,pe=Math.cos(this._pitch)*this.cameraToCenterDistance/de/n.b5(1,Y.lat)/this.tileSize,Ae=this.scaleZoom(pe);this._elevation=te,this._center=Y,this.zoom=Ae}setLocationAtPoint(O,P){const j=this.pointCoordinate(P),Y=this.pointCoordinate(this.centerPoint),te=this.locationCoordinate(O),de=new n.Z(te.x-(j.x-Y.x),te.y-(j.y-Y.y));this.center=this.coordinateLocation(de),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,P){return P?this.coordinatePoint(this.locationCoordinate(O),P.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,P){return this.coordinateLocation(this.pointCoordinate(O,P))}locationCoordinate(O){return n.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,P){if(P){const ft=P.pointCoordinate(O);if(ft!=null)return ft}const j=[O.x,O.y,0,1],Y=[O.x,O.y,1,1];n.ag(j,j,this.pixelMatrixInverse),n.ag(Y,Y,this.pixelMatrixInverse);const te=j[3],de=Y[3],pe=j[0]/te,Ae=Y[0]/de,Be=j[1]/te,Ge=Y[1]/de,qe=j[2]/te,at=Y[2]/de,lt=qe===at?0:(0-qe)/(at-qe);return new n.Z(n.z.number(pe,Ae,lt)/this.worldSize,n.z.number(Be,Ge,lt)/this.worldSize)}coordinatePoint(O,P=0,j=this.pixelMatrix){const Y=[O.x*this.worldSize,O.y*this.worldSize,P,1];return n.ag(Y,Y,j),new n.P(Y[0]/Y[3],Y[1]/Y[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new xe().extend(this.pointLocation(new n.P(0,O))).extend(this.pointLocation(new n.P(this.width,O))).extend(this.pointLocation(new n.P(this.width,this.height))).extend(this.pointLocation(new n.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new xe([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Tc])}calculateTileMatrix(O){const P=O.canonical,j=this.worldSize/this.zoomScale(P.z),Y=P.x+Math.pow(2,P.z)*O.wrap,te=n.ao(new Float64Array(16));return n.J(te,te,[Y*j,P.y*j,0]),n.K(te,te,[j/n.X,j/n.X,1]),te}calculatePosMatrix(O,P=!1){const j=O.key,Y=P?this._alignedPosMatrixCache:this._posMatrixCache;if(Y[j])return Y[j];const te=this.calculateTileMatrix(O);return n.L(te,P?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,te),Y[j]=new Float32Array(te),Y[j]}calculateFogMatrix(O){const P=O.key,j=this._fogMatrixCache;if(j[P])return j[P];const Y=this.calculateTileMatrix(O);return n.L(Y,this.fogMatrix,Y),j[P]=new Float32Array(Y),j[P]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,P){P=n.ad(+P,this.minZoom,this.maxZoom);const j={center:new n.N(O.lng,O.lat),zoom:P};let Y=this.lngRange;if(!this._renderWorldCopies&&Y===null){const zt=179.9999999999;Y=[-zt,zt]}const te=this.tileSize*this.zoomScale(j.zoom);let de=0,pe=te,Ae=0,Be=te,Ge=0,qe=0;const{x:at,y:lt}=this.size;if(this.latRange){const zt=this.latRange;de=n.Q(zt[1])*te,pe=n.Q(zt[0])*te,pe-de<lt&&(Ge=lt/(pe-de))}Y&&(Ae=n.b3(n.O(Y[0])*te,0,te),Be=n.b3(n.O(Y[1])*te,0,te),Be<Ae&&(Be+=te),Be-Ae<at&&(qe=at/(Be-Ae)));const{x:ft,y:kt}=this.project.call({worldSize:te},O);let Nt,Mt;const Gt=Math.max(qe||0,Ge||0);if(Gt){const zt=new n.P(qe?(Be+Ae)/2:ft,Ge?(pe+de)/2:kt);return j.center=this.unproject.call({worldSize:te},zt).wrap(),j.zoom+=this.scaleZoom(Gt),j}if(this.latRange){const zt=lt/2;kt-zt<de&&(Mt=de+zt),kt+zt>pe&&(Mt=pe-zt)}if(Y){const zt=(Ae+Be)/2;let Xt=ft;this._renderWorldCopies&&(Xt=n.b3(ft,zt-te/2,zt+te/2));const Zt=at/2;Xt-Zt<Ae&&(Nt=Ae+Zt),Xt+Zt>Be&&(Nt=Be-Zt)}if(Nt!==void 0||Mt!==void 0){const zt=new n.P(Nt??ft,Mt??kt);j.center=this.unproject.call({worldSize:te},zt).wrap()}return j}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:P,zoom:j}=this.getConstrained(this.center,this.zoom);this.center=P,this.zoom=j,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this._fov/2,P=this.centerOffset,j=this.point.x,Y=this.point.y;this.cameraToCenterDistance=.5/Math.tan(O)*this.height,this._pixelPerMeter=n.b5(1,this.center.lat)*this.worldSize;let te=n.ao(new Float64Array(16));n.K(te,te,[this.width/2,-this.height/2,1]),n.J(te,te,[1,-1,0]),this.labelPlaneMatrix=te,te=n.ao(new Float64Array(16)),n.K(te,te,[1,-1,1]),n.J(te,te,[-1,-1,0]),n.K(te,te,[2/this.width,2/this.height,1]),this.glCoordMatrix=te;const de=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),pe=Math.min(this.elevation,this.minElevationForCurrentTile),Ae=de-pe*this._pixelPerMeter/Math.cos(this._pitch),Be=pe<0?Ae:de,Ge=Math.PI/2+this._pitch,qe=this._fov*(.5+P.y/this.height),at=Math.sin(qe)*Be/Math.sin(n.ad(Math.PI-Ge-qe,.01,Math.PI-.01)),lt=this.getHorizon(),ft=2*Math.atan(lt/this.cameraToCenterDistance)*(.5+P.y/(2*lt)),kt=Math.sin(ft)*Be/Math.sin(n.ad(Math.PI-Ge-ft,.01,Math.PI-.01)),Nt=Math.min(at,kt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Nt+Be),this.nearZ=this.height/50,te=new Float64Array(16),n.b6(te,this._fov,this.width/this.height,this.nearZ,this.farZ),te[8]=2*-P.x/this.width,te[9]=2*P.y/this.height,this.projectionMatrix=n.af(te),n.K(te,te,[1,-1,1]),n.J(te,te,[0,0,-this.cameraToCenterDistance]),n.b7(te,te,this._pitch),n.ae(te,te,this.angle),n.J(te,te,[-j,-Y,0]),this.mercatorMatrix=n.K([],te,[this.worldSize,this.worldSize,this.worldSize]),n.K(te,te,[1,1,this._pixelPerMeter]),this.pixelMatrix=n.L(new Float64Array(16),this.labelPlaneMatrix,te),n.J(te,te,[0,0,-this.elevation]),this.modelViewProjectionMatrix=te,this.invModelViewProjectionMatrix=n.at([],te),this.fogMatrix=new Float64Array(16),n.b6(this.fogMatrix,this._fov,this.width/this.height,de,this.farZ),this.fogMatrix[8]=2*-P.x/this.width,this.fogMatrix[9]=2*P.y/this.height,n.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),n.b7(this.fogMatrix,this.fogMatrix,this._pitch),n.ae(this.fogMatrix,this.fogMatrix,this.angle),n.J(this.fogMatrix,this.fogMatrix,[-j,-Y,0]),n.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),n.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=n.L(new Float64Array(16),this.labelPlaneMatrix,te);const Mt=this.width%2/2,Gt=this.height%2/2,zt=Math.cos(this.angle),Xt=Math.sin(this.angle),Zt=j-Math.round(j)+zt*Mt+Xt*Gt,Yt=Y-Math.round(Y)+zt*Gt+Xt*Mt,ya=new Float64Array(te);if(n.J(ya,ya,[Zt>.5?Zt-1:Zt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=ya,te=n.at(new Float64Array(16),this.pixelMatrix),!te)throw new Error("failed to invert matrix");this.pixelMatrixInverse=te,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new n.P(0,0)),P=[O.x*this.worldSize,O.y*this.worldSize,0,1];return n.ag(P,P,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=this._pitch,P=Math.tan(O)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new n.P(0,P))}getCameraQueryGeometry(O){const P=this.getCameraPoint();if(O.length===1)return[O[0],P];{let j=P.x,Y=P.y,te=P.x,de=P.y;for(const pe of O)j=Math.min(j,pe.x),Y=Math.min(Y,pe.y),te=Math.max(te,pe.x),de=Math.max(de,pe.y);return[new n.P(j,Y),new n.P(te,Y),new n.P(te,de),new n.P(j,de),new n.P(j,Y)]}}lngLatToCameraDepth(O,P){const j=this.locationCoordinate(O),Y=[j.x*this.worldSize,j.y*this.worldSize,P,1];return n.ag(Y,Y,this.modelViewProjectionMatrix),Y[2]/Y[3]}}function Us(H,O){let P,j=!1,Y=null,te=null;const de=()=>{Y=null,j&&(H.apply(te,P),Y=setTimeout(de,O),j=!1)};return(...pe)=>(j=!0,te=this,P=pe,Y||de(),Y)}class eo{constructor(O){this._getCurrentHash=()=>{const P=window.location.hash.replace("#","");if(this._hashName){let j;return P.split("&").map(Y=>Y.split("=")).forEach(Y=>{Y[0]===this._hashName&&(j=Y)}),(j&&j[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{const P=this._getCurrentHash();if(P.length>=3&&!P.some(j=>isNaN(j))){const j=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:j,pitch:+(P[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const P=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{const P=this._getCurrentHash();if(P.length===0)return;const j=P.join("/");let Y=j;Y.split("&").length>0&&(Y=Y.split("&")[0]),this._hashName&&(Y=`${this._hashName}=${j}`);let te=window.location.hash.replace(Y,"");te.startsWith("#&")?te=te.slice(0,1)+te.slice(2):te==="#"&&(te="");let de=window.location.href.replace(/(#.+)?$/,te);de=de.replace("&&","&"),window.history.replaceState(window.history.state,null,de)},this._updateHash=Us(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(O){const P=this._map.getCenter(),j=Math.round(100*this._map.getZoom())/100,Y=Math.ceil((j*Math.LN2+Math.log(512/360/.5))/Math.LN10),te=Math.pow(10,Y),de=Math.round(P.lng*te)/te,pe=Math.round(P.lat*te)/te,Ae=this._map.getBearing(),Be=this._map.getPitch();let Ge="";if(Ge+=O?`/${de}/${pe}/${j}`:`${j}/${pe}/${de}`,(Ae||Be)&&(Ge+="/"+Math.round(10*Ae)/10),Be&&(Ge+=`/${Math.round(Be)}`),this._hashName){const qe=this._hashName;let at=!1;const lt=window.location.hash.slice(1).split("&").map(ft=>{const kt=ft.split("=")[0];return kt===qe?(at=!0,`${kt}=${Ge}`):ft}).filter(ft=>ft);return at||lt.push(`${qe}=${Ge}`),`#${lt.join("&")}`}return`#${Ge}`}}const Oo={linearity:.3,easing:n.b8(0,0,.3,1)},ai=n.e({deceleration:2500,maxSpeed:1400},Oo),ii=n.e({deceleration:20,maxSpeed:1400},Oo),Ro=n.e({deceleration:1e3,maxSpeed:360},Oo),pc=n.e({deceleration:1e3,maxSpeed:90},Oo);class fc{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,P=l.now();for(;O.length>0&&P-O[0].time>160;)O.shift()}_onMoveEnd(O){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const P={zoom:0,bearing:0,pitch:0,pan:new n.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:te}of this._inertiaBuffer)P.zoom+=te.zoomDelta||0,P.bearing+=te.bearingDelta||0,P.pitch+=te.pitchDelta||0,te.panDelta&&P.pan._add(te.panDelta),te.around&&(P.around=te.around),te.pinchAround&&(P.pinchAround=te.pinchAround);const j=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Y={};if(P.pan.mag()){const te=lc(P.pan.mag(),j,n.e({},ai,O||{}));Y.offset=P.pan.mult(te.amount/P.pan.mag()),Y.center=this._map.transform.center,mc(Y,te)}if(P.zoom){const te=lc(P.zoom,j,ii);Y.zoom=this._map.transform.zoom+te.amount,mc(Y,te)}if(P.bearing){const te=lc(P.bearing,j,Ro);Y.bearing=this._map.transform.bearing+n.ad(te.amount,-179,179),mc(Y,te)}if(P.pitch){const te=lc(P.pitch,j,pc);Y.pitch=this._map.transform.pitch+te.amount,mc(Y,te)}if(Y.zoom||Y.bearing){const te=P.pinchAround===void 0?P.around:P.pinchAround;Y.around=te?this._map.unproject(te):this._map.getCenter()}return this.clear(),n.e(Y,{noMoveStart:!0})}}function mc(H,O){(!H.duration||H.duration<O.duration)&&(H.duration=O.duration,H.easing=O.easing)}function lc(H,O,P){const{maxSpeed:j,linearity:Y,deceleration:te}=P,de=n.ad(H*Y/(O/1e3),-j,j),pe=Math.abs(de)/(te*Y);return{easing:P.easing,duration:1e3*pe,amount:de*(pe/2)}}class gs extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j,Y={}){const te=o.mousePos(P.getCanvas(),j),de=P.unproject(te);super(O,n.e({point:te,lngLat:de,originalEvent:j},Y)),this._defaultPrevented=!1,this.target=P}}class wo extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){const Y=O==="touchend"?j.changedTouches:j.touches,te=o.touchPos(P.getCanvasContainer(),Y),de=te.map(Ae=>P.unproject(Ae)),pe=te.reduce((Ae,Be,Ge,qe)=>Ae.add(Be.div(qe.length)),new n.P(0,0));super(O,{points:te,point:pe,lngLats:de,lngLat:P.unproject(pe),originalEvent:j}),this._defaultPrevented=!1}}class sl extends n.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,P,j){super(O,{originalEvent:j}),this._defaultPrevented=!1}}class jl{constructor(O,P){this._map=O,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new sl(O.type,this._map,O))}mousedown(O,P){return this._mousedownPos=P,this._firePreventable(new gs(O.type,this._map,O))}mouseup(O){this._map.fire(new gs(O.type,this._map,O))}click(O,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new gs(O.type,this._map,O))}dblclick(O){return this._firePreventable(new gs(O.type,this._map,O))}mouseover(O){this._map.fire(new gs(O.type,this._map,O))}mouseout(O){this._map.fire(new gs(O.type,this._map,O))}touchstart(O){return this._firePreventable(new wo(O.type,this._map,O))}touchmove(O){this._map.fire(new wo(O.type,this._map,O))}touchend(O){this._map.fire(new wo(O.type,this._map,O))}touchcancel(O){this._map.fire(new wo(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class co{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new gs(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gs("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new gs(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class no{constructor(O){this._map=O}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(O){return this.transform.pointLocation(n.P.convert(O),this._map.terrain)}}class ko{constructor(O,P){this._map=O,this._tr=new no(O),this._el=O.getCanvasContainer(),this._container=O.getContainer(),this._clickTolerance=P.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(O,P){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(O,P){if(!this._active)return;const j=P;if(this._lastPos.equals(j)||!this._box&&j.dist(this._startPos)<this._clickTolerance)return;const Y=this._startPos;this._lastPos=j,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const te=Math.min(Y.x,j.x),de=Math.max(Y.x,j.x),pe=Math.min(Y.y,j.y),Ae=Math.max(Y.y,j.y);o.setTransform(this._box,`translate(${te}px,${pe}px)`),this._box.style.width=de-te+"px",this._box.style.height=Ae-pe+"px"}mouseupWindow(O,P){if(!this._active||O.button!==0)return;const j=this._startPos,Y=P;if(this.reset(),o.suppressClick(),j.x!==Y.x||j.y!==Y.y)return this._map.fire(new n.k("boxzoomend",{originalEvent:O})),{cameraAnimation:te=>te.fitScreenCoordinates(j,Y,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,P){return this._map.fire(new n.k(O,{originalEvent:P}))}}function Ei(H,O){if(H.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${H.length}, points ${O.length}`);const P={};for(let j=0;j<H.length;j++)P[H[j].identifier]=O[j];return P}class Yi{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,P,j){(this.centroid||j.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),j.length===this.numTouches&&(this.centroid=function(Y){const te=new n.P(0,0);for(const de of Y)te._add(de);return te.div(Y.length)}(P),this.touches=Ei(j,P)))}touchmove(O,P,j){if(this.aborted||!this.centroid)return;const Y=Ei(j,P);for(const te in this.touches){const de=this.touches[te],pe=Y[te];(!pe||pe.dist(de)>30)&&(this.aborted=!0)}}touchend(O,P,j){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),j.length===0){const Y=!this.aborted&&this.centroid;if(this.reset(),Y)return Y}}}class ui{constructor(O){this.singleTap=new Yi(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,P,j){this.singleTap.touchstart(O,P,j)}touchmove(O,P,j){this.singleTap.touchmove(O,P,j)}touchend(O,P,j){const Y=this.singleTap.touchend(O,P,j);if(Y){const te=O.timeStamp-this.lastTime<500,de=!this.lastTap||this.lastTap.dist(Y)<30;if(te&&de||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Y,this.count===this.numTaps)return this.reset(),Y}}}class Ji{constructor(O){this._tr=new no(O),this._zoomIn=new ui({numTouches:1,numTaps:2}),this._zoomOut=new ui({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,P,j){this._zoomIn.touchstart(O,P,j),this._zoomOut.touchstart(O,P,j)}touchmove(O,P,j){this._zoomIn.touchmove(O,P,j),this._zoomOut.touchmove(O,P,j)}touchend(O,P,j){const Y=this._zoomIn.touchend(O,P,j),te=this._zoomOut.touchend(O,P,j),de=this._tr;return Y?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:de.zoom+1,around:de.unproject(Y)},{originalEvent:O})}):te?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:pe=>pe.easeTo({duration:300,zoom:de.zoom-1,around:de.unproject(te)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eo{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const P=this._moveFunction(...O);if(P.bearingDelta||P.pitchDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(O,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=P.length?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,P){if(!this.isEnabled())return;const j=this._lastPoint;if(!j)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Y=P.length?P[0]:P;return!this._moved&&Y.dist(j)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Y,this._move(j,Y))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const xl={0:1,2:2};class Vo{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const P=o.mouseButton(O);this._eventButton=P}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!function(P,j){const Y=xl[j];return P.buttons===void 0||(P.buttons&Y)!==Y}(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class wl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){const P=O.targetTouches[0].identifier;this._firstTouch=P}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const uo=H=>{H.mousedown=H.dragStart,H.mousemoveWindow=H.dragMove,H.mouseup=H.dragEnd,H.contextmenu=O=>{O.preventDefault()}},Ul=({enable:H,clickTolerance:O,bearingDegreesPerPixelMoved:P=.8})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({bearingDelta:(te.x-Y.x)*P}),moveStateManager:j,enable:H,assignEvents:uo})},Gs=({enable:H,clickTolerance:O,pitchDegreesPerPixelMoved:P=-.5})=>{const j=new Vo({checkCorrectEvent:Y=>o.mouseButton(Y)===0&&Y.ctrlKey||o.mouseButton(Y)===2});return new Eo({clickTolerance:O,move:(Y,te)=>({pitchDelta:(te.y-Y.y)*P}),moveStateManager:j,enable:H,assignEvents:uo})};class rs{constructor(O,P){this._clickTolerance=O.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new n.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,P,j){return this._calculateTransform(O,P,j)}touchmove(O,P,j){if(this._active){if(!this._shouldBePrevented(j.length))return O.preventDefault(),this._calculateTransform(O,P,j);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,P,j){this._calculateTransform(O,P,j),this._active&&this._shouldBePrevented(j.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,P,j){j.length>0&&(this._active=!0);const Y=Ei(j,P),te=new n.P(0,0),de=new n.P(0,0);let pe=0;for(const Be in Y){const Ge=Y[Be],qe=this._touches[Be];qe&&(te._add(Ge),de._add(Ge.sub(qe)),pe++,Y[Be]=Ge)}if(this._touches=Y,this._shouldBePrevented(pe)||!de.mag())return;const Ae=de.div(pe);return this._sum._add(Ae),this._sum.mag()<this._clickTolerance?void 0:{around:te.div(pe),panDelta:Ae}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,P,j){this._firstTwoTouches||j.length<2||(this._firstTwoTouches=[j[0].identifier,j[1].identifier],this._start([P[0],P[1]]))}touchmove(O,P,j){if(!this._firstTwoTouches)return;O.preventDefault();const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),pe=yi(j,P,te);if(!de||!pe)return;const Ae=this._aroundCenter?null:de.add(pe).div(2);return this._move([de,pe],Ae,O)}touchend(O,P,j){if(!this._firstTwoTouches)return;const[Y,te]=this._firstTwoTouches,de=yi(j,P,Y),pe=yi(j,P,te);de&&pe||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function yi(H,O,P){for(let j=0;j<H.length;j++)if(H[j].identifier===P)return O[j]}function us(H,O){return Math.log(H/O)/Math.LN2}class Qn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,P){const j=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(us(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:us(this._distance,j),pinchAround:P}}}function _c(H,O){return 180*H.angleWith(O)/Math.PI}class qc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,P,j){const Y=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:_c(this._vector,Y),pinchAround:P}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const P=25/(Math.PI*this._minDiameter)*360,j=_c(O,this._startVector);return Math.abs(j)<P}}function ll(H){return Math.abs(H.y)>Math.abs(H.x)}class kl extends go{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,P,j){super.touchstart(O,P,j),this._currentTouchCount=j.length}_start(O){this._lastPoints=O,ll(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,P,j){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Y=O[0].sub(this._lastPoints[0]),te=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Y,te,j.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Y.y+te.y)/2*-.5}):void 0}gestureBeginsVertically(O,P,j){if(this._valid!==void 0)return this._valid;const Y=O.mag()>=2,te=P.mag()>=2;if(!Y&&!te)return;if(!Y||!te)return this._firstMove===void 0&&(this._firstMove=j),j-this._firstMove<100&&void 0;const de=O.y>0==P.y>0;return ll(O)&&ll(P)&&de}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class cc{constructor(O){this._tr=new no(O);const P=Cl;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let P=0,j=0,Y=0,te=0,de=0;switch(O.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:O.shiftKey?j=-1:(O.preventDefault(),te=-1);break;case 39:O.shiftKey?j=1:(O.preventDefault(),te=1);break;case 38:O.shiftKey?Y=1:(O.preventDefault(),de=-1);break;case 40:O.shiftKey?Y=-1:(O.preventDefault(),de=1);break;default:return}return this._rotationDisabled&&(j=0,Y=0),{cameraAnimation:pe=>{const Ae=this._tr;pe.easeTo({duration:300,easeId:"keyboardHandler",easing:jn,zoom:P?Math.round(Ae.zoom)+P*(O.shiftKey?2:1):Ae.zoom,bearing:Ae.bearing+j*this._bearingStep,pitch:Ae.pitch+Y*this._pitchStep,offset:[-te*this._panStep,-de*this._panStep],center:Ae.center},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function jn(H){return H*(2-H)}const Hs=4.000244140625;class Ws{constructor(O,P){this._onTimeout=j=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(j)},this._map=O,this._tr=new no(O),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let P=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const j=l.now(),Y=j-(this._lastWheelEventTime||0);this._lastWheelEventTime=j,P!==0&&P%Hs==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":Y>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Y*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),O.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=O,this._delta-=P,this._active||this._start(O)),O.preventDefault()}_start(O){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const P=o.mousePos(this._map.getCanvas(),O),j=this._tr;P.y>j.transform.height/2-j.transform.getHorizon()?this._around=n.N.convert(this._aroundCenter?j.center:j.unproject(P)):this._around=n.N.convert(j.center),this._aroundPoint=j.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const Ae=this._type==="wheel"&&Math.abs(this._delta)>Hs?this._wheelZoomRate:this._defaultZoomRate;let Be=2/(1+Math.exp(-Math.abs(this._delta*Ae)));this._delta<0&&Be!==0&&(Be=1/Be);const Ge=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(Ge*Be))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const P=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,j=this._startZoom,Y=this._easing;let te,de=!1;const pe=l.now()-this._lastWheelEventTime;if(this._type==="wheel"&&j&&Y&&pe){const Ae=Math.min(pe/200,1),Be=Y(Ae);te=n.z.number(j,P,Be),Ae<1?this._frameId||(this._frameId=!0):de=!0}else te=P,de=!0;return this._active=!0,de&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!de,zoomDelta:te-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let P=n.b9;if(this._prevEase){const j=this._prevEase,Y=(l.now()-j.start)/j.duration,te=j.easing(Y+.01)-j.easing(Y),de=.27/Math.sqrt(te*te+1e-4)*.01,pe=Math.sqrt(.0729-de*de);P=n.b8(de,pe,.25,1)}return this._prevEase={start:l.now(),duration:O,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Pi{constructor(O,P){this._clickZoom=O,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class hs{constructor(O){this._tr=new no(O),this.reset()}reset(){this._active=!1}dblclick(O,P){return O.preventDefault(),{cameraAnimation:j=>{j.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(P)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ss{constructor(){this._tap=new ui({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(O,P,j){if(!this._swipePoint)if(this._tapTime){const Y=P[0],te=O.timeStamp-this._tapTime<500,de=this._tapPoint.dist(Y)<30;te&&de?j.length>0&&(this._swipePoint=Y,this._swipeTouch=j[0].identifier):this.reset()}else this._tap.touchstart(O,P,j)}touchmove(O,P,j){if(this._tapTime){if(this._swipePoint){if(j[0].identifier!==this._swipeTouch)return;const Y=P[0],te=Y.y-this._swipePoint.y;return this._swipePoint=Y,O.preventDefault(),this._active=!0,{zoomDelta:te/128}}}else this._tap.touchmove(O,P,j)}touchend(O,P,j){if(this._tapTime)this._swipePoint&&j.length===0&&this.reset();else{const Y=this._tap.touchend(O,P,j);Y&&(this._tapTime=O.timeStamp,this._tapPoint=Y)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class is{constructor(O,P,j){this._el=O,this._mousePan=P,this._touchPan=j}enable(O){this._inertiaOptions=O||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ho{constructor(O,P,j){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=P,this._mousePitch=j}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Os{constructor(O,P,j,Y){this._el=O,this._touchZoom=P,this._touchRotate=j,this._tapDragZoom=Y,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $o{constructor(O,P){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const j=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Y=document.createElement("div");Y.className="maplibregl-desktop-message",Y.textContent=P,this._container.appendChild(Y);const te=document.createElement("div");te.className="maplibregl-mobile-message",te.textContent=j,this._container.appendChild(te),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(O){return O[this._bypassKey]}notifyGestureBlocked(O,P){this._enabled&&(this._map.fire(new n.k("cooperativegestureprevented",{gestureType:O,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const os=H=>H.zoom||H.drag||H.pitch||H.rotate;class Sl extends n.k{}function zr(H){return H.panDelta&&H.panDelta.mag()||H.zoomDelta||H.bearingDelta||H.pitchDelta}class Kr{constructor(O,P){this.handleWindowEvent=Y=>{this.handleEvent(Y,`${Y.type}Window`)},this.handleEvent=(Y,te)=>{if(Y.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const de=Y.type==="renderFrame"?void 0:Y,pe={needsRenderFrame:!1},Ae={},Be={},Ge=Y.touches,qe=Ge?this._getMapTouches(Ge):void 0,at=qe?o.touchPos(this._map.getCanvas(),qe):o.mousePos(this._map.getCanvas(),Y);for(const{handlerName:kt,handler:Nt,allowed:Mt}of this._handlers){if(!Nt.isEnabled())continue;let Gt;this._blockedByActive(Be,Mt,kt)?Nt.reset():Nt[te||Y.type]&&(Gt=Nt[te||Y.type](Y,at,qe),this.mergeHandlerResult(pe,Ae,Gt,kt,de),Gt&&Gt.needsRenderFrame&&this._triggerRenderFrame()),(Gt||Nt.isActive())&&(Be[kt]=Nt)}const lt={};for(const kt in this._previousActiveHandlers)Be[kt]||(lt[kt]=de);this._previousActiveHandlers=Be,(Object.keys(lt).length||zr(pe))&&(this._changes.push([pe,Ae,lt]),this._triggerRenderFrame()),(Object.keys(Be).length||zr(pe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ft}=pe;ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ft(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fc(O),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);const j=this._el;this._listeners=[[j,"touchstart",{passive:!0}],[j,"touchmove",{passive:!1}],[j,"touchend",void 0],[j,"touchcancel",void 0],[j,"mousedown",void 0],[j,"mousemove",void 0],[j,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[j,"mouseover",void 0],[j,"mouseout",void 0],[j,"dblclick",void 0],[j,"click",void 0],[j,"keydown",{capture:!1}],[j,"keyup",void 0],[j,"wheel",{passive:!1}],[j,"contextmenu",void 0],[window,"blur",void 0]];for(const[Y,te,de]of this._listeners)o.addEventListener(Y,te,Y===document?this.handleWindowEvent:this.handleEvent,de)}destroy(){for(const[O,P,j]of this._listeners)o.removeEventListener(O,P,O===document?this.handleWindowEvent:this.handleEvent,j)}_addDefaultHandlers(O){const P=this._map,j=P.getCanvasContainer();this._add("mapEvent",new jl(P,O));const Y=P.boxZoom=new ko(P,O);this._add("boxZoom",Y),O.interactive&&O.boxZoom&&Y.enable();const te=P.cooperativeGestures=new $o(P,O.cooperativeGestures);this._add("cooperativeGestures",te),O.cooperativeGestures&&te.enable();const de=new Ji(P),pe=new hs(P);P.doubleClickZoom=new Pi(pe,de),this._add("tapZoom",de),this._add("clickZoom",pe),O.interactive&&O.doubleClickZoom&&P.doubleClickZoom.enable();const Ae=new Ss;this._add("tapDragZoom",Ae);const Be=P.touchPitch=new kl(P);this._add("touchPitch",Be),O.interactive&&O.touchPitch&&P.touchPitch.enable(O.touchPitch);const Ge=Ul(O),qe=Gs(O);P.dragRotate=new ho(O,Ge,qe),this._add("mouseRotate",Ge,["mousePitch"]),this._add("mousePitch",qe,["mouseRotate"]),O.interactive&&O.dragRotate&&P.dragRotate.enable();const at=(({enable:Gt,clickTolerance:zt})=>{const Xt=new Vo({checkCorrectEvent:Zt=>o.mouseButton(Zt)===0&&!Zt.ctrlKey});return new Eo({clickTolerance:zt,move:(Zt,Yt)=>({around:Yt,panDelta:Yt.sub(Zt)}),activateOnStart:!0,moveStateManager:Xt,enable:Gt,assignEvents:uo})})(O),lt=new rs(O,P);P.dragPan=new is(j,at,lt),this._add("mousePan",at),this._add("touchPan",lt,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&P.dragPan.enable(O.dragPan);const ft=new qc,kt=new Qn;P.touchZoomRotate=new Os(j,kt,ft,Ae),this._add("touchRotate",ft,["touchPan","touchZoom"]),this._add("touchZoom",kt,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&P.touchZoomRotate.enable(O.touchZoomRotate);const Nt=P.scrollZoom=new Ws(P,()=>this._triggerRenderFrame());this._add("scrollZoom",Nt,["mousePan"]),O.interactive&&O.scrollZoom&&P.scrollZoom.enable(O.scrollZoom);const Mt=P.keyboard=new cc(P);this._add("keyboard",Mt),O.interactive&&O.keyboard&&P.keyboard.enable(),this._add("blockableMapEvent",new co(P))}_add(O,P,j){this._handlers.push({handlerName:O,handler:P,allowed:j}),this._handlersById[O]=P}stop(O){if(!this._updatingCamera){for(const{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!os(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,P,j){for(const Y in O)if(Y!==j&&(!P||P.indexOf(Y)<0))return!0;return!1}_getMapTouches(O){const P=[];for(const j of O){const Y=j.target;this._el.contains(Y)&&P.push(j)}return P}mergeHandlerResult(O,P,j,Y,te){if(!j)return;n.e(O,j);const de={handlerName:Y,originalEvent:j.originalEvent||te};j.zoomDelta!==void 0&&(P.zoom=de),j.panDelta!==void 0&&(P.drag=de),j.pitchDelta!==void 0&&(P.pitch=de),j.bearingDelta!==void 0&&(P.rotate=de)}_applyChanges(){const O={},P={},j={};for(const[Y,te,de]of this._changes)Y.panDelta&&(O.panDelta=(O.panDelta||new n.P(0,0))._add(Y.panDelta)),Y.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Y.zoomDelta),Y.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Y.bearingDelta),Y.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Y.pitchDelta),Y.around!==void 0&&(O.around=Y.around),Y.pinchAround!==void 0&&(O.pinchAround=Y.pinchAround),Y.noInertia&&(O.noInertia=Y.noInertia),n.e(P,te),n.e(j,de);this._updateMapTransform(O,P,j),this._changes=[]}_updateMapTransform(O,P,j){const Y=this._map,te=Y._getTransformForUpdate(),de=Y.terrain;if(!(zr(O)||de&&this._terrainMovement))return this._fireEvents(P,j,!0);let{panDelta:pe,zoomDelta:Ae,bearingDelta:Be,pitchDelta:Ge,around:qe,pinchAround:at}=O;at!==void 0&&(qe=at),Y._stop(!0),qe=qe||Y.transform.centerPoint;const lt=te.pointLocation(pe?qe.sub(pe):qe);Be&&(te.bearing+=Be),Ge&&(te.pitch+=Ge),Ae&&(te.zoom+=Ae),de?this._terrainMovement||!P.drag&&!P.zoom?P.drag&&this._terrainMovement?te.center=te.pointLocation(te.centerPoint.sub(pe)):te.setLocationAtPoint(lt,qe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,te.setLocationAtPoint(lt,qe)):te.setLocationAtPoint(lt,qe),Y._applyUpdatedTransform(te),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(P,j,!0)}_fireEvents(O,P,j){const Y=os(this._eventsInProgress),te=os(O),de={};for(const qe in O){const{originalEvent:at}=O[qe];this._eventsInProgress[qe]||(de[`${qe}start`]=at),this._eventsInProgress[qe]=O[qe]}!Y&&te&&this._fireEvent("movestart",te.originalEvent);for(const qe in de)this._fireEvent(qe,de[qe]);te&&this._fireEvent("move",te.originalEvent);for(const qe in O){const{originalEvent:at}=O[qe];this._fireEvent(qe,at)}const pe={};let Ae;for(const qe in this._eventsInProgress){const{handlerName:at,originalEvent:lt}=this._eventsInProgress[qe];this._handlersById[at].isActive()||(delete this._eventsInProgress[qe],Ae=P[at]||lt,pe[`${qe}end`]=Ae)}for(const qe in pe)this._fireEvent(qe,pe[qe]);const Be=os(this._eventsInProgress),Ge=(Y||te)&&!Be;if(Ge&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qe=this._map._getTransformForUpdate();qe.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qe)}if(j&&Ge){this._updatingCamera=!0;const qe=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),at=lt=>lt!==0&&-this._bearingSnap<lt&<<this._bearingSnap;!qe||!qe.essential&&l.prefersReducedMotion?(this._map.fire(new n.k("moveend",{originalEvent:Ae})),at(this._map.getBearing())&&this._map.resetNorth()):(at(qe.bearing||this._map.getBearing())&&(qe.bearing=0),qe.freezeElevation=!0,this._map.easeTo(qe,{originalEvent:Ae})),this._updatingCamera=!1}}_fireEvent(O,P){this._map.fire(new n.k(O,P?{originalEvent:P}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new Sl("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Xi extends n.E{constructor(O,P){super(),this._renderFrameCallback=()=>{const j=Math.min((l.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(j)),j<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=P.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new n.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,P){return this.jumpTo({center:O},P)}panBy(O,P,j){return O=n.P.convert(O).mult(-1),this.panTo(this.transform.center,n.e({offset:O},P),j)}panTo(O,P,j){return this.easeTo(n.e({center:O},P),j)}getZoom(){return this.transform.zoom}setZoom(O,P){return this.jumpTo({zoom:O},P),this}zoomTo(O,P,j){return this.easeTo(n.e({zoom:O},P),j)}zoomIn(O,P){return this.zoomTo(this.getZoom()+1,O,P),this}zoomOut(O,P){return this.zoomTo(this.getZoom()-1,O,P),this}getBearing(){return this.transform.bearing}setBearing(O,P){return this.jumpTo({bearing:O},P),this}getPadding(){return this.transform.padding}setPadding(O,P){return this.jumpTo({padding:O},P),this}rotateTo(O,P,j){return this.easeTo(n.e({bearing:O},P),j)}resetNorth(O,P){return this.rotateTo(0,n.e({duration:1e3},O),P),this}resetNorthPitch(O,P){return this.easeTo(n.e({bearing:0,pitch:0,duration:1e3},O),P),this}snapToNorth(O,P){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,P):this}getPitch(){return this.transform.pitch}setPitch(O,P){return this.jumpTo({pitch:O},P),this}cameraForBounds(O,P){O=xe.convert(O);const j=P&&P.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),j,P)}_cameraForBoxAndBearing(O,P,j,Y){const te={top:0,bottom:0,right:0,left:0};if(typeof(Y=n.e({padding:te,offset:[0,0],maxZoom:this.transform.maxZoom},Y)).padding=="number"){const Tn=Y.padding;Y.padding={top:Tn,bottom:Tn,right:Tn,left:Tn}}Y.padding=n.e(te,Y.padding);const de=this.transform,pe=de.padding,Ae=new xe(O,P),Be=de.project(Ae.getNorthWest()),Ge=de.project(Ae.getNorthEast()),qe=de.project(Ae.getSouthEast()),at=de.project(Ae.getSouthWest()),lt=n.ba(-j),ft=Be.rotate(lt),kt=Ge.rotate(lt),Nt=qe.rotate(lt),Mt=at.rotate(lt),Gt=new n.P(Math.max(ft.x,kt.x,Mt.x,Nt.x),Math.max(ft.y,kt.y,Mt.y,Nt.y)),zt=new n.P(Math.min(ft.x,kt.x,Mt.x,Nt.x),Math.min(ft.y,kt.y,Mt.y,Nt.y)),Xt=Gt.sub(zt),Zt=(de.width-(pe.left+pe.right+Y.padding.left+Y.padding.right))/Xt.x,Yt=(de.height-(pe.top+pe.bottom+Y.padding.top+Y.padding.bottom))/Xt.y;if(Yt<0||Zt<0)return void n.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const ya=Math.min(de.scaleZoom(de.scale*Math.min(Zt,Yt)),Y.maxZoom),Ca=n.P.convert(Y.offset),La=(Y.padding.left-Y.padding.right)/2,ja=(Y.padding.top-Y.padding.bottom)/2,Wa=new n.P(La,ja).rotate(n.ba(j)),on=Ca.add(Wa).mult(de.scale/de.zoomScale(ya));return{center:de.unproject(Be.add(qe).div(2).sub(on)),zoom:ya,bearing:j}}fitBounds(O,P,j){return this._fitInternal(this.cameraForBounds(O,P),P,j)}fitScreenCoordinates(O,P,j,Y,te){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(n.P.convert(O)),this.transform.pointLocation(n.P.convert(P)),j,Y),Y,te)}_fitInternal(O,P,j){return O?(delete(P=n.e(O,P)).padding,P.linear?this.easeTo(P,j):this.flyTo(P,j)):this}jumpTo(O,P){this.stop();const j=this._getTransformForUpdate();let Y=!1,te=!1,de=!1;return"zoom"in O&&j.zoom!==+O.zoom&&(Y=!0,j.zoom=+O.zoom),O.center!==void 0&&(j.center=n.N.convert(O.center)),"bearing"in O&&j.bearing!==+O.bearing&&(te=!0,j.bearing=+O.bearing),"pitch"in O&&j.pitch!==+O.pitch&&(de=!0,j.pitch=+O.pitch),O.padding==null||j.isPaddingEqual(O.padding)||(j.padding=O.padding),this._applyUpdatedTransform(j),this.fire(new n.k("movestart",P)).fire(new n.k("move",P)),Y&&this.fire(new n.k("zoomstart",P)).fire(new n.k("zoom",P)).fire(new n.k("zoomend",P)),te&&this.fire(new n.k("rotatestart",P)).fire(new n.k("rotate",P)).fire(new n.k("rotateend",P)),de&&this.fire(new n.k("pitchstart",P)).fire(new n.k("pitch",P)).fire(new n.k("pitchend",P)),this.fire(new n.k("moveend",P))}calculateCameraOptionsFromTo(O,P,j,Y=0){const te=n.Z.fromLngLat(O,P),de=n.Z.fromLngLat(j,Y),pe=de.x-te.x,Ae=de.y-te.y,Be=de.z-te.z,Ge=Math.hypot(pe,Ae,Be);if(Ge===0)throw new Error("Can't calculate camera options with same From and To");const qe=Math.hypot(pe,Ae),at=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Ge/this.transform.tileSize),lt=180*Math.atan2(pe,-Ae)/Math.PI;let ft=180*Math.acos(qe/Ge)/Math.PI;return ft=Be<0?90-ft:90+ft,{center:de.toLngLat(),zoom:at,pitch:ft,bearing:lt}}easeTo(O,P){var j;this._stop(!1,O.easeId),((O=n.e({offset:[0,0],duration:500,easing:n.b9},O)).animate===!1||!O.essential&&l.prefersReducedMotion)&&(O.duration=0);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,pe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:pe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.project(ft),Gt=Y.project(kt).sub(Mt),zt=Y.zoomScale(Nt-te);let Xt,Zt;O.around&&(Xt=n.N.convert(O.around),Zt=Y.locationPoint(Xt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Nt!==te,this._rotating=this._rotating||de!==Be,this._pitching=this._pitching||Ge!==pe,this._padding=!Y.isPaddingEqual(qe),this._easeId=O.easeId,this._prepareEase(P,O.noMoveStart,Yt),this.terrain&&this._prepareElevation(kt),this._ease(ya=>{if(this._zooming&&(Y.zoom=n.z.number(te,Nt,ya)),this._rotating&&(Y.bearing=n.z.number(de,Be,ya)),this._pitching&&(Y.pitch=n.z.number(pe,Ge,ya)),this._padding&&(Y.interpolatePadding(Ae,qe,ya),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(ya),Xt)Y.setLocationAtPoint(Xt,Zt);else{const Ca=Y.zoomScale(Y.zoom-te),La=Nt>te?Math.min(2,zt):Math.max(.5,zt),ja=Math.pow(La,1-ya),Wa=Y.unproject(Mt.add(Gt.mult(ya*ja)).mult(Ca));Y.setLocationAtPoint(Y.renderWorldCopies?Wa.wrap():Wa,lt)}this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},ya=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P,ya)},O),this}_prepareEase(O,P,j={}){this._moving=!0,P||j.moving||this.fire(new n.k("movestart",O)),this._zooming&&!j.zooming&&this.fire(new n.k("zoomstart",O)),this._rotating&&!j.rotating&&this.fire(new n.k("rotatestart",O)),this._pitching&&!j.pitching&&this.fire(new n.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&P!==this._elevationTarget){const j=this._elevationTarget-this._elevationStart,Y=(P-(j*O+this._elevationStart))/(1-O);this._elevationStart+=O*(j-Y),this._elevationTarget=P}this.transform.elevation=n.z.number(this._elevationStart,this._elevationTarget,O)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(O){const P=O.getCameraPosition(),j=this.terrain.getElevationForLngLatZoom(P.lngLat,O.zoom);if(P.altitude<j){const Y=this.calculateCameraOptionsFromTo(P.lngLat,j,O.center,O.elevation);return{pitch:Y.pitch,zoom:Y.zoom}}return{}}_applyUpdatedTransform(O){const P=[];if(this.terrain&&P.push(Y=>this._elevateCameraIfInsideTerrain(Y)),this.transformCameraUpdate&&P.push(Y=>this.transformCameraUpdate(Y)),!P.length)return;const j=O.clone();for(const Y of P){const te=j.clone(),{center:de,zoom:pe,pitch:Ae,bearing:Be,elevation:Ge}=Y(te);de&&(te.center=de),pe!==void 0&&(te.zoom=pe),Ae!==void 0&&(te.pitch=Ae),Be!==void 0&&(te.bearing=Be),Ge!==void 0&&(te.elevation=Ge),j.apply(te)}this.transform.apply(j)}_fireMoveEvents(O){this.fire(new n.k("move",O)),this._zooming&&this.fire(new n.k("zoom",O)),this._rotating&&this.fire(new n.k("rotate",O)),this._pitching&&this.fire(new n.k("pitch",O))}_afterEase(O,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;const j=this._zooming,Y=this._rotating,te=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,j&&this.fire(new n.k("zoomend",O)),Y&&this.fire(new n.k("rotateend",O)),te&&this.fire(new n.k("pitchend",O)),this.fire(new n.k("moveend",O))}flyTo(O,P){var j;if(!O.essential&&l.prefersReducedMotion){const kn=n.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,P)}this.stop(),O=n.e({offset:[0,0],speed:1.2,curve:1.42,easing:n.b9},O);const Y=this._getTransformForUpdate(),te=Y.zoom,de=Y.bearing,pe=Y.pitch,Ae=Y.padding,Be="bearing"in O?this._normalizeBearing(O.bearing,de):de,Ge="pitch"in O?+O.pitch:pe,qe="padding"in O?O.padding:Y.padding,at=n.P.convert(O.offset);let lt=Y.centerPoint.add(at);const ft=Y.pointLocation(lt),{center:kt,zoom:Nt}=Y.getConstrained(n.N.convert(O.center||ft),(j=O.zoom)!==null&&j!==void 0?j:te);this._normalizeCenter(kt,Y);const Mt=Y.zoomScale(Nt-te),Gt=Y.project(ft),zt=Y.project(kt).sub(Gt);let Xt=O.curve;const Zt=Math.max(Y.width,Y.height),Yt=Zt/Mt,ya=zt.mag();if("minZoom"in O){const kn=n.ad(Math.min(O.minZoom,te,Nt),Y.minZoom,Y.maxZoom),Ln=Zt/Y.zoomScale(kn-te);Xt=Math.sqrt(Ln/ya*2)}const Ca=Xt*Xt;function La(kn){const Ln=(Yt*Yt-Zt*Zt+(kn?-1:1)*Ca*Ca*ya*ya)/(2*(kn?Yt:Zt)*Ca*ya);return Math.log(Math.sqrt(Ln*Ln+1)-Ln)}function ja(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function Wa(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const on=La(!1);let Tn=function(kn){return Wa(on)/Wa(on+Xt*kn)},Qa=function(kn){return Zt*((Wa(on)*(ja(Ln=on+Xt*kn)/Wa(Ln))-ja(on))/Ca)/ya;var Ln},Sn=(La(!0)-on)/Xt;if(Math.abs(ya)<1e-6||!isFinite(Sn)){if(Math.abs(Zt-Yt)<1e-6)return this.easeTo(O,P);const kn=Yt<Zt?-1:1;Sn=Math.abs(Math.log(Yt/Zt))/Xt,Qa=()=>0,Tn=Ln=>Math.exp(kn*Xt*Ln)}if("duration"in O)O.duration=+O.duration;else{const kn="screenSpeed"in O?+O.screenSpeed/Xt:+O.speed;O.duration=1e3*Sn/kn}return O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=de!==Be,this._pitching=Ge!==pe,this._padding=!Y.isPaddingEqual(qe),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(kt),this._ease(kn=>{const Ln=kn*Sn,fn=1/Tn(Ln);Y.zoom=kn===1?Nt:te+Y.scaleZoom(fn),this._rotating&&(Y.bearing=n.z.number(de,Be,kn)),this._pitching&&(Y.pitch=n.z.number(pe,Ge,kn)),this._padding&&(Y.interpolatePadding(Ae,qe,kn),lt=Y.centerPoint.add(at)),this.terrain&&!O.freezeElevation&&this._updateElevation(kn);const Mn=kn===1?kt:Y.unproject(Gt.add(zt.mult(Qa(Ln))).mult(fn));Y.setLocationAtPoint(Y.renderWorldCopies?Mn.wrap():Mn,lt),this._applyUpdatedTransform(Y),this._fireMoveEvents(P)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(P)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,P){var j;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Y=this._onEaseEnd;delete this._onEaseEnd,Y.call(this,P)}return O||(j=this.handlers)===null||j===void 0||j.stop(!1),this}_ease(O,P,j){j.animate===!1||j.duration===0?(O(1),P()):(this._easeStart=l.now(),this._easeOptions=j,this._onEaseFrame=O,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,P){O=n.b3(O,-180,180);const j=Math.abs(O-P);return Math.abs(O-360-P)<j&&(O-=360),Math.abs(O+360-P)<j&&(O+=360),O}_normalizeCenter(O,P){if(!P.renderWorldCopies||P.lngRange)return;const j=O.lng-P.center.lng;O.lng+=j>180?-360:j<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(n.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const yo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ss{constructor(O=yo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(O,P){const j=this._map._getUIString(`AttributionControl.${P}`);O.title=j,O.setAttribute("aria-label",j)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Y=>typeof Y!="string"?"":Y)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Y=this._map.style.stylesheet;this.styleOwner=Y.owner,this.styleId=Y.id}const P=this._map.style.sourceCaches;for(const Y in P){const te=P[Y];if(te.used||te.usedForTerrain){const de=te.getSource();de.attribution&&O.indexOf(de.attribution)<0&&O.push(de.attribution)}}O=O.filter(Y=>String(Y).trim()),O.sort((Y,te)=>Y.length-te.length),O=O.filter((Y,te)=>{for(let de=te+1;de<O.length;de++)if(O[de].indexOf(Y)>=0)return!1;return!0});const j=O.join(" | ");j!==this._attribHTML&&(this._attribHTML=j,O.length?(this._innerContainer.innerHTML=j,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ro{constructor(O={}){this._updateCompact=()=>{const P=this._container.children;if(P.length){const j=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&j.classList.add("maplibregl-compact"):j.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const P=o.create("a","maplibregl-ctrl-logo");return P.target="_blank",P.rel="noopener nofollow",P.href="https://maplibre.org/",P.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),P.setAttribute("rel","noopener nofollow"),this._container.appendChild(P),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class gc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const P=++this._id;return this._queue.push({callback:O,id:P,cancelled:!1}),P}remove(O){const P=this._currentlyRunning,j=P?this._queue.concat(P):this._queue;for(const Y of j)if(Y.id===O)return void(Y.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const P=this._currentlyRunning=this._queue;this._queue=[];for(const j of P)if(!j.cancelled&&(j.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Or=n.Y([{name:"a_pos3d",type:"Int16",components:3}]);class vo extends n.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,P){this.sourceCache.update(O,P),this._renderableTilesKeys=[];const j={};for(const Y of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P}))j[Y.key]=!0,this._renderableTilesKeys.push(Y.key),this._tiles[Y.key]||(Y.posMatrix=new Float64Array(16),n.aQ(Y.posMatrix,0,n.X,0,n.X,0,1),this._tiles[Y.key]=new Ce(Y,this.tileSize));for(const Y in this._tiles)j[Y]||delete this._tiles[Y]}freeRtt(O){for(const P in this._tiles){const j=this._tiles[P];(!O||j.tileID.equals(O)||j.tileID.isChildOf(O)||O.isChildOf(j.tileID))&&(j.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const P={};for(const j of this._renderableTilesKeys){const Y=this._tiles[j].tileID;if(Y.canonical.equals(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16),n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),P[j]=te}else if(Y.canonical.isChildOf(O.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=Y.canonical.z-O.canonical.z,pe=Y.canonical.x-(Y.canonical.x>>de<<de),Ae=Y.canonical.y-(Y.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,Be,0,Be,0,1),n.J(te.posMatrix,te.posMatrix,[-pe*Be,-Ae*Be,0]),P[j]=te}else if(O.canonical.isChildOf(Y.canonical)){const te=O.clone();te.posMatrix=new Float64Array(16);const de=O.canonical.z-Y.canonical.z,pe=O.canonical.x-(O.canonical.x>>de<<de),Ae=O.canonical.y-(O.canonical.y>>de<<de),Be=n.X>>de;n.aQ(te.posMatrix,0,n.X,0,n.X,0,1),n.J(te.posMatrix,te.posMatrix,[pe*Be,Ae*Be,0]),n.K(te.posMatrix,te.posMatrix,[1/2**de,1/2**de,0]),P[j]=te}}return P}getSourceTile(O,P){const j=this.sourceCache._source;let Y=O.overscaledZ-this.deltaZoom;if(Y>j.maxzoom&&(Y=j.maxzoom),Y<j.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Y).key);let te=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!te||!te.dem)&&P)for(;Y>=j.minzoom&&(!te||!te.dem);)te=this.sourceCache.getTileByID(O.scaledTo(Y--).key);return te}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(P=>P.timeAdded>=O)}}class Jr{constructor(O,P,j){this.painter=O,this.sourceCache=new vo(P),this.options=j,this.exaggeration=typeof j.exaggeration=="number"?j.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,P,j,Y=n.X){var te;if(!(P>=0&&P<Y&&j>=0&&j<Y))return 0;const de=this.getTerrainData(O),pe=(te=de.tile)===null||te===void 0?void 0:te.dem;if(!pe)return 0;const Ae=function(ft,kt,Nt){var Mt=kt[0],Gt=kt[1];return ft[0]=Nt[0]*Mt+Nt[4]*Gt+Nt[12],ft[1]=Nt[1]*Mt+Nt[5]*Gt+Nt[13],ft}([],[P/Y*n.X,j/Y*n.X],de.u_terrain_matrix),Be=[Ae[0]*pe.dim,Ae[1]*pe.dim],Ge=Math.floor(Be[0]),qe=Math.floor(Be[1]),at=Be[0]-Ge,lt=Be[1]-qe;return pe.get(Ge,qe)*(1-at)*(1-lt)+pe.get(Ge+1,qe)*at*(1-lt)+pe.get(Ge,qe+1)*(1-at)*lt+pe.get(Ge+1,qe+1)*at*lt}getElevationForLngLatZoom(O,P){const{tileID:j,mercatorX:Y,mercatorY:te}=this._getOverscaledTileIDFromLngLatZoom(O,P);return this.getElevation(j,Y%n.X,te%n.X,n.X)}getElevation(O,P,j,Y=n.X){return this.getDEMElevation(O,P,j,Y)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Y=this.painter.context,te=new n.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new I(Y,te,Y.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new I(Y,new n.R({width:1,height:1}),Y.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=n.ao([])}const P=this.sourceCache.getSourceTile(O,!0);if(P&&P.dem&&(!P.demTexture||P.needsTerrainPrepare)){const Y=this.painter.context;P.demTexture=this.painter.getTileTexture(P.dem.stride),P.demTexture?P.demTexture.update(P.dem.getPixels(),{premultiply:!1}):P.demTexture=new I(Y,P.dem.getPixels(),Y.gl.RGBA,{premultiply:!1}),P.demTexture.bind(Y.gl.NEAREST,Y.gl.CLAMP_TO_EDGE),P.needsTerrainPrepare=!1}const j=P&&P+P.tileID.key+O.key;if(j&&!this._demMatrixCache[j]){const Y=this.sourceCache.sourceCache._source.maxzoom;let te=O.canonical.z-P.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Y?te=O.canonical.z-Y:n.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const de=O.canonical.x-(O.canonical.x>>te<<te),pe=O.canonical.y-(O.canonical.y>>te<<te),Ae=n.bb(new Float64Array(16),[1/(n.X<<te),1/(n.X<<te),0]);n.J(Ae,Ae,[de*n.X,pe*n.X,0]),this._demMatrixCache[O.key]={matrix:Ae,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:P&&P.dem&&P.dem.dim||1,u_terrain_matrix:j?this._demMatrixCache[O.key].matrix:this._emptyDemMatrix,u_terrain_unpack:P&&P.dem&&P.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(P&&P.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:P}}getFramebuffer(O){const P=this.painter,j=P.width/devicePixelRatio,Y=P.height/devicePixelRatio;return!this._fbo||this._fbo.width===j&&this._fbo.height===Y||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new I(P.context,{width:j,height:Y,data:null},P.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(P.context.gl.NEAREST,P.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new I(P.context,{width:j,height:Y,data:null},P.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(P.context.gl.NEAREST,P.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=P.context.createFramebuffer(j,Y,!0,!1),this._fbo.depthAttachment.set(P.context.createRenderbuffer(P.context.gl.DEPTH_COMPONENT16,j,Y))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const P=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let te=0,de=0;te<this._coordsTextureSize;te++)for(let pe=0;pe<this._coordsTextureSize;pe++,de+=4)P[de+0]=255&pe,P[de+1]=255&te,P[de+2]=pe>>8<<4|te>>8,P[de+3]=0;const j=new n.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),Y=new I(O,j,O.gl.RGBA,{premultiply:!1});return Y.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Y,Y}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const P=new Uint8Array(4),j=this.painter.context,Y=j.gl,te=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),de=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),pe=Math.round(this.painter.height/devicePixelRatio);j.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Y.readPixels(te,pe-de-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null);const Ae=P[0]+(P[2]>>4<<8),Be=P[1]+((15&P[2])<<8),Ge=this.coordsIndex[255-P[3]],qe=Ge&&this.sourceCache.getTileByID(Ge);if(!qe)return null;const at=this._coordsTextureSize,lt=(1<<qe.tileID.canonical.z)*at;return new n.Z((qe.tileID.canonical.x*at+Ae)/lt+qe.tileID.wrap,(qe.tileID.canonical.y*at+Be)/lt,this.getElevation(qe.tileID,Ae,Be,at))}depthAtPoint(O){const P=new Uint8Array(4),j=this.painter.context,Y=j.gl;return j.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Y.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Y.RGBA,Y.UNSIGNED_BYTE,P),j.bindFramebuffer.set(null),(P[0]/16777216+P[1]/65536+P[2]/256+P[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,P=new n.bc,j=new n.aY,Y=this.meshSize,te=n.X/Y,de=Y*Y;for(let qe=0;qe<=Y;qe++)for(let at=0;at<=Y;at++)P.emplaceBack(at*te,qe*te,0);for(let qe=0;qe<de;qe+=Y+1)for(let at=0;at<Y;at++)j.emplaceBack(at+qe,Y+at+qe+1,Y+at+qe+2),j.emplaceBack(at+qe,Y+at+qe+2,at+qe+1);const pe=P.length,Ae=pe+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(at*te,qe*n.X,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Ae+qe,Ae+qe+1,Ae+qe+3),j.emplaceBack(Ae+qe,Ae+qe+3,Ae+qe+2),j.emplaceBack(pe+qe,pe+qe+3,pe+qe+1),j.emplaceBack(pe+qe,pe+qe+2,pe+qe+3);const Be=P.length,Ge=Be+2*(Y+1);for(const qe of[0,1])for(let at=0;at<=Y;at++)for(const lt of[0,1])P.emplaceBack(qe*n.X,at*te,lt);for(let qe=0;qe<2*Y;qe+=2)j.emplaceBack(Be+qe,Be+qe+1,Be+qe+3),j.emplaceBack(Be+qe,Be+qe+3,Be+qe+2),j.emplaceBack(Ge+qe,Ge+qe+3,Ge+qe+1),j.emplaceBack(Ge+qe,Ge+qe+2,Ge+qe+3);return this._mesh=new Kl(O.createVertexBuffer(P,Or.members),O.createIndexBuffer(j),n.a0.simpleSegment(0,0,P.length,j.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*n.bd/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,P){var j;const{tileID:Y}=this._getOverscaledTileIDFromLngLatZoom(O,P);return(j=this.getMinMaxElevation(Y).minElevation)!==null&&j!==void 0?j:0}getMinMaxElevation(O){const P=this.getTerrainData(O).tile,j={minElevation:null,maxElevation:null};return P&&P.dem&&(j.minElevation=P.dem.min*this.exaggeration,j.maxElevation=P.dem.max*this.exaggeration),j}_getOverscaledTileIDFromLngLatZoom(O,P){const j=n.Z.fromLngLat(O.wrap()),Y=(1<<P)*n.X,te=j.x*Y,de=j.y*Y,pe=Math.floor(te/n.X),Ae=Math.floor(de/n.X);return{tileID:new n.S(P,0,P,pe,Ae),mercatorX:te,mercatorY:de}}}class qs{constructor(O,P,j){this._context=O,this._size=P,this._tileSize=j,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const P=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),j=new I(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return j.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),P.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),P.colorAttachment.set(j.texture),{id:O,fbo:P,texture:j,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(P=>O.id!==P),this._recentlyUsed.push(O.id)}stampObject(O){O.stamp=++this._stamp}getOrCreateFreeObject(){for(const P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Fs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ys{constructor(O,P){this.painter=O,this.terrain=P,this.pool=new qs(O.context,30,P.sourceCache.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,P){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(j=>!O._layers[j].isHidden(P)),this._coordsDescendingInv={};for(const j in O.sourceCaches){this._coordsDescendingInv[j]={};const Y=O.sourceCaches[j].getVisibleCoordinates();for(const te of Y){const de=this.terrain.sourceCache.getTerrainCoords(te);for(const pe in de)this._coordsDescendingInv[j][pe]||(this._coordsDescendingInv[j][pe]=[]),this._coordsDescendingInv[j][pe].push(de[pe])}}this._coordsDescendingInvStr={};for(const j of O._order){const Y=O._layers[j],te=Y.source;if(Fs[Y.type]&&!this._coordsDescendingInvStr[te]){this._coordsDescendingInvStr[te]={};for(const de in this._coordsDescendingInv[te])this._coordsDescendingInvStr[te][de]=this._coordsDescendingInv[te][de].map(pe=>pe.key).sort().join()}}for(const j of this._renderableTiles)for(const Y in this._coordsDescendingInvStr){const te=this._coordsDescendingInvStr[Y][j.tileID.key];te&&te!==j.rttCoords[Y]&&(j.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const P=O.type,j=this.painter,Y=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Fs[P]&&(this._prevType&&Fs[this._prevType]||this._stacks.push([]),this._prevType=P,this._stacks[this._stacks.length-1].push(O.id),!Y))return!0;if(Fs[this._prevType]||Fs[P]&&Y){this._prevType=P;const te=this._stacks.length-1,de=this._stacks[te]||[];for(const pe of this._renderableTiles){if(this.pool.isFull()&&(oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(pe),pe.rtt[te]){const Be=this.pool.getObjectForId(pe.rtt[te].id);if(Be.stamp===pe.rtt[te].stamp){this.pool.useObject(Be);continue}}const Ae=this.pool.getOrCreateFreeObject();this.pool.useObject(Ae),this.pool.stampObject(Ae),pe.rtt[te]={id:Ae.id,stamp:Ae.stamp},j.context.bindFramebuffer.set(Ae.fbo.framebuffer),j.context.clear({color:n.aN.transparent,stencil:0}),j.currentStencilSource=void 0;for(let Be=0;Be<de.length;Be++){const Ge=j.style._layers[de[Be]],qe=Ge.source?this._coordsDescendingInv[Ge.source][pe.tileID.key]:[pe.tileID];j.context.viewport.set([0,0,Ae.fbo.width,Ae.fbo.height]),j._renderTileClippingMasks(Ge,qe),j.renderLayer(j,j.style.sourceCaches[Ge.source],Ge,qe),Ge.source&&(pe.rttCoords[Ge.source]=this._coordsDescendingInvStr[Ge.source][pe.tileID.key])}}return oc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Fs[P]}return!1}}const bc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},yc=y,Ts={hash:!1,interactive:!0,bearingSnap:7,attributionControl:yo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:n.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},wi=H=>{H.touchstart=H.dragStart,H.touchmoveWindow=H.dragMove,H.touchend=H.dragEnd},Ys={showCompass:!0,showZoom:!0,visualizePitch:!1};class Yn{constructor(O,P,j=!1){this.mousedown=de=>{this.startMouse(n.e({},de,{ctrlKey:!0,preventDefault:()=>de.preventDefault()}),o.mousePos(this.element,de)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=de=>{this.moveMouse(de,o.mousePos(this.element,de))},this.mouseup=de=>{this.mouseRotate.dragEnd(de),this.mousePitch&&this.mousePitch.dragEnd(de),this.offTemp()},this.touchstart=de=>{de.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.startTouch(de,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=de=>{de.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,de.targetTouches)[0],this.moveTouch(de,this._lastPos))},this.touchend=de=>{de.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Y=O.dragRotate._mouseRotate.getClickTolerance(),te=O.dragRotate._mousePitch.getClickTolerance();this.element=P,this.mouseRotate=Ul({clickTolerance:Y,enable:!0}),this.touchRotate=(({enable:de,clickTolerance:pe,bearingDegreesPerPixelMoved:Ae=.8})=>{const Be=new wl;return new Eo({clickTolerance:pe,move:(Ge,qe)=>({bearingDelta:(qe.x-Ge.x)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:Y,enable:!0}),this.map=O,j&&(this.mousePitch=Gs({clickTolerance:te,enable:!0}),this.touchPitch=(({enable:de,clickTolerance:pe,pitchDegreesPerPixelMoved:Ae=-.5})=>{const Be=new wl;return new Eo({clickTolerance:pe,move:(Ge,qe)=>({pitchDelta:(qe.y-Ge.y)*Ae}),moveStateManager:Be,enable:de,assignEvents:wi})})({clickTolerance:te,enable:!0})),o.addEventListener(P,"mousedown",this.mousedown),o.addEventListener(P,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(P,"touchcancel",this.reset)}startMouse(O,P){this.mouseRotate.dragStart(O,P),this.mousePitch&&this.mousePitch.dragStart(O,P),o.disableDrag()}startTouch(O,P){this.touchRotate.dragStart(O,P),this.touchPitch&&this.touchPitch.dragStart(O,P),o.disableDrag()}moveMouse(O,P){const j=this.map,{bearingDelta:Y}=this.mouseRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.mousePitch){const{pitchDelta:te}=this.mousePitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}moveTouch(O,P){const j=this.map,{bearingDelta:Y}=this.touchRotate.dragMove(O,P)||{};if(Y&&j.setBearing(j.getBearing()+Y),this.touchPitch){const{pitchDelta:te}=this.touchPitch.dragMove(O,P)||{};te&&j.setPitch(j.getPitch()+te)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let ir;function Ao(H,O,P){const j=new n.N(H.lng,H.lat);if(H=new n.N(H.lng,H.lat),O){const Y=new n.N(H.lng-360,H.lat),te=new n.N(H.lng+360,H.lat),de=P.locationPoint(H).distSqr(O);P.locationPoint(Y).distSqr(O)<de?H=Y:P.locationPoint(te).distSqr(O)<de&&(H=te)}for(;Math.abs(H.lng-P.center.lng)>180;){const Y=P.locationPoint(H);if(Y.x>=0&&Y.y>=0&&Y.x<=P.width&&Y.y<=P.height)break;H.lng>P.center.lng?H.lng-=360:H.lng+=360}return H.lng!==j.lng&&P.locationPoint(H).y>P.height/2-P.getHorizon()?H:j}const vs={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Xs(H,O,P){const j=H.classList;for(const Y in vs)j.remove(`maplibregl-${P}-anchor-${Y}`);j.add(`maplibregl-${P}-anchor-${O}`)}class zi extends n.E{constructor(O){if(super(),this._onKeyPress=P=>{const j=P.code,Y=P.charCode||P.keyCode;j!=="Space"&&j!=="Enter"&&Y!==32&&Y!==13||this.togglePopup()},this._onMapClick=P=>{const j=P.originalEvent.target,Y=this._element;this._popup&&(j===Y||Y.contains(j))&&this.togglePopup()},this._update=P=>{var j;if(!this._map)return;const Y=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!Y)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let te="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?te=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(te=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let de="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?de="rotateX(0deg)":this._pitchAlignment==="map"&&(de=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${vs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${de} ${te}`),l.frameAsync(new AbortController).then(()=>{this._updateOpacity(P&&P.type==="moveend")}).catch(()=>{})},this._onMove=P=>{if(!this._isDragging){const j=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=j}this._isDragging&&(this._pos=P.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new n.k("dragstart"))),this.fire(new n.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new n.k("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O==null?void 0:O.opacity,O==null?void 0:O.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=n.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const P=o.createNS("http://www.w3.org/2000/svg","svg"),j=41,Y=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${j}px`),P.setAttributeNS(null,"width",`${Y}px`),P.setAttributeNS(null,"viewBox",`0 0 ${Y} ${j}`);const te=o.createNS("http://www.w3.org/2000/svg","g");te.setAttributeNS(null,"stroke","none"),te.setAttributeNS(null,"stroke-width","1"),te.setAttributeNS(null,"fill","none"),te.setAttributeNS(null,"fill-rule","evenodd");const de=o.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"fill-rule","nonzero");const pe=o.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),pe.setAttributeNS(null,"fill","#000000");const Ae=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Mt of Ae){const Gt=o.createNS("http://www.w3.org/2000/svg","ellipse");Gt.setAttributeNS(null,"opacity","0.04"),Gt.setAttributeNS(null,"cx","10.5"),Gt.setAttributeNS(null,"cy","5.80029008"),Gt.setAttributeNS(null,"rx",Mt.rx),Gt.setAttributeNS(null,"ry",Mt.ry),pe.appendChild(Gt)}const Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill",this._color);const Ge=o.createNS("http://www.w3.org/2000/svg","path");Ge.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Be.appendChild(Ge);const qe=o.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"opacity","0.25"),qe.setAttributeNS(null,"fill","#000000");const at=o.createNS("http://www.w3.org/2000/svg","path");at.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),qe.appendChild(at);const lt=o.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),lt.setAttributeNS(null,"fill","#FFFFFF");const ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(8.0, 8.0)");const kt=o.createNS("http://www.w3.org/2000/svg","circle");kt.setAttributeNS(null,"fill","#000000"),kt.setAttributeNS(null,"opacity","0.25"),kt.setAttributeNS(null,"cx","5.5"),kt.setAttributeNS(null,"cy","5.5"),kt.setAttributeNS(null,"r","5.4999962");const Nt=o.createNS("http://www.w3.org/2000/svg","circle");Nt.setAttributeNS(null,"fill","#FFFFFF"),Nt.setAttributeNS(null,"cx","5.5"),Nt.setAttributeNS(null,"cy","5.5"),Nt.setAttributeNS(null,"r","5.4999962"),ft.appendChild(kt),ft.appendChild(Nt),de.appendChild(pe),de.appendChild(Be),de.appendChild(qe),de.appendChild(lt),de.appendChild(ft),P.appendChild(de),P.setAttributeNS(null,"height",j*this._scale+"px"),P.setAttributeNS(null,"width",Y*this._scale+"px"),this._element.appendChild(P),this._offset=n.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",P=>{P.preventDefault()}),this._element.addEventListener("mousedown",P=>{P.preventDefault()}),Xs(this._element,this._anchor,"marker"),O&&O.className)for(const P of O.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Y=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Y,-1*(24.6+Y)],"bottom-right":[-Y,-1*(24.6+Y)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var P,j;if(!(!((P=this._map)===null||P===void 0)&&P.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Y=this._map,te=Y.terrain.depthAtPoint(this._pos),de=Y.terrain.getElevationForLngLatZoom(this._lngLat,Y.transform.tileZoom);if(Y.transform.lngLatToCameraDepth(this._lngLat,de)-te<.006)return void(this._element.style.opacity=this._opacity);const pe=-this._offset.y/Y.transform._pixelPerMeter,Ae=Math.sin(Y.getPitch()*Math.PI/180)*pe,Be=Y.terrain.depthAtPoint(new n.P(this._pos.x,this._pos.y-this._offset.y)),Ge=Y.transform.lngLatToCameraDepth(this._lngLat,de+Ae)-Be>.006;!((j=this._popup)===null||j===void 0)&&j.isOpen()&&Ge&&this._popup.remove(),this._element.style.opacity=Ge?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=n.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,P){return O===void 0&&P===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),P!==void 0&&(this._opacityWhenCovered=P),this._map&&this._updateOpacity(!0),this}}const Zs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Yr=0,Ec=!1;class Dr extends n.E{constructor(O){super(),this._onSuccess=P=>{if(this._map){if(this._isOutOfMapMaxBounds(P))return this._setErrorState(),this.fire(new n.k("outofmaxbounds",P)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=P,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(P),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(P),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new n.k("geolocate",P)),this._finish()}},this._updateCamera=P=>{const j=new n.N(P.coords.longitude,P.coords.latitude),Y=P.coords.accuracy,te=this._map.getBearing(),de=n.e({bearing:te},this.options.fitBoundsOptions),pe=xe.fromLngLat(j,Y);this._map.fitBounds(pe,de,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const j=new n.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(j).addTo(this._map),this._userLocationDotMarker.setLngLat(j).addTo(this._map),this._accuracy=P.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=P=>{if(this._map){if(this.options.trackUserLocation)if(P.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Ec)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new n.k("error",P)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",P=>P.preventDefault()),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=P=>{if(this._map){if(P===!1){n.w("Geolocation support is not available so the GeolocateControl will be disabled.");const j=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}else{const j=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=j,this._geolocateButton.setAttribute("aria-label",j)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new zi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new zi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",j=>{const Y=j.originalEvent&&j.originalEvent.type==="resize";j.geolocateSource||this._watchState!=="ACTIVE_LOCK"||Y||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new n.k("trackuserlocationend")),this.fire(new n.k("userlocationlostfocus")))})}},this.options=n.e({},Zs,O)}onAdd(O){return this._map=O,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return n._(this,arguments,void 0,function*(P=!1){if(ir!==void 0&&!P)return ir;if(window.navigator.permissions===void 0)return ir=!!window.navigator.geolocation,ir;try{ir=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ir=!!window.navigator.geolocation}return ir})}().then(P=>this._finishSetupUI(P)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yr=0,Ec=!1}_isOutOfMapMaxBounds(O){const P=this._map.getMaxBounds(),j=O.coords;return P&&(j.longitude<P.getWest()||j.longitude>P.getEast()||j.latitude<P.getSouth()||j.latitude>P.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const O=this._map.getBounds(),P=O.getSouthEast(),j=O.getNorthEast(),Y=P.distanceTo(j),te=this._map._container.clientHeight,de=Math.ceil(this._accuracy/(Y/te)*2);this._circleElement.style.width=`${de}px`,this._circleElement.style.height=`${de}px`}trigger(){if(!this._setup)return n.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new n.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yr--,Ec=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new n.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new n.k("trackuserlocationstart")),this.fire(new n.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let O;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yr++,Yr>1?(O={maximumAge:6e5,timeout:0},Ec=!0):(O=this.options.positionOptions,Ec=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const hr={maxWidth:100,unit:"metric"};function xi(H,O,P){const j=P&&P.maxWidth||100,Y=H._container.clientHeight/2,te=H.unproject([0,Y]),de=H.unproject([j,Y]),pe=te.distanceTo(de);if(P&&P.unit==="imperial"){const Ae=3.2808*pe;Ae>5280?oo(O,j,Ae/5280,H._getUIString("ScaleControl.Miles")):oo(O,j,Ae,H._getUIString("ScaleControl.Feet"))}else P&&P.unit==="nautical"?oo(O,j,pe/1852,H._getUIString("ScaleControl.NauticalMiles")):pe>=1e3?oo(O,j,pe/1e3,H._getUIString("ScaleControl.Kilometers")):oo(O,j,pe,H._getUIString("ScaleControl.Meters"))}function oo(H,O,P,j){const Y=function(de){const pe=Math.pow(10,`${Math.floor(de)}`.length-1);let Ae=de/pe;return Ae=Ae>=10?10:Ae>=5?5:Ae>=3?3:Ae>=2?2:Ae>=1?1:function(Be){const Ge=Math.pow(10,Math.ceil(-Math.log(Be)/Math.LN10));return Math.round(Be*Ge)/Ge}(Ae),pe*Ae}(P),te=Y/P;H.style.width=O*te+"px",H.innerHTML=`${Y} ${j}`}class Tl extends n.E{constructor(O={}){super(),this._onFullscreenChange=()=>{var P;let j=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=j==null?void 0:j.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)j=j.shadowRoot.fullscreenElement;j===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,O&&O.container&&(O.container instanceof HTMLElement?this._container=O.container:n.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(O){return this._map=O,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const O=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",O).setAttribute("aria-hidden","true"),O.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const O=this._getTitle();this._fullscreenButton.setAttribute("aria-label",O),this._fullscreenButton.title=O}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new n.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new n.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const cl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ct=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class pt extends n.E{constructor(O){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new n.k("close"))),this),this._onMouseUp=P=>{this._update(P.point)},this._onMouseMove=P=>{this._update(P.point)},this._onDrag=P=>{this._update(P.point)},this._update=P=>{var j;const Y=this._lngLat||this._trackPointer;if(!this._map||!Y||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Be of this.options.className.split(" "))this._container.classList.add(Be);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Ao(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(j=this._lngLat)===null||j===void 0?void 0:j.wrap(),this._trackPointer&&!P)return;const te=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationPoint(this._lngLat));let de=this.options.anchor;const pe=xt(this.options.offset);if(!de){const Be=this._container.offsetWidth,Ge=this._container.offsetHeight;let qe;qe=te.y+pe.bottom.y<Ge?["top"]:te.y>this._map.transform.height-Ge?["bottom"]:[],te.x<Be/2?qe.push("left"):te.x>this._map.transform.width-Be/2&&qe.push("right"),de=qe.length===0?"bottom":qe.join("-")}let Ae=te.add(pe[de]);this.options.subpixelPositioning||(Ae=Ae.round()),o.setTransform(this._container,`${vs[de]} translate(${Ae.x}px,${Ae.y}px)`),Xs(this._container,de,"popup")},this._onClose=()=>{this.remove()},this.options=n.e(Object.create(cl),O)}addTo(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new n.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=n.N.convert(O),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(O){return this.setDOMContent(document.createTextNode(O))}setHTML(O){const P=document.createDocumentFragment(),j=document.createElement("body");let Y;for(j.innerHTML=O;Y=j.firstChild,Y;)P.appendChild(Y);return this.setDOMContent(P)}getMaxWidth(){var O;return(O=this._container)===null||O===void 0?void 0:O.style.maxWidth}setMaxWidth(O){return this.options.maxWidth=O,this._update(),this}setDOMContent(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(O){return this._container&&this._container.classList.add(O),this}removeClassName(O){return this._container&&this._container.classList.remove(O),this}setOffset(O){return this.options.offset=O,this._update(),this}toggleClassName(O){if(this._container)return this._container.classList.toggle(O)}setSubpixelPositioning(O){this.options.subpixelPositioning=O}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const O=this._container.querySelector(ct);O&&O.focus()}}function xt(H){if(H){if(typeof H=="number"){const O=Math.round(Math.abs(H)/Math.SQRT2);return{center:new n.P(0,0),top:new n.P(0,H),"top-left":new n.P(O,O),"top-right":new n.P(-O,O),bottom:new n.P(0,-H),"bottom-left":new n.P(O,-O),"bottom-right":new n.P(-O,-O),left:new n.P(H,0),right:new n.P(-H,0)}}if(H instanceof n.P||Array.isArray(H)){const O=n.P.convert(H);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:n.P.convert(H.center||[0,0]),top:n.P.convert(H.top||[0,0]),"top-left":n.P.convert(H["top-left"]||[0,0]),"top-right":n.P.convert(H["top-right"]||[0,0]),bottom:n.P.convert(H.bottom||[0,0]),"bottom-left":n.P.convert(H["bottom-left"]||[0,0]),"bottom-right":n.P.convert(H["bottom-right"]||[0,0]),left:n.P.convert(H.left||[0,0]),right:n.P.convert(H.right||[0,0])}}return xt(new n.P(0,0))}const K=y;f.AJAXError=n.bg,f.Evented=n.E,f.LngLat=n.N,f.MercatorCoordinate=n.Z,f.Point=n.P,f.addProtocol=n.bh,f.config=n.a,f.removeProtocol=n.bi,f.AttributionControl=ss,f.BoxZoomHandler=ko,f.CanvasSource=Me,f.CooperativeGesturesHandler=$o,f.DoubleClickZoomHandler=Pi,f.DragPanHandler=is,f.DragRotateHandler=ho,f.EdgeInsets=Ql,f.FullscreenControl=Tl,f.GeoJSONSource=Se,f.GeolocateControl=Dr,f.Hash=eo,f.ImageSource=ye,f.KeyboardHandler=cc,f.LngLatBounds=xe,f.LogoControl=ro,f.Map=class extends Xi{constructor(H){n.be.mark(n.bf.create);const O=Object.assign(Object.assign({},Ts),H);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new oi(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new gc,this._controls=[],this._mapId=n.a4(),this._contextLost=j=>{j.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new n.k("webglcontextlost",{originalEvent:j}))},this._contextRestored=j=>{this._setupPainter(),this.resize(),this._update(),this.fire(new n.k("webglcontextrestored",{originalEvent:j}))},this._onMapScroll=j=>{if(j.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},bc),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=w.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let j=!1;const Y=Us(te=>{this._trackResize&&!this._removed&&this.resize(te)._update()},50);this._resizeObserver=new ResizeObserver(te=>{j?Y(te):j=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Kr(this,O);const P=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new eo(P).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,n.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new ss(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new ro,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",j=>{this._update(j.dataType==="style"),this.fire(new n.k(`${j.dataType}data`,j))}),this.on("dataloading",j=>{this.fire(new n.k(`${j.dataType}dataloading`,j))}),this.on("dataabort",j=>{this.fire(new n.k("sourcedataabort",j))})}_getMapId(){return this._mapId}addControl(H,O){if(O===void 0&&(O=H.getDefaultPosition?H.getDefaultPosition():"top-right"),!H||!H.onAdd)return this.fire(new n.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const P=H.onAdd(this);this._controls.push(H);const j=this._controlPositions[O];return O.indexOf("bottom")!==-1?j.insertBefore(P,j.firstChild):j.appendChild(P),this}removeControl(H){if(!H||!H.onRemove)return this.fire(new n.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const O=this._controls.indexOf(H);return O>-1&&this._controls.splice(O,1),H.onRemove(this),this}hasControl(H){return this._controls.indexOf(H)>-1}calculateCameraOptionsFromTo(H,O,P,j){return j==null&&this.terrain&&(j=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(H,O,P,j)}resize(H){var O;const P=this._containerDimensions(),j=P[0],Y=P[1],te=this._getClampedPixelRatio(j,Y);if(this._resizeCanvas(j,Y,te),this.painter.resize(j,Y,te),this.painter.overLimit()){const pe=this.painter.context.gl;this._maxCanvasSize=[pe.drawingBufferWidth,pe.drawingBufferHeight];const Ae=this._getClampedPixelRatio(j,Y);this._resizeCanvas(j,Y,Ae),this.painter.resize(j,Y,Ae)}this.transform.resize(j,Y),(O=this._requestedCameraState)===null||O===void 0||O.resize(j,Y);const de=!this._moving;return de&&(this.stop(),this.fire(new n.k("movestart",H)).fire(new n.k("move",H))),this.fire(new n.k("resize",H)),de&&this.fire(new n.k("moveend",H)),this}_getClampedPixelRatio(H,O){const{0:P,1:j}=this._maxCanvasSize,Y=this.getPixelRatio(),te=H*Y,de=O*Y,pe=te>P?P/te:1,Ae=de>j?j/de:1;return Math.min(pe,Ae)*Y}getPixelRatio(){var H;return(H=this._overridePixelRatio)!==null&&H!==void 0?H:devicePixelRatio}setPixelRatio(H){this._overridePixelRatio=H,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(H){return this.transform.setMaxBounds(xe.convert(H)),this._update()}setMinZoom(H){if((H=H??-2)>=-2&&H<=this.transform.maxZoom)return this.transform.minZoom=H,this._update(),this.getZoom()<H&&this.setZoom(H),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(H){if((H=H??22)>=this.transform.minZoom)return this.transform.maxZoom=H,this._update(),this.getZoom()>H&&this.setZoom(H),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(H){if((H=H??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(H>=0&&H<=this.transform.maxPitch)return this.transform.minPitch=H,this._update(),this.getPitch()<H&&this.setPitch(H),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(H){if((H=H??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(H>=this.transform.minPitch)return this.transform.maxPitch=H,this._update(),this.getPitch()>H&&this.setPitch(H),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(H){return this.transform.renderWorldCopies=H,this._update()}project(H){return this.transform.locationPoint(n.N.convert(H),this.style&&this.terrain)}unproject(H){return this.transform.pointLocation(n.P.convert(H),this.terrain)}isMoving(){var H;return this._moving||((H=this.handlers)===null||H===void 0?void 0:H.isMoving())}isZooming(){var H;return this._zooming||((H=this.handlers)===null||H===void 0?void 0:H.isZooming())}isRotating(){var H;return this._rotating||((H=this.handlers)===null||H===void 0?void 0:H.isRotating())}_createDelegatedListener(H,O,P){if(H==="mouseenter"||H==="mouseover"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:te=>{const de=this.getLayer(O)?this.queryRenderedFeatures(te.point,{layers:[O]}):[];de.length?j||(j=!0,P.call(this,new gs(H,this,te.originalEvent,{features:de}))):j=!1},mouseout:()=>{j=!1}}}}if(H==="mouseleave"||H==="mouseout"){let j=!1;return{layer:O,listener:P,delegates:{mousemove:de=>{(this.getLayer(O)?this.queryRenderedFeatures(de.point,{layers:[O]}):[]).length?j=!0:j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))},mouseout:de=>{j&&(j=!1,P.call(this,new gs(H,this,de.originalEvent)))}}}}{const j=Y=>{const te=this.getLayer(O)?this.queryRenderedFeatures(Y.point,{layers:[O]}):[];te.length&&(Y.features=te,P.call(this,Y),delete Y.features)};return{layer:O,listener:P,delegates:{[H]:j}}}}on(H,O,P){if(P===void 0)return super.on(H,O);const j=this._createDelegatedListener(H,O,P);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[H]=this._delegatedListeners[H]||[],this._delegatedListeners[H].push(j);for(const Y in j.delegates)this.on(Y,j.delegates[Y]);return this}once(H,O,P){if(P===void 0)return super.once(H,O);const j=this._createDelegatedListener(H,O,P);for(const Y in j.delegates)this.once(Y,j.delegates[Y]);return this}off(H,O,P){return P===void 0?super.off(H,O):(this._delegatedListeners&&this._delegatedListeners[H]&&(j=>{const Y=j[H];for(let te=0;te<Y.length;te++){const de=Y[te];if(de.layer===O&&de.listener===P){for(const pe in de.delegates)this.off(pe,de.delegates[pe]);return Y.splice(te,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(H,O){if(!this.style)return[];let P;const j=H instanceof n.P||Array.isArray(H),Y=j?H:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(j?{}:H)||{},Y instanceof n.P||typeof Y[0]=="number")P=[n.P.convert(Y)];else{const te=n.P.convert(Y[0]),de=n.P.convert(Y[1]);P=[te,new n.P(de.x,te.y),de,new n.P(te.x,de.y),te]}return this.style.queryRenderedFeatures(P,O,this.transform)}querySourceFeatures(H,O){return this.style.querySourceFeatures(H,O)}setStyle(H,O){return(O=n.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&H?(this._diffStyle(H,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(H,O))}setTransformRequest(H){return this._requestManager.setTransformRequest(H),this}_getUIString(H){const O=this._locale[H];if(O==null)throw new Error(`Missing UI string '${H}'`);return O}_updateStyle(H,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(H,O));const P=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!H)),H?(this.style=new zn(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof H=="string"?this.style.loadURL(H,O,P):this.style.loadJSON(H,O,P),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zn(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(H,O){if(typeof H=="string"){const P=H,j=this._requestManager.transformRequest(P,"Style");n.h(j,new AbortController).then(Y=>{this._updateDiff(Y.data,O)}).catch(Y=>{Y&&this.fire(new n.j(Y))})}else typeof H=="object"&&this._updateDiff(H,O)}_updateDiff(H,O){try{this.style.setState(H,O)&&this._update(!0)}catch(P){n.w(`Unable to perform style diff: ${P.message||P.error||P}. Rebuilding the style from scratch.`),this._updateStyle(H,O)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():n.w("There is no style added to the map.")}addSource(H,O){return this._lazyInitEmptyStyle(),this.style.addSource(H,O),this._update(!0)}isSourceLoaded(H){const O=this.style&&this.style.sourceCaches[H];if(O!==void 0)return O.loaded();this.fire(new n.j(new Error(`There is no source with ID '${H}'`)))}setTerrain(H){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),H){const O=this.style.sourceCaches[H.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${H.source}`);this.terrain===null&&O.reload();for(const P in this.style._layers){const j=this.style._layers[P];j.type==="hillshade"&&j.source===H.source&&n.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Jr(this.painter,O,H),this.painter.renderToTexture=new ys(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=P=>{P.dataType==="style"?this.terrain.sourceCache.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==H.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new n.k("terrain",{terrain:H})),this}getTerrain(){var H,O;return(O=(H=this.terrain)===null||H===void 0?void 0:H.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const H=this.style&&this.style.sourceCaches;for(const O in H){const P=H[O]._tiles;for(const j in P){const Y=P[j];if(Y.state!=="loaded"&&Y.state!=="errored")return!1}}return!0}removeSource(H){return this.style.removeSource(H),this._update(!0)}getSource(H){return this.style.getSource(H)}addImage(H,O,P={}){const{pixelRatio:j=1,sdf:Y=!1,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be}=P;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||n.b(O))){if(O.width===void 0||O.height===void 0)return this.fire(new n.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Ge,height:qe,data:at}=O,lt=O;return this.style.addImage(H,{data:new n.R({width:Ge,height:qe},new Uint8Array(at)),pixelRatio:j,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0,userImage:lt}),lt.onAdd&<.onAdd(this,H),this}}{const{width:Ge,height:qe,data:at}=l.getImageData(O);this.style.addImage(H,{data:new n.R({width:Ge,height:qe},at),pixelRatio:j,stretchX:te,stretchY:de,content:pe,textFitWidth:Ae,textFitHeight:Be,sdf:Y,version:0})}}updateImage(H,O){const P=this.style.getImage(H);if(!P)return this.fire(new n.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const j=O instanceof HTMLImageElement||n.b(O)?l.getImageData(O):O,{width:Y,height:te,data:de}=j;if(Y===void 0||te===void 0)return this.fire(new n.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Y!==P.data.width||te!==P.data.height)return this.fire(new n.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const pe=!(O instanceof HTMLImageElement||n.b(O));return P.data.replace(de,pe),this.style.updateImage(H,P),this}getImage(H){return this.style.getImage(H)}hasImage(H){return H?!!this.style.getImage(H):(this.fire(new n.j(new Error("Missing required image id"))),!1)}removeImage(H){this.style.removeImage(H)}loadImage(H){return w.getImage(this._requestManager.transformRequest(H,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(H,O){return this._lazyInitEmptyStyle(),this.style.addLayer(H,O),this._update(!0)}moveLayer(H,O){return this.style.moveLayer(H,O),this._update(!0)}removeLayer(H){return this.style.removeLayer(H),this._update(!0)}getLayer(H){return this.style.getLayer(H)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(H,O,P){return this.style.setLayerZoomRange(H,O,P),this._update(!0)}setFilter(H,O,P={}){return this.style.setFilter(H,O,P),this._update(!0)}getFilter(H){return this.style.getFilter(H)}setPaintProperty(H,O,P,j={}){return this.style.setPaintProperty(H,O,P,j),this._update(!0)}getPaintProperty(H,O){return this.style.getPaintProperty(H,O)}setLayoutProperty(H,O,P,j={}){return this.style.setLayoutProperty(H,O,P,j),this._update(!0)}getLayoutProperty(H,O){return this.style.getLayoutProperty(H,O)}setGlyphs(H,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(H,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(H,O,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(H,O,P,j=>{j||this._update(!0)}),this}removeSprite(H){return this._lazyInitEmptyStyle(),this.style.removeSprite(H),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(H,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(H,O,P=>{P||this._update(!0)}),this}setLight(H,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(H,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(H){return this._lazyInitEmptyStyle(),this.style.setSky(H),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(H,O){return this.style.setFeatureState(H,O),this._update()}removeFeatureState(H,O){return this.style.removeFeatureState(H,O),this._update()}getFeatureState(H){return this.style.getFeatureState(H)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let H=0,O=0;return this._container&&(H=this._container.clientWidth||400,O=this._container.clientHeight||300),[H,O]}_setupContainer(){const H=this._container;H.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",H);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const P=this._containerDimensions(),j=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],j);const Y=this._controlContainer=o.create("div","maplibregl-control-container",H),te=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(de=>{te[de]=o.create("div",`maplibregl-ctrl-${de} `,Y)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(H,O,P){this._canvas.width=Math.floor(P*H),this._canvas.height=Math.floor(P*O),this._canvas.style.width=`${H}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const H={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",j=>{O={requestedAttributes:H},j&&(O.statusMessage=j.statusMessage,O.type=j.type)},{once:!0});const P=this._canvas.getContext("webgl2",H)||this._canvas.getContext("webgl",H);if(!P){const j="Failed to initialize WebGL";throw O?(O.message=j,new Error(JSON.stringify(O))):new Error(j)}this.painter=new sc(P,this.transform),s.testSupport(P)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(H){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||H,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(H){return this._update(),this._renderTaskQueue.add(H)}_cancelRenderFrame(H){this._renderTaskQueue.remove(H)}_render(H){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(H),this._removed)return;let P=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Y=this.transform.zoom,te=l.now();this.style.zoomHistory.update(Y,te);const de=new n.a9(Y,{now:te,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),pe=de.crossFadingFactor();pe===1&&pe===this._crossFadingFactor||(P=!0,this._crossFadingFactor=pe),this.style.update(de)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,showPadding:this.showPadding}),this.fire(new n.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,n.be.mark(n.bf.load),this.fire(new n.k("load"))),this.style&&(this.style.hasTransitions()||P)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const j=this._sourcesDirty||this._styleDirty||this._placementDirty;return j||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new n.k("idle")),!this._loaded||this._fullyLoaded||j||(this._fullyLoaded=!0,n.be.mark(n.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var H;this._hash&&this._hash.remove();for(const P of this._controls)P.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),w.removeThrottleControl(this._imageQueueHandle),(H=this._resizeObserver)===null||H===void 0||H.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O!=null&&O.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),n.be.clearMetrics(),this._removed=!0,this.fire(new n.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,l.frameAsync(this._frameRequest).then(H=>{n.be.frame(H),this._frameRequest=null,this._render(H)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(H){this._showTileBoundaries!==H&&(this._showTileBoundaries=H,this._update())}get showPadding(){return!!this._showPadding}set showPadding(H){this._showPadding!==H&&(this._showPadding=H,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(H){this._showCollisionBoxes!==H&&(this._showCollisionBoxes=H,H?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(H){this._showOverdrawInspector!==H&&(this._showOverdrawInspector=H,this._update())}get repaint(){return!!this._repaint}set repaint(H){this._repaint!==H&&(this._repaint=H,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(H){this._vertices=H,this._update()}get version(){return yc}getCameraTargetElevation(){return this.transform.elevation}},f.MapMouseEvent=gs,f.MapTouchEvent=wo,f.MapWheelEvent=sl,f.Marker=zi,f.NavigationControl=class{constructor(H){this._updateZoomButtons=()=>{const O=this._map.getZoom(),P=O===this._map.getMaxZoom(),j=O===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=j,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",j.toString())},this._rotateCompassArrow=()=>{const O=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=O},this._setButtonTitle=(O,P)=>{const j=this._map._getUIString(`NavigationControl.${P}`);O.title=j,O.setAttribute("aria-label",j)},this.options=n.e({},Ys,H),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(H){return this._map=H,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Yn(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(H,O){const P=o.create("button",H,this._container);return P.type="button",P.addEventListener("click",O),P}},f.Popup=pt,f.RasterDEMTileSource=Ve,f.RasterTileSource=Ie,f.ScaleControl=class{constructor(H){this._onMove=()=>{xi(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,xi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hr),H)}getDefaultPosition(){return"bottom-left"}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",H.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},f.ScrollZoomHandler=Ws,f.Style=zn,f.TerrainControl=class{constructor(H){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=H}onAdd(H){return this._map=H,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},f.TwoFingersTouchPitchHandler=kl,f.TwoFingersTouchRotateHandler=qc,f.TwoFingersTouchZoomHandler=Qn,f.TwoFingersTouchZoomRotateHandler=Os,f.VectorTileSource=Ee,f.VideoSource=me,f.addSourceType=(H,O)=>n._(void 0,void 0,void 0,function*(){if(ze(H))throw new Error(`A source type called "${H}" already exists.`);((P,j)=>{Te[P]=j})(H,O)}),f.clearPrewarmedResources=function(){const H=ce;H&&(H.isPreloaded()&&H.numActive()===1?(H.release(le),ce=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},f.getMaxParallelImageRequests=function(){return n.a.MAX_PARALLEL_IMAGE_REQUESTS},f.getRTLTextPluginStatus=function(){return Ne().getRTLTextPluginStatus()},f.getVersion=function(){return K},f.getWorkerCount=function(){return oe.workerCount},f.getWorkerUrl=function(){return n.a.WORKER_URL},f.importScriptInWorkers=function(H){return ue().broadcast("IS",H)},f.prewarm=function(){ne().acquire(le)},f.setMaxParallelImageRequests=function(H){n.a.MAX_PARALLEL_IMAGE_REQUESTS=H},f.setRTLTextPlugin=function(H,O){return Ne().setRTLTextPlugin(H,O)},f.setWorkerCount=function(H){oe.workerCount=H},f.setWorkerUrl=function(H){n.a.WORKER_URL=H}}),m}()},88640:function(c,m,a){function v(ge,be,xe){ge.prototype=be.prototype=xe,xe.constructor=ge}function f(ge,be){var xe=Object.create(ge.prototype);for(var ke in be)xe[ke]=be[ke];return xe}function n(){}a.d(m,{GW:function(){return fe},Dj:function(){return oe}});var y=.7,_=1/y,p="\\s*([+-]?\\d+)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,u=new RegExp("^rgb\\(".concat(p,",").concat(p,",").concat(p,"\\)$")),d=new RegExp("^rgb\\(".concat(o,",").concat(o,",").concat(o,"\\)$")),h=new RegExp("^rgba\\(".concat(p,",").concat(p,",").concat(p,",").concat(l,"\\)$")),g=new RegExp("^rgba\\(".concat(o,",").concat(o,",").concat(o,",").concat(l,"\\)$")),b=new RegExp("^hsl\\(".concat(l,",").concat(o,",").concat(o,"\\)$")),w=new RegExp("^hsla\\(".concat(l,",").concat(o,",").concat(o,",").concat(l,"\\)$")),x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function S(){return this.rgb().formatHex()}function k(){return this.rgb().formatRgb()}function T(ge){var be,xe;return ge=(ge+"").trim().toLowerCase(),(be=s.exec(ge))?(xe=be[1].length,be=parseInt(be[1],16),xe===6?C(be):xe===3?new M(be>>8&15|be>>4&240,be>>4&15|240&be,(15&be)<<4|15&be,1):xe===8?A(be>>24&255,be>>16&255,be>>8&255,(255&be)/255):xe===4?A(be>>12&15|be>>8&240,be>>8&15|be>>4&240,be>>4&15|240&be,((15&be)<<4|15&be)/255):null):(be=u.exec(ge))?new M(be[1],be[2],be[3],1):(be=d.exec(ge))?new M(255*be[1]/100,255*be[2]/100,255*be[3]/100,1):(be=h.exec(ge))?A(be[1],be[2],be[3],be[4]):(be=g.exec(ge))?A(255*be[1]/100,255*be[2]/100,255*be[3]/100,be[4]):(be=b.exec(ge))?V(be[1],be[2]/100,be[3]/100,1):(be=w.exec(ge))?V(be[1],be[2]/100,be[3]/100,be[4]):x.hasOwnProperty(ge)?C(x[ge]):ge==="transparent"?new M(NaN,NaN,NaN,0):null}function C(ge){return new M(ge>>16&255,ge>>8&255,255&ge,1)}function A(ge,be,xe,ke){return ke<=0&&(ge=be=xe=NaN),new M(ge,be,xe,ke)}function E(ge,be,xe,ke){return arguments.length===1?((Ee=ge)instanceof n||(Ee=T(Ee)),Ee?new M((Ee=Ee.rgb()).r,Ee.g,Ee.b,Ee.opacity):new M):new M(ge,be,xe,ke??1);var Ee}function M(ge,be,xe,ke){this.r=+ge,this.g=+be,this.b=+xe,this.opacity=+ke}function I(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b))}function N(){var ge=z(this.opacity);return"".concat(ge===1?"rgb(":"rgba(").concat(F(this.r),", ").concat(F(this.g),", ").concat(F(this.b)).concat(ge===1?")":", ".concat(ge,")"))}function z(ge){return isNaN(ge)?1:Math.max(0,Math.min(1,ge))}function F(ge){return Math.max(0,Math.min(255,Math.round(ge)||0))}function R(ge){return((ge=F(ge))<16?"0":"")+ge.toString(16)}function V(ge,be,xe,ke){return ke<=0?ge=be=xe=NaN:xe<=0||xe>=1?ge=be=NaN:be<=0&&(ge=NaN),new U(ge,be,xe,ke)}function $(ge){if(ge instanceof U)return new U(ge.h,ge.s,ge.l,ge.opacity);if(ge instanceof n||(ge=T(ge)),!ge)return new U;if(ge instanceof U)return ge;var be=(ge=ge.rgb()).r/255,xe=ge.g/255,ke=ge.b/255,Ee=Math.min(be,xe,ke),Ie=Math.max(be,xe,ke),Ve=NaN,Se=Ie-Ee,we=(Ie+Ee)/2;return Se?(Ve=be===Ie?(xe-ke)/Se+6*(xe<ke):xe===Ie?(ke-be)/Se+2:(be-xe)/Se+4,Se/=we<.5?Ie+Ee:2-Ie-Ee,Ve*=60):Se=we>0&&we<1?0:Ve,new U(Ve,Se,we,ge.opacity)}function U(ge,be,xe,ke){this.h=+ge,this.s=+be,this.l=+xe,this.opacity=+ke}function Z(ge){return(ge=(ge||0)%360)<0?ge+360:ge}function q(ge){return Math.max(0,Math.min(1,ge||0))}function W(ge,be,xe){return 255*(ge<60?be+(xe-be)*ge/60:ge<180?xe:ge<240?be+(xe-be)*(240-ge)/60:be)}v(n,T,{copy:function(ge){return Object.assign(new this.constructor,this,ge)},displayable:function(){return this.rgb().displayable()},hex:S,formatHex:S,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $(this).formatHsl()},formatRgb:k,toString:k}),v(M,E,f(n,{brighter:function(ge){return ge=ge==null?_:Math.pow(_,ge),new M(this.r*ge,this.g*ge,this.b*ge,this.opacity)},darker:function(ge){return ge=ge==null?y:Math.pow(y,ge),new M(this.r*ge,this.g*ge,this.b*ge,this.opacity)},rgb:function(){return this},clamp:function(){return new M(F(this.r),F(this.g),F(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:I,formatHex:I,formatHex8:function(){return"#".concat(R(this.r)).concat(R(this.g)).concat(R(this.b)).concat(R(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N,toString:N})),v(U,function(ge,be,xe,ke){return arguments.length===1?$(ge):new U(ge,be,xe,ke??1)},f(n,{brighter:function(ge){return ge=ge==null?_:Math.pow(_,ge),new U(this.h,this.s,this.l*ge,this.opacity)},darker:function(ge){return ge=ge==null?y:Math.pow(y,ge),new U(this.h,this.s,this.l*ge,this.opacity)},rgb:function(){var ge=this.h%360+360*(this.h<0),be=isNaN(ge)||isNaN(this.s)?0:this.s,xe=this.l,ke=xe+(xe<.5?xe:1-xe)*be,Ee=2*xe-ke;return new M(W(ge>=240?ge-240:ge+120,Ee,ke),W(ge,Ee,ke),W(ge<120?ge+240:ge-120,Ee,ke),this.opacity)},clamp:function(){return new U(Z(this.h),q(this.s),q(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var ge=z(this.opacity);return"".concat(ge===1?"hsl(":"hsla(").concat(Z(this.h),", ").concat(100*q(this.s),"%, ").concat(100*q(this.l),"%").concat(ge===1?")":", ".concat(ge,")"))}}));var Q=function(ge){return function(){return ge}};function X(ge,be){var xe=be-ge;return xe?function(ke,Ee){return function(Ie){return ke+Ie*Ee}}(ge,xe):Q(isNaN(ge)?be:ge)}var J=function ge(be){var xe=function(Ee){return(Ee=+Ee)==1?X:function(Ie,Ve){return Ve-Ie?function(Se,we,ye){return Se=Math.pow(Se,ye),we=Math.pow(we,ye)-Se,ye=1/ye,function(me){return Math.pow(Se+me*we,ye)}}(Ie,Ve,Ee):Q(isNaN(Ie)?Ve:Ie)}}(be);function ke(Ee,Ie){var Ve=xe((Ee=E(Ee)).r,(Ie=E(Ie)).r),Se=xe(Ee.g,Ie.g),we=xe(Ee.b,Ie.b),ye=X(Ee.opacity,Ie.opacity);return function(me){return Ee.r=Ve(me),Ee.g=Se(me),Ee.b=we(me),Ee.opacity=ye(me),Ee+""}}return ke.gamma=ge,ke}(1);function ee(ge,be){var xe,ke=be?be.length:0,Ee=ge?Math.min(ke,ge.length):0,Ie=new Array(Ee),Ve=new Array(ke);for(xe=0;xe<Ee;++xe)Ie[xe]=fe(ge[xe],be[xe]);for(;xe<ke;++xe)Ve[xe]=be[xe];return function(Se){for(xe=0;xe<Ee;++xe)Ve[xe]=Ie[xe](Se);return Ve}}function le(ge,be){var xe=new Date;return ge=+ge,be=+be,function(ke){return xe.setTime(ge*(1-ke)+be*ke),xe}}function oe(ge,be){return ge=+ge,be=+be,function(xe){return ge*(1-xe)+be*xe}}function se(ge){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},se(ge)}function ce(ge,be){var xe,ke={},Ee={};for(xe in ge!==null&&se(ge)==="object"||(ge={}),be!==null&&se(be)==="object"||(be={}),be)xe in ge?ke[xe]=fe(ge[xe],be[xe]):Ee[xe]=be[xe];return function(Ie){for(xe in ke)Ee[xe]=ke[xe](Ie);return Ee}}var ae=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ne=new RegExp(ae.source,"g");function ie(ge,be){var xe,ke,Ee,Ie=ae.lastIndex=ne.lastIndex=0,Ve=-1,Se=[],we=[];for(ge+="",be+="";(xe=ae.exec(ge))&&(ke=ne.exec(be));)(Ee=ke.index)>Ie&&(Ee=be.slice(Ie,Ee),Se[Ve]?Se[Ve]+=Ee:Se[++Ve]=Ee),(xe=xe[0])===(ke=ke[0])?Se[Ve]?Se[Ve]+=ke:Se[++Ve]=ke:(Se[++Ve]=null,we.push({i:Ve,x:oe(xe,ke)})),Ie=ne.lastIndex;return Ie<be.length&&(Ee=be.slice(Ie),Se[Ve]?Se[Ve]+=Ee:Se[++Ve]=Ee),Se.length<2?we[0]?function(ye){return function(me){return ye(me)+""}}(we[0].x):function(ye){return function(){return ye}}(be):(be=we.length,function(ye){for(var me,Me=0;Me<be;++Me)Se[(me=we[Me]).i]=me.x(ye);return Se.join("")})}function ue(ge,be){be||(be=[]);var xe,ke=ge?Math.min(be.length,ge.length):0,Ee=be.slice();return function(Ie){for(xe=0;xe<ke;++xe)Ee[xe]=ge[xe]*(1-Ie)+be[xe]*Ie;return Ee}}function he(ge){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},he(ge)}function fe(ge,be){var xe,ke,Ee=he(be);return be==null||Ee==="boolean"?Q(be):(Ee==="number"?oe:Ee==="string"?(xe=T(be))?(be=xe,J):ie:be instanceof T?J:be instanceof Date?le:(ke=be,!ArrayBuffer.isView(ke)||ke instanceof DataView?Array.isArray(be)?ee:typeof be.valueOf!="function"&&typeof be.toString!="function"||isNaN(be)?ce:oe:ue))(ge,be)}},23648:function(c){c.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(c){c.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(c){c.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(c){c.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(c){c.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(c){c.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(c){c.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI © <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(c){c.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI © <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function D(c){var m=B[c];if(m!==void 0)return m.exports;var a=B[c]={id:c,exports:{}};return i[c].call(a.exports,a,a.exports,D),a.exports}return D.m=i,D.n=function(c){var m=c&&c.__esModule?function(){return c.default}:function(){return c};return D.d(m,{a:m}),m},D.d=function(c,m){for(var a in m)D.o(m,a)&&!D.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:m[a]})},D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D.o=function(c,m){return Object.prototype.hasOwnProperty.call(c,m)},D.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},D.b=document.baseURI||self.location.href,D.nc=void 0,D(20260)}()})})(sq);var hNt=sq.exports;const lq=ck(hNt),J1a="",K1a="",pNt={ref:"card",class:"card-volumetric-field"},cq=1,fNt=800,dq=300,mNt=-46,uq=100,hq=-14,gNt=$i({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}}},setup(e){const r=e,i=new Set([2,20,308,310]),B=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let D=null;const c=t.ref(null),m=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>r.passesPlays,h=>{const g=h.reduce((b,w)=>(i.has(w[r.playIndexes.categoryId])&&b.push({x1:w[r.playIndexes.coordinate1X],y1:w[r.playIndexes.coordinate1Y],x2:w[r.playIndexes.coordinate2X],y2:w[r.playIndexes.coordinate2Y],x3:w[r.playIndexes.coordinate3X],y3:w[r.playIndexes.coordinate3Y]}),b),[]);d(g)}),t.watch(()=>a.value,(h,g)=>{v.value&&(o(h),m.value.style.height=`${s(h)}px`,v.value.style.top=`${u(s(h))}px`)});function f(){D=new ResizeObserver(h=>{for(const g of h)a.value=g.contentRect.width}),D.observe(c.value)}function n(h){return Array.from({length:h},()=>0)}function y(h,g){let b=.01351,w=.02439,x=0,S=0,k=[];const T=g.length,C=Math.floor(T/10);for(;x<74;)S=g.filter(A=>1-A.y3>=x*b&&1-A.y3<=(x+1)*b&&1-A.x3>=h*w&&1-A.x3<=(h+1)*w).map(A=>A.y3).length,k.push(parseFloat((S/C).toFixed(4))),x++;return k.reverse()}function _(h){let g=[n(74),n(74)],b=[],w=39;for(;w>0&&w<=39;)b=y(w,h),g.push(b),w--;return g.push(n(74),n(74)),g}function p(h,g,b){const w=[];let k=0,T=0;w.push(h[0]);for(let C=1;C<b-1;C++){const A=[];A.push(h[C][0]);for(let E=1;E<g-1;E++)k=h[C][E-1],T=h[C][E+1],A.push(k+.5*(h[C][E]+T-k));A.push(h[C][g-1]),w.push(A)}w.push(h[b-1]);for(let C=1;C<g-1;C++)for(let A=1;A<b-1;A++)k=w[A-1][C],T=w[A+1][C],w[A][C]=k+.5*(w[A][C]+T-k);return w}function l(h){let g=0,b=0;for(let w=0;w<h.length;w++){b=b+h[w].reduce(function(S,k){return S+k});const x=Math.max.apply(null,h[w]);x>g&&(g=x)}return g}function o(h){lq.relayout(c.value,{width:h,height:s(h)})}function s(h){return Math.round(dq/fNt*h,0)}function u(h){return hq+(h-uq)/(dq-uq)*(mNt-hq)}function d(h){let g=_(h),b=g.length,w=g[0].length;g=p(p(g,w,b),w,b),w=g[0].length,b=g.length;const x=l(g),S=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:B,autoscale:!1,showscale:!1}],k=[0,w],T=[0,b],C=[0,x*5],A={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:k},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:C},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:s(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};m.value&&(m.value.style.height=`${s(a.value)}px`);const E=[];for(let M=0;M<w;M++){const I=[],N=[],z=[];for(let F=0;F<b;F++)I.push(M),N.push(F),z.push(S[0].z[F][M]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:cq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let M=0;M<b;M++){const I=[],N=[],z=[];for(let F=0;F<w;F++)I.push(F),N.push(M),z.push(S[0].z[M][F]);E.push({x:I,y:N,z,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:x,width:cq,color:z,colorscale:B,shape:"spline",smoothing:.6,dash:"dotline"}})}lq.newPlot("surface-plot",S.concat(E),A,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${u(s(a.value))}px`)}return t.onMounted(()=>{c.value&&(c.value.style.pointerEvents="none"),f()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",pNt,[t.createElementVNode("div",{ref_key:"volumetricField",ref:m,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:c,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-b4141ee5"]]),ega="",pq=e=>(t.pushScopeId("data-v-dd911c44"),e=e(),t.popScopeId(),e),yNt=pq(()=>t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),vNt=pq(()=>t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1)),_Nt=$i({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const r=e,i=t.computed(()=>({"--flex-direction-info":r.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":r.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":r.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,D)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(i.value)},[yNt,t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),vNt],4))}},[["__scopeId","data-v-dd911c44"]]),bNt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let qE=null;function xNt(){return qE||(qE=Wg(bNt)),qE}const aga="",wNt=e=>(t.pushScopeId("data-v-122c6617"),e=e(),t.popScopeId(),e),kNt={class:"volumetric-section-container"},CNt=wNt(()=>t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),SNt={key:0,class:"volumetric-section-container__switch"},TNt={class:"volumetric-section-container__attack-direction"},ENt={class:"volumetric-section-container__field"},ANt=$i({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const r=e,i=xNt(),B=new Set([2,20,308,310]),D=new Set([3,21,309]),c=new Set([...B,...D]);let m=null;const a=t.ref(0),v=t.ref(new Map),f=t.ref({teamId:0}),n=t.computed(()=>[{teamId:r.game.homeTeam.team_id,text:r.game.homeTeam.colloquial_name,img:r.game.homeTeam.logo,isHomeTeam:!0},{teamId:r.game.awayTeam.team_id,text:r.game.awayTeam.colloquial_name,img:r.game.awayTeam.logo,isHomeTeam:!1}]),y=t.computed(()=>v.value.get(r.isGamePreMatch?r.teamSelectedPreMatch.teamId:f.value.teamId)||[]);t.watch(()=>n.value,()=>{a.value=0,f.value=n.value[a.value]},{immediate:!0}),t.watch(()=>r.game.gameId,h=>{h&&(d(),p(r.game.is_live&&r.game.game_status===4))},{immediate:!0});function _(){m=setInterval(()=>{p()},1e3*60*r.volumetricFieldIntervalMinutes)}async function p(h=!1){try{const g=await o();v.value.set(r.game.homeTeam.team_id,g.homeTeam),v.value.set(r.game.awayTeam.team_id,g.awayTeam),h&&_()}catch(g){throw new Error(g)}}function l(h){return r.game.game_status===4&&!r.game.is_live?h[i.gameId]!==r.game.gameId:h[i.gameId]===r.game.gameId}async function o(h=0){try{let g={homeTeam:[],awayTeam:[]};if(r.game.is_live||r.game.game_status===0){const b=await $c.get(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${r.game.gameId}`),w=b.data?b.data.data||[]:[],x=new Set;w.forEach(S=>{x.add(S[i.categoryId]),S[i.teamId]===r.game.homeTeam.team_id&&c.has(S[i.categoryId])&&l(S)?(s(S),g.homeTeam.push(S)):S[i.teamId]===r.game.awayTeam.team_id&&c.has(S[i.categoryId])&&l(S)&&(S[i.coordinate1Y]=1-S[i.coordinate1Y],S[i.coordinate2Y]=1-S[i.coordinate2Y],S[i.coordinate3Y]=1-S[i.coordinate3Y],S[i.coordinate1X]=1-S[i.coordinate1X],S[i.coordinate2X]=1-S[i.coordinate2X],S[i.coordinate3X]=1-S[i.coordinate3X],s(S),g.awayTeam.push(S))})}else{const[b,w]=await Promise.all([$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${h||r.game.seasonId}-${r.game.homeTeam.team_id}.json`,{headers:{Authorization:""}}),$c.get(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${h||r.game.seasonId}-${r.game.awayTeam.team_id}.json`,{headers:{Authorization:""}})]);if(!b.data.data.posession.length&&!w.data.data.posession.length)return o(r.game.regularSeasonId);g={homeTeam:b.data.data.posession.filter(x=>x[i.teamId]===r.game.homeTeam.team_id&&c.has(x[i.categoryId])&&l(x)),awayTeam:w.data.data.posession.filter(x=>x[i.teamId]===r.game.awayTeam.team_id&&c.has(x[i.categoryId])&&l(x)?(x[i.coordinate1Y]=1-x[i.coordinate1Y],x[i.coordinate2Y]=1-x[i.coordinate2Y],x[i.coordinate3Y]=1-x[i.coordinate3Y],x[i.coordinate1X]=1-x[i.coordinate1X],x[i.coordinate2X]=1-x[i.coordinate2X],x[i.coordinate3X]=1-x[i.coordinate3X],!0):!1)}}return g}catch(g){throw new Error(g)}}function s(h){const g=h[i.coordinate1X],b=h[i.coordinate2X],w=h[i.coordinate3X];return h[i.coordinate1X]=h[i.coordinate1Y],h[i.coordinate2X]=h[i.coordinate2Y],h[i.coordinate3X]=h[i.coordinate3Y],h[i.coordinate1Y]=g,h[i.coordinate2Y]=b,h[i.coordinate3Y]=w,h}function u(h){a.value=h.index,f.value=h.button}function d(){m&&clearInterval(m)}return t.onUnmounted(()=>{d()}),(h,g)=>(t.openBlock(),t.createElementBlock("div",kNt,[CNt,e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",SNt,[t.createVNode(m5,{"selected-button-index":a.value,buttons:n.value,width:"320px","border-radius":"16px",onChange:u},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",TNt,[t.createVNode(_Nt,{team:e.isGamePreMatch?e.teamSelectedPreMatch:f.value},null,8,["team"])]),t.createElementVNode("div",ENt,[t.createVNode(gNt,{"passes-plays":y.value,"play-indexes":t.unref(i)},null,8,["passes-plays","play-indexes"])])]))}},[["__scopeId","data-v-122c6617"]]),rga="";let fq=null;const MNt={components:{GSCHighlights:V3t,ToggleButtons:m5,VolumetricSectionContainer:ANt,DataProminentGame:ewt,HighlightsProminentGameLive:y4t,HighlightsProminentGame:e4t,GSCRadioToggle:FH,FieldPosesion:Nwt,EventsLine:s5t,ChalkboardSectionContainer:uNt},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)fq=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),fq.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickPlayEvent(e){const r={seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",r)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},om=e=>(t.pushScopeId("data-v-1c96092d"),e=e(),t.popScopeId(),e),INt={class:"container-prominent",ref:"prominent"},PNt={class:"container-prominent-data"},BNt={class:"container-prominent-section"},NNt={key:0,class:"highlights-containers"},zNt={class:"highlights-content"},ONt={key:1,class:"highlights-containers"},FNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),LNt={key:0,class:"container-leyend-prematch"},DNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),RNt={key:1,class:"container-leyend-prematch-movil"},VNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),$Nt=om(()=>t.createElementVNode("br",null,null,-1)),jNt=om(()=>t.createElementVNode("br",null,null,-1)),UNt={key:2,class:"container-leyend-prematch-movil"},GNt=om(()=>t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1)),HNt=om(()=>t.createElementVNode("br",null,null,-1)),WNt=om(()=>t.createElementVNode("br",null,null,-1)),qNt={class:"container-switch-toggle"},YNt={class:"container-prominent-section__chalkboard"},XNt=om(()=>t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1));function ZNt(e,r,i,B,D,c){const m=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),f=t.resolveComponent("GSCHighlights"),n=t.resolveComponent("EventsLine"),y=t.resolveComponent("ToggleButtons"),_=t.resolveComponent("GSCRadioToggle"),p=t.resolveComponent("FieldPosesion"),l=t.resolveComponent("VolumetricSectionContainer"),o=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",INt,[t.createElementVNode("div",PNt,[t.createVNode(m,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-prominent-data":i.timeLiveProminentData,game:i.game,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onLoading:c.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])]),t.createElementVNode("div",BNt,[i.game.is_live===1||i.game.game_status===0||i.game.game_status===1?(t.openBlock(),t.createElementBlock("div",NNt,[t.createElementVNode("div",{class:t.normalizeClass(c.getContainerClass())},[D.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(i.game).length>0&&Object.keys(i.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(D.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(i.tournamentSelected.id!=41?i.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):i.game.matchday_name=="Matchday 10"?"Final":i.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(D.widthSection>830?"highlights-title":"highlights-title-mobile")},"HIGHLIGHTS DEL PARTIDO",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",zNt,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showgoalsliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,"title-card":"GOLES",onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"title-card":"GOLES","can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(D.showsummaryliveData?D.widthSection>830?"width: 49%;":"width: 100%;":"")},[(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.game.is_live===1||i.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":i.timeLiveHighlightsProminentAndVideo,"can-play-videos":i.canPlayVideos,game:i.game,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onShowsummarylive:c.showsummarylive,onIntervalidhighlive:c.intervalidhighlive,onOpenmedia:c.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:c.showsummarylive,onShowleyendlive:c.showleyendlive,onShowgoalslive:c.showgoalslive,onIntervalidhighlive:c.intervalidhighlive,"can-play-videos":i.canPlayVideos,game:i.game,onOpenmedia:c.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",ONt,[!D.isDataProminentGameLoading&&(i.game.is_live===1||i.game.game_status===0)&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.game.status===1&&i.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.canPlayVideos?(t.openBlock(),t.createBlock(f,{key:0,data:{game:i.game.gameId,season:i.game.seasonId,type:"historic"},"can-play-videos":i.canPlayVideos,"video-privileges-playing-as":i.videoPrivilegesPlayingAs,"privileges-team-id":i.playVideosPrivileges?i.playVideosPrivileges.seasonAndPrivileges.teamId:0,onOpenmedia:c.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),c.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(D.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,token:i.token,game:i.game,widthScreen:D.widthSection,"can-play-videos":i.canPlayVideos,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onPlayVideo:c.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(D.widthSection>760?"fields-section-container":"fields-section-container-movil")},[FNt,i.game.game_status===4&&i.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.widthSection>590?(t.openBlock(),t.createElementBlock("div",LNt,[DNt,t.createTextVNode(" Es en base a las estadisticas de los partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection>340&&D.widthSection<=590?(t.openBlock(),t.createElementBlock("div",RNt,[VNt,t.createTextVNode(" "),$Nt,t.createTextVNode("Es en base a las estadisticas de los partidos ya "),jNt,t.createTextVNode(" jugados en el torneo. ")])):t.createCommentVNode("",!0),D.widthSection<=340?(t.openBlock(),t.createElementBlock("div",UNt,[GNt,t.createTextVNode(" "),HNt,t.createTextVNode("Es en base a las estadisticas de los "),WNt,t.createTextVNode("partidos ya jugados en el torneo. ")])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(y,{"selected-button-index":D.teamButtonSelectedIndex,buttons:c.toggleButtons,width:"320px","border-radius":"16px",onChange:c.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",qNt,[t.createVNode(_,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:c.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,D.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(p,{"width-Section":D.widthSection,game:i.game,"time-live-possesion":i.timeLivePossesion,onIntervalidpossesion:c.intervalidpossesion,"team-selected":D.teamSelected.teamId===0?c.toggleButtons[0]:D.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,D.switchTypeViewFiled==="Porcentajes"||D.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(l,{game:i.game,"season-selected":i.seasonSelected,token:i.token,"is-game-pre-match":c.isGamePreMatch,"team-selected-pre-match":D.teamSelected,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,D.viewVolumtrica&&D.widthSection>760||D.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",YNt,[XNt,D.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(o,{key:0,"is-female":i.tournamentSelected.is_female===1,game:i.game,"season-selected":i.seasonSelected,"tournament-selected":i.tournamentSelected,token:i.token,"width-section":D.widthSection,"can-play-videos":i.canPlayVideos,"is-game-pre-match":c.isGamePreMatch,"play-videos-privileges":i.playVideosPrivileges,"volumetric-field-interval-minutes":i.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":i.chalkboardIntervalMinutes,"game-events-interval-minutes":i.gameEventsIntervalMinutes,onOpenMediaPlayer:c.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const JNt=$i(MNt,[["render",ZNt],["__scopeId","data-v-1c96092d"]]),iga="",KNt={class:"datagame-container"},QNt=$i({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:r}){function i(m){r("intervalidhighlive",m)}function B(m){r("intervalidpossesion",m)}function D(m){r("openmedia",m)}function c(m){r("openmedia",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",KNt,[t.createVNode(JNt,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:B,onIntervalidhighlive:i,onOpenmedia:D,onOpenMediaPlayer:c},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-244894a5"]]),ezt={class:"datagame-container"},tzt={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:r}){const i=e,B=t.ref(0);t.watch(()=>i.game,m=>{B.value=m.gameId},{deep:!0,immediate:!0});function D(m){r("openmedia",m)}function c(m){r("intervalidgs",m)}return(m,a)=>(t.openBlock(),t.createElementBlock("div",ezt,[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(x2),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:c,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(x2),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(x2),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,onOpenmedia:D},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges"])):t.createCommentVNode("",!0)],64))],64))]))}},azt={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 E_(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const nzt={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},YE={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:r}=E_(e);return{myDivRef:e,elementSize:r}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},mq=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},gq=YE.setup;YE.setup=gq?(e,r)=>(mq(),gq(e,r)):mq;const rzt={ref:"myDivRef"},izt=t.createElementVNode("br",null,null,-1),ozt=t.createElementVNode("br",null,null,-1);function szt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",rzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(c.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Promedio partido"),izt,t.createTextVNode("Torneo anterior")],2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},[t.createTextVNode("Partidos "),ozt,t.createTextVNode("Jugados")],2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(c.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(c.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const yq=$i(YE,[["render",szt],["__cssModules",{$style:nzt}]]),dva="",XE={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))}}},vq=()=>{t.useCssVars(e=>({"72ff6367":e.height,"5ab83942":e.borderWidthBtn,"685a33c6":e.borderType,bc0fc752:e.borderColor,"9449c3c4":e.borderRadius,ac97d8f4:e.width,"7e4ca6d6":e.backgroundColor,"00cc2df0":e.cursorType,"09b439a0":e.fontSize,"699b8062":e.fontStyle,"9ad7625a":e.fontFamily,"081aa5ee":e.marginLeftStat,"624845a4":e.fontSizeStat}))},_q=XE.setup;XE.setup=_q?(e,r)=>(vq(),_q(e,r)):vq;const lzt=e=>(t.pushScopeId("data-v-a6a12d0c"),e=e(),t.popScopeId(),e),czt=["src"],dzt={key:1,class:"text"},uzt=["src"],hzt={class:"stats"},pzt=lzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),fzt={class:"numstats"},mzt={class:"leyend"};function gzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(i.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,14,czt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",dzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,uzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",hzt,[pzt,t.createElementVNode("div",fzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",mzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const bq=$i(XE,[["render",gzt],["__scopeId","data-v-a6a12d0c"]]),yzt={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},ZE={components:{GSCButton:bq},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:r}=E_(e);return{myDivRef2:e,elementSize:r}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},xq=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},wq=ZE.setup;ZE.setup=wq?(e,r)=>(xq(),wq(e,r)):xq;const vzt={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},_zt=["src"],bzt=["src"],xzt=["src"],wzt=["src"],kzt=["fill"],Czt=["fill"],Szt=["src"],Tzt=["src"],Ezt=["fill"],Azt=["fill"],Mzt=["src"],Izt=["src"],Pzt=["src"],Bzt=["src"],Nzt=["fill"],zzt=["fill"];function Ozt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",vzt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,_zt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(i.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(i.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,bzt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:i.data.team_logo},null,10,xzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:i.data.player_country_flag},null,10,wzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[1]||(r[1]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.numberOfVideosClass)},t.toDisplayString(i.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[2]||(r[2]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,Czt)],10,kzt))],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(i.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(c.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:i.data.team_logo},null,10,Szt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(i.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:i.data.team_logo},null,10,Tzt)],2),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedType1Class)},t.toDisplayString(i.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(i.data.frequency)+" ",1),i.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(c.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.ageType1Class)},t.toDisplayString(i.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedGamesType1Class)},t.toDisplayString(i.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(c.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.playedMinutesType1Class)},t.toDisplayString(i.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(c.leagueNameType1Class)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(m,{key:1,mini:!0,icon:i.iconVideos,"icon-size":i.iconSizeMini,"icon-position":i.iconPosition,width:i.buttonWidthMini,height:i.buttonHeightMini,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"font-size":i.buttonFontSize,onClick:r[4]||(r[4]=a=>c.emitEventMedia(i.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(c.numberOfVideosType1Class)},t.toDisplayString(i.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[5]||(r[5]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,Azt)],10,Ezt))],2)],2)],6)):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(c.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(c.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(c.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(c.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(c.imgPlayerIconClass),src:i.data.player_photo},null,10,Mzt),t.createElementVNode("div",{class:t.normalizeClass(c.manchesterUnitedClass)},t.toDisplayString(i.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:i.data.team_logo},null,10,Izt)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(c.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:i.data.team_logo},null,10,Pzt),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(i.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(i.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(i.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:i.data.player_country_flag},null,10,Bzt)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(i.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(i.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(c.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(c.containerBtnVideosClass)},[i.canPlayVideos?(t.openBlock(),t.createBlock(m,{key:0,icon:i.iconVideos,"icon-size":i.iconSize,"icon-position":i.iconPosition,width:B.elementSize.width<=680?"83px":i.buttonWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.buttonTextValue,"font-size":i.buttonFontSize,onClick:r[6]||(r[6]=a=>c.emitEventMedia(i.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:r[7]||(r[7]=a=>c.clickExpand(i.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,zzt)],10,Nzt))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const kq=$i(ZE,[["render",Ozt],["__cssModules",{$style:yzt}]]),Fzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},JE={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))}}},Cq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Sq=JE.setup;JE.setup=Sq?(e,r)=>(Cq(),Sq(e,r)):Cq;const Lzt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),Dzt=["src"],Rzt={key:1,class:"text"},Vzt=["src"],$zt={class:"stats"},jzt=Lzt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),Uzt={class:"numstats"},Gzt={class:"leyend"};function Hzt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Dzt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",Rzt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,Vzt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",$zt,[jzt,t.createElementVNode("div",Uzt,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",Gzt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const Wzt=Fzt(JE,[["render",Hzt],["__scopeId","data-v-fb269a1e"]]),qzt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},KE={components:{GSCButton:Wzt},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)}},Tq=()=>{t.useCssVars(e=>({"132156c0":e.centerTextCustom,"096d3ecc":e.marginCustom}))},Eq=KE.setup;KE.setup=Eq?(e,r)=>(Tq(),Eq(e,r)):Tq;const Yzt={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Xzt={class:"gsc-filterperteam__panel-teams__cont-teams"},Zzt=["onClick"],Jzt=["src","alt","title"];function Kzt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(c.customStyleContain)},[t.createElementVNode("div",Yzt,[t.createElementVNode("div",Xzt,[i.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(m,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:c.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(c.customStyleTeam),class:t.normalizeClass([a.id==D.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:f=>c.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Jzt)],14,Zzt))),128))])],512)],4)}const Qzt=qzt(KE,[["render",Kzt],["__scopeId","data-v-ab79352d"]]),eOt={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},QE={components:{GSCButton:bq},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)}}},Aq=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},Mq=QE.setup;QE.setup=Mq?(e,r)=>(Aq(),Mq(e,r)):Aq;const tOt=["src"],aOt=["src"],nOt=["src"],rOt=["src"],iOt=["fill"],oOt=["fill"],sOt=["src"],lOt=["fill"],cOt=["fill"];function dOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(i.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:i.data.photo},null,10,tOt),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:i.data.logo},null,10,aOt)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(i.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[i.canPlayVideos||i.game.awayTeam.team_id==i.teamWidget&&i.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[0]||(r[0]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:i.data.logo},null,10,nOt)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(m,{icon:"","icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:i.data.logo},null,10,rOt)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:r[1]||(r[1]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,oOt)],10,iOt))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(i.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:i.data.logo},null,10,sOt)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(i.data.name_team),3),t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[2]||(r[2]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(m,{"icon-size":i.iconSize,"icon-position":i.iconPosition,width:i.buttonWidth,"button-max-width":i.buttonMaxWidth,height:i.buttonHeight,"border-radius":i.buttonRadius,"border-width":i.buttonBorderWidth,"background-color":i.buttonBackground,"font-family":i.buttonfontFamily,"border-color":i.buttonBorderColor,"text-value":i.data.total+" "+i.categoryName.toLowerCase(),"font-size":i.buttonFontSize,onClick:r[3]||(r[3]=a=>c.clickEventMedia(i.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(i.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:r[4]||(r[4]=a=>c.clickExpand(i.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,i.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:i.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:i.colorArrow},null,8,cOt)],10,lOt))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const uOt=$i(QE,[["render",dOt],["__cssModules",{$style:eOt}]]),hOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},eA={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))}}},Iq=()=>{t.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},Pq=eA.setup;eA.setup=Pq?(e,r)=>(Iq(),Pq(e,r)):Iq;const pOt=e=>(t.pushScopeId("data-v-fb269a1e"),e=e(),t.popScopeId(),e),fOt=["src"],mOt={key:1,class:"text"},gOt=["src"],yOt={class:"stats"},vOt=pOt(()=>t.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),_Ot={class:"numstats"},bOt={class:"leyend"};function xOt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",D.status&&i.typeOnOff&&"button-active"]),style:t.normalizeStyle([c.customStyle,D.status&&i.typeOnOff&&c.customActive]),onClick:r[0]||(r[0]=(...m)=>c.btnClick&&c.btnClick(...m))},[i.icon&&i.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,fOt)):t.createCommentVNode("",!0),i.textValue?(t.openBlock(),t.createElementBlock("div",mOt,t.toDisplayString(i.textValue),1)):t.createCommentVNode("",!0),i.icon&&i.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:i.iconSize}),src:i.icon},null,12,gOt)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...m)=>c.btnClick&&c.btnClick(...m))},[t.createElementVNode("div",yOt,[vOt,t.createElementVNode("div",_Ot,t.toDisplayString(i.textStat),1)]),t.createElementVNode("div",bOt,t.toDisplayString(i.textCategory),1)])):t.createCommentVNode("",!0)])}const wOt=hOt(eA,[["render",xOt],["__scopeId","data-v-fb269a1e"]]),Mba="",Iba="",kOt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},tA={components:{GSCButton:wOt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:r}=E_(e);return{myDivRef:e,elementSize:r}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},Bq=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},Nq=tA.setup;tA.setup=Nq?(e,r)=>(Bq(),Nq(e,r)):Bq;const lh=e=>(t.pushScopeId("data-v-0bb9c2ff"),e=e(),t.popScopeId(),e),COt={ref:"myDivRef"},SOt=["src"],TOt=lh(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),EOt=lh(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),AOt=lh(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),MOt=lh(()=>t.createElementVNode("span",null,"Partidos jugados:",-1)),IOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),POt=lh(()=>t.createElementVNode("span",null,"xG: ",-1)),BOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),NOt=lh(()=>t.createElementVNode("span",null,"xG: ",-1)),zOt=lh(()=>t.createElementVNode("span",null,"Posición en la tabla: ",-1)),OOt=lh(()=>t.createElementVNode("span",null,"Goles anotados: ",-1)),FOt=lh(()=>t.createElementVNode("span",null,"Goles recibidos: ",-1)),LOt=lh(()=>t.createElementVNode("span",null,"Partidos jugados: ",-1)),DOt=lh(()=>t.createElementVNode("span",null,"Efectividad de pases: ",-1)),ROt=lh(()=>t.createElementVNode("span",null,"xG: ",-1));function VOt(e,r,i,B,D,c){const m=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",COt,[i.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,i.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[i.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(i.data.teams),3)],2)):t.createCommentVNode("",!0),i.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(i.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),i.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(i.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:i.data.countryFlag},null,8,SOt)],2)],2)],2)):t.createCommentVNode("",!0),i.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[i.viewGames&&!i.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.games),3)],2)):t.createCommentVNode("",!0),i.viewMin&&!i.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.min),3)],2)):t.createCommentVNode("",!0),i.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(i.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.goals),3)],2)):t.createCommentVNode("",!0),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:r[0]||(r[0]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,i.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[TOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[EOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[AOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[MOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[IOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[POt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[BOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[NOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[zOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[OOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[FOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[LOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[i.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[DOt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[ROt,t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(i.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(i.data.total),3)],2)],2)],2),i.viewButton?(t.openBlock(),t.createBlock(m,{key:0,style:t.normalizeStyle(i.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:r[1]||(r[1]=a=>c.viewProfile(i.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const zq=$i(tA,[["render",VOt],["__cssModules",{$style:kOt}],["__scopeId","data-v-0bb9c2ff"]]);/**
|
|
4159
4159
|
* Vue 3 Carousel 0.3.1
|
|
4160
4160
|
* (c) 2023
|
|
4161
4161
|
* @license MIT
|
|
4162
|
-
*/const Tu={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"}},Oq={itemsToShow:{default:Tu.itemsToShow,type:Number},itemsToScroll:{default:Tu.itemsToScroll,type:Number},wrapAround:{default:Tu.wrapAround,type:Boolean},throttle:{default:Tu.throttle,type:Number},snapAlign:{default:Tu.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Tu.transition,type:Number},breakpoints:{default:Tu.breakpoints,type:Object},autoplay:{default:Tu.autoplay,type:Number},pauseAutoplayOnHover:{default:Tu.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Tu.mouseDrag,type:Boolean},touchDrag:{default:Tu.touchDrag,type:Boolean},dir:{default:Tu.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Tu.i18n,type:Object},settings:{default(){return{}},type:Object}};function $Ot({config:e,slidesCount:r}){const{snapAlign:i,wrapAround:B,itemsToShow:D=1}=e;if(B)return Math.max(r-1,0);let c;switch(i){case"start":c=r-D;break;case"end":c=r-1;break;case"center":case"center-odd":c=r-Math.ceil((D-.5)/2);break;case"center-even":c=r-Math.ceil(D/2);break;default:c=0;break}return Math.max(c,0)}function jOt({config:e,slidesCount:r}){const{wrapAround:i,snapAlign:B,itemsToShow:D=1}=e;let c=0;if(i||D>r)return c;switch(B){case"start":c=0;break;case"end":c=D-1;break;case"center":case"center-odd":c=Math.floor((D-1)/2);break;case"center-even":c=Math.floor((D-2)/2);break;default:c=0;break}return c}function aA({val:e,max:r,min:i}){return r<i?e:Math.min(Math.max(e,i),r)}function UOt({config:e,currentSlide:r,slidesCount:i}){const{snapAlign:B,wrapAround:D,itemsToShow:c=1}=e;let m=r;switch(B){case"center":case"center-odd":m-=(c-1)/2;break;case"center-even":m-=(c-2)/2;break;case"end":m-=c-1;break}return D?m:aA({val:m,max:i-c,min:0})}function Fq(e){return e?e.reduce((r,i)=>{var B;return i.type===t.Fragment?[...r,...Fq(i.children)]:((B=i.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...r,i]:r},[]):[]}function nA({val:e,max:r,min:i=0}){return e>r?nA({val:e-(r+1),max:r,min:i}):e<i?nA({val:e+(r+1),max:r,min:i}):e}function GOt(e,r){let i;return r?function(...B){const D=this;i||(e.apply(D,B),i=!0,setTimeout(()=>i=!1,r))}:e}function HOt(e,r){let i;return function(...B){i&&clearTimeout(i),i=setTimeout(()=>{e(...B),i=null},r)}}function WOt(e="",r={}){return Object.entries(r).reduce((i,[B,D])=>i.replace(`{${B}}`,String(D)),e)}var qOt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},Tu))),r=t.inject("currentSlide",t.ref(0)),i=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},WOt(e.i18n.itemXofY,{currentSlide:r.value+1,slidesCount:i.value}))}}),YOt=t.defineComponent({name:"Carousel",props:Oq,setup(e,{slots:r,emit:i,expose:B}){var D;const c=t.ref(null),m=t.ref([]),a=t.ref(0),v=t.ref(0),f=t.reactive(Object.assign({},Tu));let n=Object.assign({},Tu),y;const _=t.ref((D=e.modelValue)!==null&&D!==void 0?D:0),p=t.ref(0),l=t.ref(0),o=t.ref(0),s=t.ref(0);let u,d;t.provide("config",f),t.provide("slidesCount",v),t.provide("currentSlide",_),t.provide("maxSlide",o),t.provide("minSlide",s),t.provide("slideWidth",a);function h(){y=Object.assign({},e.breakpoints),n=Object.assign(Object.assign(Object.assign({},n),e),{i18n:Object.assign(Object.assign({},n.i18n),e.i18n),breakpoints:void 0}),b(n)}function g(){if(!y||!Object.keys(y).length)return;const ae=Object.keys(y).map(ie=>Number(ie)).sort((ie,ue)=>+ue-+ie);let ne=Object.assign({},n);ae.some(ie=>{const ue=window.matchMedia(`(min-width: ${ie}px)`).matches;return ue&&(ne=Object.assign(Object.assign({},ne),y[ie])),ue}),b(ne)}function b(ae){Object.entries(ae).forEach(([ne,ie])=>f[ne]=ie)}const w=HOt(()=>{g(),x()},16);function x(){if(!c.value)return;const ae=c.value.getBoundingClientRect();a.value=ae.width/f.itemsToShow}function S(){v.value<=0||(l.value=Math.ceil((v.value-1)/2),o.value=$Ot({config:f,slidesCount:v.value}),s.value=jOt({config:f,slidesCount:v.value}),f.wrapAround||(_.value=aA({val:_.value,max:o.value,min:s.value})))}t.onMounted(()=>{t.nextTick(()=>x()),setTimeout(()=>x(),1e3),g(),V(),window.addEventListener("resize",w,{passive:!0}),i("init")}),t.onUnmounted(()=>{d&&clearTimeout(d),u&&clearInterval(u),window.removeEventListener("resize",w,{passive:!0})});let k=!1;const T={x:0,y:0},C={x:0,y:0},A=t.reactive({x:0,y:0}),E=t.ref(!1),M=t.ref(!1),I=()=>{E.value=!0},N=()=>{E.value=!1};function z(ae){["INPUT","TEXTAREA","SELECT"].includes(ae.target.tagName)||(k=ae.type==="touchstart",k||ae.preventDefault(),!(!k&&ae.button!==0||U.value)&&(T.x=k?ae.touches[0].clientX:ae.clientX,T.y=k?ae.touches[0].clientY:ae.clientY,document.addEventListener(k?"touchmove":"mousemove",F,!0),document.addEventListener(k?"touchend":"mouseup",R,!0)))}const F=GOt(ae=>{M.value=!0,C.x=k?ae.touches[0].clientX:ae.clientX,C.y=k?ae.touches[0].clientY:ae.clientY;const ne=C.x-T.x,ie=C.y-T.y;A.y=ie,A.x=ne},f.throttle);function R(){const ae=f.dir==="rtl"?-1:1,ne=Math.sign(A.x)*.4,ie=Math.round(A.x/a.value+ne)*ae;if(ie&&!k){const ue=he=>{he.stopPropagation(),window.removeEventListener("click",ue,!0)};window.addEventListener("click",ue,!0)}Z(_.value-ie),A.x=0,A.y=0,M.value=!1,document.removeEventListener(k?"touchmove":"mousemove",F,!0),document.removeEventListener(k?"touchend":"mouseup",R,!0)}function V(){!f.autoplay||f.autoplay<=0||(u=setInterval(()=>{f.pauseAutoplayOnHover&&E.value||q()},f.autoplay))}function $(){u&&(clearInterval(u),u=null),V()}const U=t.ref(!1);function Z(ae){const ne=f.wrapAround?ae:aA({val:ae,max:o.value,min:s.value});_.value===ne||U.value||(i("slide-start",{slidingToIndex:ae,currentSlideIndex:_.value,prevSlideIndex:p.value,slidesCount:v.value}),U.value=!0,p.value=_.value,_.value=ne,d=setTimeout(()=>{if(f.wrapAround){const ie=nA({val:ne,max:o.value,min:0});ie!==_.value&&(_.value=ie,i("loop",{currentSlideIndex:_.value,slidingToIndex:ae}))}i("update:modelValue",_.value),i("slide-end",{currentSlideIndex:_.value,prevSlideIndex:p.value,slidesCount:v.value}),U.value=!1,$()},f.transition))}function q(){Z(_.value+f.itemsToScroll)}function W(){Z(_.value-f.itemsToScroll)}const Q={slideTo:Z,next:q,prev:W};t.provide("nav",Q),t.provide("isSliding",U);const X=t.computed(()=>UOt({config:f,currentSlide:_.value,slidesCount:v.value}));t.provide("slidesToScroll",X);const J=t.computed(()=>{const ae=f.dir==="rtl"?-1:1,ne=X.value*a.value*ae;return{transform:`translateX(${A.x-ne}px)`,transition:`${U.value?f.transition:0}ms`,margin:f.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function ee(){h(),g(),S(),x(),$()}Object.keys(Oq).forEach(ae=>{["modelValue"].includes(ae)||t.watch(()=>e[ae],ee)}),t.watch(()=>e.modelValue,ae=>{ae!==_.value&&Z(Number(ae))}),t.watch(v,S),i("before-init"),h();const le={config:f,slidesCount:v,slideWidth:a,next:q,prev:W,slideTo:Z,currentSlide:_,maxSlide:o,minSlide:s,middleSlide:l};B({updateBreakpointsConfigs:g,updateSlidesData:S,updateSlideWidth:x,initDefaultConfigs:h,restartCarousel:ee,slideTo:Z,next:q,prev:W,nav:Q,data:le});const oe=r.default||r.slides,se=r.addons,ce=t.reactive(le);return()=>{const ae=Fq(oe==null?void 0:oe(ce)),ne=(se==null?void 0:se(ce))||[];ae.forEach((fe,ge)=>fe.props.index=ge);let ie=ae;if(f.wrapAround){const fe=ae.map((be,xe)=>t.cloneVNode(be,{index:-ae.length+xe,isClone:!0,key:`clone-before-${xe}`})),ge=ae.map((be,xe)=>t.cloneVNode(be,{index:ae.length+xe,isClone:!0,key:`clone-after-${xe}`}));ie=[...fe,...ae,...ge]}m.value=ae,v.value=Math.max(ae.length,1);const ue=t.h("ol",{class:"carousel__track",style:J.value,onMousedownCapture:f.mouseDrag?z:null,onTouchstartPassiveCapture:f.touchDrag?z:null},ie),he=t.h("div",{class:"carousel__viewport"},ue);return t.h("section",{ref:c,class:{carousel:!0,"is-sliding":U.value,"is-dragging":M.value,"is-hover":E.value,"carousel--rtl":f.dir==="rtl"},dir:f.dir,"aria-label":f.i18n.ariaGallery,tabindex:"0",onMouseenter:I,onMouseleave:N},[he,ne,t.h(qOt)])}}}),Lq;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(Lq||(Lq={}));var XOt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:r}){const i=t.inject("config",t.reactive(Object.assign({},Tu))),B=t.inject("currentSlide",t.ref(0)),D=t.inject("slidesToScroll",t.ref(0)),c=t.inject("isSliding",t.ref(!1)),m=()=>e.index===B.value,a=()=>e.index===B.value-1,v=()=>e.index===B.value+1,f=()=>{const n=Math.floor(D.value),y=Math.ceil(D.value+i.itemsToShow-1);return e.index>=n&&e.index<=y};return()=>{var n;return t.h("li",{style:{width:`${100/i.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":f(),"carousel__slide--active":m(),"carousel__slide--prev":a(),"carousel__slide--next":v(),"carousel__slide--sliding":c.value},"aria-hidden":!f()},(n=r.default)===null||n===void 0?void 0:n.call(r))}}});const ZOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},JOt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),KOt={class:"gsc-carousel"},QOt={key:0},eFt=JOt(()=>t.createElementVNode("div",null,"no hay",-1)),tFt=[eFt],aFt={class:"gsc-carousel__2d__slides"},nFt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rFt=["fill"],iFt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oFt=["fill"],sFt={class:"gsc-carousel__2d__navigation"},lFt={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cFt=["stroke"],dFt={key:1,class:"gsc-carousel__2d__navigation__pagination"},uFt=["onClick"],hFt={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pFt=["stroke"],fFt={__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(r=>r 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:r,emit:i}){const B=e;t.useCssVars(o=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const D=t.ref(null),c=t.ref({}),m=t.ref(0),a=t.ref(!1);t.watch(D,o=>{o&&a.value?(a.value=!1,v(B.items)):o&&o.slideTo&&o.slideTo(m.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,o=>{m.value!==o&&_(o)}),t.watch(()=>B.defaultItemByIndex,o=>{m.value!==o&&_(o)}),t.watch(()=>B.items,o=>{D.value?v(o):a.value=!0},{immediate:!0});function v(o){o&&o.length&&D.value&&setTimeout(()=>{if(B.defaultItemByProp){const s=B.items.findIndex(u=>u[B.defaultItemByProp.propName]===B.defaultItemByProp.value);s!==-1?(m.value=s,c.value=o[s]):(m.value=0,c.value=o[0])}else m.value=B.defaultItemByIndex,c.value=o[B.defaultItemByIndex];D.value.slideTo&&D.value.slideTo(m.value),c.value&&m.value===0&&i("input",{selectedItem:c.value,selectedItemIndex:m.value})},500)}function f(){D.value&&D.value.next()}function n(){D.value&&D.value.prev()}function y(){D.value&&D.value.updateSlideWidth()}function _(o){D.value&&D.value.slideTo(o)}function p(o){D.value.slideTo(o)}function l(o){const s=o.slidingToIndex<0?B.items.length-1:o.slidingToIndex===B.items.length?0:o.slidingToIndex;m.value=s,c.value=B.items[s],i("update:currentItemIndex",s),i("input",{selectedItem:c.value,selectedItemIndex:m.value})}return r({prev:n,next:f,updateSlideWidth:y,slideTo:_}),(o,s)=>(t.openBlock(),t.createElementBlock("div",KOt,[B.is3d?(t.openBlock(),t.createElementBlock("div",QOt,tFt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",aFt,[t.createVNode(t.unref(YOt),{ref_key:"carousel2d",ref:D,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:l},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(u,d)=>(t.openBlock(),t.createBlock(t.unref(XOt),{key:d},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{item:u},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:s[0]||(s[0]=u=>D.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",nFt,[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,rFt)]))],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:s[1]||(s[1]=u=>f())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",iFt,[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,oFt)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",sFt,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:s[2]||(s[2]=u=>n())},[(t.openBlock(),t.createElementBlock("svg",lFt,[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,cFt)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",dFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${d}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${m.value===d?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${m.value===d?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:h=>p(d)},null,12,uFt))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:s[3]||(s[3]=u=>D.value.next())},[(t.openBlock(),t.createElementBlock("svg",hFt,[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,pFt)]))])):t.createCommentVNode("",!0)])],2))]))}},mFt=ZOt(fFt,[["__scopeId","data-v-54620d25"]]),ixa="",Dq={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"},oxa="",rA={components:{GSCCarousel:mFt,GSCLeaders:uOt,GSCRowTable:kq,GSCTableHeader:yq,GSCExpandedInfo:zq},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"},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:r}=E_(e);return{myDivRef:e,elementSize:r}},watch:{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,r){e&&(JSON.stringify(e)!==JSON.stringify(r)||this.sonConjuntosDistintos(e.setNationalitiesIds,r.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={},r={},i=[],B=[],D=[];return this.formatFilterStats.map(c=>{e[c.team_id]?e[c.team_id].total=e[c.team_id].total+c.total:(e[c.team_id]={},e[c.team_id].total=c.total,e[c.team_id].id=this.teamInfo[c.team_id].id,e[c.team_id].name=this.teamInfo[c.team_id].name.replace(" Femenil",""),e[c.team_id].img="https://az755631.vo.msecnd.net/teams-80/"+c.team_id+".png",e[c.team_id].effectiveness=this.teamInfo[c.team_id].effectiveness,e[c.team_id].frecuency=this.teamInfo[c.team_id].frecuency,e[c.team_id].game_avg=this.teamInfo[c.team_id].game_avg,e[c.team_id].game_avg_last_season=this.teamInfo[c.team_id].game_avg_last_season,e[c.team_id].games_played_lastseason=this.teamInfo[c.team_id].games_played_lastseason,e[c.team_id].games_played=this.teamInfo[c.team_id].games_played,e[c.team_id].positiontable=this.teamInfo[c.team_id].positiontable,e[c.team_id].goals=this.teamInfo[c.team_id].goals,e[c.team_id].goalsrecived=this.teamInfo[c.team_id].goalsrecived,e[c.team_id].xg=this.teamInfo[c.team_id].xg),r[c.player_id]?c.player_id!=0&&c.player_id!=62117&&(r[c.player_id].total=r[c.player_id].total+c.total):c.player_id!=0&&c.player_id!=62117&&(r[c.player_id]={},r[c.player_id].total=c.total,c.player_id&&this.playersInfo[c.player_id]?(r[c.player_id].name=this.playersInfo[c.player_id].name,r[c.player_id].name_short=this.getnameshort(this.playersInfo[c.player_id].name),r[c.player_id].img=this.playersInfo[c.player_id].img,r[c.player_id].id=this.playersInfo[c.player_id].id,r[c.player_id].age=this.playersInfo[c.player_id].age,r[c.player_id].team=this.playersInfo[c.player_id].team,r[c.player_id].teamname=this.playersInfo[c.player_id].teamname,r[c.player_id].teamid=this.playersInfo[c.player_id].teamid,r[c.player_id].position=this.playersInfo[c.player_id].position,r[c.player_id].positionId=this.playersInfo[c.player_id].positionId,r[c.player_id].positionfull=this.playersInfo[c.player_id].positionfull,r[c.player_id].country=this.playersInfo[c.player_id].country,r[c.player_id].effectiveness=this.playersInfo[c.player_id].effectiveness,r[c.player_id].minutes=this.playersInfo[c.player_id].minutes_played,r[c.player_id].games=this.playersInfo[c.player_id].games_played,r[c.player_id].date=this.playersInfo[c.player_id].date,r[c.player_id].nationality=this.playersInfo[c.player_id].nationality,r[c.player_id].player_country_flag=this.playersInfo[c.player_id].player_country_flag,r[c.player_id].categoryName=this.categoryName):(r[c.player_id].id=c.player_id,r[c.player_id].name=c.player_id,r[c.player_id].img="SIN IMAGEN",r[c.player_id].age="",r[c.player_id].teamname="",r[c.player_id].team="",r[c.player_id].teamid=0,r[c.player_id].position="",r[c.player_id].positionId=0,r[c.player_id].positionfull="",r[c.player_id].country="",r[c.player_id].effectiveness="",r[c.player_id].minutes="",r[c.player_id].games="",r[c.player_id].date="00-00-0000",r[c.player_id].nationality="",r[c.player_id].player_country_flag="",r[c.player_id].categoryName=""))}),i.push(...Object.values(e)),B.push(...Object.values(r)),i=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((c,m)=>(c.top=m<9?"0"+(m+1):""+(m+1),c)),i=i.map((c,m)=>(c.top=m<9?"0"+(m+1):""+(m+1),c)),this.filterTeam!==0&&!this.isTeam&&(D=B.filter(c=>c.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(i):this.filterTeam!=0?this.formatArrayPaginate(D):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",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"}]}),methods:{changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,r){return e.total>r.total?-1:e.total<r.total?1:e.minutes<r.minutes?-1:e.minutes>r.minutes?1:0},sonConjuntosDistintos(e,r){const i=Array.from(e),B=Array.from(r);if(i.length!==B.length)return!0;for(let D=0;D<i.length;D++)if(!r.has(i[D]))return!0;return!1},getnameshort(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";return D=D.replace(",",""),c+". "+D},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,r){return e.total<r.total?-1:e.total>r.total?1:e.name<r.name?-1:e.name>r.name?1:0},sortAndSlice(e,r){return e.sort((i,B)=>(i.name<B.name?1:-1)&&(i.total<B.total?1:-1)).slice(0,r)},getCategoryName(e){let r="";for(let i=0;i<this.categories.length;i++)e==this.categories[i].id&&(r=this.categories[i].name);return r},translateTopCategories(e){return{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]}[e]||[]},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,r,i){let B=this.filtersValues.matchResult,D=this.filtersValues.playingAs,c=this.filtersValues.sections,m=this.filtersValues.zone,a=this.translateTopCategories(r);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,D=this.filterEmitAux.playingAs,c=this.filterEmitAux.sections,m=this.filterEmitAux.zone);const v=1,f=2,n=3,y=this.isTeam?n:f,_=e.player_id;let p=[],l=this.isTeam?e.id:this.filterTeam;_?this.isTeam?l=_:(p=[_],a=a.filter(s=>!s.toString().includes("_r"))):this.isTeam?l=e.id:(p=[e.id],a=a.filter(s=>!s.toString().includes("_r")));const o={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:y,gameIds:null,playerIds:p,goalkeeperIds:[],categoryIds:this.translateTopCategories(r),teamId:l||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:i,playingAs:D,timeSections:c,fieldSections:m,coordinatePoint:this.getCoordinatePointPerCategory(r)}};this.$emit("setopenmedia",o)},emitEventMediaFullTable(e,r,i){let B=this.filtersValues.matchResult,D=this.filtersValues.playingAs,c=this.filtersValues.sections,m=this.filtersValues.zone,a=this.translateTopCategories(r);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,D=this.filterEmitAux.playingAs,c=this.filterEmitAux.sections,m=this.filterEmitAux.zone);const v=1,f=2,n=3,y=this.isTeam?n:f;let _=[],p=this.isTeam?e.id:this.filterTeam;this.isTeam?p=e.id:(_=[e.id],a=a.filter(o=>!o.toString().includes("_r")));const l={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:y,gameIds:null,playerIds:_,goalkeeperIds:[],categoryIds:a,teamId:p||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:i,playingAs:D,timeSections:c,fieldSections:m,coordinatePoint:this.getCoordinatePointPerCategory(r)}};this.$emit("setopenmedia",l)},replaceImgPlayer(e){return e.replace("https://az755631.vo.msecnd.net/players-profile/","https://az755631.vo.msecnd.net/players-profile-no-bg/")},abrevName(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";D=D.replace(",","");var m=c+". "+D;return m},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,r){this.$emit("clickprofile",{id:e,teamId:r,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){this.mapPlayers=new Map;try{if(!e)return;let r=[],i={},B={};this.arePlaysEmpty=!1;const D=$c.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;let c={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?c=await D.get(this.url+"/"+this.gameId+"/"+this.category+"?t="+this.teamWidget):c=await D.get(this.url+"/"+this.gameId+"/"+this.category):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?c=await D.get(this.url+"/"+this.gameId+"/"+this.category+"?acc=1&t="+this.teamWidget):c=await D.get(this.url+"/"+this.gameId+"/"+this.category+"?acc=1"):this.isWidget&&this.teamWidget!=0?c=await D.get(this.urlPrematch+this.season+"/"+this.category+"?t="+this.teamWidget):c=await D.get(this.urlPrematch+this.season+"/"+this.category+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),c&&c.data&&c.data.data&&c.data.data.length>0){r=c.data.data.map(a=>this.formatStatsData(a)),c.data.teams.forEach(a=>{i[a[0]]={},i[a[0]].id=a[0],i[a[0]].name=a[1],i[a[0]].abrv=a[2],i[a[0]].img=a[3],i[a[0]].effectiveness=a[4],i[a[0]].games_played=a[5],i[a[0]].games_played_lastseason=a[6],i[a[0]].positiontable=a[7],i[a[0]].goals=a[8],i[a[0]].goalsrecived=a[9],i[a[0]].xg=a[10],i[a[0]].frecuency=a[11],i[a[0]].game_avg=a[12],i[a[0]].game_avg_last_season=a[13]});const m=new Set;c.data.players.forEach(a=>{const v=this.getObjectPlayer(a);this.mapPlayers.set(v.numberId,v);const f=v.numberAge,n=v.teamName.length>0?v.teamName[0].acronym:"",y=v.teamName.length>0?i[v.teamName[0].team_id].name:"",_=v.teamName.length>0?v.teamName[0].team_id:"",p=this.positions[v.numberPositionId-1].fullname,l=this.positions[v.numberPositionId-1].name,o=v.countryId.length>0?v.countryId[0].nationality_id:"",s=v.effectiveness,u=v.min,d=v.games,h=v.date;v.arrayNationalities.forEach(g=>{m.add(g.numberId)}),B[a[0]]={id:a[0],name:a[1],img:a[2],age:f,team:n,teamname:y,teamid:_,position:p,positionfull:l,effectiveness:s,country:o,games_played:d,minutes_played:u,date:h,nationality:v.stringNationalityName,player_country_flag:v.player_country_flag,positionId:v.numberPositionId}}),this.setNationalityIds=m,this.arrayAgeRange=[c.data.min_age,c.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=i,this.playersInfo=B,this.formatStats=r,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=c}catch(r){return Promise.reject(r)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(r=>{const i=e.playingAs.includes(r.playing_as),B=e.matchResult.includes(r.match_result),D=e.sections.includes(r.section),c=e.typeZone===1&&e.zone.includes(r.origen)||e.typeZone===2&&e.zone.includes(r.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const m=this.mapPlayers.get(r.player_id);if(!m)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(r.player_id))return!1}else{let a=!1;for(const v of m.arrayNationalitiesIds)if(e.setNationalitiesIds.has(v)){a=!0;break}if(!a)return!1}if(m.numberAge<e.arrayAgeRange[0]||m.numberAge>e.arrayAgeRange[1]||m.date<e.setYear||!e.setPositionsIds.includes(m.numberPositionId))return!1}return(e.playingAs.length===0||i)&&(e.matchResult.length===0||B)&&(e.sections.length===0||D)&&(e.zone.length===0||c)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const r={};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((i,B)=>{r[i]=e[B]}),r},getObjectPlayer(e){const r=[],i=e[7].map(D=>(r.push(D.nationality_id),{stringName:D.nationality,numberId:D.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://az755631.vo.msecnd.net/flags/"+e[3]+".jpg",stringNationalityName:Dq[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:i,category:this.categoryName,arrayNationalitiesIds:r}},formatArrayPaginate(e){const r=Math.ceil(e.length/this.numRows);return Array.from({length:r},(i,B)=>{const D=B*this.numRows,c=D+this.numRows;return e.slice(D,c)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},Rq=()=>{t.useCssVars(e=>({"8ae3b9ac":e.borderRadius,"50a1442e":e.borderWidth,"4f8a45cb":e.borderColor}))},Vq=rA.setup;rA.setup=Vq?(e,r)=>(Rq(),Vq(e,r)):Rq;const P5=e=>(t.pushScopeId("data-v-f236a7e6"),e=e(),t.popScopeId(),e),gFt={ref:"myDivRef"},yFt={class:"btnViewFullList"},vFt={class:"text"},_Ft={class:"groupsLeague"},bFt={class:"row-table-carrousel"},xFt={key:1,class:"container-no-search-result"},wFt={key:0,class:"overlay-loading-top"},kFt=[P5(()=>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)),P5(()=>t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1))],CFt=P5(()=>t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),SFt=P5(()=>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));function TFt(e,r,i,B,D,c){const m=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),v=t.resolveComponent("GSCExpandedInfo"),f=t.resolveComponent("GSCCarousel"),n=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",gFt,[t.createElementVNode("div",yFt,[t.createElementVNode("div",vFt,[t.createElementVNode("div",_Ft,t.toDisplayString(i.categoryName),1)])]),i.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[c.topData.length>0?(t.openBlock(),t.createBlock(f,{key:0,items:c.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:c.changeCarrousel},{default:t.withCtx(({item:y})=>[t.createElementVNode("div",bFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(_,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:p},[_.top==1?(t.openBlock(),t.createBlock(m,{key:0,onMediadata:r[0]||(r[0]=l=>c.emitEventMedia(l,i.category,i.categoryName)),type:i.typeTable,"type-data":i.typeData,game:i.game,"team-widget":i.teamWidget,"can-play-videos":i.canPlayVideos,"is-expanded":e.playerexpand==_.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:i.typeTable==0?{top:"01",photo:_.img,logo:"https://az755631.vo.msecnd.net/teams-80/"+_.teamid+".png",name:_.name,player_short:_.name_short,player_id:_.id,categoryId:i.category,total:_.total}:{top:"01",logo:_.img,total:_.total,name_team:_.name,player_id:_.id},"category-name":i.categoryName,buttonMaxWidth:i.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:c.clickexpand,onMore:c.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":i.typeData,"team-widget":i.teamWidget,game:i.game,type:i.typeTable,"type-view":i.type,"is-expanded":e.playerexpand==_.id&&e.expand,onMediadata:r[1]||(r[1]=l=>c.emitEventMedia(l,i.category,i.categoryName)),data:i.typeTable==0?{position:_.top,player_name:_.name,player_short:_.name_short,player_photo:_.img,total:_.total,id:_.id,player_age:_.age,team_abrev:_.team,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+_.teamid+".png",player_position:_.position,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+_.country+".jpg",player_games:_.minutes,player_min:_.games,league_name:" Liga MX "}:{position:_.top,team_logo:_.img,team_abrev:_.name,frequency:_.frecuency,promthistournament:_.game_avg,promlasttournament:_.game_avg_last_season,teams_games:"-",category:i.category,total:_.total,id:_.id},height:"71px","can-play-videos":i.canPlayVideos,background:p%2===0?i.backgroundEven:i.backgroundOdd,onExpand:c.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==_.id?(t.openBlock(),t.createBlock(v,{key:2,type:i.typeTable,"is-live":i.game.is_live,"view-effectiveness":_.positionId!==1,data:i.typeTable==0?{teams:_.teamname,age:_.age,dataofbirth:_.date,nationality:_.nationality,countryFlag:_.player_country_flag,position:_.position,games:_.games,min:_.minutes,goals:_.total,effectiveness:_.effectiveness,category:i.categoryName,id:_.id}:{position:_.positiontable,goals:_.goals,goals_received:_.goalsrecived,games_played:_.games_played,category:i.categoryName,effectiveness:_.effectiveness,xg:_.xg,total:_.total,attendance:"-",id:_.id},onViewprofile:l=>c.viewprofile(l,_.teamid),background:p%2===0?i.backgroundEven:i.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",xFt,[e.isloading?(t.openBlock(),t.createElementBlock("div",wFt,kFt)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[CFt,SFt],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{background:"#183143",type:i.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.topData,(y,_)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:_},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(p,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[t.createVNode(a,{"type-data":i.typeData,"team-widget":i.teamWidget,game:i.game,type:i.typeTable,"type-view":i.type,"can-play-videos":i.canPlayVideos,"is-expanded":e.playerexpand==p.id&&e.expand,onMediadata:r[2]||(r[2]=o=>c.emitEventMediaFullTable(o,i.category,i.categoryName)),data:i.typeTable==0?{position:p.top,player_name:p.name,player_short:p.name_short,player_photo:p.img,total:p.total,id:p.id,player_age:p.age,team_abrev:p.team,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+p.teamid+".png",player_position:p.position,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+p.country+".jpg",player_games:p.games,player_min:p.minutes,league_name:" Liga MX "}:{position:p.positiontable,team_logo:p.img,team_abrev:p.name,frequency:p.frecuency,promthistournament:p.game_avg,promlasttournament:p.game_avg_last_season,category:i.category,team_games:p.games_played,total:p.total,id:p.id},height:"71px",background:((_+1)*5+l)%2===0?i.backgroundOdd:i.backgroundEven,onExpand:c.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==p.id?(t.openBlock(),t.createBlock(v,{key:0,type:i.typeTable,"is-live":i.game.is_live,additionalClass:"fullTable","view-effectiveness":p.positionId!==1,data:i.typeTable==0?{teams:p.teamname,age:p.age,dataofbirth:p.date,nationality:p.nationality,countryFlag:p.player_country_flag,position:p.positionfull,positionfull:p.positionfull,games:p.games,min:p.minutes,goals:p.total,effectiveness:p.effectiveness,category:c.getCategoryName(i.category),id:p.id}:{position:p.positiontable,goals:p.goals,goals_received:p.goalsrecived,games_played:p.games_played,category:i.categoryName,effectiveness:p.effectiveness,xg:p.xg,total:p.total,category:c.getCategoryName(i.category),attendance:"-",id:p.id},onViewprofile:o=>c.viewprofile(o,p.teamid),background:l%2===0?i.backgroundEven:i.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const EFt=$i(rA,[["render",TFt],["__scopeId","data-v-f236a7e6"]]),AFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},MFt={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)}}},IFt=["src"],PFt=["src"];function BFt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyle),class:"gsc-label",onClick:r[0]||(r[0]=(...m)=>c.btnLabel&&c.btnLabel(...m))},[t.createTextVNode(t.toDisplayString(i.numFilter)+" "+t.toDisplayString(i.textValue)+" ",1),i.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(c.customIcon),class:"icon",src:i.icon},null,12,IFt)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(c.customStyle)},[t.createTextVNode(t.toDisplayString(i.numFilter)+" "+t.toDisplayString(i.textValue)+" ",1),i.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:r[1]||(r[1]=(...m)=>c.btnClose&&c.btnClose(...m)),style:t.normalizeStyle(c.customIcon),class:"icon",src:i.icon},null,12,PFt)):t.createCommentVNode("",!0)],4))])}const NFt=AFt(MFt,[["render",BFt],["__scopeId","data-v-42ff544a"]]);function zFt(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const OFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},iA={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,r=this.$refs.content.scrollWidth;r>0&&e>0&&(r>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},$q=()=>{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}))},jq=iA.setup;iA.setup=jq?(e,r)=>($q(),jq(e,r)):$q;const FFt={ref:"gscScrollableContainer",class:"scrollable-container"},LFt={class:"scrollable-arrows"},DFt=["width","height","viewBox"],RFt=["stroke"],VFt={class:"scrollable-wrapper"},$Ft={class:"scrollable-arrows"},jFt=["width","height","viewBox"],UFt=["stroke"];function GFt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",FFt,[i.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",c.hideShowLeftArrow]),onClick:r[0]||(r[0]=(...m)=>c.scrollLeft&&c.scrollLeft(...m))},[t.createElementVNode("div",LFt,[(t.openBlock(),t.createElementBlock("svg",{width:i.arrowsWidth,height:i.arrowsHeight,viewBox:c.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:i.arrowsColor},null,8,RFt)],8,DFt))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:r[1]||(r[1]=(...m)=>c.getScroll&&c.getScroll(...m))},[t.createElementVNode("div",VFt,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),i.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",c.hideShowRightArrow]),onClick:r[2]||(r[2]=(...m)=>c.scrollRight&&c.scrollRight(...m))},[t.createElementVNode("div",$Ft,[(t.openBlock(),t.createElementBlock("svg",{width:i.arrowsWidth,height:i.arrowsHeight,viewBox:c.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:i.arrowsColor},null,8,UFt)],8,jFt))])],2)):t.createCommentVNode("",!0)],512)}const HFt=OFt(iA,[["render",GFt],["__scopeId","data-v-b548a08d"]]),WFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},oA={components:{GSCSlider:HFt},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:r}=zFt(e);return{myDivRef:e,elementSize:r}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var r={};return e.width>768?r={fontSize:"16px"}:e.width>480?r={fontSize:"14px"}:r={fontSize:"12px"},r}}},Uq=()=>{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}))},Gq=oA.setup;oA.setup=Gq?(e,r)=>(Uq(),Gq(e,r)):Uq;const qFt={ref:"myDivRef"},YFt={key:0,class:"gs-switch-container"},XFt=["onClick"],ZFt={key:1,class:"gs-switch-container-type"},JFt=["onClick"],KFt={key:2,class:"gs-switch-container-carousel"},QFt=["onClick"];function eLt(e,r,i,B,D,c){const m=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",qFt,[i.type==0?(t.openBlock(),t.createElementBlock("div",YFt,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([c.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,color:"grey !important"}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,XFt))),128))],4),t.renderSlot(e.$slots,i.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",ZFt,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([c.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:i.backgroundOptionDisable}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,JFt))),128))],4)])):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",KFt,[t.createVNode(m,{arrows:i.arrow,"background-color":i.background,"px-scroll":i.pxScroll,"scroll-color":i.scrollColor,"arrows-position":i.arrowsPosition,arrowsScrollHide:i.arrowsScrollHide,"arrows-background":i.arrowsBackground,"arrows-container-bg-l":i.arrowsContainerBgL,"arrows-container-bg-r":i.arrowsContainerBgR,"arrows-margin":i.arrowsMargin,"arrows-radius":i.arrowsRadius,"arrows-border":i.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,color:"grey !important"}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,QFt))),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 sA=WFt(oA,[["render",eLt],["__scopeId","data-v-8a86dfaf"]]),cxa="",dxa="";function tLt(){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 uxa="",aLt={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"},nLt=t.ref(tLt()),rLt={components:{GSCTableHeader:yq,GscSwitchComponent:sA,GSCFilterperteam:Qzt,GSCFilters:QW,GSCExpandedInfo:zq,GSCLabel:NFt,GSCSeasonSelect:nI,GSCTopCategory:EFt,GSCTournamentSelect:eI,GSCRowTable:kq},computed:{...azt.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},r=JSON.stringify(e);if(JSON.stringify(this.filters)!=r)return r},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...nLt.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},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:""}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let r=0;r<e.teams.length;r++)this.teams.push({id:e.teams[r].team_id,team:e.teams[r].colloquial_name,logo:e.teams[r].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:r}=E_(e);return{myDivRefTopsFull:e,elementSize:r}},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,r)=>r+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],filterScounting:{tournaments:[1],seasonId:0,categories:[{name:"Goles",ids:[12]},{name:"Asistencias",ids:[10]},{name:"Participaciones en gol",ids:[27]},{name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{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:[{name:"Goles",isSelected:!1,id:[12]},{name:"Asistencias",isSelected:!1,id:[10]},{name:"Participaciones en gol",isSelected:!1,id:[27]},{name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{name:"Centros por izquierda",isSelected:!1,id:[13]},{name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{name:"Centros por derecha",isSelected:!1,id:[25]},{name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{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://az755631.vo.msecnd.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://az755631.vo.msecnd.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://az755631.vo.msecnd.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:er,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){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";return D=D.replace(",",""),c+". "+D},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const r=e.id===this.selectedTournament.id;e.isSelected=r,e.isDefaultTournament=r})},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 r=this.$refs.personalDataFilter;r.clearFilters(hd.All),r.clearFilters(hd.AGE_RANGE),r.clearFilters(hd.YEAR),r.clearFilters(hd.NATIONALITY),r.clearFilters(hd.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,D)=>D+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 i=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<i.teams.length;B++)this.teamsscouting.push({id:i.teams[B].team_id,team:i.teams[B].colloquial_name,logo:i.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 D=[e.id],c=e.team_id;const m={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:D,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:c||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",m)},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,r,i){this.$emit("openProfilePlayer",{playerId:e,teamId:i,seasonId:r||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.post("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var i=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersTournaments");i!==-1?this.arrayFiltersPlays[i].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 D=0;D<r.length;D++){r[D];let m=r[D].dob.split("T")[0].split("-");var B={position:D+1,player_name:this.abrevName(r[D].name),player_photo:"https://az755631.vo.msecnd.net/players-profile/"+r[D].player_id+".png",total:r[D].total.toFixed(0),id:r[D].player_id,player_age:this.calcularEdad(r[D].dob),team_abrev:r[D].teams[0].acronym,team_name:r[D].teams[0].team_name,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+r[D].teams[0].team_id+".png",player_position:r[D].position_id,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+r[D].nationality_id+".jpg",date:m[2]+"."+m[1]+"."+m[0].substring(2,4),team_id:r[D].team_id,nationality_name:Dq[r[D].nationality_id],player_games:r[D].games_played,player_min:r[D].minutes_played,league_name:r[D].tournament_name,seasons:r[D].seasons,season_id:r[D].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const D=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let c=0;c<D.teams.length;c++)this.teamsscouting.push({id:D.teams[c].team_id,team:D.teams[c].colloquial_name,logo:D.teams[c].logo})}this.loadingActive=!1},abrevName(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";D=D.replace(",","");var m=c+". "+D;return m},calcularEdad(e){var r=new Date(e),i=new Date,B=i-r,D=Math.floor(B/(1e3*60*60*24*365.25));return D},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var r=[];for(let i=0;i<e.length;i++)e[i].isSelected&&r.push(e[i].id);if(r.length==0&&(r=[1]),r.length==1)for(let i=0;i<e.length;i++)e[i].isSelected&&(this.nameLeagueSelected=e[i].name,this.seasonsFilterSelected=e[i].seasons[0].id);else this.seasonsFilterSelected=0,r.length>0&&(this.nameLeagueSelected=r.length+" Ligas");this.filterScounting.tournaments=r,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,D=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,D],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 r=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&r.push(e.nationalities[B].id);r.length==0&&(r=[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 i=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&i.push(e.positions[B].id);i.length==0&&(i=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=i,this.filterScounting.nationalities=r},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 r=[];for(let i=0;i<e.productivityFilters.length;i++)r[e.productivityFilters[i].priority-1]={name:e.productivityFilters[i].name,ids:e.productivityFilters[i].id};r.length==0&&(r=[]),this.filterScounting.categories=r,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");r!==-1?this.arrayFiltersPlays[r].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&i!==-1){this.filtersPredefinedF=this.filters;for(let D=0;D<this.FVfilterGolstats.length;D++)this.FVfilterGolstats[D].isSelected=!1;var i=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersPredefined");i!==-1&&this.arrayFiltersPlays.splice(i,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&r!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(r,1);var i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(i!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;i!==-1&&this.arrayFiltersPlays.splice(i,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 r=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&r!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(r,1);for(let c=0;c<this.categoriesDefault.length;c++)this.categoriesDefault[c].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var i=this.arrayFiltersPlays.findIndex(c=>c.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&i!==-1){for(let c=0;c<this.FVfilterGolstats.length;c++)this.FVfilterGolstats[c].isSelected=!1;i!==-1&&this.arrayFiltersPlays.splice(i,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,r){return Math.floor(Math.random()*(r-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let i=0;i<this.categoriesPlaysTypes.offensive.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.defensive.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.possession.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.offenses.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i])}else for(let i=0;i<e.playsCategories.length;i++)e.playsCategories[i].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[i].id),this.arrayCategoryFilterFull.push(e.playsCategories[i]));var r=this.arrayFiltersPlays.findIndex(i=>i.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?r!=-1?this.arrayFiltersPlays[r].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):r!=-1?this.arrayFiltersPlays[r].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):r!==-1&&this.arrayFiltersPlays.splice(r,1)},async deleteLabelFilter(e){var r=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(r!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let D=0;D<this.detaildProductivityCategories.offensive.categories.length;D++)this.detaildProductivityCategories.offensive.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.defensive.categories.length;D++)this.detaildProductivityCategories.defensive.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.possession.categories.length;D++)this.detaildProductivityCategories.possession.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.offensesConditions.length;D++)this.detaildProductivityCategories.offensesConditions[D]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(D,c)=>c+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 D=0;D<B.teams.length;D++)this.teamsscouting.push({id:B.teams[D].team_id,team:B.teams[D].colloquial_name,logo:B.teams[D].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 i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");i!==-1&&this.arrayFiltersPlays.splice(i,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(hd.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(hd.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(hd.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(hd.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(hd.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(r,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(r,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(r=>r.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 r=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var i=[];for(let c=0;c<e.playingAs.length;c++)if(e.playingAs[c].isSelected){const m=e.playingAs[c].name=="Local"?1:2;r.push(m)}for(let c=0;c<e.gameSections.length;c++)e.gameSections[c].isSelected&&i.push(e.gameSections[c].value);this.fVsections=i,this.fVplayingAs=r;var B=this.arrayFiltersPlays.findIndex(c=>c.type==="onFiltersDetailsTime"),D="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(D+=", 0-15"),this.fVsections.includes(2)&&(D+=", 15-30"),this.fVsections.includes(3)&&(D+=", 30-45"),this.fVsections.includes(4)&&(D+=", 45-60"),this.fVsections.includes(5)&&(D+=", 60-75"),this.fVsections.includes(6)&&(D+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=D:this.arrayFiltersPlays.push({name:D,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,D)=>D+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(hd.All),e.clearFilters(hd.AGE_RANGE),e.clearFilters(hd.YEAR),e.clearFilters(hd.NATIONALITY),e.clearFilters(hd.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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(r,1),this.setUpTournamentsToFilter();const i=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<i.teams.length;B++)this.teamsscouting.push({id:i.teams[B].team_id,team:i.teams[B].colloquial_name,logo:i.teams[B].logo})},onFiltersData(e){var r=0,i=0;e.ageByRange&&(e.ageByRange.min==0?r=1:r=e.ageByRange.min,e.ageByRange.max==0?i=40:i=e.ageByRange.max,this.fVarrayAgeRange=[r,i]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",D="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let _=0;_<e.nationalities.length;_++)e.nationalities[_].isSelected&&this.fVnationalities.add(e.nationalities[_].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let _=0;_<this.elegibilidadArray.length;_++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[_])}for(let _=0;_<e.positions.length;_++)e.positions[_].isSelected&&this.fVsetPositionsIds.push(e.positions[_].id);if(e.hasOwnProperty("nationalities"))var c=e.nationalities.filter(_=>_.isSelected===!0);var m=e.positions.filter(_=>_.isSelected===!0);if(m.length==1&&(B=m[0].name),e.hasOwnProperty("nationalities")&&c.length==1&&(D=c[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(_=>_.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(p=>p.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var v=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersPosition");v!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[v].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(v,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 f=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersYear");f!=-1?this.arrayFiltersPlays[f].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 n=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersAge");n!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[n].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(n,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 n=this.arrayFiltersPlays.findIndex(p=>p.type==="onFiltersAge");n!=-1&&this.arrayFiltersPlays.splice(n,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var y=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersNationality");y!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[y].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+D:this.arrayFiltersPlays.splice(y,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+D,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 r=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let i=0;i<r.teams.length;i++)this.teamsscouting.push({id:r.teams[i].team_id,team:r.teams[i].colloquial_name,logo:r.teams[i].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(i=>i.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 i=0;i<this.categoriesDefault.length;i++)this.categoriesDefault[i].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var r=this.arrayFiltersPlays.findIndex(i=>i.type==="onFiltersPredefined");if(r!==-1){for(let i=0;i<this.FVfilterGolstats.length;i++)this.FVfilterGolstats[i].isSelected=!1;r!==-1&&this.arrayFiltersPlays.splice(r,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.get(this.tournamentsUrl);return r},async fetchTeams(){const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.get(this.teamsUrl+this.seasonActive);return r},async fetchTeamsScouting(e){const r=$c.create({headers:{Authorization:`${this.token}`}}),{data:i}=await r.get(this.teamsUrl+e);return i},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var r="";e.id==1?r=this.urlFilter:r=this.urlFilter;const i=$c.create({headers:{Authorization:`${this.token}`}}),{data:B}=await i.get(r+e.id);if(Object.keys(B[0].match_lapse_combinations).forEach(y=>{this.predefinedFiltersMatchLapse[y.toString()]=B[0].match_lapse_combinations[y]}),Object.keys(B[0].playing_as_combinations).forEach(y=>{this.predefinedFiltersPlayingAs[y.toString()]=B[0].playing_as_combinations[y]}),Object.keys(B[0].field_sections_combinations).forEach(y=>{this.predefinedFiltersSections[y.toString()]=B[0].field_sections_combinations[y]}),B[0]){for(let y=0;y<B[0].filter_records.length;y++){var D=B[0].description;if(B[0].filter_records[y].field_sections!==void 0){const p=B[0].filter_records[y].field_sections.toString();(this.predefinedFiltersSections[p]||this.predefinedFiltersSections[p]=="")&&(this.predefinedFiltersSections[p]==""?D=D.replace(" [en {field_sections}]",this.predefinedFiltersSections[p]):D=D.replace("{field_sections}",this.predefinedFiltersSections[p]))}if(B[0].filter_records[y].match_lapse!==void 0){const p=B[0].filter_records[y].match_lapse.toString();(this.predefinedFiltersMatchLapse[p]||this.predefinedFiltersMatchLapse[p]=="")&&(this.predefinedFiltersMatchLapse[p]==""?D=D.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[p]):D=D.replace("{match_lapse}",this.predefinedFiltersMatchLapse[p]))}if(B[0].filter_records[y].playing_as!==void 0){const p=B[0].filter_records[y].playing_as.toString();(this.predefinedFiltersPlayingAs[p]||this.predefinedFiltersPlayingAs[p]=="")&&(this.predefinedFiltersPlayingAs[p]==""?D=D.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[p]):D=D.replace("{playing_as}",this.predefinedFiltersPlayingAs[p]))}B[0].filter_records[y].section_type!==void 0&&(this.optionSelected=="Jugadores"?D=D.replace("{section_type}","Jugadores"):D=D.replace("{section_type}","Equipos")),D=D.replace(/\[/g,""),D=D.replace(/\]/g,""),D=D.replace("{category_name}",B[0].category_name);const _=D.split(": ");var c=_[1];c.length>129&&this.windowWidth>1358&&(c=c.substring(0,129),c=c+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[y].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:y,category_name:e.name,id_category:B[0].id,title:_[0]+":",text:_[1],textOrigin:B[0].description,titledots:c,filtersPredefined:{matchResult:B[0].filter_records[y].match_result,playingAs:B[0].filter_records[y].playing_as,sections:B[0].filter_records[y].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[y].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var m=[];for(let y=0;y<this.arrayPredefinedFilters.length;y++){var a=0,v=new Set,f={},n=this.arrayPredefinedFilters[y].text.replace(/\*.*?\*/,"");if(n=n.replace(/\*/g,""),n=n.replace(/ +/g," "),this.arrayPredefinedFilters[y].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[y].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[y].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[y].filtersPredefined.start_age!=0?f.arrayAgeRange=[this.arrayPredefinedFilters[y].filtersPredefined.start_age,this.arrayPredefinedFilters[y].filtersPredefined.end_age]:this.arrayPredefinedFilters[y].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[y].filtersPredefined.start_age==0?f.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[y].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[y].filtersPredefined.end_age==0?f.arrayAgeRange=[this.arrayPredefinedFilters[y].filtersPredefined.start_age,60]:f.arrayAgeRange=[1,this.arrayPredefinedFilters[y].filtersPredefined.end_age],this.arrayPredefinedFilters[y].filtersPredefined.matchResult.length!=3&&(a+=1),f.matchResult=this.arrayPredefinedFilters[y].filtersPredefined.matchResult,this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length!=0){for(let _=0;_<this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length;_++)v.add(this.arrayPredefinedFilters[y].filtersPredefined.nationalities[_]);f.setNationalitiesIds=v}else v.add(138),v.add(222),v.add(163),v.add(51),v.add(226),v.add(10),v.add(223),v.add(96),v.add(171),v.add(198),v.add(105),v.add(80),v.add(29),v.add(74),v.add(216),v.add(196),v.add(64),v.add(155),v.add(156),v.add(89),v.add(106),v.add(81),v.add(233),v.add(204),f.setNationalitiesIds=v;this.arrayPredefinedFilters[y].filtersPredefined.playingAs.length!=2&&(a+=1),f.playingAs=this.arrayPredefinedFilters[y].filtersPredefined.playingAs,this.arrayPredefinedFilters[y].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.positions.length>0?f.setPositionsIds=this.arrayPredefinedFilters[y].filtersPredefined.positions:f.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[y].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.sections.length>0?f.sections=this.arrayPredefinedFilters[y].filtersPredefined.sections:f.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[y].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.zone.length>0?f.zone=this.arrayPredefinedFilters[y].filtersPredefined.zone:f.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],f.typeZone=this.arrayPredefinedFilters[y].filtersPredefined.typeZone,m.push({id:y+1,name:n,isSelected:!1,value:a,filters:f})}this.FVfilterGolstats=m,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const r=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((n,y)=>n-y).toString();this.predefinedFiltersSections[r]||this.predefinedFiltersSections[r]==""?this.predefinedFiltersSections[r]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[r]):e=e.replace("{field_sections}",this.predefinedFiltersSections[r]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var i=!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?(i=!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?(i||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 D="";B.includes(1)&&(D=D+"0-15, "),B.includes(2)&&(D=D+"16-30, "),B.includes(3)&&(D=D+"31-45, "),B.includes(4)&&(D=D+"46-60, "),B.includes(5)&&(D=D+"61-75, "),B.includes(6)&&(D=D+"76-90, "),D=D.slice(0,-2),D=D.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",D)}const c=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[c]||this.predefinedFiltersPlayingAs[c]=="")&&(this.predefinedFiltersPlayingAs[c]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[c]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[c])),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 m=e.split(": ");let a=m[1].charAt(0).toUpperCase()+m[1].toLowerCase().slice(1),v=m[1].charAt(0).toUpperCase()+m[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=m[0]+":";const f=v.match(/\*/g);if(f&&f.length)if(f.length%2===0)for(let n=1;n<=f.length;n++)n%2===0||(v=v.replace("*",'<span style="color: #ffff03" >'));else v=v.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=v},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{const e=$c.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(i=>(delete i.headers.Authorization,i));const r=await e.get("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=r.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)}}},iLt={ref:"myDivRefTopsFull"},oLt={key:0,class:"overlay-loading"},sLt=[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)],lLt=[t.createElementVNode("img",{src:"https://az755631.vo.msecnd.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)],cLt={key:0,class:"cont-leyemd-multipleleagues"},dLt=t.createElementVNode("img",{class:"img-leyemd-multipleleagues",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1),uLt={key:0,style:{"margin-left":"10px"}},hLt=t.createElementVNode("span",null,"Tipo de Jugada",-1),pLt=t.createElementVNode("span",null,"Filtro GolStats",-1),fLt={key:3,style:{width:"100%",height:"295px"}};function mLt(e,r,i,B,D,c){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const m=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),v=t.resolveComponent("GSCFilters"),f=t.resolveComponent("GSCLabel"),n=t.resolveComponent("GSCTopCategory"),y=t.resolveComponent("GSCTableHeader"),_=t.resolveComponent("GSCRowTable"),p=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",iLt,[D.loadingActive?(t.openBlock(),t.createElementBlock("div",oLt,sLt)):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)},[D.optionSelected!="Scouting"&&D.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[t.createVNode(a,{data:D.teams,"team-id":i.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:c.clickTeam,onClickAll:c.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(D.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&D.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPc),onClick:r[1]||(r[1]=(...l)=>c.clickCloseFilters&&c.clickCloseFilters(...l))},lLt,2)):t.createCommentVNode("",!0),D.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(m,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":D.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:c.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(D.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:r[3]||(r[3]=(...l)=>c.openMenuFilters&&c.openMenuFilters(...l))},null,6),[[t.vShow,B.elementSize.width<760&&D.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[D.optionSelectedSubmenu=="Todas las jugadas"&&D.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(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersPlays,filters:D.categoriesPlaysTypes,onApply:c.applyFiltersBtn}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply"]),[[t.vShow,!D.showFullTable]]),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{key:D.updateFilterField,"filter-type":D.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersField,filters:D.fVzone}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersDetails,filters:D.detailsObject}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"]),D.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(v,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:i.seasonActive,tournamentId:D.tournamentSelectedObj.value},token:D.token,"onUpdate:filters":c.onFiltersData}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),D.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(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:D.tournamentsToFilter,key:D.keyTournamentValue,"onUpdate:filters":c.onFiltersTournaments}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters"])),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:D.filterScounting.seasonId,tournamentId:D.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":c.onFiltersPersonalData}),null,16,["button-filter-props","filter-type","season","onUpdate:filters"]),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:D.universeData,"onUpdate:filters":c.onFiltersUniverse}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters"]),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersProductivity,filters:D.detaildProductivityCategories}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcom),onClick:r[4]||(r[4]=(...l)=>c.getScoutingData&&c.getScoutingData(...l))},"Buscar",2)],64)):t.createCommentVNode("",!0),D.optionSelectedSubmenu=="Predeterminados"&&D.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModePropsTypePlays,{"filter-type":D.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:D.updateFilterPlaytypesGolstats,"onUpdate:filters":c.onFiltersPlaysTypes,filters:D.categoriesDefault}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:D.updateFilterGolstats,"onUpdate:filters":c.onFiltersGolStats,filters:c.filterGolstats}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||D.openMenuMobil]]),D.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[D.filterScounting.tournaments.length>1&&D.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",cLt,[dLt,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:D.teamsscouting,"team-id":D.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:D.updateFilterTeamsScouting,onClickTeam:c.clickTeamScouting,onClickAll:c.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)},[D.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[D.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.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),D.optionSelected!="Scouting"&&D.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[D.showFullTable?(t.openBlock(),t.createElementBlock("div",uLt,[t.createVNode(f,{"text-value":"Categoría - "+D.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:c.deleteCategoryFilter,icon:"https://az755631.vo.msecnd.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(D.arrayFiltersPlays,(l,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,style:{"margin-left":"10px"}},[t.createVNode(f,{"text-value":l.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:c.deleteLabelFilter,id:l.type,icon:"https://az755631.vo.msecnd.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),D.rowScoutingData.length!=0||D.optionSelectedSubmenu=="Predeterminados"&&D.arrayFiltersPlays.findIndex(l=>l.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:r[5]||(r[5]=(...l)=>c.onClickDeleteFilter&&c.onClickDeleteFilter(...l))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),i.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(D.showFullTable?"gap: 0px!important;":"")},[D.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.categoriesDefault,(l,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,style:t.normalizeStyle(!D.showOnlyCategories&&D.arrayCategoryFilter.includes(l.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(n,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"is-team":D.isTeam,onMore:c.onShowFullTable,"border-width":0,onIntervalidtops:c.intervalidtops,"can-play-videos":i.canPlayVideos,"border-radius":"12px","game-id":i.gameId,game:i.game,typeData:i.typeData,"filters-prop":c.filterChange,category:l.id,"type-table":D.typeTable,categoryName:l.name,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTables,onClickprofile:c.clickprofile,onSetopenmedia:c.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","filter-team","onClickprofile","onSetopenmedia"]))],2),[[t.vShow,!D.showOnlyCategories&&D.arrayCategoryFilter.includes(l.id)&&!D.showFullTable]])],4))),128)),D.showFullTable?(t.openBlock(),t.createBlock(n,{"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"is-team":D.isTeam,"is-widget":i.isWidget,"team-widget":i.teamWidget,"border-width":0,"border-radius":"12px","game-id":i.gameId,onIntervalidtops:c.intervalidtops,game:i.game,typeData:i.typeData,category:D.showFullCategory,type:1,"type-table":D.typeTable,categoryName:"","filters-prop":c.filterChange,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTablesfull,onClickprofile:c.clickprofile,onSetopenmedia:c.setOpenMedia},null,8,["time-live-comparative-avanced","is-team","is-widget","team-widget","game-id","onIntervalidtops","game","typeData","category","type-table","filters-prop","season","filter-team","onClickprofile","onSetopenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[D.categoryPredefinedActive?(t.openBlock(),t.createBlock(n,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"is-team":D.isTeam,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,onIntervalidtops:c.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":i.canPlayVideos,"game-id":i.gameId,game:i.game,typeData:i.typeData,category:D.categoryPredefined,type:1,"type-table":D.typeTable,categoryName:"","filters-prop":c.filterChangePredefined,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTables,onClickprofile:c.clickprofile,onSetopenmedia:c.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","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)},[D.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)},[D.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)},[D.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[hLt,t.createTextVNode(" y un "),pLt,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)},[D.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(D.rowScoutingData.length>0?"height: auto;":"")},[D.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.rowScoutingData.length>0?(t.openBlock(),t.createBlock(y,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.rowScoutingData,(l,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[D.teamselectrec==0||D.teamselectrec==l.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(_,{type:2,"is-expanded":D.playerexpand==l.id&&D.expand,onMediadata:c.setMediaData,data:{position:l.position,player_name:l.player_name,player_photo:l.player_photo,total:l.total,id:l.id,player_age:l.player_age,team_abrev:l.team_abrev,team_logo:l.team_logo,player_position:D.positions[l.player_position-1].fullname,player_country_flag:l.player_country_flag,player_games:l.player_games,player_min:l.player_min,league_name:l.league_name,seasons:l.seasons,season_id:l.season_id},height:"71px",background:o%2===0?i.backgroundOdd:i.backgroundEven,onExpand:c.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),D.expand&&D.playerexpand==l.id?(t.openBlock(),t.createBlock(p,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:l.team_name,age:l.player_age,dataofbirth:l.date,nationality:l.nationality_name,countryFlag:l.player_country_flag,position:D.positions[l.player_position-1].name,games:l.player_games,min:l.player_min,goals:l.total,effectiveness:"-",category:"total",id:l.id},onViewprofile:s=>c.viewprofile(s,l.season_id,l.team_id),background:o%2===0?i.backgroundOdd:i.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),D.rowScoutingData.length==0&&!D.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),D.rowScoutingData.length==0&&!D.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacom),onClick:r[6]||(r[6]=(...l)=>c.onClickDeleteFilter&&c.onClickDeleteFilter(...l))}," Eliminar filtros aplicados ",2),D.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcom),onClick:r[7]||(r[7]=(...l)=>c.getScoutingData&&c.getScoutingData(...l))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),D.loadingActive?(t.openBlock(),t.createElementBlock("div",fLt)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const gLt=$i(rLt,[["render",mLt],["__cssModules",{$style:aLt}]]),swa="";let Hq=null;const yLt={components:{GSCDatosGSMain:tzt,GSCCheckbox:Hg,GSCRadioToggle:FH,GSCTopFull:gLt},props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},timeLiveComparativeBestPlayers:{type:Number,default:6e4},timeLiveComparativeAvanced:{type:Number,default:6e4},tournamentSelected:{type:Object,default:()=>({})},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{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)Hq=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),Hq.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)}},vLt=e=>(t.pushScopeId("data-v-e5e283f9"),e=e(),t.popScopeId(),e),_Lt={class:"container-comparative",ref:"comparative"},bLt={class:"container-btn"},xLt={class:"items-container-btn"},wLt={class:"container-sections"},kLt={key:0,class:"container-teams-menu"},CLt={class:"container-team-menu-home"},SLt=["src"],TLt=vLt(()=>t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),ELt={class:"container-team-menu-away"},ALt=["src"],MLt={key:1,class:"container-switch-menu"},ILt={class:"container-leyend"},PLt={class:"container-tops"};function BLt(e,r,i,B,D,c){const m=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),v=t.resolveComponent("GSCRadioToggle"),f=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",_Lt,[t.createElementVNode("div",bLt,[t.createElementVNode("div",xLt,[t.createElementVNode("div",{class:t.normalizeClass([D.widthSection>480?"btn-destacados":"btn-destacados-movil",D.activeSection=="destacados"?"active":""]),onClick:r[0]||(r[0]=n=>c.clickOptSection("destacados"))},[i.game.status==1||i.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.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([D.widthSection>480?"btn-avanced":"btn-avanced-movil",D.activeSection=="avanzado"?"active":""]),onClick:r[1]||(r[1]=n=>c.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",wLt,[D.activeSection=="destacados"?(t.openBlock(),t.createBlock(m,{key:0,"is-widget":i.isWidget,"team-widget":i.teamWidget,"tournament-selected":i.tournamentSelected,"time-live-comparative-best-players":i.timeLiveComparativeBestPlayers,game:i.game,"play-videos-privileges":i.playVideosPrivileges,onOpenmedia:c.openmedia,onIntervalidgs:c.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),D.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",kLt,[t.createElementVNode("div",CLt,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":c.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:D.updateHomeCheck,"model-value":D.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:i.game.homeTeam.logo},null,8,SLt),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(i.game.homeTeam.colloquial_name),3)]),TLt,t.createElementVNode("div",ELt,[t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(i.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:i.game.awayTeam.logo},null,8,ALt),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":c.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:D.updateAwayCheck,"model-value":D.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),i.game.is_live||i.game.status===1||i.game.status===0?(t.openBlock(),t.createElementBlock("div",MLt,[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":D.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:c.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",ILt,[D.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},[i.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},[i.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",PLt,[t.createVNode(f,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onOpenProfileTeam:c.onOpenProfileTeam,onIntervalidtops:c.intervalidtops,onOpenProfilePlayer:c.onOpenProfilePlayer,"type-data":D.typeViewData,"game-id":i.game.gameId,game:i.game,"current-season-id":i.game.seasonId,"team-id":D.teamactive,"season-active":i.game.seasonId,teamselect:D.teamactive},null,8,["is-widget","team-widget","time-live-comparative-avanced","can-play-videos","onOpenmedia","onOpenProfileTeam","onIntervalidtops","onOpenProfilePlayer","type-data","game-id","game","current-season-id","team-id","season-active","teamselect"])])],64)):t.createCommentVNode("",!0)])],512)}const NLt=$i(yLt,[["render",BLt],["__scopeId","data-v-e5e283f9"]]);function Wq(e,r){return function(){return e.apply(r,arguments)}}const{toString:zLt}=Object.prototype,{getPrototypeOf:lA}=Object,B5=(e=>r=>{const i=zLt.call(r);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),uf=e=>(e=e.toLowerCase(),r=>B5(r)===e),N5=e=>r=>typeof r===e,{isArray:Jy}=Array,A_=N5("undefined");function OLt(e){return e!==null&&!A_(e)&&e.constructor!==null&&!A_(e.constructor)&&Ah(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qq=uf("ArrayBuffer");function FLt(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&qq(e.buffer),r}const LLt=N5("string"),Ah=N5("function"),Yq=N5("number"),z5=e=>e!==null&&typeof e=="object",DLt=e=>e===!0||e===!1,O5=e=>{if(B5(e)!=="object")return!1;const r=lA(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},RLt=uf("Date"),VLt=uf("File"),$Lt=uf("Blob"),jLt=uf("FileList"),ULt=e=>z5(e)&&Ah(e.pipe),GLt=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||Ah(e.append)&&((r=B5(e))==="formdata"||r==="object"&&Ah(e.toString)&&e.toString()==="[object FormData]"))},HLt=uf("URLSearchParams"),[WLt,qLt,YLt,XLt]=["ReadableStream","Request","Response","Headers"].map(uf),ZLt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function M_(e,r,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let B,D;if(typeof e!="object"&&(e=[e]),Jy(e))for(B=0,D=e.length;B<D;B++)r.call(null,e[B],B,e);else{const c=i?Object.getOwnPropertyNames(e):Object.keys(e),m=c.length;let a;for(B=0;B<m;B++)a=c[B],r.call(null,e[a],a,e)}}function Xq(e,r){r=r.toLowerCase();const i=Object.keys(e);let B=i.length,D;for(;B-- >0;)if(D=i[B],r===D.toLowerCase())return D;return null}const E1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zq=e=>!A_(e)&&e!==E1;function cA(){const{caseless:e}=Zq(this)&&this||{},r={},i=(B,D)=>{const c=e&&Xq(r,D)||D;O5(r[c])&&O5(B)?r[c]=cA(r[c],B):O5(B)?r[c]=cA({},B):Jy(B)?r[c]=B.slice():r[c]=B};for(let B=0,D=arguments.length;B<D;B++)arguments[B]&&M_(arguments[B],i);return r}const JLt=(e,r,i,{allOwnKeys:B}={})=>(M_(r,(D,c)=>{i&&Ah(D)?e[c]=Wq(D,i):e[c]=D},{allOwnKeys:B}),e),KLt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QLt=(e,r,i,B)=>{e.prototype=Object.create(r.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),i&&Object.assign(e.prototype,i)},eDt=(e,r,i,B)=>{let D,c,m;const a={};if(r=r||{},e==null)return r;do{for(D=Object.getOwnPropertyNames(e),c=D.length;c-- >0;)m=D[c],(!B||B(m,e,r))&&!a[m]&&(r[m]=e[m],a[m]=!0);e=i!==!1&&lA(e)}while(e&&(!i||i(e,r))&&e!==Object.prototype);return r},tDt=(e,r,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=r.length;const B=e.indexOf(r,i);return B!==-1&&B===i},aDt=e=>{if(!e)return null;if(Jy(e))return e;let r=e.length;if(!Yq(r))return null;const i=new Array(r);for(;r-- >0;)i[r]=e[r];return i},nDt=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&lA(Uint8Array)),rDt=(e,r)=>{const i=(e&&e[Symbol.iterator]).call(e);let B;for(;(B=i.next())&&!B.done;){const D=B.value;r.call(e,D[0],D[1])}},iDt=(e,r)=>{let i;const B=[];for(;(i=e.exec(r))!==null;)B.push(i);return B},oDt=uf("HTMLFormElement"),sDt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,B){return i.toUpperCase()+B}),Jq=(({hasOwnProperty:e})=>(r,i)=>e.call(r,i))(Object.prototype),lDt=uf("RegExp"),Kq=(e,r)=>{const i=Object.getOwnPropertyDescriptors(e),B={};M_(i,(D,c)=>{let m;(m=r(D,c,e))!==!1&&(B[c]=m||D)}),Object.defineProperties(e,B)},cDt=e=>{Kq(e,(r,i)=>{if(Ah(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const B=e[i];if(Ah(B)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},dDt=(e,r)=>{const i={},B=D=>{D.forEach(c=>{i[c]=!0})};return Jy(e)?B(e):B(String(e).split(r)),i},uDt=()=>{},hDt=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r,dA="abcdefghijklmnopqrstuvwxyz",Qq="0123456789",eY={DIGIT:Qq,ALPHA:dA,ALPHA_DIGIT:dA+dA.toUpperCase()+Qq},pDt=(e=16,r=eY.ALPHA_DIGIT)=>{let i="";const{length:B}=r;for(;e--;)i+=r[Math.random()*B|0];return i};function fDt(e){return!!(e&&Ah(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mDt=e=>{const r=new Array(10),i=(B,D)=>{if(z5(B)){if(r.indexOf(B)>=0)return;if(!("toJSON"in B)){r[D]=B;const c=Jy(B)?[]:{};return M_(B,(m,a)=>{const v=i(m,D+1);!A_(v)&&(c[a]=v)}),r[D]=void 0,c}}return B};return i(e,0)},gDt=uf("AsyncFunction"),yDt=e=>e&&(z5(e)||Ah(e))&&Ah(e.then)&&Ah(e.catch),tY=((e,r)=>e?setImmediate:r?((i,B)=>(E1.addEventListener("message",({source:D,data:c})=>{D===E1&&c===i&&B.length&&B.shift()()},!1),D=>{B.push(D),E1.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ah(E1.postMessage)),vDt=typeof queueMicrotask<"u"?queueMicrotask.bind(E1):typeof process<"u"&&process.nextTick||tY,yr={isArray:Jy,isArrayBuffer:qq,isBuffer:OLt,isFormData:GLt,isArrayBufferView:FLt,isString:LLt,isNumber:Yq,isBoolean:DLt,isObject:z5,isPlainObject:O5,isReadableStream:WLt,isRequest:qLt,isResponse:YLt,isHeaders:XLt,isUndefined:A_,isDate:RLt,isFile:VLt,isBlob:$Lt,isRegExp:lDt,isFunction:Ah,isStream:ULt,isURLSearchParams:HLt,isTypedArray:nDt,isFileList:jLt,forEach:M_,merge:cA,extend:JLt,trim:ZLt,stripBOM:KLt,inherits:QLt,toFlatObject:eDt,kindOf:B5,kindOfTest:uf,endsWith:tDt,toArray:aDt,forEachEntry:rDt,matchAll:iDt,isHTMLForm:oDt,hasOwnProperty:Jq,hasOwnProp:Jq,reduceDescriptors:Kq,freezeMethods:cDt,toObjectSet:dDt,toCamelCase:sDt,noop:uDt,toFiniteNumber:hDt,findKey:Xq,global:E1,isContextDefined:Zq,ALPHABET:eY,generateString:pDt,isSpecCompliantForm:fDt,toJSONObject:mDt,isAsyncFn:gDt,isThenable:yDt,setImmediate:tY,asap:vDt};function ns(e,r,i,B,D){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),i&&(this.config=i),B&&(this.request=B),D&&(this.response=D,this.status=D.status?D.status:null)}yr.inherits(ns,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:yr.toJSONObject(this.config),code:this.code,status:this.status}}});const aY=ns.prototype,nY={};["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=>{nY[e]={value:e}}),Object.defineProperties(ns,nY),Object.defineProperty(aY,"isAxiosError",{value:!0}),ns.from=(e,r,i,B,D,c)=>{const m=Object.create(aY);return yr.toFlatObject(e,m,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ns.call(m,e.message,r,i,B,D),m.cause=e,m.name=e.name,c&&Object.assign(m,c),m};const _Dt=null;function uA(e){return yr.isPlainObject(e)||yr.isArray(e)}function rY(e){return yr.endsWith(e,"[]")?e.slice(0,-2):e}function iY(e,r,i){return e?e.concat(r).map(function(B,D){return B=rY(B),!i&&D?"["+B+"]":B}).join(i?".":""):r}function bDt(e){return yr.isArray(e)&&!e.some(uA)}const xDt=yr.toFlatObject(yr,{},null,function(e){return/^is[A-Z]/.test(e)});function F5(e,r,i){if(!yr.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,i=yr.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,l){return!yr.isUndefined(l[p])});const B=i.metaTokens,D=i.visitor||f,c=i.dots,m=i.indexes,a=(i.Blob||typeof Blob<"u"&&Blob)&&yr.isSpecCompliantForm(r);if(!yr.isFunction(D))throw new TypeError("visitor must be a function");function v(p){if(p===null)return"";if(yr.isDate(p))return p.toISOString();if(!a&&yr.isBlob(p))throw new ns("Blob is not supported. Use a Buffer instead.");return yr.isArrayBuffer(p)||yr.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,l,o){let s=p;if(p&&!o&&typeof p=="object"){if(yr.endsWith(l,"{}"))l=B?l:l.slice(0,-2),p=JSON.stringify(p);else if(yr.isArray(p)&&bDt(p)||(yr.isFileList(p)||yr.endsWith(l,"[]"))&&(s=yr.toArray(p)))return l=rY(l),s.forEach(function(u,d){!(yr.isUndefined(u)||u===null)&&r.append(m===!0?iY([l],d,c):m===null?l:l+"[]",v(u))}),!1}return uA(p)?!0:(r.append(iY(o,l,c),v(p)),!1)}const n=[],y=Object.assign(xDt,{defaultVisitor:f,convertValue:v,isVisitable:uA});function _(p,l){if(!yr.isUndefined(p)){if(n.indexOf(p)!==-1)throw Error("Circular reference detected in "+l.join("."));n.push(p),yr.forEach(p,function(o,s){(!(yr.isUndefined(o)||o===null)&&D.call(r,o,yr.isString(s)?s.trim():s,l,y))===!0&&_(o,l?l.concat(s):[s])}),n.pop()}}if(!yr.isObject(e))throw new TypeError("data must be an object");return _(e),r}function oY(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return r[i]})}function hA(e,r){this._pairs=[],e&&F5(e,this,r)}const sY=hA.prototype;sY.append=function(e,r){this._pairs.push([e,r])},sY.toString=function(e){const r=e?function(i){return e.call(this,i,oY)}:oY;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function wDt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lY(e,r,i){if(!r)return e;const B=i&&i.encode||wDt,D=i&&i.serialize;let c;if(D?c=D(r,i):c=yr.isURLSearchParams(r)?r.toString():new hA(r,i).toString(B),c){const m=e.indexOf("#");m!==-1&&(e=e.slice(0,m)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class cY{constructor(){this.handlers=[]}use(r,i,B){return this.handlers.push({fulfilled:r,rejected:i,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){yr.forEach(this.handlers,function(i){i!==null&&r(i)})}}const dY={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kDt=typeof URLSearchParams<"u"?URLSearchParams:hA,CDt=typeof FormData<"u"?FormData:null,SDt=typeof Blob<"u"?Blob:null,TDt={isBrowser:!0,classes:{URLSearchParams:kDt,FormData:CDt,Blob:SDt},protocols:["http","https","file","blob","url","data"]},pA=typeof window<"u"&&typeof document<"u",fA=typeof navigator=="object"&&navigator||void 0,EDt=pA&&(!fA||["ReactNative","NativeScript","NS"].indexOf(fA.product)<0),ADt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MDt=pA&&window.location.href||"http://localhost",IDt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pA,hasStandardBrowserEnv:EDt,hasStandardBrowserWebWorkerEnv:ADt,navigator:fA,origin:MDt},Symbol.toStringTag,{value:"Module"})),Mh={...IDt,...TDt};function PDt(e,r){return F5(e,new Mh.classes.URLSearchParams,Object.assign({visitor:function(i,B,D,c){return Mh.isNode&&yr.isBuffer(i)?(this.append(B,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},r))}function BDt(e){return yr.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function NDt(e){const r={},i=Object.keys(e);let B;const D=i.length;let c;for(B=0;B<D;B++)c=i[B],r[c]=e[c];return r}function uY(e){function r(i,B,D,c){let m=i[c++];if(m==="__proto__")return!0;const a=Number.isFinite(+m),v=c>=i.length;return m=!m&&yr.isArray(D)?D.length:m,v?(yr.hasOwnProp(D,m)?D[m]=[D[m],B]:D[m]=B,!a):((!D[m]||!yr.isObject(D[m]))&&(D[m]=[]),r(i,B,D[m],c)&&yr.isArray(D[m])&&(D[m]=NDt(D[m])),!a)}if(yr.isFormData(e)&&yr.isFunction(e.entries)){const i={};return yr.forEachEntry(e,(B,D)=>{r(BDt(B),D,i,0)}),i}return null}function zDt(e,r,i){if(yr.isString(e))try{return(r||JSON.parse)(e),yr.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(i||JSON.stringify)(e)}const I_={transitional:dY,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const i=r.getContentType()||"",B=i.indexOf("application/json")>-1,D=yr.isObject(e);if(D&&yr.isHTMLForm(e)&&(e=new FormData(e)),yr.isFormData(e))return B?JSON.stringify(uY(e)):e;if(yr.isArrayBuffer(e)||yr.isBuffer(e)||yr.isStream(e)||yr.isFile(e)||yr.isBlob(e)||yr.isReadableStream(e))return e;if(yr.isArrayBufferView(e))return e.buffer;if(yr.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(D){if(i.indexOf("application/x-www-form-urlencoded")>-1)return PDt(e,this.formSerializer).toString();if((c=yr.isFileList(e))||i.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return F5(c?{"files[]":e}:e,m&&new m,this.formSerializer)}}return D||B?(r.setContentType("application/json",!1),zDt(e)):e}],transformResponse:[function(e){const r=this.transitional||I_.transitional,i=r&&r.forcedJSONParsing,B=this.responseType==="json";if(yr.isResponse(e)||yr.isReadableStream(e))return e;if(e&&yr.isString(e)&&(i&&!this.responseType||B)){const D=!(r&&r.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(c){if(D)throw c.name==="SyntaxError"?ns.from(c,ns.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mh.classes.FormData,Blob:Mh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};yr.forEach(["delete","get","head","post","put","patch"],e=>{I_.headers[e]={}});const ODt=yr.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"]),FDt=e=>{const r={};let i,B,D;return e&&e.split(`
|
|
4162
|
+
*/const Tu={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"}},Oq={itemsToShow:{default:Tu.itemsToShow,type:Number},itemsToScroll:{default:Tu.itemsToScroll,type:Number},wrapAround:{default:Tu.wrapAround,type:Boolean},throttle:{default:Tu.throttle,type:Number},snapAlign:{default:Tu.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Tu.transition,type:Number},breakpoints:{default:Tu.breakpoints,type:Object},autoplay:{default:Tu.autoplay,type:Number},pauseAutoplayOnHover:{default:Tu.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Tu.mouseDrag,type:Boolean},touchDrag:{default:Tu.touchDrag,type:Boolean},dir:{default:Tu.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Tu.i18n,type:Object},settings:{default(){return{}},type:Object}};function $Ot({config:e,slidesCount:r}){const{snapAlign:i,wrapAround:B,itemsToShow:D=1}=e;if(B)return Math.max(r-1,0);let c;switch(i){case"start":c=r-D;break;case"end":c=r-1;break;case"center":case"center-odd":c=r-Math.ceil((D-.5)/2);break;case"center-even":c=r-Math.ceil(D/2);break;default:c=0;break}return Math.max(c,0)}function jOt({config:e,slidesCount:r}){const{wrapAround:i,snapAlign:B,itemsToShow:D=1}=e;let c=0;if(i||D>r)return c;switch(B){case"start":c=0;break;case"end":c=D-1;break;case"center":case"center-odd":c=Math.floor((D-1)/2);break;case"center-even":c=Math.floor((D-2)/2);break;default:c=0;break}return c}function aA({val:e,max:r,min:i}){return r<i?e:Math.min(Math.max(e,i),r)}function UOt({config:e,currentSlide:r,slidesCount:i}){const{snapAlign:B,wrapAround:D,itemsToShow:c=1}=e;let m=r;switch(B){case"center":case"center-odd":m-=(c-1)/2;break;case"center-even":m-=(c-2)/2;break;case"end":m-=c-1;break}return D?m:aA({val:m,max:i-c,min:0})}function Fq(e){return e?e.reduce((r,i)=>{var B;return i.type===t.Fragment?[...r,...Fq(i.children)]:((B=i.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...r,i]:r},[]):[]}function nA({val:e,max:r,min:i=0}){return e>r?nA({val:e-(r+1),max:r,min:i}):e<i?nA({val:e+(r+1),max:r,min:i}):e}function GOt(e,r){let i;return r?function(...B){const D=this;i||(e.apply(D,B),i=!0,setTimeout(()=>i=!1,r))}:e}function HOt(e,r){let i;return function(...B){i&&clearTimeout(i),i=setTimeout(()=>{e(...B),i=null},r)}}function WOt(e="",r={}){return Object.entries(r).reduce((i,[B,D])=>i.replace(`{${B}}`,String(D)),e)}var qOt=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},Tu))),r=t.inject("currentSlide",t.ref(0)),i=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},WOt(e.i18n.itemXofY,{currentSlide:r.value+1,slidesCount:i.value}))}}),YOt=t.defineComponent({name:"Carousel",props:Oq,setup(e,{slots:r,emit:i,expose:B}){var D;const c=t.ref(null),m=t.ref([]),a=t.ref(0),v=t.ref(0),f=t.reactive(Object.assign({},Tu));let n=Object.assign({},Tu),y;const _=t.ref((D=e.modelValue)!==null&&D!==void 0?D:0),p=t.ref(0),l=t.ref(0),o=t.ref(0),s=t.ref(0);let u,d;t.provide("config",f),t.provide("slidesCount",v),t.provide("currentSlide",_),t.provide("maxSlide",o),t.provide("minSlide",s),t.provide("slideWidth",a);function h(){y=Object.assign({},e.breakpoints),n=Object.assign(Object.assign(Object.assign({},n),e),{i18n:Object.assign(Object.assign({},n.i18n),e.i18n),breakpoints:void 0}),b(n)}function g(){if(!y||!Object.keys(y).length)return;const ae=Object.keys(y).map(ie=>Number(ie)).sort((ie,ue)=>+ue-+ie);let ne=Object.assign({},n);ae.some(ie=>{const ue=window.matchMedia(`(min-width: ${ie}px)`).matches;return ue&&(ne=Object.assign(Object.assign({},ne),y[ie])),ue}),b(ne)}function b(ae){Object.entries(ae).forEach(([ne,ie])=>f[ne]=ie)}const w=HOt(()=>{g(),x()},16);function x(){if(!c.value)return;const ae=c.value.getBoundingClientRect();a.value=ae.width/f.itemsToShow}function S(){v.value<=0||(l.value=Math.ceil((v.value-1)/2),o.value=$Ot({config:f,slidesCount:v.value}),s.value=jOt({config:f,slidesCount:v.value}),f.wrapAround||(_.value=aA({val:_.value,max:o.value,min:s.value})))}t.onMounted(()=>{t.nextTick(()=>x()),setTimeout(()=>x(),1e3),g(),V(),window.addEventListener("resize",w,{passive:!0}),i("init")}),t.onUnmounted(()=>{d&&clearTimeout(d),u&&clearInterval(u),window.removeEventListener("resize",w,{passive:!0})});let k=!1;const T={x:0,y:0},C={x:0,y:0},A=t.reactive({x:0,y:0}),E=t.ref(!1),M=t.ref(!1),I=()=>{E.value=!0},N=()=>{E.value=!1};function z(ae){["INPUT","TEXTAREA","SELECT"].includes(ae.target.tagName)||(k=ae.type==="touchstart",k||ae.preventDefault(),!(!k&&ae.button!==0||U.value)&&(T.x=k?ae.touches[0].clientX:ae.clientX,T.y=k?ae.touches[0].clientY:ae.clientY,document.addEventListener(k?"touchmove":"mousemove",F,!0),document.addEventListener(k?"touchend":"mouseup",R,!0)))}const F=GOt(ae=>{M.value=!0,C.x=k?ae.touches[0].clientX:ae.clientX,C.y=k?ae.touches[0].clientY:ae.clientY;const ne=C.x-T.x,ie=C.y-T.y;A.y=ie,A.x=ne},f.throttle);function R(){const ae=f.dir==="rtl"?-1:1,ne=Math.sign(A.x)*.4,ie=Math.round(A.x/a.value+ne)*ae;if(ie&&!k){const ue=he=>{he.stopPropagation(),window.removeEventListener("click",ue,!0)};window.addEventListener("click",ue,!0)}Z(_.value-ie),A.x=0,A.y=0,M.value=!1,document.removeEventListener(k?"touchmove":"mousemove",F,!0),document.removeEventListener(k?"touchend":"mouseup",R,!0)}function V(){!f.autoplay||f.autoplay<=0||(u=setInterval(()=>{f.pauseAutoplayOnHover&&E.value||q()},f.autoplay))}function $(){u&&(clearInterval(u),u=null),V()}const U=t.ref(!1);function Z(ae){const ne=f.wrapAround?ae:aA({val:ae,max:o.value,min:s.value});_.value===ne||U.value||(i("slide-start",{slidingToIndex:ae,currentSlideIndex:_.value,prevSlideIndex:p.value,slidesCount:v.value}),U.value=!0,p.value=_.value,_.value=ne,d=setTimeout(()=>{if(f.wrapAround){const ie=nA({val:ne,max:o.value,min:0});ie!==_.value&&(_.value=ie,i("loop",{currentSlideIndex:_.value,slidingToIndex:ae}))}i("update:modelValue",_.value),i("slide-end",{currentSlideIndex:_.value,prevSlideIndex:p.value,slidesCount:v.value}),U.value=!1,$()},f.transition))}function q(){Z(_.value+f.itemsToScroll)}function W(){Z(_.value-f.itemsToScroll)}const Q={slideTo:Z,next:q,prev:W};t.provide("nav",Q),t.provide("isSliding",U);const X=t.computed(()=>UOt({config:f,currentSlide:_.value,slidesCount:v.value}));t.provide("slidesToScroll",X);const J=t.computed(()=>{const ae=f.dir==="rtl"?-1:1,ne=X.value*a.value*ae;return{transform:`translateX(${A.x-ne}px)`,transition:`${U.value?f.transition:0}ms`,margin:f.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function ee(){h(),g(),S(),x(),$()}Object.keys(Oq).forEach(ae=>{["modelValue"].includes(ae)||t.watch(()=>e[ae],ee)}),t.watch(()=>e.modelValue,ae=>{ae!==_.value&&Z(Number(ae))}),t.watch(v,S),i("before-init"),h();const le={config:f,slidesCount:v,slideWidth:a,next:q,prev:W,slideTo:Z,currentSlide:_,maxSlide:o,minSlide:s,middleSlide:l};B({updateBreakpointsConfigs:g,updateSlidesData:S,updateSlideWidth:x,initDefaultConfigs:h,restartCarousel:ee,slideTo:Z,next:q,prev:W,nav:Q,data:le});const oe=r.default||r.slides,se=r.addons,ce=t.reactive(le);return()=>{const ae=Fq(oe==null?void 0:oe(ce)),ne=(se==null?void 0:se(ce))||[];ae.forEach((fe,ge)=>fe.props.index=ge);let ie=ae;if(f.wrapAround){const fe=ae.map((be,xe)=>t.cloneVNode(be,{index:-ae.length+xe,isClone:!0,key:`clone-before-${xe}`})),ge=ae.map((be,xe)=>t.cloneVNode(be,{index:ae.length+xe,isClone:!0,key:`clone-after-${xe}`}));ie=[...fe,...ae,...ge]}m.value=ae,v.value=Math.max(ae.length,1);const ue=t.h("ol",{class:"carousel__track",style:J.value,onMousedownCapture:f.mouseDrag?z:null,onTouchstartPassiveCapture:f.touchDrag?z:null},ie),he=t.h("div",{class:"carousel__viewport"},ue);return t.h("section",{ref:c,class:{carousel:!0,"is-sliding":U.value,"is-dragging":M.value,"is-hover":E.value,"carousel--rtl":f.dir==="rtl"},dir:f.dir,"aria-label":f.i18n.ariaGallery,tabindex:"0",onMouseenter:I,onMouseleave:N},[he,ne,t.h(qOt)])}}}),Lq;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(Lq||(Lq={}));var XOt=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:r}){const i=t.inject("config",t.reactive(Object.assign({},Tu))),B=t.inject("currentSlide",t.ref(0)),D=t.inject("slidesToScroll",t.ref(0)),c=t.inject("isSliding",t.ref(!1)),m=()=>e.index===B.value,a=()=>e.index===B.value-1,v=()=>e.index===B.value+1,f=()=>{const n=Math.floor(D.value),y=Math.ceil(D.value+i.itemsToShow-1);return e.index>=n&&e.index<=y};return()=>{var n;return t.h("li",{style:{width:`${100/i.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":f(),"carousel__slide--active":m(),"carousel__slide--prev":a(),"carousel__slide--next":v(),"carousel__slide--sliding":c.value},"aria-hidden":!f()},(n=r.default)===null||n===void 0?void 0:n.call(r))}}});const ZOt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},JOt=e=>(t.pushScopeId("data-v-54620d25"),e=e(),t.popScopeId(),e),KOt={class:"gsc-carousel"},QOt={key:0},eFt=JOt(()=>t.createElementVNode("div",null,"no hay",-1)),tFt=[eFt],aFt={class:"gsc-carousel__2d__slides"},nFt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rFt=["fill"],iFt={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oFt=["fill"],sFt={class:"gsc-carousel__2d__navigation"},lFt={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cFt=["stroke"],dFt={key:1,class:"gsc-carousel__2d__navigation__pagination"},uFt=["onClick"],hFt={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pFt=["stroke"],fFt={__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(r=>r 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:r,emit:i}){const B=e;t.useCssVars(o=>({"2c72d674":e.slideLeftArrowBackgroundImage,"90a63f40":e.slidesArrowsLeftAndRight,"2627d097":e.slideRightArrowBackgroundImage,"1904d43f":e.marginTop,cfb58986:e.secondarySlidesOpacity}));const D=t.ref(null),c=t.ref({}),m=t.ref(0),a=t.ref(!1);t.watch(D,o=>{o&&a.value?(a.value=!1,v(B.items)):o&&o.slideTo&&o.slideTo(m.value)},{deep:!0}),t.watch(()=>B.currentItemIndex,o=>{m.value!==o&&_(o)}),t.watch(()=>B.defaultItemByIndex,o=>{m.value!==o&&_(o)}),t.watch(()=>B.items,o=>{D.value?v(o):a.value=!0},{immediate:!0});function v(o){o&&o.length&&D.value&&setTimeout(()=>{if(B.defaultItemByProp){const s=B.items.findIndex(u=>u[B.defaultItemByProp.propName]===B.defaultItemByProp.value);s!==-1?(m.value=s,c.value=o[s]):(m.value=0,c.value=o[0])}else m.value=B.defaultItemByIndex,c.value=o[B.defaultItemByIndex];D.value.slideTo&&D.value.slideTo(m.value),c.value&&m.value===0&&i("input",{selectedItem:c.value,selectedItemIndex:m.value})},500)}function f(){D.value&&D.value.next()}function n(){D.value&&D.value.prev()}function y(){D.value&&D.value.updateSlideWidth()}function _(o){D.value&&D.value.slideTo(o)}function p(o){D.value.slideTo(o)}function l(o){const s=o.slidingToIndex<0?B.items.length-1:o.slidingToIndex===B.items.length?0:o.slidingToIndex;m.value=s,c.value=B.items[s],i("update:currentItemIndex",s),i("input",{selectedItem:c.value,selectedItemIndex:m.value})}return r({prev:n,next:f,updateSlideWidth:y,slideTo:_}),(o,s)=>(t.openBlock(),t.createElementBlock("div",KOt,[B.is3d?(t.openBlock(),t.createElementBlock("div",QOt,tFt)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[t.createElementVNode("div",aFt,[t.createVNode(t.unref(YOt),{ref_key:"carousel2d",ref:D,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:l},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(u,d)=>(t.openBlock(),t.createBlock(t.unref(XOt),{key:d},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{item:u},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:s[0]||(s[0]=u=>D.value.prev())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",nFt,[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,rFt)]))],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:s[1]||(s[1]=u=>f())},[t.createElementVNode("div",{class:t.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(t.openBlock(),t.createElementBlock("svg",iFt,[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,oFt)]))],2)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",sFt,[e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:s[2]||(s[2]=u=>n())},[(t.openBlock(),t.createElementBlock("svg",lFt,[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,cFt)]))])):t.createCommentVNode("",!0),e.isPaginationVisible?(t.openBlock(),t.createElementBlock("div",dFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(u,d)=>(t.openBlock(),t.createElementBlock("div",{key:`i-${d}`,class:"gsc-carousel__2d__navigation__pagination__item",style:t.normalizeStyle({height:`${B.navigationHeight}px`,width:`${m.value===d?B.navigationActiveWidth:B.navigationActiveWidth/2}px`,borderRadius:`${B.navigationBorderRadius}px`,backgroundColor:`${m.value===d?B.navigationActiveColor:B.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:h=>p(d)},null,12,uFt))),128))])):t.createCommentVNode("",!0),e.areNavigationArrowsVisible?(t.openBlock(),t.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:s[3]||(s[3]=u=>D.value.next())},[(t.openBlock(),t.createElementBlock("svg",hFt,[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,pFt)]))])):t.createCommentVNode("",!0)])],2))]))}},mFt=ZOt(fFt,[["__scopeId","data-v-54620d25"]]),ixa="",Dq={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"},oxa="",rA={components:{GSCCarousel:mFt,GSCLeaders:uOt,GSCRowTable:kq,GSCTableHeader:yq,GSCExpandedInfo:zq},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:r}=E_(e);return{myDivRef:e,elementSize:r}},watch:{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,r){e&&(JSON.stringify(e)!==JSON.stringify(r)||this.sonConjuntosDistintos(e.setNationalitiesIds,r.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={},r={},i=[],B=[],D=[];return this.formatFilterStats.map(c=>{e[c.team_id]?e[c.team_id].total=e[c.team_id].total+c.total:(e[c.team_id]={},e[c.team_id].total=c.total,e[c.team_id].id=this.teamInfo[c.team_id].id,e[c.team_id].name=this.teamInfo[c.team_id].name.replace(" Femenil",""),e[c.team_id].img="https://az755631.vo.msecnd.net/teams-80/"+c.team_id+".png",e[c.team_id].effectiveness=this.teamInfo[c.team_id].effectiveness,e[c.team_id].frecuency=this.teamInfo[c.team_id].frecuency,e[c.team_id].game_avg=this.teamInfo[c.team_id].game_avg,e[c.team_id].game_avg_last_season=this.teamInfo[c.team_id].game_avg_last_season,e[c.team_id].games_played_lastseason=this.teamInfo[c.team_id].games_played_lastseason,e[c.team_id].games_played=this.teamInfo[c.team_id].games_played,e[c.team_id].positiontable=this.teamInfo[c.team_id].positiontable,e[c.team_id].goals=this.teamInfo[c.team_id].goals,e[c.team_id].goalsrecived=this.teamInfo[c.team_id].goalsrecived,e[c.team_id].xg=this.teamInfo[c.team_id].xg),r[c.player_id]?c.player_id!=0&&c.player_id!=62117&&(r[c.player_id].total=r[c.player_id].total+c.total):c.player_id!=0&&c.player_id!=62117&&(r[c.player_id]={},r[c.player_id].total=c.total,c.player_id&&this.playersInfo[c.player_id]?(r[c.player_id].name=this.playersInfo[c.player_id].name,r[c.player_id].name_short=this.getnameshort(this.playersInfo[c.player_id].name),r[c.player_id].img=this.playersInfo[c.player_id].img,r[c.player_id].id=this.playersInfo[c.player_id].id,r[c.player_id].age=this.playersInfo[c.player_id].age,r[c.player_id].team=this.playersInfo[c.player_id].team,r[c.player_id].teamname=this.playersInfo[c.player_id].teamname,r[c.player_id].teamid=this.playersInfo[c.player_id].teamid,r[c.player_id].position=this.playersInfo[c.player_id].position,r[c.player_id].positionId=this.playersInfo[c.player_id].positionId,r[c.player_id].positionfull=this.playersInfo[c.player_id].positionfull,r[c.player_id].country=this.playersInfo[c.player_id].country,r[c.player_id].effectiveness=this.playersInfo[c.player_id].effectiveness,r[c.player_id].minutes=this.playersInfo[c.player_id].minutes_played,r[c.player_id].games=this.playersInfo[c.player_id].games_played,r[c.player_id].date=this.playersInfo[c.player_id].date,r[c.player_id].nationality=this.playersInfo[c.player_id].nationality,r[c.player_id].player_country_flag=this.playersInfo[c.player_id].player_country_flag,r[c.player_id].categoryName=this.categoryName):(r[c.player_id].id=c.player_id,r[c.player_id].name=c.player_id,r[c.player_id].img="SIN IMAGEN",r[c.player_id].age="",r[c.player_id].teamname="",r[c.player_id].team="",r[c.player_id].teamid=0,r[c.player_id].position="",r[c.player_id].positionId=0,r[c.player_id].positionfull="",r[c.player_id].country="",r[c.player_id].effectiveness="",r[c.player_id].minutes="",r[c.player_id].games="",r[c.player_id].date="00-00-0000",r[c.player_id].nationality="",r[c.player_id].player_country_flag="",r[c.player_id].categoryName=""))}),i.push(...Object.values(e)),B.push(...Object.values(r)),i=this.sortAndSlice(Object.values(e),60),B=B.sort(this.compareObjectsMinutes).slice(0,60),B=B.map((c,m)=>(c.top=m<9?"0"+(m+1):""+(m+1),c)),i=i.map((c,m)=>(c.top=m<9?"0"+(m+1):""+(m+1),c)),this.filterTeam!==0&&!this.isTeam&&(D=B.filter(c=>c.teamid===this.filterTeam)),this.changeStateLoading(!1),this.isTeam?this.formatArrayPaginate(i):this.filterTeam!=0?this.formatArrayPaginate(D):this.formatArrayPaginate(B)}else return this.changeStateLoading(!1),[]}},data:()=>({url:"https://8grl16o77j.execute-api.us-west-2.amazonaws.com/prod/live/tops",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"}]}),methods:{changeStateLoading(e){this.isloading=e},compareObjectsMinutes(e,r){return e.total>r.total?-1:e.total<r.total?1:e.minutes<r.minutes?-1:e.minutes>r.minutes?1:0},sonConjuntosDistintos(e,r){const i=Array.from(e),B=Array.from(r);if(i.length!==B.length)return!0;for(let D=0;D<i.length;D++)if(!r.has(i[D]))return!0;return!1},getnameshort(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";return D=D.replace(",",""),c+". "+D},changeCarrousel(){this.expand=!1,this.playerexpand=0},compareObjects(e,r){return e.total<r.total?-1:e.total>r.total?1:e.name<r.name?-1:e.name>r.name?1:0},sortAndSlice(e,r){return e.sort((i,B)=>(i.name<B.name?1:-1)&&(i.total<B.total?1:-1)).slice(0,r)},getCategoryName(e){let r="";for(let i=0;i<this.categories.length;i++)e==this.categories[i].id&&(r=this.categories[i].name);return r},translateTopCategories(e){return{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]}[e]||[]},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,r,i){let B=this.filtersValues.matchResult,D=this.filtersValues.playingAs,c=this.filtersValues.sections,m=this.filtersValues.zone,a=this.translateTopCategories(r);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,D=this.filterEmitAux.playingAs,c=this.filterEmitAux.sections,m=this.filterEmitAux.zone);const v=1,f=2,n=3,y=this.isTeam?n:f,_=e.player_id;let p=[],l=this.isTeam?e.id:this.filterTeam;_?this.isTeam?l=_:(p=[_],a=a.filter(s=>!s.toString().includes("_r"))):this.isTeam?l=e.id:(p=[e.id],a=a.filter(s=>!s.toString().includes("_r")));const o={auxwidget:!!(this.canPlayVideos||this.game.awayTeam.team_id==this.teamWidget&&this.typeData!=1),seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:y,gameIds:null,playerIds:p,goalkeeperIds:[],categoryIds:this.translateTopCategories(r),teamId:l||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:i,playingAs:D,timeSections:c,fieldSections:m,coordinatePoint:this.getCoordinatePointPerCategory(r)}};this.$emit("setopenmedia",o)},emitEventMediaFullTable(e,r,i){let B=this.filtersValues.matchResult,D=this.filtersValues.playingAs,c=this.filtersValues.sections,m=this.filtersValues.zone,a=this.translateTopCategories(r);Object.keys(this.filterEmitAux).length>0&&(B=this.filterEmitAux.matchResult,D=this.filterEmitAux.playingAs,c=this.filterEmitAux.sections,m=this.filterEmitAux.zone);const v=1,f=2,n=3,y=this.isTeam?n:f;let _=[],p=this.isTeam?e.id:this.filterTeam;this.isTeam?p=e.id:(_=[e.id],a=a.filter(o=>!o.toString().includes("_r")));const l={seasonId:this.season,isFeaturedPlayers:!1,mainSectionType:v,playListType:y,gameIds:null,playerIds:_,goalkeeperIds:[],categoryIds:a,teamId:p||0,matchResult:B,categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:i,playingAs:D,timeSections:c,fieldSections:m,coordinatePoint:this.getCoordinatePointPerCategory(r)}};this.$emit("setopenmedia",l)},replaceImgPlayer(e){return e.replace("https://az755631.vo.msecnd.net/players-profile/","https://az755631.vo.msecnd.net/players-profile-no-bg/")},abrevName(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";D=D.replace(",","");var m=c+". "+D;return m},clickMore(e){this.$emit("more",{category:e,categoryName:this.categoryName})},morestats(){this.$emit("more",this.category)},viewprofile(e,r){this.$emit("clickprofile",{id:e,teamId:r,isTeam:this.isTeam})},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getCategoryStats(e){var r,i;this.mapPlayers=new Map;try{if(!e)return;let B=[],D={},c={},m=this.season;(i=(r=this.seasonSelected)==null?void 0:r.related_seasons)!=null&&i.some(f=>f.id===this.season)&&(m=this.seasonSelected.id),this.arePlaysEmpty=!1;const a=$c.create({headers:{Authorization:`${this.token}`}});this.isloading=!0;let v={};if(this.typeData==1?this.isWidget&&this.teamWidget!=0?v=await a.get(this.url+"/"+this.gameId+"/"+this.category+"?t="+this.teamWidget):v=await a.get(this.url+"/"+this.gameId+"/"+this.category):this.game.game_status===1?this.isWidget&&this.teamWidget!=0?v=await a.get(this.url+"/"+this.gameId+"/"+this.category+"?acc=1&t="+this.teamWidget):v=await a.get(this.url+"/"+this.gameId+"/"+this.category+"?acc=1"):this.isWidget&&this.teamWidget!=0?v=await a.get(this.urlPrematch+m+"/"+this.category+"?t="+this.teamWidget):v=await a.get(this.urlPrematch+m+"/"+this.category+"?t="+this.game.homeTeam.team_id+"&t="+this.game.awayTeam.team_id),v&&v.data&&v.data.data&&v.data.data.length>0){B=v.data.data.map(n=>this.formatStatsData(n)),v.data.teams.forEach(n=>{D[n[0]]={},D[n[0]].id=n[0],D[n[0]].name=n[1],D[n[0]].abrv=n[2],D[n[0]].img=n[3],D[n[0]].effectiveness=n[4],D[n[0]].games_played=n[5],D[n[0]].games_played_lastseason=n[6],D[n[0]].positiontable=n[7],D[n[0]].goals=n[8],D[n[0]].goalsrecived=n[9],D[n[0]].xg=n[10],D[n[0]].frecuency=n[11],D[n[0]].game_avg=n[12],D[n[0]].game_avg_last_season=n[13]});const f=new Set;v.data.players.forEach(n=>{const y=this.getObjectPlayer(n);this.mapPlayers.set(y.numberId,y);const _=y.numberAge,p=y.teamName.length>0?y.teamName[0].acronym:"",l=y.teamName.length>0?D[y.teamName[0].team_id].name:"",o=y.teamName.length>0?y.teamName[0].team_id:"",s=this.positions[y.numberPositionId-1].fullname,u=this.positions[y.numberPositionId-1].name,d=y.countryId.length>0?y.countryId[0].nationality_id:"",h=y.effectiveness,g=y.min,b=y.games,w=y.date;y.arrayNationalities.forEach(x=>{f.add(x.numberId)}),c[n[0]]={id:n[0],name:n[1],img:n[2],age:_,team:p,teamname:l,teamid:o,position:s,positionfull:u,effectiveness:h,country:d,games_played:b,minutes_played:g,date:w,nationality:y.stringNationalityName,player_country_flag:y.player_country_flag,positionId:y.numberPositionId}}),this.setNationalityIds=f,this.arrayAgeRange=[v.data.min_age,v.data.max_age]}else this.arePlaysEmpty=!0;this.teamInfo=D,this.playersInfo=c,this.formatStats=B,this.formatFilterStats=this.filterRecords(this.filtersSelect),this.statsData=v}catch(B){return Promise.reject(B)}},filterRecords(e){return this.formatStats.length>0?this.formatStats.filter(r=>{const i=e.playingAs.includes(r.playing_as),B=e.matchResult.includes(r.match_result),D=e.sections.includes(r.section),c=e.typeZone===1&&e.zone.includes(r.origen)||e.typeZone===2&&e.zone.includes(r.destino);if(e.setPositionsIds&&e.setNationalitiesIds&&e.arrayAgeRange&&e.setYear&&!this.isTeam){const m=this.mapPlayers.get(r.player_id);if(!m)return!1;if(e.booleanAreNationalTeamsVisible){if(e.setAvailableNationalTeamsPlayersIds.size>0&&!e.setAvailableNationalTeamsPlayersIds.has(r.player_id))return!1}else{let a=!1;for(const v of m.arrayNationalitiesIds)if(e.setNationalitiesIds.has(v)){a=!0;break}if(!a)return!1}if(m.numberAge<e.arrayAgeRange[0]||m.numberAge>e.arrayAgeRange[1]||m.date<e.setYear||!e.setPositionsIds.includes(m.numberPositionId))return!1}return(e.playingAs.length===0||i)&&(e.matchResult.length===0||B)&&(e.sections.length===0||D)&&(e.zone.length===0||c)}):[]},updateSliderF(){this.updateSlider+=1},formatStatsData(e){const r={};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((i,B)=>{r[i]=e[B]}),r},getObjectPlayer(e){const r=[],i=e[7].map(D=>(r.push(D.nationality_id),{stringName:D.nationality,numberId:D.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://az755631.vo.msecnd.net/flags/"+e[3]+".jpg",stringNationalityName:Dq[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:i,category:this.categoryName,arrayNationalitiesIds:r}},formatArrayPaginate(e){const r=Math.ceil(e.length/this.numRows);return Array.from({length:r},(i,B)=>{const D=B*this.numRows,c=D+this.numRows;return e.slice(D,c)})},createIntervalTops(){this.intervalIdtops=setInterval(async()=>{await this.getCategoryStats(this.season)},this.timeLiveComparativeAvanced)},clearTopsInterval(){this.intervalIdtops&&(clearInterval(this.intervalIdtops),this.intervalIdtops=null)}},beforeUnmount(){this.clearTopsInterval()}},Rq=()=>{t.useCssVars(e=>({"6116a6fe":e.borderRadius,e062144c:e.borderWidth,e2901112:e.borderColor}))},Vq=rA.setup;rA.setup=Vq?(e,r)=>(Rq(),Vq(e,r)):Rq;const P5=e=>(t.pushScopeId("data-v-dcbbe8a9"),e=e(),t.popScopeId(),e),gFt={ref:"myDivRef"},yFt={class:"btnViewFullList"},vFt={class:"text"},_Ft={class:"groupsLeague"},bFt={class:"row-table-carrousel"},xFt={key:1,class:"container-no-search-result"},wFt={key:0,class:"overlay-loading-top"},kFt=[P5(()=>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)),P5(()=>t.createElementVNode("div",{class:"overlay-loading-top__text"},"Loading...",-1))],CFt=P5(()=>t.createElementVNode("div",{class:"container-no-search-result-title"},"No existen resultados",-1)),SFt=P5(()=>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));function TFt(e,r,i,B,D,c){const m=t.resolveComponent("GSCLeaders"),a=t.resolveComponent("GSCRowTable"),v=t.resolveComponent("GSCExpandedInfo"),f=t.resolveComponent("GSCCarousel"),n=t.resolveComponent("GSCTableHeader");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(i.type==0?"gsc-top":"gsc-top-full")},[t.createElementVNode("div",gFt,[t.createElementVNode("div",yFt,[t.createElementVNode("div",vFt,[t.createElementVNode("div",_Ft,t.toDisplayString(i.categoryName),1)])]),i.type==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[c.topData.length>0?(t.openBlock(),t.createBlock(f,{key:0,items:c.topData,"is-pagination-visible":!0,"are-navigation-arrows-visible":!0,onInput:c.changeCarrousel},{default:t.withCtx(({item:y})=>[t.createElementVNode("div",bFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(_,p)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:p},[_.top==1?(t.openBlock(),t.createBlock(m,{key:0,onMediadata:r[0]||(r[0]=l=>c.emitEventMedia(l,i.category,i.categoryName)),type:i.typeTable,"type-data":i.typeData,game:i.game,"team-widget":i.teamWidget,"can-play-videos":i.canPlayVideos,"is-expanded":e.playerexpand==_.id&&e.expand,ref_for:!0,ref:"GSCLeaders",data:i.typeTable==0?{top:"01",photo:_.img,logo:"https://az755631.vo.msecnd.net/teams-80/"+_.teamid+".png",name:_.name,player_short:_.name_short,player_id:_.id,categoryId:i.category,total:_.total}:{top:"01",logo:_.img,total:_.total,name_team:_.name,player_id:_.id},"category-name":i.categoryName,buttonMaxWidth:i.typeTable!=0?B.elementSize.width>360?"210px":"130px":B.elementSize.width>360?"180px":"110px",buttonFontSize:"12px",iconSize:"11px",onExpand:c.clickexpand,onMore:c.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":i.typeData,"team-widget":i.teamWidget,game:i.game,type:i.typeTable,"type-view":i.type,"is-expanded":e.playerexpand==_.id&&e.expand,onMediadata:r[1]||(r[1]=l=>c.emitEventMedia(l,i.category,i.categoryName)),data:i.typeTable==0?{position:_.top,player_name:_.name,player_short:_.name_short,player_photo:_.img,total:_.total,id:_.id,player_age:_.age,team_abrev:_.team,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+_.teamid+".png",player_position:_.position,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+_.country+".jpg",player_games:_.minutes,player_min:_.games,league_name:" Liga MX "}:{position:_.top,team_logo:_.img,team_abrev:_.name,frequency:_.frecuency,promthistournament:_.game_avg,promlasttournament:_.game_avg_last_season,teams_games:"-",category:i.category,total:_.total,id:_.id},height:"71px","can-play-videos":i.canPlayVideos,background:p%2===0?i.backgroundEven:i.backgroundOdd,onExpand:c.clickexpand},null,8,["type-data","team-widget","game","type","type-view","is-expanded","data","can-play-videos","background","onExpand"])),e.expand&&e.playerexpand==_.id?(t.openBlock(),t.createBlock(v,{key:2,type:i.typeTable,"is-live":i.game.is_live,"view-effectiveness":_.positionId!==1,data:i.typeTable==0?{teams:_.teamname,age:_.age,dataofbirth:_.date,nationality:_.nationality,countryFlag:_.player_country_flag,position:_.position,games:_.games,min:_.minutes,goals:_.total,effectiveness:_.effectiveness,category:i.categoryName,id:_.id}:{position:_.positiontable,goals:_.goals,goals_received:_.goalsrecived,games_played:_.games_played,category:i.categoryName,effectiveness:_.effectiveness,xg:_.xg,total:_.total,attendance:"-",id:_.id},onViewprofile:l=>c.viewprofile(l,_.teamid),background:p%2===0?i.backgroundEven:i.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",xFt,[e.isloading?(t.openBlock(),t.createElementBlock("div",wFt,kFt)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[CFt,SFt],64))]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(n,{background:"#183143",type:i.typeTable},null,8,["type"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.topData,(y,_)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:_},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(p,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l},[t.createVNode(a,{"type-data":i.typeData,"team-widget":i.teamWidget,game:i.game,type:i.typeTable,"type-view":i.type,"can-play-videos":i.canPlayVideos,"is-expanded":e.playerexpand==p.id&&e.expand,onMediadata:r[2]||(r[2]=o=>c.emitEventMediaFullTable(o,i.category,i.categoryName)),data:i.typeTable==0?{position:p.top,player_name:p.name,player_short:p.name_short,player_photo:p.img,total:p.total,id:p.id,player_age:p.age,team_abrev:p.team,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+p.teamid+".png",player_position:p.position,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+p.country+".jpg",player_games:p.games,player_min:p.minutes,league_name:" Liga MX "}:{position:p.positiontable,team_logo:p.img,team_abrev:p.name,frequency:p.frecuency,promthistournament:p.game_avg,promlasttournament:p.game_avg_last_season,category:i.category,team_games:p.games_played,total:p.total,id:p.id},height:"71px",background:((_+1)*5+l)%2===0?i.backgroundOdd:i.backgroundEven,onExpand:c.clickexpand},null,8,["type-data","team-widget","game","type","type-view","can-play-videos","is-expanded","data","background","onExpand"]),e.expand&&e.playerexpand==p.id?(t.openBlock(),t.createBlock(v,{key:0,type:i.typeTable,"is-live":i.game.is_live,additionalClass:"fullTable","view-effectiveness":p.positionId!==1,data:i.typeTable==0?{teams:p.teamname,age:p.age,dataofbirth:p.date,nationality:p.nationality,countryFlag:p.player_country_flag,position:p.positionfull,positionfull:p.positionfull,games:p.games,min:p.minutes,goals:p.total,effectiveness:p.effectiveness,category:c.getCategoryName(i.category),id:p.id}:{position:p.positiontable,goals:p.goals,goals_received:p.goalsrecived,games_played:p.games_played,category:i.categoryName,effectiveness:p.effectiveness,xg:p.xg,total:p.total,category:c.getCategoryName(i.category),attendance:"-",id:p.id},onViewprofile:o=>c.viewprofile(o,p.teamid),background:l%2===0?i.backgroundEven:i.backgroundOdd},null,8,["type","is-live","view-effectiveness","data","onViewprofile","background"])):t.createCommentVNode("",!0)],64))),128))],64))),128))],64))],512)],2)}const EFt=$i(rA,[["render",TFt],["__scopeId","data-v-dcbbe8a9"]]),AFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},MFt={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)}}},IFt=["src"],PFt=["src"];function BFt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",null,[i.activeClickLabel?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(c.customStyle),class:"gsc-label",onClick:r[0]||(r[0]=(...m)=>c.btnLabel&&c.btnLabel(...m))},[t.createTextVNode(t.toDisplayString(i.numFilter)+" "+t.toDisplayString(i.textValue)+" ",1),i.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,style:t.normalizeStyle(c.customIcon),class:"icon",src:i.icon},null,12,IFt)):t.createCommentVNode("",!0)],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"gsc-label",style:t.normalizeStyle(c.customStyle)},[t.createTextVNode(t.toDisplayString(i.numFilter)+" "+t.toDisplayString(i.textValue)+" ",1),i.iconVisible?(t.openBlock(),t.createElementBlock("img",{key:0,onClick:r[1]||(r[1]=(...m)=>c.btnClose&&c.btnClose(...m)),style:t.normalizeStyle(c.customIcon),class:"icon",src:i.icon},null,12,PFt)):t.createCommentVNode("",!0)],4))])}const NFt=AFt(MFt,[["render",BFt],["__scopeId","data-v-42ff544a"]]);function zFt(e){const r=t.ref({width:0,height:0});function i(){const B=e.value.getBoundingClientRect();r.value.width=B.width,r.value.height=B.height}return t.onMounted(()=>{i(),window.addEventListener("resize",i)}),t.onUnmounted(()=>{window.removeEventListener("resize",i)}),{elementSize:r}}const OFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},iA={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,r=this.$refs.content.scrollWidth;r>0&&e>0&&(r>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},$q=()=>{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}))},jq=iA.setup;iA.setup=jq?(e,r)=>($q(),jq(e,r)):$q;const FFt={ref:"gscScrollableContainer",class:"scrollable-container"},LFt={class:"scrollable-arrows"},DFt=["width","height","viewBox"],RFt=["stroke"],VFt={class:"scrollable-wrapper"},$Ft={class:"scrollable-arrows"},jFt=["width","height","viewBox"],UFt=["stroke"];function GFt(e,r,i,B,D,c){return t.openBlock(),t.createElementBlock("div",FFt,[i.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",c.hideShowLeftArrow]),onClick:r[0]||(r[0]=(...m)=>c.scrollLeft&&c.scrollLeft(...m))},[t.createElementVNode("div",LFt,[(t.openBlock(),t.createElementBlock("svg",{width:i.arrowsWidth,height:i.arrowsHeight,viewBox:c.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:i.arrowsColor},null,8,RFt)],8,DFt))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:r[1]||(r[1]=(...m)=>c.getScroll&&c.getScroll(...m))},[t.createElementVNode("div",VFt,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),i.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",c.hideShowRightArrow]),onClick:r[2]||(r[2]=(...m)=>c.scrollRight&&c.scrollRight(...m))},[t.createElementVNode("div",$Ft,[(t.openBlock(),t.createElementBlock("svg",{width:i.arrowsWidth,height:i.arrowsHeight,viewBox:c.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:i.arrowsColor},null,8,UFt)],8,jFt))])],2)):t.createCommentVNode("",!0)],512)}const HFt=OFt(iA,[["render",GFt],["__scopeId","data-v-b548a08d"]]),WFt=(e,r)=>{const i=e.__vccOpts||e;for(const[B,D]of r)i[B]=D;return i},oA={components:{GSCSlider:HFt},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:r}=zFt(e);return{myDivRef:e,elementSize:r}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var r={};return e.width>768?r={fontSize:"16px"}:e.width>480?r={fontSize:"14px"}:r={fontSize:"12px"},r}}},Uq=()=>{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}))},Gq=oA.setup;oA.setup=Gq?(e,r)=>(Uq(),Gq(e,r)):Uq;const qFt={ref:"myDivRef"},YFt={key:0,class:"gs-switch-container"},XFt=["onClick"],ZFt={key:1,class:"gs-switch-container-type"},JFt=["onClick"],KFt={key:2,class:"gs-switch-container-carousel"},QFt=["onClick"];function eLt(e,r,i,B,D,c){const m=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",qFt,[i.type==0?(t.openBlock(),t.createElementBlock("div",YFt,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([c.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,color:"grey !important"}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,XFt))),128))],4),t.renderSlot(e.$slots,i.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),i.type==1?(t.openBlock(),t.createElementBlock("div",ZFt,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([c.customGrid(B.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:i.backgroundOptionDisable}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,JFt))),128))],4)])):t.createCommentVNode("",!0),i.type==2?(t.openBlock(),t.createElementBlock("div",KFt,[t.createVNode(m,{arrows:i.arrow,"background-color":i.background,"px-scroll":i.pxScroll,"scroll-color":i.scrollColor,"arrows-position":i.arrowsPosition,arrowsScrollHide:i.arrowsScrollHide,"arrows-background":i.arrowsBackground,"arrows-container-bg-l":i.arrowsContainerBgL,"arrows-container-bg-r":i.arrowsContainerBgR,"arrows-margin":i.arrowsMargin,"arrows-radius":i.arrowsRadius,"arrows-border":i.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.buttons,(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:i.height},i.selectedOption==a?{borderColor:i.colorOptionActive,color:i.colorFont+"!important",background:i.backgroundOptionActive}:{borderColor:i.colorOptionDisable,color:"grey !important"}]),key:v,onClick:f=>(i.selectedOption=a,c.clickEmitEvent(a))},t.toDisplayString(a),13,QFt))),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 sA=WFt(oA,[["render",eLt],["__scopeId","data-v-8a86dfaf"]]),cxa="",dxa="";function tLt(){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 uxa="",aLt={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"},nLt=t.ref(tLt()),rLt={components:{GSCTableHeader:yq,GscSwitchComponent:sA,GSCFilterperteam:Qzt,GSCFilters:QW,GSCExpandedInfo:zq,GSCLabel:NFt,GSCSeasonSelect:nI,GSCTopCategory:EFt,GSCTournamentSelect:eI,GSCRowTable:kq},computed:{...azt.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},r=JSON.stringify(e);if(JSON.stringify(this.filters)!=r)return r},filterGolstats(){return this.FVfilterGolstats},filterButtonProps(){return{...nLt.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:""}},watch:{async seasonActive(){if(this.seasonActive!=0){this.teams=[];const e=await this.fetchTeams();for(let r=0;r<e.teams.length;r++)this.teams.push({id:e.teams[r].team_id,team:e.teams[r].colloquial_name,logo:e.teams[r].logo})}}},setup(){const e=t.ref("myDivRefTopsFull"),{elementSize:r}=E_(e);return{myDivRefTopsFull:e,elementSize:r}},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,r)=>r+1),selectedMonth:12,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}},FVbooleanAreNationalTeamsVisible:!1,teamsscouting:[],filterScounting:{tournaments:[1],seasonId:0,categories:[{name:"Goles",ids:[12]},{name:"Asistencias",ids:[10]},{name:"Participaciones en gol",ids:[27]},{name:"Cabeceos en área rival",ids:[330,333,423,577,578,331,334,424]},{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:[{name:"Goles",isSelected:!1,id:[12]},{name:"Asistencias",isSelected:!1,id:[10]},{name:"Participaciones en gol",isSelected:!1,id:[27]},{name:"Cabeceos en área rival",isSelected:!1,id:[330,333,423,577,578,331,334,424]},{name:"Tiros a gol totales",isSelected:!1,id:[91,95,92,93,96,97]},{name:"Tiros a gol con destino a portería",isSelected:!1,id:[91,95]},{name:"Tiros a gol fuera del área",isSelected:!1,id:[94]},{name:"Tiros a gol fuera del área con destino a portería",isSelected:!1,id:[95]},{name:"Tiros a gol dentro del área",isSelected:!1,id:[90]},{name:"Tiros a gol dentro del área con destino a portería",isSelected:!1,id:[91]},{name:"Centros por izquierda",isSelected:!1,id:[13]},{name:"Centros por izquierda acertados",isSelected:!1,id:[98,101,104,105]},{name:"Centros por derecha",isSelected:!1,id:[25]},{name:"Centros por derecha acertados",isSelected:!1,id:[109,112,115,116]},{name:"1vs1 exitosos ofensivos",isSelected:!1,id:[4]},{name:"1vs1 que terminan en gol",isSelected:!1,id:[88]}]},defensive:{title:"Defensivo",categories:[{name:"Bálones ganados en área propia",isSelected:!1,id:[234,241,281,288,399,401,211,231,238,244,280,287,294]},{name:"Cabeceo en área propia",isSelected:!1,id:[211,231,238,244,280,287,294]},{name:"1vs1 defensivos exitosos",isSelected:!1,id:[5]},{name:"Rechaces",isSelected:!1,id:[34]}]},possession:{title:"Posesión",categories:[{name:"Bálones recuperados totales",isSelected:!1,id:[222,223,224,225]},{name:"Bálones recuperados 1/4 de cancha",isSelected:!1,id:[222]},{name:"Bálones recuperados 2/4 de cancha",isSelected:!1,id:[223]},{name:"Bálones recuperados 3/4 de cancha",isSelected:!1,id:[224]},{name:"Bálones recuperados 4/4 de cancha",isSelected:!1,id:[225]},{name:"Pases acertados",isSelected:!1,id:[213,214,215,216]},{name:"Pases acertados en 1/4 de cancha",isSelected:!1,id:[213]},{name:"Pases acertados en 2/4 de cancha",isSelected:!1,id:[214]},{name:"Pases acertados en 3/4 de cancha",isSelected:!1,id:[215]},{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://az755631.vo.msecnd.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://az755631.vo.msecnd.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://az755631.vo.msecnd.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:er,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){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";return D=D.replace(",",""),c+". "+D},setUpTournamentsToFilter(){this.tournamentsToFilter.forEach(e=>{const r=e.id===this.selectedTournament.id;e.isSelected=r,e.isDefaultTournament=r})},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 r=this.$refs.personalDataFilter;r.clearFilters(hd.All),r.clearFilters(hd.AGE_RANGE),r.clearFilters(hd.YEAR),r.clearFilters(hd.NATIONALITY),r.clearFilters(hd.POSITION),this.universeData.minutesPlayed=0,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(B,D)=>D+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 i=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<i.teams.length;B++)this.teamsscouting.push({id:i.teams[B].team_id,team:i.teams[B].colloquial_name,logo:i.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 D=[e.id],c=e.team_id;const m={seasonId:e.season_id,isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:D,goalkeeperIds:[],categoryIds:this.setRelevantCategoriesPlayer(e.position),teamId:c||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",m)},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,r,i){this.$emit("openProfilePlayer",{playerId:e,teamId:i,seasonId:r||this.seasonActive})},openMenuFilters(){this.openMenuMobil=!this.openMenuMobil,this.showfiltersPc=!0},clickexpand(e){this.expand=e.expand,this.playerexpand=e.id},async getScoutingData(){this.arrayFiltersPlays=[],this.loadingActive=!0;const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.post("https://eh9nhj69z7.execute-api.us-west-2.amazonaws.com/prod/players/productivity",this.filterScounting,{headers:{"Content-Type":"application/json"}});if(this.filterScounting.tournaments.length>0){var i=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersTournaments");i!==-1?this.arrayFiltersPlays[i].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 D=0;D<r.length;D++){r[D];let m=r[D].dob.split("T")[0].split("-");var B={position:D+1,player_name:this.abrevName(r[D].name),player_photo:"https://az755631.vo.msecnd.net/players-profile/"+r[D].player_id+".png",total:r[D].total.toFixed(0),id:r[D].player_id,player_age:this.calcularEdad(r[D].dob),team_abrev:r[D].teams[0].acronym,team_name:r[D].teams[0].team_name,team_logo:"https://az755631.vo.msecnd.net/teams-80/"+r[D].teams[0].team_id+".png",player_position:r[D].position_id,player_country_flag:"https://az755631.vo.msecnd.net/flags/"+r[D].nationality_id+".jpg",date:m[2]+"."+m[1]+"."+m[0].substring(2,4),team_id:r[D].team_id,nationality_name:Dq[r[D].nationality_id],player_games:r[D].games_played,player_min:r[D].minutes_played,league_name:r[D].tournament_name,seasons:r[D].seasons,season_id:r[D].seasons[0]};this.rowScoutingData.push(B)}if(this.seasonsFilterSelected!=0){const D=await this.fetchTeamsScouting(this.seasonsFilterSelected);this.teamselect=0,this.teamselectrec=0,this.teamsscouting=[];for(let c=0;c<D.teams.length;c++)this.teamsscouting.push({id:D.teams[c].team_id,team:D.teams[c].colloquial_name,logo:D.teams[c].logo})}this.loadingActive=!1},abrevName(e){var r=e.split(","),i=r[0].split(" "),B=r[1].trim().split(" "),D="";i.length==2||i.length==1?i[0].length<4?D=i[0]+" "+i[1]:D=i[0]:i.length==3?D=i[0]+" "+i[1]:i.length==4&&(D=i[1]+" "+i[2]+" "+i[3]);var c=B[B.length-1]!=""?B[B.length-1].charAt(0):B[B.length-2]?B[B.length-2].charAt(0):"";D=D.replace(",","");var m=c+". "+D;return m},calcularEdad(e){var r=new Date(e),i=new Date,B=i-r,D=Math.floor(B/(1e3*60*60*24*365.25));return D},async onFiltersTournaments(e){this.modifidFiltersFlag=!0;var r=[];for(let i=0;i<e.length;i++)e[i].isSelected&&r.push(e[i].id);if(r.length==0&&(r=[1]),r.length==1)for(let i=0;i<e.length;i++)e[i].isSelected&&(this.nameLeagueSelected=e[i].name,this.seasonsFilterSelected=e[i].seasons[0].id);else this.seasonsFilterSelected=0,r.length>0&&(this.nameLeagueSelected=r.length+" Ligas");this.filterScounting.tournaments=r,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,D=e.ageByRange.max==0?40:e.ageByRange.max;this.filterScounting.range_age=[B,D],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 r=[];if(e.hasOwnProperty("nationalities")){for(let B=0;B<e.nationalities.length;B++)e.nationalities[B].isSelected&&r.push(e.nationalities[B].id);r.length==0&&(r=[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 i=[];for(let B=0;B<e.positions.length;B++)e.positions[B].isSelected&&i.push(e.positions[B].id);i.length==0&&(i=[1,2,3,4,5,6,7,8,9,10]),this.filterScounting.positions=i,this.filterScounting.nationalities=r},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 r=[];for(let i=0;i<e.productivityFilters.length;i++)r[e.productivityFilters[i].priority-1]={name:e.productivityFilters[i].name,ids:e.productivityFilters[i].id};r.length==0&&(r=[]),this.filterScounting.categories=r,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");r!==-1?this.arrayFiltersPlays[r].name=e[0].name:this.arrayFiltersPlays.push({name:e[0].name,type:"onFiltersPredefined"}),this.filtersPredefinedF=e[0].filters}else{var i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&i!==-1){this.filtersPredefinedF=this.filters;for(let D=0;D<this.FVfilterGolstats.length;D++)this.FVfilterGolstats[D].isSelected=!1;var i=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersPredefined");i!==-1&&this.arrayFiltersPlays.splice(i,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(this.categoriesDefault.length>0&&r!==-1){this.FVfilterGolstats=[],this.filtersPredefinedF={},this.arrayFiltersPlays.splice(r,1);var i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");if(i!==-1){for(let B=0;B<this.FVfilterGolstats.length;B++)this.FVfilterGolstats[B].isSelected=!1;i!==-1&&this.arrayFiltersPlays.splice(i,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 r=this.arrayFiltersPlays.findIndex(D=>D.type==="onFiltersPredefinedCategory");if(this.categoriesDefault.length>0&&r!==-1){this.categoryPredefinedActive=!1,this.categoryPredefined=0,this.FVfilterGolstats=[],this.filtersPredefinedF=this.filters,this.arrayFiltersPlays.splice(r,1);for(let c=0;c<this.categoriesDefault.length;c++)this.categoriesDefault[c].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var i=this.arrayFiltersPlays.findIndex(c=>c.type==="onFiltersPredefined");if(this.FVfilterGolstats.length>0&&i!==-1){for(let c=0;c<this.FVfilterGolstats.length;c++)this.FVfilterGolstats[c].isSelected=!1;i!==-1&&this.arrayFiltersPlays.splice(i,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,r){return Math.floor(Math.random()*(r-e+1))+e},applyFiltersBtn(e){},onFiltersPlays(e){if(this.arrayCategoryFilter=[],this.arrayCategoryFilterFull=[],e.playsCategories.length==0){for(let i=0;i<this.categoriesPlaysTypes.offensive.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offensive.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.defensive.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.defensive.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.possession.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.possession.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i]);for(let i=0;i<this.categoriesPlaysTypes.offenses.categories.length;i++)this.arrayCategoryFilter.push(this.categoriesPlaysTypes.offenses.categories[i].id),this.arrayCategoryFilterFull.push(this.categoriesPlaysTypes.offensive.categories[i])}else for(let i=0;i<e.playsCategories.length;i++)e.playsCategories[i].isSelected&&(this.arrayCategoryFilter.push(e.playsCategories[i].id),this.arrayCategoryFilterFull.push(e.playsCategories[i]));var r=this.arrayFiltersPlays.findIndex(i=>i.type==="onFiltersPlays");this.arrayCategoryFilter.length>0&&this.arrayCategoryFilter.length!=23?this.arrayCategoryFilter.length==1?r!=-1?this.arrayFiltersPlays[r].name=this.arrayCategoryFilterFull[0].name:this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull[0].name,type:"onFiltersPlays"}):r!=-1?this.arrayFiltersPlays[r].name=this.arrayCategoryFilterFull.length+" Tipos de jugadas":this.arrayFiltersPlays.push({name:this.arrayCategoryFilterFull.length+" Tipos de jugadas",type:"onFiltersPlays"}):r!==-1&&this.arrayFiltersPlays.splice(r,1)},async deleteLabelFilter(e){var r=this.arrayFiltersPlays.findIndex(B=>B.type===e);if(r!==-1){if(e=="onFiltersTournaments"){this.rowScoutingData=[];for(let D=0;D<this.detaildProductivityCategories.offensive.categories.length;D++)this.detaildProductivityCategories.offensive.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.defensive.categories.length;D++)this.detaildProductivityCategories.defensive.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.possession.categories.length;D++)this.detaildProductivityCategories.possession.categories[D].isSelected=!1;for(let D=0;D<this.detaildProductivityCategories.offensesConditions.length;D++)this.detaildProductivityCategories.offensesConditions[D]=!1;this.setUpTournamentsToFilter(),this.universeData.minutesPlayed=10,this.universeData.percentMinutesPlayed=0,this.universeData.lastMonths=Array.from({length:24},(D,c)=>c+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 D=0;D<B.teams.length;D++)this.teamsscouting.push({id:B.teams[D].team_id,team:B.teams[D].colloquial_name,logo:B.teams[D].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 i=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersPredefined");i!==-1&&this.arrayFiltersPlays.splice(i,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(hd.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(hd.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(hd.AGE_RANGE)),e=="onFiltersElegibility"&&this.$refs.personalDataFilterPlayers.clearFilters(hd.ELIGIBILITY),e=="onFiltersYear"&&(this.$refs.personalDataFilterPlayers.clearFilters(hd.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(r,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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersField");r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].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)&&(r!=-1?this.arrayFiltersPlays[r].name="cancha rival":this.arrayFiltersPlays.push({name:"cancha rival",type:"onFiltersField"}))):this.arrayFiltersPlays.splice(r,1)},addFilterPlayingAS(){var e=this.arrayFiltersPlays.findIndex(r=>r.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 r=[];this.filters.setNationalitiesIds=this.setNationalitiesIds;var i=[];for(let c=0;c<e.playingAs.length;c++)if(e.playingAs[c].isSelected){const m=e.playingAs[c].name=="Local"?1:2;r.push(m)}for(let c=0;c<e.gameSections.length;c++)e.gameSections[c].isSelected&&i.push(e.gameSections[c].value);this.fVsections=i,this.fVplayingAs=r;var B=this.arrayFiltersPlays.findIndex(c=>c.type==="onFiltersDetailsTime"),D="los minutos del ";this.fVsections.length!=6&&this.fVsections.length>0?(this.fVsections.includes(1)&&(D+=", 0-15"),this.fVsections.includes(2)&&(D+=", 15-30"),this.fVsections.includes(3)&&(D+=", 30-45"),this.fVsections.includes(4)&&(D+=", 45-60"),this.fVsections.includes(5)&&(D+=", 60-75"),this.fVsections.includes(6)&&(D+=", 75-90"),B!=-1?this.arrayFiltersPlays[B].name=D:this.arrayFiltersPlays.push({name:D,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,D)=>D+1),this.universeData.statistics.totals=!0,this.universeData.statistics.averagePerGame=!1,this.universeData.statistics.percentMinutesPlayed=!1;const e=this.$refs.personalDataFilter;e.clearFilters(hd.All),e.clearFilters(hd.AGE_RANGE),e.clearFilters(hd.YEAR),e.clearFilters(hd.NATIONALITY),e.clearFilters(hd.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 r=this.arrayFiltersPlays.findIndex(B=>B.type==="onFiltersTournaments");this.arrayFiltersPlays.splice(r,1),this.setUpTournamentsToFilter();const i=await this.fetchTeamsScouting(this.currentSeasonId);this.teamselect=0,this.teamsscouting=[];for(let B=0;B<i.teams.length;B++)this.teamsscouting.push({id:i.teams[B].team_id,team:i.teams[B].colloquial_name,logo:i.teams[B].logo})},onFiltersData(e){var r=0,i=0;e.ageByRange&&(e.ageByRange.min==0?r=1:r=e.ageByRange.min,e.ageByRange.max==0?i=40:i=e.ageByRange.max,this.fVarrayAgeRange=[r,i]),e.year&&(this.FVYear=e.year),this.fVnationalities=new Set;let B="",D="";if(this.fVsetPositionsIds=[],e.hasOwnProperty("nationalities")){this.FVbooleanAreNationalTeamsVisible=!1,this.FVsetAvailableNationalTeamsPlayersIds=new Set;for(let _=0;_<e.nationalities.length;_++)e.nationalities[_].isSelected&&this.fVnationalities.add(e.nationalities[_].id)}if(this.FVeligible=[],e.hasOwnProperty("eligibility")){this.FVbooleanAreNationalTeamsVisible=!0;for(let _=0;_<this.elegibilidadArray.length;_++)this.FVsetAvailableNationalTeamsPlayersIds.add(this.elegibilidadArray[_])}for(let _=0;_<e.positions.length;_++)e.positions[_].isSelected&&this.fVsetPositionsIds.push(e.positions[_].id);if(e.hasOwnProperty("nationalities"))var c=e.nationalities.filter(_=>_.isSelected===!0);var m=e.positions.filter(_=>_.isSelected===!0);if(m.length==1&&(B=m[0].name),e.hasOwnProperty("nationalities")&&c.length==1&&(D=c[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(_=>_.type==="onFiltersElegibility");a!=-1?this.arrayFiltersPlays[a].name="Elegibles":this.arrayFiltersPlays.push({name:"Elegibles",type:"onFiltersElegibility"})}else{var a=this.arrayFiltersPlays.findIndex(p=>p.type==="onFiltersElegibility");this.arrayFiltersPlays.splice(a,1)}if(this.fVsetPositionsIds.length!=9&&this.fVsetPositionsIds.length>0){var v=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersPosition");v!=-1?this.fVsetPositionsIds.length>0?this.arrayFiltersPlays[v].name=this.fVsetPositionsIds.length>1?this.fVsetPositionsIds.length+" Posiciones de juego":"Posicion de juego "+B:this.arrayFiltersPlays.splice(v,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 f=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersYear");f!=-1?this.arrayFiltersPlays[f].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 n=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersAge");n!=-1?this.fVarrayAgeRange.length>0?this.arrayFiltersPlays[n].name=this.fVarrayAgeRange[0]!=this.fVarrayAgeRange[1]?this.fVarrayAgeRange[0]+" - "+this.fVarrayAgeRange[1]+" años":this.fVarrayAgeRange[1]+" años":this.arrayFiltersPlays.splice(n,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 n=this.arrayFiltersPlays.findIndex(p=>p.type==="onFiltersAge");n!=-1&&this.arrayFiltersPlays.splice(n,1)}if(e.hasOwnProperty("nationalities")&&this.fVnationalities.size!=e.nationalities.length&&this.fVnationalities.size>0){var y=this.arrayFiltersPlays.findIndex(_=>_.type==="onFiltersNationality");y!=-1?this.fVnationalities.size>0?this.arrayFiltersPlays[y].name=this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+D:this.arrayFiltersPlays.splice(y,1):this.arrayFiltersPlays.push({name:this.fVnationalities.size>1?this.fVnationalities.size+" Nacionalidades":"Nacionalidad "+D,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 r=await this.fetchTeamsScouting(this.currentSeasonId);this.teamsscouting=[];for(let i=0;i<r.teams.length;i++)this.teamsscouting.push({id:r.teams[i].team_id,team:r.teams[i].colloquial_name,logo:r.teams[i].logo});setTimeout(()=>{this.modifidFiltersFlag=!1},200),this.resetFilterTeamAndPlayers()}},resetPredefinedTeamAll(){var e=this.arrayFiltersPlays.findIndex(i=>i.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 i=0;i<this.categoriesDefault.length;i++)this.categoriesDefault[i].isSelected=!1;this.updateFilterPlaytypesGolstats+=1;var r=this.arrayFiltersPlays.findIndex(i=>i.type==="onFiltersPredefined");if(r!==-1){for(let i=0;i<this.FVfilterGolstats.length;i++)this.FVfilterGolstats[i].isSelected=!1;r!==-1&&this.arrayFiltersPlays.splice(r,1),this.updateFilterGolstats+=1}}},changeTabsSubmenu(e){e!="Predeterminados"?this.resetPredefinedTeamAll():this.arrayFiltersPlays=[],this.optionSelectedSubmenu=e},async fetchTournaments(){const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.get(this.tournamentsUrl);return r},async fetchTeams(){const e=$c.create({headers:{Authorization:`${this.token}`}}),{data:r}=await e.get(this.teamsUrl+this.seasonActive);return r},async fetchTeamsScouting(e){const r=$c.create({headers:{Authorization:`${this.token}`}}),{data:i}=await r.get(this.teamsUrl+e);return i},async getPredefinedfilters(e){this.arrayPredefinedFilters=[],this.arrayPredefinedOrigin=[];var r="";e.id==1?r=this.urlFilter:r=this.urlFilter;const i=$c.create({headers:{Authorization:`${this.token}`}}),{data:B}=await i.get(r+e.id);if(Object.keys(B[0].match_lapse_combinations).forEach(y=>{this.predefinedFiltersMatchLapse[y.toString()]=B[0].match_lapse_combinations[y]}),Object.keys(B[0].playing_as_combinations).forEach(y=>{this.predefinedFiltersPlayingAs[y.toString()]=B[0].playing_as_combinations[y]}),Object.keys(B[0].field_sections_combinations).forEach(y=>{this.predefinedFiltersSections[y.toString()]=B[0].field_sections_combinations[y]}),B[0]){for(let y=0;y<B[0].filter_records.length;y++){var D=B[0].description;if(B[0].filter_records[y].field_sections!==void 0){const p=B[0].filter_records[y].field_sections.toString();(this.predefinedFiltersSections[p]||this.predefinedFiltersSections[p]=="")&&(this.predefinedFiltersSections[p]==""?D=D.replace(" [en {field_sections}]",this.predefinedFiltersSections[p]):D=D.replace("{field_sections}",this.predefinedFiltersSections[p]))}if(B[0].filter_records[y].match_lapse!==void 0){const p=B[0].filter_records[y].match_lapse.toString();(this.predefinedFiltersMatchLapse[p]||this.predefinedFiltersMatchLapse[p]=="")&&(this.predefinedFiltersMatchLapse[p]==""?D=D.replace(" [durante {match_lapse}]",this.predefinedFiltersMatchLapse[p]):D=D.replace("{match_lapse}",this.predefinedFiltersMatchLapse[p]))}if(B[0].filter_records[y].playing_as!==void 0){const p=B[0].filter_records[y].playing_as.toString();(this.predefinedFiltersPlayingAs[p]||this.predefinedFiltersPlayingAs[p]=="")&&(this.predefinedFiltersPlayingAs[p]==""?D=D.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[p]):D=D.replace("{playing_as}",this.predefinedFiltersPlayingAs[p]))}B[0].filter_records[y].section_type!==void 0&&(this.optionSelected=="Jugadores"?D=D.replace("{section_type}","Jugadores"):D=D.replace("{section_type}","Equipos")),D=D.replace(/\[/g,""),D=D.replace(/\]/g,""),D=D.replace("{category_name}",B[0].category_name);const _=D.split(": ");var c=_[1];c.length>129&&this.windowWidth>1358&&(c=c.substring(0,129),c=c+"<span id='showIDtootip' class='dots' style='width: 100px; height: 20px; background: red; z-index: 6;'>...</span>"),(!this.isCup||B[0].filter_records[y].playing_as.length===2)&&this.arrayPredefinedFilters.push({id:y,category_name:e.name,id_category:B[0].id,title:_[0]+":",text:_[1],textOrigin:B[0].description,titledots:c,filtersPredefined:{matchResult:B[0].filter_records[y].match_result,playingAs:B[0].filter_records[y].playing_as,sections:B[0].filter_records[y].match_lapse,type:this.optionSelected=="Equipos"?2:1,typeZone:B[0].type_zone,zone:B[0].filter_records[y].field_sections,end_age:0,start_age:0,nationalities:[],elegible:[],positions:[]}})}var m=[];for(let y=0;y<this.arrayPredefinedFilters.length;y++){var a=0,v=new Set,f={},n=this.arrayPredefinedFilters[y].text.replace(/\*.*?\*/,"");if(n=n.replace(/\*/g,""),n=n.replace(/ +/g," "),this.arrayPredefinedFilters[y].filtersPredefined.elegible.length>0&&(a+=1),(this.arrayPredefinedFilters[y].filtersPredefined.end_age.length!=0||this.arrayPredefinedFilters[y].filtersPredefined.start_age.length!=0)&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.end_age!=0&&this.arrayPredefinedFilters[y].filtersPredefined.start_age!=0?f.arrayAgeRange=[this.arrayPredefinedFilters[y].filtersPredefined.start_age,this.arrayPredefinedFilters[y].filtersPredefined.end_age]:this.arrayPredefinedFilters[y].filtersPredefined.end_age==0&&this.arrayPredefinedFilters[y].filtersPredefined.start_age==0?f.arrayAgeRange=[1,60]:this.arrayPredefinedFilters[y].filtersPredefined.start_age!=0&&this.arrayPredefinedFilters[y].filtersPredefined.end_age==0?f.arrayAgeRange=[this.arrayPredefinedFilters[y].filtersPredefined.start_age,60]:f.arrayAgeRange=[1,this.arrayPredefinedFilters[y].filtersPredefined.end_age],this.arrayPredefinedFilters[y].filtersPredefined.matchResult.length!=3&&(a+=1),f.matchResult=this.arrayPredefinedFilters[y].filtersPredefined.matchResult,this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length>0&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length!=0){for(let _=0;_<this.arrayPredefinedFilters[y].filtersPredefined.nationalities.length;_++)v.add(this.arrayPredefinedFilters[y].filtersPredefined.nationalities[_]);f.setNationalitiesIds=v}else v.add(138),v.add(222),v.add(163),v.add(51),v.add(226),v.add(10),v.add(223),v.add(96),v.add(171),v.add(198),v.add(105),v.add(80),v.add(29),v.add(74),v.add(216),v.add(196),v.add(64),v.add(155),v.add(156),v.add(89),v.add(106),v.add(81),v.add(233),v.add(204),f.setNationalitiesIds=v;this.arrayPredefinedFilters[y].filtersPredefined.playingAs.length!=2&&(a+=1),f.playingAs=this.arrayPredefinedFilters[y].filtersPredefined.playingAs,this.arrayPredefinedFilters[y].filtersPredefined.positions.length>0&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.positions.length>0?f.setPositionsIds=this.arrayPredefinedFilters[y].filtersPredefined.positions:f.setPositionsIds=[1,2,3,4,5,6,7,8,9],this.arrayPredefinedFilters[y].filtersPredefined.sections.length!=6&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.sections.length>0?f.sections=this.arrayPredefinedFilters[y].filtersPredefined.sections:f.sections=[1,2,3,4,5,6],this.arrayPredefinedFilters[y].filtersPredefined.zone.length!=16&&(a+=1),this.arrayPredefinedFilters[y].filtersPredefined.zone.length>0?f.zone=this.arrayPredefinedFilters[y].filtersPredefined.zone:f.zone=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],f.typeZone=this.arrayPredefinedFilters[y].filtersPredefined.typeZone,m.push({id:y+1,name:n,isSelected:!1,value:a,filters:f})}this.FVfilterGolstats=m,this.updateFilterGolstats+=1,this.arrayPredefinedOrigin=JSON.parse(JSON.stringify(this.arrayPredefinedFilters))}},getTextFilterPredefinedCustom(){this.setDinamicFilters(this.filterEmitAux);var e=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].textOrigin;const r=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.zone.sort((n,y)=>n-y).toString();this.predefinedFiltersSections[r]||this.predefinedFiltersSections[r]==""?this.predefinedFiltersSections[r]==""?e=e.replace(" [en {field_sections}]",this.predefinedFiltersSections[r]):e=e.replace("{field_sections}",this.predefinedFiltersSections[r]):e=e.replace("{field_sections}",this.predefinedFiltersSections.other);var i=!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?(i=!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?(i||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 D="";B.includes(1)&&(D=D+"0-15, "),B.includes(2)&&(D=D+"16-30, "),B.includes(3)&&(D=D+"31-45, "),B.includes(4)&&(D=D+"46-60, "),B.includes(5)&&(D=D+"61-75, "),B.includes(6)&&(D=D+"76-90, "),D=D.slice(0,-2),D=D.replace(/,([^,]*)$/," y $1"),e=e.replace("{match_lapse_selected}",D)}const c=this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].filtersPredefined.playingAs.sort().toString();(this.predefinedFiltersPlayingAs[c]||this.predefinedFiltersPlayingAs[c]=="")&&(this.predefinedFiltersPlayingAs[c]==""?e=e.replace(" [jugando como {playing_as}]",this.predefinedFiltersPlayingAs[c]):e=e.replace("{playing_as}",this.predefinedFiltersPlayingAs[c])),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 m=e.split(": ");let a=m[1].charAt(0).toUpperCase()+m[1].toLowerCase().slice(1),v=m[1].charAt(0).toUpperCase()+m[1].toLowerCase().slice(1);this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].text=a,this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].title=m[0]+":";const f=v.match(/\*/g);if(f&&f.length)if(f.length%2===0)for(let n=1;n<=f.length;n++)n%2===0||(v=v.replace("*",'<span style="color: #ffff03" >'));else v=v.replaceAll("*","");this.arrayPredefinedFilters[this.indexPredefinedFiltersSelected].titledots=v},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{const e=$c.create({headers:{"Content-Type":"application/json"}});e.interceptors.request.use(i=>(delete i.headers.Authorization,i));const r=await e.get("https://golstats-microservices.s3.us-west-2.amazonaws.com/eligibles/elegibles.json",{headers:{"Content-Type":"application/json"}});this.elegibilidadArray=r.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)}}},iLt={ref:"myDivRefTopsFull"},oLt={key:0,class:"overlay-loading"},sLt=[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)],lLt=[t.createElementVNode("img",{src:"https://az755631.vo.msecnd.net/todoelfut/icn_close.png",style:{width:"10px"}},null,-1)],cLt={key:0,class:"cont-leyemd-multipleleagues"},dLt=t.createElementVNode("img",{class:"img-leyemd-multipleleagues",src:"http://golstatsimages.blob.core.windows.net/images-library/icn-multiples-ligas.png"},null,-1),uLt={key:0,style:{"margin-left":"10px"}},hLt=t.createElementVNode("span",null,"Tipo de Jugada",-1),pLt=t.createElementVNode("span",null,"Filtro GolStats",-1),fLt={key:3,style:{width:"100%",height:"295px"}};function mLt(e,r,i,B,D,c){t.resolveComponent("GSCTournamentSelect"),t.resolveComponent("GSCSeasonSelect");const m=t.resolveComponent("GscSwitchComponent"),a=t.resolveComponent("GSCFilterperteam"),v=t.resolveComponent("GSCFilters"),f=t.resolveComponent("GSCLabel"),n=t.resolveComponent("GSCTopCategory"),y=t.resolveComponent("GSCTableHeader"),_=t.resolveComponent("GSCRowTable"),p=t.resolveComponent("GSCExpandedInfo");return t.openBlock(),t.createElementBlock("div",iLt,[D.loadingActive?(t.openBlock(),t.createElementBlock("div",oLt,sLt)):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)},[D.optionSelected!="Scouting"&&D.optionSelected!="Equipos"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[t.createVNode(a,{data:D.teams,"team-id":i.teamId,"background-color":"#172531","contain-border-radius":"8px",onClickTeam:c.clickTeam,onClickAll:c.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(D.showfiltersPc?"":B.elementSize.width>760?"display: none;":"")},[t.createElementVNode("div",{class:t.normalizeClass(e.menuSectionClass),id:"menu-section"},[B.elementSize.width>760&&D.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.closeFiltersPc),onClick:r[1]||(r[1]=(...l)=>c.clickCloseFilters&&c.clickCloseFilters(...l))},lLt,2)):t.createCommentVNode("",!0),D.optionSelected!=="Scouting"?(t.openBlock(),t.createBlock(m,{key:1,type:2,buttons:["Todas las jugadas","Predeterminados"],"font-family":"Poppins-Regular","selected-option":D.optionSelectedSubmenu,"font-size":e.sizeTabsFontMS,width:e.sizeTabsMS,arrow:!1,borderWidth:"1px","background-option-active":"#172531",background:"#172531",height:"28px",onInput:c.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(D.optionSelected==="Scouting"?"margin-top: 4%; margin-left: 1%":""),onClick:r[3]||(r[3]=(...l)=>c.openMenuFilters&&c.openMenuFilters(...l))},null,6),[[t.vShow,B.elementSize.width<760&&D.openMenuMobil]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.containerMenuClass),id:"container-menu"},[D.optionSelectedSubmenu=="Todas las jugadas"&&D.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(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PLAYS,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersPlays,filters:D.categoriesPlaysTypes,onApply:c.applyFiltersBtn}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters","onApply"]),[[t.vShow,!D.showFullTable]]),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{key:D.updateFilterField,"filter-type":D.filtersTypes.FIELD,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersField,filters:D.fVzone}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.DETAILS,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersDetails,filters:D.detailsObject}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"]),D.optionSelected==="Jugadores"?(t.openBlock(),t.createBlock(v,t.mergeProps({key:0,ref:"personalDataFilterPlayers","button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:i.seasonActive,tournamentId:D.tournamentSelectedObj.value},token:D.token,"onUpdate:filters":c.onFiltersData}),null,16,["button-filter-props","filter-type","season","token","onUpdate:filters"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),D.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(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.TOURNAMENTS,"show-badge-on-filter-full":!1,filters:D.tournamentsToFilter,key:D.keyTournamentValue,"onUpdate:filters":c.onFiltersTournaments}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters"])),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PERSONAL_DATA,"show-badge-on-filter-full":!1,season:{id:D.filterScounting.seasonId,tournamentId:D.filterScounting.tournaments[0]},ref:"personalDataFilter","onUpdate:filters":c.onFiltersPersonalData}),null,16,["button-filter-props","filter-type","season","onUpdate:filters"]),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.UNIVERSE,"show-badge-on-filter-full":!1,filters:D.universeData,"onUpdate:filters":c.onFiltersUniverse}),null,16,["button-filter-props","filter-type","filters","onUpdate:filters"]),t.createVNode(v,t.mergeProps({"button-filter-props":c.filterButtonProps},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.PRODUCTIVITY,"show-badge-on-filter-full":!1,"onUpdate:filters":c.onFiltersProductivity,filters:D.detaildProductivityCategories}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.BtnSearchScountingcom),onClick:r[4]||(r[4]=(...l)=>c.getScoutingData&&c.getScoutingData(...l))},"Buscar",2)],64)):t.createCommentVNode("",!0),D.optionSelectedSubmenu=="Predeterminados"&&D.optionSelected!="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModePropsTypePlays,{"filter-type":D.filtersTypes.PLAYS_TYPES,"show-badge-on-filter-full":!1,key:D.updateFilterPlaytypesGolstats,"onUpdate:filters":c.onFiltersPlaysTypes,filters:D.categoriesDefault}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"])),(t.openBlock(),t.createBlock(v,t.mergeProps({"button-filter-props":c.filterButtonProps,modalHeight:"300px"},B.elementSize.width<420?D.expansionPanelModePropsMobil270:B.elementSize.width<760?D.expansionPanelModePropsMobil:D.expansionPanelModeProps,{"filter-type":D.filtersTypes.GOLSTATS,"show-badge-on-filter-full":!1,key:D.updateFilterGolstats,"onUpdate:filters":c.onFiltersGolStats,filters:c.filterGolstats}),null,16,["button-filter-props","filter-type","onUpdate:filters","filters"]))],64)):t.createCommentVNode("",!0)],2),[[t.vShow,B.elementSize.width>760||D.openMenuMobil]]),D.optionSelected=="Scouting"?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.teamBar),id:"team-bar"},[D.filterScounting.tournaments.length>1&&D.rowScoutingData.length>0?(t.openBlock(),t.createElementBlock("div",cLt,[dLt,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:D.teamsscouting,"team-id":D.teamselectrec,"background-color":"#172531","contain-border-radius":"8px",key:D.updateFilterTeamsScouting,onClickTeam:c.clickTeamScouting,onClickAll:c.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)},[D.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.commejoresJugadoresClass)},[D.arrayFiltersPlays.length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.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),D.optionSelected!="Scouting"&&D.optionSelectedSubmenu!="Predeterminados"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[D.showFullTable?(t.openBlock(),t.createElementBlock("div",uLt,[t.createVNode(f,{"text-value":"Categoría - "+D.categoryName+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:c.deleteCategoryFilter,icon:"https://az755631.vo.msecnd.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(D.arrayFiltersPlays,(l,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,style:{"margin-left":"10px"}},[t.createVNode(f,{"text-value":l.name+" ","font-size":"11px","font-color":"rgba(255, 255, 255, 0.7)",onClickClose:c.deleteLabelFilter,id:l.type,icon:"https://az755631.vo.msecnd.net/todoelfut/icn_close.png","icon-size":"6px",height:B.elementSize.width<768?"auto":"20px"},null,8,["text-value","onClickClose","id","height"])]))),128)),D.rowScoutingData.length!=0||D.optionSelectedSubmenu=="Predeterminados"&&D.arrayFiltersPlays.findIndex(l=>l.type==="onFiltersPredefined")!==-1?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.comquitarFiltrosClass),onClick:r[5]||(r[5]=(...l)=>c.onClickDeleteFilter&&c.onClickDeleteFilter(...l))}," Quitar filtros ",2)):t.createCommentVNode("",!0),t.createCommentVNode("",!0)],2),i.seasonActive!=0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.containerTablesClass),id:"container-tables",style:t.normalizeStyle(D.showFullTable?"gap: 0px!important;":"")},[D.optionSelected!=="Scouting"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.optionSelectedSubmenu=="Todas las jugadas"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.categoriesDefault,(l,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,style:t.normalizeStyle(!D.showOnlyCategories&&D.arrayCategoryFilter.includes(l.id)?"":"display:none !important;")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.toniKroosWrapperClass)},[(t.openBlock(),t.createBlock(n,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"is-team":D.isTeam,onMore:c.onShowFullTable,"border-width":0,onIntervalidtops:c.intervalidtops,"can-play-videos":i.canPlayVideos,"border-radius":"12px","game-id":i.gameId,game:i.game,typeData:i.typeData,"filters-prop":c.filterChange,category:l.id,"type-table":D.typeTable,categoryName:l.name,"season-selected":i.seasonSelected,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTables,onClickprofile:c.clickprofile,onSetopenmedia:c.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,!D.showOnlyCategories&&D.arrayCategoryFilter.includes(l.id)&&!D.showFullTable]])],4))),128)),D.showFullTable?(t.openBlock(),t.createBlock(n,{"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"is-team":D.isTeam,"is-widget":i.isWidget,"team-widget":i.teamWidget,"border-width":0,"border-radius":"12px","game-id":i.gameId,onIntervalidtops:c.intervalidtops,game:i.game,typeData:i.typeData,category:D.showFullCategory,type:1,"type-table":D.typeTable,categoryName:"","filters-prop":c.filterChange,"season-selected":i.seasonSelected,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTablesfull,onClickprofile:c.clickprofile,onSetopenmedia:c.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},[D.categoryPredefinedActive?(t.openBlock(),t.createBlock(n,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"is-team":D.isTeam,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,onIntervalidtops:c.intervalidtops,"border-width":0,"border-radius":"12px","can-play-videos":i.canPlayVideos,"game-id":i.gameId,game:i.game,typeData:i.typeData,category:D.categoryPredefined,type:1,"type-table":D.typeTable,categoryName:"","filters-prop":c.filterChangePredefined,"season-selected":i.seasonSelected,season:i.seasonActive,"filter-team":i.teamselect,key:D.updateTables,onClickprofile:c.clickprofile,onSetopenmedia:c.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)},[D.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)},[D.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)},[D.arrayFiltersPlays.length==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[hLt,t.createTextVNode(" y un "),pLt,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)},[D.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(D.rowScoutingData.length>0?"height: auto;":"")},[D.loadingActive?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[D.rowScoutingData.length>0?(t.openBlock(),t.createBlock(y,{key:0,background:"#183143",type:2})):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.rowScoutingData,(l,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[D.teamselectrec==0||D.teamselectrec==l.team_id?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(_,{type:2,"is-expanded":D.playerexpand==l.id&&D.expand,onMediadata:c.setMediaData,data:{position:l.position,player_name:l.player_name,player_photo:l.player_photo,total:l.total,id:l.id,player_age:l.player_age,team_abrev:l.team_abrev,team_logo:l.team_logo,player_position:D.positions[l.player_position-1].fullname,player_country_flag:l.player_country_flag,player_games:l.player_games,player_min:l.player_min,league_name:l.league_name,seasons:l.seasons,season_id:l.season_id},height:"71px",background:o%2===0?i.backgroundOdd:i.backgroundEven,onExpand:c.clickexpand},null,8,["is-expanded","onMediadata","data","background","onExpand"]),D.expand&&D.playerexpand==l.id?(t.openBlock(),t.createBlock(p,{key:0,type:0,"view-effectiveness":!1,viewGoals:!1,additionalClass:"fullTable",data:{teams:l.team_name,age:l.player_age,dataofbirth:l.date,nationality:l.nationality_name,countryFlag:l.player_country_flag,position:D.positions[l.player_position-1].name,games:l.player_games,min:l.player_min,goals:l.total,effectiveness:"-",category:"total",id:l.id},onViewprofile:s=>c.viewprofile(s,l.season_id,l.team_id),background:o%2===0?i.backgroundOdd:i.backgroundEven},null,8,["data","onViewprofile","background"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))),128))],64)),D.rowScoutingData.length==0&&!D.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),D.rowScoutingData.length==0&&!D.loadingActive?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.containerScountingBtncom)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnDeleteAplicacom),onClick:r[6]||(r[6]=(...l)=>c.onClickDeleteFilter&&c.onClickDeleteFilter(...l))}," Eliminar filtros aplicados ",2),D.rowScoutingData.length==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.SearchBtnBarcom),onClick:r[7]||(r[7]=(...l)=>c.getScoutingData&&c.getScoutingData(...l))}," Buscar ",2)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),D.loadingActive?(t.openBlock(),t.createElementBlock("div",fLt)):t.createCommentVNode("",!0)],6))],6)):t.createCommentVNode("",!0)],2)],2)],2)],2)],512)}const gLt=$i(rLt,[["render",mLt],["__cssModules",{$style:aLt}]]),swa="";let Hq=null;const yLt={components:{GSCDatosGSMain:tzt,GSCCheckbox:Hg,GSCRadioToggle:FH,GSCTopFull:gLt},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:()=>({})},game:{type:Object,default:()=>{}},playVideosPrivileges:{type:Object,default:null},canPlayVideos:{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)Hq=new ResizeObserver(()=>{this.widthSection=this.$refs.comparative.clientWidth}),Hq.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)}},vLt=e=>(t.pushScopeId("data-v-4114a187"),e=e(),t.popScopeId(),e),_Lt={class:"container-comparative",ref:"comparative"},bLt={class:"container-btn"},xLt={class:"items-container-btn"},wLt={class:"container-sections"},kLt={key:0,class:"container-teams-menu"},CLt={class:"container-team-menu-home"},SLt=["src"],TLt=vLt(()=>t.createElementVNode("div",{class:"container-team-menu-separator"},null,-1)),ELt={class:"container-team-menu-away"},ALt=["src"],MLt={key:1,class:"container-switch-menu"},ILt={class:"container-leyend"},PLt={class:"container-tops"};function BLt(e,r,i,B,D,c){const m=t.resolveComponent("GSCDatosGSMain"),a=t.resolveComponent("GSCCheckbox"),v=t.resolveComponent("GSCRadioToggle"),f=t.resolveComponent("GSCTopFull");return t.openBlock(),t.createElementBlock("div",_Lt,[t.createElementVNode("div",bLt,[t.createElementVNode("div",xLt,[t.createElementVNode("div",{class:t.normalizeClass([D.widthSection>480?"btn-destacados":"btn-destacados-movil",D.activeSection=="destacados"?"active":""]),onClick:r[0]||(r[0]=n=>c.clickOptSection("destacados"))},[i.game.status==1||i.game.is_live==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.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([D.widthSection>480?"btn-avanced":"btn-avanced-movil",D.activeSection=="avanzado"?"active":""]),onClick:r[1]||(r[1]=n=>c.clickOptSection("avanzado"))}," Avanzado ",2)])]),t.createElementVNode("div",wLt,[D.activeSection=="destacados"?(t.openBlock(),t.createBlock(m,{key:0,"is-widget":i.isWidget,"team-widget":i.teamWidget,"tournament-selected":i.tournamentSelected,"time-live-comparative-best-players":i.timeLiveComparativeBestPlayers,game:i.game,"play-videos-privileges":i.playVideosPrivileges,onOpenmedia:c.openmedia,onIntervalidgs:c.intervalidgs},null,8,["is-widget","team-widget","tournament-selected","time-live-comparative-best-players","game","play-videos-privileges","onOpenmedia","onIntervalidgs"])):t.createCommentVNode("",!0),D.activeSection=="avanzado"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[i.isWidget?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",kLt,[t.createElementVNode("div",CLt,[(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":c.onCheckInactiveHome,"label-color":"#8c9399",width:"25",key:D.updateHomeCheck,"model-value":D.homeTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"])),t.createElementVNode("img",{class:"img-teams-selector-home",width:"23",src:i.game.homeTeam.logo},null,8,SLt),t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>390?"label-team-home":"label-team-home-movil")},t.toDisplayString(i.game.homeTeam.colloquial_name),3)]),TLt,t.createElementVNode("div",ELt,[t.createElementVNode("div",{class:t.normalizeClass(D.widthSection>390?"label-team-away":"label-team-away-movil")},t.toDisplayString(i.game.awayTeam.colloquial_name),3),t.createElementVNode("img",{class:"img-teams-selector-away",width:"23",src:i.game.awayTeam.logo},null,8,ALt),(t.openBlock(),t.createBlock(a,{fontFamily:"Poppins-Regular","onUpdate:modelValue":c.onCheckInactiveAway,"label-color":"#8c9399",width:"25",key:D.updateAwayCheck,"model-value":D.awayTeamCheck,height:"25",style:{"margin-top":"-4px"}},null,8,["onUpdate:modelValue","model-value"]))])])),i.game.is_live||i.game.status===1||i.game.status===0?(t.openBlock(),t.createElementBlock("div",MLt,[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":D.typeViewData==1?"Este partido":"Acumulado",textOptionLeft:"Este partido",textOptionRight:"Acumulado",onChange:c.ChangeRadio},null,8,["value-default","onChange"])])):t.createCommentVNode("",!0),t.createElementVNode("div",ILt,[D.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},[i.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},[i.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",PLt,[t.createVNode(f,{"is-widget":i.isWidget,"team-widget":i.teamWidget,"time-live-comparative-avanced":i.timeLiveComparativeAvanced,"can-play-videos":i.canPlayVideos,onOpenmedia:c.openmedia,onOpenProfileTeam:c.onOpenProfileTeam,onIntervalidtops:c.intervalidtops,onOpenProfilePlayer:c.onOpenProfilePlayer,"type-data":D.typeViewData,"game-id":i.game.gameId,game:i.game,"current-season-id":i.game.seasonId,"team-id":D.teamactive,"season-active":i.game.seasonId,"season-selected":i.seasonSelected,teamselect:D.teamactive},null,8,["is-widget","team-widget","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"])])],64)):t.createCommentVNode("",!0)])],512)}const NLt=$i(yLt,[["render",BLt],["__scopeId","data-v-4114a187"]]);function Wq(e,r){return function(){return e.apply(r,arguments)}}const{toString:zLt}=Object.prototype,{getPrototypeOf:lA}=Object,B5=(e=>r=>{const i=zLt.call(r);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),uf=e=>(e=e.toLowerCase(),r=>B5(r)===e),N5=e=>r=>typeof r===e,{isArray:Jy}=Array,A_=N5("undefined");function OLt(e){return e!==null&&!A_(e)&&e.constructor!==null&&!A_(e.constructor)&&Ah(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qq=uf("ArrayBuffer");function FLt(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&qq(e.buffer),r}const LLt=N5("string"),Ah=N5("function"),Yq=N5("number"),z5=e=>e!==null&&typeof e=="object",DLt=e=>e===!0||e===!1,O5=e=>{if(B5(e)!=="object")return!1;const r=lA(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},RLt=uf("Date"),VLt=uf("File"),$Lt=uf("Blob"),jLt=uf("FileList"),ULt=e=>z5(e)&&Ah(e.pipe),GLt=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||Ah(e.append)&&((r=B5(e))==="formdata"||r==="object"&&Ah(e.toString)&&e.toString()==="[object FormData]"))},HLt=uf("URLSearchParams"),[WLt,qLt,YLt,XLt]=["ReadableStream","Request","Response","Headers"].map(uf),ZLt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function M_(e,r,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let B,D;if(typeof e!="object"&&(e=[e]),Jy(e))for(B=0,D=e.length;B<D;B++)r.call(null,e[B],B,e);else{const c=i?Object.getOwnPropertyNames(e):Object.keys(e),m=c.length;let a;for(B=0;B<m;B++)a=c[B],r.call(null,e[a],a,e)}}function Xq(e,r){r=r.toLowerCase();const i=Object.keys(e);let B=i.length,D;for(;B-- >0;)if(D=i[B],r===D.toLowerCase())return D;return null}const E1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zq=e=>!A_(e)&&e!==E1;function cA(){const{caseless:e}=Zq(this)&&this||{},r={},i=(B,D)=>{const c=e&&Xq(r,D)||D;O5(r[c])&&O5(B)?r[c]=cA(r[c],B):O5(B)?r[c]=cA({},B):Jy(B)?r[c]=B.slice():r[c]=B};for(let B=0,D=arguments.length;B<D;B++)arguments[B]&&M_(arguments[B],i);return r}const JLt=(e,r,i,{allOwnKeys:B}={})=>(M_(r,(D,c)=>{i&&Ah(D)?e[c]=Wq(D,i):e[c]=D},{allOwnKeys:B}),e),KLt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QLt=(e,r,i,B)=>{e.prototype=Object.create(r.prototype,B),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),i&&Object.assign(e.prototype,i)},eDt=(e,r,i,B)=>{let D,c,m;const a={};if(r=r||{},e==null)return r;do{for(D=Object.getOwnPropertyNames(e),c=D.length;c-- >0;)m=D[c],(!B||B(m,e,r))&&!a[m]&&(r[m]=e[m],a[m]=!0);e=i!==!1&&lA(e)}while(e&&(!i||i(e,r))&&e!==Object.prototype);return r},tDt=(e,r,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=r.length;const B=e.indexOf(r,i);return B!==-1&&B===i},aDt=e=>{if(!e)return null;if(Jy(e))return e;let r=e.length;if(!Yq(r))return null;const i=new Array(r);for(;r-- >0;)i[r]=e[r];return i},nDt=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&lA(Uint8Array)),rDt=(e,r)=>{const i=(e&&e[Symbol.iterator]).call(e);let B;for(;(B=i.next())&&!B.done;){const D=B.value;r.call(e,D[0],D[1])}},iDt=(e,r)=>{let i;const B=[];for(;(i=e.exec(r))!==null;)B.push(i);return B},oDt=uf("HTMLFormElement"),sDt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,B){return i.toUpperCase()+B}),Jq=(({hasOwnProperty:e})=>(r,i)=>e.call(r,i))(Object.prototype),lDt=uf("RegExp"),Kq=(e,r)=>{const i=Object.getOwnPropertyDescriptors(e),B={};M_(i,(D,c)=>{let m;(m=r(D,c,e))!==!1&&(B[c]=m||D)}),Object.defineProperties(e,B)},cDt=e=>{Kq(e,(r,i)=>{if(Ah(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const B=e[i];if(Ah(B)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},dDt=(e,r)=>{const i={},B=D=>{D.forEach(c=>{i[c]=!0})};return Jy(e)?B(e):B(String(e).split(r)),i},uDt=()=>{},hDt=(e,r)=>e!=null&&Number.isFinite(e=+e)?e:r,dA="abcdefghijklmnopqrstuvwxyz",Qq="0123456789",eY={DIGIT:Qq,ALPHA:dA,ALPHA_DIGIT:dA+dA.toUpperCase()+Qq},pDt=(e=16,r=eY.ALPHA_DIGIT)=>{let i="";const{length:B}=r;for(;e--;)i+=r[Math.random()*B|0];return i};function fDt(e){return!!(e&&Ah(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mDt=e=>{const r=new Array(10),i=(B,D)=>{if(z5(B)){if(r.indexOf(B)>=0)return;if(!("toJSON"in B)){r[D]=B;const c=Jy(B)?[]:{};return M_(B,(m,a)=>{const v=i(m,D+1);!A_(v)&&(c[a]=v)}),r[D]=void 0,c}}return B};return i(e,0)},gDt=uf("AsyncFunction"),yDt=e=>e&&(z5(e)||Ah(e))&&Ah(e.then)&&Ah(e.catch),tY=((e,r)=>e?setImmediate:r?((i,B)=>(E1.addEventListener("message",({source:D,data:c})=>{D===E1&&c===i&&B.length&&B.shift()()},!1),D=>{B.push(D),E1.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ah(E1.postMessage)),vDt=typeof queueMicrotask<"u"?queueMicrotask.bind(E1):typeof process<"u"&&process.nextTick||tY,yr={isArray:Jy,isArrayBuffer:qq,isBuffer:OLt,isFormData:GLt,isArrayBufferView:FLt,isString:LLt,isNumber:Yq,isBoolean:DLt,isObject:z5,isPlainObject:O5,isReadableStream:WLt,isRequest:qLt,isResponse:YLt,isHeaders:XLt,isUndefined:A_,isDate:RLt,isFile:VLt,isBlob:$Lt,isRegExp:lDt,isFunction:Ah,isStream:ULt,isURLSearchParams:HLt,isTypedArray:nDt,isFileList:jLt,forEach:M_,merge:cA,extend:JLt,trim:ZLt,stripBOM:KLt,inherits:QLt,toFlatObject:eDt,kindOf:B5,kindOfTest:uf,endsWith:tDt,toArray:aDt,forEachEntry:rDt,matchAll:iDt,isHTMLForm:oDt,hasOwnProperty:Jq,hasOwnProp:Jq,reduceDescriptors:Kq,freezeMethods:cDt,toObjectSet:dDt,toCamelCase:sDt,noop:uDt,toFiniteNumber:hDt,findKey:Xq,global:E1,isContextDefined:Zq,ALPHABET:eY,generateString:pDt,isSpecCompliantForm:fDt,toJSONObject:mDt,isAsyncFn:gDt,isThenable:yDt,setImmediate:tY,asap:vDt};function ns(e,r,i,B,D){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),i&&(this.config=i),B&&(this.request=B),D&&(this.response=D,this.status=D.status?D.status:null)}yr.inherits(ns,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:yr.toJSONObject(this.config),code:this.code,status:this.status}}});const aY=ns.prototype,nY={};["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=>{nY[e]={value:e}}),Object.defineProperties(ns,nY),Object.defineProperty(aY,"isAxiosError",{value:!0}),ns.from=(e,r,i,B,D,c)=>{const m=Object.create(aY);return yr.toFlatObject(e,m,function(a){return a!==Error.prototype},a=>a!=="isAxiosError"),ns.call(m,e.message,r,i,B,D),m.cause=e,m.name=e.name,c&&Object.assign(m,c),m};const _Dt=null;function uA(e){return yr.isPlainObject(e)||yr.isArray(e)}function rY(e){return yr.endsWith(e,"[]")?e.slice(0,-2):e}function iY(e,r,i){return e?e.concat(r).map(function(B,D){return B=rY(B),!i&&D?"["+B+"]":B}).join(i?".":""):r}function bDt(e){return yr.isArray(e)&&!e.some(uA)}const xDt=yr.toFlatObject(yr,{},null,function(e){return/^is[A-Z]/.test(e)});function F5(e,r,i){if(!yr.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,i=yr.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,l){return!yr.isUndefined(l[p])});const B=i.metaTokens,D=i.visitor||f,c=i.dots,m=i.indexes,a=(i.Blob||typeof Blob<"u"&&Blob)&&yr.isSpecCompliantForm(r);if(!yr.isFunction(D))throw new TypeError("visitor must be a function");function v(p){if(p===null)return"";if(yr.isDate(p))return p.toISOString();if(!a&&yr.isBlob(p))throw new ns("Blob is not supported. Use a Buffer instead.");return yr.isArrayBuffer(p)||yr.isTypedArray(p)?a&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,l,o){let s=p;if(p&&!o&&typeof p=="object"){if(yr.endsWith(l,"{}"))l=B?l:l.slice(0,-2),p=JSON.stringify(p);else if(yr.isArray(p)&&bDt(p)||(yr.isFileList(p)||yr.endsWith(l,"[]"))&&(s=yr.toArray(p)))return l=rY(l),s.forEach(function(u,d){!(yr.isUndefined(u)||u===null)&&r.append(m===!0?iY([l],d,c):m===null?l:l+"[]",v(u))}),!1}return uA(p)?!0:(r.append(iY(o,l,c),v(p)),!1)}const n=[],y=Object.assign(xDt,{defaultVisitor:f,convertValue:v,isVisitable:uA});function _(p,l){if(!yr.isUndefined(p)){if(n.indexOf(p)!==-1)throw Error("Circular reference detected in "+l.join("."));n.push(p),yr.forEach(p,function(o,s){(!(yr.isUndefined(o)||o===null)&&D.call(r,o,yr.isString(s)?s.trim():s,l,y))===!0&&_(o,l?l.concat(s):[s])}),n.pop()}}if(!yr.isObject(e))throw new TypeError("data must be an object");return _(e),r}function oY(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return r[i]})}function hA(e,r){this._pairs=[],e&&F5(e,this,r)}const sY=hA.prototype;sY.append=function(e,r){this._pairs.push([e,r])},sY.toString=function(e){const r=e?function(i){return e.call(this,i,oY)}:oY;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function wDt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lY(e,r,i){if(!r)return e;const B=i&&i.encode||wDt,D=i&&i.serialize;let c;if(D?c=D(r,i):c=yr.isURLSearchParams(r)?r.toString():new hA(r,i).toString(B),c){const m=e.indexOf("#");m!==-1&&(e=e.slice(0,m)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class cY{constructor(){this.handlers=[]}use(r,i,B){return this.handlers.push({fulfilled:r,rejected:i,synchronous:B?B.synchronous:!1,runWhen:B?B.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){yr.forEach(this.handlers,function(i){i!==null&&r(i)})}}const dY={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kDt=typeof URLSearchParams<"u"?URLSearchParams:hA,CDt=typeof FormData<"u"?FormData:null,SDt=typeof Blob<"u"?Blob:null,TDt={isBrowser:!0,classes:{URLSearchParams:kDt,FormData:CDt,Blob:SDt},protocols:["http","https","file","blob","url","data"]},pA=typeof window<"u"&&typeof document<"u",fA=typeof navigator=="object"&&navigator||void 0,EDt=pA&&(!fA||["ReactNative","NativeScript","NS"].indexOf(fA.product)<0),ADt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MDt=pA&&window.location.href||"http://localhost",IDt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pA,hasStandardBrowserEnv:EDt,hasStandardBrowserWebWorkerEnv:ADt,navigator:fA,origin:MDt},Symbol.toStringTag,{value:"Module"})),Mh={...IDt,...TDt};function PDt(e,r){return F5(e,new Mh.classes.URLSearchParams,Object.assign({visitor:function(i,B,D,c){return Mh.isNode&&yr.isBuffer(i)?(this.append(B,i.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},r))}function BDt(e){return yr.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function NDt(e){const r={},i=Object.keys(e);let B;const D=i.length;let c;for(B=0;B<D;B++)c=i[B],r[c]=e[c];return r}function uY(e){function r(i,B,D,c){let m=i[c++];if(m==="__proto__")return!0;const a=Number.isFinite(+m),v=c>=i.length;return m=!m&&yr.isArray(D)?D.length:m,v?(yr.hasOwnProp(D,m)?D[m]=[D[m],B]:D[m]=B,!a):((!D[m]||!yr.isObject(D[m]))&&(D[m]=[]),r(i,B,D[m],c)&&yr.isArray(D[m])&&(D[m]=NDt(D[m])),!a)}if(yr.isFormData(e)&&yr.isFunction(e.entries)){const i={};return yr.forEachEntry(e,(B,D)=>{r(BDt(B),D,i,0)}),i}return null}function zDt(e,r,i){if(yr.isString(e))try{return(r||JSON.parse)(e),yr.trim(e)}catch(B){if(B.name!=="SyntaxError")throw B}return(i||JSON.stringify)(e)}const I_={transitional:dY,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const i=r.getContentType()||"",B=i.indexOf("application/json")>-1,D=yr.isObject(e);if(D&&yr.isHTMLForm(e)&&(e=new FormData(e)),yr.isFormData(e))return B?JSON.stringify(uY(e)):e;if(yr.isArrayBuffer(e)||yr.isBuffer(e)||yr.isStream(e)||yr.isFile(e)||yr.isBlob(e)||yr.isReadableStream(e))return e;if(yr.isArrayBufferView(e))return e.buffer;if(yr.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(D){if(i.indexOf("application/x-www-form-urlencoded")>-1)return PDt(e,this.formSerializer).toString();if((c=yr.isFileList(e))||i.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return F5(c?{"files[]":e}:e,m&&new m,this.formSerializer)}}return D||B?(r.setContentType("application/json",!1),zDt(e)):e}],transformResponse:[function(e){const r=this.transitional||I_.transitional,i=r&&r.forcedJSONParsing,B=this.responseType==="json";if(yr.isResponse(e)||yr.isReadableStream(e))return e;if(e&&yr.isString(e)&&(i&&!this.responseType||B)){const D=!(r&&r.silentJSONParsing)&&B;try{return JSON.parse(e)}catch(c){if(D)throw c.name==="SyntaxError"?ns.from(c,ns.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mh.classes.FormData,Blob:Mh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};yr.forEach(["delete","get","head","post","put","patch"],e=>{I_.headers[e]={}});const ODt=yr.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"]),FDt=e=>{const r={};let i,B,D;return e&&e.split(`
|
|
4163
4163
|
`).forEach(function(c){D=c.indexOf(":"),i=c.substring(0,D).trim().toLowerCase(),B=c.substring(D+1).trim(),!(!i||r[i]&&ODt[i])&&(i==="set-cookie"?r[i]?r[i].push(B):r[i]=[B]:r[i]=r[i]?r[i]+", "+B:B)}),r},hY=Symbol("internals");function P_(e){return e&&String(e).trim().toLowerCase()}function L5(e){return e===!1||e==null?e:yr.isArray(e)?e.map(L5):String(e)}function LDt(e){const r=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let B;for(;B=i.exec(e);)r[B[1]]=B[2];return r}const DDt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mA(e,r,i,B,D){if(yr.isFunction(B))return B.call(this,r,i);if(D&&(r=i),!!yr.isString(r)){if(yr.isString(B))return r.indexOf(B)!==-1;if(yr.isRegExp(B))return B.test(r)}}function RDt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,i,B)=>i.toUpperCase()+B)}function VDt(e,r){const i=yr.toCamelCase(" "+r);["get","set","has"].forEach(B=>{Object.defineProperty(e,B+i,{value:function(D,c,m){return this[B].call(this,r,D,c,m)},configurable:!0})})}class ch{constructor(r){r&&this.set(r)}set(r,i,B){const D=this;function c(a,v,f){const n=P_(v);if(!n)throw new Error("header name must be a non-empty string");const y=yr.findKey(D,n);(!y||D[y]===void 0||f===!0||f===void 0&&D[y]!==!1)&&(D[y||v]=L5(a))}const m=(a,v)=>yr.forEach(a,(f,n)=>c(f,n,v));if(yr.isPlainObject(r)||r instanceof this.constructor)m(r,i);else if(yr.isString(r)&&(r=r.trim())&&!DDt(r))m(FDt(r),i);else if(yr.isHeaders(r))for(const[a,v]of r.entries())c(v,a,B);else r!=null&&c(i,r,B);return this}get(r,i){if(r=P_(r),r){const B=yr.findKey(this,r);if(B){const D=this[B];if(!i)return D;if(i===!0)return LDt(D);if(yr.isFunction(i))return i.call(this,D,B);if(yr.isRegExp(i))return i.exec(D);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,i){if(r=P_(r),r){const B=yr.findKey(this,r);return!!(B&&this[B]!==void 0&&(!i||mA(this,this[B],B,i)))}return!1}delete(r,i){const B=this;let D=!1;function c(m){if(m=P_(m),m){const a=yr.findKey(B,m);a&&(!i||mA(B,B[a],a,i))&&(delete B[a],D=!0)}}return yr.isArray(r)?r.forEach(c):c(r),D}clear(r){const i=Object.keys(this);let B=i.length,D=!1;for(;B--;){const c=i[B];(!r||mA(this,this[c],c,r,!0))&&(delete this[c],D=!0)}return D}normalize(r){const i=this,B={};return yr.forEach(this,(D,c)=>{const m=yr.findKey(B,c);if(m){i[m]=L5(D),delete i[c];return}const a=r?RDt(c):String(c).trim();a!==c&&delete i[c],i[a]=L5(D),B[a]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const i=Object.create(null);return yr.forEach(this,(B,D)=>{B!=null&&B!==!1&&(i[D]=r&&yr.isArray(B)?B.join(", "):B)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,i])=>r+": "+i).join(`
|
|
4164
4164
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...i){const B=new this(r);return i.forEach(D=>B.set(D)),B}static accessor(r){const i=(this[hY]=this[hY]={accessors:{}}).accessors,B=this.prototype;function D(c){const m=P_(c);i[m]||(VDt(B,c),i[m]=!0)}return yr.isArray(r)?r.forEach(D):D(r),this}}ch.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),yr.reduceDescriptors(ch.prototype,({value:e},r)=>{let i=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(B){this[i]=B}}}),yr.freezeMethods(ch);function gA(e,r){const i=this||I_,B=r||i,D=ch.from(B.headers);let c=B.data;return yr.forEach(e,function(m){c=m.call(i,c,D.normalize(),r?r.status:void 0)}),D.normalize(),c}function pY(e){return!!(e&&e.__CANCEL__)}function Ky(e,r,i){ns.call(this,e??"canceled",ns.ERR_CANCELED,r,i),this.name="CanceledError"}yr.inherits(Ky,ns,{__CANCEL__:!0});function fY(e,r,i){const B=i.config.validateStatus;!i.status||!B||B(i.status)?e(i):r(new ns("Request failed with status code "+i.status,[ns.ERR_BAD_REQUEST,ns.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function $Dt(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function jDt(e,r){e=e||10;const i=new Array(e),B=new Array(e);let D=0,c=0,m;return r=r!==void 0?r:1e3,function(a){const v=Date.now(),f=B[c];m||(m=v),i[D]=a,B[D]=v;let n=c,y=0;for(;n!==D;)y+=i[n++],n=n%e;if(D=(D+1)%e,D===c&&(c=(c+1)%e),v-m<r)return;const _=f&&v-f;return _?Math.round(y*1e3/_):void 0}}function UDt(e,r){let i=0,B=1e3/r,D,c;const m=(a,v=Date.now())=>{i=v,D=null,c&&(clearTimeout(c),c=null),e.apply(null,a)};return[(...a)=>{const v=Date.now(),f=v-i;f>=B?m(a,v):(D=a,c||(c=setTimeout(()=>{c=null,m(D)},B-f)))},()=>D&&m(D)]}const D5=(e,r,i=3)=>{let B=0;const D=jDt(50,250);return UDt(c=>{const m=c.loaded,a=c.lengthComputable?c.total:void 0,v=m-B,f=D(v),n=m<=a;B=m;const y={loaded:m,total:a,progress:a?m/a:void 0,bytes:v,rate:f||void 0,estimated:f&&a&&n?(a-m)/f:void 0,event:c,lengthComputable:a!=null,[r?"download":"upload"]:!0};e(y)},i)},mY=(e,r)=>{const i=e!=null;return[B=>r[0]({lengthComputable:i,total:e,loaded:B}),r[1]]},gY=e=>(...r)=>yr.asap(()=>e(...r)),GDt=Mh.hasStandardBrowserEnv?function(){const e=Mh.navigator&&/(msie|trident)/i.test(Mh.navigator.userAgent),r=document.createElement("a");let i;function B(D){let c=D;return e&&(r.setAttribute("href",c),c=r.href),r.setAttribute("href",c),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=B(window.location.href),function(D){const c=yr.isString(D)?B(D):D;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}(),HDt=Mh.hasStandardBrowserEnv?{write(e,r,i,B,D,c){const m=[e+"="+encodeURIComponent(r)];yr.isNumber(i)&&m.push("expires="+new Date(i).toGMTString()),yr.isString(B)&&m.push("path="+B),yr.isString(D)&&m.push("domain="+D),c===!0&&m.push("secure"),document.cookie=m.join("; ")},read(e){const r=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function WDt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qDt(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function yY(e,r){return e&&!WDt(r)?qDt(e,r):r}const vY=e=>e instanceof ch?{...e}:e;function A1(e,r){r=r||{};const i={};function B(f,n,y){return yr.isPlainObject(f)&&yr.isPlainObject(n)?yr.merge.call({caseless:y},f,n):yr.isPlainObject(n)?yr.merge({},n):yr.isArray(n)?n.slice():n}function D(f,n,y){if(yr.isUndefined(n)){if(!yr.isUndefined(f))return B(void 0,f,y)}else return B(f,n,y)}function c(f,n){if(!yr.isUndefined(n))return B(void 0,n)}function m(f,n){if(yr.isUndefined(n)){if(!yr.isUndefined(f))return B(void 0,f)}else return B(void 0,n)}function a(f,n,y){if(y in r)return B(f,n);if(y in e)return B(void 0,f)}const v={url:c,method:c,data:c,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:a,headers:(f,n)=>D(vY(f),vY(n),!0)};return yr.forEach(Object.keys(Object.assign({},e,r)),function(f){const n=v[f]||D,y=n(e[f],r[f],f);yr.isUndefined(y)&&n!==a||(i[f]=y)}),i}const _Y=e=>{const r=A1({},e);let{data:i,withXSRFToken:B,xsrfHeaderName:D,xsrfCookieName:c,headers:m,auth:a}=r;r.headers=m=ch.from(m),r.url=lY(yY(r.baseURL,r.url),e.params,e.paramsSerializer),a&&m.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let v;if(yr.isFormData(i)){if(Mh.hasStandardBrowserEnv||Mh.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if((v=m.getContentType())!==!1){const[f,...n]=v?v.split(";").map(y=>y.trim()).filter(Boolean):[];m.setContentType([f||"multipart/form-data",...n].join("; "))}}if(Mh.hasStandardBrowserEnv&&(B&&yr.isFunction(B)&&(B=B(r)),B||B!==!1&&GDt(r.url))){const f=D&&c&&HDt.read(c);f&&m.set(D,f)}return r},YDt=typeof XMLHttpRequest<"u",XDt=YDt&&function(e){return new Promise(function(r,i){const B=_Y(e);let D=B.data;const c=ch.from(B.headers).normalize();let{responseType:m,onUploadProgress:a,onDownloadProgress:v}=B,f,n,y,_,p;function l(){_&&_(),p&&p(),B.cancelToken&&B.cancelToken.unsubscribe(f),B.signal&&B.signal.removeEventListener("abort",f)}let o=new XMLHttpRequest;o.open(B.method.toUpperCase(),B.url,!0),o.timeout=B.timeout;function s(){if(!o)return;const d=ch.from("getAllResponseHeaders"in o&&o.getAllResponseHeaders()),h={data:!m||m==="text"||m==="json"?o.responseText:o.response,status:o.status,statusText:o.statusText,headers:d,config:e,request:o};fY(function(g){r(g),l()},function(g){i(g),l()},h),o=null}"onloadend"in o?o.onloadend=s:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(s)},o.onabort=function(){o&&(i(new ns("Request aborted",ns.ECONNABORTED,e,o)),o=null)},o.onerror=function(){i(new ns("Network Error",ns.ERR_NETWORK,e,o)),o=null},o.ontimeout=function(){let d=B.timeout?"timeout of "+B.timeout+"ms exceeded":"timeout exceeded";const h=B.transitional||dY;B.timeoutErrorMessage&&(d=B.timeoutErrorMessage),i(new ns(d,h.clarifyTimeoutError?ns.ETIMEDOUT:ns.ECONNABORTED,e,o)),o=null},D===void 0&&c.setContentType(null),"setRequestHeader"in o&&yr.forEach(c.toJSON(),function(d,h){o.setRequestHeader(h,d)}),yr.isUndefined(B.withCredentials)||(o.withCredentials=!!B.withCredentials),m&&m!=="json"&&(o.responseType=B.responseType),v&&([y,p]=D5(v,!0),o.addEventListener("progress",y)),a&&o.upload&&([n,_]=D5(a),o.upload.addEventListener("progress",n),o.upload.addEventListener("loadend",_)),(B.cancelToken||B.signal)&&(f=d=>{o&&(i(!d||d.type?new Ky(null,e,o):d),o.abort(),o=null)},B.cancelToken&&B.cancelToken.subscribe(f),B.signal&&(B.signal.aborted?f():B.signal.addEventListener("abort",f)));const u=$Dt(B.url);if(u&&Mh.protocols.indexOf(u)===-1){i(new ns("Unsupported protocol "+u+":",ns.ERR_BAD_REQUEST,e));return}o.send(D||null)})},ZDt=(e,r)=>{let i=new AbortController,B;const D=function(v){if(!B){B=!0,m();const f=v instanceof Error?v:this.reason;i.abort(f instanceof ns?f:new Ky(f instanceof Error?f.message:f))}};let c=r&&setTimeout(()=>{D(new ns(`timeout ${r} of ms exceeded`,ns.ETIMEDOUT))},r);const m=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(v=>{v&&(v.removeEventListener?v.removeEventListener("abort",D):v.unsubscribe(D))}),e=null)};e.forEach(v=>v&&v.addEventListener&&v.addEventListener("abort",D));const{signal:a}=i;return a.unsubscribe=m,[a,()=>{c&&clearTimeout(c),c=null}]},JDt=function*(e,r){let i=e.byteLength;if(!r||i<r){yield e;return}let B=0,D;for(;B<i;)D=B+r,yield e.slice(B,D),B=D},KDt=async function*(e,r,i){for await(const B of e)yield*JDt(ArrayBuffer.isView(B)?B:await i(String(B)),r)},bY=(e,r,i,B,D)=>{const c=KDt(e,r,D);let m=0,a,v=f=>{a||(a=!0,B&&B(f))};return new ReadableStream({async pull(f){try{const{done:n,value:y}=await c.next();if(n){v(),f.close();return}let _=y.byteLength;if(i){let p=m+=_;i(p)}f.enqueue(new Uint8Array(y))}catch(n){throw v(n),n}},cancel(f){return v(f),c.return()}},{highWaterMark:2})},R5=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xY=R5&&typeof ReadableStream=="function",yA=R5&&(typeof TextEncoder=="function"?(e=>r=>e.encode(r))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wY=(e,...r)=>{try{return!!e(...r)}catch{return!1}},QDt=xY&&wY(()=>{let e=!1;const r=new Request(Mh.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!r}),kY=64*1024,vA=xY&&wY(()=>yr.isReadableStream(new Response("").body)),V5={stream:vA&&(e=>e.body)};R5&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(r=>{!V5[r]&&(V5[r]=yr.isFunction(e[r])?i=>i[r]():(i,B)=>{throw new ns(`Response type '${r}' is not supported`,ns.ERR_NOT_SUPPORT,B)})})})(new Response);const eRt=async e=>{if(e==null)return 0;if(yr.isBlob(e))return e.size;if(yr.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(yr.isArrayBufferView(e)||yr.isArrayBuffer(e))return e.byteLength;if(yr.isURLSearchParams(e)&&(e=e+""),yr.isString(e))return(await yA(e)).byteLength},tRt=async(e,r)=>yr.toFiniteNumber(e.getContentLength())??eRt(r),aRt=R5&&(async e=>{let{url:r,method:i,data:B,signal:D,cancelToken:c,timeout:m,onDownloadProgress:a,onUploadProgress:v,responseType:f,headers:n,withCredentials:y="same-origin",fetchOptions:_}=_Y(e);f=f?(f+"").toLowerCase():"text";let[p,l]=D||c||m?ZDt([D,c],m):[],o,s;const u=()=>{!o&&setTimeout(()=>{p&&p.unsubscribe()}),o=!0};let d;try{if(v&&QDt&&i!=="get"&&i!=="head"&&(d=await tRt(n,B))!==0){let x=new Request(r,{method:"POST",body:B,duplex:"half"}),S;if(yr.isFormData(B)&&(S=x.headers.get("content-type"))&&n.setContentType(S),x.body){const[k,T]=mY(d,D5(gY(v)));B=bY(x.body,kY,k,T,yA)}}yr.isString(y)||(y=y?"include":"omit");const h="credentials"in Request.prototype;s=new Request(r,{..._,signal:p,method:i.toUpperCase(),headers:n.normalize().toJSON(),body:B,duplex:"half",credentials:h?y:void 0});let g=await fetch(s);const b=vA&&(f==="stream"||f==="response");if(vA&&(a||b)){const x={};["status","statusText","headers"].forEach(C=>{x[C]=g[C]});const S=yr.toFiniteNumber(g.headers.get("content-length")),[k,T]=a&&mY(S,D5(gY(a),!0))||[];g=new Response(bY(g.body,kY,k,()=>{T&&T(),b&&u()},yA),x)}f=f||"text";let w=await V5[yr.findKey(V5,f)||"text"](g,e);return!b&&u(),l&&l(),await new Promise((x,S)=>{fY(x,S,{data:w,headers:ch.from(g.headers),status:g.status,statusText:g.statusText,config:e,request:s})})}catch(h){throw u(),h&&h.name==="TypeError"&&/fetch/i.test(h.message)?Object.assign(new ns("Network Error",ns.ERR_NETWORK,e,s),{cause:h.cause||h}):ns.from(h,h&&h.code,e,s)}}),_A={http:_Dt,xhr:XDt,fetch:aRt};yr.forEach(_A,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const CY=e=>`- ${e}`,nRt=e=>yr.isFunction(e)||e===null||e===!1,SY={getAdapter:e=>{e=yr.isArray(e)?e:[e];const{length:r}=e;let i,B;const D={};for(let c=0;c<r;c++){i=e[c];let m;if(B=i,!nRt(i)&&(B=_A[(m=String(i)).toLowerCase()],B===void 0))throw new ns(`Unknown adapter '${m}'`);if(B)break;D[m||"#"+c]=B}if(!B){const c=Object.entries(D).map(([a,v])=>`adapter ${a} `+(v===!1?"is not supported by the environment":"is not available in the build"));let m=r?c.length>1?`since :
|
|
4165
4165
|
`+c.map(CY).join(`
|